On 9/5/18 10:27 PM, Alec Leamas wrote: > On 05/09/18 17:41, Sebastiaan Couwenberg wrote: >> On 9/5/18 5:26 PM, Alec Leamas wrote: > >>> Isn't a library so-file without visible symbols terribly wrong? >> >> Yes, that implies that no methods are exported which can be used by >> other programs, defeating the purpose of being a shared library. > > I'm on a place I shouldn't be, likely a silly error.. pick som random > functions as an example (slighty trimmed), link without being visible: > > $ git grep expand ../rar/uncompress-rar.c > ../rar/uncompress-rar.c:int64_t rar_expand_v2(...) > ../rar/uncompress-rar.c:int64_t rar_expand(...) > > See it in the object file: > > $ nm ./CMakeFiles/unarr.dir/rar/uncompress-rar.c.o | grep expand > 00000000 T rar_expand > 00000000 T rar_expand_v2 > > Do a simplified link (complete link command => same result) > $ ./slask3 > + /usr/bin/cc -shared -Wl,--no-undefined \ > -o libunarr.so.1.0.0\CMakeFiles/unarr.dir/rar/uncompress-rar.c.o \ > CMakeFiles/unarr.dir/rar/huffman-rar.c.o > > See missing symbols:' > > $ readelf -t *0 | grep expand > > See symbols in debug info: > $ readelf -wi *0 | grep expand > <121f> DW_AT_name : \ > (indirect string, offset: 0x221): rar_expand > <163f> DW_AT_name : \ > (indirect string, offset: 0xd): rar_expand_v2 > <121f> DW_AT_name : (indirect string, offset: 0x221): > rar_expand > <163f> DW_AT_name : (indirect string, offset: 0xd): > rar_expand_v2 > > Same seem to apply to all symbols: they are there, but not visible. Has > anyone a clue?
I don't, that's why you should reply to the list instead of me personally. Kind Regards, Bas
