This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: V3 vs. AIX
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: V3 vs. AIX
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Mon, 05 Feb 2001 13:42:32 -0500
- cc: bkoz at nabi dot net, gcc at gcc dot gnu dot org
In AIX, there always are two symbols for a function: the symbol of
the actual code address, with the dot, and the symbol of the function
descriptor (PLT in SysV terms), without the dot. Code always branches to
the function with the dot.
If the function does not exist in the current module at link-edit
time, the linker creates a stub with the dot name whose job is to access
the real PLT for the real code address and TOC address. The stub loads
the TOC and branches through a register to the function in the external
module.
As far as the function performing the call is concerned, it does
not care whether the target function is local or in a separate module.
The AIX linker is a garbage collecting linker, so it should load all
object files and libraries and then strip out unused symbols. I will need
to think about how it could think that a symbol is not in the local module
but then have that function in the module. Even if it does bind some
calls to a stub, it still should work if the runtime loader fills in the
function descriptor correctly, but maybe it is confused by the two symbols
with the same name.
Is this one of the symbols which the linker warns about duplicate
symbols when linking the shared library? If CVS is buildable now, I will
try rebuilding and creating a linker MAP file to try to find where these
definitions are coming from.
Thanks, David