From 22472d50fc735dad20392ce6a0ee94503eadf0b1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 4 Jul 2005 05:51:37 +0000 Subject: use the a_val member instead of a_ptr/a_fcn since newer elf defines dropped the other values --- ldso/ldso/dl-startup.c | 4 ++-- ldso/ldso/ldso.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c index f55330124..62237fe62 100644 --- a/ldso/ldso/dl-startup.c +++ b/ldso/ldso/dl-startup.c @@ -161,7 +161,7 @@ static void * __attribute_used__ _dl_start(unsigned long args) if (!auxvt[AT_BASE].a_un.a_val) auxvt[AT_BASE].a_un.a_val = elf_machine_load_address(); load_addr = auxvt[AT_BASE].a_un.a_val; - header = (ElfW(Ehdr) *) auxvt[AT_BASE].a_un.a_ptr; + header = (ElfW(Ehdr) *) auxvt[AT_BASE].a_un.a_val; /* Check the ELF header to make sure everything looks ok. */ if (!header || header->e_ident[EI_CLASS] != ELF_CLASS || @@ -300,6 +300,6 @@ static void * __attribute_used__ _dl_start(unsigned long args) /* Transfer control to the application. */ SEND_STDERR_DEBUG("transfering control to application\n"); - _dl_elf_main = (int (*)(int, char **, char **)) auxvt[AT_ENTRY].a_un.a_fcn; + _dl_elf_main = (int (*)(int, char **, char **)) auxvt[AT_ENTRY].a_un.a_val; START(); } diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 206f80505..8ef70c893 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -151,7 +151,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, _dl_progname = argv[0]; } - if (_start == (void *) auxvt[AT_ENTRY].a_un.a_fcn) { + if (_start == (void *) auxvt[AT_ENTRY].a_un.a_val) { _dl_dprintf(_dl_debug_file, "Standalone execution is not supported yet\n"); _dl_exit(1); } @@ -208,7 +208,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, */ { int i; - ElfW(Phdr) *ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_ptr; + ElfW(Phdr) *ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val; for (i = 0; i < auxvt[AT_PHNUM].a_un.a_val; i++, ppnt++) if (ppnt->p_type == PT_PHDR) { @@ -231,7 +231,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, debug_addr = _dl_malloc(sizeof(struct r_debug)); _dl_memset(debug_addr, 0, sizeof(struct r_debug)); - ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_ptr; + ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val; for (i = 0; i < auxvt[AT_PHNUM].a_un.a_val; i++, ppnt++) { if (ppnt->p_type == PT_GNU_RELRO) { relro_addr = ppnt->p_vaddr; @@ -251,7 +251,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, #endif /* Now cover the application program. */ if (app_tpnt->dynamic_info[DT_TEXTREL]) { - ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_ptr; + ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val; for (i = 0; i < auxvt[AT_PHNUM].a_un.a_val; i++, ppnt++) { if (ppnt->p_type == PT_LOAD && !(ppnt->p_flags & PF_W)) _dl_mprotect((void *) ((ppnt->p_vaddr + app_tpnt->loadaddr) & PAGE_ALIGN), @@ -271,7 +271,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, app_tpnt = _dl_add_elf_hash_table(_dl_progname, (char *)app_tpnt->loadaddr, app_tpnt->dynamic_info, ppnt->p_vaddr + app_tpnt->loadaddr, ppnt->p_filesz); _dl_loaded_modules->libtype = elf_executable; - _dl_loaded_modules->ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_ptr; + _dl_loaded_modules->ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val; _dl_loaded_modules->n_phent = auxvt[AT_PHNUM].a_un.a_val; _dl_symbol_tables = rpnt = (struct dyn_elf *) _dl_malloc(sizeof(struct dyn_elf)); _dl_memset(rpnt, 0, sizeof(struct dyn_elf)); @@ -663,7 +663,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr, * again once all libs are loaded. */ if (tpnt) { - ElfW(Ehdr) *epnt = (ElfW(Ehdr) *) auxvt[AT_BASE].a_un.a_ptr; + ElfW(Ehdr) *epnt = (ElfW(Ehdr) *) auxvt[AT_BASE].a_un.a_val; ElfW(Phdr) *myppnt = (ElfW(Phdr) *) (load_addr + epnt->e_phoff); int j; -- cgit v1.2.3