Here is the change made to libgcc.so 4 years ago that seems to be causing 
this problem - 
https://github.com/gcc-mirror/gcc/commit/4b5fb32aba30762e0d8c9e75d1b46b47bee5eeb4
.

These 2 missing (hidden with versioning) are present in libgcc.a:
readelf -s /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a | grep 
__cpu_indicator_init
    13: 0000000000000290   905 FUNC    GLOBAL HIDDEN     4 
__cpu_indicator_init

We stopped linking libgcc.a as whole-archive year ago but even if we still 
did it would not help us given this symbol is hidden.

I wonder how we should solve it.

On Thursday, November 28, 2019 at 3:18:48 PM UTC-5, Waldek Kozaczuk wrote:
>
> This is related to https://github.com/cloudius-systems/osv/issues/743.
>
> I have been trying to eliminate ancient libgcc_s.so from usr.manifest.skel 
> and replace it with the version from host. When I do that most (C++ only?) 
> apps fail like so:
>
> Cmdline: /java_isolated.so -cp /tests/java/tests.jar 
> io.osv.TestDomainPermissions
> /usr/lib/libgcc_s.so.1: ignoring missing symbol __cpu_indicator_init
> /usr/lib/libgcc_s.so.1: ignoring missing symbol __cpu_model
> trying to execute or access missing symbol
> [backtrace]
> 0x000000004039d6ab <page_fault+267>
> 0x000000004039c486 <???+1077527686>
> 0x00000000403528ca <elf::program::init_library(int, char**)+362>
> 0x0000000040223cdd <osv::application::main()+61>
> 0x000000004042deb8 <???+1078124216>
> 0x000000004045fdb5 <???+1078328757>
> 0x00000000403f9ce7 <thread_main_c+39>
> 0x000000004039d402 <???+1077531650>
>
> I somehow discovered it has to do with versioning. So when I undo my 
> commit that fixed libnuma (see 
> https://github.com/cloudius-systems/osv/commit/ed1eed7a567ec17138c65f0a5628c2311603c712
> ). 
>
> So if I manually undo these changes the error disappears. It is obviously 
> related to these warnings:
> /usr/lib/libgcc_s.so.1: ignoring missing symbol __cpu_indicator_init
> /usr/lib/libgcc_s.so.1: ignoring missing symbol __cpu_model
>
> What is actually going on? And what is the right fix?
>
> I found couple of the things that might be related:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1688766
>
> http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-9.2/0032-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch?h=master
>
> Waldek
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/e5b7c460-b7d5-438f-9001-5546f65c4894%40googlegroups.com.

Reply via email to