This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: Add 32bit x86-64 support to binutils
- From: "H. Peter Anvin" <hpa at zytor dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Jan Beulich <JBeulich at novell dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, gcc at gcc dot gnu dot org, binutils at sourceware dot org
- Date: Tue, 04 Jan 2011 10:35:42 -0800
- Subject: Re: RFC: Add 32bit x86-64 support to binutils
- References: <20101230182308.GA21296@intel.com> <Pine.LNX.4.64.1012301831270.30514@digraph.polyomino.org.uk> <AANLkTi=5rp8+1_h=Bt-FLnVW0mDY6N_tLb020XHr4d1n@mail.gmail.com> <Pine.LNX.4.64.1012301905400.30514@digraph.polyomino.org.uk> <AANLkTik6qXqKC8tEizXo1GrvEa7x9UGYaApN1n78Fa-b@mail.gmail.com> <AANLkTimUbL99QQaoAgaBHGctgtTurybP1DEjN8YbNXRt@mail.gmail.com> <4D21B5C1020000780002A0BC@vpn.id2.novell.com> <AANLkTikfLejXiegNNpgEgNQv5=pR8ZNy8zhF3Z0Z1tWR@mail.gmail.com>
On 01/04/2011 09:56 AM, H.J. Lu wrote:
>>
>> I think it is a gross misconception to tie the ABI to the ELF class of
>> an object. Specifying the ABI should imo be done via e_flags or
>> one of the unused bytes of e_ident, and in all reality the ELF class
>> should *only* affect the file layout (and 64-bit should never have
>> forbidden to use 32-bit ELF containers; similarly 64-bit ELF objects
>> may have uses for 32-bit architectures/ABIs, e.g. when debug
>> information exceeds the 4G boundary).
>
> I agree with you in principle. But I think it should be done via
> a new attribute section, similar to ARM.
>
Oh god, please, no.
I have to say I'm highly questioning to Jan's statement in the first
place. Crossing 32- and 64-bit ELF like that sounds like a kernel
security hole waiting to happen.
-hpa