diff options
author | Mark Wielaard <mark@klomp.org> | 2018-10-21 23:41:32 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2018-11-09 18:11:48 +0100 |
commit | ecbe3120cddb1b9597a19a68c4265e4f2c530444 (patch) | |
tree | 40f6549cda3aa5bff3df983f15ac88d0da597b72 /libdw | |
parent | 4b0342b85b5b1a3d3636e06e3b5320954828dfb1 (diff) | |
download | elfutils-ecbe3120cddb1b9597a19a68c4265e4f2c530444.tar.gz |
libdwelf: New function dwelf_elf_begin.
This introduces a new function dwelf_elf_begin which creates a (read-only)
ELF handle from a possibly compressed file handle or a file that start
with a linux kernel header. This can be used in eu-readelf to (re)open a
(pure) ELF.
eu-readelf uses libdwfl to relocate addresses in the original file in
case it is ET_REL. But to show the "raw" data it might need to (re)open
the file. Which could fail if the file was compressed. And produced an
obscure error message: "cannot create EBL handle".
This rewrites __libdw_open_file a little so that the given file handle
will never be closed (whether on success or failure) and introduces a
new internal function __libdw_open_elf that dwelf_elf_begin wraps.
Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libdw')
-rw-r--r-- | libdw/ChangeLog | 4 | ||||
-rw-r--r-- | libdw/libdw.map | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 627fddeb..7caa2234 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,7 @@ +2018-10-20 Mark Wielaard <mark@klomp.org> + + * libdw.map (ELFUTILS_0.175): New section. Add dwelf_elf_begin. + 2018-10-29 Milian Wolff <milian.wolff@kdab.com> * dwarf_getcfi_elf.c (getcfi_shdr): Check sh_type != SHT_NOBITS. diff --git a/libdw/libdw.map b/libdw/libdw.map index 3fef2ede..55482d58 100644 --- a/libdw/libdw.map +++ b/libdw/libdw.map @@ -356,3 +356,8 @@ ELFUTILS_0.173 { global: dwarf_next_lines; } ELFUTILS_0.171; + +ELFUTILS_0.175 { + global: + dwelf_elf_begin; +} ELFUTILS_0.173;
\ No newline at end of file |