1 2021-05-15 Alan Modra <amodra@gmail.com>
3 * dwarf.c (display_gdb_index): Avoid pointer UB and overflow in
6 2021-05-15 Alan Modra <amodra@gmail.com>
8 * dwarf.c (display_debug_names): Complain when header length is
9 too small. Avoid pointer UB. Sanity check augmentation string,
10 CU table, TU table and foreign TU table sizes.
12 2021-05-15 Alan Modra <amodra@gmail.com>
14 * dwarf.c (display_debug_frames): Delete initial_length_size.
15 Avoid pointer UB. Constrain data reads to length given in header.
16 Sanity check cie header length. Only skip up to next FDE on
17 finding augmentation data too long.
19 2021-05-15 Alan Modra <amodra@gmail.com>
21 * dwarf.c (read_cie): Add more sanity checks to ensure data
22 pointer is not bumped past end.
24 2021-05-15 Alan Modra <amodra@gmail.com>
26 * dwarf.c (display_debug_ranges): Delete initial_length_size.
27 Correct fallback size calculated on finding a reloc. Constrain
28 data reads to length given in header. Avoid pointer UB.
30 2021-05-15 Alan Modra <amodra@gmail.com>
32 * dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
34 2021-05-15 Alan Modra <amodra@gmail.com>
36 * dwarf.c (display_debug_str_offsets): Constrain reads to length
39 2021-05-15 Alan Modra <amodra@gmail.com>
41 * dwarf.c (display_debug_aranges): Delete initial_length_size.
42 Use end_ranges to constrain data reads to header length. Avoid
45 2021-05-15 Alan Modra <amodra@gmail.com>
47 * dwarf.c (display_loc_list): Avoid pointer UB. Correct check
48 before reading uleb length. Warn on excess length.
50 2021-05-15 Alan Modra <amodra@gmail.com>
52 * dwarf.c (display_debug_macro): Print strings that might not
53 be zero terminated with %*s. Don't bump curr if unterminated.
55 2021-05-15 Alan Modra <amodra@gmail.com>
57 * dwarf.c (get_line_filename_and_dirname): Delete initial_length_size.
58 Simplify length sanity check, and check for too small lengths.
59 Constrain data reads to header length. Avoid pointer UB.
61 2021-05-15 Alan Modra <amodra@gmail.com>
63 * dwarf.c (display_debug_macinfo): Print strings that might not
64 be zero terminated with %*s. Don't bump curr if unterminated.
66 2021-05-15 Alan Modra <amodra@gmail.com>
68 * dwarf.c (display_debug_pubnames_worker): Delete initial_length_size.
69 Simplify length check. Constrain reads to length given by header.
71 2021-05-15 Alan Modra <amodra@gmail.com>
73 * dwarf.c (display_debug_lines_decoded): Don't use strnlen when
74 we have already checked for NUL termination.
76 2021-05-15 Alan Modra <amodra@gmail.com>
78 * dwarf.c (read_debug_line_header): Delete initial_length_size.
79 Avoid pointer UB. Keep within length specified by header.
82 2021-05-15 Alan Modra <amodra@gmail.com>
84 * dwarf.c (process_debug_info): Always do the first CU length
85 scan for sanity checks. Remove initial_length_size var and
86 instead calculate end_cu. Use end_cu to limit data reads.
87 Delete now dead code checking length.
89 2021-05-15 Alan Modra <amodra@gmail.com>
91 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Assert only when ENABLE_CHECKING.
93 2021-05-15 Alan Modra <amodra@gmail.com>
95 * bucomm.h (_mul_overflow): Define.
96 * dwarf.c (get_encoded_value): Avoid pointer UB.
98 2021-05-13 Alan Modra <amodra@gmail.com>
101 * dwarf.c (display_debug_str_offsets): Sanity check dwarf5
104 2021-05-13 Alan Modra <amodra@gmail.com>
107 * dwarf.c (display_debug_frames): Sanity check cie_off before
108 attempting to read cie.
110 2021-05-12 Alan Modra <amodra@gmail.com>
112 * dwarf.c (process_extended_line_op): Don't bump data pointer past
113 end when strnlen doesn't find string terminator.
114 (decode_location_expression): Remove dead code.
115 (skip_attr_bytes): Remove const from end param. Ensure data
116 pointer doesn't pass end.
117 (get_type_signedness): Remove const from end param.
118 (read_and_display_attr_value): Ensure data pointer doesn't pass end.
119 (display_debug_lines_raw, display_debug_lines_decoded): Likewise.
120 (display_debug_pubnames_worker): Likewise.
121 (display_debug_pubnames_worker): Use SAFE_BYTE_GET_AND INC rather
122 than blindly incrementing data pointer.
123 (display_debug_addr, display_debug_str_offsets): Likewise. Don't
124 compare pointers, compare lengths.
126 2021-05-12 Alan Modra <amodra@gmail.com>
128 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Define.
129 (SAFE_BYTE_GET, SAFE_BYTE_GET_AND_INC): Define using the above.
130 (SAFE_SIGNED_BYTE_GET, SAFE_SIGNED_BYTE_GET_AND_INC): Likewise.
131 (display_discr_list): Use SAFE_BYTE_GET_AND_INC rather than
132 SAFE_BYTE_GET followed by increment.
133 (process_debug_info): Likewise, and test bytes remaining before
134 incrementing section_begin rather than using pointer comparison.
135 (display_debug_names): Pass lvalue as SAFE_BYTE_GET PTR.
136 (process_cu_tu_index): Likewise for SAFE_BYTE_GET_AND_INC.
138 2021-05-12 Alan Modra <amodra@gmail.com>
140 * dwarf.c (dwarf_vmatoa64, SAFE_BYTE_GET64, add64): Delete.
141 (skip_attr_bytes): Replace use of SAFE_BYTE_GET64 with
142 SAFE_BYTE_GET_AND_INC.
143 (read_and_display_attr_value): Likewise. Print using dwarf_vmatoa.
144 (process_debug_info, process_cu_tu_index): Likewise.
145 * elfcomm.c (byte_put, byte_put_little_endian, byte_put_big_endian),
146 (byte_get, byte_get_little_endian, byte_get_big_endian),
147 (byte_get_signed): Make size param unsigned. Remove code dealing
149 (byte_get_64): Delete.
150 * elfcomm.h (byte_put, byte_put_little_endian, byte_put_big_endian),
151 (byte_get, byte_get_little_endian, byte_get_big_endian),
152 (byte_get_signed): Update prototypes.
153 (byte_get_64): Delete.
155 2021-05-12 Alan Modra <amodra@gmail.com>
158 * dwarf.c (display_debug_frames): Don't compare pointers derived
159 from user input. Test offset against bounds instead.
161 2021-05-12 Alan Modra <amodra@gmail.com>
164 * dwarf.c (display_formatted_table): Test for data >= end rather
166 (process_extended_line_op): Likewise.
167 (display_debug_lines_raw): Likewise.
168 (display_debug_lines_decoded): Likewise.
170 2021-05-12 Alan Modra <amodra@gmail.com>
173 * dwarf.c (fetch_indexed_string): Correct length sanity checks.
174 Sanity check section size for version and padding too. Correct
175 index sanity check. Handle multiple tables in .debug_str_offsets.
177 2021-05-11 Hans-Peter Nilsson <hp@axis.com>
179 * dwarf.c (process_abbrev_set): Properly parenthesize before
180 casting to unsigned long.
182 2021-05-11 Alan Modra <amodra@gmail.com>
185 * dwarf.c (process_abbrev_set): Replace start and end parameters
186 with section, abbrev_base, abbrev_size, abbrev_offset. Update
187 all callers. Sanity check parameters correctly and emit warnings
189 (process_debug_info): ..here.
191 2021-05-10 Thomas Wolff <towo@towo.net>
196 * windres.c (quot): Revert previous delta. Do not use double
197 quotes when spaces are detected in options.
198 * doc/binutils.texi (windres): Remove suggestion that the
199 --preprocessor option can take arguments.
201 2021-05-10 Alan Modra <amodra@gmail.com>
203 * dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
204 END rather than adding amount to PTR.
205 (SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise.
207 2021-05-09 Alan Modra <amodra@gmail.com>
209 * objcopy.c (eq_string): Delete.
210 (create_symbol_htab): Use htab_eq_string.
212 2021-05-08 Mike Frysinger <vapier@gentoo.org>
214 * README-how-to-make-a-release: Update html & pdf entries.
216 2021-05-08 Mike Frysinger <vapier@gentoo.org>
218 * doc/Makefile.am (html-local, binutils/index.html): New targets.
219 * doc/Makefile.in: Regenerate.
221 2021-05-08 Mike Frysinger <vapier@gentoo.org>
223 * doc/Makefile.am (AM_MAKEINFOFLAGS): Add --no-split.
224 * doc/Makefile.in: Regenerate.
226 2021-05-07 Nick Clifton <nickc@redhat.com>
228 * readelf.c (no_processor_specific_unwind): New function.
229 (process_unwind): Use no_processor_specific_unwind for X86
232 2021-05-07 Michael Forney <mforney@mforney.org>
234 * dwarf.c: Don't omit second operand of '?' operator.
236 2021-04-30 Nick Clifton <nickc@redhat.com>
239 * dwarf.c (load_debug_sup_file): Allocate memory for filename in
242 2021-04-29 Nick Clifton <nickc@redhat.com>
245 * doc/binutils.texi (windres): Correct the description of the
246 default value of the --preprocessor argument.
248 2021-04-27 Nick Clifton <nickc@redhat.com>
251 * dwarf.c (parse_gnu_debuglink): Reject empty names.
252 (parse_gnu_debugaltlink): Likewise.
254 2021-04-22 Clément Chigot <clement.chigot@atos.net>
256 * od-xcoff.c (dump_xcoff32_symbols): Adapt to new
259 2021-04-21 Nick Lott <nick.lott@gmail.com>
262 * readelf.c (sym_base): New variable.
263 (enum print_mode): Add more modes.
264 (print_vma): Add suport for new modes.
265 (options): Add sym-base.
266 (usage): Add sym-base.
267 (parse_args): Add support for --sym-base.
268 (print_dynamic_symbol_size): New function.
269 (print_dynamic_symbol): Use new function.
270 * doc/binutils.texi: Document the new feature.
271 * NEWS: Mention the new feature.
273 2021-04-21 Nick Clifton <nickc@redhat.com>
275 * testsuite/binutils-all/mips/global-local-symtab-sort-n64t.d:
276 Adjust expected output to allow for named section symbols.
277 * testsuite/binutils-all/mips/global-local-symtab-sort-o32t.d:
279 * testsuite/binutils-all/readelf.s-64: Likewise.
280 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
281 * testsuite/binutils-all/readelf.ss-tmips: Likewise.
282 * testsuite/binutils-all/readelf.ss-unused: Likewise.
284 2021-04-21 Luo Longjun <luolongjun@huawei.com>
286 * readelf.c (print_dynamic_symbol): Print the section name for
287 section symbols without a name of their own.
289 2021-04-20 Andreas Krebbel <krebbel@linux.ibm.com>
291 * MAINTAINERS: Remove Martin Schwidefsky as s390 maintainer and
292 add him to Past Maintainers.
293 Update my email address.
295 2021-04-19 Nick Clifton <nickc@redhat.com>
298 * arsup.c (ar_addmod): Enable plugin support, if available.
300 2021-04-19 Nick Clifton <nickc@redhat.com>
302 * rename.c: (get_stat_atime_ns): Add prototype.
303 (get_stat_mtime_ns): Add prototype.
305 2021-04-16 Alan Modra <amodra@gmail.com>
308 * rename.c (get_stat_atime, get_stat_mtime): Make static.
309 (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
311 2021-04-15 Pekka Seppänen <pexu@sourceware.mail.kapsi.fi>
314 * rename.c (get_stat_atime_ns): Add ATTRIBUTE_UNUSED.
315 (get_stat_mtime_ns): Likewise.
317 2021-04-15 Alan Modra <amodra@gmail.com>
320 * configure.ac: Check for sys/time.h and utimensat. Use standard
321 checks for mkstemp and mkdtemp. Whitespace. Check for nanosecond
322 members of struct stat.
323 * rename.c: Prefer sys/time.h for utimes over utime.h for utime.
324 (STAT_TIMESPEC, STAT_TIMESPEC_NS): Define
325 (get_stat_atime_ns, get_stat_mtime_ns): New inline functions.
326 (get_stat_atime, get_stat_mtime): Likewise.
327 (set_times): Choose first available of utimensat, utimes, utime.
328 Use above inline functions to set timespec and timeval values.
329 * configure: Regenerate.
330 * config.in: Regenerate.
331 * testsuite/binutils-all/objcopy.exp (objcopy_test): Add test of
332 file timestamp when --preserve-dates is used.
334 2021-04-15 Alan Modra <amodra@gmail.com>
337 * rename.c (smart_rename): When TO and FROM are equal, just set
339 * objcopy.c (strip_main, copy_main): Always call smart_rename.
341 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
344 * testsuite/binutils-all/x86-64/pr27708.dump: New file.
345 * testsuite/binutils-all/x86-64/pr27708.exe.bz2: Likewise.
346 * testsuite/binutils-all/x86-64/x86-64.exp: Run binutils/27708
349 2021-04-14 Mark Harmstone <mark@harmstone.com>
352 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the
353 end of the structure.
355 2021-04-14 Frederic Cambus <fred@statdns.com>
357 * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
358 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
360 2021-04-14 Alan Modra <amodra@gmail.com>
363 * objdump.c (show_line): Don't limit paths to PATH_MAX.
364 * readelf.c (struct filedata): Change program_interpreter from
365 a char array to a char pointer.
366 (process_program_headers): Sanity check PT_INTERP p_filesz.
367 Malloc program_interpreter using p_filesz and read directly from
369 (process_dynamic_section): Check program_interpreter is non-NULL.
370 (free_filedata): New function, split out from..
371 (process_object): ..here.
372 (close_debug_file): Call free_filedata.
373 * sysdep.h: Don't include sys/param.h.
374 (PATH_MAX): Don't define.
375 * configure.ac: Don't check for sys/param.h.
376 * configure: Regenerate.
378 2021-04-13 Frederic Cambus <fred@statdns.com>
380 * readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
381 check for NT_NETBSD_PAX.
383 2021-04-12 Alan Modra <amodra@gmail.com>
385 * configure.ac (--enable-checking): Add support.
386 * config.in: Regenerate.
387 * configure: Regenerate.
389 2021-04-09 Alan Modra <amodra@gmail.com>
391 * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
393 (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move.
394 (disassemble_section, disassemble_data): Likewise.
396 2021-04-06 Alan Modra <amodra@gmail.com>
398 * objdump.c (objdump_symbol_at_address): Return asymbol*.
400 2021-04-06 Alan Modra <amodra@gmail.com>
402 * NEWS: Mention C99 requirement.
403 * README: Likewise. Modernise examples and "Reporting bugs".
405 2021-04-05 Alan Modra <amodra@gmail.com>
407 * configure.ac: Assume long long is available. Don't test for
408 strings.h, stdlib.h, limits.h, locale.h, or wchar.h. Check
409 inttypes.h, stdint.h, sys/stat.h and sys/types.h. Don't check for
410 strcoll, setlocale, setmode or location of time_t. Don't check
411 for fprintf, getenv, snprintf, strnlen, strstr or vsnprintf decls.
412 (AC_ISC_POSIX, AXC_HEADER_STRING, AC_FUNC_ALLOCA): Don't invoke.
413 * sysdep.h: Don't include alloca-conf.h, include config.h instead.
414 Test HAVE_SYS_TYPES_H and reorder includes. Include limits.h,
415 locale.h, string.h and stdlib.h unconditionally. Remove various
416 fallback declarations. Assume long long is available.
417 * addr2line.c: Don't test HAVE_SETLOCALE.
419 * coffdump.c: Likewise.
420 * dlltool.c: Likewise.
421 * dllwrap.c: Likewise.
422 * elfedit.c: Likewise.
424 * objcopy.c: Likewise.
425 * objdump.c: Likewise.
426 * readelf.c: Likewise.
428 * srconv.c: Likewise.
429 * strings.c: Likewise.
430 * sysdump.c: Likewise.
431 * windmc.c: Likewise.
432 * windres.c: Likewise.
433 * bucomm.c: Don't test HAVE_TIME_T_IN_TIME_H or HAVE_TIME_T_IN_TYPES_H.
434 * dwarf.c: Include limits.h unconditionally. Assume long long
436 * nm.c: Don't test HAVE_STRCOLL.
437 * readelf.c: Don't test HAVE_WCHAR_H.
438 * strings.c: Assume long long is available.
439 * syslex.l: Include string.h unconditionally.
440 * aclocal.m4: Regenerate.
441 * config.in: Regenerate.
442 * configure: Regenerate.
443 * Makefile.in: Regenerate.
444 * doc/Makefile.in: Regenerate.
446 2021-04-01 Martin Liska <mliska@suse.cz>
448 * elfcomm.h (strneq): Remove strneq and use startswith.
449 * readelf.c (ia64_process_unwind): Likewise.
450 (process_note): Likewise.
452 2021-04-01 Martin Liska <mliska@suse.cz>
454 * dllwrap.c: Use startswith function.
455 * objcopy.c (is_dwo_section): Likewise.
456 (handle_remove_section_option): Likewise.
457 (copy_main): Likewise.
458 * objdump.c (is_significant_symbol_name): Likewise.
460 2021-04-01 Martin Liska <mliska@suse.cz>
462 * dwarf.c (display_debug_lines_raw): Replace const_strneq with
464 (display_debug_lines_decoded): Likewise.
465 (display_debug_links): Likewise.
466 * elfcomm.c (setup_archive): Likewise.
467 * elfcomm.h (const_strneq): Likewise.
468 * readelf.c (process_section_headers): Likewise.
469 (slurp_ia64_unwind_table): Likewise.
470 (slurp_hppa_unwind_table): Likewise.
471 (decode_arm_unwind): Likewise.
472 (display_debug_section): Likewise.
473 (process_note): Likewise.
475 2021-03-31 Alan Modra <amodra@gmail.com>
477 * sysdep.h (POISON_BFD_BOOLEAN): Define.
478 * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
479 * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
480 * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
481 * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
482 * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
483 * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
484 * windmc.c, * windmc.h, * windres.c, * winduni.c,
485 * wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
486 and TRUE with true throughout.
488 2021-03-31 Alan Modra <amodra@gmail.com>
490 * coffdump.c: Include stdint.h in place of bfd_stdint.h.
493 2021-03-31 Alan Modra <amodra@gmail.com>
495 * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
497 2021-03-29 Alan Modra <amodra@gmail.com>
499 * dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
500 * dwarf.c (read_and_display_attr_value): Likewise.
501 (display_debug_str_offsets): Likewise.
502 * objdump.c (dump_bfd): Likewise.
503 * readelf.c (dump_section_as_strings): Likewise.
504 (dump_section_as_bytes): Likewise.
506 2021-03-29 Alan Modra <amodra@gmail.com>
508 * objdump.c (process_links): Use type int.
509 * readelf.c (request_dump): Don't increment do_dump, set it.
510 * windint.h (target_is_bigendian): Use type bfd_boolean.
511 * windmc.c (target_is_bigendian): Likewise.
512 * windres.c (target_is_bigendian): Likewise.
514 2021-03-22 Martin Liska <mliska@suse.cz>
516 * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ
518 * emul_aix.c (ar_emul_aix_parse_arg): Likewise.
519 * objcopy.c (is_mergeable_note_section): Likewise.
520 * objdump.c (dump_dwarf_section): Likewise.
521 * prdbg.c (pr_method_type): Likewise.
522 (pr_class_baseclass): Likewise.
523 (tg_class_baseclass): Likewise.
524 * readelf.c (process_lto_symbol_tables): Likewise.
525 * stabs.c (ULLHIGH): Likewise.
526 (parse_stab_argtypes): Likewise.
527 (stab_demangle_function_name): Likewise.
529 2021-03-19 H.J. Lu <hongjiu.lu@intel.com>
531 * readelf.c (get_machine_name): Add EM_INTELGT.
533 2021-03-18 Nick Clifton <nickc@redhat.com>
536 * readelf.c (dump_section_as_strings): Mention separate filename.
537 (dump_section_as_bytes): Likewise.
538 (dump_section_as_ctf): Likewise.
539 (initialise_dumkps_byname): Only issue a warning for missing
540 sections if processing the main file.
541 (process_section_contents): Only issue a warning for unsumped
542 section numbers in the main file.
543 (initialise_dump_sects): New function. Contains code extracted
545 (process_object): ... here. Also call initialise_dump_sects for
548 2021-03-16 Nick Clifton <nickc@redhat.com>
551 * readelf.c (display_debug_section): Also retain .debug_addr
554 2021-03-16 Nick Clifton <nickc@redhat.com>
557 * readelf.c (process_section_contents): Only dump debug
558 information for separate files unless process_links is enabled.
559 (process_object): Always call process_section_contents for
562 2021-03-15 Nick Clifton <nickc@redhat.com>
565 * nm.c (FORMAT_JUST_SYMBOLS): Define.
566 (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS.
567 (long_options): Add just-symbols.
568 (set_output_format): Add support for just-symbols.
569 (get_print_format): Likewise.
570 (do_not_print_object_filename): New function.
571 (do_not_print_archive_filename): New function.
572 (do_not_print_archive_member): New function.
573 (do_not_print_symbol_filename): New function.
574 (just_print_symbol_name): New function.
575 (main): Handle --just-symbols.
576 * NEWS: Mention the new feature.
577 * doc/binutils.texi: Document the new feature.
579 2021-03-12 Clément Chigot <clement.chigot@atos.net>
581 * od-xcoff.c: Replace RTB by TRL entry.
583 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
584 Andrew Burgess <andrew.burgess@embecosm.com>
586 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
588 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
589 Andrew Burgess <andrew.burgess@embecosm.com>
591 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
593 2021-03-05 Nick Clifton <nickc@redhat.com>
596 * dwarf.c (display_debug_macro): Handle the displaying of
597 DW_MACRO_define_strp and DW_MACRO_undef_strp in v4
598 .debug_macro.dwo sections.
600 2021-03-04 Nick Clifton <nickc@redhat.com>
603 * objdump.c (process_links): New variable.
604 (usage): Add --process-links.
605 (long_options): Likewise.
606 (dump_bfd): Stop processing once the bfd has been loaded unless
607 this is the main file or process_links has been enabled.
608 (main): Handle the process-links option.
609 * readelf.c (process_links): New variable.
610 (struct filedata): Add is_separate field.
611 (options): Add --process-links.
613 (parse_args): Likewise.
614 (process_file_header): Include the filename when dumping
615 information for separate debuginfo files.
616 (process_program_headers): Likewise.
617 (process_section_headers): Likewise.
618 (process_section_groups): Likewise.
619 (process_relocs): Likewise.
620 (process_dynamic_section): Likewise.
621 (process_version_sections): Likewise.
622 (display_lto_symtab): Likewise.
623 (process_symbol_table): Likewise.
624 (process_syminfo): Likewise.
625 (initialise_dumps_by_name): Likewise.
626 (process_section_contents): Likewise.
627 (process_notes_at): Likewise.
628 (process_notes): Likewise.
629 (open_file): Add is_separate parameter. Use to initialise the
630 is_separate field in the filedata structure.
631 (open_deug): Update call to open_file.
632 (process_object): Add processing of the contents of separate
633 debuginfo files, gated by the process_links variable.
634 (process_archive): Update call to open_file.
635 (process_file): Initialise the is_separate field in the filedata
637 * dwarf.c (load_separate_debug_info_file): Only report the
638 loading of a separate file if debug links are being dumped.
639 * objcopy.c (keep_section_symbols): New variable.
640 (enum command_line_switch): Add OPTION_KEEP_SYMBOLS.
641 (strip_options): Add keep-section-symbols.
642 (copy_options): Likewise.
643 (copy_usage): Likewise.
644 (strip_usage): Likewise.
645 (copy_object): Keep section symbols if requested by command line
647 (strip_main): Handle --keep-section-symbols.
648 (copy_main): Likewise.
649 * doc/binutils.texi: Document the new options.
650 * NEWS: Mention the new features.
651 * testsuite/binutils-all/compress.exp (test_gnu_debuglink):
652 Update options passed to objdump. Use diff rather than cmp to
653 compare the dumped data.
654 * testsuite/binutils-all/objdump.WK2: Update regexp.
655 * testsuite/binutils-all/objdump.WK3: Update regexp.
656 * testsuite/binutils-all/objdump.exp: Use --process-links
657 instead of --dwarf=follow-links.
658 * testsuite/binutils-all/readelf.exp (readelf_test): Include
659 readelf's output in the log when the test fails.
660 Add the -P option to the -wKis test.
661 * testsuite/binutils-all/readelf.wKis: Update expected output.
663 2021-03-03 Alan Modra <amodra@gmail.com>
666 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
667 * NEWS: Mention feature.
669 2021-03-01 H.J. Lu <hongjiu.lu@intel.com>
672 * dwarf.c (load_separate_debug_info): Issue warning only if
673 do_debug_links is set.
674 * testsuite/binutils-all/compress.exp: Run objdump and readelf
675 with missing debug file.
677 2021-03-01 Alan Modra <amodra@gmail.com>
680 * doc/binutils.texi: Add nm --with-symbol-versions and
681 --without-symbol-versions documentation.
682 * nm.c (with_symbol_versions): New variable.
683 (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
684 (long_options): Make --with-symbol-versions entry twiddle the flag.
685 Add --without-symbol-versions.
686 (print_symname): Strip version when !with_symbol_versions. Add
687 dynamic version info under control of with_symbol_versions.
688 (main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
690 2021-02-26 Fangrui Song <maskray@google.com>
693 * readelf.c (quiet): New option flag.
694 (enum long_option_values): New enum to hold long option value.
695 (long_options): Add --quiet.
696 (usage): Mention --quiet.
697 (display_rel_file): If quiet is enabled, suppress "no symbols".
698 (main): Handle the new option.
699 * NEWS: Mention --quiet.
700 * docs/binutils.texi: Document --quiet.
702 2021-02-26 Tom de Vries <tdevries@suse.de>
704 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
706 2021-02-26 Tom de Vries <tdevries@suse.de>
709 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
711 (read_and_display_attr_value): Likewise.
713 2021-02-25 Nick Clifton <nickc@redhat.com>
715 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
717 (read_and_display_attr_value): Handle sup forms.
718 (display_debug_sup): New function. Displays the contents of a
720 (load_debug_sup_file): New function. Loads the contents of a file
721 referenced by a .debug_sup section.
722 (check_for_and_load_links): Call load_debug_sup_file.
723 (debug_displays): Add entry for .debug_sup.
724 * dwarf.h (enum dwarf_section_display_enum): Add debug_sup.
725 * readelf.c (process_section_headers): Add support for debug_sup.
726 * doc/debug.options.texi: Note that the =links option will display
727 the contents of .debug_sup sections.
728 * NEWS: Mention the new support.
730 2021-02-25 Alan Modra <amodra@gmail.com>
733 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
735 2021-02-24 Nick Clifton <nickc@redhat.com>
738 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
739 when adding together the section sizes.
741 2021-02-24 Nick Clifton <nickc@redhat.com>
743 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
745 * readelf.c (print_gnu_build_attribute_description): Likewise.
747 2021-02-24 Alan Modra <amodra@gmail.com>
748 Siddhesh Poyarekar <siddhesh@gotplt.org>
751 * bucomm.h (smart_rename): Update prototype.
752 * rename.c (smart_rename): Add fromfd and preserve_dates params.
753 Pass fromfd and target_stat to simple_copy. Call set_times
755 (simple_copy): Accept fromfd rather than from filename. Add
756 target_stat param. Rewind fromfd rather than opening. Open
757 "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
758 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
759 closing output temp file, and pass tmpfd to smart_rename.
760 * arsup.c (temp_fd): Rename from real_fd.
761 (ar_save): Dup temp_fd and pass to smart_rename.
762 * objcopy.c (strip_main, copy_main): Likewise, and pass
765 2021-02-24 Alan Modra <amodra@gmail.com>
768 * rename.c: Tidy throughout.
769 (smart_rename): Always copy. Remove windows specific code.
771 2021-02-20 Alan Modra <amodra@gmail.com>
773 * testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
774 (run_dump_test): Fail if expecting errors from a file like we do
775 for error strings, if no error is seen.
777 2021-02-19 Alan Modra <amodra@gmail.com>
779 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
781 2021-02-19 Siddhesh Poyarekar <siddhesh@gotplt.org>
783 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
785 * arsup.c (ar_save): Likewise.
786 * objcopy (strip_main): Don't copy TMPFD. Don't set times on
787 temporary file and adjust call to SMART_RENAME.
788 (copy_main): Likewise.
789 * rename.c [!S_ISLNK]: Remove definitions.
790 (try_preserve_permissions): Remove function.
791 (smart_rename): Remove FD, PRESERVE_DATES arguments. Use
792 rename system call only if TO does not exist.
793 * bucomm.h (smart_rename): Adjust declaration.
795 2021-02-18 Nick Clifton <nickc@redhat.com>
797 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
798 address that is higher than the end address.
800 2021-02-17 Alan Modra <amodra@gmail.com>
802 * dwarf.c: Include limits.h.
803 (CHAR_BIT): Provide backup define.
804 (read_leb128): Use CHAR_BIT to size "result" in bits. Correct
805 signed overflow checking.
806 * testsuite/binutils-all/pr26548.s,
807 * testsuite/binutils-all/pr26548.d,
808 * testsuite/binutils-all/pr26548e.d: New tests.
809 * testsuite/binutils-all/readelf.exp: Run them.
810 (readelf_test): Drop unused "xfails" parameter. Update all uses.
812 2021-02-16 Jan Beulich <jbeulich@suse.com>
814 * dwarf.c (process_debug_info): Initialize "dwo_id".
816 2021-02-15 Alan Modra <amodra@gmail.com>
818 * objdump.c (load_specific_debug_section): Don't call
819 bfd_cache_section_contents. Rearrange so that
820 bfd_get_full_section_contents is not called on path where
821 bfd_simple_get_relocated_section_contents is called.
822 Don't set section->user_data.
823 (free_debug_section): Always free section->start. Don't twiddle
825 * readelf.c (load_specific_debug_section): Don't set user_data.
826 * dwarf.h (struct dwarf_section): Remove use_data field.
827 * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
829 2021-02-15 Alan Modra <amodra@gmail.com>
831 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
832 * testsuite/binutils-all/objdump.exp: Likewise.
834 2021-02-14 Alan Modra <amodra@gmail.com>
836 * objdump.c (slurp_symtab): Don't add an extra entry for NULL
838 (slurp_dynamic_symtab): Likewise.
839 (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
841 2021-02-14 Alan Modra <amodra@gmail.com>
843 * Makefile.in: Regenerate.
844 * doc/Makefile.in: Regenerate.
846 2021-02-13 Mike Frysinger <vapier@gentoo.org>
848 * aclocal.m4: Regenerate.
850 2021-02-12 Nick Clifton <nickc@redhat.com>
852 * configure.ac (follow-debug-links): Add option to enable or
853 disable the following of debug links by default. Set the
854 default for the option to be 'follow'.
855 * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
856 (dwarf_select_sections_by_names): Add no-follow-links option.
857 (dwarf_select_sections_by_letter): Add 'N' option.
858 * objdump.c (usage): Add conditional text describing the
860 (slurp_symtab): Ensure that there is a NULL entry at the end
862 (slurp_dynamic_symtab): Likewise.
863 (dump_bfd): When extending the symbol table, ensure that there
864 is still a NULL entry at the end.
865 * readelf.c (usage): Add conditional text describing the
867 * doc/binutils.texi: Update documentation for objcopy and
869 * doc/debug.options.texi: Update documentation of the
871 * config.in: Regenerate.
872 * configure: Regenerate.
873 * testsuite/binutils-all/compress.exp: Add the -WN option to
874 objdump command lines that are not expecting to follow links.
875 * testsuite/binutils-all/readelf.exp: Add the
876 --debug-dump=no-follow-links option to tests that are not
877 expecting to follow debug links.
878 * NEWS: Mention the new behaviour.
880 2021-02-12 Alan Modra <amodra@gmail.com>
882 * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
883 gas or ld fails to build a testcase rather than "unresolved".
884 Report "fail" when readelf returns an error status rather than
886 * testsuite/binutils-all/ar.exp: Likewise.
887 * testsuite/binutils-all/compress.exp: Likewise.
888 * testsuite/binutils-all/readelf.exp: Likewise.
890 2021-02-12 Alan Modra <amodra@gmail.com>
892 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
893 "c" with "ccc" labels.
895 2021-02-12 Tom de Vries <tdevries@suse.de>
897 * dwarf.h (debug_info): Fix typo in comment.
899 2021-02-12 Tom de Vries <tdevries@suse.de>
901 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
904 2021-02-12 Tom de Vries <tdevries@suse.de>
906 * dwarf.c (process_debug_info): Print DWO ID.
908 2021-02-11 Alan Modra <amodra@gmail.com>
913 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
914 Use bfd_malloc_and_get_section.
915 (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
916 check namesz. Return NULL if descsz is too small. Ensure
917 string table is terminated.
918 (elf32_avr_get_device_info): Formatting. Add note_size param.
920 (elf32_avr_dump_mem_usage): Adjust to suit.
922 2021-02-10 Tom de Vries <tdevries@suse.de>
925 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
927 2021-02-10 Tom de Vries <tdevries@suse.de>
930 * dwarf.c (display_debug_ranges): Filter range lists according to
933 2021-02-09 Tom de Vries <tdevries@suse.de>
936 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
938 2021-02-09 Tom de Vries <tdevries@suse.de>
941 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
944 2021-02-09 Alan Modra <amodra@gmail.com>
946 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
949 2021-02-07 Alan Modra <amodra@gmail.com>
951 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
952 uninitialised on invalid input.
954 2021-02-06 Alan Modra <amodra@gmail.com>
957 * rename.c (smart_rename): Test for existence and type of output
960 2021-02-05 Nick Clifton <nickc@redhat.com>
962 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
964 2021-02-05 Eli Zaretskii <eliz@gnu.org>
967 * elfedit.c (check_file):
968 * bucomm.c (get_file_size): Fix typos in comments.
970 2021-02-05 Alan Modra <amodra@gmail.com>
973 * arsup.c (ar_save): Use stat rather than lstat.
975 2021-02-03 Alan Modra <amodra@gmail.com>
980 * ar.c: Don't include libbfd.h.
981 (write_archive): Replace xmalloc+strcpy with xstrdup. Use
982 bfd_stat rather than fstat on iostream. Move stat and fd tests
983 outside of _WIN32 ifdef. Delete skip_stat variable.
984 * arsup.c (temp_name, real_ofd): New static variables.
985 (ar_open): Use make_tempname and bfd_fdopenw.
986 (ar_save): Adjust to suit ar_open changes. Move stat output
988 * objcopy.c: Don't include libbfd.h.
989 (copy_file): Use bfd_stat.
991 2021-02-02 H.J. Lu <hongjiu.lu@intel.com>
994 * readelf.c (process_section_headers): Add 'R' and 'D' to
996 * testsuite/binutils-all/retain1a.d: Updated.
998 2021-01-30 Nick Clifton <nickc@redhat.com>
1000 * README-how-to-make-a-release: Small updates after the 2.35.2
1003 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1006 * windres.c (quot): Use double quotes to protect strings on
1009 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1012 * bucomm.c (get_file_size): Add code to handle /dev/null on
1014 * elfedit.c (check_file): Likewise.
1016 2021-01-27 Nick Clifton <nickc@redhat.com>
1018 * objcopy.c (copy_main): Remove conditional control of the calls
1019 to free, simplifying the code and making it easier to detect
1022 2021-01-26 Frederic Cambus <fred@statdns.com>
1024 * objcopy.c (copy_main): Fix a double free happening when both
1025 --localize-symbols and --globalize-symbols options are invoked
1028 2021-01-24 Nick Clifton <nickc@redhat.com>
1030 * README-how-to-make-a-release: Minor updates after the 2.36 release.
1032 2021-01-16 Alan Modra <amodra@gmail.com>
1034 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
1036 2021-01-15 Alan Modra <amodra@gmail.com>
1039 * readelf.c (uncompress_section_contents): Always call inflateEnd.
1041 2021-01-14 Alexandre Oliva <oliva@gnu.org>
1043 * MAINTAINERS: Update my email address.
1045 2021-01-14 Nick Clifton <nickc@redhat.com>
1047 * po/sv.po: Updated Swedish translation.
1049 2021-01-13 Alan Modra <amodra@gmail.com>
1051 * Makefile.in: Regenerate.
1052 * doc/Makefile.in: Regenerate.
1054 2021-01-13 Zebediah Figura <z.figura12@gmail.com>
1057 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
1059 (i386_x64_trampoline): Add SEH annotations.
1060 (struct mac): Add how_seh field.
1061 (make_delay_head): If how_set field is true add SEh instructions.
1063 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1066 * configure.ac: Use GNU_MAKE_JOBSERVER.
1067 * aclocal.m4: Regenerated.
1068 * configure: Likewise.
1070 2021-01-12 Nick Clifton <nickc@redhat.com>
1072 * po/fr.po: Updated French translation.
1074 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1077 * configure: Regenerated.
1079 2021-01-11 Nick Clifton <nickc@redhat.com>
1081 * po/pt.po: Updated Portuguese translation.
1082 * po/sr.po: Updated Serbian translation.
1083 * po/uk.po: Updated Ukranian translation.
1085 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1087 * configure: Regenerated.
1089 2021-01-09 Nick Clifton <nickc@redhat.com>
1091 * configure: Regenerate.
1092 * po/binutils.pot: Regenerate.
1094 2021-01-09 Nick Clifton <nickc@redhat.com>
1096 * 2.36 release branch crated.
1097 * README-how-to-make-a-release: Add note about updating Makefiles
1099 * BRANCHES: Add binutils-2.36-branch.
1101 2021-01-09 Alan Modra <amodra@gmail.com>
1103 * configure: Regenerate.
1105 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1107 * configure: Regenerate.
1109 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1112 * objcopy.c (copy_object): Handle section symbols for
1113 non-relocatable inputs.
1114 * testsuite/binutils-all/readelf.exp (readelf_test): Check
1115 is_elf_unused_section_symbols.
1116 * testsuite/binutils-all/readelf.s-64: Updated.
1117 * testsuite/binutils-all/readelf.ss: Likewise.
1118 * testsuite/binutils-all/readelf.ss-64: Likewise.
1119 * testsuite/binutils-all/readelf.s-64-unused: New file.
1120 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
1121 * testsuite/binutils-all/readelf.ss-unused: Likewise.
1122 * testsuite/lib/binutils-common.exp
1123 (is_elf_unused_section_symbols): New proc.
1125 2021-01-06 Reuben Thomas <rrt@sc3d.org>
1127 * binutils/readelf.c: Correct grammar in comment.
1129 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1131 * coffgrok.c (do_type): Correct spelling of auxiliary in errors.
1132 * doc/binutils.texi: Correct grammar.
1133 * readelf.c (process_version_sections): Correct spelling of auxiliary
1135 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
1137 2021-01-01 Alan Modra <amodra@gmail.com>
1139 Update year range in copyright notice of all files.
1141 For older changes see ChangeLog-2020
1143 Copyright (C) 2021 Free Software Foundation, Inc.
1145 Copying and distribution of this file, with or without modification,
1146 are permitted in any medium without royalty provided the copyright
1147 notice and this notice are preserved.
1153 version-control: never