summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2008-09-26 14:00:26 +0000
committerPeter Kjellerstedt <peter.kjellerstedt@axis.com>2008-09-26 14:00:26 +0000
commit73a5d417f5b0e06564d5af3b6fe4519a315a9bf3 (patch)
tree880d1ea6d31b8aea8b17ddaa6e2b680b91681883 /libc/sysdeps/linux
parentb05f58e5decce0387ea9f5cb2b8ec4f5ede3dcb2 (diff)
Correct _init()/_fini() for CRISv32 as suggested by Stefan de Konink.
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/cris/crti.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/cris/crti.S b/libc/sysdeps/linux/cris/crti.S
index 0740c765d..d9e1397da 100644
--- a/libc/sysdeps/linux/cris/crti.S
+++ b/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