This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RFA: gas S_IS_HIDDEN? (detecting hidden symbols in gas)
- From: Matt Thomas <matt at 3am-software dot com>
- To: binutils <binutils at sourceware dot org>
- Date: Wed, 8 Dec 2010 09:47:32 -0800
- Subject: RFA: gas S_IS_HIDDEN? (detecting hidden symbols in gas)
For the VAX, i need to be detect whether a symbol is hidden or not
(a "global" hidden symbol can be used in an indirect addressing manner
in PIC mode while a global non-hiddden symbol can not be).
I was surprised to see there was no S_IS_HIDDEN. So in tc-vax.c
I added:
#ifdef OBJ_ELF
static int
S_IS_HIDDEN(symbolS *symbolP)
{
asymbol *bfdsym;
elf_symbol_type *elfsym;
bfdsym = symbol_get_bfdsym (symbolP);
elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym);
assert (elfsym);
return (elfsym->internal_elf_sym.st_other & 3) == STV_HIDDEN;
}
#endif
The routine works fine but it doesn't belong in tc-vax.c.
So the question is where does it belong? config/obj-elf.c?
symbols.c? someplace else?