aboutsummaryrefslogtreecommitdiff
path: root/binutils/NEWS
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2021-03-04 10:41:22 +0000
committerNick Clifton <nickc@redhat.com>2021-03-04 10:41:22 +0000
commitca0e11aa4ba877e180f7d40dcc5a89540740c501 (patch)
tree4b63669803d3f6fdac19e967dadb1e7f521f4b75 /binutils/NEWS
parent168bb18858e749a211125e8eb3cec27d83fc2ebb (diff)
downloadgdb-ca0e11aa4ba877e180f7d40dcc5a89540740c501.zip
gdb-ca0e11aa4ba877e180f7d40dcc5a89540740c501.tar.gz
gdb-ca0e11aa4ba877e180f7d40dcc5a89540740c501.tar.bz2
Gate the displaying of non-debug sections in separate debuginfo files.
PR 27478 * objdump.c (process_links): New variable. (usage): Add --process-links. (long_options): Likewise. (dump_bfd): Stop processing once the bfd has been loaded unless this is the main file or process_links has been enabled. (main): Handle the process-links option. * readelf.c (process_links): New variable. (struct filedata): Add is_separate field. (options): Add --process-links. (usage): Likewise. (parse_args): Likewise. (process_file_header): Include the filename when dumping information for separate debuginfo files. (process_program_headers): Likewise. (process_section_headers): Likewise. (process_section_groups): Likewise. (process_relocs): Likewise. (process_dynamic_section): Likewise. (process_version_sections): Likewise. (display_lto_symtab): Likewise. (process_symbol_table): Likewise. (process_syminfo): Likewise. (initialise_dumps_by_name): Likewise. (process_section_contents): Likewise. (process_notes_at): Likewise. (process_notes): Likewise. (open_file): Add is_separate parameter. Use to initialise the is_separate field in the filedata structure. (open_deug): Update call to open_file. (process_object): Add processing of the contents of separate debuginfo files, gated by the process_links variable. (process_archive): Update call to open_file. (process_file): Initialise the is_separate field in the filedata structure. * dwarf.c (load_separate_debug_info_file): Only report the loading of a separate file if debug links are being dumped. * objcopy.c (keep_section_symbols): New variable. (enum command_line_switch): Add OPTION_KEEP_SYMBOLS. (strip_options): Add keep-section-symbols. (copy_options): Likewise. (copy_usage): Likewise. (strip_usage): Likewise. (copy_object): Keep section symbols if requested by command line option. (strip_main): Handle --keep-section-symbols. (copy_main): Likewise. * doc/binutils.texi: Document the new options. * NEWS: Mention the new features. * testsuite/binutils-all/compress.exp (test_gnu_debuglink): Update options passed to objdump. Use diff rather than cmp to compare the dumped data. * testsuite/binutils-all/objdump.WK2: Update regexp. * testsuite/binutils-all/objdump.WK3: Update regexp. * testsuite/binutils-all/objdump.exp: Use --process-links instead of --dwarf=follow-links. * testsuite/binutils-all/readelf.exp (readelf_test): Include readelf's output in the log when the test fails. Add the -P option to the -wKis test. * testsuite/binutils-all/readelf.wKis: Update expected output.
Diffstat (limited to 'binutils/NEWS')
-rw-r--r--binutils/NEWS24
1 files changed, 24 insertions, 0 deletions
diff --git a/binutils/NEWS b/binutils/NEWS
index 461ddab..a4d7a61 100644
--- a/binutils/NEWS
+++ b/binutils/NEWS
@@ -1,5 +1,10 @@
-*- text -*-
+* A new command line --keep-section-symbols has been added to objcopy and
+ strip. This stops the removal of unused section symbols when the file is
+ copied. Removing these symbols saves space, but sometimes they are needed by
+ other tools.
+
* objcopy --weaken, --weaken-symbol and --weaken-symbols now make undefined
symbols weak on targets that support weak symbols.
@@ -13,6 +18,25 @@
restored by the use of the --enable-follow-debug-links=no configure time
option.
+ The semantics of the =follow-links option have also been slightly changed.
+ When enabled, the option allows for the loading of symbol tables and string
+ tables from the separate files which can be used to enhance the information
+ displayed when dumping other sections, but it does not automatically imply
+ that information from the separate files should be displayed.
+
+ If other debug section display options are also enabled (eg
+ --debug-dump=info) then the contents of matching sections in both the main
+ file and the separate debuginfo file *will* be displayed. This is because in
+ most cases the debug section will only be present in one of the files.
+
+ If however non-debug section display options are enabled (eg --sections) then
+ the contents of matching parts of the separate debuginfo file will *not* be
+ displayed. This is because in most cases the user probably only wanted to
+ load the symbol information from the separate debuginfo file. In order to
+ change this behaviour a new command line option --process-links can be used.
+ This will allow di0pslay options to applied to both the main file and any
+ separate debuginfo files.
+
* Nm has a new command line option: --quiet. This suppresses "no symbols"
diagnostic.