Goa: build libraries fails on arm_v8a

Pirmin Duss pirmin.duss at gapfruit.com
Mon Feb 6 10:14:03 CET 2023


Hello Sebastian,

On 2/2/23 10:09, Sebastian Sumpf wrote:
> The unwind code for C++ exceptions is in ld.lib.so. But for shared 
> libraries we do not link ld.lib.so, because the missing unwind symbols 
> should end up as undefined symbols in the library. Only when the dynamic 
> binary is linked ld.lib.so should be required  to resolve these 
> undefined symbols. The questions is why the linking of libc++.lib.so 
> complains about these undefined symbols in the first place?

Using Genode aarch64 objdump on the generated libraries shows, that only 
the `_init` symbol ends up in there.

Using the same command for x86_64 shows many more things in the 
libraries for this platform.

Now I wonder what is the difference in linking libraries for aarch64 
compared to x86_64?

The commands to link the library for both platforms are attached.

Regards, Pirmin
-------------- next part --------------
[llvm:cmake]
	/usr/local/genode/tool/21.05/bin/genode-x86-g++
	-fPIC
	-fPIC
	-O2
	-D__GENODE__
	-m64
	-nostdinc
	-D__BSD_VISIBLE
	-D__FreeBSD__=8
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/base/2022-09-17/include/spec/x86_64
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/base/2022-09-17/include/spec/x86
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/base/2022-09-17/include/spec/64bit
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/base/2022-09-17/include
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include/spec/x86_64
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include/spec/x86
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include
	-I/usr/local/genode/tool/21.05/lib/gcc/x86_64-pc-elf/10.3.0/include
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include/libc
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include/libc-genode
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include/spec/x86/libc
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include/spec/x86_64/libc
	-O3
	
	-Wl,-gc-sections
	-Wl,-z
	-Wl,max-page-size=0x1000
	-Wl,-Ttext=0x01000000
	-Wl,--eh-frame-hdr
	-Wl,-rpath-link=.
	-Wl,--entry=0x0
	-Wl,-melf_x86_64
	-Wl,--whole-archive
	-nostartfiles
	-nodefaultlibs
	-static-libgcc
	-L/data/gapfruit/goa/llvm/var/abi/x86_64
	-lgcc
	-l:ldso_so_support.lib.a
	-T /home/pirmin/.local/goa/share/goa/ld/genode_rel.ld
	-shared
	
	-o ../../lib/libc++.lib.so
	CMakeFiles/cxx_shared.dir/algorithm.cpp.obj
	CMakeFiles/cxx_shared.dir/any.cpp.obj
	CMakeFiles/cxx_shared.dir/atomic.cpp.obj
	CMakeFiles/cxx_shared.dir/barrier.cpp.obj
	CMakeFiles/cxx_shared.dir/bind.cpp.obj
	CMakeFiles/cxx_shared.dir/charconv.cpp.obj
	CMakeFiles/cxx_shared.dir/chrono.cpp.obj
	CMakeFiles/cxx_shared.dir/condition_variable.cpp.obj
	CMakeFiles/cxx_shared.dir/condition_variable_destructor.cpp.obj
	CMakeFiles/cxx_shared.dir/debug.cpp.obj
	CMakeFiles/cxx_shared.dir/exception.cpp.obj
	CMakeFiles/cxx_shared.dir/functional.cpp.obj
	CMakeFiles/cxx_shared.dir/future.cpp.obj
	CMakeFiles/cxx_shared.dir/hash.cpp.obj
	CMakeFiles/cxx_shared.dir/ios.cpp.obj
	CMakeFiles/cxx_shared.dir/iostream.cpp.obj
	CMakeFiles/cxx_shared.dir/locale.cpp.obj
	CMakeFiles/cxx_shared.dir/memory.cpp.obj
	CMakeFiles/cxx_shared.dir/mutex.cpp.obj
	CMakeFiles/cxx_shared.dir/mutex_destructor.cpp.obj
	CMakeFiles/cxx_shared.dir/new.cpp.obj
	CMakeFiles/cxx_shared.dir/optional.cpp.obj
	CMakeFiles/cxx_shared.dir/random.cpp.obj
	CMakeFiles/cxx_shared.dir/random_shuffle.cpp.obj
	CMakeFiles/cxx_shared.dir/regex.cpp.obj
	CMakeFiles/cxx_shared.dir/shared_mutex.cpp.obj
	CMakeFiles/cxx_shared.dir/stdexcept.cpp.obj
	CMakeFiles/cxx_shared.dir/string.cpp.obj
	CMakeFiles/cxx_shared.dir/strstream.cpp.obj
	CMakeFiles/cxx_shared.dir/system_error.cpp.obj
	CMakeFiles/cxx_shared.dir/thread.cpp.obj
	CMakeFiles/cxx_shared.dir/typeinfo.cpp.obj
	CMakeFiles/cxx_shared.dir/utility.cpp.obj
	CMakeFiles/cxx_shared.dir/valarray.cpp.obj
	CMakeFiles/cxx_shared.dir/variant.cpp.obj
	CMakeFiles/cxx_shared.dir/vector.cpp.obj
	CMakeFiles/cxx_shared.dir/filesystem/operations.cpp.obj
	CMakeFiles/cxx_shared.dir/filesystem/directory_iterator.cpp.obj
	CMakeFiles/cxx_shared.dir/filesystem/int128_builtins.cpp.obj
	
	-nodefaultlibs
