267655 |
20-Jun-2014 |
gjb |
Remove svn:mergeinfo carried over from stable/9.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
267654 |
20-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
264506 |
15-Apr-2014 |
tijl |
MFC r237528:
Create a symlink to sys/elf32.h, sys/elf64.h, and sys/elf_common.h.
When building libelf in the bootstrap stage this would include the tree versions of, for example, sys/_types.h. This would work as long as the tree's version of this file was close enough to the system's version of the file. If, however, there was a change in the tree such that the location of a typedef was moved this would cause problems. In this case the version of sys/_types.h in the tree no longer defines __wchar_t and expects it to to be defined in machine/_types.h, however we pick up machine/_types.h from the system and find it is not defined there. The solution is to restrict the parts of sys er include from the tree to those that are needed.
This fixes the recent Tinderbox failure.
MFC r237531:
Add the sys directory we create to the list of items to clean.
MFC r238741:
Don't ever build files depending on the directory where they are placed in. It is obvious that its modification time will change with each such file builded. This bug cause whole libelf to rebuild itself each second make run (and relink that files on each first make run) in the loop.
|
251582 |
09-Jun-2013 |
markj |
MFC r247221: Merge part of r1712 from elftoolchain, making it possible to resize ELF sections and indirectly change the layout of an ELF file when ELF_F_LAYOUT is not set.
|
247724 |
03-Mar-2013 |
markj |
MFC r246978: - 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.
Approved by: rstone (co-mentor)
|
237216 |
18-Jun-2012 |
eadler |
MFC r233648: Remove trailing whitespace per mdoc lint warning
Approved by: cperciva (implicit)
|
235575 |
18-May-2012 |
gjb |
MFC r235286:
General mdoc(7) and typo fixes.
PR: 167734
|
229461 |
04-Jan-2012 |
eadler |
MFC r227458, r226436:
- change "is is" to "is" or "it is" - change "the the" to "the" - other typo fixes
Approved by: lstewart
|
225736 |
23-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
221598 |
07-May-2011 |
kaiw |
Document the behavior of `elf_getdata()` and `elf_rawdata()` with zero-sized ELF sections.
Obtained from: elftoolchain
|
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
|
221569 |
07-May-2011 |
obrien |
Add the ability to search for all the inlined instances of a given function.
Reviewed by: jb Obtained from: Juniper Networks
|
219210 |
02-Mar-2011 |
uqs |
Fix some duplicate-word typos in manpages.
Submitted by: arundel MFC after: 1 week
|
219126 |
01-Mar-2011 |
brucec |
Remove duplicate "in".
Suggested by: Rob Farmer <rfarmer at predatorlabs.net> MFC after: 3 days
|
219096 |
28-Feb-2011 |
brucec |
Revert some of r177626. "in in" is valid in certain sentences.
PR: 121490 MFC after: 3 days
|
217833 |
25-Jan-2011 |
kan |
Do not allocate buffer to hold data for zero-sized sections.
|
213573 |
08-Oct-2010 |
uqs |
mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
|
212373 |
09-Sep-2010 |
kaiw |
libelf is overly strict about the type and alignment of Elf_Data 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
|
211577 |
21-Aug-2010 |
rpaulo |
Don't link drti.o with libelf_pic.a. This means that all software with userland SDT probes must be linked with libelf explicitly.
Requested by: kib Sponsored by: The FreeBSD Foundation
|
211540 |
21-Aug-2010 |
rpaulo |
Install a PIC libelf. This will be needed by the DTrace runtime instrumentation object (dtri.o).
Sponsored by: The FreeBSD Foundation
|
211397 |
16-Aug-2010 |
joel |
Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while translating these manual pages. Minor corrections by me.
Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
|
211192 |
11-Aug-2010 |
kaiw |
Add translation support for section type SHT_SUNW_dof.
Submitted by: rpaulo MFC after: 2 weeks
|
210823 |
03-Aug-2010 |
joel |
Spelling fixes.
|
210559 |
28-Jul-2010 |
kaiw |
Protect GNUHASH translation functions with #ifdef; unbreak cross toolchain build.
Reported by: jchandra MFC after: 1 month
|
210353 |
21-Jul-2010 |
kaiw |
* Remove a superfluous error description. * Document an additional error that may be returned: `ELF_E_ARCHIVE`.
Obtained from: elftoolchain MFC after: 1 month
|
210352 |
21-Jul-2010 |
kaiw |
Add a cross-reference to `elf_rawfile(3)`.
Obtained from: elftoolchain MFC after: 1 month
|
210351 |
21-Jul-2010 |
kaiw |
* Note that ar(1) archives may also be opened using `elf_memory(3)`. * 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
|
210349 |
21-Jul-2010 |
kaiw |
Remove a redundant word.
Obtained from: elftoolchain MFC after: 1 month
|
210348 |
21-Jul-2010 |
kaiw |
Move helper functions `_libelf_ar_get_{name,number,string}()` and `_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
|
210347 |
21-Jul-2010 |
kaiw |
Fix a memory leak.
Obtained from: elftoolchain MFC after: 1 month
|
210345 |
21-Jul-2010 |
kaiw |
* Deprecate `elf_getshnum()`, `elf_getphnum()` and `elf_getshstrndx()` in 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
|
210344 |
21-Jul-2010 |
kaiw |
Avoid switching between "unsigned char" and "char" in the C code generated from "libelf_convert.m4".
Obtained from: elftoolchain MFC after: 1 month
|
210341 |
21-Jul-2010 |
kaiw |
Add support for translating sections of type ELF_T_GNUHASH.
Obtained from: elftoolchain MFC after: 1 month
|
210340 |
21-Jul-2010 |
kaiw |
- Document that the *fsize() functions return a size of 1 for Elf 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
|
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
|
210336 |
21-Jul-2010 |
kaiw |
Reduce verbosity.
Obtained from: elftoolchain MFC after: 1 month
|
210335 |
21-Jul-2010 |
kaiw |
- Return zero for file sizes of ELF types that have a variable size. - Neaten a few comments.
Obtained from: elftoolchain MFC after: 1 month
|
210333 |
21-Jul-2010 |
kaiw |
Note that the *_fsize() functions are only defined for ELF types that have a fixed size.
Obtained from: elftoolchain MFC after: 1 month
|
210332 |
21-Jul-2010 |
kaiw |
Changes for supporting GNU Hash sections.
Obtained from: elftoolchain MFC after: 1 month
|
210331 |
21-Jul-2010 |
kaiw |
Add a new ELF type denoting GNU style hash tables.
Obtained from: elftoolchain MFC after: 1 month
|
210330 |
21-Jul-2010 |
kaiw |
Allow an application that updates only the ELF Ehdr to work.
Obtained from: elftoolchain MFC after: 1 month
|
210329 |
21-Jul-2010 |
kaiw |
Use <unistd.h> to declare the prototype for ftruncate().
Obtained from: elftoolchain MFC after: 1 month
|
210328 |
21-Jul-2010 |
kaiw |
Bug fix: permit the creation of zero-sized sections.
Obtained from: elftoolchain MFC after: 1 month
|
210326 |
21-Jul-2010 |
kaiw |
Improve compatibility with other implementations of the ELF(3) API: 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
|
210325 |
21-Jul-2010 |
kaiw |
Bug fix: when updating headers using the gelf_update_*() functions, the appropriate `dirty' bit needs to be set for both the Elf32 and Elf64 case.
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
|
210321 |
21-Jul-2010 |
kaiw |
Remove a superfluous comment.
Obtained from: elftoolchain MFC after: 1 month
|
209122 |
13-Jun-2010 |
kaiw |
* Improve compatibility with existing application code by permitting the 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
|
207942 |
11-May-2010 |
uqs |
mdoc: fix parenthesis
Reviewed by: brueffer
|
206622 |
14-Apr-2010 |
uqs |
mdoc: order prologue macros consistently by Dd/Dt/Os
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)
|
202159 |
12-Jan-2010 |
brueffer |
Remove useless .TE groff macro.
Submitted by: Joerg Sonnenberger MFC after: 3 days
|
201381 |
02-Jan-2010 |
ed |
Build lib/ with WARNS=6 by default.
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.
|
189721 |
12-Mar-2009 |
obrien |
Don't need to set symbol, default value is OK.
|
186758 |
05-Jan-2009 |
jkoshy |
Add a README.
|
179241 |
23-May-2008 |
jb |
Relax the strict type check because gcc as distributed doesn't create 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.
|
179240 |
23-May-2008 |
jb |
Change the alignment of the NOTE to match what gcc does.
|
179239 |
23-May-2008 |
jb |
Add the case for SHT_AMD64_UNWIND.
|
177626 |
26-Mar-2008 |
brueffer |
Fix some "in in" typos in comments.
PR: 121490 Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com> Approved by: rwatson (mentor), jkoshy MFC after: 3 days
|
177367 |
19-Mar-2008 |
jkoshy |
Ensure that the section header table is written out in an order consistent with the section indices returned to the application by elf_ndxscn().
Submitted by: kaiw
|
177366 |
19-Mar-2008 |
jkoshy |
Clarify that the ELF library only sets the sh_entsize field of a section header entry if the application is not taking charge of ELF object layout.
Update (c) years, and bump the manual page's date.
Submitted by: kaiw
|
176758 |
03-Mar-2008 |
jkoshy |
- Fix an off-by-one bug in _libelf_insert_section(). [1] - Update (c) years.
Submitted by: kaiw [1]
|
176727 |
02-Mar-2008 |
jkoshy |
Translate the r_info field of ELF relocation records when converting between 64 and 32 bit variants.
Submitted by: kaiw
|
175973 |
04-Feb-2008 |
jkoshy |
Document the return type for gelf_fsize(3).
Submitted by: kaiw
|
173924 |
26-Nov-2007 |
jkoshy |
- Allow source descriptors with no data to be used as arguments to the elf{32,64}_xlateto[fm]() translation functions. This change makes our libelf compatible with other ELF(3) implementations. [1] - Update manual page to reflect this change. - Style fixes: wrap a long line.
Submitted by: jb [1]
|
173869 |
23-Nov-2007 |
jkoshy |
Sections of type SHT_GNU_versym use ELF type ELF_T_HALF. Update manual page and code to match.
Submitted by: jb MFC After: 1 day
|
172861 |
22-Oct-2007 |
jkoshy |
Consistently use the word 'flag' to refer to ELF_F_* constants.
MFC after: 1 day
|
172848 |
21-Oct-2007 |
jkoshy |
Remove references to the 'e_phnum' field of the ELF header. Instead, point the reader to the elf_getphnum() function.
MFC after: 1 day
|
172846 |
21-Oct-2007 |
jkoshy |
Refer the reader to the elf_update(3) manual page for more information on application control of ELF object layout.
MFC after: 1 day
|
172099 |
09-Sep-2007 |
jkoshy |
Do not generate unneeded initializers.
Approved by: re (bmah)
|
172088 |
08-Sep-2007 |
jkoshy |
Fix a bug that prevented applications from laying out ELF objects 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)
|
171641 |
28-Jul-2007 |
jkoshy |
Cross-reference the correct manual page.
Approved by: re (bmah)
|
169092 |
29-Apr-2007 |
deischen |
Use C comments since we now preprocess these files with CPP.
|
167932 |
27-Mar-2007 |
jkoshy |
Describe the contents of the "ar_name" and "ar_rawname" fields of Elf_Arhdr structures better.
|
167930 |
27-Mar-2007 |
jkoshy |
Bug fixes to ar(1) archive handling: - Correctly retrieve the initial (special) members of an archive after an archive descriptor is rewound using elf_rand(SARMAG). - Do not strip trailing white space from the 'raw' names retrieved using elf_getarhdr().
Reported by: "Hyo geol, Lee" <hyogeollee at gmail dot com>
|
167901 |
26-Mar-2007 |
jkoshy |
Document the return type of elf_rand(3) correctly.
|
167687 |
19-Mar-2007 |
jkoshy |
Correct a typo.
Submitted by: Kai Wang <kaiw27 at gmail dot com>
|
167315 |
08-Mar-2007 |
jkoshy |
Add GELF_* accessor macros.
Prodded by: Sam Arun Raj <samarunraj at gmail dot com>
|
167183 |
03-Mar-2007 |
jkoshy |
Fix a typo.
Submitted by: Kai Wang <kaiw27 at gmail dot com>
|
166863 |
21-Feb-2007 |
dumbbell |
Fix a bug with the release of section's raw data. Both release loops were using translated data linked list, leading to a memory leak.
Jkoshy's testsuite was used to check for non-regression.
|
165536 |
25-Dec-2006 |
jkoshy |
Document the additional error returns possible when handling ELF objects that require extended numbering.
|
165535 |
25-Dec-2006 |
jkoshy |
Keep shadow copies of the `e_shnum', `e_phnum' and `e_shstrndx' 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]
|
165534 |
25-Dec-2006 |
jkoshy |
Use strncpy() instead of strlcpy() when copying members of a `struct ar_hdr'. These members do not use NUL-termination while strlcpy() expects its source buffer to be NUL-terminated.
|
165523 |
24-Dec-2006 |
jkoshy |
Correct a logic error.
|
165317 |
18-Dec-2006 |
jkoshy |
Use <osreldate.h> rather than the OS version reported by the kernel to determine which Elf Types are to be handled. Change the M4 templates to wrap an `#if __FreeBSD_version >= NNN'/`#endif' pair around the generated code for each ELF data type, where `NNN' is the OS version where the ELF type was added to the source tree.
This change allows cross-builds of old sources on newer FreeBSD systems to work correctly.
Problem reported by: ru
|
165316 |
18-Dec-2006 |
jkoshy |
Use the correct value of __FreeBSD_version.
|
165283 |
16-Dec-2006 |
jkoshy |
Fix a typo.
|
165178 |
13-Dec-2006 |
jkoshy |
Name the functions documented by this manual page correctly.
|
165093 |
11-Dec-2006 |
jkoshy |
Document the ELF types supported by libelf.
Document the relationship between section types (SHT_*) and the types known to the libelf.
|
165032 |
09-Dec-2006 |
jkoshy |
Make the generated message from `elf_errmsg(-1)' a little more readable.
|
164577 |
24-Nov-2006 |
ru |
- style: use `=' instead of `+=' for initial assignments.
- don't add generated sources' objects to OBJS explicitly; GENSRCS is part of SRCS so they were already in OBJS.
|
164253 |
13-Nov-2006 |
ru |
Fix minor formatting issues:
- make document title match filename; - remove hard sentence breaks, whitespace at EOL, and double whitespace; - sort SEE ALSO xrefs, adding missing section numbers; - fix a misspelled macro name.
|
164225 |
12-Nov-2006 |
jkoshy |
- Replace the use of DPSRCS with something more appropriate. DPSRCS is for when you need something in ".depend", but not compiled in. - Style fixes: Spell ${.OBJDIR} as ".". - Neaten a comment.
Submitted by: ru
|
164190 |
11-Nov-2006 |
jkoshy |
MFP4: Add an implementation of the ELF(3) and GELF(3) API set.
Bump __FreeBSD_version.
Reviewed by: jb
|