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

Alexander Strasser eclipse7 at gmx.net
Tue May 22 00:56:14 CEST 2012


Hello Reimar,

Reimar Döffinger wrote:
> below patch would compile MPlayer as PIE on x86 by default.
> On 32 bit, the cost would only be in a larger binary size and having to do
> relocations at startup, but no real cost at runtime.
> On 64 bit, there is almost no size or runtime overhead, mostly that
> in some cases PIC-relative addressing has to be used.
> I believe that none of the assembler code will be disabled by either.
> I have not made any changes to other architectures since I can't
> judge the impact.
> A side effect of the 64 bit case is that MPlayer will refuse to link
> against some static libraries (those not compiled with PIC and thus violating
> the ABI), one example (which only exists as static library) is LIVE555
> as provided by Debian.
> Another point is that backtraces without debug info will probably be
> even less useful.
> Any comments? My belief is that there is negligible if any disadvantage
> for a sometimes significant win in security.

  Sounds reasonable, judging from what you say. I cannot evaluate the
ramifications myself. So no strong opinions on my side.

  Waiting a bit for more informed comments, may be better though.

  Alexander


More information about the MPlayer-dev-eng mailing list