bfd/
authorAlan Modra <amodra@gmail.com>
Thu, 31 Jan 2013 06:28:48 +0000 (06:28 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 31 Jan 2013 06:28:48 +0000 (06:28 +0000)
* elf64-ppc.c (ppc_stub_name): Trim off trailing "+0".
ld/testsuite/
* ld-powerpc/tlsexe.d: Update for changed stub names.
* ld-powerpc/tlsexe.r: Likewise.
* ld-powerpc/tlsexetoc.d: Likewise.
* ld-powerpc/tlsexetoc.r: Likewise.
* ld-powerpc/tlsso.d: Likewise.
* ld-powerpc/tlsso.r: Likewise.
* ld-powerpc/tlstocso.d: Likewise.
* ld-powerpc/tlstocso.r: Likewise.

bfd/ChangeLog
bfd/elf64-ppc.c
ld/testsuite/ChangeLog
ld/testsuite/ld-powerpc/tlsexe.d
ld/testsuite/ld-powerpc/tlsexe.r
ld/testsuite/ld-powerpc/tlsexetoc.d
ld/testsuite/ld-powerpc/tlsexetoc.r
ld/testsuite/ld-powerpc/tlsso.d
ld/testsuite/ld-powerpc/tlsso.r
ld/testsuite/ld-powerpc/tlstocso.d
ld/testsuite/ld-powerpc/tlstocso.r

index 8011d9ac4ca605570598b83ae6dffac90417b0d7..9598b6a50c458ebb53ada40c711b31e760d3008e 100644 (file)
@@ -1,3 +1,7 @@
+2013-01-31  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc_stub_name): Trim off trailing "+0".
+
 2013-01-31  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
