From dbbaec2634e74fc0a118c81e270c5de53685ab2c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 7 Apr 2005 00:53:22 +0000 Subject: gas/ 2005-04-06 H.J. Lu * config/tc-i386.c (tc_gen_reloc): Don't turn BFD_RELOC_X86_64_32S into BFD_RELOC_32. gas/testsuite/ 2005-04-06 H.J. Lu * gas/i386/x86-64-pcrel.s: Test R_X86_64_32S. * gas/i386/x86-64-pcrel.d: Updated. --- gas/ChangeLog | 5 +++++ gas/config/tc-i386.c | 7 +++++++ gas/testsuite/ChangeLog | 5 +++++ gas/testsuite/gas/i386/x86-64-pcrel.d | 1 + gas/testsuite/gas/i386/x86-64-pcrel.s | 1 + 5 files changed, 19 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index 57a0c54..1b8dda6 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-04-06 H.J. Lu + + * config/tc-i386.c (tc_gen_reloc): Don't turn + BFD_RELOC_X86_64_32S into BFD_RELOC_32. + 2005-04-06 Nick Clifton * po/rw.po: New translation: Kinyarwanda diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 486b0cf..83e2567 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5380,6 +5380,13 @@ tc_gen_reloc (section, fixp) #endif code = fixp->fx_r_type; break; + case BFD_RELOC_X86_64_32S: + if (!fixp->fx_pcrel) + { + /* Don't turn BFD_RELOC_X86_64_32S into BFD_RELOC_32. */ + code = fixp->fx_r_type; + break; + } default: if (fixp->fx_pcrel) { diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index be44600..9628cbc 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-04-06 H.J. Lu + + * gas/i386/x86-64-pcrel.s: Test R_X86_64_32S. + * gas/i386/x86-64-pcrel.d: Updated. + 2005-04-01 Jan-Benedict Glaw * gas/vax/flonum.s: New testcase: Encode some flonums. diff --git a/gas/testsuite/gas/i386/x86-64-pcrel.d b/gas/testsuite/gas/i386/x86-64-pcrel.d index f33f6cd..3d647bf 100644 --- a/gas/testsuite/gas/i386/x86-64-pcrel.d +++ b/gas/testsuite/gas/i386/x86-64-pcrel.d @@ -10,4 +10,5 @@ Disassembly of section .text: [ ]*[0-9a-f]+:[ ]+66 b8 00 00[ ]+movw?[ ]+\$(0x)?0,%ax[ ]*[0-9a-f]+:[ ]+R_X86_64_PC16[ ]+xtrn\+(0x)?2 [ ]*[0-9a-f]+:[ ]+b8 00 00 00 00[ ]+movl?[ ]+\$(0x)?0,%eax[ ]*[0-9a-f]+:[ ]+R_X86_64_PC32[ ]+xtrn\+(0x)?1 [ ]*[0-9a-f]+:[ ]+48 c7 c0 00 00 00 00[ ]+movq?[ ]+\$(0x)?0,%rax[ ]*[0-9a-f]+:[ ]+R_X86_64_PC32[ ]+xtrn\+(0x)?3 +[ ]*[0-9a-f]+:[ ]+48 c7 c0 00 00 00 00[ ]+movq?[ ]+\$(0x)?0,%rax[ ]*[0-9a-f]+:[ ]+R_X86_64_32S[ ]+xtrn #pass diff --git a/gas/testsuite/gas/i386/x86-64-pcrel.s b/gas/testsuite/gas/i386/x86-64-pcrel.s index bdd40dc..c58e093 100644 --- a/gas/testsuite/gas/i386/x86-64-pcrel.s +++ b/gas/testsuite/gas/i386/x86-64-pcrel.s @@ -4,5 +4,6 @@ _start: movw $(xtrn - .), %ax movl $(xtrn - .), %eax movq $(xtrn - .), %rax + movq $xtrn, %rax .p2align 4,0 -- cgit v1.1