[uClibc-cvs] dl-hash.c
Erik Andersen,,,
andersen at uclibc.org
Sat Jun 19 21:38:43 UTC 2004
Update of /var/cvs/uClibc/ldso/ldso
In directory nail:/tmp/cvs-serv14362/ldso
Modified Files:
dl-hash.c
Log Message:
Joakim Tjernlund writes:
Make old weak symbol handling work, if someone wants to
enable it.
Index: dl-hash.c
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/dl-hash.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- dl-hash.c 20 Feb 2004 03:05:35 -0000 1.19
+++ dl-hash.c 19 Jun 2004 21:38:41 -0000 1.20
@@ -163,6 +163,7 @@
unsigned long elf_hash_number, hn;
struct dyn_elf *rpnt;
const ElfW(Sym) *sym;
+ char *weak_result = NULL;
elf_hash_number = _dl_elf_hash(name);
@@ -226,11 +227,9 @@
#if 0
/* Perhaps we should support old style weak symbol handling
* per what glibc does when you export LD_DYNAMIC_WEAK */
- if(_dl_symbol((char *)name)) {
- if (!weak_result)
- weak_result = (char *)tpnt->loadaddr + sym->st_value;
- break;
- }
+ if (!weak_result)
+ weak_result = (char *)tpnt->loadaddr + sym->st_value;
+ break;
#endif
case STB_GLOBAL:
return (char*)tpnt->loadaddr + sym->st_value;
@@ -240,5 +239,5 @@
}
}
}
- return NULL;
+ return weak_result;
}
More information about the uClibc-cvs
mailing list