From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 386 invoked by alias); 3 Oct 2005 03:32:29 -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 378 invoked by uid 22791); 3 Oct 2005 03:32:27 -0000 Received: from omta03ps.mx.bigpond.com (HELO omta03ps.mx.bigpond.com) (144.140.82.155) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 03 Oct 2005 03:32:27 +0000 Received: from grove.modra.org ([144.136.167.90]) by omta03ps.mx.bigpond.com with ESMTP id <20051003033223.BZMW12238.omta03ps.mx.bigpond.com@grove.modra.org> for ; Mon, 3 Oct 2005 03:32:23 +0000 Received: by bubble.grove.modra.org (Postfix, from userid 500) id 7AB081CAFAD; Mon, 3 Oct 2005 13:02:23 +0930 (CST) Date: Mon, 03 Oct 2005 03:32:00 -0000 From: Alan Modra To: gdb-patches@sources.redhat.com Subject: Re: Fix powerpc64-linux inferior function calls Message-ID: <20051003033223.GD26007@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> <20051003003506.GC26007@bubble.grove.modra.org> <20051003010437.GA6497@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051003010437.GA6497@nevyn.them.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-10/txt/msg00014.txt.bz2 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. -- Alan Modra IBM OzLabs - Linux Technology Centre