From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18651 invoked by alias); 30 Oct 2007 22:55:08 -0000 Received: (qmail 18638 invoked by uid 22791); 30 Oct 2007 22:55:08 -0000 X-Spam-Check-By: sourceware.org Received: from omta03ps.mx.bigpond.com (HELO omta03ps.mx.bigpond.com) (144.140.82.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 30 Oct 2007 22:55:05 +0000 Received: from oaamta04ps.mx.bigpond.com ([58.174.193.185]) by omta03ps.mx.bigpond.com with ESMTP id <20071030225502.ELLA25130.omta03ps.mx.bigpond.com@oaamta04ps.mx.bigpond.com> for ; Tue, 30 Oct 2007 22:55:02 +0000 Received: from bubble.grove.modra.org ([58.174.193.185]) by oaamta04ps.mx.bigpond.com with ESMTP id <20071030225502.RXQP15825.oaamta04ps.mx.bigpond.com@bubble.grove.modra.org>; Tue, 30 Oct 2007 22:55:02 +0000 Received: by bubble.grove.modra.org (Postfix, from userid 500) id F0DA73549FC; Wed, 31 Oct 2007 09:25:01 +1030 (CST) Date: Tue, 30 Oct 2007 23:39:00 -0000 From: Alan Modra To: "Joseph S. Myers" Cc: binutils@sourceware.org Subject: Re: Patch to detect invalid mergeable string sections Message-ID: <20071030225501.GF5706@bubble.grove.modra.org> Mail-Followup-To: "Joseph S. Myers" , binutils@sourceware.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i 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: 2007-10/txt/msg00399.txt.bz2 On Tue, Oct 30, 2007 at 04:10:18PM +0000, Joseph S. Myers wrote: > + if (sec_end && s >= sec_end) > + { > + (*_bfd_error_handler) > + (_("unterminated string in section marked for merging")); > + return NULL; > + } It would be nice if this error specified the section. I think you can do that by simply returning NULL here and calling _bfd_error_handler at error_return in record_section after testing for bfd_get_error returning anything but bfd_error_no_memory. -- Alan Modra Australia Development Lab, IBM