diff options
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/ldso/i386/dl-sysdep.h | 3 | ||||
-rw-r--r-- | ldso/ldso/i386/elfinterp.c | 8 | ||||
-rw-r--r-- | ldso/ldso/i386/ld_sysdep.h | 3 | ||||
-rw-r--r-- | ldso/ldso/i386/resolve.S | 7 | ||||
-rw-r--r-- | ldso/ldso/i386/sysdep.h | 3 |
5 files changed, 10 insertions, 14 deletions
diff --git a/ldso/ldso/i386/dl-sysdep.h b/ldso/ldso/i386/dl-sysdep.h index 2011049b1..64d4b7a46 100644 --- a/ldso/ldso/i386/dl-sysdep.h +++ b/ldso/ldso/i386/dl-sysdep.h @@ -75,6 +75,7 @@ /* Used for error messages */ #define ELF_TARGET "386" -extern unsigned int _dl_linux_resolver(int dummy, int i); +struct elf_resolve; +extern unsigned int _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry); #define do_rem(result, n, base) result = (n % base) diff --git a/ldso/ldso/i386/elfinterp.c b/ldso/ldso/i386/elfinterp.c index 01149c69b..359018a51 100644 --- a/ldso/ldso/i386/elfinterp.c +++ b/ldso/ldso/i386/elfinterp.c @@ -53,23 +53,17 @@ extern char *_dl_progname; extern int _dl_linux_resolve(void); -unsigned int _dl_linux_resolver(int dummy, int i) +unsigned int _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry) { - unsigned int * sp; - int reloc_entry; int reloc_type; struct elf32_rel * this_reloc; char * strtab; struct elf32_sym * symtab; struct elf32_rel * rel_addr; - struct elf_resolve * tpnt; int symtab_index; char * new_addr; char ** got_addr; unsigned int instr_addr; - sp = &i; - reloc_entry = sp[1]; - tpnt = (struct elf_resolve *) sp[0]; rel_addr = (struct elf32_rel *) (tpnt->dynamic_info[DT_JMPREL] + tpnt->loadaddr); diff --git a/ldso/ldso/i386/ld_sysdep.h b/ldso/ldso/i386/ld_sysdep.h index 2011049b1..64d4b7a46 100644 --- a/ldso/ldso/i386/ld_sysdep.h +++ b/ldso/ldso/i386/ld_sysdep.h @@ -75,6 +75,7 @@ /* Used for error messages */ #define ELF_TARGET "386" -extern unsigned int _dl_linux_resolver(int dummy, int i); +struct elf_resolve; +extern unsigned int _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry); #define do_rem(result, n, base) result = (n % base) diff --git a/ldso/ldso/i386/resolve.S b/ldso/ldso/i386/resolve.S index 8ae2efa70..4abf243f4 100644 --- a/ldso/ldso/i386/resolve.S +++ b/ldso/ldso/i386/resolve.S @@ -13,8 +13,7 @@ _dl_linux_resolve: lea 0x20(%esp),%eax /* eax = tpnt and reloc_entry params */ pushl 4(%eax) /* push copy of reloc_entry param */ pushl (%eax) /* push copy of tpnt param */ - pushl %eax /* _dl_linux_resolver expects a dummy - * param - this could be removed */ + #ifdef __PIC__ call .L24 .L24: @@ -25,9 +24,9 @@ _dl_linux_resolve: #else call _dl_linux_resolver #endif - movl %eax,0x2C(%esp) /* store func addr over original + movl %eax,0x28(%esp) /* store func addr over original * tpnt param */ - addl $0xC,%esp /* remove copy parameters */ + addl $0x8,%esp /* remove copy parameters */ popa /* restore regs */ ret $4 /* jump to func removing original * reloc_entry param from stack */ diff --git a/ldso/ldso/i386/sysdep.h b/ldso/ldso/i386/sysdep.h index 2011049b1..64d4b7a46 100644 --- a/ldso/ldso/i386/sysdep.h +++ b/ldso/ldso/i386/sysdep.h @@ -75,6 +75,7 @@ /* Used for error messages */ #define ELF_TARGET "386" -extern unsigned int _dl_linux_resolver(int dummy, int i); +struct elf_resolve; +extern unsigned int _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry); #define do_rem(result, n, base) result = (n % base) |