This is the mail archive of the
mailing list for the glibc project.
Re: Is it a GNU Tools failure that PIE use ET_DYN and can't be distinguished from libraries?
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 18 Mar 2015 21:37:46 -0400
- Subject: Re: Is it a GNU Tools failure that PIE use ET_DYN and can't be distinguished from libraries?
- Authentication-results: sourceware.org; auth=none
- References: <55070AEC dot 5080107 at redhat dot com> <20150318205130 dot 06E652C3B2C at topped-with-meat dot com>
On 03/18/2015 04:51 PM, Roland McGrath wrote:
>> Is it a failing of the tooling that we didn't provide a way for
>> tools to determine PIE vs. DSO?
> It might be if we hadn't. But we defined a PIE as an ET_DYN with a
> DT_DEBUG. (We didn't account for a case that would be useful and the
> linker doesn't currently fully support: a static PIE, which is an ET_DYN
> that has no PT_INTERP and might not have a PT_DYNAMIC either.)
Interesting, ET_DYN + DT_DEBUG, I did not see that coming.
At best I'd have defined it as ET_DYN + PT_INTERP, and I would have
been happy to call libc.so.6 the first PIE.
>> Was it always the goal to be able to dlopen a PIE? e.g. Implement
>> both the daemon as a standalone executable and as a DSO you could
>> load and run as a service?
> That was indeed a goal at the inception of PIE.