-------------- next part --------------
[llvm:cmake]
	/usr/local/genode/tool/21.05/bin/genode-aarch64-g++
	-fPIC
	-fPIC
	-O2
	-D__GENODE__
	-nostdinc
	-D__BSD_VISIBLE
	-D__FreeBSD__=8
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/base/2022-09-17/include/spec/arm_64
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/base/2022-09-17/include/spec/64bit
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/base/2022-09-17/include
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include/spec/arm_64
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include
	-I/usr/local/genode/tool/21.05/lib/gcc/aarch64-none-elf/10.3.0/include
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include/libc
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include/libc-genode
	-I/data/gapfruit/goa/llvm/var/depot/trimpim/api/libc/2023-01-30/include/spec/arm_64/libc
	-O3
	
	-Wl,-gc-sections
	-Wl,-z
	-Wl,max-page-size=0x1000
	-Wl,-Ttext=0x01000000
	-Wl,--eh-frame-hdr
	-Wl,-rpath-link=.
	-Wl,--entry=0x0
	-Wl,--whole-archive
	-nostartfiles
	-nodefaultlibs
	-static-libgcc
	-L/data/gapfruit/goa/llvm/var/abi/arm_v8a
	-lgcc
	-l:ldso_so_support.lib.a
	-T /home/pirmin/.local/goa/share/goa/ld/genode_rel.ld
	-shared
	
	-o ../../lib/libc++.lib.so
	CMakeFiles/cxx_shared.dir/algorithm.cpp.obj
	CMakeFiles/cxx_shared.dir/any.cpp.obj
	CMakeFiles/cxx_shared.dir/atomic.cpp.obj
	CMakeFiles/cxx_shared.dir/barrier.cpp.obj
	CMakeFiles/cxx_shared.dir/bind.cpp.obj
	CMakeFiles/cxx_shared.dir/charconv.cpp.obj
	CMakeFiles/cxx_shared.dir/chrono.cpp.obj
	CMakeFiles/cxx_shared.dir/condition_variable.cpp.obj
	CMakeFiles/cxx_shared.dir/condition_variable_destructor.cpp.obj
	CMakeFiles/cxx_shared.dir/debug.cpp.obj
	CMakeFiles/cxx_shared.dir/exception.cpp.obj
	CMakeFiles/cxx_shared.dir/functional.cpp.obj
	CMakeFiles/cxx_shared.dir/future.cpp.obj
	CMakeFiles/cxx_shared.dir/hash.cpp.obj
	CMakeFiles/cxx_shared.dir/ios.cpp.obj
	CMakeFiles/cxx_shared.dir/iostream.cpp.obj
	CMakeFiles/cxx_shared.dir/locale.cpp.obj
	CMakeFiles/cxx_shared.dir/memory.cpp.obj
	CMakeFiles/cxx_shared.dir/mutex.cpp.obj
	CMakeFiles/cxx_shared.dir/mutex_destructor.cpp.obj
	CMakeFiles/cxx_shared.dir/new.cpp.obj
	CMakeFiles/cxx_shared.dir/optional.cpp.obj
	CMakeFiles/cxx_shared.dir/random.cpp.obj
	CMakeFiles/cxx_shared.dir/random_shuffle.cpp.obj
	CMakeFiles/cxx_shared.dir/regex.cpp.obj
	CMakeFiles/cxx_shared.dir/shared_mutex.cpp.obj
	CMakeFiles/cxx_shared.dir/stdexcept.cpp.obj
	CMakeFiles/cxx_shared.dir/string.cpp.obj
	CMakeFiles/cxx_shared.dir/strstream.cpp.obj
	CMakeFiles/cxx_shared.dir/system_error.cpp.obj
	CMakeFiles/cxx_shared.dir/thread.cpp.obj
	CMakeFiles/cxx_shared.dir/typeinfo.cpp.obj
	CMakeFiles/cxx_shared.dir/utility.cpp.obj
	CMakeFiles/cxx_shared.dir/valarray.cpp.obj
	CMakeFiles/cxx_shared.dir/variant.cpp.obj
	CMakeFiles/cxx_shared.dir/vector.cpp.obj
	CMakeFiles/cxx_shared.dir/filesystem/operations.cpp.obj
	CMakeFiles/cxx_shared.dir/filesystem/directory_iterator.cpp.obj
	CMakeFiles/cxx_shared.dir/filesystem/int128_builtins.cpp.obj
	
	-nodefaultlibs


More information about the users mailing list