This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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?  



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]