fix microblaze asm relocations for shared libc
authorRich Felker <dalias@aerifal.cx>
Thu, 18 Oct 2012 03:45:21 +0000 (23:45 -0400)
committerRich Felker <dalias@aerifal.cx>
Thu, 18 Oct 2012 03:45:21 +0000 (23:45 -0400)
only @PLT relocations are considered functions for purposes of
-Bsymbolic-functions, so always use @PLT. it should not hurt in the
static-linked case.

src/ldso/microblaze/dlsym.s
src/ldso/microblaze/start.s
src/signal/microblaze/sigsetjmp.s
src/thread/microblaze/syscall_cp.s

index 2044e2dfc9bcd721cfc669245b7ec9589c8c9bd5..63cd638baf76ab0c203c864176bdbda5f9432f81 100644 (file)
@@ -1,5 +1,5 @@
 .global dlsym
 .type   dlsym,@function
 dlsym:
-       brid    __dlsym
+       brid    __dlsym@PLT
        add     r7, r15, r0
index 4afd59f0cfe197a8f3a118a3d0534db66d605e92..5ffbcbaec5e0dba0feb8361fc3fd494deed3ea61 100644 (file)
@@ -8,11 +8,11 @@ _start:
        mfs     r7, rpc
        addi    r7, r7, _GLOBAL_OFFSET_TABLE_+8
        addi    r7, r7, _DYNAMIC@GOTOFF
-       brlid   r15, __reloc_self
+       brlid   r15, __reloc_self@PLT
        nop
 
        lwi     r5, r1, 0
-       brlid   r15, __dynlink
+       brlid   r15, __dynlink@PLT
        addi    r6, r1, 4
 
        lwi     r4, r1, 0
index 3aca90dc9b1d9bf1c9e2ff9eecd1aaa766bcaaab..47cf8d9e61b46ab9256ba51dcb1315b721e6ac70 100644 (file)
@@ -2,8 +2,8 @@
 .type sigsetjmp,@function
 sigsetjmp:
        lwi     r11, r5, 72
-       beqi    r11, setjmp
+       beqi    r11, setjmp@PLT
        addi    r7, r5, 76
        add     r6, r0, r0
-       brid    sigprocmask
+       brid    sigprocmask@PLT
        ori     r5, r0, 2
index c470521c72c1699d9df32bd531779be287a87b51..ce38b56cefcce56aa5147e211e926133a2d31d5f 100644 (file)
@@ -4,7 +4,7 @@ __syscall_cp_asm:
 .global __cp_begin
 __cp_begin:
        lwi     r5, r5, 0
-       bnei    r5, __cancel
+       bnei    r5, __cancel@PLT
        addi    r12, r6, 0
        add     r5, r7, r0
        add     r6, r8, r0