[uClibc] [PATCH] possible fix for weak symbols in ldso [Was: Strange dynamic symbol in PPC]

Joakim Tjernlund joakim.tjernlund at lumentis.se
Mon Feb 2 11:19:29 UTC 2004


> > 
> > Managed to cross compile the stuff uClibc/test/dlopen for PPC.
> > 
> > dltest reports "Weak values resolved incorrectly". I guess that
> > this test shows the problem described above?
> 
> Yep, that is indeed the problem.

This patch will make the dltest above pass(dltest2 also passes).
I don't know if I broke something else, but it is a start.

Possibly a modified test should be used instead, where something better
than "weak_result != 0" is used. 

Comments?

 Jocke

Index: hash.c
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/hash.c,v
retrieving revision 1.14
diff -u -r1.14 hash.c
--- hash.c	19 Aug 2003 13:11:06 -0000	1.14
+++ hash.c	2 Feb 2004 11:03:34 -0000
@@ -230,18 +230,6 @@
 			tpnt = rpnt->dyn;
 
 			/*
-			 * The idea here is that if we are using dlsym, we want to
-			 * first search the entire chain loaded from dlopen, and
-			 * return a result from that if we found anything.  If this
-			 * fails, then we continue the search into the stuff loaded
-			 * when the image was activated.  For normal lookups, we start
-			 * with rpnt == NULL, so we should never hit this.  
-			 */
-			if (tpnt->libtype == elf_executable && weak_result != 0) {
-				break;
-			}
-
-			/*
 			 * Avoid calling .urem here.
 			 */
 			do_rem(hn, elf_hash_number, tpnt->nbucket);




More information about the uClibc mailing list