summaryrefslogtreecommitdiffstats
path: root/lib/libelf
Commit message (Collapse)AuthorAgeFilesLines
* Document the behavior of `elf_getdata()` and `elf_rawdata()` withkaiw2011-05-071-4/+5
| | | | | | zero-sized ELF sections. Obtained from: elftoolchain
* 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
* Add the ability to search for all the inlined instances of a given function.obrien2011-05-072-1/+3
| | | | | Reviewed by: jb Obtained from: Juniper Networks
* Fix some duplicate-word typos in manpages.uqs2011-03-021-1/+1
| | | | | Submitted by: arundel MFC after: 1 week
* Remove duplicate "in".brucec2011-03-011-1/+1
| | | | | Suggested by: Rob Farmer <rfarmer at predatorlabs.net> MFC after: 3 days
* Revert some of r177626. "in in" is valid in certain sentences.brucec2011-02-281-1/+1
| | | | | PR: 121490 MFC after: 3 days
* Do not allocate buffer to hold data for zero-sized sections.kan2011-01-251-1/+3
|
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-081-1/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* 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
* Don't link drti.o with libelf_pic.a. This means that all software withrpaulo2010-08-211-1/+0
| | | | | | | userland SDT probes must be linked with libelf explicitly. Requested by: kib Sponsored by: The FreeBSD Foundation
* Install a PIC libelf. This will be needed by the DTrace runtimerpaulo2010-08-211-0/+1
| | | | | | instrumentation object (dtri.o). Sponsored by: The FreeBSD Foundation
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whilejoel2010-08-161-2/+2
| | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
* Add translation support for section type SHT_SUNW_dof.kaiw2010-08-111-0/+2
| | | | | Submitted by: rpaulo MFC after: 2 weeks
* Spelling fixes.joel2010-08-031-1/+1
|
* Protect GNUHASH translation functions with #ifdef; unbreak crosskaiw2010-07-281-0/+4
| | | | | | | toolchain build. Reported by: jchandra MFC after: 1 month
* * Remove a superfluous error description.kaiw2010-07-211-7/+5
| | | | | | | * Document an additional error that may be returned: `ELF_E_ARCHIVE`. Obtained from: elftoolchain MFC after: 1 month
* Add a cross-reference to `elf_rawfile(3)`.kaiw2010-07-211-2/+3
| | | | | Obtained from: elftoolchain MFC after: 1 month
* * Note that ar(1) archives may also be opened using `elf_memory(3)`.kaiw2010-07-212-6/+10
| | | | | | | | * Ignore the passed in value of the `fd` argument for ar(1) archives opened with elf_memory(3). Obtained from: elftoolchain MFC after: 1 month
* Remove a redundant word.kaiw2010-07-211-2/+2
| | | | | Obtained from: elftoolchain MFC after: 1 month
* Move helper functions `_libelf_ar_get_{name,number,string}()` andkaiw2010-07-214-212/+258
| | | | | | | | | `_libelf_ar_open()` to a new compilation unit "libelf_ar_util.c" to break the circular dependency between "elf_memory.o" and "libelf_ar.o". Obtained from: elftoolchain MFC after: 1 month
* Fix a memory leak.kaiw2010-07-211-2/+4
| | | | | Obtained from: elftoolchain MFC after: 1 month
* * Deprecate `elf_getshnum()`, `elf_getphnum()` and `elf_getshstrndx()` inkaiw2010-07-2112-26/+336
| | | | | | | | | | | | favour of `elf_getshdrnum()`, `elf_getphdrnum()` and `elf_getshdrstrndx()` respectively. * Add new manual pages for `elf_getshdrstrndx()`, `elf_getphdrnum()` and `elf_getshdrnum()`. * Add a deprecation warning for `elf_getshstrndx()`, `elf_getphnum()` and `elf_getshnum()`. Obtained from: elftoolchain MFC after: 1 month
* Avoid switching between "unsigned char" and "char" in the C codekaiw2010-07-211-22/+22
| | | | | | | generated from "libelf_convert.m4". Obtained from: elftoolchain MFC after: 1 month
* Add support for translating sections of type ELF_T_GNUHASH.kaiw2010-07-212-2/+208
| | | | | Obtained from: elftoolchain MFC after: 1 month
* - Document that the *fsize() functions return a size of 1 for Elfkaiw2010-07-214-12/+10
| | | | | | | | | | types that don't have a fixed size. - The *fsize() functions should return a size of 1, for variable length types. - Redefine symbol ELF_T_LAST to match the current end of the list. Obtained from: elftoolchain MFC after: 1 month
* Perform additional checks when translating between file and memorykaiw2010-07-217-65/+114
| | | | | | | | | | | | | | | | | | | 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
* Reduce verbosity.kaiw2010-07-211-2/+2
| | | | | Obtained from: elftoolchain MFC after: 1 month
* - Return zero for file sizes of ELF types that have a variable size.kaiw2010-07-211-6/+9
| | | | | | | - Neaten a few comments. Obtained from: elftoolchain MFC after: 1 month
* Note that the *_fsize() functions are only defined for ELF types thatkaiw2010-07-211-0/+7
| | | | | | | have a fixed size. Obtained from: elftoolchain MFC after: 1 month
* Changes for supporting GNU Hash sections.kaiw2010-07-213-2/+14
| | | | | Obtained from: elftoolchain MFC after: 1 month
* Add a new ELF type denoting GNU style hash tables.kaiw2010-07-211-0/+1
| | | | | Obtained from: elftoolchain MFC after: 1 month
* Allow an application that updates only the ELF Ehdr to work.kaiw2010-07-213-7/+8
| | | | | Obtained from: elftoolchain MFC after: 1 month
* Use <unistd.h> to declare the prototype for ftruncate().kaiw2010-07-211-0/+1
| | | | | 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
* Bug fix: when updating headers using the gelf_update_*() functions,kaiw2010-07-213-6/+6
| | | | | | | | the appropriate `dirty' bit needs to be set for both the Elf32 and Elf64 case. Obtained from: elftoolchain MFC after: 1 month
* - Correctly handle sections of type SHT_NOBITS. For these sections:kaiw2010-07-212-19/+52
| | | | | | | | | | | | - 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
* Remove a superfluous comment.kaiw2010-07-211-1/+0
| | | | | Obtained from: elftoolchain MFC after: 1 month
* * Improve compatibility with existing application code by permitting thekaiw2010-06-132-13/+19
| | | | | | | | | | | use of `elf_getbase()` on non-archive members. This change is needed for gcc LTO (-flto) to work properly. * Style fix: paranthesize returned values. * Document the current behaviour of `elf_getbase()`. Tested by: gerald, Steve Kargl (original patch) Obtained from: elftoolchain MFC after: 3 days
* mdoc: fix parenthesisuqs2010-05-111-2/+4
| | | | Reviewed by: brueffer
* mdoc: order prologue macros consistently by Dd/Dt/Osuqs2010-04-1444-44/+44
| | | | | | | | Although groff_mdoc(7) gives another impression, this is the ordering most widely used and also required by mdocml/mandoc. Reviewed by: ru Approved by: philip, ed (mentors)
* Remove useless .TE groff macro.brueffer2010-01-121-1/+0
| | | | | Submitted by: Joerg Sonnenberger MFC after: 3 days
* Build lib/ with WARNS=6 by default.ed2010-01-021-2/+0
| | | | | | | | | Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway.
* Don't need to set symbol, default value is OK.obrien2009-03-121-1/+1
|
* Add a README.jkoshy2009-01-051-0/+12
|
* Relax the strict type check because gcc as distributed doesn't createjb2008-05-231-1/+1
| | | | | debug strtabs with type SHT_STRTAB. Although we could change FreeBSD's gcc, we really need to play nicely with gcc as distributed by the FSF.
* Change the alignment of the NOTE to match what gcc does.jb2008-05-231-1/+1
|
* Add the case for SHT_AMD64_UNWIND.jb2008-05-231-0/+2
|
* Fix some "in in" typos in comments.brueffer2008-03-261-1/+1
| | | | | | | PR: 121490 Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com> Approved by: rwatson (mentor), jkoshy MFC after: 3 days
* 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
OpenPOWER on IntegriCloud