Goa: build libraries fails on arm_v8a

Sebastian Sumpf Sebastian.Sumpf at genode-labs.com
Wed Feb 1 17:23:59 CET 2023

Hello again,

On 2/1/23 14:18, Duss Pirmin wrote:
> Hello Sebastian
> Thanks for the quick patch.
> On 01.02.23 13:26, Sebastian Sumpf wrote:
>>> For Goa to build libraries the following version is required:
>>>   - repository: git at gitlab.com:/gapfruit-community/goa.git
>>>   - branch:     library_support
>> This, I could not find and used the one from GitHub.
> This was okay. Sorry for putting the wrong repository there.
>> The attached patch [1] resolves the linking error for me, somehow the .got 
>> ended up first in the DYNAMIC segment. Can you please check if it works for 
>> you? However, I see a lot of undefined references to cxx.lib.a and pthread 
>> stuff afterwards. Looks like "-Lllvm/var/abi/arm_v8a"  is missing in the 
>> linking command of libc++.lib.so. Additionally, "-lgcc" seems a little dangerous.
> The patch indeed fixes the problem. I get the same linker errors that you 
> described now.
> I think, these I can fix, by tweaking the Goa project.

Great. Two notes from my side:

1. libgcc is in ld.lib.so on Genode, so you should link against ld.lib.so or its 
api and get rid of -lgcc and  -static-libgcc. The pthread things are in libc.lib.so

2. Because of the error you encountered it might very well be that the resulting 
shared object will not contain a .dynamic section. This would make it impossible 
for the dynamic linker to load the library at runtime. So, please make sure with

! genode-aarch64-objdump -ph libc++.lib.so

that the library has a PT_DYNAMIC segment as well as a .dynamic section with 
data in it once you got everything linked together. You can also send the output 
here and I will have a look.

Good luck,


Sebastian Sumpf
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

More information about the users mailing list