Is it a GNU Tools failure that PIE use ET_DYN and can't be distinguished from libraries?
Mike Frysinger
vapier@gentoo.org
Mon Mar 16 18:31:00 GMT 2015
On 16 Mar 2015 12:55, Carlos O'Donell wrote:
> While looking at recent ABI comparison failures I noticed that
> some internal Red Hat tooling was looking at PIEs and treating
> their exported dynamic symbols as fixed ABI/API that must not
> change.
>
> The truth is that from the tooling perspective you can't tell the
> difference between a PIE and an ET_DYN, except that you might guess
> PIE if you see PT_INTERP (and you'd be wrong for libc.so and
> ld.so)
>
> Is it a failing of the tooling that we didn't provide a way for
> tools to determine PIE vs. DSO?
>
> or
>
> 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?
i don't think ET_DYN vs ET_EXEC matters. some main executables export their
symbols so that they can be found by plugins they load later on, not so that
other things can dlopen them directly. off the top of my head, iproute2 does
exactly this.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150316/cd1fc2a0/attachment.sig>
More information about the Libc-alpha
mailing list