[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.4 BFD ELF core files

On native ELF Unix systems, core files are generated without any sections. Instead, they only have program segments.

When BFD is used to read an ELF core file, the BFD sections will actually represent program segments. Since ELF program segments do not have names, BFD will invent names like `segmentn' where n is a number.

A single ELF program segment may include both an initialized part and an uninitialized part. The size of the initialized part is given by the `p_filesz' field. The total size of the segment is given by the `p_memsz' field. If `p_memsz' is larger than `p_filesz', then the extra space is uninitialized, or, more precisely, initialized to zero.

BFD will represent such a program segment as two different sections. The first, named `segmentna', will represent the initialized part of the program segment. The second, named `segmentnb', will represent the uninitialized part.

ELF core files store special information such as register values in program segments with the type `PT_NOTE'. BFD will attempt to interpret the information in these segments, and will create additional sections holding the information. Some of this interpretation requires information found in the host header file `sys/procfs.h', and so will only work when BFD is built on a native system.

BFD does not currently provide any way to create an ELF core file. In general, BFD does not provide a way to create core files. The way to implement this would be to write `bfd_set_format' and `bfd_write_contents' routines for the `bfd_core' type; see 3.3 Format type dependent functions.



This document was generated by system on December, 2 2004 using texi2html