This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu 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]

Re: Mips cross-compiled glibc: linker says use libc.so.1 as loader!


>>>>> 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

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