[PATCH] ldso - removing unused warning and warning
m m
olsajiri at gmail.com
Tue Jan 27 10:54:05 UTC 2009
On Tue, Jan 27, 2009 at 8:46 AM, Joakim Tjernlund
<Joakim.Tjernlund at transmode.se> wrote:
>> olsajiri at gmail.com wrote:
>> > 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 <olsajiri at gmail.com>
>> >
>> > 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
>> > uClibc at uclibc.org
>> > http://lists.busybox.net/mailman/listinfo/uclibc
>> >
>>
>> Hi,
>> this check was explicitely removed by Jock in rev 12122 in 2005 (4 years
>> ago)
>> http://sources.busybox.net/index.py?view=rev&revision=12122
>>
>> If this extra check if definitely pointless, I'd prefer to remove this
>> from all other archs, instead of re-adding againg to i386.
>> Is there someone else that think we should keep the check ?
>
> I think this check has played its role, it was good to
> have in the early days but now it is just bloat. It has
> never triggered for me so I am fine with removing it on all archs.
>
> Jocke
>
ok, I'll prepare diff and resend
jirka
More information about the uClibc
mailing list