This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: .so problem




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


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