From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26034 invoked by alias); 3 Oct 2005 04:40:52 -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 26022 invoked by uid 22791); 3 Oct 2005 04:40:50 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 03 Oct 2005 04:40:50 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EMI81-0002tB-TR; Mon, 03 Oct 2005 00:40:41 -0400 Date: Mon, 03 Oct 2005 04:40:00 -0000 From: Daniel Jacobowitz To: Alan Modra Cc: gdb-patches@sources.redhat.com Subject: Re: Fix powerpc64-linux inferior function calls Message-ID: <20051003044041.GA10992@nevyn.them.org> Mail-Followup-To: Alan Modra , gdb-patches@sources.redhat.com References: <20050928073345.GK29044@bubble.grove.modra.org> <20051002223118.GC32728@nevyn.them.org> <20051002232228.GB26007@bubble.grove.modra.org> <20051002234834.GA4773@nevyn.them.org> <20051003003506.GC26007@bubble.grove.modra.org> <20051003010437.GA6497@nevyn.them.org> <20051003033223.GD26007@bubble.grove.modra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051003033223.GD26007@bubble.grove.modra.org> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-10/txt/msg00015.txt.bz2 On Mon, Oct 03, 2005 at 01:02:23PM +0930, Alan Modra wrote: > On Sun, Oct 02, 2005 at 09:04:37PM -0400, Daniel Jacobowitz wrote: > > > 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. > > > > Well, I'm 100% positive that it didn't work without that. Has this > > changed recently? > > No. I tested my patch on powerpc64 and it worked without fudging > flags.. Ah! You were looking at plt symbols no doubt, and they are > typically undefined. For some reason, BFD doesn't set BSF_GLOBAL for > undefined syms, so the corresponding plt symbols won't have BSF_GLOBAL > set. I'll fix this in _bfd_elf_get_synthetic_symtab. Thanks! I've no strong preference between the patches (mine minus the BSF_GLOBAL hack) now. -- Daniel Jacobowitz CodeSourcery, LLC