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


> 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

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