Bug 973977 - Mark SharedStub hidden to fix ppc64 build failure. r=froydnj
authorUlrich Weigand <uweigand@de.ibm.com>
Wed, 19 Feb 2014 15:55:28 -0500
changeset 169587 10a99967ccec867a3079990e476521f56686165c
parent 169586 e05c4e27c8c560e794f4dbeb9b0234016f53aa5d
child 169588 22d21b4e861839787b5f8439d033382fee23a437
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersfroydnj
bugs973977
milestone30.0a1
Bug 973977 - Mark SharedStub hidden to fix ppc64 build failure. r=froydnj
xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
@@ -15,16 +15,21 @@
 .set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
 .set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
 .set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
 .set f30,30; .set f31,31
 
         .section ".text"
         .align 2
         .globl SharedStub
+        # Make the symbol hidden so that the branch from the stub does
+        # not go via a PLT.  This is not only better for performance,
+        # but may be necessary to avoid linker errors since there is
+        # no place to restore the TOC register in a sibling call.
+        .hidden SharedStub
         .section ".opd","aw"
         .align 3
 
 SharedStub:
         .quad   .SharedStub,.TOC.@tocbase
         .previous
         .type   SharedStub,@function