summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-03-19 16:22:54 +0000
committerEric Andersen <andersen@codepoet.org>2002-03-19 16:22:54 +0000
commit4198d8264c6d571e31cd414ce27b477d41646800 (patch)
treeefc91a32b0efd88a335cfcbce6da4c49d4c7d62c
parent8d84dd3fa44ea7c6dc3da1c78aedfb291a7c4689 (diff)
Add new debug target (disabled by default) so that when debug
is on we now default to resolving symbols permanently.. -Erik
-rw-r--r--ldso/ldso/Makefile2
-rw-r--r--ldso/ldso/arm/elfinterp.c2
-rw-r--r--ldso/ldso/i386/elfinterp.c2
-rw-r--r--ldso/ldso/m68k/elfinterp.c15
-rw-r--r--ldso/ldso/sparc/elfinterp.c2
5 files changed, 14 insertions, 9 deletions
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);