index eca7bb3a68e6dd868d9efde9ed1fbc5a13e217df..6ac3bc6f2f815ccd1d5cdb64e383ebbaf7daf8eb 100644 (file)
@@ -4074,7 +4074,7 @@ ppc_stub_name (const asection *input_section,
               const Elf_Internal_Rela *rel)
 {
   char *stub_name;
-  bfd_size_type len;
+  ssize_t len;
 
   /* rel->r_addend is actually 64 bit, but who uses more than +/- 2^31
      offsets from a sym as a branch target?  In fact, we could
@@ -4088,10 +4088,10 @@ ppc_stub_name (const asection *input_section,
       if (stub_name == NULL)
        return stub_name;
 
-      sprintf (stub_name, "%08x.%s+%x",
-              input_section->id & 0xffffffff,
-              h->elf.root.root.string,
-              (int) rel->r_addend & 0xffffffff);
+      len = sprintf (stub_name, "%08x.%s+%x",
+                    input_section->id & 0xffffffff,
+                    h->elf.root.root.string,
+                    (int) rel->r_addend & 0xffffffff);
     }
   else
     {
@@ -4100,13 +4100,13 @@ ppc_stub_name (const asection *input_section,
       if (stub_name == NULL)
        return stub_name;
 
-      sprintf (stub_name, "%08x.%x:%x+%x",
-              input_section->id & 0xffffffff,
-              sym_sec->id & 0xffffffff,
-              (int) ELF64_R_SYM (rel->r_info) & 0xffffffff,
-              (int) rel->r_addend & 0xffffffff);
+      len = sprintf (stub_name, "%08x.%x:%x+%x",
+                    input_section->id & 0xffffffff,
+                    sym_sec->id & 0xffffffff,
+                    (int) ELF64_R_SYM (rel->r_info) & 0xffffffff,
+                    (int) rel->r_addend & 0xffffffff);
     }
-  if (stub_name[len - 2] == '+' && stub_name[len - 1] == '0')
+  if (len > 2 && stub_name[len - 2] == '+' && stub_name[len - 1] == '0')
     stub_name[len - 2] = 0;
   return stub_name;
 }
index 7c0eed0f64718ee6e98dde6e76f93939b64e12e6..522f4decbc75ec707232c1f53c300f66981b2688 100644 (file)
@@ -1,3 +1,14 @@
+2013-01-31  Alan Modra  <amodra@gmail.com>
+
+       * ld-powerpc/tlsexe.d: Update for changed stub names.
+       * ld-powerpc/tlsexe.r: Likewise.
+       * ld-powerpc/tlsexetoc.d: Likewise.
+       * ld-powerpc/tlsexetoc.r: Likewise.
+       * ld-powerpc/tlsso.d: Likewise.
+       * ld-powerpc/tlsso.r: Likewise.
+       * ld-powerpc/tlstocso.d: Likewise.
+       * ld-powerpc/tlstocso.r: Likewise.
+
 2013-01-31  Hans-Peter Nilsson  <hp@axis.com>
 
        * ld-cris/libdso-13.d: Adjust for --enable-new-dtags now
index 01796df72436bb9af0cfba043dc05d0194e346eb..8390551464732b5a0e0cdd64ccf458118a7f7666 100644 (file)
@@ -8,7 +8,7 @@
 
 Disassembly of section \.text:
 
-.* <00000010\.plt_call\.__tls_get_addr(|_opt)\+0>:
+.* <00000010\.plt_call\.__tls_get_addr(|_opt)>:
 .*     (e9 63 00 00|00 00 63 e9)       ld      r11,0\(r3\)
 .*     (e9 83 00 08|08 00 83 e9)       ld      r12,8\(r3\)
 .*     (7c 60 1b 78|78 1b 60 7c)       mr      r0,r3
index b0783f16c1f337023b569a106416c2be02441b09..8d6ff301dfad4cb300a66c399d759703482726bd 100644 (file)
@@ -96,8 +96,8 @@ Symbol table '\.symtab' contains [0-9]+ entries:
 .* TLS +LOCAL +DEFAULT +8 le5
 .* (FUNC|NOTYPE) +LOCAL +DEFAULT +UND \.__tls_get_addr(|_opt)
 .* FILE +LOCAL +DEFAULT +ABS .*
+.* NOTYPE +LOCAL +DEFAULT +7 00000010\.plt_call\.__tls_get_addr(|_opt)
 .* OBJECT +LOCAL +DEFAULT +10 _DYNAMIC
-.* NOTYPE +LOCAL +DEFAULT +7 00000010\.plt_call\.__tls_get_addr(|_opt)\+0
 .* NOTYPE +LOCAL +DEFAULT +7 __glink_PLTresolve
 .* GLOBAL +DEFAULT +UND gd
 .* GLOBAL +DEFAULT +9 le0
index 48bde59dda4af514348d393d4380df0125f2997a..fc209922f98cd17011c56cb452a8f089979f7a78 100644 (file)
@@ -8,7 +8,7 @@
 
 Disassembly of section \.text:
 
-.* <00000010\.plt_call\.__tls_get_addr(|_opt)\+0>:
+.* <00000010\.plt_call\.__tls_get_addr(|_opt)>:
 .*     (e9 63 00 00|00 00 63 e9)       ld      r11,0\(r3\)
 .*     (e9 83 00 08|08 00 83 e9)       ld      r12,8\(r3\)
 .*     (7c 60 1b 78|78 1b 60 7c)       mr      r0,r3
index d404752052b42c53912b36700a4a9ba9fb3c2d70..71d6c9e85acda4c82bf7075c3427bd96591efdf5 100644 (file)
@@ -96,8 +96,8 @@ Symbol table '\.symtab' contains [0-9]+ entries:
 .* NOTYPE +LOCAL +DEFAULT +11 \.Lie0
 .* (FUNC|NOTYPE) +LOCAL +DEFAULT +UND \.__tls_get_addr(|_opt)
 .* FILE +LOCAL +DEFAULT +ABS .*
+.* NOTYPE +LOCAL +DEFAULT +7 00000010\.plt_call\.__tls_get_addr(|_opt)
 .* OBJECT +LOCAL +DEFAULT +10 _DYNAMIC
-.* NOTYPE +LOCAL +DEFAULT +7 00000010\.plt_call\.__tls_get_addr(|_opt)\+0
 .* NOTYPE +LOCAL +DEFAULT +7 __glink_PLTresolve
 .* TLS +GLOBAL +DEFAULT +UND gd
 .* TLS +GLOBAL +DEFAULT +9 le0
index e0bc9a083f89d2ee871e1a91f6567ad5c5cab82b..00b00a03ded3f4f34a87053ab069191c4b3f9dc2 100644 (file)
@@ -8,7 +8,7 @@
 
 Disassembly of section \.text:
 
-.* <00000010\.plt_call\.__tls_get_addr(|_opt)\+0>:
+.* <00000010\.plt_call\.__tls_get_addr(|_opt)>:
 .*     (f8 41 00 28|28 00 41 f8)       std     r2,40\(r1\)
 .*     (e9 62 80 78|78 80 62 e9)       ld      r11,-32648\(r2\)
 .*     (7d 69 03 a6|a6 03 69 7d)       mtctr   r11
index 2475fb47f92a3646a89078d05457962e03322959..fab50e022596bc6418afa2a39ff03d33af502d28 100644 (file)
@@ -111,7 +111,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
 .* NOTYPE +LOCAL +DEFAULT +UND \.__tls_get_addr
 .* FILE +LOCAL +DEFAULT +ABS .*
 .* OBJECT +LOCAL +DEFAULT +9 _DYNAMIC
-.* NOTYPE +LOCAL +DEFAULT +6 00000010\.plt_call\.__tls_get_addr\+0
+.* NOTYPE +LOCAL +DEFAULT +6 00000010\.plt_call\.__tls_get_addr
 .* NOTYPE +LOCAL +DEFAULT +6 __glink_PLTresolve
 .* TLS +GLOBAL +DEFAULT +UND gd
 .* TLS +GLOBAL +DEFAULT +8 le0
index c91c30b9f8c5ae3b1053cb84f47a5b98e7bca46d..a0cd08f6192feb781fcfc4d75ff2f0027e3a6e72 100644 (file)
@@ -8,7 +8,7 @@
 
 Disassembly of section \.text:
 
-.* <00000010\.plt_call\.__tls_get_addr(|_opt)\+0>:
+.* <00000010\.plt_call\.__tls_get_addr(|_opt)>:
 .*     (f8 41 00 28|28 00 41 f8)       std     r2,40\(r1\)
 .*     (e9 62 80 70|70 80 62 e9)       ld      r11,-32656\(r2\)
 .*     (7d 69 03 a6|a6 03 69 7d)       mtctr   r11
index a0bc863e8d5c512c324b9f1e0ee1ce51f4551285..1ec8b6301ee35c464c02a38cfaa4388981e6998c 100644 (file)
@@ -107,7 +107,7 @@ Symbol table '\.symtab' contains [0-9]+ entries:
 .* NOTYPE +LOCAL +DEFAULT +UND \.__tls_get_addr
 .* FILE +LOCAL +DEFAULT +ABS .*
 .* OBJECT +LOCAL +DEFAULT +9 _DYNAMIC
-.* NOTYPE +LOCAL +DEFAULT +6 00000010\.plt_call\.__tls_get_addr\+0
+.* NOTYPE +LOCAL +DEFAULT +6 00000010\.plt_call\.__tls_get_addr
 .* NOTYPE +LOCAL +DEFAULT +6 __glink_PLTresolve
 .* TLS +GLOBAL +DEFAULT +UND gd
 .* TLS +GLOBAL +DEFAULT +8 le0
This page took 0.036663 seconds and 4 git commands to generate.