]> sourceware.org Git - libabigail.git/commit
Handle Linux kernel binaries with no __ksymtab section
authorDodji Seketeli <dodji@redhat.com>
Mon, 13 May 2019 12:54:20 +0000 (14:54 +0200)
committerDodji Seketeli <dodji@redhat.com>
Mon, 13 May 2019 14:57:55 +0000 (16:57 +0200)
commit1930f3caf7bf3d56ceb43c1ce1ecf8a3c5bfe1d2
tree17273d014989a23212d74f35df5a0b02bea2b23e
parentd403118cd0ba5bd3d0633555e8619a49ddafc68c
Handle Linux kernel binaries with no __ksymtab section

Some Linux kernel binaries can have no __ksymtab section.  It's
possible that only have a __ksymtab_gpl section or no __ksymtab_gpl
either.  And apparently they can also have a __ksymtab* section full
of zeroes.

This patch gets the ELF/DWARF reader prepared to handle these cases.

* src/abg-dwarf-reader.cc (find_section): Use elf_getshdrstrndx
rather than poking at the elf header on our own.
(read_context::find_any_ksymtab_section): Define new member
function.
(read_context::{get_symtab_format,
try_reading_first_ksymtab_entry_using_pre_v4_19_format}): Use the
new find_any_ksymtab_section rather than find_ksymtab_section.
(read_context::get_nb_ksymtab_entries): Handle the absence of
__ksymtab.
(read_context::get_nb_ksymtab_gpl_entries): Handle the absence of
__ksymtab_gpl.
(read_context::load_kernel_symbol_table): Handle the case of zero
ksymtab entries.
(read_context::{maybe_adjust_address_for_exec_or_dyn,
maybe_adjust_fn_sym_address, load_kernel_symbol_table}): Handle an
address that is zero.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-dwarf-reader.cc
This page took 0.03643 seconds and 5 git commands to generate.