From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19451 invoked by alias); 12 Aug 2012 18:43:39 -0000 Received: (qmail 19443 invoked by uid 22791); 12 Aug 2012 18:43:39 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wg0-f43.google.com (HELO mail-wg0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Aug 2012 18:43:26 +0000 Received: by wgbdr1 with SMTP id dr1so2324096wgb.12 for ; Sun, 12 Aug 2012 11:43:25 -0700 (PDT) Received: by 10.180.104.200 with SMTP id gg8mr12200893wib.14.1344797005438; Sun, 12 Aug 2012 11:43:25 -0700 (PDT) Received: from localhost ([2.26.188.227]) by mx.google.com with ESMTPS id k20sm11982777wiv.11.2012.08.12.11.43.24 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2012 11:43:24 -0700 (PDT) From: Richard Sandiford To: "Maciej W. Rozycki" Mail-Followup-To: "Maciej W. Rozycki" ,, rdsandiford@googlemail.com Cc: Subject: Re: [PATCH 2/3] MIPS/BFD: Correct IRIX 6 DT_MIPS_OPTIONS processing References: Date: Sun, 12 Aug 2012 18:50:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Wed, 8 Aug 2012 23:49:18 +0100") Message-ID: <87mx20t0h9.fsf@talisman.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2012-08/txt/msg00208.txt.bz2 "Maciej W. Rozycki" writes: > Index: binutils-fsf-trunk-quilt/bfd/elfxx-mips.c > =================================================================== > --- binutils-fsf-trunk-quilt.orig/bfd/elfxx-mips.c 2012-07-26 03:29:00.000000000 +0100 > +++ binutils-fsf-trunk-quilt/bfd/elfxx-mips.c 2012-07-26 04:45:31.560520511 +0100 > @@ -9268,11 +9268,17 @@ _bfd_mips_elf_size_dynamic_sections (bfd > && ! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_HIPAGENO, 0)) > return FALSE; > > - if (IRIX_COMPAT (dynobj) == ict_irix6 > - && (bfd_get_section_by_name > - (dynobj, MIPS_ELF_OPTIONS_SECTION_NAME (dynobj))) > - && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_OPTIONS, 0)) > - return FALSE; > + if (IRIX_COMPAT (dynobj) == ict_irix6) > + { > + const char *const name = MIPS_ELF_OPTIONS_SECTION_NAME (dynobj); > + asection *opt_sec; > + > + opt_sec = bfd_get_section_by_name (dynobj, name); > + if (opt_sec != NULL > + && opt_sec->output_section != bfd_abs_section_ptr > + && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_OPTIONS, 0)) > + return FALSE; > + } > } Looks to me like the code was simply checking the wrong bfd. It should be checking output_bfd instead. Richard