about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-02-08 21:07:09 +0000
committerRich Felker <dalias@aerifal.cx>2016-02-08 21:07:09 +0000
commit869a9df5b5f7da57ebd86d146e25f78450678eeb (patch)
treef103aef8f361afde0378016e1b2b6f2c069edbc8 /src
parent756c8af8589265e99e454fe3adcda1d0bc5e1963 (diff)
downloadmusl-869a9df5b5f7da57ebd86d146e25f78450678eeb.tar.gz
musl-869a9df5b5f7da57ebd86d146e25f78450678eeb.tar.xz
musl-869a9df5b5f7da57ebd86d146e25f78450678eeb.zip
remove workaround for broken mips assemblers
the workaround was for a bug that botched .gpword references to local
labels, applying a nonsensical random offset of -0x4000 to them.

this reverses commit 5e396fb996a80b035d0f6ecf7fed50f68aa3ebb7 and a
removes a similar hack that was added to syscall_cp.s in the later
commit 756c8af8589265e99e454fe3adcda1d0bc5e1963. it turns out one
additional instance of the same idiom, the GETFUNCSYM macro in
arch/mips/reloc.h, was still affected by the assembler bug and does
not admit an easy workaround without making assumptions about how the
macro is used. the previous workarounds made static linking work but
left the early-stage dynamic linker broken and thus had limited
usefulness.

instead, affected users (using binutils versions older than 2.20) will
need to fix the bug on the binutils side; the trivial patch is commit
453f5985b13e35161984bf1bf657bbab11515aa4 in the binutils-gdb
repository.
Diffstat (limited to 'src')
-rw-r--r--src/thread/mips/syscall_cp.s6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/thread/mips/syscall_cp.s b/src/thread/mips/syscall_cp.s
index b01a5704..d2846264 100644
--- a/src/thread/mips/syscall_cp.s
+++ b/src/thread/mips/syscall_cp.s
@@ -9,9 +9,6 @@
 .global __cp_cancel
 .hidden __cp_cancel
 .type   __cp_cancel,@function
-.global __cp_cancel_data
-.hidden __cp_cancel_data
-.type   __cp_cancel_data,@function
 .hidden __cancel
 .global __syscall_cp_asm
 .hidden __syscall_cp_asm
@@ -46,8 +43,7 @@ __cp_cancel:
 	move    $2, $ra
 	bal     1f
 	addu    $sp, $sp, 32
-__cp_cancel_data:
-	.gpword __cp_cancel_data
+	.gpword .
 	.gpword __cancel
 1:	lw      $3, ($ra)
 	subu    $3, $ra, $3