[svsm-devel] Fwd: Stage1 loader linker issues while building coconut svsm
Kalra, Ashish
ashish.kalra at amd.com
Wed Aug 30 20:03:09 CEST 2023
Hello,
Getting this ld error while linking stage1 loader in coconut svsm:
# cc -c -o stage1/stage1.o stage1/stage1.S
# cc -o stage1/stage1 stage1/stage1.o stage1/reset.o -nostdlib
-Wl,--build-id=none -Wl,-Tstage1/stage1.lds
/usr/local/bin/ld: stage1/stage1.o: relocation R_X86_64_32 against
`.startup.text' can not be used when making a PIE object; recompile with
-fPIE
/usr/local/bin/ld: failed to set dynamic section sizes: bad value
When i link with -no-pie, ld works fine.
The stage1 loader code looks to be doing all relative addressing, i
don't see any absolute addresses, compiling is not giving any issues anyway.
Also, ld is version 2.40:
$ ld --version
GNU ld (GNU Binutils) 2.40
Thanks,
Ashish
More information about the Svsm-devel
mailing list