Hi, > -DEFINE GCC_DLINK2_FLAGS_COMMON = > -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds > +DEFINE GCC_DLINK2_FLAGS_COMMON = > -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds -lgcc > > Build doesn't come very far. Looks like the gcc intrinsics are not > free-standing but want call into libc: > > /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/11/libgcc.a(_absvsi2.o): in > function `__absvdi2': > (.text+0x18): undefined reference to `abort'
> Not sure why the linker tries > to resolve symbols for object files which should not be needed in the > first place. Possibly something else is fishy here, any hints are > welcome. Something in the linker script maybe? So, digged a bit more into this. When unpacking libgcc.a, then packing a new lib with only the object files needed, and pass that to the linker everything works fine. In theory just using -lgcc should have the same effect, especially when it comes last on the command line so even in case of a symbol being defined in both tianocore and libgcc the linker should prefer the tianocore version. In practice that is not the case. Debugging to be continued next week ... take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#86165): https://edk2.groups.io/g/devel/message/86165 Mute This Topic: https://groups.io/mt/87479913/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-