lkml.org 
[lkml]   [1999]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Possible ld-so bug.
Date
In article <Pine.LNX.3.95.990216164723.5883A-100000@chaos.analogic.com>,
Richard B. Johnson <root@chaos.analogic.com> wrote:
>Yes. The install does `mv library library.sav` ; `cp new_library library`.
>So, In principle, this should work. However it doesn't, apparently
>because one can only perform one operation at a time so at some instant,
>there is a new ld-linux.so and an old libc.n.n.so. And `mv`, `install`,
>'cp`, etc. all use these libraries. This would not happen if the library
>version numbers were different because 'mv'. etc., would always use
>the library.n.n.so it was linked against.
That _is_ dumb. It should do this (error handling not shown):

ln library library.sav
cp new_library library.new
mv -f library.new library

That way the existence of 'library' is guaranteed.

However, this still won't work if you have to update multiple shared
libraries. If you have libraries A, B, and C, which all depend on
struct sizes inside each other, and you try to install new A, B, and C
with different struct sizes, then once you've updated A anything linked
against B and C will crash. If your installation requires access to A,
B, and C, then your installation will crash too.

The answer might be a C program that executes a lot of

rename("library.new", "library");

given a master list, after all the 'library.new''s have been written.
That C program would do all the renames itself and therefore keeps the
old shared library images in RAM while changing the files around on disk.
The C program would continue until all of the libraries have been replaced,
and once that is done you can happily run the (statically linked)
/sbin/ldconfig -v and you're done.
--
Zygo Blaxell, Linux Engineer, Corel Corporation, zygob@corel.ca (work),
zblaxell@furryterror.org (play). It's my opinion, I tell you! Mine! All MINE!
Size of 'diff -Nurw [...] winehq corel' as of Wed Feb 17 00:14:01 EST 1999
Lines/files: In 277 / 3, Out 20653 / 255, Both 20923 / 256

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site