This is the mail archive of the libc-alpha@sources.redhat.com 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: errno assignment problems


On Wed, Aug 28, 2002 at 04:07:50AM -0700, David S. Miller wrote:
>    From: Jakub Jelinek <jakub@redhat.com>
>    Date: Wed, 28 Aug 2002 13:03:40 +0200
>    
>    If kernel adds one day a new errno value, glibc will suddenly stop building
>    (before Roland's changes it would mean sys_errlist would suddenly grow
>    breaking binary compatibility).
> 
> If it gets larger, ie. new entries are added to the end of the table
> and existing entries stay identical, how could that break an
> application?

If a non-pic compiled binary uses sys_errlist directly, the dynamic linker
is copying it into .bss of the program from libc.so and the sizes need
to match, otherwise you get:
%s: Symbol `%s' has different size in shared object, consider re-linking
warning and as sys_nerrlist will contain the size of libc.so's errlist
while the copied one would be smaller, if the program does say
iterate over all values < sys_nerrlist, it will walk
into uninitialized area.

	Jakub


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