Subject: Which ld.so to use?

From: Erik Mouw <[email-masked]>
Date: Mon, 7 Feb 2000 00:53:35 +0100 (MET)

Hi,

I'm currently building (with a cross compiler) a new glibc-2.1.2 based
ramdisk image for SA1100 based systems. So far, the ramdisk uses the
following components:

- libc and libm from glibc-2.1.2 with debug symbols stripped
- busybox for almost all tools
- tinylogin for getty & login
- bash (which is strangely enough not really prepared for cross compilation)

I could have used ash as a shell, but IMHO bash is a bit more easy to use.
My goal is to make a useable ramdisk, not the smallest one. YMMV.

Now I need ld.so, the dynamic linker. I've tried compiling
ld.so-1.9.9.tar.gz (from metalab), but that only seems to support i386,
m68k, and sparc. I can't find a patch for it on the ArmLinux ftp site.
However, I found out that glibc contains ld-2.1.2.so. Is this indeed the
dynamic linker, or is there somewhere a patch for ld.so-1.9.9 available?

BTW: do I need other libraries except libc and libm?

Erik
[hmm, time to go to bed]

-- 
LART. 250 MIPS under one Watt.
http://www-ict.its.tudelft.nl/~erik/open-source/LART/

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Philip Blundell <[email-masked]>
Date: Mon, 07 Feb 2000 09:20:52 +0000

>dynamic linker,

Yes.

>or is there somewhere a patch for ld.so-1.9.9 available?

No.  That is the old libc5 dynamic linker; it's no use on ARM.

>BTW: do I need other libraries except libc and libm?

That rather depends what programs you want to run.  `ldd' will tell you which 
libraries are required for a particular binary.

p.

---

From: Erik Mouw <[email-masked]>
Date: Mon, 7 Feb 2000 12:08:35 +0100 (MET)

> No.  That is the old libc5 dynamic linker; it's no use on ARM.

Ah, OK, thanks. I'm building something libc6 based so I don't need it.

> libraries are required for a particular binary.

Where can I find ldd? I know it is a sneaky trick with the exec() system
call, and the ldd.so-1.9.9 has an assembly file to do it (which needs to
be ported to ARM), but I can't find a ldd binary in my cross compiled
glibc-2.1.2 setup (which makes sense because exec()-ing an ARM binary on
i386 doesn't work).

Erik

---

From: Philip Blundell <[email-masked]>
Date: Mon, 07 Feb 2000 11:15:26 +0000

>> That rather depends what programs you want to run.  `ldd' will tell you 
>> which libraries are required for a particular binary.
>
>Where can I find ldd?

It also comes with glibc.

>I know it is a sneaky trick with the exec() system call,

Not any more.  Actually, you can use this shell script as a poor man's ldd:

#!/bin/sh
/lib/ld-linux.so.2 --list $1

The one that comes with glibc is somewhat more sophisticated but the net 
effect is much the same.

p.