dwarf-reader: refactor try_reading_first_ksymtab_entry_using{pre,}_v4_19_format
authorMatthias Maennich <maennich@google.com>
Mon, 21 Oct 2019 16:09:49 +0000 (17:09 +0100)
committerDodji Seketeli <dodji@redhat.com>
Fri, 8 Nov 2019 13:38:59 +0000 (14:38 +0100)
commit43679a61031608451d20ee2a19aa6808162690fa
tree152ff70d6099eb08f43c2fb9f3be214d025844c6
parent847800d4972b30b2e0a0fdd9d7c668dfcfc6fac2
dwarf-reader: refactor try_reading_first_ksymtab_entry_using{pre,}_v4_19_format

Avoid code duplication and increase maintainebility of these helper
functions. As their only difference was the application of position
relative relocations, consolidate them and add a flag for exactly this
feature.

This is purely stylistic and not changing functionality.

* src/abg-dwarf-reader.cc(try_reading_first_ksymtab_entry):
New function to consolidate functionality for
try_reading_first_ksymtab_entry_using_{pre,}v4_19_format functions.
(try_reading_first_ksymtab_entry_using_v4_19_format,
try_reading_first_ksymtab_entry_using_pre_v4_19_format):
refactor to use try_reading_first_ksymtab_entry

Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-dwarf-reader.cc