diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-06-30 22:03:11 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-06-30 22:03:11 +0000 |
commit | 6512a60090c0bcc35742f254b48d7443c7880e3f (patch) | |
tree | b2d48a6e0111b39abe4416cb32a810c2cb1b5117 /ldso | |
parent | 61e5097b07e3b7283c22cf6e425696cb4219940d (diff) |
change all Elf32_* usage to ElfW(*) usage since we shouldnt care about the bitsize
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/include/dl-elf.h | 4 | ||||
-rw-r--r-- | ldso/include/dl-hash.h | 2 | ||||
-rw-r--r-- | ldso/include/ldso.h | 2 | ||||
-rw-r--r-- | ldso/ldso/dl-elf.c | 8 | ||||
-rw-r--r-- | ldso/ldso/dl-hash.c | 4 | ||||
-rw-r--r-- | ldso/ldso/dl-startup.c | 20 | ||||
-rw-r--r-- | ldso/ldso/ldso.c | 10 | ||||
-rw-r--r-- | ldso/libdl/libdl.c | 8 |
8 files changed, 29 insertions, 29 deletions
diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h index 06b881f21..4382eee42 100644 --- a/ldso/include/dl-elf.h +++ b/ldso/include/dl-elf.h @@ -65,10 +65,10 @@ extern void _dl_protect_relro (struct elf_resolve *l); #define DYNAMIC_SIZE (DT_NUM+OS_NUM+ARCH_NUM) -extern void _dl_parse_dynamic_info(Elf32_Dyn *dpnt, unsigned long dynamic_info[], void *debug_addr, Elf32_Addr load_off); +extern void _dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void *debug_addr, ElfW(Addr) load_off); static inline __attribute__((always_inline)) -void __dl_parse_dynamic_info(Elf32_Dyn *dpnt, unsigned long dynamic_info[], void *debug_addr, Elf32_Addr load_off) +void __dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void *debug_addr, ElfW(Addr) load_off) { for (; dpnt->d_tag; dpnt++) { if (dpnt->d_tag < DT_NUM) { diff --git a/ldso/include/dl-hash.h b/ldso/include/dl-hash.h index dcad7bcee..27177542b 100644 --- a/ldso/include/dl-hash.h +++ b/ldso/include/dl-hash.h @@ -44,7 +44,7 @@ struct elf_resolve{ unsigned long dynamic_info[DYNAMIC_SIZE]; unsigned long n_phent; - Elf32_Phdr * ppnt; + ElfW(Phdr) * ppnt; ElfW(Addr) relro_addr; size_t relro_size; diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h index 71cdd5ca8..869bcb675 100644 --- a/ldso/include/ldso.h +++ b/ldso/include/ldso.h @@ -76,6 +76,6 @@ extern char *_dl_strdup(const char *string); extern void _dl_dprintf(int, const char *, ...); extern void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, - Elf32_auxv_t auxvt[AT_EGID + 1], char **envp, char **argv); + ElfW(auxv_t) auxvt[AT_EGID + 1], char **envp, char **argv); #endif /* _LDSO_H_ */ diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c index 3d12b6154..d15621ea3 100644 --- a/ldso/ldso/dl-elf.c +++ b/ldso/ldso/dl-elf.c @@ -400,7 +400,7 @@ struct elf_resolve *_dl_load_elf_shared_library(int secure, { ElfW(Ehdr) *epnt; unsigned long dynamic_addr = 0; - Elf32_Dyn *dpnt; + ElfW(Dyn) *dpnt; struct elf_resolve *tpnt; ElfW(Phdr) *ppnt; char *status, *header; @@ -640,7 +640,7 @@ struct elf_resolve *_dl_load_elf_shared_library(int secure, return NULL; } - dpnt = (Elf32_Dyn *) dynamic_addr; + dpnt = (ElfW(Dyn) *) dynamic_addr; _dl_memset(dynamic_info, 0, sizeof(dynamic_info)); _dl_parse_dynamic_info(dpnt, dynamic_info, NULL, libaddr); /* If the TEXTREL is set, this means that we need to make the pages @@ -716,7 +716,7 @@ int _dl_fixup(struct dyn_elf *rpnt, int now_flag) { int goof = 0; struct elf_resolve *tpnt; - Elf32_Word reloc_size, reloc_addr, relative_count; + ElfW(Word) reloc_size, reloc_addr, relative_count; if (rpnt->next) goof += _dl_fixup(rpnt->next, now_flag); @@ -867,7 +867,7 @@ char *_dl_strdup(const char *string) return retval; } -void _dl_parse_dynamic_info(Elf32_Dyn *dpnt, unsigned long dynamic_info[], void *debug_addr, Elf32_Addr load_off) +void _dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[], void *debug_addr, ElfW(Addr) load_off) { __dl_parse_dynamic_info(dpnt, dynamic_info, debug_addr, load_off); } diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c index 55026b4db..04cd3d64e 100644 --- a/ldso/ldso/dl-hash.c +++ b/ldso/ldso/dl-hash.c @@ -148,7 +148,7 @@ char *_dl_find_hash(const char *name, struct dyn_elf *rpnt, struct elf_resolve * struct elf_resolve *tpnt; int si; char *strtab; - Elf32_Sym *symtab; + ElfW(Sym) *symtab; unsigned long elf_hash_number, hn; const ElfW(Sym) *sym; char *weak_result = NULL; @@ -178,7 +178,7 @@ char *_dl_find_hash(const char *name, struct dyn_elf *rpnt, struct elf_resolve * /* Avoid calling .urem here. */ do_rem(hn, elf_hash_number, tpnt->nbucket); - symtab = (Elf32_Sym *) (intptr_t) (tpnt->dynamic_info[DT_SYMTAB]); + symtab = (ElfW(Sym) *) (intptr_t) (tpnt->dynamic_info[DT_SYMTAB]); strtab = (char *) (tpnt->dynamic_info[DT_STRTAB]); for (si = tpnt->elf_buckets[hn]; si != STN_UNDEF; si = tpnt->chains[si]) { diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c index 6ff3dac11..8b54bc9ee 100644 --- a/ldso/ldso/dl-startup.c +++ b/ldso/ldso/dl-startup.c @@ -115,13 +115,13 @@ static void * __attribute_used__ _dl_start(unsigned long args) unsigned int argc; char **argv, **envp; unsigned long load_addr; - Elf32_Addr got; + ElfW(Addr) got; unsigned long *aux_dat; ElfW(Ehdr) *header; struct elf_resolve tpnt_tmp; struct elf_resolve *tpnt = &tpnt_tmp; - Elf32_auxv_t auxvt[AT_EGID + 1]; - Elf32_Dyn *dpnt; + ElfW(auxv_t) auxvt[AT_EGID + 1]; + ElfW(Dyn) *dpnt; /* WARNING! -- we cannot make _any_ funtion calls until we have * taken care of fixing up our own relocations. Making static @@ -148,10 +148,10 @@ static void * __attribute_used__ _dl_start(unsigned long args) * the Auxiliary Vector Table. Read out the elements of the auxvt, * sort and store them in auxvt for later use. */ while (*aux_dat) { - Elf32_auxv_t *auxv_entry = (Elf32_auxv_t *) aux_dat; + ElfW(auxv_t) *auxv_entry = (ElfW(auxv_t) *) aux_dat; if (auxv_entry->a_type <= AT_EGID) { - _dl_memcpy(&(auxvt[auxv_entry->a_type]), auxv_entry, sizeof(Elf32_auxv_t)); + _dl_memcpy(&(auxvt[auxv_entry->a_type]), auxv_entry, sizeof(ElfW(auxv_t))); } aux_dat += 2; } @@ -186,7 +186,7 @@ static void * __attribute_used__ _dl_start(unsigned long args) * happen to know what that is for this architecture. If not, * we can always read stuff out of the ELF file to find it... */ got = elf_machine_dynamic(); - dpnt = (Elf32_Dyn *) (got + load_addr); + dpnt = (ElfW(Dyn) *) (got + load_addr); SEND_STDERR_DEBUG("First Dynamic section entry="); SEND_ADDRESS_STDERR_DEBUG(dpnt, 1); _dl_memset(tpnt, 0, sizeof(struct elf_resolve)); @@ -229,10 +229,10 @@ static void * __attribute_used__ _dl_start(unsigned long args) unsigned long *reloc_addr; unsigned long symbol_addr; int symtab_index; - Elf32_Sym *sym; + ElfW(Sym) *sym; ELF_RELOC *rpnt; unsigned long rel_addr, rel_size; - Elf32_Word relative_count = tpnt->dynamic_info[DT_RELCONT_IDX]; + ElfW(Word) relative_count = tpnt->dynamic_info[DT_RELCONT_IDX]; rel_addr = (indx ? tpnt->dynamic_info[DT_JMPREL] : tpnt-> dynamic_info[DT_RELOC_TABLE_ADDR]); @@ -260,9 +260,9 @@ static void * __attribute_used__ _dl_start(unsigned long args) sym = NULL; if (symtab_index) { char *strtab; - Elf32_Sym *symtab; + ElfW(Sym) *symtab; - symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB]; + symtab = (ElfW(Sym) *) tpnt->dynamic_info[DT_SYMTAB]; strtab = (char *) tpnt->dynamic_info[DT_STRTAB]; sym = &symtab[symtab_index]; symbol_addr = load_addr + sym->st_value; diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 9a5e0228e..206f80505 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -104,11 +104,11 @@ static void __attribute__ ((destructor)) __attribute_used__ _dl_fini(void) } void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, - Elf32_auxv_t auxvt[AT_EGID + 1], char **envp, + ElfW(auxv_t) auxvt[AT_EGID + 1], char **envp, char **argv) { ElfW(Phdr) *ppnt; - Elf32_Dyn *dpnt; + ElfW(Dyn) *dpnt; char *lpntstr; int i, goof = 0, unlazy = 0, trace_loaded_objects = 0; struct dyn_elf *rpnt; @@ -238,7 +238,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, relro_size = ppnt->p_memsz; } if (ppnt->p_type == PT_DYNAMIC) { - dpnt = (Elf32_Dyn *) (ppnt->p_vaddr + app_tpnt->loadaddr); + dpnt = (ElfW(Dyn) *) (ppnt->p_vaddr + app_tpnt->loadaddr); _dl_parse_dynamic_info(dpnt, app_tpnt->dynamic_info, debug_addr, app_tpnt->loadaddr); #ifndef __FORCE_SHAREABLE_TEXT_SEGMENTS__ /* Ugly, ugly. We need to call mprotect to change the @@ -551,10 +551,10 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, nlist = 0; for (tcurr = _dl_loaded_modules; tcurr; tcurr = tcurr->next) { - Elf32_Dyn *dpnt; + ElfW(Dyn) *dpnt; nlist++; - for (dpnt = (Elf32_Dyn *) tcurr->dynamic_addr; dpnt->d_tag; dpnt++) { + for (dpnt = (ElfW(Dyn) *) tcurr->dynamic_addr; dpnt->d_tag; dpnt++) { if (dpnt->d_tag == DT_NEEDED) { char *name; struct init_fini_list *tmp; diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c index 3b01d3979..4c8af8ad9 100644 --- a/ldso/libdl/libdl.c +++ b/ldso/libdl/libdl.c @@ -228,12 +228,12 @@ void *dlopen(const char *libname, int flag) dep_list = runp2 = runp; for (; runp; runp = runp->next) { - Elf32_Dyn *dpnt; + ElfW(Dyn) *dpnt; char *lpntstr; nlist++; runp->tpnt->init_fini = NULL; /* clear any previous dependcies */ - for (dpnt = (Elf32_Dyn *) runp->tpnt->dynamic_addr; dpnt->d_tag; dpnt++) { + for (dpnt = (ElfW(Dyn) *) runp->tpnt->dynamic_addr; dpnt->d_tag; dpnt++) { if (dpnt->d_tag == DT_NEEDED) { char *name; @@ -657,14 +657,14 @@ int dladdr(const void *__address, Dl_info * __info) { char *strtab; - Elf32_Sym *symtab; + ElfW(Sym) *symtab; int hn, si; int sf; int sn = 0; ElfW(Addr) sa; sa = 0; - symtab = (Elf32_Sym *) (pelf->dynamic_info[DT_SYMTAB]); + symtab = (ElfW(Sym) *) (pelf->dynamic_info[DT_SYMTAB]); strtab = (char *) (pelf->dynamic_info[DT_STRTAB]); sf = 0; |