From 9333e4142260e5451277a7b50b49b9c636a93b64 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sun, 3 Nov 2002 15:13:09 +0000 Subject: Several SH lib loader patches by Stefan Allius and "M. R. Brown" --- ldso/ldso/ldso.c | 2 ++ ldso/ldso/sh/dl-sysdep.h | 2 ++ ldso/ldso/sh/elfinterp.c | 3 +-- ldso/ldso/sh/ld_sysdep.h | 2 ++ ldso/ldso/sh/resolve.S | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index b81c84092..4c61be223 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -202,6 +202,8 @@ static inline void hexprint(unsigned long x) } #endif +LD_BOOT(unsigned long args) __attribute__ ((unused)); + LD_BOOT(unsigned long args) { unsigned int argc; diff --git a/ldso/ldso/sh/dl-sysdep.h b/ldso/ldso/sh/dl-sysdep.h index ee2832436..4e7f8b590 100644 --- a/ldso/ldso/sh/dl-sysdep.h +++ b/ldso/ldso/sh/dl-sysdep.h @@ -38,6 +38,8 @@ - (unsigned long)(REL); \ break; \ case R_SH_DIR32: \ + case R_SH_GLOB_DAT: \ + case R_SH_JMP_SLOT: \ *(REL) = (SYMBOL) + (RELP)->r_addend; \ break; \ case R_SH_RELATIVE: \ diff --git a/ldso/ldso/sh/elfinterp.c b/ldso/ldso/sh/elfinterp.c index d94389ef7..734655075 100644 --- a/ldso/ldso/sh/elfinterp.c +++ b/ldso/ldso/sh/elfinterp.c @@ -288,8 +288,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope, /* handled later on */ break; case R_SH_DIR32: - *reloc_addr = symbol_addr + rpnt->r_addend; - break; + case R_SH_GLOB_DAT: case R_SH_JMP_SLOT: *reloc_addr = symbol_addr + rpnt->r_addend; break; diff --git a/ldso/ldso/sh/ld_sysdep.h b/ldso/ldso/sh/ld_sysdep.h index ee2832436..4e7f8b590 100644 --- a/ldso/ldso/sh/ld_sysdep.h +++ b/ldso/ldso/sh/ld_sysdep.h @@ -38,6 +38,8 @@ - (unsigned long)(REL); \ break; \ case R_SH_DIR32: \ + case R_SH_GLOB_DAT: \ + case R_SH_JMP_SLOT: \ *(REL) = (SYMBOL) + (RELP)->r_addend; \ break; \ case R_SH_RELATIVE: \ diff --git a/ldso/ldso/sh/resolve.S b/ldso/ldso/sh/resolve.S index 7fef6d77f..f3eac9b32 100644 --- a/ldso/ldso/sh/resolve.S +++ b/ldso/ldso/sh/resolve.S @@ -79,6 +79,6 @@ _dl_linux_resolve: .balign 4 3: - .long _dl_linux_resolver - .jmp_loc + .long _dl_linux_resolver@PLT-(.jmp_loc-(.)) .size _dl_linux_resolve, . - _dl_linux_resolve -- cgit v1.2.3