Flurry of GMP check failures
Torbjörn Granlund
tg at gmplib.org
Sat Nov 5 22:49:02 UTC 2016
I have not read carefully follow-ups on this yet, but here are some
observations.
Gentoo "hardened" behaves similarly wrt my sym.c/m.c example.
Note that gcc's defaults for compiling and linking do not affect things
much here, except that PIC code adds overhead. I am not suggesting that
we should pass -fno-pic (not am I suggesting that we should not pass
it); the sym.c/m.c example was intended to demonstrate the behaviour of
recent Debian 9.
But this is odd: At least Debian (didn't have a chance to check Gentoo
yet) does not ban R_X86_64_64 which we use frequently from GMP's
assembly for references to tables of constants. It bans R_X86_64_32S
which we use for tables of function pointer offsets. To me, this
discrepancy makes very little sense; either the resulting user binaries
will not be PIE or they will require load-time reloc patching. (This
discrepancy between similar relocs is the reason why fat builds fail
while "thin" builds work fine.)
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-devel
mailing list