[uClibc]shared library support on linux-MIPS with CONFIG_64BIT_PHYS_ADDR
Erik Andersen
andersen at codepoet.org
Wed Jul 10 07:41:09 UTC 2002
On Tue Jul 09, 2002 at 05:05:46PM -0700, Joseph Chiu wrote:
> Hi,
>
> I've been trying to get linux-MIPS (sourceforge) working with the
> CONFIG_64BIT_PHYS_ADDR turned on so that I can use the PCMCIA on
> the Alchemy/AMD Au1000. Although userland programs are supposed
> to not care about the internal goings on of the kernel, somehow I
> can't get dynamically-linked uclibc programs to run.
>
> As I write this, I can not get statically linked uclibc programs
> and statically and dynamically linked glibc programs running. But
> dynamically linked uclibc programs will not start. I have the
> uclibc debugging turned on, and have tried using uclibc's shared-
> library loader, and also using the "native" (glibc) shared-library
> loader.
>
> When I run a test program
> main(){return 1;}
>
> Using the uclibc shared-library loader returns an User defined signal 1
> error.
Hmm. I dunno. It works for me on my mips test system. I just
rebuilt uClibc using today's CVS:
$ cat /proc/cpuinfo | head -n4
system type : MIPS Cobalt
processor : 0
cpu model : Nevada V10.0 FPU V10.0
BogoMIPS : 249.85
$ uname -a
Linux phoenix 2.4.19-rc1 #13 Wed Jul 3 14:26:21 MDT 2002 mips unknown
$ cat tiny.c
#include <unistd.h>
int main(void)
{
_exit(42);
}
$ /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-gcc -Wall -Os -s tiny.c -o tiny
$ strip -x -R .note -R .comment ./tiny
$ ls -l ./tiny
-rwxr-xr-x 1 andersen andersen 4896 Jul 10 01:34 ./tiny*
$ /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-ldd ./tiny
libc.so.0 => /usr/mipsel-linux-uclibc/lib/libc.so.0
/usr/mipsel-linux-uclibc/lib/ld-uClibc.so.0 => /usr/mipsel-linux-uclibc/lib/ld-uClibc.so.0
$ ./tiny
$ echo $?
42
Now to try something a bit more complicated:
$ cat hello.c
#include<stdio.h>
#include <stdlib.h>
int main(void)
{
printf("hello world\n");
exit(42);
}
$ /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-gcc -Wall -Os -s hello.c -o hello
$ strip -x -R .note -R .comment ./hello
$ ls -l ./hello
-rwxr-xr-x 1 andersen andersen 4944 Jul 10 01:36 ./hello*
$ /usr/mipsel-linux-uclibc/bin/mipsel-uclibc-ldd ./hello
libc.so.0 => /usr/mipsel-linux-uclibc/lib/libc.so.0
/usr/mipsel-linux-uclibc/lib/ld-uClibc.so.0 => /usr/mipsel-linux-uclibc/lib/ld-uClibc.so.0
$ ./hello
hello world
> Using the glibc shared-library loader turns an Illegal Instruction
> error.
>
> It seems to me, perhaps, that something is going wrong before either
> shared-library loader perform their job? What code would the
> uclibc-using-glibc-loader and uclibc-using-uclibc-loader programs
> have in common, that it wouldn't have with glibc-using-glibc-loader
> program?
I'd take a close look at your kernel. Sounds to me like your kernel
is executing apps with their stack all hosed up. What kernel are you
using?
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
More information about the uClibc
mailing list