浏览代码

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.
Rich Felker 10 年之前
父节点
当前提交
64fbd15fc5
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/thread/sh/__set_thread_area.s

+ 2 - 1
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