This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH] arm: fix PIC vs SHARED typos
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-ports at sourceware dot org
- Date: Mon, 19 Sep 2011 19:35:40 +0000 (UTC)
- Subject: Re: [PATCH] arm: fix PIC vs SHARED typos
- References: <201109191506.36854.vapier@gentoo.org>
On Mon, 19 Sep 2011, Mike Frysinger wrote:
> the logic in setjmp/__longjmp incorrectly tie to "PIC" to figure out
> whether the code is going into a shared library when it should be using
> "SHARED". otherwise, building static PIC code goes wrong.
You'll need to give a better explanation (testcase) of what you mean by
"goes wrong".
Static PIEs aren't supported on x86_64 so I don't suppose they are
supported on ARM; PIEs have to use shared libraries. But if they were
supported, the PIC code here looks better than the non-PIC - you can't
just put an absolute address in a constant pool in the text section in
position-independent code the way the non-PIC code does; the conditional
really does seem to be about "must the text be position-independent?".
In any case, the PIC builds of glibc objects (outside of libc_nonshared.a
and crt*.o) should I expect only ever be used as part of building the
shared library; static linking (absent any support for static PIEs) uses
libc.a which I would expect always to be built non-PIC.
--
Joseph S. Myers
joseph@codesourcery.com