public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* RFA: gas S_IS_HIDDEN? (detecting hidden symbols in gas)
@ 2010-12-08 17:47 Matt Thomas
  2010-12-08 23:44 ` Alan Modra
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Thomas @ 2010-12-08 17:47 UTC (permalink / raw)
  To: binutils


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?  


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-09  4:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08 17:47 RFA: gas S_IS_HIDDEN? (detecting hidden symbols in gas) Matt Thomas
2010-12-08 23:44 ` Alan Modra
2010-12-09  4:35   ` Matt Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).