From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5437 invoked by alias); 28 Feb 2004 17:53:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5430 invoked from network); 28 Feb 2004 17:53:39 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 28 Feb 2004 17:53:39 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Ax8eh-0004Gm-E5 for ; Sat, 28 Feb 2004 12:53:39 -0500 Date: Sat, 28 Feb 2004 17:53:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: [patch] Initialize padding in gdb.base/relocate.c Message-ID: <20040228175339.GA16396@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2004-02/txt/msg00837.txt.bz2 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 * 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;