From: Richard Sandiford <rdsandiford@googlemail.com>
To: "Maciej W. Rozycki" <macro@codesourcery.com>
Cc: "Ellcey\, Steve" <sellcey@mips.com>,
"libc-alpha\@sourceware.org" <libc-alpha@sourceware.org>,
"libc-ports\@sourceware.org" <libc-ports@sourceware.org>,
Chung-Lin Tang <cltang@codesourcery.com>
Subject: Re: [PATCH 2/2] MIPS16: MIPS16 support proper
Date: Fri, 25 Jan 2013 13:59:00 -0000 [thread overview]
Message-ID: <87r4l9s6ru.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com> (raw)
In-Reply-To: <alpine.DEB.1.10.1301250451540.4834@tp.orcam.me.uk> (Maciej W. Rozycki's message of "Fri, 25 Jan 2013 05:13:53 +0000")
"Maciej W. Rozycki" <macro@codesourcery.com> writes:
>> 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?
>
> I am fairly sure QEMU has issues with MIPS16 code, and I wouldn't be
> surprised if user-mode emulation actually required porting QEMU, rather
> than merely fixing bugs, to support MIPS16 binaries -- it may not be
> prepared to handle the ISA bit at all.
Never tried user-mode emulation either, but FWIW...
> Have you tried running your code on actual hardware? This is how we did
> testing of all these changes.
...QEMU 1.2 system emulation seems to handle MIPS16 pretty well,
so that might be another alternative. See:
http://gcc.gnu.org/ml/gcc-testresults/2013-01/msg02626.html
http://gcc.gnu.org/ml/gcc-testresults/2013-01/msg02550.html
for some recent results.
Richard
next prev parent reply other threads:[~2013-01-25 13:59 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 4:41 [PATCH 0/2] MIPS16: MIPS16 support Maciej W. Rozycki
2013-01-23 4:41 ` [PATCH 1/2] MIPS16: Allocate GLIBC_2.18 Maciej W. Rozycki
2013-01-23 4:42 ` [PATCH 2/2] MIPS16: MIPS16 support proper Maciej W. Rozycki
2013-01-23 17:22 ` Joseph S. Myers
2013-01-24 10:10 ` Chung-Lin Tang
2013-01-24 13:13 ` Maciej W. Rozycki
2013-01-24 13:56 ` Richard Sandiford
2013-02-20 16:19 ` [PATCH v2] MIPS: MIPS16 support Maciej W. Rozycki
2013-02-20 16:29 ` Joseph S. Myers
2013-02-27 1:38 ` [PATCH v3] " Maciej W. Rozycki
2013-02-27 17:50 ` Joseph S. Myers
2013-02-27 23:54 ` Maciej W. Rozycki
2013-01-24 18:08 ` [PATCH 2/2] MIPS16: MIPS16 support proper Ellcey, Steve
2013-01-25 5:14 ` Maciej W. Rozycki
2013-01-25 13:59 ` Richard Sandiford [this message]
2013-01-28 22:18 ` Steve Ellcey
2013-01-25 22:10 ` Steve Ellcey
2013-01-26 0:32 ` Maciej W. Rozycki
2013-01-28 17:36 ` Steve Ellcey
2013-01-28 17:56 ` Steve Ellcey
2013-01-28 21:08 ` Maciej W. Rozycki
2013-01-28 18:58 ` Richard Henderson
2013-01-28 21:06 ` Maciej W. Rozycki
2013-01-28 21:17 ` Steve Ellcey
2013-01-29 16:24 ` Richard Henderson
2013-01-29 19:27 ` Joseph S. Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4l9s6ru.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com \
--to=rdsandiford@googlemail.com \
--cc=cltang@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=libc-ports@sourceware.org \
--cc=macro@codesourcery.com \
--cc=sellcey@mips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).