1 2021-05-15 Alan Modra <amodra@gmail.com>
3 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Assert only when ENABLE_CHECKING.
5 2021-05-15 Alan Modra <amodra@gmail.com>
7 * bucomm.h (_mul_overflow): Define.
8 * dwarf.c (get_encoded_value): Avoid pointer UB.
10 2021-05-13 Alan Modra <amodra@gmail.com>
13 * dwarf.c (display_debug_str_offsets): Sanity check dwarf5
16 2021-05-13 Alan Modra <amodra@gmail.com>
19 * dwarf.c (display_debug_frames): Sanity check cie_off before
20 attempting to read cie.
22 2021-05-12 Alan Modra <amodra@gmail.com>
24 * dwarf.c (process_extended_line_op): Don't bump data pointer past
25 end when strnlen doesn't find string terminator.
26 (decode_location_expression): Remove dead code.
27 (skip_attr_bytes): Remove const from end param. Ensure data
28 pointer doesn't pass end.
29 (get_type_signedness): Remove const from end param.
30 (read_and_display_attr_value): Ensure data pointer doesn't pass end.
31 (display_debug_lines_raw, display_debug_lines_decoded): Likewise.
32 (display_debug_pubnames_worker): Likewise.
33 (display_debug_pubnames_worker): Use SAFE_BYTE_GET_AND INC rather
34 than blindly incrementing data pointer.
35 (display_debug_addr, display_debug_str_offsets): Likewise. Don't
36 compare pointers, compare lengths.
38 2021-05-12 Alan Modra <amodra@gmail.com>
40 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Define.
41 (SAFE_BYTE_GET, SAFE_BYTE_GET_AND_INC): Define using the above.
42 (SAFE_SIGNED_BYTE_GET, SAFE_SIGNED_BYTE_GET_AND_INC): Likewise.
43 (display_discr_list): Use SAFE_BYTE_GET_AND_INC rather than
44 SAFE_BYTE_GET followed by increment.
45 (process_debug_info): Likewise, and test bytes remaining before
46 incrementing section_begin rather than using pointer comparison.
47 (display_debug_names): Pass lvalue as SAFE_BYTE_GET PTR.
48 (process_cu_tu_index): Likewise for SAFE_BYTE_GET_AND_INC.
50 2021-05-12 Alan Modra <amodra@gmail.com>
52 * dwarf.c (dwarf_vmatoa64, SAFE_BYTE_GET64, add64): Delete.
53 (skip_attr_bytes): Replace use of SAFE_BYTE_GET64 with
54 SAFE_BYTE_GET_AND_INC.
55 (read_and_display_attr_value): Likewise. Print using dwarf_vmatoa.
56 (process_debug_info, process_cu_tu_index): Likewise.
57 * elfcomm.c (byte_put, byte_put_little_endian, byte_put_big_endian),
58 (byte_get, byte_get_little_endian, byte_get_big_endian),
59 (byte_get_signed): Make size param unsigned. Remove code dealing
61 (byte_get_64): Delete.
62 * elfcomm.h (byte_put, byte_put_little_endian, byte_put_big_endian),
63 (byte_get, byte_get_little_endian, byte_get_big_endian),
64 (byte_get_signed): Update prototypes.
65 (byte_get_64): Delete.
67 2021-05-12 Alan Modra <amodra@gmail.com>
70 * dwarf.c (display_debug_frames): Don't compare pointers derived
71 from user input. Test offset against bounds instead.
73 2021-05-12 Alan Modra <amodra@gmail.com>
76 * dwarf.c (display_formatted_table): Test for data >= end rather
78 (process_extended_line_op): Likewise.
79 (display_debug_lines_raw): Likewise.
80 (display_debug_lines_decoded): Likewise.
82 2021-05-12 Alan Modra <amodra@gmail.com>
85 * dwarf.c (fetch_indexed_string): Correct length sanity checks.
86 Sanity check section size for version and padding too. Correct
87 index sanity check. Handle multiple tables in .debug_str_offsets.
89 2021-05-11 Hans-Peter Nilsson <hp@axis.com>
91 * dwarf.c (process_abbrev_set): Properly parenthesize before
92 casting to unsigned long.
94 2021-05-11 Alan Modra <amodra@gmail.com>
97 * dwarf.c (process_abbrev_set): Replace start and end parameters
98 with section, abbrev_base, abbrev_size, abbrev_offset. Update
99 all callers. Sanity check parameters correctly and emit warnings
101 (process_debug_info): ..here.
103 2021-05-10 Thomas Wolff <towo@towo.net>
108 * windres.c (quot): Revert previous delta. Do not use double
109 quotes when spaces are detected in options.
110 * doc/binutils.texi (windres): Remove suggestion that the
111 --preprocessor option can take arguments.
113 2021-05-10 Alan Modra <amodra@gmail.com>
115 * dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
116 END rather than adding amount to PTR.
117 (SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise.
119 2021-05-09 Alan Modra <amodra@gmail.com>
121 * objcopy.c (eq_string): Delete.
122 (create_symbol_htab): Use htab_eq_string.
124 2021-05-08 Mike Frysinger <vapier@gentoo.org>
126 * README-how-to-make-a-release: Update html & pdf entries.
128 2021-05-08 Mike Frysinger <vapier@gentoo.org>
130 * doc/Makefile.am (html-local, binutils/index.html): New targets.
131 * doc/Makefile.in: Regenerate.
133 2021-05-08 Mike Frysinger <vapier@gentoo.org>
135 * doc/Makefile.am (AM_MAKEINFOFLAGS): Add --no-split.
136 * doc/Makefile.in: Regenerate.
138 2021-05-07 Nick Clifton <nickc@redhat.com>
140 * readelf.c (no_processor_specific_unwind): New function.
141 (process_unwind): Use no_processor_specific_unwind for X86
144 2021-05-07 Michael Forney <mforney@mforney.org>
146 * dwarf.c: Don't omit second operand of '?' operator.
148 2021-04-30 Nick Clifton <nickc@redhat.com>
151 * dwarf.c (load_debug_sup_file): Allocate memory for filename in
154 2021-04-29 Nick Clifton <nickc@redhat.com>
157 * doc/binutils.texi (windres): Correct the description of the
158 default value of the --preprocessor argument.
160 2021-04-27 Nick Clifton <nickc@redhat.com>
163 * dwarf.c (parse_gnu_debuglink): Reject empty names.
164 (parse_gnu_debugaltlink): Likewise.
166 2021-04-22 Clément Chigot <clement.chigot@atos.net>
168 * od-xcoff.c (dump_xcoff32_symbols): Adapt to new
171 2021-04-21 Nick Lott <nick.lott@gmail.com>
174 * readelf.c (sym_base): New variable.
175 (enum print_mode): Add more modes.
176 (print_vma): Add suport for new modes.
177 (options): Add sym-base.
178 (usage): Add sym-base.
179 (parse_args): Add support for --sym-base.
180 (print_dynamic_symbol_size): New function.
181 (print_dynamic_symbol): Use new function.
182 * doc/binutils.texi: Document the new feature.
183 * NEWS: Mention the new feature.
185 2021-04-21 Nick Clifton <nickc@redhat.com>
187 * testsuite/binutils-all/mips/global-local-symtab-sort-n64t.d:
188 Adjust expected output to allow for named section symbols.
189 * testsuite/binutils-all/mips/global-local-symtab-sort-o32t.d:
191 * testsuite/binutils-all/readelf.s-64: Likewise.
192 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
193 * testsuite/binutils-all/readelf.ss-tmips: Likewise.
194 * testsuite/binutils-all/readelf.ss-unused: Likewise.
196 2021-04-21 Luo Longjun <luolongjun@huawei.com>
198 * readelf.c (print_dynamic_symbol): Print the section name for
199 section symbols without a name of their own.
201 2021-04-20 Andreas Krebbel <krebbel@linux.ibm.com>
203 * MAINTAINERS: Remove Martin Schwidefsky as s390 maintainer and
204 add him to Past Maintainers.
205 Update my email address.
207 2021-04-19 Nick Clifton <nickc@redhat.com>
210 * arsup.c (ar_addmod): Enable plugin support, if available.
212 2021-04-19 Nick Clifton <nickc@redhat.com>
214 * rename.c: (get_stat_atime_ns): Add prototype.
215 (get_stat_mtime_ns): Add prototype.
217 2021-04-16 Alan Modra <amodra@gmail.com>
220 * rename.c (get_stat_atime, get_stat_mtime): Make static.
221 (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
223 2021-04-15 Pekka Seppänen <pexu@sourceware.mail.kapsi.fi>
226 * rename.c (get_stat_atime_ns): Add ATTRIBUTE_UNUSED.
227 (get_stat_mtime_ns): Likewise.
229 2021-04-15 Alan Modra <amodra@gmail.com>
232 * configure.ac: Check for sys/time.h and utimensat. Use standard
233 checks for mkstemp and mkdtemp. Whitespace. Check for nanosecond
234 members of struct stat.
235 * rename.c: Prefer sys/time.h for utimes over utime.h for utime.
236 (STAT_TIMESPEC, STAT_TIMESPEC_NS): Define
237 (get_stat_atime_ns, get_stat_mtime_ns): New inline functions.
238 (get_stat_atime, get_stat_mtime): Likewise.
239 (set_times): Choose first available of utimensat, utimes, utime.
240 Use above inline functions to set timespec and timeval values.
241 * configure: Regenerate.
242 * config.in: Regenerate.
243 * testsuite/binutils-all/objcopy.exp (objcopy_test): Add test of
244 file timestamp when --preserve-dates is used.
246 2021-04-15 Alan Modra <amodra@gmail.com>
249 * rename.c (smart_rename): When TO and FROM are equal, just set
251 * objcopy.c (strip_main, copy_main): Always call smart_rename.
253 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
256 * testsuite/binutils-all/x86-64/pr27708.dump: New file.
257 * testsuite/binutils-all/x86-64/pr27708.exe.bz2: Likewise.
258 * testsuite/binutils-all/x86-64/x86-64.exp: Run binutils/27708
261 2021-04-14 Mark Harmstone <mark@harmstone.com>
264 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the
265 end of the structure.
267 2021-04-14 Frederic Cambus <fred@statdns.com>
269 * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
270 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
272 2021-04-14 Alan Modra <amodra@gmail.com>
275 * objdump.c (show_line): Don't limit paths to PATH_MAX.
276 * readelf.c (struct filedata): Change program_interpreter from
277 a char array to a char pointer.
278 (process_program_headers): Sanity check PT_INTERP p_filesz.
279 Malloc program_interpreter using p_filesz and read directly from
281 (process_dynamic_section): Check program_interpreter is non-NULL.
282 (free_filedata): New function, split out from..
283 (process_object): ..here.
284 (close_debug_file): Call free_filedata.
285 * sysdep.h: Don't include sys/param.h.
286 (PATH_MAX): Don't define.
287 * configure.ac: Don't check for sys/param.h.
288 * configure: Regenerate.
290 2021-04-13 Frederic Cambus <fred@statdns.com>
292 * readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
293 check for NT_NETBSD_PAX.
295 2021-04-12 Alan Modra <amodra@gmail.com>
297 * configure.ac (--enable-checking): Add support.
298 * config.in: Regenerate.
299 * configure: Regenerate.
301 2021-04-09 Alan Modra <amodra@gmail.com>
303 * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
305 (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move.
306 (disassemble_section, disassemble_data): Likewise.
308 2021-04-06 Alan Modra <amodra@gmail.com>
310 * objdump.c (objdump_symbol_at_address): Return asymbol*.
312 2021-04-06 Alan Modra <amodra@gmail.com>
314 * NEWS: Mention C99 requirement.
315 * README: Likewise. Modernise examples and "Reporting bugs".
317 2021-04-05 Alan Modra <amodra@gmail.com>
319 * configure.ac: Assume long long is available. Don't test for
320 strings.h, stdlib.h, limits.h, locale.h, or wchar.h. Check
321 inttypes.h, stdint.h, sys/stat.h and sys/types.h. Don't check for
322 strcoll, setlocale, setmode or location of time_t. Don't check
323 for fprintf, getenv, snprintf, strnlen, strstr or vsnprintf decls.
324 (AC_ISC_POSIX, AXC_HEADER_STRING, AC_FUNC_ALLOCA): Don't invoke.
325 * sysdep.h: Don't include alloca-conf.h, include config.h instead.
326 Test HAVE_SYS_TYPES_H and reorder includes. Include limits.h,
327 locale.h, string.h and stdlib.h unconditionally. Remove various
328 fallback declarations. Assume long long is available.
329 * addr2line.c: Don't test HAVE_SETLOCALE.
331 * coffdump.c: Likewise.
332 * dlltool.c: Likewise.
333 * dllwrap.c: Likewise.
334 * elfedit.c: Likewise.
336 * objcopy.c: Likewise.
337 * objdump.c: Likewise.
338 * readelf.c: Likewise.
340 * srconv.c: Likewise.
341 * strings.c: Likewise.
342 * sysdump.c: Likewise.
343 * windmc.c: Likewise.
344 * windres.c: Likewise.
345 * bucomm.c: Don't test HAVE_TIME_T_IN_TIME_H or HAVE_TIME_T_IN_TYPES_H.
346 * dwarf.c: Include limits.h unconditionally. Assume long long
348 * nm.c: Don't test HAVE_STRCOLL.
349 * readelf.c: Don't test HAVE_WCHAR_H.
350 * strings.c: Assume long long is available.
351 * syslex.l: Include string.h unconditionally.
352 * aclocal.m4: Regenerate.
353 * config.in: Regenerate.
354 * configure: Regenerate.
355 * Makefile.in: Regenerate.
356 * doc/Makefile.in: Regenerate.
358 2021-04-01 Martin Liska <mliska@suse.cz>
360 * elfcomm.h (strneq): Remove strneq and use startswith.
361 * readelf.c (ia64_process_unwind): Likewise.
362 (process_note): Likewise.
364 2021-04-01 Martin Liska <mliska@suse.cz>
366 * dllwrap.c: Use startswith function.
367 * objcopy.c (is_dwo_section): Likewise.
368 (handle_remove_section_option): Likewise.
369 (copy_main): Likewise.
370 * objdump.c (is_significant_symbol_name): Likewise.
372 2021-04-01 Martin Liska <mliska@suse.cz>
374 * dwarf.c (display_debug_lines_raw): Replace const_strneq with
376 (display_debug_lines_decoded): Likewise.
377 (display_debug_links): Likewise.
378 * elfcomm.c (setup_archive): Likewise.
379 * elfcomm.h (const_strneq): Likewise.
380 * readelf.c (process_section_headers): Likewise.
381 (slurp_ia64_unwind_table): Likewise.
382 (slurp_hppa_unwind_table): Likewise.
383 (decode_arm_unwind): Likewise.
384 (display_debug_section): Likewise.
385 (process_note): Likewise.
387 2021-03-31 Alan Modra <amodra@gmail.com>
389 * sysdep.h (POISON_BFD_BOOLEAN): Define.
390 * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
391 * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
392 * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
393 * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
394 * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
395 * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
396 * windmc.c, * windmc.h, * windres.c, * winduni.c,
397 * wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
398 and TRUE with true throughout.
400 2021-03-31 Alan Modra <amodra@gmail.com>
402 * coffdump.c: Include stdint.h in place of bfd_stdint.h.
405 2021-03-31 Alan Modra <amodra@gmail.com>
407 * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
409 2021-03-29 Alan Modra <amodra@gmail.com>
411 * dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
412 * dwarf.c (read_and_display_attr_value): Likewise.
413 (display_debug_str_offsets): Likewise.
414 * objdump.c (dump_bfd): Likewise.
415 * readelf.c (dump_section_as_strings): Likewise.
416 (dump_section_as_bytes): Likewise.
418 2021-03-29 Alan Modra <amodra@gmail.com>
420 * objdump.c (process_links): Use type int.
421 * readelf.c (request_dump): Don't increment do_dump, set it.
422 * windint.h (target_is_bigendian): Use type bfd_boolean.
423 * windmc.c (target_is_bigendian): Likewise.
424 * windres.c (target_is_bigendian): Likewise.
426 2021-03-22 Martin Liska <mliska@suse.cz>
428 * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ
430 * emul_aix.c (ar_emul_aix_parse_arg): Likewise.
431 * objcopy.c (is_mergeable_note_section): Likewise.
432 * objdump.c (dump_dwarf_section): Likewise.
433 * prdbg.c (pr_method_type): Likewise.
434 (pr_class_baseclass): Likewise.
435 (tg_class_baseclass): Likewise.
436 * readelf.c (process_lto_symbol_tables): Likewise.
437 * stabs.c (ULLHIGH): Likewise.
438 (parse_stab_argtypes): Likewise.
439 (stab_demangle_function_name): Likewise.
441 2021-03-19 H.J. Lu <hongjiu.lu@intel.com>
443 * readelf.c (get_machine_name): Add EM_INTELGT.
445 2021-03-18 Nick Clifton <nickc@redhat.com>
448 * readelf.c (dump_section_as_strings): Mention separate filename.
449 (dump_section_as_bytes): Likewise.
450 (dump_section_as_ctf): Likewise.
451 (initialise_dumkps_byname): Only issue a warning for missing
452 sections if processing the main file.
453 (process_section_contents): Only issue a warning for unsumped
454 section numbers in the main file.
455 (initialise_dump_sects): New function. Contains code extracted
457 (process_object): ... here. Also call initialise_dump_sects for
460 2021-03-16 Nick Clifton <nickc@redhat.com>
463 * readelf.c (display_debug_section): Also retain .debug_addr
466 2021-03-16 Nick Clifton <nickc@redhat.com>
469 * readelf.c (process_section_contents): Only dump debug
470 information for separate files unless process_links is enabled.
471 (process_object): Always call process_section_contents for
474 2021-03-15 Nick Clifton <nickc@redhat.com>
477 * nm.c (FORMAT_JUST_SYMBOLS): Define.
478 (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS.
479 (long_options): Add just-symbols.
480 (set_output_format): Add support for just-symbols.
481 (get_print_format): Likewise.
482 (do_not_print_object_filename): New function.
483 (do_not_print_archive_filename): New function.
484 (do_not_print_archive_member): New function.
485 (do_not_print_symbol_filename): New function.
486 (just_print_symbol_name): New function.
487 (main): Handle --just-symbols.
488 * NEWS: Mention the new feature.
489 * doc/binutils.texi: Document the new feature.
491 2021-03-12 Clément Chigot <clement.chigot@atos.net>
493 * od-xcoff.c: Replace RTB by TRL entry.
495 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
496 Andrew Burgess <andrew.burgess@embecosm.com>
498 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
500 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
501 Andrew Burgess <andrew.burgess@embecosm.com>
503 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
505 2021-03-05 Nick Clifton <nickc@redhat.com>
508 * dwarf.c (display_debug_macro): Handle the displaying of
509 DW_MACRO_define_strp and DW_MACRO_undef_strp in v4
510 .debug_macro.dwo sections.
512 2021-03-04 Nick Clifton <nickc@redhat.com>
515 * objdump.c (process_links): New variable.
516 (usage): Add --process-links.
517 (long_options): Likewise.
518 (dump_bfd): Stop processing once the bfd has been loaded unless
519 this is the main file or process_links has been enabled.
520 (main): Handle the process-links option.
521 * readelf.c (process_links): New variable.
522 (struct filedata): Add is_separate field.
523 (options): Add --process-links.
525 (parse_args): Likewise.
526 (process_file_header): Include the filename when dumping
527 information for separate debuginfo files.
528 (process_program_headers): Likewise.
529 (process_section_headers): Likewise.
530 (process_section_groups): Likewise.
531 (process_relocs): Likewise.
532 (process_dynamic_section): Likewise.
533 (process_version_sections): Likewise.
534 (display_lto_symtab): Likewise.
535 (process_symbol_table): Likewise.
536 (process_syminfo): Likewise.
537 (initialise_dumps_by_name): Likewise.
538 (process_section_contents): Likewise.
539 (process_notes_at): Likewise.
540 (process_notes): Likewise.
541 (open_file): Add is_separate parameter. Use to initialise the
542 is_separate field in the filedata structure.
543 (open_deug): Update call to open_file.
544 (process_object): Add processing of the contents of separate
545 debuginfo files, gated by the process_links variable.
546 (process_archive): Update call to open_file.
547 (process_file): Initialise the is_separate field in the filedata
549 * dwarf.c (load_separate_debug_info_file): Only report the
550 loading of a separate file if debug links are being dumped.
551 * objcopy.c (keep_section_symbols): New variable.
552 (enum command_line_switch): Add OPTION_KEEP_SYMBOLS.
553 (strip_options): Add keep-section-symbols.
554 (copy_options): Likewise.
555 (copy_usage): Likewise.
556 (strip_usage): Likewise.
557 (copy_object): Keep section symbols if requested by command line
559 (strip_main): Handle --keep-section-symbols.
560 (copy_main): Likewise.
561 * doc/binutils.texi: Document the new options.
562 * NEWS: Mention the new features.
563 * testsuite/binutils-all/compress.exp (test_gnu_debuglink):
564 Update options passed to objdump. Use diff rather than cmp to
565 compare the dumped data.
566 * testsuite/binutils-all/objdump.WK2: Update regexp.
567 * testsuite/binutils-all/objdump.WK3: Update regexp.
568 * testsuite/binutils-all/objdump.exp: Use --process-links
569 instead of --dwarf=follow-links.
570 * testsuite/binutils-all/readelf.exp (readelf_test): Include
571 readelf's output in the log when the test fails.
572 Add the -P option to the -wKis test.
573 * testsuite/binutils-all/readelf.wKis: Update expected output.
575 2021-03-03 Alan Modra <amodra@gmail.com>
578 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
579 * NEWS: Mention feature.
581 2021-03-01 H.J. Lu <hongjiu.lu@intel.com>
584 * dwarf.c (load_separate_debug_info): Issue warning only if
585 do_debug_links is set.
586 * testsuite/binutils-all/compress.exp: Run objdump and readelf
587 with missing debug file.
589 2021-03-01 Alan Modra <amodra@gmail.com>
592 * doc/binutils.texi: Add nm --with-symbol-versions and
593 --without-symbol-versions documentation.
594 * nm.c (with_symbol_versions): New variable.
595 (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
596 (long_options): Make --with-symbol-versions entry twiddle the flag.
597 Add --without-symbol-versions.
598 (print_symname): Strip version when !with_symbol_versions. Add
599 dynamic version info under control of with_symbol_versions.
600 (main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
602 2021-02-26 Fangrui Song <maskray@google.com>
605 * readelf.c (quiet): New option flag.
606 (enum long_option_values): New enum to hold long option value.
607 (long_options): Add --quiet.
608 (usage): Mention --quiet.
609 (display_rel_file): If quiet is enabled, suppress "no symbols".
610 (main): Handle the new option.
611 * NEWS: Mention --quiet.
612 * docs/binutils.texi: Document --quiet.
614 2021-02-26 Tom de Vries <tdevries@suse.de>
616 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
618 2021-02-26 Tom de Vries <tdevries@suse.de>
621 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
623 (read_and_display_attr_value): Likewise.
625 2021-02-25 Nick Clifton <nickc@redhat.com>
627 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
629 (read_and_display_attr_value): Handle sup forms.
630 (display_debug_sup): New function. Displays the contents of a
632 (load_debug_sup_file): New function. Loads the contents of a file
633 referenced by a .debug_sup section.
634 (check_for_and_load_links): Call load_debug_sup_file.
635 (debug_displays): Add entry for .debug_sup.
636 * dwarf.h (enum dwarf_section_display_enum): Add debug_sup.
637 * readelf.c (process_section_headers): Add support for debug_sup.
638 * doc/debug.options.texi: Note that the =links option will display
639 the contents of .debug_sup sections.
640 * NEWS: Mention the new support.
642 2021-02-25 Alan Modra <amodra@gmail.com>
645 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
647 2021-02-24 Nick Clifton <nickc@redhat.com>
650 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
651 when adding together the section sizes.
653 2021-02-24 Nick Clifton <nickc@redhat.com>
655 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
657 * readelf.c (print_gnu_build_attribute_description): Likewise.
659 2021-02-24 Alan Modra <amodra@gmail.com>
660 Siddhesh Poyarekar <siddhesh@gotplt.org>
663 * bucomm.h (smart_rename): Update prototype.
664 * rename.c (smart_rename): Add fromfd and preserve_dates params.
665 Pass fromfd and target_stat to simple_copy. Call set_times
667 (simple_copy): Accept fromfd rather than from filename. Add
668 target_stat param. Rewind fromfd rather than opening. Open
669 "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
670 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
671 closing output temp file, and pass tmpfd to smart_rename.
672 * arsup.c (temp_fd): Rename from real_fd.
673 (ar_save): Dup temp_fd and pass to smart_rename.
674 * objcopy.c (strip_main, copy_main): Likewise, and pass
677 2021-02-24 Alan Modra <amodra@gmail.com>
680 * rename.c: Tidy throughout.
681 (smart_rename): Always copy. Remove windows specific code.
683 2021-02-20 Alan Modra <amodra@gmail.com>
685 * testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
686 (run_dump_test): Fail if expecting errors from a file like we do
687 for error strings, if no error is seen.
689 2021-02-19 Alan Modra <amodra@gmail.com>
691 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
693 2021-02-19 Siddhesh Poyarekar <siddhesh@gotplt.org>
695 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
697 * arsup.c (ar_save): Likewise.
698 * objcopy (strip_main): Don't copy TMPFD. Don't set times on
699 temporary file and adjust call to SMART_RENAME.
700 (copy_main): Likewise.
701 * rename.c [!S_ISLNK]: Remove definitions.
702 (try_preserve_permissions): Remove function.
703 (smart_rename): Remove FD, PRESERVE_DATES arguments. Use
704 rename system call only if TO does not exist.
705 * bucomm.h (smart_rename): Adjust declaration.
707 2021-02-18 Nick Clifton <nickc@redhat.com>
709 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
710 address that is higher than the end address.
712 2021-02-17 Alan Modra <amodra@gmail.com>
714 * dwarf.c: Include limits.h.
715 (CHAR_BIT): Provide backup define.
716 (read_leb128): Use CHAR_BIT to size "result" in bits. Correct
717 signed overflow checking.
718 * testsuite/binutils-all/pr26548.s,
719 * testsuite/binutils-all/pr26548.d,
720 * testsuite/binutils-all/pr26548e.d: New tests.
721 * testsuite/binutils-all/readelf.exp: Run them.
722 (readelf_test): Drop unused "xfails" parameter. Update all uses.
724 2021-02-16 Jan Beulich <jbeulich@suse.com>
726 * dwarf.c (process_debug_info): Initialize "dwo_id".
728 2021-02-15 Alan Modra <amodra@gmail.com>
730 * objdump.c (load_specific_debug_section): Don't call
731 bfd_cache_section_contents. Rearrange so that
732 bfd_get_full_section_contents is not called on path where
733 bfd_simple_get_relocated_section_contents is called.
734 Don't set section->user_data.
735 (free_debug_section): Always free section->start. Don't twiddle
737 * readelf.c (load_specific_debug_section): Don't set user_data.
738 * dwarf.h (struct dwarf_section): Remove use_data field.
739 * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
741 2021-02-15 Alan Modra <amodra@gmail.com>
743 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
744 * testsuite/binutils-all/objdump.exp: Likewise.
746 2021-02-14 Alan Modra <amodra@gmail.com>
748 * objdump.c (slurp_symtab): Don't add an extra entry for NULL
750 (slurp_dynamic_symtab): Likewise.
751 (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
753 2021-02-14 Alan Modra <amodra@gmail.com>
755 * Makefile.in: Regenerate.
756 * doc/Makefile.in: Regenerate.
758 2021-02-13 Mike Frysinger <vapier@gentoo.org>
760 * aclocal.m4: Regenerate.
762 2021-02-12 Nick Clifton <nickc@redhat.com>
764 * configure.ac (follow-debug-links): Add option to enable or
765 disable the following of debug links by default. Set the
766 default for the option to be 'follow'.
767 * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
768 (dwarf_select_sections_by_names): Add no-follow-links option.
769 (dwarf_select_sections_by_letter): Add 'N' option.
770 * objdump.c (usage): Add conditional text describing the
772 (slurp_symtab): Ensure that there is a NULL entry at the end
774 (slurp_dynamic_symtab): Likewise.
775 (dump_bfd): When extending the symbol table, ensure that there
776 is still a NULL entry at the end.
777 * readelf.c (usage): Add conditional text describing the
779 * doc/binutils.texi: Update documentation for objcopy and
781 * doc/debug.options.texi: Update documentation of the
783 * config.in: Regenerate.
784 * configure: Regenerate.
785 * testsuite/binutils-all/compress.exp: Add the -WN option to
786 objdump command lines that are not expecting to follow links.
787 * testsuite/binutils-all/readelf.exp: Add the
788 --debug-dump=no-follow-links option to tests that are not
789 expecting to follow debug links.
790 * NEWS: Mention the new behaviour.
792 2021-02-12 Alan Modra <amodra@gmail.com>
794 * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
795 gas or ld fails to build a testcase rather than "unresolved".
796 Report "fail" when readelf returns an error status rather than
798 * testsuite/binutils-all/ar.exp: Likewise.
799 * testsuite/binutils-all/compress.exp: Likewise.
800 * testsuite/binutils-all/readelf.exp: Likewise.
802 2021-02-12 Alan Modra <amodra@gmail.com>
804 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
805 "c" with "ccc" labels.
807 2021-02-12 Tom de Vries <tdevries@suse.de>
809 * dwarf.h (debug_info): Fix typo in comment.
811 2021-02-12 Tom de Vries <tdevries@suse.de>
813 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
816 2021-02-12 Tom de Vries <tdevries@suse.de>
818 * dwarf.c (process_debug_info): Print DWO ID.
820 2021-02-11 Alan Modra <amodra@gmail.com>
825 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
826 Use bfd_malloc_and_get_section.
827 (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
828 check namesz. Return NULL if descsz is too small. Ensure
829 string table is terminated.
830 (elf32_avr_get_device_info): Formatting. Add note_size param.
832 (elf32_avr_dump_mem_usage): Adjust to suit.
834 2021-02-10 Tom de Vries <tdevries@suse.de>
837 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
839 2021-02-10 Tom de Vries <tdevries@suse.de>
842 * dwarf.c (display_debug_ranges): Filter range lists according to
845 2021-02-09 Tom de Vries <tdevries@suse.de>
848 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
850 2021-02-09 Tom de Vries <tdevries@suse.de>
853 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
856 2021-02-09 Alan Modra <amodra@gmail.com>
858 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
861 2021-02-07 Alan Modra <amodra@gmail.com>
863 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
864 uninitialised on invalid input.
866 2021-02-06 Alan Modra <amodra@gmail.com>
869 * rename.c (smart_rename): Test for existence and type of output
872 2021-02-05 Nick Clifton <nickc@redhat.com>
874 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
876 2021-02-05 Eli Zaretskii <eliz@gnu.org>
879 * elfedit.c (check_file):
880 * bucomm.c (get_file_size): Fix typos in comments.
882 2021-02-05 Alan Modra <amodra@gmail.com>
885 * arsup.c (ar_save): Use stat rather than lstat.
887 2021-02-03 Alan Modra <amodra@gmail.com>
892 * ar.c: Don't include libbfd.h.
893 (write_archive): Replace xmalloc+strcpy with xstrdup. Use
894 bfd_stat rather than fstat on iostream. Move stat and fd tests
895 outside of _WIN32 ifdef. Delete skip_stat variable.
896 * arsup.c (temp_name, real_ofd): New static variables.
897 (ar_open): Use make_tempname and bfd_fdopenw.
898 (ar_save): Adjust to suit ar_open changes. Move stat output
900 * objcopy.c: Don't include libbfd.h.
901 (copy_file): Use bfd_stat.
903 2021-02-02 H.J. Lu <hongjiu.lu@intel.com>
906 * readelf.c (process_section_headers): Add 'R' and 'D' to
908 * testsuite/binutils-all/retain1a.d: Updated.
910 2021-01-30 Nick Clifton <nickc@redhat.com>
912 * README-how-to-make-a-release: Small updates after the 2.35.2
915 2021-01-28 Eli Zaretskii <eliz@gnu.org>
918 * windres.c (quot): Use double quotes to protect strings on
921 2021-01-28 Eli Zaretskii <eliz@gnu.org>
924 * bucomm.c (get_file_size): Add code to handle /dev/null on
926 * elfedit.c (check_file): Likewise.
928 2021-01-27 Nick Clifton <nickc@redhat.com>
930 * objcopy.c (copy_main): Remove conditional control of the calls
931 to free, simplifying the code and making it easier to detect
934 2021-01-26 Frederic Cambus <fred@statdns.com>
936 * objcopy.c (copy_main): Fix a double free happening when both
937 --localize-symbols and --globalize-symbols options are invoked
940 2021-01-24 Nick Clifton <nickc@redhat.com>
942 * README-how-to-make-a-release: Minor updates after the 2.36 release.
944 2021-01-16 Alan Modra <amodra@gmail.com>
946 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
948 2021-01-15 Alan Modra <amodra@gmail.com>
951 * readelf.c (uncompress_section_contents): Always call inflateEnd.
953 2021-01-14 Alexandre Oliva <oliva@gnu.org>
955 * MAINTAINERS: Update my email address.
957 2021-01-14 Nick Clifton <nickc@redhat.com>
959 * po/sv.po: Updated Swedish translation.
961 2021-01-13 Alan Modra <amodra@gmail.com>
963 * Makefile.in: Regenerate.
964 * doc/Makefile.in: Regenerate.
966 2021-01-13 Zebediah Figura <z.figura12@gmail.com>
969 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
971 (i386_x64_trampoline): Add SEH annotations.
972 (struct mac): Add how_seh field.
973 (make_delay_head): If how_set field is true add SEh instructions.
975 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
978 * configure.ac: Use GNU_MAKE_JOBSERVER.
979 * aclocal.m4: Regenerated.
980 * configure: Likewise.
982 2021-01-12 Nick Clifton <nickc@redhat.com>
984 * po/fr.po: Updated French translation.
986 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
989 * configure: Regenerated.
991 2021-01-11 Nick Clifton <nickc@redhat.com>
993 * po/pt.po: Updated Portuguese translation.
994 * po/sr.po: Updated Serbian translation.
995 * po/uk.po: Updated Ukranian translation.
997 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
999 * configure: Regenerated.
1001 2021-01-09 Nick Clifton <nickc@redhat.com>
1003 * configure: Regenerate.
1004 * po/binutils.pot: Regenerate.
1006 2021-01-09 Nick Clifton <nickc@redhat.com>
1008 * 2.36 release branch crated.
1009 * README-how-to-make-a-release: Add note about updating Makefiles
1011 * BRANCHES: Add binutils-2.36-branch.
1013 2021-01-09 Alan Modra <amodra@gmail.com>
1015 * configure: Regenerate.
1017 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1019 * configure: Regenerate.
1021 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1024 * objcopy.c (copy_object): Handle section symbols for
1025 non-relocatable inputs.
1026 * testsuite/binutils-all/readelf.exp (readelf_test): Check
1027 is_elf_unused_section_symbols.
1028 * testsuite/binutils-all/readelf.s-64: Updated.
1029 * testsuite/binutils-all/readelf.ss: Likewise.
1030 * testsuite/binutils-all/readelf.ss-64: Likewise.
1031 * testsuite/binutils-all/readelf.s-64-unused: New file.
1032 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
1033 * testsuite/binutils-all/readelf.ss-unused: Likewise.
1034 * testsuite/lib/binutils-common.exp
1035 (is_elf_unused_section_symbols): New proc.
1037 2021-01-06 Reuben Thomas <rrt@sc3d.org>
1039 * binutils/readelf.c: Correct grammar in comment.
1041 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1043 * coffgrok.c (do_type): Correct spelling of auxiliary in errors.
1044 * doc/binutils.texi: Correct grammar.
1045 * readelf.c (process_version_sections): Correct spelling of auxiliary
1047 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
1049 2021-01-01 Alan Modra <amodra@gmail.com>
1051 Update year range in copyright notice of all files.
1053 For older changes see ChangeLog-2020
1055 Copyright (C) 2021 Free Software Foundation, Inc.
1057 Copying and distribution of this file, with or without modification,
1058 are permitted in any medium without royalty provided the copyright
1059 notice and this notice are preserved.
1065 version-control: never