diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-10-01 05:30:25 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-10-01 05:30:25 +0000 |
commit | b58a631942341b6ccb62ab400e862f404e22dbbf (patch) | |
tree | 0c6e622729b6c98417a15c0b7c10279c17ca0038 /ldso/ldso/sh/dl-sysdep.h | |
parent | 351c1d9029844a97d2771da883fc2b432d5e1bd4 (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-sysdep.h')
-rw-r--r-- | ldso/ldso/sh/dl-sysdep.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ldso/ldso/sh/dl-sysdep.h b/ldso/ldso/sh/dl-sysdep.h index a0ff05fdb..cf8820e4e 100644 --- a/ldso/ldso/sh/dl-sysdep.h +++ b/ldso/ldso/sh/dl-sysdep.h @@ -34,13 +34,14 @@ #define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD) \ switch(ELF32_R_TYPE((RELP)->r_info)){ \ case R_SH_REL32: \ - *(REL) += (RELP)->r_addend - (LOAD); \ + *(REL) = (SYMBOL) + (RELP)->r_addend \ + - (unsigned long)(REL); \ break; \ case R_SH_DIR32: \ - *(REL) += (SYMBOL) + (RELP)->r_addend; \ + *(REL) = (SYMBOL) + (RELP)->r_addend; \ break; \ case R_SH_RELATIVE: \ - *(REL) += (LOAD); \ + *(REL) = (LOAD) + (RELP)->r_addend; \ break; \ case R_SH_NONE: \ break; \ |