summaryrefslogtreecommitdiffstats
path: root/lib/libelf/elf_data.c
Commit message (Collapse)AuthorAgeFilesLines
* - Make sure to set an error code when trying to obtain a data descriptor formarkj2013-02-191-2/+6
| | | | | | | | | | 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
* For zero-sized sections, set the `d_buf` field of the `Elf_Data`kaiw2011-05-071-1/+2
| | | | | | descriptor returned by `elf_rawdata()` to NULL. Obtained from: elftoolchain
* Do not allocate buffer to hold data for zero-sized sections.kan2011-01-251-1/+3
|
* Perform additional checks when translating between file and memorykaiw2010-07-211-4/+9
| | | | | | | | | | | | | | | | | | | 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
* - Correctly handle sections of type SHT_NOBITS. For these sections:kaiw2010-07-211-18/+25
| | | | | | | | | | | | - 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
* Correct a typo.jkoshy2007-03-191-3/+3
| | | | Submitted by: Kai Wang <kaiw27 at gmail dot com>
* MFP4: Add an implementation of the ELF(3) and GELF(3) API set.jkoshy2006-11-111-0/+224
Bump __FreeBSD_version. Reviewed by: jb
OpenPOWER on IntegriCloud