diff options
| author | Mark Wielaard <[email protected]> | 2018-09-14 12:28:58 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2018-09-14 12:28:58 +0200 |
| commit | 029c76f0d4b06584e370b5fc0112712ba99a6219 (patch) | |
| tree | 20c91ff0dc7125251b26ded357e71c542b67d5cc /libebl/eblsectionstripp.c | |
| parent | 94c975eefdfbfa9319b7bab69600c76fe6be7910 (diff) | |
| parent | 52b6b2f1f49e7385527e9f311f248092be0c0b61 (diff) | |
Merge branch 'master' into mjw/RH-DTSdts-0.174
elfutils 0.174 release
Removed new M68K and RISCV tests.
Diffstat (limited to 'libebl/eblsectionstripp.c')
| -rw-r--r-- | libebl/eblsectionstripp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libebl/eblsectionstripp.c b/libebl/eblsectionstripp.c index c6cda63a..a5624ffe 100644 --- a/libebl/eblsectionstripp.c +++ b/libebl/eblsectionstripp.c @@ -35,7 +35,7 @@ bool -ebl_section_strip_p (Ebl *ebl, const GElf_Ehdr *ehdr, const GElf_Shdr *shdr, +ebl_section_strip_p (Ebl *ebl, const GElf_Shdr *shdr, const char *name, bool remove_comment, bool only_remove_debug) { @@ -53,7 +53,10 @@ ebl_section_strip_p (Ebl *ebl, const GElf_Ehdr *ehdr, const GElf_Shdr *shdr, GElf_Shdr *shdr_l = gelf_getshdr (scn_l, &shdr_mem_l); if (shdr_l != NULL) { - const char *s_l = elf_strptr (ebl->elf, ehdr->e_shstrndx, + size_t shstrndx; + if (elf_getshdrstrndx (ebl->elf, &shstrndx) != 0) + return false; + const char *s_l = elf_strptr (ebl->elf, shstrndx, shdr_l->sh_name); if (s_l != NULL && ebl_debugscn_p (ebl, s_l)) return true; |
