]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Import fix for PR 18481 which corrects the generation of relocs for R_ARM_TLS_LE32.
authorNick Clifton <nickc@redhat.com>
Fri, 19 Jun 2015 11:14:33 +0000 (12:14 +0100)
committerNick Clifton <nickc@redhat.com>
Fri, 19 Jun 2015 11:14:33 +0000 (12:14 +0100)
PR 18481
bfd * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.

gas * config/tc-arm.c (md_apply_fix): Add support for ADR in thumb
mode against a nearby symbol.

tests * gas/arm/tls.s: Add tests of the tpoff pseudo with a local
symbol.
* gas/arm/tls.d: Update expected output.

bfd/ChangeLog
bfd/elf32-arm.c
gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/tls.d
gas/testsuite/gas/arm/tls.s

index 90f657050af5df094137f32dbacc4b1ba3cd24f5..d39fdddd477f4b04ce692e1b9029652084d4ded0 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-19  Nick Clifton  <nickc@redhat.com>
+
+       PR 18481
+       * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
+
 2015-05-05  Jiong Wang  <jiong.wang@arm.com>
 
        Apply from master:
index 76902510ca84b3b1a9bad9f785596b3017d20131..9fd5720b8b3a07ec14b4279f7e5cf91a79d59a8f 100644 (file)
@@ -1606,7 +1606,7 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
         complain_overflow_bitfield,/* complain_on_overflow */
-        bfd_elf_generic_reloc, /* special_function */
+        NULL,                  /* special_function */
         "R_ARM_TLS_LE32",      /* name */
         TRUE,                  /* partial_inplace */
         0xffffffff,            /* src_mask */
index 75a2531af795098fdd9dafb77c7a48be519e4b27..8aea85258a5f42c4b7e78456aed3e185dbb10d78 100644 (file)
@@ -1,3 +1,9 @@
+2015-06-19  Nick Clifton  <nickc@redhat.com>
+
+       PR gas/18541
+       * config/tc-arm.c (md_apply_fix): Add support for ADR in thumb
+       mode against a nearby symbol.
+
 2015-06-17  Renlin Li  <renlin.li@arm.com>
 
        Applied from master.
@@ -12,7 +18,7 @@
        2015-05-05  Renlin Li  <renlin.li@arm.com>
 
        * config/tc-aarch64.c (aarch64_init_frag): Always generate mapping
-       symbols. 
+       symbols.
 
 2015-06-04  Matthew Wahab  <matthew.wahab@arm.com>
 
index 1714ec81e2dd31419e39b880526cccdf7ff2cdd4..2ab8bbea7e5bb3440bcdca1adda676242e92c0ed 100644 (file)
@@ -23247,7 +23247,6 @@ tc_gen_reloc (asection *section, fixS *fixp)
     case BFD_RELOC_ARM_SBREL32:
     case BFD_RELOC_ARM_PREL31:
     case BFD_RELOC_ARM_TARGET2:
-    case BFD_RELOC_ARM_TLS_LE32:
     case BFD_RELOC_ARM_TLS_LDO32:
     case BFD_RELOC_ARM_PCREL_CALL:
     case BFD_RELOC_ARM_PCREL_JUMP:
@@ -23285,6 +23284,7 @@ tc_gen_reloc (asection *section, fixS *fixp)
 
     case BFD_RELOC_ARM_TLS_GOTDESC:
     case BFD_RELOC_ARM_TLS_GD32:
+    case BFD_RELOC_ARM_TLS_LE32:
     case BFD_RELOC_ARM_TLS_IE32:
     case BFD_RELOC_ARM_TLS_LDM32:
       /* BFD will include the symbol's address in the addend.
index 0cc4294680878ed62f49ad1030da4c33b7fc2848..173630bf71bd181e8ef5030e703f1182ec1e685e 100644 (file)
@@ -1,3 +1,10 @@
+2015-06-19  Nick Clifton  <nickc@redhat.com>
+
+       PR gas/18481
+       * gas/arm/tls.s: Add tests of the tpoff pseudo with a local
+       symbol.
+       * gas/arm/tls.d: Update expected output.
+
 2015-06-17  Renlin Li  <renlin.li@arm.com>
 
        Applied from master.
index 727f8e4e0b96be5826900e7750693393fdefcebc..4d7e7244b2a8bffe9df90bf39cece44108ff7b64 100644 (file)
@@ -47,3 +47,21 @@ Disassembly of section .text:
                        3c: R_ARM_TLS_LE32      td
   40:  00000017        .word   0x00000017
                        40: R_ARM_TLS_GOTDESC   te
+0+44 <foo>:
+  44:  fffffff4        .word   0xfffffff4
+                       44: R_ARM_TLS_LE32      tbase
+  48:  fffffff8        .word   0xfffffff8
+                       48: R_ARM_TLS_LE32      tbase
+  4c:  fffffffc        .word   0xfffffffc
+                       4c: R_ARM_TLS_LE32      tbase
+  50:  00000000        .word   0x00000000
+                       50: R_ARM_TLS_LE32      tbase
+  54:  00000004        .word   0x00000004
+                       54: R_ARM_TLS_LE32      tbase
+  58:  00000008        .word   0x00000008
+                       58: R_ARM_TLS_LE32      tbase
+  5c:  0000000c        .word   0x0000000c
+                       5c: R_ARM_TLS_LE32      tbase
+  60:  00000000        .word   0x00000000
+                       60: R_ARM_TLS_LE32      tbase
+#pass
index 96a25f56f88d5fbddac0fcaed2a713c972aaf231..346ac98c0e9d816d7ff8790ad110c80a94979c91 100644 (file)
@@ -36,3 +36,26 @@ thumb_fn:
        .word   tc(gottpoff) + (. - 1b - 8)
        .word   td(tpoff)
 1:     .word   te(tlsdesc) + (. - 2b + 1)
+
+       @ PR 18481
+       .text
+foo:
+       .word tbase(tpoff)-12
+       .word tbase(tpoff)-8
+       .word tbase(tpoff)-4
+       .word tbase(tpoff)+0
+       .word tbase(tpoff)+4
+       .word tbase(tpoff)+8
+       .word tbase(tpoff)+12
+       .word tbase(tpoff)
+
+       .section        .tdata,"awT",%progbits
+tbase = . + 12
+       .word -12
+       .word -8
+       .word -4
+       .word 0
+       .word 4
+       .word 8
+       .word 12
+       .word 0