PATCH: Add x32_corenote.c

H.J. Lu hjl.tools at gmail.com
Wed Mar 25 16:37:17 UTC 2015


On Tue, Mar 24, 2015 at 7:45 AM, H.J. Lu <hjl.tools at gmail.com> wrote:
> On Tue, Mar 24, 2015 at 6:48 AM, Mark Wielaard <mjw at redhat.com> wrote:
>> On Thu, 2015-03-12 at 15:03 -0700, H.J. Lu wrote:
>>> This patch adds x32_corenote.c to support x32 coredump.  X32 coredump is
>>> a hybrid between ia32 coredump and x86-64 coredump.  The exact formats
>>> are described in bfd/hosts/x86-64linux.h in GNU binutils source tree.
>>
>> So i386 uses EM_386 and ELFCLASS32. x86_64 uses EM_X86_64 and ELFCLASS32
>> and x32 also uses EM_X86_64 but with ELFCLASS32? Are there any other
>
> x86_64 uses EM_X86_64 with ELFCLASS64.  x32  uses EM_X86_64
> with ELFCLASS32.
>
>> differences in ident or other ehdr identifiers?
>>
>> Will a x86_64 GNU/Linux setup always support x86_64 and one or both of
>> i386 and x32?
>
> x86_64 GNU/Linux will always support x86-64.  i386 and x32 support
> is optional.
>
>> 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/
>
>> Are there any distros using x32 to run some tests on?
>
> Ubuntu 14.02.
>
>> If you want to make sure that x32 is correctly supported (also cross
>> arch) then you might want to provide a couple of test cases and binaries
>> for things like tests/run-readelf-mixed-corenote.sh,
>> tests/run-allregs.sh, run-strip-reloc.sh, run-addrcfi.sh,
>> tests/run-backtrace-core-x32.sh, etc. The files should have a little
>> description how to generate the test binaries. Don't feel obliged to add
>> tests for everything at once (adding one test at a time is preferred).
>> But it would help making sure the arch is properly supported (even if
>> the test as is just passes without needing any new backend tweaks).
>
> I will add those.
>
>> A ChangeLog entry would make review of patches easier. It is also needed
>> to get this checked in.

Here is the updated patch.  Testcases will be sent separately.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-x32_corenote.c.patch
Type: text/x-patch
Size: 6361 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20150325/fd821ce7/attachment-0001.bin>


More information about the elfutils-devel mailing list