Skip to content
  • H.J. Lu's avatar
    APX: Add R_X86_64_CODE_4_GOTPCRELX · 357de358
    H.J. Lu authored
    Intel Advanced Performance Extensions:
    adds the REX2 prefix for the additional general-purpose registers, r16-r31,
    	mov        name@GOTPCREL(%rip), %reg
    	test       %reg, name@GOTPCREL(%rip)
    	binop      name@GOTPCREL(%rip), %reg
    where binop is one of adc, add, add, cmp, or, sbb, sub, xor instructions.
     # define R_X86_64_CODE_4_GOTPCRELX 43
    if the instruction starts at 4 bytes before the relocation offset.  It is
    similar to R_X86_64_GOTPCRELX.  Linker can treat R_X86_64_CODE_4_GOTPCRELX
    as R_X86_64_GOTPCREL or convert the above instructions to
    	lea	name(%rip), %reg
    	mov	$name, %reg
    	test	$name, %reg
    	binop	$name, %reg
    if the first byte of the instruction at the relocation offset - 4 is 0xd5
    when possible.