diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-11-05 18:21:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-11-05 18:21:12 +0000 |
commit | 449caad5c792628b138bb84f4092de071af652e5 (patch) | |
tree | 36da8874c87bd5c1bc5fc6da22033a2ab747df6d /ldso/ldso/sh/elfinterp.c | |
parent | d9caf7de9815201ee6ddeeb21f57780fc75c0065 (diff) |
Massive scrubbing of the shared lib loader error handling.
Move all configuration options into the new config system.
-Erik
Diffstat (limited to 'ldso/ldso/sh/elfinterp.c')
-rw-r--r-- | ldso/ldso/sh/elfinterp.c | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/ldso/ldso/sh/elfinterp.c b/ldso/ldso/sh/elfinterp.c index 734655075..e094cc79b 100644 --- a/ldso/ldso/sh/elfinterp.c +++ b/ldso/ldso/sh/elfinterp.c @@ -28,7 +28,7 @@ * SUCH DAMAGE. */ -#if defined (SUPPORT_LD_DEBUG) || defined (LD_DEBUG_SYMBOLS) +#if defined (__SUPPORT_LD_DEBUG__) static const char *_dl_reltypes_tab[] = { [0] "R_SH_NONE", "R_SH_DIR32", "R_SH_REL32", "R_SH_DIR8WPN", @@ -152,22 +152,19 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry) _dl_exit(1); } -#if defined (SUPPORT_LD_DEBUG) || defined (LD_NEVER_FIXUP_SYMBOLS) +#if defined (__SUPPORT_LD_DEBUG__) if ((unsigned long) got_addr < 0x20000000) { -#ifndef SUPPORT_LD_DEBUG - if (_dl_debug_bindings) - { - _dl_dprintf(_dl_debug_file, "\nresolve function: %s", - strtab + symtab[symtab_index].st_name); - if(_dl_debug_detail) _dl_dprintf(_dl_debug_file, "\tpatch %x ==> %x @ %x", *got_addr, new_addr, got_addr); - } -#endif -#ifndef LD_NEVER_FIXUP_SYMBOLS - *got_addr = new_addr; -#endif - } else { - *got_addr = new_addr; + if (_dl_debug_bindings) + { + _dl_dprintf(_dl_debug_file, "\nresolve function: %s", + strtab + symtab[symtab_index].st_name); + if(_dl_debug_detail) _dl_dprintf(_dl_debug_file, + "\tpatch %x ==> %x @ %x", *got_addr, new_addr, got_addr); + } + } + if (!_dl_debug_nofixups) { + *got_addr = new_addr; } #else *got_addr = new_addr; @@ -210,7 +207,7 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope, _dl_symbol(strtab + symtab[symtab_index].st_name)) continue; -#if defined (SUPPORT_LD_DEBUG) +#if defined (__SUPPORT_LD_DEBUG__) debug_sym(symtab,strtab,symtab_index); debug_reloc(symtab,strtab,rpnt); #endif @@ -227,7 +224,7 @@ _dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope, if (res <0) { int reloc_type = ELF32_R_TYPE(rpnt->r_info); -#if defined (SUPPORT_LD_DEBUG) +#if defined (__SUPPORT_LD_DEBUG__) _dl_dprintf(2, "can't handle reloc type %s\n ", _dl_reltypes(reloc_type)); #else _dl_dprintf(2, "can't handle reloc type %x\n", reloc_type); @@ -277,7 +274,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope, } -#if defined (SUPPORT_LD_DEBUG) +#if defined (__SUPPORT_LD_DEBUG__) { unsigned long old_val = *reloc_addr; #endif @@ -302,7 +299,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope, default: return -1; /*call _dl_exit(1) */ } -#if defined (SUPPORT_LD_DEBUG) +#if defined (__SUPPORT_LD_DEBUG__) if(_dl_debug_reloc && _dl_debug_detail) _dl_dprintf(_dl_debug_file, "\tpatch: %x ==> %x @ %x", old_val, *reloc_addr, reloc_addr); } @@ -326,7 +323,7 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt, struct dyn_elf *scope, reloc_addr = (unsigned long *)(intptr_t) (tpnt->loadaddr + (unsigned long) rpnt->r_offset); reloc_type = ELF32_R_TYPE(rpnt->r_info); -#if defined (SUPPORT_LD_DEBUG) +#if defined (__SUPPORT_LD_DEBUG__) { unsigned long old_val = *reloc_addr; #endif @@ -339,7 +336,7 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt, struct dyn_elf *scope, default: return -1; /*call _dl_exit(1) */ } -#if defined (SUPPORT_LD_DEBUG) +#if defined (__SUPPORT_LD_DEBUG__) if(_dl_debug_reloc && _dl_debug_detail) _dl_dprintf(_dl_debug_file, "\tpatch: %x ==> %x @ %x", old_val, *reloc_addr, reloc_addr); } @@ -382,7 +379,7 @@ _dl_do_copy (struct elf_resolve *tpnt, struct dyn_elf *scope, if (!symbol_addr) goof++; } if (!goof) { -#if defined (SUPPORT_LD_DEBUG) +#if defined (__SUPPORT_LD_DEBUG__) if(_dl_debug_move) _dl_dprintf(_dl_debug_file,"\n%s move %x bytes from %x to %x", strtab + symtab[symtab_index].st_name, |