Hi Maheedhar,
Build command : make -j12 CC=aarch64-none-elf-gcc LD=aarch64-none-elf-ld CROSS_COMPILE=aarch64-none-elf- PLAT=zynqmp RESET_TO_BL31=1 DEBUG=1 ZYNQMP_CONSOLE=dtb bl31> arm-trusted-firmware$ aarch64-none-elf-ld --version
GNU ld (GNU Binutils) 2.42.0.20240620
arm-trusted-firmware$ aarch64-none-elf-gcc --version
aarch64-xilinx-elf-gcc.real (GCC) 13.3.0
Have you tried with `LD=aarch64-none-elf-gcc`? That built for me. Inspecting the top level Makefile seems to suggest LTO will only work when gcc is used as the linker and nothing else. Do you need to use ld directly? LTO seems underused so stuff might be broken (I found https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/33984 recently).
Cheers, Boyan