This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Re: Mips cross-compiled glibc: linker says use libc.so.1 as loader!
- To: Chris Worley <cworley at liberate dot com>
- Subject: Re: Mips cross-compiled glibc: linker says use libc.so.1 as loader!
- From: Andreas Jaeger <aj at suse dot de>
- Date: 27 Jun 2000 19:48:45 +0200
- Cc: bug-glibc at gnu dot org, glibc-linux at ricardo dot ecn dot wfu dot edu
- References: <3958D626.661BBFC5@liberate.com>
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
>>>>> Chris Worley writes:
Chris> BACKGROUND:
Chris> I've built a mips cross compiler from:
glibc 2.0.7 was never released and glibc 2.0.x doesn't support MIPS
properly - nevertheless lot's of people don't have problems with those
patches versions on little and also on big endian machines.
glibc 2.2 should support MIPS - for details check my homepage
<http://www.suse.de/~aj>.
Chris> binutils 2.8.1-1
Chris> egcs 1.0.3a-1
[...]
Chris> In the kernel, when it goes to run "init" (in my case /bin/sh), it first
Chris> looks for the loader to use, which is in the executable. It's told
Chris> "libc.so.1"!!!!!! I've never heard of this before... the glibc loader
Chris> is ld.so.1. The binfmt_elf.c code says these are the two possible
Chris> dynamic loaders. If I do a "strings" on the executable I'm trying to
Chris> load, one of the first is "libc.so.1" (libc.so.6 comes later), and
Chris> there's no mention of "ld.so.1".
Use readelf from binutils current to check what's in the executable.
[...]
>> # mips-linux-gnu-ld -L/hw/export/home/cworley/mips/egcs/lib/ -s -o hello hello.o -lc
You don't add the dynamic linker here. See how gcc calls ld with gcc
-Wl,-v or with gcc -v.
Chris> SUMMARY
Chris> I've basically got 2 or 3 problems:
Chris> o the linker doesn't know how to setup the executables start
Chris> address,
Chris> o dynamic linking doesn't work right and/or
Chris> o the wrong dynamic link loader is being specified
Or your cross tools are not configured correctly.
You better ask on one of the MIPS lists for help.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de