This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: DSO: library or PIE
- From: Kirill A. Shutemov <kirill at shutemov dot name>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Sat, 13 Nov 2010 23:41:25 +0200
- Subject: Re: DSO: library or PIE
On Fri, Nov 12, 2010 at 02:30:03PM -0800, Roland McGrath wrote:
> > Is there any easy way to detect whether DSO is PIE?
>
> A PIE's dynamic section (SHT_DYNAMIC/PT_DYNAMIC) has a DT_DEBUG entry.
> e.g. eu-readelf -d FILE | awk '$1 == "DEBUG" { exit 0 } END { exit 1 }'
Thanks. It seems works.
Does it specified in some spec or GNU ld just work so?
--
Kirill A. Shutemov