This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
avoid NULL pointer ambiguity in mn10300 sim
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: newlib at sources dot redhat dot com
- Date: 02 Jun 2004 17:43:57 -0300
- Subject: avoid NULL pointer ambiguity in mn10300 sim
- Organization: Red Hat Global Engineering Services Compiler Team
GDB gets thoroughly confused if the address of the start symbol looks
like a NULL pointer. ISO C requires no other pointer to compare equal
to the NULL pointer as well, so make sure we don't have any objects at
address zero.
Ok to install?
Index: libgloss/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* mn10300/sim.ld: Start at address 1, to avoid ambiguity with NULL
pointers.
Index: libgloss/mn10300/sim.ld
===================================================================
RCS file: /cvs/src/src/libgloss/mn10300/sim.ld,v
retrieving revision 1.1
diff -u -p -r1.1 sim.ld
--- libgloss/mn10300/sim.ld 17 Mar 2000 22:48:51 -0000 1.1
+++ libgloss/mn10300/sim.ld 2 Jun 2004 20:42:41 -0000
@@ -13,7 +13,7 @@ SECTIONS
{
/* Read-only sections, merged into text segment: */
/* Start of RAM (leaving room for Cygmon data) */
- . = 0;
+ . = 1;
.interp : { *(.interp) }
.hash : { *(.hash) }
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}