This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: DSO: library or PIE
- From: Roland McGrath <roland at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Fri, 12 Nov 2010 14:30:03 -0800
- Subject: Re: DSO: library or PIE
> 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,
Roland