This is the mail archive of the libc-alpha@sourceware.org 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]
Other format: [Raw text]

RE: [PATCH 2/2] MIPS16: MIPS16 support proper


Maciej,

I was able to apply your patches and build a MIPS16 glibc (multiple ones actually for mips32,
mips32r2, big & little endian, soft & hard float), so that was great.  I am having trouble running executables
that I link with those libraries though.  I am using qemu for my testing and the same qemu that runs
mips32r2 binaries just fine won't run something compiled with -mips32r2 -mips16 and linked with the mips16
glibc that I built.

After some poking around I think the problem is not the glibc that I built but with crti.o and crtn.o.  If I use
regular mips32 versions of these crt files and mips16 built versions of everything else (main program, glibc,
libgcc, etc.) then I can run a simple hello world program, if I use the mips16 versions of crti and crtn I get:


mips-mti-linux-gnu-gcc -mips32r2 -mips16 '-Wl,--dynamic-linker=/local/home/sellcey/gcc/mips16/sysroot-mips-mti-linux-gnu/mips16/usr/lib/ld-2.17.90.so' '-Wl,-rpath=/local/home/sellcey/gcc/mips16/sysroot-mips-mti-linux-gnu/mips16/usr/lib:/local/home/sellcey/gcc/mips16/install-mips-mti-linux-gnu/mips-mti-linux-gnu/lib/mips16' hi.c -o x

mips-mti-linux-gnu-qemu -r 2.6.38 ./x
hi
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

Note that it did print 'hi' before getting the signal.

If I try adding '-static' then I get:

mips-mti-linux-gnu-gcc -static -mips32r2 -mips16 hi.c -o x
mips-mti-linux-gnu-qemu -r 2.6.38 ./x
qemu: uncaught target signal 4 (Illegal instruction) - core dumped



I was wondering if you have any idea what could be causing this.  Should the standard qemu be able
to run mips16 executables with no changes?

Steve Ellcey
sellcey@mips.com

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