diff options
author | Roland McGrath <roland@gnu.org> | 1996-07-10 14:42:15 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-07-10 14:42:15 +0000 |
commit | 63d9ce12c1eeb439139059b341aa20e98f23f975 (patch) | |
tree | 5f45251d04330f1872b68a3decec0ac2e15e3004 | |
parent | 07a4742f9ec2b0587c0d488bb65da2a6faa50fed (diff) | |
download | glibc-63d9ce12c1eeb439139059b341aa20e98f23f975.tar glibc-63d9ce12c1eeb439139059b341aa20e98f23f975.tar.gz glibc-63d9ce12c1eeb439139059b341aa20e98f23f975.tar.bz2 glibc-63d9ce12c1eeb439139059b341aa20e98f23f975.zip |
Mon Jul 8 21:18:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>cvs/libc-960711
* sysdeps/m68k/dl-machine.h (RESOLVE): New macro, defined
differently based on [RTLD_BOOTSTRAP].
(elf_machine_rela): Use it instead of the fn ptr arg directly.
-rw-r--r-- | sysdeps/m68k/dl-machine.h | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 0f64d686ed..a11ff237ad 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -81,38 +81,38 @@ elf_machine_rela (struct link_map *map, Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset); Elf32_Addr loadbase; +#ifdef RTLD_BOOTSTRAP +#define RESOLVE(noplt) map->l_addr +#else +#define RESOLVE(noplt) (*resolve) (&sym, (Elf32_Addr) reloc_addr, noplt) +#endif + switch (ELF32_R_TYPE (reloc->r_info)) { case R_68K_COPY: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size); break; case R_68K_GLOB_DAT: - loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) : - /* RESOLVE is null during bootstrap relocation. */ - map->l_addr); + loadbase = RESOLVE (0); *reloc_addr = sym ? (loadbase + sym->st_value) : 0; break; case R_68K_JMP_SLOT: - loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 1) : - /* RESOLVE is null during bootstrap relocation. */ - map->l_addr); + loadbase = RESOLVE (1); *reloc_addr = sym ? (loadbase + sym->st_value) : 0; break; case R_68K_8: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; case R_68K_16: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; case R_68K_32: - loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) : - /* RESOLVE is null during bootstrap relocation. */ - map->l_addr); + loadbase = RESOLVE (0); *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend); break; @@ -120,19 +120,19 @@ elf_machine_rela (struct link_map *map, *reloc_addr = map->l_addr + reloc->r_addend; break; case R_68K_PC8: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); break; case R_68K_PC16: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); break; case R_68K_PC32: - loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + loadbase = RESOLVE (0); *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0) + reloc->r_addend - (Elf32_Addr) reloc_addr); @@ -143,6 +143,8 @@ elf_machine_rela (struct link_map *map, assert (! "unexpected dynamic reloc type"); break; } + +#undef RESOLVE } static inline void |