From 68e8b84743bdb389776e3aa2bae27aba7f435fdb Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 1 Aug 2018 16:51:03 +0200 Subject: libebl: Use elf_getshdrstrndx in ebl_section_strip_p. The ebl_section_strip_p function used the Ehdr e_shstrndx field to get at the name of the (debug) sections. This is not correct if there are more than SHN_LORESERVE sections. Use elf_getshdrstrndx to get at the shstrtab section. And drop the Ehdr argument that isn't necessary anymore. Signed-off-by: Mark Wielaard --- libebl/libebl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libebl/libebl.h') diff --git a/libebl/libebl.h b/libebl/libebl.h index 0e1f41be..5abc02d8 100644 --- a/libebl/libebl.h +++ b/libebl/libebl.h @@ -205,7 +205,7 @@ extern bool ebl_none_reloc_p (Ebl *ebl, int reloc); extern bool ebl_relative_reloc_p (Ebl *ebl, int reloc); /* Check whether section should be stripped. */ -extern bool ebl_section_strip_p (Ebl *ebl, const GElf_Ehdr *ehdr, +extern bool ebl_section_strip_p (Ebl *ebl, const GElf_Shdr *shdr, const char *name, bool remove_comment, bool only_remove_debug); -- cgit v1.2.3