[MPlayer-dev-eng] [PATCH] compile as PIE by default

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat May 26 21:05:28 CEST 2012


On Tue, May 22, 2012 at 04:27:12AM +0300, Ivan Kalvachev wrote:
> Without researching the topic.
> Would the above check fail if --enable-static is used?

This is very irritating. For 32 bit, --enable-static just fine creates a file
about which "ldd" says "statically linked", and "file" says is
relocatable (well, and also that it is dynamically linked), and
everything seems fine except that trying to execute it results
in "bash: ./mplayer: No such file or directory". WTF?
I can't test for 64 bit, because at least my system there is no static
crt available that is compatible with PIE, thus the feature is disabled:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.7/crtbeginT.o: relocation
R_X86_64_32 against `__TMC_END__' can not be used when making a shared
object; recompile with -fPIC
Obviously nobody bothered to in the slightest bit test -pie with
-static, even though that combination very much makes sense (even if
not when you take the names literally)...


More information about the MPlayer-dev-eng mailing list