summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-12-04 05:47:30 +0000
committerEric Andersen <andersen@codepoet.org>2002-12-04 05:47:30 +0000
commit0d854372f7d6544cc7a3977a5b6fd4a4a3cb9c67 (patch)
tree9619a6f064a490d119c7a48b77c6c3f26e477b4a /ldso
parentbddae88b6da238cff579e97ffaf5a6e2a1e5c778 (diff)
Looks like this is in fact needed to properly debug dynamically
linked stuff, so put it back but add a check for NULL
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/ldso.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index b897c7dea..ad783774d 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -209,6 +209,7 @@ LD_BOOT(unsigned long args)
Elf32_auxv_t auxvt[AT_EGID + 1];
unsigned char *malloc_buffer, *mmap_zero;
Elf32_Dyn *dpnt;
+ Elf32_Dyn *dpnt_debug = NULL;
unsigned long *hash_addr;
struct r_debug *debug_addr;
int indx;
@@ -431,6 +432,8 @@ LD_BOOT(unsigned long args)
if (dpnt->d_tag == DT_DEBUG)
#ifdef FORCE_SHAREABLE_TEXT_SEGMENTS
dpnt->d_un.d_val = (unsigned long) debug_addr;
+#else
+ dpnt_debug = dpnt;
#endif
if (dpnt->d_tag == DT_TEXTREL)
app_tpnt->dynamic_info[DT_TEXTREL] = 1;
@@ -483,6 +486,11 @@ LD_BOOT(unsigned long args)
}
}
}
+
+ /* Now we can store the debug structure address */
+ if (dpnt_debug != NULL) {
+ dpnt_debug->d_un.d_val = (unsigned long) debug_addr;
+ }
#endif