|
|
Message-ID: <20151117152355.GF18372@port70.net>
Date: Tue, 17 Nov 2015 16:23:56 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: some odd library loading errors
* u-uy74@...ey.se <u-uy74@...ey.se> [2015-11-17 13:14:29 +0100]:
> The environment:
> Linux 3.# on x#86
> binutils 2.24
> musl 1.1.8 compiled for i486
> gcc 5.2.0
>
> (the gcc has arch=i486 as the default)
>
> No oddities were observed with the above until trying to use libatomic
> which is provided by gcc-5.2.0.
>
> The test case:
>
> $ cat >a.c <<____
> int main(){ return 0; }
> ____
>
> $ gcc -o a a.c -L<path-to-gcc-5.2.0-libs> -latomic
>
> $ LD_LIBRARY_PATH=<path-to-gcc-5.2.0-libs> ./a
> Error relocating <path-to-gcc-5.2.0-libs>/libatomic.so.1: __atomic_store_8: symbol not found
> Error relocating <path-to-gcc-5.2.0-libs>/libatomic.so.1: __atomic_exchange_8: symbol not found
> Error relocating <path-to-gcc-5.2.0-libs>/libatomic.so.1: __atomic_load_8: symbol not found
> Error relocating <path-to-gcc-5.2.0-libs>/libatomic.so.1: __atomic_compare_exchange_8: symbol not found
>
this is a known issue, they use the gnu ifunc extension of
elf to dispatch between different implementations based on
the machine at library loadtime.
> I would appreciate help with finding out who is doing wrong:
> - gcc
> - ld
> - musl
> - myself
> and what is to be corrected to make it work.
>
build gcc with --disable-gnu-indirect-function
(then i guess libatomic will always use the
portable implementation.)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.