From 4198d8264c6d571e31cd414ce27b477d41646800 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 19 Mar 2002 16:22:54 +0000 Subject: Add new debug target (disabled by default) so that when debug is on we now default to resolving symbols permanently.. -Erik --- ldso/ldso/Makefile | 2 ++ ldso/ldso/arm/elfinterp.c | 2 +- ldso/ldso/i386/elfinterp.c | 2 +- ldso/ldso/m68k/elfinterp.c | 15 +++++++++------ ldso/ldso/sparc/elfinterp.c | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) (limited to 'ldso') diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile index 5e9a71f63..5d2eefd24 100644 --- a/ldso/ldso/Makefile +++ b/ldso/ldso/Makefile @@ -36,6 +36,8 @@ XXFLAGS+= -DDL_TRACE # Enable this to enable debugging output from ld.so #XXFLAGS+= -DDL_DEBUG #XXFLAGS+= -DDL_DEBUG_SYMBOLS +#Enable this to never actually fixup symbols so you can watch each call... +#XXFLAGS+= -DDL_NEVER_FIXUP_SYMBOLS XXFLAGS+=-DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ diff --git a/ldso/ldso/arm/elfinterp.c b/ldso/ldso/arm/elfinterp.c index aac7ecc11..bd08944d7 100644 --- a/ldso/ldso/arm/elfinterp.c +++ b/ldso/ldso/arm/elfinterp.c @@ -95,7 +95,7 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry) _dl_progname, strtab + symtab[symtab_index].st_name); _dl_exit(1); }; -#ifdef DL_DEBUG_SYMBOLS +#ifdef DL_NEVER_FIXUP_SYMBOLS if ((unsigned long) got_addr < 0x40000000) { _dl_dprintf(2, "Calling library function: %s\n", strtab + symtab[symtab_index].st_name); diff --git a/ldso/ldso/i386/elfinterp.c b/ldso/ldso/i386/elfinterp.c index be19327a7..bf955b685 100644 --- a/ldso/ldso/i386/elfinterp.c +++ b/ldso/ldso/i386/elfinterp.c @@ -87,7 +87,7 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry) _dl_progname, strtab + symtab[symtab_index].st_name); _dl_exit(1); }; -#ifdef DL_DEBUG_SYMBOLS +#ifdef DL_NEVER_FIXUP_SYMBOLS if ((unsigned long) got_addr < 0x40000000) { _dl_dprintf(2, "Calling library function: %s\n", strtab + symtab[symtab_index].st_name); diff --git a/ldso/ldso/m68k/elfinterp.c b/ldso/ldso/m68k/elfinterp.c index 0fa8da827..e8a942836 100644 --- a/ldso/ldso/m68k/elfinterp.c +++ b/ldso/ldso/m68k/elfinterp.c @@ -97,13 +97,16 @@ unsigned int _dl_linux_resolver (int dummy1, int dummy2, _dl_progname, strtab + symtab[symtab_index].st_name); _dl_exit (1); } -#ifdef DL_DEBUG_SYMBOLS - if ((unsigned int) got_addr < 0x40000000) - _dl_dprintf (2, "Calling library function: %s\n", - strtab + symtab[symtab_index].st_name); - else +#ifdef DL_NEVER_FIXUP_SYMBOLS + if ((unsigned int) got_addr < 0x40000000) { + _dl_dprintf (2, "Calling library function: %s\n", + strtab + symtab[symtab_index].st_name); + } else { + *got_addr = new_addr; + } +#else + *got_addr = new_addr; #endif - *got_addr = new_addr; return (unsigned int) new_addr; } diff --git a/ldso/ldso/sparc/elfinterp.c b/ldso/ldso/sparc/elfinterp.c index 3ccdcb41f..f87fa58ff 100644 --- a/ldso/ldso/sparc/elfinterp.c +++ b/ldso/ldso/sparc/elfinterp.c @@ -104,7 +104,7 @@ unsigned int _dl_linux_resolver(unsigned int reloc_entry, unsigned int * plt) _dl_progname, strtab + symtab[symtab_index].st_name); _dl_exit(31); }; -#ifdef DL_DEBUG_SYMBOLS +#ifdef DL_NEVER_FIXUP_SYMBOLS if((unsigned int) got_addr < 0x40000000) { _dl_dprintf(2, "Calling library function: %s\n", strtab + symtab[symtab_index].st_name); -- cgit v1.2.3