diff options
| author | Mark Wielaard <[email protected]> | 2018-08-01 16:51:03 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2018-09-13 14:30:30 +0200 |
| commit | 68e8b84743bdb389776e3aa2bae27aba7f435fdb (patch) | |
| tree | 57b5c8ff6a38c61e0c7d63dc4b0bc234ef011ebb /src/elfcmp.c | |
| parent | 19756e7fb614831f4a5f5ff5b996675fae638782 (diff) | |
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 <[email protected]>
Diffstat (limited to 'src/elfcmp.c')
| -rw-r--r-- | src/elfcmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elfcmp.c b/src/elfcmp.c index b40df8bf..b68df688 100644 --- a/src/elfcmp.c +++ b/src/elfcmp.c @@ -254,7 +254,7 @@ main (int argc, char *argv[]) sname1 = elf_strptr (elf1, ehdr1->e_shstrndx, shdr1->sh_name); } while (scn1 != NULL - && ebl_section_strip_p (ebl1, ehdr1, shdr1, sname1, true, false)); + && ebl_section_strip_p (ebl1, shdr1, sname1, true, false)); GElf_Shdr shdr2_mem; GElf_Shdr *shdr2; @@ -267,7 +267,7 @@ main (int argc, char *argv[]) sname2 = elf_strptr (elf2, ehdr2->e_shstrndx, shdr2->sh_name); } while (scn2 != NULL - && ebl_section_strip_p (ebl2, ehdr2, shdr2, sname2, true, false)); + && ebl_section_strip_p (ebl2, shdr2, sname2, true, false)); if (scn1 == NULL || scn2 == NULL) break; |
