| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
| |
If there is no e_phoff e_phnum cannot be trusted. Extended phnum can only
be gotten if we have an actual section table and a shdr for section zero,
Extended phnum can be too large to fit in the file (or a size_t).
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
| |
Since ELF notes need to be properly aligned they can include padding.
Make sure the padding itself and the padding calculation doesn't overflow.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
| |
On 32bit arches size_t is too small to do size and overflow checks
of 64bit ELF files. Use the actual Elf64 types to make sure checks
on 64bit ELF files are done correctly on 32bit arches.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
| |
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
|
| |
|
|
|
|
|
| |
We were using mempcpy everywhere else, only __libelf_next_arhdr_wrlock used
__mempcpy.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
| |
Reported-by: Hanno Böck <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The problem this is trying to solve can be seen for example thus:
$ eu-readelf -a /
eu-readelf: failed reading '/': (null)
With the fix we see a proper error number and get a reasonable error
message:
$ eu-readelf -a /
eu-readelf: failed reading '/': invalid file descriptor
Signed-off-by: Petr Machata <[email protected]>
|
| |
|
|
|
|
|
| |
Includes new bits needed for ppc64le ELFv2 abi.
https://bugzilla.redhat.com/show_bug.cgi?id=1110249
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
The --enable-mudflap configure build has been broken for 2 years without
anybody apparently noticing. GCC 4.9 removed mudflap support. Before
release we now run make distcheck with valgrind support. Removal of the
mudflap configure option simplifies the build a little.
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
| |
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
| |
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
When the elf file is mmapped ehdr can still point to ehdr_mem if the
address is unaligned. In such cases we do need to memcpy the ehdr back
to the file. We shouldn't when ehdr already comes directly from the mmapped
file, because that would cause an memcpy call with overlapping addresses
(ehdr being copied directly over itself).
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
When ehdr e_shoff changes, elf flags is set dirty. This indicates that
the section header moved because sections were added/removed or changed
in size.
Reported-by: Jiri Slaby <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
|
| |
Sometimes with cross-compile toolchains, the tools are prefixed with the
target arch. Using AC_CHECK_TOOL looks for tools named like this.
Signed-off-by: Michael Forney <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
| |
Signed-off-by: Petr Machata <[email protected]>
|
| |
|
|
| |
Signed-off-by: Petr Machata <[email protected]>
|
| |
|
|
|
| |
Signed-off-by: Namhyung Kim <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
| |
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
| |
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
| |
Signed-off-by: Kurt Roeckx <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| | |
|
| |
|
|
|
|
| |
the field is naturally aligned.
Signed-off-by: Roland McGrath <[email protected]>
|
| |
|
|
| |
Signed-off-by: Petr Machata <[email protected]>
|
| |
|
|
| |
Signed-off-by: Roland McGrath <[email protected]>
|
| |
|
|
| |
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
| |
Signed-off-by: Petr Machata <[email protected]>
|
| |
|
|
|
| |
Reported-by: Nick Alcock <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
|
|
|
| |
See this bug report for more details:
https://bugzilla.redhat.com/show_bug.cgi?id=835877
Signed-off-by: Petr Machata <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change name from "Red Hat elfutils" to "elfutils".
* Update license of standalone tools and test from GPLv2 to GPLv3+.
* Change license of libraries from GPLv2+exception to GPLv2/LGPLv3+.
* Add Developer Certificate of Origin based contributor policy.
top-level:
- COPYING: Upgraded from GPLv2 to GPLv3.
- CONTRIBUTING, COPYING-GPLv2, COPYING-LGPLv3: New files.
- NEWS: Added note about new contribution and license policy.
- Makefile.am: Updated to GPLv3, added new files to EXTRA_DIST.
- configure.ac: Update to GPLv3, changed AC_INIT name to 'elfutils'.
backends, lib, libasm, libcpu, libdw, libdwfl, libebl, libelf:
- All files updated to GPLv2/LGPLv3+. Except some very small files
(<5 lines) which didn't have any headers at all before, the linker
.maps files and the libcpu/defs files which only contain data and
libelf/elf.h which comes from glibc and is under LGPLv2+.
config:
- elfutils.spec.in: Add new License: headers and new %doc files.
- Update all license headers to GPLv2/LGPLv3+ for files used by libs.
src, tests:
- All files updated to GPLv3+. Except for the test bz2 data files, the
linker maps and script files and some very small files (<5 lines)
that don't have any headers.
Signed-off-by: Richard Fontana <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
| |
|
|
| |
We use .gitignore these days.
|
| |
|
|
|
|
| |
readelf -d doesn't work if a SHT_NOBITS section is right before the actual
.dynamic section at the same offset. elflint also fails on such binaries.
So skip SHT_NOBITS sections at the same offset in [g]elf[32|64]_offscn().
|
| | |
|
| |
|
|
| |
Reported-by: Kurt Roeckx <[email protected]>
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
The gelf_update_[eps]hdr functions didn't implicitly mark the
data structures as modified. This has always been the case and
programs should set the bit but it is somewhat inconsistent since
other update functions implicitly set the bit. Do it in these
three cases, too.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
* Initialize data.s for data that do not need a conversion.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
with --disable-dependency-tracking.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
If fill_mmap() was run for a section that's past the shdr_end, but does
not immediately follow the section headers the fill start would be
determined incorrectly as shdr_end, which would wipe off contents of
sections between shdr_end and current one.
Issue was reported and triaged by Hugo Mildenberger, Graham Murray
and Peter Alfredsen. (http://bugs.gentoo.org/show_bug.cgi?id=288977)
|