Increment length by 1 if the relocation token is removed
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 15 Jan 2013 20:34:11 +0000 (20:34 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 15 Jan 2013 20:34:11 +0000 (20:34 +0000)
gas/

PR gas/15019
* config/tc-i386.c (lex_got): Increment length by 1 if the
relocation token is removed.

gas/testsuite/

PR gas/15019
* gas/i386/reloc32.s: Add tests for "xtrn@got -/+ 4".
* gas/i386/reloc64.s: Likewise.
* gas/i386/ilp32/reloc64.s: Likewise.

* gas/i386/reloc32.d: Updated.
* gas/i386/reloc64.d: Likewise.
* gas/i386/ilp32/reloc64.d: Likewise.

gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/ilp32/reloc64.d
gas/testsuite/gas/i386/ilp32/reloc64.s
gas/testsuite/gas/i386/reloc32.d
gas/testsuite/gas/i386/reloc32.s
gas/testsuite/gas/i386/reloc64.d
gas/testsuite/gas/i386/reloc64.s

index d632dcaa2d0a5ff6074ffb25198af448b7a7bb1c..8962bbb7737d88276045439e953bf69a199faf1a 100644 (file)
@@ -1,3 +1,9 @@
+2013-01-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/15019
+       * config/tc-i386.c (lex_got): Increment length by 1 if the
+       relocation token is removed.
+
 2013-01-15  Nick Clifton  <nickc@redhat.com>
 
        * config/tc-v850.c (md_assemble): Allow signed values for
@@ -6,7 +12,7 @@
 2013-01-11  Sean Keys  <skeys@ipdatasys.com>
 
        * config/tc-xgate.c (md_begin): Fix mistake made when going from
-        git to cvs.
+       git to cvs.
 
 2013-01-10  Peter Bergner <bergner@vnet.ibm.com>
 
@@ -18,7 +24,7 @@
 2013-01-10  Sean Keys  <skeys@ipdatasys.com>
 
        * config/tc-xgate.c (md_begin): Fix the printing of opcodes so
-        that the assember exits after the opcodes have been printed.
+       that the assember exits after the opcodes have been printed.
 
 2013-01-10  H.J. Lu  <hongjiu.lu@intel.com>
 
index 56c06005fe26e481a3c9a216b6155115b685f06e..641af39a15cbcc5aece1c274ed6a419da4b21740 100644 (file)
@@ -6783,8 +6783,6 @@ lex_got (enum bfd_reloc_code_real *rel,
              char *tmpbuf, *past_reloc;
 
              *rel = gotrel[j].rel[object_64bit];
-             if (adjust)
-               *adjust = len;
 
              if (types)
                {
@@ -6819,6 +6817,12 @@ lex_got (enum bfd_reloc_code_real *rel,
                /* Replace the relocation token with ' ', so that
                   errors like foo@GOTOFF1 will be detected.  */
                tmpbuf[first++] = ' ';
+             else
+               /* Increment length by 1 if the relocation token is
+                  removed.  */
+               len++;
+             if (adjust)
+               *adjust = len;
              memcpy (tmpbuf + first, past_reloc, second);
              tmpbuf[first + second] = '\0';
              return tmpbuf;
index 47d6d15e3031e57a56d189d6a18d4ac8d760a6c7..ed473d0540083df6a35d692a67f812f58ededd47 100644 (file)
@@ -1,3 +1,14 @@
+2013-01-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gas/15019
+       * gas/i386/reloc32.s: Add tests for "xtrn@got -/+ 4".
+       * gas/i386/reloc64.s: Likewise.
+       * gas/i386/ilp32/reloc64.s: Likewise.
+
+       * gas/i386/reloc32.d: Updated.
+       * gas/i386/reloc64.d: Likewise.
+       * gas/i386/ilp32/reloc64.d: Likewise.
+
 2013-01-15  Nick Clifton  <nickc@redhat.com>
 
        * gas/v850/basic.exp: Allow for variations in reloc names.
index 5d3df9a19bfbb42ed413fa002f55117b28b71fff..53083f31d260a0aa12c4d2362ac6c2ca2ed54757 100644 (file)
@@ -94,3 +94,5 @@ Disassembly of section \.data:
 .*[    ]+R_X86_64_64[  ]+xtrn
 .*[    ]+R_X86_64_64[  ]+xtrn\+0x7fffffff
 .*[    ]+R_X86_64_64[  ]+xtrn\-0x80000000
+.*[    ]+R_X86_64_GOT32[       ]+xtrn-0x4
+.*[    ]+R_X86_64_GOT32[       ]+xtrn\+0x4
index 4149ec257d6a440fdb231f1a0188247e182b7347..77764b3c625ceda16f2a7c3e65f01ac632065354 100644 (file)
@@ -184,3 +184,5 @@ bad .byte   xtrn@tpoff
        .quad   xtrn
        .quad   xtrn + 0x7fffffff
        .quad   xtrn - 0x80000000
+       .long   xtrn@got - 4
+       .long   xtrn@got + 4
index b2cd29c5142c5ef2eb539a1811528ae63486d9cc..cbd71d6d81f9cd522bf2073ea504711d9f3c30e1 100644 (file)
@@ -65,3 +65,6 @@ Disassembly of section \.data:
 .*[    ]+R_386_PC16[   ]+xtrn
 .*[    ]+R_386_8[      ]+xtrn
 .*[    ]+R_386_PC8[    ]+xtrn
+#...
+.*[    ]+R_386_GOT32[  ]+xtrn
+.*[    ]+R_386_GOT32[  ]+xtrn
index 1a893ffdb0936596a10ec714b6c505ee36844b1f..855dcf578d9039bb49052f75f8d3f688d617ac26 100644 (file)
@@ -159,3 +159,5 @@ bad .byte   xtrn@tlsldm
 bad    .byte   xtrn@dtpoff
 bad    .byte   xtrn@ntpoff
 bad    .byte   xtrn@tpoff
+       .long   xtrn@got + 4
+       .long   xtrn@got - 4
index b4780d4a255a75c61310f65f8e1ba3f4185a57a3..44919825fd29a52d86391903331b2c837d4e2a13 100644 (file)
@@ -87,3 +87,5 @@ Disassembly of section \.data:
 .*[    ]+R_X86_64_PC16[        ]+xtrn
 .*[    ]+R_X86_64_8[   ]+xtrn
 .*[    ]+R_X86_64_PC8[         ]+xtrn
+.*[    ]+R_X86_64_GOT32[       ]+xtrn-0x4
+.*[    ]+R_X86_64_GOT32[       ]+xtrn\+0x4
index f12271d35884d51b339cc6b269289d773a5afa90..7b35a029b14fa37b1b9d5f3f9fda2ec63c83d0ad 100644 (file)
@@ -198,3 +198,7 @@ bad .byte   xtrn@tpoff
 
        .text
        mov     xtrn@tpoff (%rbx), %eax
+
+       .data
+       .long   xtrn@got - 4
+       .long   xtrn@got + 4
This page took 0.034598 seconds and 4 git commands to generate.