瀏覽代碼

Correct _init()/_fini() for CRISv32 as suggested by Stefan de Konink.

Peter Kjellerstedt 15 年之前
父節點
當前提交
73a5d417f5
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      libc/sysdeps/linux/cris/crti.S

+ 8 - 0
libc/sysdeps/linux/cris/crti.S

@@ -10,8 +10,12 @@ _init:
 	move	$srp,$r1
 	subq	4,$sp
 	move.d	$r0,[$sp]
+#ifdef __arch_v32
+	lapc	_GLOBAL_OFFSET_TABLE_,$r0
+#else
 	move.d	$pc,$r0
 	sub.d	.:GOTOFF,$r0
+#endif
 	.align	1
 
 	.section	.fini
@@ -24,6 +28,10 @@ _fini:
 	move	$srp,$r1
 	subq	4,$sp
 	move.d	$r0,[$sp]
+#ifdef __arch_v32
+	lapc	_GLOBAL_OFFSET_TABLE_,$r0
+#else
 	move.d	$pc,$r0
 	sub.d	.:GOTOFF,$r0
+#endif
 	.align	1