This is the mail archive of the mailing list for the binutils 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: [RFC] Refactor elf_prpsinfo{32,64} structures

On Thu, Nov 15, 2012 at 8:18 PM, Sergio Durigan Junior
<> wrote:
> Hi,
> This patch is related to
> <>.
> Please take it with a ton of salt, since it's still an RFC and is not
> complete.  I have also not written a ChangeLog entry because I'd like to
> know others first.
> My first task was to extend the information being generated/recorded on
> prpsinfo structures on GNU/Linux.  When I started working on this, I
> noticed that the code is a bit confuse and perhaps does not do what it
> should.  For example, elf_x86_64_write_core_note on bfd/elf64-x86-64.c
> handles two cases for NT_PRPSINFO: elfclass is 32-bit or 64-bit.
> However, it never gets called (or at least I couldn't make it be called)
> for the 32-bit case, basically because elfcore_write_prpsinfo (at
> bfd/elf.c) will only call it when the class is 64-bit.

The 32-bit case does get called for x32 core.  That is how
gcore works on x32 process.   You can find more about x32

> That, and some other discrepancies made me rewrite some parts of the
> prpsinfo code to better handle the generation of such note on corefiles.
> The most important things that my patch adds are:
> 1) The creation of bfd/elf-psinfo.h, which now holds the declaration for
> elf_prpsinfo32 and elf_prpsinfo64.  This file is to be included on every
> architecture file (e.g. bfd/elf64-x86-64.c) that deals with prpsinfo
> things.

Whatever you do, please make sure that it works for x32.

BTW,  I think we should ELF core dump host-independent:

hosts/x86-64linux.h and hosts/i386linux.h should be target
files, not hosts.


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