summaryrefslogtreecommitdiffstats
path: root/libdwfl/relocate.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdwfl/relocate.c')
-rw-r--r--libdwfl/relocate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libdwfl/relocate.c b/libdwfl/relocate.c
index 88b5211d..0497bd4f 100644
--- a/libdwfl/relocate.c
+++ b/libdwfl/relocate.c
@@ -30,6 +30,8 @@
30# include <config.h> 30# include <config.h>
31#endif 31#endif
32 32
33#include <system.h>
34
33#include "libelfP.h" 35#include "libelfP.h"
34#include "libdwflP.h" 36#include "libdwflP.h"
35 37
@@ -237,7 +239,7 @@ resolve_symbol (Dwfl_Module *referer, struct reloc_symtab_cache *symtab,
237 return DWFL_E_LIBELF; 239 return DWFL_E_LIBELF;
238 240
239 /* If the section is already decompressed, that isn't an error. */ 241 /* If the section is already decompressed, that isn't an error. */
240 if (strncmp (sname, ".zdebug", strlen (".zdebug")) == 0) 242 if (startswith (sname, ".zdebug"))
241 elf_compress_gnu (scn, 0, 0); 243 elf_compress_gnu (scn, 0, 0);
242 244
243 if ((shdr->sh_flags & SHF_COMPRESSED) != 0) 245 if ((shdr->sh_flags & SHF_COMPRESSED) != 0)
@@ -518,7 +520,7 @@ relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr,
518 Nothing to do here. */ 520 Nothing to do here. */
519 return DWFL_E_NOERROR; 521 return DWFL_E_NOERROR;
520 522
521 if (strncmp (tname, ".zdebug", strlen ("zdebug")) == 0) 523 if (startswith (tname, ".zdebug"))
522 elf_compress_gnu (tscn, 0, 0); 524 elf_compress_gnu (tscn, 0, 0);
523 525
524 if ((tshdr->sh_flags & SHF_COMPRESSED) != 0) 526 if ((tshdr->sh_flags & SHF_COMPRESSED) != 0)
@@ -539,7 +541,7 @@ relocate_section (Dwfl_Module *mod, Elf *relocated, const GElf_Ehdr *ehdr,
539 if (sname == NULL) 541 if (sname == NULL)
540 return DWFL_E_LIBELF; 542 return DWFL_E_LIBELF;
541 543
542 if (strncmp (sname, ".zdebug", strlen ("zdebug")) == 0) 544 if (startswith (sname, ".zdebug"))
543 elf_compress_gnu (scn, 0, 0); 545 elf_compress_gnu (scn, 0, 0);
544 546
545 if ((shdr->sh_flags & SHF_COMPRESSED) != 0) 547 if ((shdr->sh_flags & SHF_COMPRESSED) != 0)