From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12063 invoked by alias); 14 Jul 2011 06:22:45 -0000 Received: (qmail 12040 invoked by uid 22791); 14 Jul 2011 06:22:44 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_XG X-Spam-Check-By: sourceware.org Received: from mail-yi0-f41.google.com (HELO mail-yi0-f41.google.com) (209.85.218.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jul 2011 06:22:29 +0000 Received: by yia13 with SMTP id 13so3193265yia.0 for ; Wed, 13 Jul 2011 23:22:28 -0700 (PDT) Received: by 10.90.11.29 with SMTP id 29mr2061154agk.118.1310624548476; Wed, 13 Jul 2011 23:22:28 -0700 (PDT) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id e23sm9354613anp.12.2011.07.13.23.22.25 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Jul 2011 23:22:27 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id A256C170C1B3; Thu, 14 Jul 2011 15:52:20 +0930 (CST) Date: Thu, 14 Jul 2011 07:12:00 -0000 From: Alan Modra To: Joel Brobecker Cc: binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: [gdbadmin@sourceware.org: make-snapshot gdb current failed] Message-ID: <20110714062220.GV26365@bubble.grove.modra.org> Mail-Followup-To: Joel Brobecker , binutils@sourceware.org, gdb-patches@sourceware.org References: <20110714042415.GD2512@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110714042415.GD2512@adacore.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00146.txt.bz2 On Wed, Jul 13, 2011 at 09:24:15PM -0700, Joel Brobecker wrote: > linker.c: In function `_bfd_generic_section_already_linked': > linker.c:3043: warning: 'l_flags' might be used uninitialized in this function Huh, so the versions of gcc I used to compile this code don't detect this problem. gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 and xgcc (GCC) 4.7.0 20110706 (experimental). Not nice. * linker.c (_bfd_generic_section_already_linked): Set l_flags. * elf-bfd.h (struct already_linked): Forward declare. Index: bfd/linker.c =================================================================== RCS file: /cvs/src/src/bfd/linker.c,v retrieving revision 1.86 diff -u -p -r1.86 linker.c --- bfd/linker.c 9 Jul 2011 06:20:51 -0000 1.86 +++ bfd/linker.c 14 Jul 2011 06:20:16 -0000 @@ -3057,6 +3057,7 @@ _bfd_generic_section_already_linked (bfd { l_sec = l->linked.u.sec; l_owner = l_sec->owner; + l_flags = l_sec->flags; l_comdat = bfd_coff_get_comdat_section (l_sec->owner, l_sec); } Index: bfd/elf-bfd.h =================================================================== RCS file: /cvs/src/src/bfd/elf-bfd.h,v retrieving revision 1.325 diff -u -p -r1.325 elf-bfd.h --- bfd/elf-bfd.h 11 Jul 2011 15:03:04 -0000 1.325 +++ bfd/elf-bfd.h 14 Jul 2011 06:20:17 -0000 @@ -1797,6 +1797,7 @@ extern bfd_boolean _bfd_elf_match_sectio (bfd *, const asection *, bfd *, const asection *); extern bfd_boolean bfd_elf_is_group_section (bfd *, const struct bfd_section *); +struct already_linked; extern void _bfd_elf_section_already_linked (bfd *, struct already_linked *, struct bfd_link_info *); extern void bfd_elf_set_group_contents -- Alan Modra Australia Development Lab, IBM