summaryrefslogtreecommitdiff
path: root/ldso/ldso/sh
diff options
context:
space:
mode:
authorFilippo Arcidiacono <filippo.arcidiacono@st.com>2010-07-30 09:17:58 +0200
committerCarmelo Amoroso <carmelo.amoroso@st.com>2010-09-17 16:11:27 +0200
commit4136ca46e391faf1a6ce58b9a1a709b248213fb4 (patch)
tree2c36d609ff2110027d637f68db8c4af47bd38333 /ldso/ldso/sh
parent94cc6edb78a12655c0602a246fa1cbdc8c6d0ad9 (diff)
ldso: Add support for LD_WARN and LD_TRACE_PRELINKING
Added support for the following tracing capabilities: - LD_WARN to warn about undefined symbols during the lookup stage. - LD_TRACE_PRELINKING to trace the needed libraries of the object that we are prelinking. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'ldso/ldso/sh')
-rw-r--r--ldso/ldso/sh/elfinterp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ldso/ldso/sh/elfinterp.c b/ldso/ldso/sh/elfinterp.c
index d3465bcd5..e94c44dad 100644
--- a/ldso/ldso/sh/elfinterp.c
+++ b/ldso/ldso/sh/elfinterp.c
@@ -69,7 +69,7 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
got_addr = (char **) instr_addr;
/* Get the address of the GOT entry */
- new_addr = _dl_find_hash(symname, &_dl_loaded_modules->symbol_scope, tpnt, ELF_RTYPE_CLASS_PLT, NULL);
+ new_addr = _dl_find_hash(symname, &_dl_loaded_modules->symbol_scope, tpnt, NULL, ELF_RTYPE_CLASS_PLT, NULL);
if (unlikely(!new_addr)) {
_dl_dprintf(2, "%s: can't resolve symbol '%s'\n", _dl_progname, symname);
@@ -161,6 +161,7 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
#endif
struct elf_resolve *tls_tpnt = NULL;
+ struct sym_val current_value = { NULL, NULL };
reloc_addr = (unsigned long *)(intptr_t) (tpnt->loadaddr + (unsigned long) rpnt->r_offset);
reloc_type = ELF32_R_TYPE(rpnt->r_info);
@@ -169,7 +170,7 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
symname = strtab + symtab[symtab_index].st_name;
if (symtab_index) {
- symbol_addr = (unsigned long) _dl_find_hash(symname, scope, tpnt,
+ symbol_addr = (unsigned long) _dl_find_hash(symname, scope, tpnt, &current_value,
elf_machine_type_class(reloc_type), &tls_tpnt);
/*
* We want to allow undefined references to weak symbols - this might
@@ -186,6 +187,9 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
/* Let the caller to handle the error: it may be non fatal if called from dlopen */
return 1;
}
+ if (_dl_trace_prelink)
+ _dl_debug_lookup (symname, tpnt, &symtab[symtab_index],
+ &current_value, elf_machine_type_class(reloc_type));
}
#if defined (__SUPPORT_LD_DEBUG__)