From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19647 invoked by alias); 7 Dec 2004 04:38:08 -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 19560 invoked from network); 7 Dec 2004 04:38:04 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 7 Dec 2004 04:38:04 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CbX6v-0003bn-IY; Mon, 06 Dec 2004 23:38:01 -0500 Date: Tue, 07 Dec 2004 04:40:00 -0000 From: Daniel Jacobowitz To: Fergal Daly , binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: Re: [PATCH] prevent core dump for multiple def symbols Message-ID: <20041207043800.GC4648@nevyn.them.org> Mail-Followup-To: Fergal Daly , binutils@sources.redhat.com, gdb-patches@sources.redhat.com References: <20040611144526.GF16613@dyn.fergaldaly.com> <20040611145341.GA24143@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040611145341.GA24143@nevyn.them.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00189.txt.bz2 On Fri, Jun 11, 2004 at 10:53:41AM -0400, Daniel Jacobowitz wrote: > The files in bfd/ are maintained as part of GNU Binutils, so you need > to ask on the binutils list about this patch. > > It seems obvious and correct to me. Is multiple_definition a recent > callback or did I just miss it when I wrote simple.c? [I won't even > ask how you have a shared library with multiple definitions of a > dynamic symbol.] > > On Fri, Jun 11, 2004 at 03:45:26PM +0100, Fergal Daly wrote: > > I have a .so file that makes gdb dump core. The problem shows up in > > bfd/linker.c:1800 > > > > if (! ((*info->callbacks->multiple_definition) > > (info, h->root.string, msec->owner, msec, mval, > > abfd, section, value))) > > return FALSE; > > > > because info->callbacks->multiple_definition is null. > > > > I have no idea if this patch is "the right thing" but it allows me to debug > > my app. It just sets the callback to a dummy callback which returns TRUE > > when the link_info is being created. I presume this is OK because all the > > other callbacks are set to dummies too. > > > > This was logged as bug 1668, hopefully this is a fix for it. > > > > Patch below, I have belatedly checked in this patch, with some formatting fixes. Tested on i686-pc-linux-gnu. -- Daniel Jacobowitz