From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29252 invoked by alias); 17 Jan 2013 21:33:17 -0000 Received: (qmail 29244 invoked by uid 22791); 17 Jan 2013 21:33:17 -0000 X-SWARE-Spam-Status: No, hits=-4.3 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-pb0-f45.google.com (HELO mail-pb0-f45.google.com) (209.85.160.45) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Jan 2013 21:33:12 +0000 Received: by mail-pb0-f45.google.com with SMTP id mc8so1641603pbc.32 for ; Thu, 17 Jan 2013 13:33:12 -0800 (PST) X-Received: by 10.66.76.41 with SMTP id h9mr17369427paw.1.1358458392031; Thu, 17 Jan 2013 13:33:12 -0800 (PST) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPS id kl5sm1687586pbc.74.2013.01.17.13.33.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jan 2013 13:33:11 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 92799EA2457; Fri, 18 Jan 2013 08:03:05 +1030 (CST) Date: Thu, 17 Jan 2013 21:33:00 -0000 From: Alan Modra To: Mike Frysinger Cc: binutils@sourceware.org Subject: Re: [PATCH 1/2 v4] ld: change --enable-new-dtags to only generate new dtags Message-ID: <20130117213305.GZ3244@bubble.grove.modra.org> Mail-Followup-To: Mike Frysinger , binutils@sourceware.org References: <1356420600-11507-1-git-send-email-vapier@gentoo.org> <1358450541-17875-1-git-send-email-vapier@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1358450541-17875-1-git-send-email-vapier@gentoo.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2013-01/txt/msg00284.txt.bz2 On Thu, Jan 17, 2013 at 02:22:20PM -0500, Mike Frysinger wrote: > --- a/bfd/elflink.c > +++ b/bfd/elflink.c > @@ -5733,11 +5733,15 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, > > indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath, > TRUE); > - if (indx == (bfd_size_type) -1 > - || !_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx)) > + if (indx == (bfd_size_type) -1) > return FALSE; > > - if (info->new_dtags) > + if (!info->new_dtags) > + { > + if (!_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx)) > + return FALSE; > + } > + else > { > _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx); > if (!_bfd_elf_add_dynamic_entry (info, DT_RUNPATH, indx)) That _bfd_elf_strtab_addref will cause assertion failures when you get around to testing this patch, I think. -- Alan Modra Australia Development Lab, IBM