This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]