Flurry of GMP check failures
nisse at lysator.liu.se
Sun Nov 6 08:50:51 UTC 2016
tg at gmplib.org (Torbjörn Granlund) writes:
> 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.
Hmm, didn't openbsd pioneer this pie-by-default thing some year ago, and
there was a similar oddness with supported reloc types?
> To me, this discrepancy makes very little sense; either the resulting
> user binaries will not be PIE or they will require load-time reloc
IIRC, the motivation was that a 64-bit reloc is large enough to *always*
be pathchable to point to the right place at load time, while a 32-bit
reloc might be too small, depending in the ultimate location of the
target. (If I haven't misunderstood what these relocs are; I have a very
fuzzy understanding of the details).
And if the code is expected to be pic and sharable at loadtime, neither
reloc type should be used in the text or rodata segment; while
R_X86_64_64 is perfectly fine for tables placed in the data segment.
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
More information about the gmp-devel