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.J. Lu" <hjl dot tools at gmail dot com>
- To: "H. Peter Anvin" <hpa at zytor dot com>
- Cc: Robert Millan <rmh at gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>, binutils at sourceware dot org, gcc at gcc dot gnu dot org
- Date: Sat, 15 Jan 2011 13:01: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> <AANLkTineXWqr6F-NM3MZnznXq5vV53acAojpXUVh=Fhg@mail.gmail.com> <4D1D26EA.7020505@zytor.com> <AANLkTi=ju3fwpQb95Yp_94WxOvbN4egj+ENXARf7L1aG@mail.gmail.com> <AANLkTikzNjtzMto6eLWqrWUn8rycpevT+pVqWjz5Oa=K@mail.gmail.com> <AANLkTingdtz_WZ9cRahBC234AnYCp6RV6NPuxp48gnN_@mail.gmail.com>
On Fri, Jan 14, 2011 at 3:46 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Dec 31, 2010 at 6:50 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Thu, Dec 30, 2010 at 4:48 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Thu, Dec 30, 2010 at 4:42 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>>>> On 12/30/2010 01:08 PM, Robert Millan wrote:
>>>>> Hi folks,
>>>>>
>>>>> I had this unsubmitted patch in my local filesystem. ?It makes Linux
>>>>> detect ELF32 AMD64 binaries and sets a flag to restrict them to
>>>>> 32-bit address space.
>>>>>
>>>>> It's not rocket science but can save you some work in case you
>>>>> haven't implemented this already.
>>>>>
>>>>
>>>> I have pushed my old kernel patches to a git tree at:
>>>>
>>>> git://git.kernel.org//pub/scm/linux/kernel/git/hpa/linux-2.6-ilp32.git
>>>>
>>>> They are currently based on 2.6.31 since that was the released version
>>>> when I first did this work; they are not intended to be mergeble but
>>>> rather as a prototype.
>>>>
>>>> Note that we have no intention of supporting this ABI for the kernel
>>>> itself. ?The kernel will be a normal x86-64 kernel.
>>>>
>>>
>>> Here is the updated ILP32 patch for 2.6.35.
>>>
>>>
>>
>> I put my ILP32 gdb on hjl/ilp32 branch at
>>
>> http://git.kernel.org/?p=devel/gdb/hjl/x86.git;a=summary
>>
>> and my gcc 4.4 ILP32 on hjl/ilp32/gcc-4_4-branch branch at
>>
>> http://git.kernel.org/?p=devel/gcc/hjl/x86.git;a=summary
>>
>
> I checked a bunch ILP32 bug fixes into binutils, gdb and gcc.
> I also renamed the option from n32 to x32.
>
> Binutils and gdb should work correctly now. I tested them on
> a simple C library with static and dynamic binaries. ?Gcc only
> works with -O0.
I put a small C library for x32 at
http://git.kernel.org/?p=devel/binutils/hjl/x32.git;a=summary
--
H.J.