From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sources.redhat.com
Subject: [patch] Initialize padding in gdb.base/relocate.c
Date: Sat, 28 Feb 2004 17:53:00 -0000 [thread overview]
Message-ID: <20040228175339.GA16396@nevyn.them.org> (raw)
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;
next reply other threads:[~2004-02-28 17:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-28 17:53 Daniel Jacobowitz [this message]
2004-02-29 2:59 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040228175339.GA16396@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox