Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Initialize padding in gdb.base/relocate.c
@ 2004-02-28 17:53 Daniel Jacobowitz
  2004-02-29  2:59 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Jacobowitz @ 2004-02-28 17:53 UTC (permalink / raw)
  To: gdb-patches

The point of the dummy array is to change the addresses of the global
variables within the data segment.  Unfortunately, it was initialized to
zeros; recent GCC versions will put zero-initialized data in .bss by
default, thus defeating the point.  So just initialize it to something else.

Will commit in a day or two.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2004-02-28  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.base/relocate.c (dummy): Initialize.

Index: gdb/testsuite/gdb.base/relocate.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/testsuite/gdb.base/relocate.c,v
retrieving revision 1.2
diff -u -p -r1.2 relocate.c
--- gdb/testsuite/gdb.base/relocate.c	24 Jul 2003 18:45:43 -0000	1.2
+++ gdb/testsuite/gdb.base/relocate.c	19 Feb 2004 20:56:43 -0000
@@ -3,7 +3,7 @@ static int static_bar = 2;
 
 /* This padding is just for the benefit of the test harness.  It
    causes the globals to have different addresses than the functions.  */
-int dummy[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+int dummy[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
 
 int global_foo = 3;
 int global_bar = 4;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-29  2:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-28 17:53 [patch] Initialize padding in gdb.base/relocate.c Daniel Jacobowitz
2004-02-29  2:59 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox