diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-06-30 22:32:29 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-06-30 22:32:29 +0000 |
commit | 59cc1e9342e9782cc4d999a2b0649dccdcfd2c6c (patch) | |
tree | 9605fc7e6c096d305842fbb67d709a1a19b7450b /ldso/include/dl-elf.h | |
parent | 95223e89a73482c9f4f43ca3babf9edd01f6415b (diff) |
create generic ELF_* macros to hide 32/64 bit differences
Diffstat (limited to 'ldso/include/dl-elf.h')
-rw-r--r-- | ldso/include/dl-elf.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h index 4382eee42..77dc7fb14 100644 --- a/ldso/include/dl-elf.h +++ b/ldso/include/dl-elf.h @@ -36,6 +36,26 @@ extern int _dl_fixup(struct dyn_elf *rpnt, int flag); extern void _dl_protect_relro (struct elf_resolve *l); /* + * Bitsize related settings for things ElfW() + * does not handle already + */ +#if __WORDSIZE == 64 +# define ELF_ST_BIND(val) ELF64_ST_TYPE(val) +# define ELF_ST_TYPE(val) ELF64_ST_TYPE(val) +# define ELF_R_SYM(i) ELF64_R_SYM(i) +# ifndef ELF_CLASS +# define ELF_CLASS ELFCLASS64 +# endif +#else +# define ELF_ST_BIND(val) ELF32_ST_TYPE(val) +# define ELF_ST_TYPE(val) ELF32_ST_TYPE(val) +# define ELF_R_SYM(i) ELF32_R_SYM(i) +# ifndef ELF_CLASS +# define ELF_CLASS ELFCLASS32 +# endif +#endif + +/* * Datatype of a relocation on this platform */ #ifdef ELF_USES_RELOCA |