* 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
* Re: RFA: gas S_IS_HIDDEN? (detecting hidden symbols in gas)
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
0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2010-12-08 23:44 UTC (permalink / raw)
To: Matt Thomas; +Cc: binutils
On Wed, Dec 08, 2010 at 09:47:32AM -0800, Matt Thomas wrote:
> I was surprised to see there was no S_IS_HIDDEN. So in tc-vax.c
> I added:
I would be inclined to use S_GET_OTHER.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFA: gas S_IS_HIDDEN? (detecting hidden symbols in gas)
2010-12-08 23:44 ` Alan Modra
@ 2010-12-09 4:35 ` Matt Thomas
0 siblings, 0 replies; 3+ messages in thread
From: Matt Thomas @ 2010-12-09 4:35 UTC (permalink / raw)
To: Alan Modra; +Cc: binutils
On Dec 8, 2010, at 3:44 PM, Alan Modra wrote:
> On Wed, Dec 08, 2010 at 09:47:32AM -0800, Matt Thomas wrote:
>> I was surprised to see there was no S_IS_HIDDEN. So in tc-vax.c
>> I added:
>
> I would be inclined to use S_GET_OTHER.
Ahhh. Perfect. I knew there had to be something.
That means I can get by with:
#ifdef OBJ_ELF
&& ELF_ST_VISIBILITY (S_GET_OTHER (fragP->fr_symbol)) != STV_HIDDEN
#endif
Thanks
^ 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).