This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Add x32_corenote.c


On Thu, Mar 26, 2015 at 4:16 AM, Mark Wielaard <mjw@redhat.com> wrote:
> On Tue, 2015-03-24 at 07:45 -0700, H.J. Lu wrote:
>> On Tue, Mar 24, 2015 at 6:48 AM, Mark Wielaard <mjw@redhat.com> wrote:
>> > I don't see a gabi processor supplement for x32 here:
>> > http://refspecs.linuxbase.org/elf/index.html
>> > Do you know where it is kept?
>>
>> http://www.x86-64.org/svn/trunk/x86-64-ABI/
>
> Aha, it really is just ILP32 for x86_64. The only really tricky part
> seems to make sure you zero-extend any 32bit addresses. Thanks.

That is correct.

>> > Are there any distros using x32 to run some tests on?
>>
>> Ubuntu 14.02.
>
> I am not too familiar with Ubuntu. Do you happen to have a direct
> download link for the specific installer to use? Does it have a full x32
> user land and toolchain that defaults to it, or do you need to install

http://www.ubuntu.com/download/desktop/

> or configure anything specific to get a x32 setup?

You need to install x32 glibc, similar to building and running
i686 binary on x86-64.

>> > Is x32 really completely similar to x86_64 to not need its own
>> > backend/x32_init.c? I am surprised all of the other backend hooks don't
>> > need similar tweaks to the core_note one.
>>
>> X32 is very similar to x86-64.  The main difference is ELF class.
>> All other backends similar x32 have
>>
>> ppc64_corenote.c:#include "ppc_corenote.c"
>> s390x_corenote.c:#include "s390_corenote.c"
>> sparc64_corenote.c:#include "sparc_corenote.c"
>
> Yes, but for ppc and ppc64 for example are separate backends that just
> happen to share some of the backend hooks. And s390 does hook more than
> just corenote differently between the 32 and 64 classes. I was just
> surprised only corenote needed to be tweaked for x32 and nothing else.
>
> But I guess it really is just x86_64 with zero-extended 32bit addresses,
> so almost everything really is the same.

That is correct.


-- 
H.J.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]