On 26/04/18 00:20, Allan McRae wrote:
There are two issues here:
- file sucks. It is not distinguishing between PIE binaries and libraries.
Has that been reported upstream or are we just working around a bug in makepkg? If this is fixed upstream, the fix I will accept into pacman will be quite different...
And replying to my own comment...
In the original patch commit: "file 5.33 also misidentifies actual libraries as PIE executables"
Is there any actually difference between a library and a binary when they are built with PIE? Aren't the elf headers exactly the same? Note, we have been detecting PIE binaries as application/x-sharedlib with previous file versions.
So either: 1) original patch is fine, as we need to update the description of STRIP_SHARED to include all PIE things, or 2) we need a STRIP_PIE variable.
Can someone confirm what we get with static PIE with gcc8+? This will make my decision.