summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldso/ldso/ldso.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 97fa924e5..1b9cd791b 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -231,12 +231,12 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
* different from what the ELF header says for ET_DYN/PIE executables.
*/
{
- unsigned int i;
- ElfW(Phdr) *ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val;
+ unsigned int idx;
+ ElfW(Phdr) *phdr = (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) {
- app_tpnt->loadaddr = (ElfW(Addr)) (auxvt[AT_PHDR].a_un.a_val - ppnt->p_vaddr);
+ for (idx = 0; idx < auxvt[AT_PHNUM].a_un.a_val; idx++, phdr++)
+ if (phdr->p_type == PT_PHDR) {
+ app_tpnt->loadaddr = (ElfW(Addr)) (auxvt[AT_PHDR].a_un.a_val - phdr->p_vaddr);
break;
}
@@ -553,15 +553,15 @@ 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) {
- ElfW(Dyn) *dpnt;
+ ElfW(Dyn) *this_dpnt;
nlist++;
- for (dpnt = (ElfW(Dyn) *) tcurr->dynamic_addr; dpnt->d_tag; dpnt++) {
- if (dpnt->d_tag == DT_NEEDED) {
+ for (this_dpnt = (ElfW(Dyn) *) tcurr->dynamic_addr; this_dpnt->d_tag; this_dpnt++) {
+ if (this_dpnt->d_tag == DT_NEEDED) {
char *name;
struct init_fini_list *tmp;
- lpntstr = (char*) (tcurr->dynamic_info[DT_STRTAB] + dpnt->d_un.d_val);
+ lpntstr = (char*) (tcurr->dynamic_info[DT_STRTAB] + this_dpnt->d_un.d_val);
name = _dl_get_last_path_component(lpntstr);
if (_dl_strcmp(name, UCLIBC_LDSO) == 0)
continue;