Use /usr/bin/nm -D on stripped binaries
Subsystems (2)
PATCH 1/1 Use /usr/bin/nm -D on stripped binaries
Use "nm -D" to retrieve also the symbols of crash when having stripped binaries. Use the presence of the symbol table to determine if the binary has been stripped or not.
Because we don't have static symbols in stripped binaries, we check the size of the function (the "nm -S" output) and report "unknown" if the looked address is outside of the function.
2 files changed, 55 insertions(+), 12 deletions(-)
defs.h | 1symbols.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++------------
Use "nm -D" to retrieve also the symbols of crash when having stripped binaries. Use the presence of the symbol table to determine if the binary has been stripped or not.
Because we don't have static symbols in stripped binaries, we check the size of the function (the "nm -S" output) and report "unknown" if the looked address is outside of the function.
defs.h +1 -0
@@ -3296,6 +3296,7 @@void dump_offset_table (char *,ulong );int is_elf_file (char *);int is_kernel (char *); +int is_binary_stripped (char *filename);int file_elf_version (char *);int is_system_map (char *);int select_namelist (char *);
symbols.c +54 -12
100 lines not on this page · raw message
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec