summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-05-19 14:34:52 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-05-19 14:34:52 (GMT)
commit3fd2fb5411f532120b3e25942aaafc7150ab078b (patch)
tree99bedf432b8bbab8ebbc8da8c20f007351e3d620
parentca2d0b23aac9a48b112f20a603dd0df85afc8afa (diff)
Handled special values in ELF arrays properly (as stated in comments).
-rw-r--r--plugins/elf/symbols.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/elf/symbols.c b/plugins/elf/symbols.c
index 1cc0280..1b47616 100644
--- a/plugins/elf/symbols.c
+++ b/plugins/elf/symbols.c
@@ -327,12 +327,14 @@ static bool load_all_elf_basic_entry_points(GElfFormat *format)
ep = virt_64;
}
- if (!status) break;
+ if (status)
+ {
+ snprintf(fullname, sizeof(fullname), "%s%u", prefix, i);
- snprintf(fullname, sizeof(fullname), "%s%u", prefix, i);
+ routine = try_to_demangle_routine(fullname);
+ register_elf_entry_point(fmt, ep, 0, routine);
- routine = try_to_demangle_routine(fullname);
- register_elf_entry_point(fmt, ep, 0, routine);
+ }
}