This is the mail archive of the
mailing list for the binutils project.
Re: RFC: Add STB_GNU_SECONDARY
> Currently we use weak undefined symbol, foo, to do
> if (&foo != 0)
> foo is defined.
> foo isn't defined.
> We want is to define foo as a secondary symbol so that
> we can always use foo without checking. If there is a primary
> one in a .o file and .so file, we will get the primary one,
> otherwise, we will use the secondary one.
Why not use a weak definition in the file where you make the call?