diff options
author | Roland McGrath <roland@gnu.org> | 1996-07-14 11:39:25 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-07-14 11:39:25 +0000 |
commit | f51d1dfd35f793488ee32c8226cb8955ed75acbe (patch) | |
tree | 0a157b3355be9569bd6217a20218e2fedd6f42d7 /elf/dynamic-link.h | |
parent | c928de790200bc7a81224377d35a91a6103387de (diff) | |
download | glibc-f51d1dfd35f793488ee32c8226cb8955ed75acbe.zip glibc-f51d1dfd35f793488ee32c8226cb8955ed75acbe.tar.gz glibc-f51d1dfd35f793488ee32c8226cb8955ed75acbe.tar.bz2 |
* elf/dl-reloc.c: Include "dynamic-link.h" at file scope.
* elf/rtld.c: Include <string.h>.
* elf/dynamic-link.h (ELF_DYNAMIC_DO_REL, ELF_DYNAMIC_DO_RELA,
ELF_DYNAMIC_RELOCATE): No longer take RESOLVE argument.
Conditionalize defns on [RESOLVE].
* elf/do-rel.h (elf_dynamic_do_rel): Likewise.
* sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
Instead use RESOLVE macro with same args.
(elf_machine_rel): Conditionalize defn on [RESOLVE].
* elf/dl-reloc.c (RESOLVE): New macro, define before including
"dynamic-link.h". It replaces `resolve' local function.
* elf/dl-runtime.c: Likewise.
* elf/rtld.c: Likewise.
Diffstat (limited to 'elf/dynamic-link.h')
-rw-r--r-- | elf/dynamic-link.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h index b69cb3f..45b6b2d 100644 --- a/elf/dynamic-link.h +++ b/elf/dynamic-link.h @@ -56,6 +56,8 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM]) info[DT_PLTREL]->d_un.d_val == DT_RELA); } +#ifdef RESOLVE + /* Get the definitions of `elf_dynamic_do_rel' and `elf_dynamic_do_rela'. These functions are almost identical, so we use cpp magic to avoid duplicating their code. It cannot be done in a more general function @@ -63,31 +65,33 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Dyn) *info[DT_NUM + DT_PROCNUM]) #if ! ELF_MACHINE_NO_REL #include "do-rel.h" -#define ELF_DYNAMIC_DO_REL(map, lazy, resolve) \ +#define ELF_DYNAMIC_DO_REL(map, lazy) \ if ((map)->l_info[DT_REL]) \ - elf_dynamic_do_rel ((map), DT_REL, DT_RELSZ, (resolve), 0); \ + elf_dynamic_do_rel ((map), DT_REL, DT_RELSZ, 0); \ if ((map)->l_info[DT_PLTREL] && \ (map)->l_info[DT_PLTREL]->d_un.d_val == DT_REL) \ - elf_dynamic_do_rel ((map), DT_JMPREL, DT_PLTRELSZ, (resolve), (lazy)); + elf_dynamic_do_rel ((map), DT_JMPREL, DT_PLTRELSZ, (lazy)); #else -#define ELF_DYNAMIC_DO_REL(map, lazy, resolve) /* Nothing to do. */ +#define ELF_DYNAMIC_DO_REL(map, lazy) /* Nothing to do. */ #endif #if ! ELF_MACHINE_NO_RELA #define DO_RELA #include "do-rel.h" -#define ELF_DYNAMIC_DO_RELA(map, lazy, resolve) \ +#define ELF_DYNAMIC_DO_RELA(map, lazy) \ if ((map)->l_info[DT_RELA]) \ - elf_dynamic_do_rela ((map), DT_RELA, DT_RELASZ, (resolve), 0); \ + elf_dynamic_do_rela ((map), DT_RELA, DT_RELASZ, 0); \ if ((map)->l_info[DT_PLTREL] && \ (map)->l_info[DT_PLTREL]->d_un.d_val == DT_RELA) \ - elf_dynamic_do_rela ((map), DT_JMPREL, DT_PLTRELSZ, (resolve), (lazy)); + elf_dynamic_do_rela ((map), DT_JMPREL, DT_PLTRELSZ, (lazy)); #else -#define ELF_DYNAMIC_DO_RELA(map, lazy, resolve) /* Nothing to do. */ +#define ELF_DYNAMIC_DO_RELA(map, lazy) /* Nothing to do. */ #endif /* This can't just be an inline function because GCC is too dumb to inline functions containing inlines themselves. */ -#define ELF_DYNAMIC_RELOCATE(map, lazy, resolve) \ - do { ELF_DYNAMIC_DO_REL ((map), (lazy), (resolve)); \ - ELF_DYNAMIC_DO_RELA ((map), (lazy), (resolve)); } while (0) +#define ELF_DYNAMIC_RELOCATE(map, lazy) \ + do { ELF_DYNAMIC_DO_REL ((map), (lazy)); \ + ELF_DYNAMIC_DO_RELA ((map), (lazy)); } while (0) + +#endif |