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