From 4136ca46e391faf1a6ce58b9a1a709b248213fb4 Mon Sep 17 00:00:00 2001 From: Filippo Arcidiacono Date: Fri, 30 Jul 2010 09:17:58 +0200 Subject: 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 Signed-off-by: Carmelo Amoroso --- ldso/ldso/dl-hash.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ldso/ldso/dl-hash.c') diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c index 2c4571f20..2e2111fa9 100644 --- a/ldso/ldso/dl-hash.c +++ b/ldso/ldso/dl-hash.c @@ -269,7 +269,7 @@ _dl_lookup_sysv_hash(struct elf_resolve *tpnt, ElfW(Sym) *symtab, unsigned long * relocations or when we call an entry in the PLT table for the first time. */ char *_dl_lookup_hash(const char *name, struct r_scope_elem *scope, struct elf_resolve *mytpnt, - int type_class, struct elf_resolve **tpntp) + struct sym_val *symbol, int type_class, struct elf_resolve **tpntp) { struct elf_resolve *tpnt = NULL; ElfW(Sym) *symtab; @@ -339,6 +339,10 @@ char *_dl_lookup_hash(const char *name, struct r_scope_elem *scope, struct elf_r } if (sym) { + if (symbol) { + symbol->s = sym; + symbol->m = tpnt; + } /* At this point we have found the requested symbol, do binding */ #if defined(USE_TLS) && USE_TLS if (ELF_ST_TYPE(sym->st_info) == STT_TLS) { -- cgit v1.2.3