svn commit: trunk/uClibc/ldso/ldso/sh

carmelo at uclibc.org carmelo at uclibc.org
Mon Sep 29 12:09:52 UTC 2008


Author: carmelo
Date: 2008-09-29 05:09:52 -0700 (Mon, 29 Sep 2008)
New Revision: 23553

Log:
ldso: allow undefined references to weak symbols

Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>


Modified:
   trunk/uClibc/ldso/ldso/sh/elfinterp.c


Changeset:
Modified: trunk/uClibc/ldso/ldso/sh/elfinterp.c
===================================================================
--- trunk/uClibc/ldso/ldso/sh/elfinterp.c	2008-09-29 11:58:15 UTC (rev 23552)
+++ trunk/uClibc/ldso/ldso/sh/elfinterp.c	2008-09-29 12:09:52 UTC (rev 23553)
@@ -185,7 +185,9 @@
 		if (!symbol_addr && ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
 			_dl_dprintf(2, "%s: can't resolve symbol '%s'\n",
 			            _dl_progname, strtab + symtab[symtab_index].st_name);
-			_dl_exit (1);
+
+			/* Let the caller to handle the error: it may be non fatal if called from dlopen */
+			return 1;
 		}
 	}
 
@@ -219,7 +221,8 @@
 			*reloc_addr = (unsigned long) tpnt->loadaddr + rpnt->r_addend;
 			break;
 		default:
-			return -1; /*call _dl_exit(1) */
+
+			return -1;
 	}
 #if defined (__SUPPORT_LD_DEBUG__)
 	    if (_dl_debug_reloc && _dl_debug_detail)
@@ -256,7 +259,7 @@
 			*reloc_addr += (unsigned long) tpnt->loadaddr;
 			break;
 		default:
-			return -1; /*call _dl_exit(1) */
+			return -1;
 	}
 #if defined (__SUPPORT_LD_DEBUG__)
 	if (_dl_debug_reloc && _dl_debug_detail)




More information about the uClibc-cvs mailing list