This is the mail archive of the binutils@sources.redhat.com 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]

[RFC] Cross core support


In bfd/elf.c, there's a set of code to synthesize register sections and the
like based on the NOTE sections of an ELF core dump.  It depends on the
contents of <sys/procfs.h>, so it's never compiled in except natively.

Supplying the information needed to recognize at least all Linux ELF core
dumps is straightforward; all it needs is a couple of offsets into the
elf_prstatus and elf_prpsinfo structures.  The question becomes, how can I
give BFD this information in a sufficiently abstracted manner?

My inclination is to provide a table for each note type of the total size of
the note structure on a particular platform and the offsets of the fields we
are interested in.  It seems very unlikely that we would find two notes of
the same type and the same size on different platforms where all the fields
we want did not correspond.  However, that solution's a little hokey.

Does anyone know of a counterexample, or a better way to provide the
necessary information?  I suppose it could use a hook in target-specific
files of BFD, but I'd rather avoid that, since I suppose it would need to be
added to the bfd vector in that case.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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