[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH v2 2/7] build: Link libgcc at the end of the link options list
To use newlib on arm64 plat kvm, libgcc should be linked at the end of the options list, otherwise it will be ignored due to -stdlib. Without this patch, there will be a linking error on arm kvm plat: syslog.c:(.text+0x7d5cc): undefined reference to `__floatsitf' syslog.c:(.text+0x7d5cc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__floatsitf' /root/hj/UK/unikraft_upstream/apps/helloworld/build/helloworld_kvm-arm64.o: In function `__ieee754_hypotl': syslog.c:(.text+0x99434): undefined reference to `__multf3' syslog.c:(.text+0x99434): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `__multf3' syslog.c:(.text+0x99444): undefined reference to `__multf3' syslog.c:(.text+0x99444): additional relocation overflows omitted from the output syslog.c:(.text+0x99450): undefined reference to `__addtf3' /root/hj/UK/unikraft_upstream/apps/helloworld/build/helloworld_kvm-arm64.o: In function `sqrtl': syslog.c:(.text+0xb12c0): undefined reference to `__trunctfdf2' syslog.c:(.text+0xb12c8): undefined reference to `__extenddftf2' Above undefined symbols are at libgcc.a Signed-off-by: Jia He <justin.he@xxxxxxx> --- plat/kvm/Linker.uk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plat/kvm/Linker.uk b/plat/kvm/Linker.uk index 5e42193..65a5f8e 100644 --- a/plat/kvm/Linker.uk +++ b/plat/kvm/Linker.uk @@ -2,6 +2,7 @@ ifeq (x86_64,$(CONFIG_UK_ARCH)) KVM_LDFLAGS-y += -Wl,-m,elf_x86_64 else ifeq (arm64,$(CONFIG_UK_ARCH)) KVM_LDFLAGS-y += -Wl,-m,aarch64elf +KVM_LINK_LIBGCC_FLAG := -lgcc endif @@ -26,6 +27,7 @@ $(KVM_DEBUG_IMAGE): $(KVM_ALIBS) $(KVM_ALIBS-y) $(KVM_OLIBS) $(KVM_OLIBS-y) \ -Wl$(comma)--start-group \ $(KVM_ALIBS) $(KVM_ALIBS-y) \ $(UK_ALIBS) $(UK_ALIBS-y) \ + $(KVM_LINK_LIBGCC_FLAG) \ -Wl$(comma)--end-group \ -o $(KVM_IMAGE).ld.o) $(call build_cmd,OBJCOPY,,$(KVM_IMAGE).o,\ -- 2.17.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |