projects
/
elfdbg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99eb933
)
Skip sections which are not PROGBITS
author
Sofian Brabez
<sbz@FreeBSD.org>
Mon, 1 Jun 2020 14:56:05 +0000
(16:56 +0200)
committer
Sofian Brabez
<sbz@FreeBSD.org>
Mon, 1 Jun 2020 14:57:56 +0000
(16:57 +0200)
ELF debug sections type are all SHT_PROGBITS so avoid looping on all other
types for nothing
elf.c
patch
|
blob
|
blame
|
history
diff --git
a/elf.c
b/elf.c
index e73e9c49d03c020b54ccbbaa645463177b81bcf0..ce9eafead50c278ce08823f0a67c10f8e979e517 100644
(file)
--- a/
elf.c
+++ b/
elf.c
@@
-124,6
+124,9
@@
elf_debug_print(Elf_Obj *e)
printf("%d ELF debug sections:\n", elf_debug(e));
for (i=0; i < e->shdr_size; i++) {
+ if (e->shdr[i].sh_type != SHT_PROGBITS)
+ continue;
+
section_name = elf_str_get(e, i);
if (strnstr(section_name, debug_prefix, strlen(debug_prefix))) {
printf("%s\n", section_name);