summaryrefslogtreecommitdiffstats
path: root/lib/libelf/elf_update.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge part of r1712 from elftoolchain, making it possible to resize ELFmarkj2013-02-241-127/+181
| | | | | | | | | | sections and indirectly change the layout of an ELF file when ELF_F_LAYOUT is not set. PR: bin/167103 Approved by: rstone (co-mentor) Obtained from: elftoolchain MFC after: 2 weeks
* libelf is overly strict about the type and alignment of Elf_Datakaiw2010-09-091-11/+6
| | | | | | | | | | | | | | objects inside one ELF section, which prevents the creation of a ELF section with mixed data types. For example, gcc LTO use libelf to create a .gnu_lto_XXX section that contains integers and a string table, which doesn't work with our libelf implementation. The changes made in this commit include: * Allow Elf_Data type to be different than section type. * Relax Elf_Data alignment check. * Align each Elf_Data by their own alignment instead of section alignment. MFC after: 1 month
* Fix a memory leak.kaiw2010-07-211-2/+4
| | | | | Obtained from: elftoolchain MFC after: 1 month
* Allow an application that updates only the ELF Ehdr to work.kaiw2010-07-211-6/+6
| | | | | Obtained from: elftoolchain MFC after: 1 month
* Bug fix: permit the creation of zero-sized sections.kaiw2010-07-211-5/+7
| | | | | Obtained from: elftoolchain MFC after: 1 month
* Improve compatibility with other implementations of the ELF(3) API:kaiw2010-07-211-2/+2
| | | | | | | | when an output file has no program headers, set the 'e_phentsize' field of the ELF executable header to zero. Obtained from: elftoolchain MFC after: 1 month
* Remove a superfluous comment.kaiw2010-07-211-1/+0
| | | | | Obtained from: elftoolchain MFC after: 1 month
* Ensure that the section header table is written out in an orderjkoshy2008-03-191-3/+2
| | | | | | | consistent with the section indices returned to the application by elf_ndxscn(). Submitted by: kaiw
* - Fix an off-by-one bug in _libelf_insert_section(). [1]jkoshy2008-03-031-5/+11
| | | | | | - Update (c) years. Submitted by: kaiw [1]
* Fix a bug that prevented applications from laying out ELF objectsjkoshy2007-09-081-17/+44
| | | | | | | | | | | | | with section header tables residing in between other sections. Introduce additional checks for overlaps between section data and the section header table when the application is performing section layout. Document additional error returns. Reported by: Kai Wang <kaiw27 at gmail dot com> Approved by: re (rwatson)
* Keep shadow copies of the `e_shnum', `e_phnum' and `e_shstrndx'jkoshy2006-12-251-7/+11
| | | | | | | | | | | | | | | members of the ELF Executable Header inside the library-private `struct _Elf' descriptor and only update the underlying Elf{32,64}_Ehdr structure on an elf_update(3) call. These fields of the Ehdr structure are technically `out of bounds' for an application program per the ELF(3) API, but we've seen applications that initialize a new Ehdr structure using memcpy(), messing up the library's invariants. [1] Implement elf_getphnum() and handle ELF objects with more than 64K program header table entries. Reported by: jb [1]
* MFP4: Add an implementation of the ELF(3) and GELF(3) API set.jkoshy2006-11-111-0/+880
Bump __FreeBSD_version. Reviewed by: jb
OpenPOWER on IntegriCloud