From 4e21640f674499048157fa62f08b16f6039f78f6 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 20 May 2016 06:01:28 -0700 Subject: Preserve addend for R_386_GOT32 and R_X86_64_GOT32 We should preserve addend for R_386_GOT32 and R_X86_64_GOT32 as in "movl $foo@GOT + 4, %eax" and "movq $foo@GOT + 4, %rax". PR gas/19600 * config/tc-i386.c (md_apply_fix): Preserve addend for BFD_RELOC_386_GOT32 and BFD_RELOC_X86_64_GOT32. * testsuite/gas/i386/addend.d: New file. * testsuite/gas/i386/addend.s: Likewise. * testsuite/gas/i386/x86-64-addend.d: Likewise. * testsuite/gas/i386/x86-64-addend.s: Likewise. * testsuite/gas/i386/i386.exp: Run addend and x86-64-addend. * testsuite/gas/i386/reloc32.d: Updated. --- gas/config/tc-i386.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'gas/config') diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 25a0fa2..8a4d987 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -9341,11 +9341,6 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) fixP->fx_done = 0; return; - case BFD_RELOC_386_GOT32: - case BFD_RELOC_X86_64_GOT32: - value = 0; /* Fully resolved at runtime. No addend. */ - break; - case BFD_RELOC_VTABLE_INHERIT: case BFD_RELOC_VTABLE_ENTRY: fixP->fx_done = 0; -- cgit v1.1