This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: configuring /var/run with newer autoconf


It was <2016-04-12 wto 10:55>, when Andreas Schwab wrote:
> Åukasz Stelmach <l.stelmach@samsung.com> writes:
>
>> I am not sure this is actually true. What is a part of ABI (as far as I
>> understand it) is _PATH_VARRUN defined in sysdeps/generic/paths.h and
>> sysdeps/unix/sysv/linux/paths.h. However, this isn't what nscd
>> uses. nscd has its own definitions in nscd/nscd-client.h and nscd/nscd.h
>> which apparently are not exported to /usr/include and are not supposed
>> to be used outside nscd. That means it should be possible to change the
>> the location wher nscd keeps its stuff without breaking ABI.
>
> _PATH_NSCDSOCKET is part of the ABI, it is used by libc to contact nscd.

The second part of the above sentence is definitely true. I am not so
sure about the truth of the first part (I am not very familiar with
conventions and contracts in glibc so I may be making mistakes or
writing outright BS, please correct me then).

Assuming it is (and I am not so sure) let's try to find out what uses
it. The symbol appears in three source code files and one header file
all in the nscd/ directory. The code using the symbol is hooked in nscd
itself (not a problem) and in a single[*] place libc.so.6.

Usually nscd binary comes from the same source as libc and there is
little risk of mismatch between nscd listening to /run/nscd/socket and
libc connecting to /var/run/nscd/socket.

Now some stupid questions. How does glibc declare its ABI? What makes a
defined constant like _PATH_NSCDSOCKET a part of the ABI? For example
_PATH_VARRUN is defined in public headers I can find in my
/usr/include/paths.h. On the other hand I can't find _PATH_NSCDSOCKET
anywhere in my /usr/include so I suppose no other code than libc is
using this value, hence it is not ABI.

[*] I assume it by observing the "/var/run/nscd/socket" string being
stored in the .text section and loaded funnily with movabs instructions
(on x86-64)
-- 
Åukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]