Hi,
the attached patch tries to optimize a bit the lookup process
into the dynamic linker postponing the string comparisons as late
as possible.
At the moment I have not figures/benchmarks to be shown; hope to produce
some data in the future.
Regards,
Carmelo
Do string comparisos as late as possible during symbol lookup.
Signed-off-by: Carmelo Amoroso <[EMAIL PROTECTED]>
--- uClibc-trunk/ldso/ldso/dl-hash.c 2007-09-19 11:06:45.000000000 +0200
+++ uClibc-st/ldso/ldso/dl-hash.c 2007-09-21 11:42:30.837795000 +0200
@@ -171,12 +171,12 @@ char *_dl_find_hash(const char *name, st
if (type_class & (sym->st_shndx == SHN_UNDEF))
continue;
- if (_dl_strcmp(strtab + sym->st_name, name) != 0)
- continue;
if (sym->st_value == 0)
continue;
if (ELF_ST_TYPE(sym->st_info) > STT_FUNC)
continue;
+ if (_dl_strcmp(strtab + sym->st_name, name) != 0)
+ continue;
switch (ELF_ST_BIND(sym->st_info)) {
case STB_WEAK:
_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc