Goa: build libraries fails on arm_v8a
Duss Pirmin
pirmin.duss at gapfruit.com
Tue Jan 31 13:17:02 CET 2023
Hello Genodians
While extending my tests for the feature to build libraries with Goa, I
encountered an error when building a library, that works well on x86_64,
for arm_v8a.
The error is as follows:
/usr/local/genode/tool/21.05/bin/../lib/gcc/aarch64-none-elf/10.3.0/../../../../aarch64-none-elf/bin/ld:
../../lib/libc++.lib.so: The first section in the PT_DYNAMIC segment is
not the .dynamic section
/usr/local/genode/tool/21.05/bin/../lib/gcc/aarch64-none-elf/10.3.0/../../../../aarch64-none-elf/bin/ld:
final link failed: bad value
I guess, this is due to some remaining bug in my changes. Other
libraries built from the same source tree (using cmake) can be built
without error.
Searching for the problem, I got [1] and [2].
The first blames binutils, the second is more specific by identifying
objcompy. AFAIK objcopy is part of binutils.
Has somebody an idea what could cause this error in the Goa case? Could
it be, that the wrong version of objcopy is used?
The verbose output is as follows (shortened and line breaked for better
readability):
/usr/local/genode/tool/21.05/bin/genode-aarch64-g++
-fPIC -fPIC -O2 -D__GENODE__ -nostdinc -D__BSD_VISIBLE
-D__FreeBSD__=8 -O3
-I/data/.../api/base/2022-09-17/include/spec/arm_64
...
-Wl,-gc-sections -Wl,-z -Wl,max-page-size=0x1000
-Wl,-Ttext=0x01000000 -Wl,--eh-frame-hdr -Wl,-rpath-link=.
-Wl,--whole-archive
-nostartfiles -nodefaultlibs
-static-libgcc
-L/data/gapfruit/goa/llvm/var/abi/arm_v8a
-lgcc
-l:ldso_so_support.lib.a
-fPIC
-T /home/pirmin/.local/goa/share/goa/ld/genode_rel.ld
-shared
-o ../../lib/libc++.lib.so
CMakeFiles/cxx_shared.dir/algorithm.cpp.obj
...
-nodefaultlibs
I have already pushed some new commits that fix small things that I
discovered during extended testing.
Regard, Pirmin
[1] https://bugzilla.redhat.com/show_bug.cgi?id=679435
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=12516
More information about the users
mailing list