summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-04-17 22:14:03 -0400
committerRich Felker <dalias@aerifal.cx>2015-04-17 22:14:03 -0400
commit64fbd15fc5274d4e87d27496ddfb5d064c056585 (patch)
tree244b1b56b426ae61669b9adb7428556854eaaed0 /src
parent583e55122e767b1586286a0d9c35e2a4027998ab (diff)
downloadmusl-64fbd15fc5274d4e87d27496ddfb5d064c056585.tar.gz
musl-64fbd15fc5274d4e87d27496ddfb5d064c056585.tar.bz2
musl-64fbd15fc5274d4e87d27496ddfb5d064c056585.tar.xz
musl-64fbd15fc5274d4e87d27496ddfb5d064c056585.zip
fix sh __set_thread_area uninitialized return value
this caused the dynamic linker/startup code to abort when r0 happened to contain a negative value.
Diffstat (limited to 'src')
-rw-r--r--src/thread/sh/__set_thread_area.s3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/thread/sh/__set_thread_area.s b/src/thread/sh/__set_thread_area.s
index 53887e64..d9f11810 100644
--- a/src/thread/sh/__set_thread_area.s
+++ b/src/thread/sh/__set_thread_area.s
@@ -1,5 +1,6 @@
.global __set_thread_area
.type __set_thread_area, @function
__set_thread_area:
+ ldc r4, gbr
rts
- ldc r4, gbr
+ mov #0, r0