From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27753 invoked by alias); 3 Oct 2005 00:35:12 -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 27740 invoked by uid 22791); 3 Oct 2005 00:35:10 -0000 Received: from omta04ps.mx.bigpond.com (HELO omta04ps.mx.bigpond.com) (144.140.83.156) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 03 Oct 2005 00:35:10 +0000 Received: from grove.modra.org ([144.136.167.90]) by omta04ps.mx.bigpond.com with ESMTP id <20051003003507.VVDR10035.omta04ps.mx.bigpond.com@grove.modra.org> for ; Mon, 3 Oct 2005 00:35:07 +0000 Received: by bubble.grove.modra.org (Postfix, from userid 500) id C15CA1CAFAD; Mon, 3 Oct 2005 10:05:06 +0930 (CST) Date: Mon, 03 Oct 2005 00:35:00 -0000 From: Alan Modra To: gdb-patches@sources.redhat.com Subject: Re: Fix powerpc64-linux inferior function calls Message-ID: <20051003003506.GC26007@bubble.grove.modra.org> References: <20050928073345.GK29044@bubble.grove.modra.org> <20051002223118.GC32728@nevyn.them.org> <20051002232228.GB26007@bubble.grove.modra.org> <20051002234834.GA4773@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051002234834.GA4773@nevyn.them.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-10/txt/msg00011.txt.bz2 On Sun, Oct 02, 2005 at 07:48:34PM -0400, Daniel Jacobowitz wrote: > I don't remember precisely... ah, here it is. See elf_symtab_read. > > if (sym->flags & BSF_FILE) > ... > else if (sym->flags & BSF_SECTION_SYM) > ... > else if (sym->flags & (BSF_GLOBAL | BSF_LOCAL | BSF_WEAK)) > > They won't be recorded as symbols if they have none of these bits set. > Do you want to change BFD to always create them as BSF_GLOBAL? I think the symbols are OK as is. _bfd_elf_get_synthetic_symtab has *s = **p->sym_ptr_ptr; s->section = plt; s->value = addr - plt->vma; s->name = names; ie. flags will be set from the destination sym for synthetic plt syms, making the synthetic sym BSF_GLOBAL or BSF_LOCAL. The ppc64 code does similarly. So I think your gdb patch should simply leave the synthetic sym flags unchanged. -- Alan Modra IBM OzLabs - Linux Technology Centre