Kyle McMartin
2006-Jan-08 08:30 UTC
[klibc] [PATCH] Fix DT_FINI function pass-in to _start on parisc
The PA-RISC ELF ABI puts the function pointer to be registered with atexit in %r23. Use this instead of passing in NULL. While it's unlikely to be used, doing the right thing is good. Signed-off-by: Kyle McMartin <kyle@parisc-linux.org> diff --git a/klibc/arch/parisc/crt0.S b/klibc/arch/parisc/crt0.S index 7428443..a9b6e96 100644 --- a/klibc/arch/parisc/crt0.S +++ b/klibc/arch/parisc/crt0.S @@ -25,8 +25,8 @@ _start: ldil L%$global$, %dp ldo R%$global$(%dp), %dp -/* Indicate that we don't need no stinkin' atexit callback */ - ldi 0,%r25 +/* parisc abi puts the atexit pointer in %r23, see ELF_PLAT_INIT() */ + copy %r23, %r25 /* branch to __libc_init */ bl __libc_init,%r2