Lose _r2off in powerpc64 stub names
authorAlan Modra <amodra@gmail.com>
Fri, 3 Aug 2018 07:15:25 +0000 (16:45 +0930)
committerAlan Modra <amodra@gmail.com>
Sun, 5 Aug 2018 01:03:07 +0000 (10:33 +0930)
Not a lot is conveyed by putting _r2off in a stub symbol that can't be
seen by inspecting the stub code or the toc restoring instruction
immediately after a call via such a stub.  Also, we don't distinguish
plt_call stub symbols from plt_call_r2save stub symbols, so this patch
makes long branch and plt branch stub symbols consistent with that
decision.

bfd/
* elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
ld/
* testsuite/ld-powerpc/elfv2exe.d: Adjust for stub symbol change.
* testsuite/ld-powerpc/tocopt6.d: Likewise.

bfd/ChangeLog
bfd/elf64-ppc.c
ld/ChangeLog
ld/testsuite/ld-powerpc/elfv2exe.d
ld/testsuite/ld-powerpc/tocopt6.d

index ec4077fb41efe4c896f9d52bb74b9b76d7ba074e..e23f7470e0aa21f83181bbfe34d22beaa3131ad4 100644 (file)
@@ -1,3 +1,7 @@
+2018-08-05  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
+
 2018-08-02  Jim Wilson  <jimw@sifive.com>
 
        * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
index b59a5058510d324096d4940651919cf005b6b5d9..634e537e47ec29c98d3ac41da2169e2501827596 100644 (file)
@@ -11513,9 +11513,9 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
       size_t len1, len2;
       char *name;
       const char *const stub_str[] = { "long_branch",
-                                      "long_branch_r2off",
+                                      "long_branch",
+                                      "plt_branch",
                                       "plt_branch",
-                                      "plt_branch_r2off",
                                       "plt_call",
                                       "plt_call" };
 
index d1a15df224908b8f665a4459f9e9572d76147f45..b32879df0a385c8bc1104aabf31415b0f82f7723 100644 (file)
@@ -1,3 +1,8 @@
+2018-08-05  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/ld-powerpc/elfv2exe.d: Adjust for stub symbol change.
+       * testsuite/ld-powerpc/tocopt6.d: Likewise.
+
 2018-08-03  H.J. Lu  <hongjiu.lu@intel.com>
 
        * testsuite/ld-x86-64/property-x86-3.s: Use ".p2align 2" to
index d08e600aa4480bbddb63732d0a08259fb232a5aa..a02a3ff24ab3d2655f80d054fe576d11494a033a 100644 (file)
@@ -19,7 +19,7 @@ Disassembly of section \.text:
 .*:    (7d 89 03 a6|a6 03 89 7d)       mtctr   r12
 .*:    (4e 80 04 20|20 04 80 4e)       bctr
 
-0+100000e0 <.*\.long_branch_r2off\.f5>:
+0+100000e0 <.*\.long_branch\.f5>:
 .*:    (f8 41 00 18|18 00 41 f8)       std     r2,24\(r1\)
 .*:    (48 00 00 6c|6c 00 00 48)       b       .* <f5>
        \.\.\.
@@ -39,7 +39,7 @@ Disassembly of section \.text:
 .*:    (60 00 00 00|00 00 00 60)       nop
 .*:    (4b .. .. ..|.. .. .. 4b)       bl      .*\.plt_branch\.f4>
 .*:    (60 00 00 00|00 00 00 60)       nop
-.*:    (4b .. .. ..|.. .. .. 4b)       bl      .*\.long_branch_r2off\.f5>
+.*:    (4b .. .. ..|.. .. .. 4b)       bl      .*\.long_branch\.f5>
 .*:    (e8 41 00 18|18 00 41 e8)       ld      r2,24\(r1\)
 .*:    (e8 01 00 30|30 00 01 e8)       ld      r0,48\(r1\)
 .*:    (38 21 00 20|20 00 21 38)       addi    r1,r1,32
index a34fec17b2c8dc518bb94949c9d2d86399546d65..27ca0d074d2989c6b319201654b29356711f9e71 100644 (file)
@@ -1,12 +1,12 @@
 #...
-.*     bl .*<.*long_branch_r2off\.f1>
+.*     bl .*<.*long_branch\.f1>
 .*     ld *r2,40\(r1\)
-.*     bl .*<.*long_branch_r2off\.f2>
+.*     bl .*<.*long_branch\.f2>
 .*     ld *r2,40\(r1\)
 .*     bl .*<\.f3>
 .*     nop
-.*     bl .*<.*long_branch_r2off\.g2>
+.*     bl .*<.*long_branch\.g2>
 .*     ld *r2,40\(r1\)
-.*     bl .*<.*long_branch_r2off\.in23>
+.*     bl .*<.*long_branch\.in23>
 .*     ld *r2,40\(r1\)
 #pass
This page took 0.038033 seconds and 4 git commands to generate.