[PATCH 0/5] Add support for R_386_GOT32X/R_X86_64_[REX_]GOTPCRELX
H.J. Lu
hjl.tools@gmail.com
Mon Jan 18 16:23:00 GMT 2016
On Mon, Jan 18, 2016 at 7:58 AM, Rafael Espíndola
<rafael.espindola@gmail.com> wrote:
> Hi H.J. Lu,
>
> Sorry if I missed this somewhere else, but could you explain why we
> need these new relocations? Is it just to move work from the linker to
> the assembler or there was some correctness issue optimizing a plain
> R_X86_64_GOTPCREL?
>
They are used to convert memory operand of test and binop into
immediate operand, where binop is one of adc, add, and, cmp, or,
sbb, sub, xor instructions, when position-independent code is disabled.
The new relocation tells linker that it should try such optimization
since binop is one of mentioned above.
--
H.J.
More information about the Binutils
mailing list