summaryrefslogtreecommitdiff
path: root/ldso/ldso/sh/dl-startup.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-01 05:30:25 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-01 05:30:25 +0000
commitb58a631942341b6ccb62ab400e862f404e22dbbf (patch)
tree0c6e622729b6c98417a15c0b7c10279c17ca0038 /ldso/ldso/sh/dl-startup.h
parent351c1d9029844a97d2771da883fc2b432d5e1bd4 (diff)
This commit contains a patch from Stefan Allius <allius@atecom.com> to change
how uClibc handles _init and _fini, allowing shared lib constructors and destructors to initialize things in the correct sequence. Stefan ported the SH architecture. I then ported x86, arm, and mips. x86 and arm are working fine, but I don't think I quite got things correct for mips.
Diffstat (limited to 'ldso/ldso/sh/dl-startup.h')
-rw-r--r--ldso/ldso/sh/dl-startup.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/ldso/ldso/sh/dl-startup.h b/ldso/ldso/sh/dl-startup.h
index 798121dc0..40d6a0dd4 100644
--- a/ldso/ldso/sh/dl-startup.h
+++ b/ldso/ldso/sh/dl-startup.h
@@ -7,15 +7,14 @@ asm("\
.globl _dl_boot
_dl_boot:
mov r15, r4
- mov.l .L_dl_boot2, r1
- mova .L_dl_boot2, r0
- add r1, r0
- jsr @r0
- add #4, r4
+ mov.l .L_dl_boot2, r0
+ bsrf r0
+ add #4, r4
+.jmp_loc:
jmp @r0
mov #0, r4 /* call _start with arg == 0 */
.L_dl_boot2:\n\
- .long _dl_boot2-.\n\
+ .long _dl_boot2-.jmp_loc\n\
.previous\n\
");