4 * readelf.c (process_section_contents): Only dump debug
5 information for separate files unless process_links is enabled.
6 (process_object): Always call process_section_contents for
12 * nm.c (FORMAT_JUST_SYMBOLS): Define.
13 (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS.
14 (long_options): Add just-symbols.
15 (set_output_format): Add support for just-symbols.
16 (get_print_format): Likewise.
17 (do_not_print_object_filename): New function.
18 (do_not_print_archive_filename): New function.
19 (do_not_print_archive_member): New function.
20 (do_not_print_symbol_filename): New function.
21 (just_print_symbol_name): New function.
22 (main): Handle --just-symbols.
23 * NEWS: Mention the new feature.
24 * doc/binutils.texi: Document the new feature.
28 * od-xcoff.c: Replace RTB by TRL entry.
33 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
38 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
43 * dwarf.c (display_debug_macro): Handle the displaying of
44 DW_MACRO_define_strp and DW_MACRO_undef_strp in v4
45 .debug_macro.dwo sections.
50 * objdump.c (process_links): New variable.
51 (usage): Add --process-links.
52 (long_options): Likewise.
53 (dump_bfd): Stop processing once the bfd has been loaded unless
54 this is the main file or process_links has been enabled.
55 (main): Handle the process-links option.
56 * readelf.c (process_links): New variable.
57 (struct filedata): Add is_separate field.
58 (options): Add --process-links.
60 (parse_args): Likewise.
61 (process_file_header): Include the filename when dumping
62 information for separate debuginfo files.
63 (process_program_headers): Likewise.
64 (process_section_headers): Likewise.
65 (process_section_groups): Likewise.
66 (process_relocs): Likewise.
67 (process_dynamic_section): Likewise.
68 (process_version_sections): Likewise.
69 (display_lto_symtab): Likewise.
70 (process_symbol_table): Likewise.
71 (process_syminfo): Likewise.
72 (initialise_dumps_by_name): Likewise.
73 (process_section_contents): Likewise.
74 (process_notes_at): Likewise.
75 (process_notes): Likewise.
76 (open_file): Add is_separate parameter. Use to initialise the
77 is_separate field in the filedata structure.
78 (open_deug): Update call to open_file.
79 (process_object): Add processing of the contents of separate
80 debuginfo files, gated by the process_links variable.
81 (process_archive): Update call to open_file.
82 (process_file): Initialise the is_separate field in the filedata
84 * dwarf.c (load_separate_debug_info_file): Only report the
85 loading of a separate file if debug links are being dumped.
86 * objcopy.c (keep_section_symbols): New variable.
87 (enum command_line_switch): Add OPTION_KEEP_SYMBOLS.
88 (strip_options): Add keep-section-symbols.
89 (copy_options): Likewise.
90 (copy_usage): Likewise.
91 (strip_usage): Likewise.
92 (copy_object): Keep section symbols if requested by command line
94 (strip_main): Handle --keep-section-symbols.
95 (copy_main): Likewise.
96 * doc/binutils.texi: Document the new options.
97 * NEWS: Mention the new features.
98 * testsuite/binutils-all/compress.exp (test_gnu_debuglink):
99 Update options passed to objdump. Use diff rather than cmp to
100 compare the dumped data.
101 * testsuite/binutils-all/objdump.WK2: Update regexp.
102 * testsuite/binutils-all/objdump.WK3: Update regexp.
103 * testsuite/binutils-all/objdump.exp: Use --process-links
104 instead of --dwarf=follow-links.
105 * testsuite/binutils-all/readelf.exp (readelf_test): Include
106 readelf's output in the log when the test fails.
107 Add the -P option to the -wKis test.
108 * testsuite/binutils-all/readelf.wKis: Update expected output.
113 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
114 * NEWS: Mention feature.
119 * dwarf.c (load_separate_debug_info): Issue warning only if
120 do_debug_links is set.
121 * testsuite/binutils-all/compress.exp: Run objdump and readelf
122 with missing debug file.
127 * doc/binutils.texi: Add nm --with-symbol-versions and
128 --without-symbol-versions documentation.
129 * nm.c (with_symbol_versions): New variable.
130 (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
131 (long_options): Make --with-symbol-versions entry twiddle the flag.
132 Add --without-symbol-versions.
133 (print_symname): Strip version when !with_symbol_versions. Add
134 dynamic version info under control of with_symbol_versions.
135 (main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
140 * readelf.c (quiet): New option flag.
141 (enum long_option_values): New enum to hold long option value.
142 (long_options): Add --quiet.
143 (usage): Mention --quiet.
144 (display_rel_file): If quiet is enabled, suppress "no symbols".
145 (main): Handle the new option.
146 * NEWS: Mention --quiet.
147 * docs/binutils.texi: Document --quiet.
151 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
156 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
158 (read_and_display_attr_value): Likewise.
162 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
164 (read_and_display_attr_value): Handle sup forms.
165 (display_debug_sup): New function. Displays the contents of a
167 (load_debug_sup_file): New function. Loads the contents of a file
168 referenced by a .debug_sup section.
169 (check_for_and_load_links): Call load_debug_sup_file.
170 (debug_displays): Add entry for .debug_sup.
171 * dwarf.h (enum dwarf_section_display_enum): Add debug_sup.
172 * readelf.c (process_section_headers): Add support for debug_sup.
173 * doc/debug.options.texi: Note that the =links option will display
174 the contents of .debug_sup sections.
175 * NEWS: Mention the new support.
180 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
185 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
186 when adding together the section sizes.
190 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
192 * readelf.c (print_gnu_build_attribute_description): Likewise.
198 * bucomm.h (smart_rename): Update prototype.
199 * rename.c (smart_rename): Add fromfd and preserve_dates params.
200 Pass fromfd and target_stat to simple_copy. Call set_times
202 (simple_copy): Accept fromfd rather than from filename. Add
203 target_stat param. Rewind fromfd rather than opening. Open
204 "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
205 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
206 closing output temp file, and pass tmpfd to smart_rename.
207 * arsup.c (temp_fd): Rename from real_fd.
208 (ar_save): Dup temp_fd and pass to smart_rename.
209 * objcopy.c (strip_main, copy_main): Likewise, and pass
215 * rename.c: Tidy throughout.
216 (smart_rename): Always copy. Remove windows specific code.
220 * testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
221 (run_dump_test): Fail if expecting errors from a file like we do
222 for error strings, if no error is seen.
226 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
230 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
232 * arsup.c (ar_save): Likewise.
233 * objcopy (strip_main): Don't copy TMPFD. Don't set times on
234 temporary file and adjust call to SMART_RENAME.
235 (copy_main): Likewise.
236 * rename.c [!S_ISLNK]: Remove definitions.
237 (try_preserve_permissions): Remove function.
238 (smart_rename): Remove FD, PRESERVE_DATES arguments. Use
239 rename system call only if TO does not exist.
240 * bucomm.h (smart_rename): Adjust declaration.
244 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
245 address that is higher than the end address.
249 * dwarf.c: Include limits.h.
250 (CHAR_BIT): Provide backup define.
251 (read_leb128): Use CHAR_BIT to size "result" in bits. Correct
252 signed overflow checking.
253 * testsuite/binutils-all/pr26548.s,
254 * testsuite/binutils-all/pr26548.d,
255 * testsuite/binutils-all/pr26548e.d: New tests.
256 * testsuite/binutils-all/readelf.exp: Run them.
257 (readelf_test): Drop unused "xfails" parameter. Update all uses.
261 * dwarf.c (process_debug_info): Initialize "dwo_id".
265 * objdump.c (load_specific_debug_section): Don't call
266 bfd_cache_section_contents. Rearrange so that
267 bfd_get_full_section_contents is not called on path where
268 bfd_simple_get_relocated_section_contents is called.
269 Don't set section->user_data.
270 (free_debug_section): Always free section->start. Don't twiddle
272 * readelf.c (load_specific_debug_section): Don't set user_data.
273 * dwarf.h (struct dwarf_section): Remove use_data field.
274 * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
278 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
279 * testsuite/binutils-all/objdump.exp: Likewise.
283 * objdump.c (slurp_symtab): Don't add an extra entry for NULL
285 (slurp_dynamic_symtab): Likewise.
286 (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
290 * Makefile.in: Regenerate.
291 * doc/Makefile.in: Regenerate.
295 * aclocal.m4: Regenerate.
299 * configure.ac (follow-debug-links): Add option to enable or
300 disable the following of debug links by default. Set the
301 default for the option to be 'follow'.
302 * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
303 (dwarf_select_sections_by_names): Add no-follow-links option.
304 (dwarf_select_sections_by_letter): Add 'N' option.
305 * objdump.c (usage): Add conditional text describing the
307 (slurp_symtab): Ensure that there is a NULL entry at the end
309 (slurp_dynamic_symtab): Likewise.
310 (dump_bfd): When extending the symbol table, ensure that there
311 is still a NULL entry at the end.
312 * readelf.c (usage): Add conditional text describing the
314 * doc/binutils.texi: Update documentation for objcopy and
316 * doc/debug.options.texi: Update documentation of the
318 * config.in: Regenerate.
319 * configure: Regenerate.
320 * testsuite/binutils-all/compress.exp: Add the -WN option to
321 objdump command lines that are not expecting to follow links.
322 * testsuite/binutils-all/readelf.exp: Add the
323 --debug-dump=no-follow-links option to tests that are not
324 expecting to follow debug links.
325 * NEWS: Mention the new behaviour.
329 * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
330 gas or ld fails to build a testcase rather than "unresolved".
331 Report "fail" when readelf returns an error status rather than
333 * testsuite/binutils-all/ar.exp: Likewise.
334 * testsuite/binutils-all/compress.exp: Likewise.
335 * testsuite/binutils-all/readelf.exp: Likewise.
339 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
340 "c" with "ccc" labels.
344 * dwarf.h (debug_info): Fix typo in comment.
348 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
353 * dwarf.c (process_debug_info): Print DWO ID.
360 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
361 Use bfd_malloc_and_get_section.
362 (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
363 check namesz. Return NULL if descsz is too small. Ensure
364 string table is terminated.
365 (elf32_avr_get_device_info): Formatting. Add note_size param.
367 (elf32_avr_dump_mem_usage): Adjust to suit.
372 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
377 * dwarf.c (display_debug_ranges): Filter range lists according to
383 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
388 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
393 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
398 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
399 uninitialised on invalid input.
404 * rename.c (smart_rename): Test for existence and type of output
409 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
414 * elfedit.c (check_file):
415 * bucomm.c (get_file_size): Fix typos in comments.
420 * arsup.c (ar_save): Use stat rather than lstat.
427 * ar.c: Don't include libbfd.h.
428 (write_archive): Replace xmalloc+strcpy with xstrdup. Use
429 bfd_stat rather than fstat on iostream. Move stat and fd tests
430 outside of _WIN32 ifdef. Delete skip_stat variable.
431 * arsup.c (temp_name, real_ofd): New static variables.
432 (ar_open): Use make_tempname and bfd_fdopenw.
433 (ar_save): Adjust to suit ar_open changes. Move stat output
435 * objcopy.c: Don't include libbfd.h.
436 (copy_file): Use bfd_stat.
441 * readelf.c (process_section_headers): Add 'R' and 'D' to
443 * testsuite/binutils-all/retain1a.d: Updated.
447 * README-how-to-make-a-release: Small updates after the 2.35.2
453 * windres.c (quot): Use double quotes to protect strings on
459 * bucomm.c (get_file_size): Add code to handle /dev/null on
461 * elfedit.c (check_file): Likewise.
465 * objcopy.c (copy_main): Remove conditional control of the calls
466 to free, simplifying the code and making it easier to detect
471 * objcopy.c (copy_main): Fix a double free happening when both
472 --localize-symbols and --globalize-symbols options are invoked
477 * README-how-to-make-a-release: Minor updates after the 2.36 release.
481 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
486 * readelf.c (uncompress_section_contents): Always call inflateEnd.
490 * MAINTAINERS: Update my email address.
494 * po/sv.po: Updated Swedish translation.
498 * Makefile.in: Regenerate.
499 * doc/Makefile.in: Regenerate.
504 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
506 (i386_x64_trampoline): Add SEH annotations.
507 (struct mac): Add how_seh field.
508 (make_delay_head): If how_set field is true add SEh instructions.
513 * configure.ac: Use GNU_MAKE_JOBSERVER.
514 * aclocal.m4: Regenerated.
515 * configure: Likewise.
519 * po/fr.po: Updated French translation.
524 * configure: Regenerated.
528 * po/pt.po: Updated Portuguese translation.
529 * po/sr.po: Updated Serbian translation.
530 * po/uk.po: Updated Ukranian translation.
534 * configure: Regenerated.
538 * configure: Regenerate.
539 * po/binutils.pot: Regenerate.
543 * 2.36 release branch crated.
544 * README-how-to-make-a-release: Add note about updating Makefiles
546 * BRANCHES: Add binutils-2.36-branch.
550 * configure: Regenerate.
554 * configure: Regenerate.
559 * objcopy.c (copy_object): Handle section symbols for
560 non-relocatable inputs.
561 * testsuite/binutils-all/readelf.exp (readelf_test): Check
562 is_elf_unused_section_symbols.
563 * testsuite/binutils-all/readelf.s-64: Updated.
564 * testsuite/binutils-all/readelf.ss: Likewise.
565 * testsuite/binutils-all/readelf.ss-64: Likewise.
566 * testsuite/binutils-all/readelf.s-64-unused: New file.
567 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
568 * testsuite/binutils-all/readelf.ss-unused: Likewise.
569 * testsuite/lib/binutils-common.exp
570 (is_elf_unused_section_symbols): New proc.
574 * binutils/readelf.c: Correct grammar in comment.
578 * coffgrok.c (do_type): Correct spelling of auxiliary in errors.
579 * doc/binutils.texi: Correct grammar.
580 * readelf.c (process_version_sections): Correct spelling of auxiliary
582 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
586 Update year range in copyright notice of all files.
588 For older changes see ChangeLog-2020
590 Copyright (C) 2021 Free Software Foundation, Inc.
592 Copying and distribution of this file, with or without modification,
593 are permitted in any medium without royalty provided the copyright
594 notice and this notice are preserved.
600 version-control: never