This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix powerpc64-linux inferior function calls
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