public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@codesourcery.com>
To: Richard Henderson <rth@twiddle.net>
Cc: Steve Ellcey <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: Mon, 28 Jan 2013 21:06:00 -0000	[thread overview]
Message-ID: <alpine.DEB.1.10.1301282042020.4409@tp.orcam.me.uk> (raw)
In-Reply-To: <5106CA30.4070306@twiddle.net>

On Mon, 28 Jan 2013, Richard Henderson wrote:

> > OK, I see where this is happening now.  crti (from glibc) is mips16 and
> > crtbegin (from gcc) is mips32.  crtbegin is mips32 because it uses
> > CRT_CALL_STATIC_FUNCTION and that has '.nomips16' in it.  I am not sure
> > how to rewrite CRT_CALL_STATIC_FUNCTION in mips16 to avoid this and it
> > looks like the codesourcery version of GCC is handling this by making
> > all .init/.fini code mips32 instead of mips16.  So, should I try to make
> > crti use a mips32 .init or make crtbegin use a mips16 .init?  I am not
> > sure which is better.
> 
> FWIW, I think you're better off considering the .init section to be
> mips32 code always, as a part of the ABI.  That way stuff that worked
> before continues to work, and no one has to worry about how the
> installed toolchain itself is configured.

 That may work as a temporary measure for MIPS16 code only, as any 
processor that supports MIPS16 execution must also support standard MIPS 
execution.

 However we have the very same problem with microMIPS code -- that glibc 
supports out of the box thanks to the high level of source compatibility 
the ISA provides and GCC support for which is currently under review.  
There we cannot agree upon using standard MIPS code in .init/.fini because 
we have conflicting objectives to choose from:

1. We want to support mixing standard MIPS and microMIPS code, so we 
   cannot assume all binary modules in a static link will use the same 
   encoding.

2. We want to support processors that only support either instruction 
   encoding, so the encoding of .init/.fini code has to match the encoding 
   of the remaining parts of the module concerned.

And regardless of the scenario chosen we want to keep the same binary 
modules built for either ISA without the need to rebuild any parts of 
them.

> And of course as you note elsewhere, this is an excellent time to
> have new toolchains stop using .init, as DT_INIT_ARRAY has none of
> these problems.

 Given the above I think we need it sooner rather than later.  Who's got 
the power to make it happen?

  Maciej

  reply	other threads:[~2013-01-28 21:06 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
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 [this message]
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=alpine.DEB.1.10.1301282042020.4409@tp.orcam.me.uk \
    --to=macro@codesourcery.com \
    --cc=cltang@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-ports@sourceware.org \
    --cc=rth@twiddle.net \
    --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).