This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: SH FDPIC ABI spec/binutils and kernel conflict on flag definitions
- From: Rich Felker <dalias at libc dot org>
- To: David Howells <dhowells at redhat dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, linux-sh at vger dot kernel dot org, binutils at sourceware dot org, Oleg Endo <oleg dot endo at t-online dot de>, Steven Miao <realmz6 at gmail dot com>
- Date: Thu, 10 Sep 2015 11:50:59 -0400
- Subject: Re: SH FDPIC ABI spec/binutils and kernel conflict on flag definitions
- Authentication-results: sourceware.org; auth=none
- References: <20150910145808 dot GN17773 at brightrain dot aerifal dot cx> <20150910033400 dot GM17773 at brightrain dot aerifal dot cx> <55F17015 dot 8090207 at redhat dot com> <23476 dot 1441899930 at warthog dot procyon dot org dot uk>
On Thu, Sep 10, 2015 at 04:45:30PM +0100, David Howells wrote:
> Rich Felker <dalias@libc.org> wrote:
>
> > > I think that adopting the kernel's behaviour as correct would set a
> > > dangerous precedent. A published ABI should be followed, and if the
> > > kernel does not implement it, then the kernel is wrong.
>
> The kernel practice is that once an ABI is set, even if it's actually
> implemented incorrectly, you cannot change it.
Is that applicable even in places where fixing it won't break
anything? Do you see a problem in my analysis concluding that it
won't?
If we have to fix it on the binutils (& documentation) side, every
existing binary will remain wrong and only new binaries will get text
sharing.
On the other hand, the only existing way to produce a binary that both
(1) needs constant displacement, and (2) actually gets constant
displacement from the kernel at load time, is to manually edit the ELF
headers to flip the bit. So I really doubt any such binaries exist. Do
you have a reason to believe they do?
Rich