This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Szabolcs Nagy <nsz at port70 dot net>, "H.J. Lu" <hjl dot tools at gmail dot com>, Uros Bizjak <ubizjak at gmail dot com>, Mike Stump <mikestump at comcast dot net>, Jack Howarth <howarth dot at dot gcc at gmail dot com>, Ian Lance Taylor <ian at airs dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Iain Sandoe <iain at codesourcery dot com>, Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, Rich Felker <dalias at libc dot org>
- Date: Mon, 11 May 2015 16:30:42 +0100
- Subject: Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE
- Authentication-results: sourceware.org; auth=none
- References: <20150417113731 dot GL1725 at tucnak dot redhat dot com> <CAMe9rOpGbB=UuSg3s437FaedD_mugzYKffdrJJfZEHVQQEBODQ at mail dot gmail dot com> <20150417115950 dot GM1725 at tucnak dot redhat dot com> <CAMe9rOp_Eck1MEOV6btcHLOsd5u0=dtEQDq3iy0QY0RvXwuVDQ at mail dot gmail dot com> <20150509143104 dot GA26462 at port70 dot net> <CAMe9rOp3tg=kJK+kCnDgDMxCpvfqP7kEG9LvwcPbakwNx+Hh_g at mail dot gmail dot com> <20150509185737 dot GA31118 at port70 dot net> <5550825F dot 1050300 at arm dot com> <20150511103151 dot GW1751 at tucnak dot redhat dot com> <5550A2F5 dot 50603 at arm dot com> <20150511130523 dot GX1751 at tucnak dot redhat dot com>
On 11/05/15 14:05, Jakub Jelinek wrote:
> On Mon, May 11, 2015 at 01:39:17PM +0100, Szabolcs Nagy wrote:
>> fyi, musl loader loads libstdc++ just fine because it has no
>
> But will it load any shared library that uses any of the 26 (if I count well
> on x86_64) @ symbols from libstdc++.so.6?
i looked, but all of those symbols have @@ variant too
so at least the libraries would load with musl.
>> musl may end up supporting @version but that's an independent
>> quest.
>
> It is not independent. If musl claims to support symbol versioning, it
> should support it properly, if not, then supposedly gcc configured for musl
> can't be compatible with gcc configured for other linux C libraries, and
> should force symbol versioning off.
ok, but the current solution does not make that easy:
configuring gcc with
--disable-gnu-indirect-function --disable-symvers
has no effect on libgcc_s.so.1 on linux.
(i can try to create a patch that removes the new
-DUSE_ELF_SYMVER from the libgcc cflags for musl, but that
seems a worse solution than the weak alias one).
(note that previously a simple spec file was enough to use an
existing gcc on linux to build things against musl...
this didnt work for c++ code that used libstdc++ headers, but
now it also fails for any build using -lgcc_s).