Re: Fix powerpc64-linux inferior function calls

Alan Modra
2005-10-03T03:32:29Z

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