This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: alias of hidden function
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Cc: gcc at gcc dot gnu dot org, binutils at sourceware dot org, mikestump at comcast dot net
- Date: Mon, 10 May 2010 16:17:26 +0100
- Subject: Re: alias of hidden function
- References: <20100510133002.GA14989@bromo.med.uc.edu>
On 10/05/2010 14:30, Jack Howarth wrote:
> Are there any standards in effect which would dictate that
> the alias of a hidden function is valid?
Visiblity doesn't apply to functions, it applies to symbols. Symbols are
textual names with a linked value that exist in object files. The compiler
emits assembler source that directs the assembler to output an object file
containing the code for the function x, and for two symbols that both have the
value of the address of x (but neither of which is actually called "x"). The
visibility of one of these symbols is set to hidden; the visibility of the
other is not. It is not the function that is hidden, only (one of the two)
symbols pointing at that function.
(Also, it's not hidden from the compiler, or indeed the static linker, but
only from the runtime loader, in any case.)
cheers,
DaveK