[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: library reduction problems in recent rootdisk.sh



On Tue, Nov 13, 2001 at 08:33:13PM +0100, Goswin Brederlow wrote:
> > Index: scripts/rootdisk/mklibs.py
> > ===================================================================
> > RCS file: /cvs/debian-boot/boot-floppies/scripts/rootdisk/mklibs.py,v
> > retrieving revision 1.4
> > diff -u -r1.4 mklibs.py
> > --- scripts/rootdisk/mklibs.py  2001/08/11 06:55:18     1.4
> > +++ scripts/rootdisk/mklibs.py  2001/11/13 15:14:55
> > @@ -53,7 +53,7 @@
> >  DEBUG_VERBOSE = 2
> >  DEBUG_SPAM    = 3
> > 
> > -debuglevel = DEBUG_NORMAL
> > +debuglevel = DEBUG_SPAM
> > 
> >  def debug(level, *msg):
> >      if debuglevel >= level:
> > @@ -352,7 +352,7 @@
> >              base_name = so_pattern.match(library).group(1)
> >              # libc needs its soinit.o and sofini.o as well as the pic
> >              if base_name == "libc":
> > -                extra_flags = find_lib("ld-linux.so.2")
> > +                extra_flags = find_lib("ld.so.1")
> >                  extra_pre_obj = "/usr/lib/libc_pic/soinit.o"
> >                  extra_post_obj = "/usr/lib/libc_pic/sofini.o"
> >              else:
> > @@ -396,6 +396,6 @@
> >      os.remove(dest_path + "/" + lib)
> > 
> >  # Make the dynamic linker executable
> > -ld_file = find_lib("ld-linux.so.2")
> > +ld_file = find_lib("ld.so.1")
> >  ld_file_name = os.path.basename(ld_file)
> >  os.chmod(dest_path + "/" + ld_file_name, 0755)
> 
> I have the following on my system:
> 
> mrvn@dual:~% ls -l /lib/ld*
> -rwxr-xr-x    1 root     root        94561 Oct 30 23:44 /lib/ld-2.2.4.so*
> lrwxrwxrwx    1 root     root           18 Mar 13  2001 /lib/ld-linux.so.1 -> ld-linux.so.1.9.11*
> -rwxr-xr-x    1 root     root        24817 Mar  7  2001 /lib/ld-linux.so.1.9.11*
> lrwxrwxrwx    1 root     root           11 Nov  4 05:54 /lib/ld-linux.so.2 -> ld-2.2.4.so*
> -rwxr-xr-x    2 root     root        99568 Mar  7  2001 /lib/ld.so*
> -rwxr-xr-x    2 root     root        99568 Mar  7  2001 /lib/ld.so.1.9.11*
> 
> 2fca30cbaccb4c9eccfe46cc26d1317b  /lib/ld-2.2.4.so
> d4a2c961c9306a2e556aa01b9f3578a8  /lib/ld-linux.so.1.9.11
> 77328b80b0c4956fa82bbec45cfd8fd1  /lib/ld.so
> 77328b80b0c4956fa82bbec45cfd8fd1  /lib/ld.so.1.9.11

i386

> So which one should be used? Which ones don't work?
> 
> Do all archs have an /lib/ld.so and does that work for all?
> 
> I would hate to do things differently for each arch or libc version. I
> thought with ld-linux.so.2 would be provided by all current glibcs.

unless you want to figure out what the libc version is you have to.
boot-floppies already have a mechenism to know what ld is on a certain
architecture.  

eb@dogbert ~$ ls -l /lib/ld*
-rwxr-xr-x    1 root     root       115464 Oct 30 09:44 /lib/ld-2.2.4.so
lrwxrwxrwx    1 root     root           11 Nov 10 03:36 /lib/ld.so.1 -> ld-2.2.4.so
eb@dogbert ~$ dpkg -s libc6 | grep ^Ver
Version: 2.2.4-5
eb@dogbert ~$ uname -m
ppc

furthermore from looking at rootdisk.sh more archs use ld.so.1 then
use ld-linux.so.2.  look at the list for yourself.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpGEOp1DdhV6.pgp
Description: PGP signature


Reply to: