This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: .so problem
- From: Gergely Tamás <gertom at rgai dot hu>
- To: Emmanuel Arazo <e_arazo at yahoo dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 09 Apr 2003 10:49:13 +0200
- Subject: Re: .so problem
- References: <20030408015547.61021.qmail@web40805.mail.yahoo.com>
Emmanuel Arazo wrote:
Ok.
1. GLIBC will create the ld-linux.so.2 link to the ld package. So you
should not copy this manually. although you may manually create a link
to the ld-library and name it ld-linux.so.2 or ld-linux.so.1 or do both
to be sure.
Ok.
2. What packages are you using... GLIBC? GCC? BINUTILS?
I have an arm machine:
Linux ipack 2.4.18-rmk3 #19 Thu Mar 27 11:27:44 CET 2003 armv4l unknown
with glibc-2.2.5 libraries. I also have a host machine, with an
arm-linux-gcc cross-compiler (gcc-2.95.3, binutils-2.11.2) installed from a
binary package (have no toolchain for it). This works correctly.
Now I want to create a gcc-3.2 cross-compiler. I have the linux headers, use
binutils-2.13, and glibc-2.2.5. First I build binutils, then gcc, glibc and
gcc again, according to the toolchain. It works without reporting an error.
I compile a simple program with this gcc-3.2, and try to run it. By default,
it tries to use /usr/lib/ld.so.1 as runtime linker. On the arm machine,
there is no such file.
If I make a link: /usr/lib/ld.so.1->/lib/ld-linux.so.2, the programs segfault.
If I copy the compiled glibc 'lib' library (not the installed '/lib') from
the host to the arm-machine, and create a link:
/usr/lib/ld.so.1->/hostlib/ld-linux.so.2, it also segfaults, with both
LD_LIBRARY_PATH=/lib and LD_LIBRARY_PATH=/hostlib.
3. Try to follow the cross compilation procedures posted in the
arm-linux ftp site:
ftp://ftp.arm.linux.org.uk/pub/armlinux/toolchain/src-2.95.3/build-toolchain/
ftp://ftp.arm.linux.org.uk/pub/armlinux/toolchain/src-3.2/build-toolchain/
I'll check them.
4. Endianess is an issue to this work. What endianess is used by your
platform, or better yet, what platform are you using? The toolchain in
No. 3 is created for little-endian machines.
Everything is little-endian.
gertom