Re: Fix powerpc64-linux inferior function calls

Alan Modra
2005-10-03T00:35:12Z

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