PIE vs DSO
We have received requests to tell position-independent executables (PIEs) from dynamic shared objects (DSOs). Both are marked ET_DYN
in the ELF header, so it is not entirely obvious how to tell them apart.
There is some debate whether it is possible, with the current scheme, to tell PEI executables from DSOs. This is important for compliance checking because policies for DSOs and binaries might differ (depending on the policy which want to enforce).