From 0f03783c8e9f14d02749081815949493bb28d4e3 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 19 Oct 2020 15:27:58 +0100 Subject: Readelf: Add --lto-syms option to display LTO symbol tables. * readelf.c (do_lto_syms): New local. (long_option_values): Add OPTION_LTO_SYMS. (options): Add --lto-syms. (usage): Mention the new option. (parse_args): Parse the new option. (get_lto_kind): New function. (get_lto_visibility): New function. (get_lto_sym_type): New function. (display_lto_symtab): New function - displays the contents of an LTo symbol table section. (process_lto_symbol_tables): New functions. Calls dipslay_lto_symtab on any LTO symbol table section. (process_object_file): Call process_lto_symbol_tables. * doc/binutils.texi: Document the new option. * NEWS: Mention the new feature. --- binutils/ChangeLog | 18 +++ binutils/NEWS | 3 + binutils/doc/binutils.texi | 6 +- binutils/readelf.c | 266 ++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 289 insertions(+), 4 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index ed05b24acfd..786d3f429eb 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,21 @@ +2020-10-19 Nick Clifton + + * readelf.c (do_lto_syms): New local. + (long_option_values): Add OPTION_LTO_SYMS. + (options): Add --lto-syms. + (usage): Mention the new option. + (parse_args): Parse the new option. + (get_lto_kind): New function. + (get_lto_visibility): New function. + (get_lto_sym_type): New function. + (display_lto_symtab): New function - displays the contents of an + LTo symbol table section. + (process_lto_symbol_tables): New functions. Calls + dipslay_lto_symtab on any LTO symbol table section. + (process_object_file): Call process_lto_symbol_tables. + * doc/binutils.texi: Document the new option. + * NEWS: Mention the new feature. + 2020-10-09 H.J. Lu PR gas/26703 diff --git a/binutils/NEWS b/binutils/NEWS index c0dc73d7d8f..35e4e303e15 100644 --- a/binutils/NEWS +++ b/binutils/NEWS @@ -1,5 +1,8 @@ -*- text -*- +* Readelf can now display the contents of LTO symbol table sections when asked + to do so via the --lto-syms command line option. + * Readelf now accepts the -C command line option to enable the demangling of symbol names. In addition the --demangle=