History log of /freebsd-10-stable/lib/libelf/elf_data.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 246978 19-Feb-2013 markj

- Make sure to set an error code when trying to obtain a data descriptor for
a section of type SHT_NULL.
- Update the man page to reflect the fact that elf_getdata() and
elf_rawdata() may return with an error of ELF_E_SECTION.

PR: bin/175491
Approved by: emaste (co-mentor)
MFC after: 1 week


# 221595 07-May-2011 kaiw

For zero-sized sections, set the `d_buf` field of the `Elf_Data`
descriptor returned by `elf_rawdata()` to NULL.

Obtained from: elftoolchain


# 217833 25-Jan-2011 kan

Do not allocate buffer to hold data for zero-sized sections.


# 210338 21-Jul-2010 kaiw

Perform additional checks when translating between file and memory
representations of ELF types.

The ELF(3) API allows applications to request a conversion that is
`in-place', i.e., with source and destinations data buffers being
the same. However, the file and memory sizes of ELF sections that
have additional internal structure, such as those of type `Elf_Note',
or `Elf_GNU_Hash_Header', can be determined only known after the
type-specific headers that comprise the first few words in these
sections are read and translated.

Pass in the size of destination buffer to type translation routines
in "libelf_convert.m4" and have these routines return an error code
if the translated data would not fit inside the destination buffer.

Obtained from: elftoolchain
MFC after: 1 month


# 210324 21-Jul-2010 kaiw

- Correctly handle sections of type SHT_NOBITS. For these sections:
- elf_getdata() and elf_rawdata() should return an "Elf_Data" structure
that has its "d_buf" member set to NULL and "d_size" member set to
the nominal 'size' of the section. [1]
- Update the manual page for these functions.
- Fix a memory leak in an error handling path inside elf_getdata().
- Use _libelf_allocate_data() in elf_newdata() for consistency.

Obtained from: elftoolchain
MFC after: 1 month


# 167687 19-Mar-2007 jkoshy

Correct a typo.

Submitted by: Kai Wang <kaiw27 at gmail dot com>


# 164190 11-Nov-2006 jkoshy

MFP4: Add an implementation of the ELF(3) and GELF(3) API set.

Bump __FreeBSD_version.

Reviewed by: jb