diff options
| author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-09-29 12:09:52 +0000 | 
|---|---|---|
| committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-09-29 12:09:52 +0000 | 
| commit | 355a4056b1e327678dc108a783878d0289b808e9 (patch) | |
| tree | eb5b31550726711e998e8b94bd0e4d85057d95e2 | |
| parent | a7d54e2619f4c43425e5bd1b237a70fd3e5ed91b (diff) | |
ldso: allow undefined references to weak symbols
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
| -rw-r--r-- | ldso/ldso/sh/elfinterp.c | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/ldso/ldso/sh/elfinterp.c b/ldso/ldso/sh/elfinterp.c index c34acdf95..e13f50ba6 100644 --- a/ldso/ldso/sh/elfinterp.c +++ b/ldso/ldso/sh/elfinterp.c @@ -185,7 +185,9 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,  		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 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,  			*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 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt, struct dyn_elf *scope,  			*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)  | 
