Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so Don't process DT_DEBUG on MIPS as the dyna...



details:   https://anonhg.NetBSD.org/src/rev/f4d675e23418
branches:  trunk
changeset: 572625:f4d675e23418
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sun Jan 09 12:43:23 2005 +0000

description:
Don't process DT_DEBUG on MIPS as the dynamic section is mapped
read-only.  DT_MIPS_RLD_MAP is used instead.

Patch from Nick Hudson.

diffstat:

 libexec/ld.elf_so/headers.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 2b5282fa4c45 -r f4d675e23418 libexec/ld.elf_so/headers.c
--- a/libexec/ld.elf_so/headers.c       Sun Jan 09 12:25:25 2005 +0000
+++ b/libexec/ld.elf_so/headers.c       Sun Jan 09 12:43:23 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: headers.c,v 1.19 2004/10/22 05:39:56 skrll Exp $        */
+/*     $NetBSD: headers.c,v 1.20 2005/01/09 12:43:23 simonb Exp $       */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: headers.c,v 1.19 2004/10/22 05:39:56 skrll Exp $");
+__RCSID("$NetBSD: headers.c,v 1.20 2005/01/09 12:43:23 simonb Exp $");
 #endif /* not lint */
 
 #include <err.h>
@@ -192,11 +192,18 @@
                        fini = dynp->d_un.d_ptr;
                        break;
 
+               /*
+                * Don't process DT_DEBUG on MIPS as the dynamic section
+                * is mapped read-only. DT_MIPS_RLD_MAP is used instead.
+                * XXX: n32/n64 may use DT_DEBUG, not sure yet.
+                */
+#ifndef __mips__
                case DT_DEBUG:
 #ifdef RTLD_LOADER
                        dynp->d_un.d_ptr = (Elf_Addr)&_rtld_debug;
 #endif
                        break;
+#endif
 
 #ifdef __mips__
                case DT_MIPS_LOCAL_GOTNO:



Home | Main Index | Thread Index | Old Index