Hi,

found those while browsing the code.

I'm not sure if reloc_type variable should be removed,
or similar check as in other platforms should be added.
eg for i386, smth like:

if (unlikely(reloc_type != R_386_JMP_SLOT)) {
        _dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
                        _dl_progname);
        _dl_exit(1);
}

regards,
jirka


Signed-off-by: Jiri Olsa <[email protected]>

Index: ldso/ldso/i386/elfinterp.c
===================================================================
--- ldso/ldso/i386/elfinterp.c  (revision 25005)
+++ ldso/ldso/i386/elfinterp.c  (working copy)
@@ -47,7 +47,6 @@
 unsigned long
 _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
 {
-       int reloc_type;
        ELF_RELOC *this_reloc;
        char *strtab;
        Elf32_Sym *symtab;
@@ -60,7 +59,6 @@
 
        rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
        this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
-       reloc_type = ELF32_R_TYPE(this_reloc->r_info);
        symtab_index = ELF32_R_SYM(this_reloc->r_info);
 
        symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
Index: ldso/ldso/mips/elfinterp.c
===================================================================
--- ldso/ldso/mips/elfinterp.c  (revision 25005)
+++ ldso/ldso/mips/elfinterp.c  (working copy)
@@ -87,7 +87,6 @@
 unsigned long
 __dl_runtime_pltresolve(struct elf_resolve *tpnt, int reloc_entry)
 {
-       int reloc_type;
        ELF_RELOC *this_reloc;
        char *strtab;
        Elf32_Sym *symtab;
@@ -100,7 +99,6 @@
 
        rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
        this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
-       reloc_type = ELF32_R_TYPE(this_reloc->r_info);
        symtab_index = ELF32_R_SYM(this_reloc->r_info);
 
        symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
Index: ldso/libdl/libdl.c
===================================================================
--- ldso/libdl/libdl.c  (revision 25005)
+++ ldso/libdl/libdl.c  (working copy)
@@ -83,7 +83,7 @@
 char *_dl_debug_detail    = NULL;
 char *_dl_debug_nofixups  = NULL;
 char *_dl_debug_bindings  = NULL;
-int   _dl_debug_file      = NULL;
+int   _dl_debug_file      = 0;
 #endif
 const char *_dl_progname       = "";        /* Program name */
 void *(*_dl_malloc_function)(size_t);
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to