mirror of
https://github.com/openharmony/third_party_elfutils.git
synced 2026-07-01 06:41:51 -04:00
7ea82243ec
dwelf_elf_begin was slightly different from elf_begin in case the file turned out to not be an ELF file. elf_begin would return an Elf handle with ELF_K_NONE. But dwelf_elf_begin would return NULL. This made it impossible to tell the difference between a file or decompression error and a (decompressed) file not being an ELF file. Since dwelf_elf_begin could still return different kinds of ELF files (ELF_K_ELF or ELF_K_AR - and theoretically ELF_K_COFF) this was not really useful anyway. So make it so that dwelf_elf_begin always returns an Elf handle unless there was a real error reading or decompressing the file. Otherwise return NULL to make clear there was a real error. Make sure that the decompression function returns DWFL_E_BADELF only when the file isn't compressed. In which case the Elf handle won't be replaced and can be returned (as ELF_K_NONE). Add a new version to dwelf_elf_begin so programs can rely on it returning NULL only for real errors. Signed-off-by: Mark Wielaard <mark@klomp.org>
83 lines
2.6 KiB
Plaintext
83 lines
2.6 KiB
Plaintext
2019-08-12 Mark Wielaard <mark@klomp.org>
|
|
|
|
* libdwelf.h (dwelf_elf_begin): Update documentation.
|
|
* dwelf_elf_begin.c (dwelf_elf_begin): Don't suppress ELF_K_NONE.
|
|
Mark old and new version.
|
|
|
|
2019-06-28 Mark Wielaard <mark@klomp.org>
|
|
|
|
* Makefile.am (libdwelf_a_SOURCES): Add dwelf_elf_e_machine_string.c.
|
|
* libdwelf.h (dwelf_elf_e_machine_string): Define new function.
|
|
* dwelf_elf_e_machine_string.c: New file.
|
|
|
|
2018-10-21 Mark Wielaard <mark@klomp.org>
|
|
|
|
* libdwelf.h (dwelf_elf_begin): Add function declaration.
|
|
* dwelf_elf_begin.c: New file.
|
|
* Makefile.am (libdwelf_a_SOURCES): Add dwelf_elf_begin.c.
|
|
|
|
2018-10-18 Mark Wielaard <mark@klomp.org>
|
|
|
|
* dwelf_elf_gnu_build_id.c (find_elf_build_id): Check p_align to
|
|
set ELF type.
|
|
|
|
2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
|
|
|
|
* dwelf_strtab.c: Remove sys/param.h include.
|
|
(MIN): Remove definition.
|
|
|
|
2016-07-08 Mark Wielaard <mjw@redhat.com>
|
|
|
|
* Makefile.am (libdwelf_a_SOURCES): Add dwelf_strtab.c.
|
|
* dwelf_strtab.c: New file.
|
|
* libdwelf.h (Dwelf_Strtab): New typedef.
|
|
(Dwelf_Strent): Likewise.
|
|
(dwelf_strtab_init): New function.
|
|
(dwelf_strtab_add): Likewise.
|
|
(dwelf_strtab_add_len): Likewise.
|
|
(dwelf_strtab_finalize): Likewise.
|
|
(dwelf_strent_off): Likewise.
|
|
(dwelf_strent_str): Likewise.
|
|
(dwelf_strtab_free): Likewise.
|
|
|
|
2015-10-28 Mark Wielaard <mjw@redhat.com>
|
|
|
|
* Makefile.am (libdwelf_a_SOURCES): Add
|
|
dwelf_scn_gnu_compressed_size.c.
|
|
* dwelf_scn_gnu_compressed_size.c: Likewise.
|
|
* libdwelf.h (dwelf_scn_gnu_compressed_size): New declaration.
|
|
|
|
2015-10-14 Chih-Hung Hsieh <chh@google.com>
|
|
|
|
* dwelf_elf_gnu_build_id.c (find_elf_build_id): Move nested function
|
|
'check_notes' to file scope.
|
|
|
|
2014-11-14 Mark Wielaard <mjw@redhat.com>
|
|
|
|
* dwelf_elf_gnu_debuglink.c (dwelf_elf_gnu_debuglink): Check d_buf
|
|
is not NULL.
|
|
|
|
2014-04-30 Mark Wielaard <mjw@redhat.com>
|
|
|
|
* Makefile.am (AM_CPPFLAGS): Add libdwfl and libebl include dirs.
|
|
(libdwelf_a_SOURCES): Add dwelf_elf_gnu_build_id.c
|
|
* dwelf_elf_gnu_build_id.c: New file. Moved libdwfl function
|
|
__libdwfl_find_elf_build_id here.
|
|
* libdwelf.h (dwelf_elf_gnu_build_id): Declare new function.
|
|
* libdwelfP.h (dwelf_elf_gnu_build_id): Add internal declaration.
|
|
|
|
2014-04-24 Florian Weimer <fweimer@redhat.com>
|
|
|
|
* dwelf_dwarf_gnu_debugaltlink.c: New file.
|
|
* Makefile.am (libdwelf_a_SOURCES): Add it.
|
|
* libdwelf.h (dwelf_dwarf_gnu_debugaltlink): Declare new function.
|
|
* libdwelfP.h (dwelf_dwarf_gnu_debugaltlink): Add internal
|
|
declaration.
|
|
|
|
2014-04-11 Mark Wielaard <mjw@redhat.com>
|
|
|
|
* Makefile.am: New file.
|
|
* libdwelf.h: Likewise.
|
|
* libdwelfP.h: Likewise.
|
|
* dwelf_elf_gnu_debuglink.c: Likewise.
|