[lsb-discuss] LSB conf call notes for 2008-06-18

Wichmann, Mats D mats.d.wichmann at intel.com
Wed Jun 18 15:07:25 PDT 2008


Denis Silakov wrote:
> On Wednesday 18 June 2008 11:19:57 pm Jeff Licquia wrote:
>> Joseph Kowalski wrote:
>>> If there is a need for something called "__getdelim", perhaps you
>>> should create a public interface called "getdelim"?
>> 
>> That's already been done.
> 
> Well, as Jeff has mentioned in bug 2128
> (http://bugs.linuxbase.org/show_bug.cgi?id=2128), both getdelim and
> __getdelim in glibc are weak aliases for _IO_getdelim.
> 
>>> If the LSB were to produce a specification for __getdelim, the LSB
>>> would be in violation of POSIX....  Remember that stuff about
>>> "symbols beginning with `_[_A-Z]' belonging to the implementation".
> 
> However, it's a normal way for glibc to introduce a 'normal' symbol
> as a weak alias for the same symbol with the leading '__', which
> usually provides the actual implementation (situation with getdelim
> is not exactly the same, but getdelim is not a common example,
> indeed). Surely, glibc inside its own code uses underscored symbols,
> not their aliases. On binary level, all symbols are visible; but the
> weak aliases have 'weak' binding, while the symbols that really
> implement the functionality, have the 'global' one. 

So just a level set since there were a few questions on this.

LSB is primarily a binary - ABI - specification.  It does not even
specify a development environment.  However, to be realistic, we're
also interested in the API which is used to get to the ABI.

There are some symbols and other artifacts that appear in only 
one or the other.  Mostly  the __ symbols are internal implementation
and don't need to appear as part of the ABI:  if an implementation,
such as glibc, uses these internally, but that usage is not
directly exposed to applications, then that's fine; LSB describes
how the publicly-visible symbols behave, not how libraries internally
cause that behavior to happen.   But sometimes there is a strange
overlap: certain tricks in the compiler or library may cause these
osensibly internal symbols to appear in the symbol table of binaries.
In this case we may add them to LSB, but mark them as appearing only
in the binary specification, not the source specification - this
means they're legal in binaries, but source code may not program
to them directly.  There are also a few where odd tricks cause 
symbols which appear in the API to not appear in the binaries -
an example of this might be stat, which will magically be revectored
to binary symbol _xstat.  In this case we'll say that interface is
in the source specification only, and also document _xstat, as being
in the binary specification only.




More information about the lsb-discuss mailing list