1 2021-05-19 Alan Modra <amodra@gmail.com>
4 * dwarf.c (get_type_abbrev_from_form): Replace cu_offset_return
5 param with map_return, and return map for DW_FORM_ref_addr.
6 (get_type_signedness): Adjust calls to get_type_abbrev_from_form.
7 Pass returned cu map start and end to recursive call.
8 (read_and_display_attr_value): Similarly.
10 2021-05-19 Alan Modra <amodra@gmail.com>
13 * sysdump.c (getBARRAY): Sanity check size against max.
14 (getINT): Avoid UB shift left.
16 2021-05-15 Alan Modra <amodra@gmail.com>
18 * dwarf.c (process_cu_tu_index): Avoid pointer UB. Use _mul_overflow.
21 2021-05-15 Alan Modra <amodra@gmail.com>
23 * dwarf.c (display_gdb_index): Avoid pointer UB and overflow in
26 2021-05-15 Alan Modra <amodra@gmail.com>
28 * dwarf.c (display_debug_names): Complain when header length is
29 too small. Avoid pointer UB. Sanity check augmentation string,
30 CU table, TU table and foreign TU table sizes.
32 2021-05-15 Alan Modra <amodra@gmail.com>
34 * dwarf.c (display_debug_frames): Delete initial_length_size.
35 Avoid pointer UB. Constrain data reads to length given in header.
36 Sanity check cie header length. Only skip up to next FDE on
37 finding augmentation data too long.
39 2021-05-15 Alan Modra <amodra@gmail.com>
41 * dwarf.c (read_cie): Add more sanity checks to ensure data
42 pointer is not bumped past end.
44 2021-05-15 Alan Modra <amodra@gmail.com>
46 * dwarf.c (display_debug_ranges): Delete initial_length_size.
47 Correct fallback size calculated on finding a reloc. Constrain
48 data reads to length given in header. Avoid pointer UB.
50 2021-05-15 Alan Modra <amodra@gmail.com>
52 * dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
54 2021-05-15 Alan Modra <amodra@gmail.com>
56 * dwarf.c (display_debug_str_offsets): Constrain reads to length
59 2021-05-15 Alan Modra <amodra@gmail.com>
61 * dwarf.c (display_debug_aranges): Delete initial_length_size.
62 Use end_ranges to constrain data reads to header length. Avoid
65 2021-05-15 Alan Modra <amodra@gmail.com>
67 * dwarf.c (display_loc_list): Avoid pointer UB. Correct check
68 before reading uleb length. Warn on excess length.
70 2021-05-15 Alan Modra <amodra@gmail.com>
72 * dwarf.c (display_debug_macro): Print strings that might not
73 be zero terminated with %*s. Don't bump curr if unterminated.
75 2021-05-15 Alan Modra <amodra@gmail.com>
77 * dwarf.c (get_line_filename_and_dirname): Delete initial_length_size.
78 Simplify length sanity check, and check for too small lengths.
79 Constrain data reads to header length. Avoid pointer UB.
81 2021-05-15 Alan Modra <amodra@gmail.com>
83 * dwarf.c (display_debug_macinfo): Print strings that might not
84 be zero terminated with %*s. Don't bump curr if unterminated.
86 2021-05-15 Alan Modra <amodra@gmail.com>
88 * dwarf.c (display_debug_pubnames_worker): Delete initial_length_size.
89 Simplify length check. Constrain reads to length given by header.
91 2021-05-15 Alan Modra <amodra@gmail.com>
93 * dwarf.c (display_debug_lines_decoded): Don't use strnlen when
94 we have already checked for NUL termination.
96 2021-05-15 Alan Modra <amodra@gmail.com>
98 * dwarf.c (read_debug_line_header): Delete initial_length_size.
99 Avoid pointer UB. Keep within length specified by header.
102 2021-05-15 Alan Modra <amodra@gmail.com>
104 * dwarf.c (process_debug_info): Always do the first CU length
105 scan for sanity checks. Remove initial_length_size var and
106 instead calculate end_cu. Use end_cu to limit data reads.
107 Delete now dead code checking length.
109 2021-05-15 Alan Modra <amodra@gmail.com>
111 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Assert only when ENABLE_CHECKING.
113 2021-05-15 Alan Modra <amodra@gmail.com>
115 * bucomm.h (_mul_overflow): Define.
116 * dwarf.c (get_encoded_value): Avoid pointer UB.
118 2021-05-13 Alan Modra <amodra@gmail.com>
121 * dwarf.c (display_debug_str_offsets): Sanity check dwarf5
124 2021-05-13 Alan Modra <amodra@gmail.com>
127 * dwarf.c (display_debug_frames): Sanity check cie_off before
128 attempting to read cie.
130 2021-05-12 Alan Modra <amodra@gmail.com>
132 * dwarf.c (process_extended_line_op): Don't bump data pointer past
133 end when strnlen doesn't find string terminator.
134 (decode_location_expression): Remove dead code.
135 (skip_attr_bytes): Remove const from end param. Ensure data
136 pointer doesn't pass end.
137 (get_type_signedness): Remove const from end param.
138 (read_and_display_attr_value): Ensure data pointer doesn't pass end.
139 (display_debug_lines_raw, display_debug_lines_decoded): Likewise.
140 (display_debug_pubnames_worker): Likewise.
141 (display_debug_pubnames_worker): Use SAFE_BYTE_GET_AND INC rather
142 than blindly incrementing data pointer.
143 (display_debug_addr, display_debug_str_offsets): Likewise. Don't
144 compare pointers, compare lengths.
146 2021-05-12 Alan Modra <amodra@gmail.com>
148 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Define.
149 (SAFE_BYTE_GET, SAFE_BYTE_GET_AND_INC): Define using the above.
150 (SAFE_SIGNED_BYTE_GET, SAFE_SIGNED_BYTE_GET_AND_INC): Likewise.
151 (display_discr_list): Use SAFE_BYTE_GET_AND_INC rather than
152 SAFE_BYTE_GET followed by increment.
153 (process_debug_info): Likewise, and test bytes remaining before
154 incrementing section_begin rather than using pointer comparison.
155 (display_debug_names): Pass lvalue as SAFE_BYTE_GET PTR.
156 (process_cu_tu_index): Likewise for SAFE_BYTE_GET_AND_INC.
158 2021-05-12 Alan Modra <amodra@gmail.com>
160 * dwarf.c (dwarf_vmatoa64, SAFE_BYTE_GET64, add64): Delete.
161 (skip_attr_bytes): Replace use of SAFE_BYTE_GET64 with
162 SAFE_BYTE_GET_AND_INC.
163 (read_and_display_attr_value): Likewise. Print using dwarf_vmatoa.
164 (process_debug_info, process_cu_tu_index): Likewise.
165 * elfcomm.c (byte_put, byte_put_little_endian, byte_put_big_endian),
166 (byte_get, byte_get_little_endian, byte_get_big_endian),
167 (byte_get_signed): Make size param unsigned. Remove code dealing
169 (byte_get_64): Delete.
170 * elfcomm.h (byte_put, byte_put_little_endian, byte_put_big_endian),
171 (byte_get, byte_get_little_endian, byte_get_big_endian),
172 (byte_get_signed): Update prototypes.
173 (byte_get_64): Delete.
175 2021-05-12 Alan Modra <amodra@gmail.com>
178 * dwarf.c (display_debug_frames): Don't compare pointers derived
179 from user input. Test offset against bounds instead.
181 2021-05-12 Alan Modra <amodra@gmail.com>
184 * dwarf.c (display_formatted_table): Test for data >= end rather
186 (process_extended_line_op): Likewise.
187 (display_debug_lines_raw): Likewise.
188 (display_debug_lines_decoded): Likewise.
190 2021-05-12 Alan Modra <amodra@gmail.com>
193 * dwarf.c (fetch_indexed_string): Correct length sanity checks.
194 Sanity check section size for version and padding too. Correct
195 index sanity check. Handle multiple tables in .debug_str_offsets.
197 2021-05-11 Hans-Peter Nilsson <hp@axis.com>
199 * dwarf.c (process_abbrev_set): Properly parenthesize before
200 casting to unsigned long.
202 2021-05-11 Alan Modra <amodra@gmail.com>
205 * dwarf.c (process_abbrev_set): Replace start and end parameters
206 with section, abbrev_base, abbrev_size, abbrev_offset. Update
207 all callers. Sanity check parameters correctly and emit warnings
209 (process_debug_info): ..here.
211 2021-05-10 Thomas Wolff <towo@towo.net>
216 * windres.c (quot): Revert previous delta. Do not use double
217 quotes when spaces are detected in options.
218 * doc/binutils.texi (windres): Remove suggestion that the
219 --preprocessor option can take arguments.
221 2021-05-10 Alan Modra <amodra@gmail.com>
223 * dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
224 END rather than adding amount to PTR.
225 (SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise.
227 2021-05-09 Alan Modra <amodra@gmail.com>
229 * objcopy.c (eq_string): Delete.
230 (create_symbol_htab): Use htab_eq_string.
232 2021-05-08 Mike Frysinger <vapier@gentoo.org>
234 * README-how-to-make-a-release: Update html & pdf entries.
236 2021-05-08 Mike Frysinger <vapier@gentoo.org>
238 * doc/Makefile.am (html-local, binutils/index.html): New targets.
239 * doc/Makefile.in: Regenerate.
241 2021-05-08 Mike Frysinger <vapier@gentoo.org>
243 * doc/Makefile.am (AM_MAKEINFOFLAGS): Add --no-split.
244 * doc/Makefile.in: Regenerate.
246 2021-05-07 Nick Clifton <nickc@redhat.com>
248 * readelf.c (no_processor_specific_unwind): New function.
249 (process_unwind): Use no_processor_specific_unwind for X86
252 2021-05-07 Michael Forney <mforney@mforney.org>
254 * dwarf.c: Don't omit second operand of '?' operator.
256 2021-04-30 Nick Clifton <nickc@redhat.com>
259 * dwarf.c (load_debug_sup_file): Allocate memory for filename in
262 2021-04-29 Nick Clifton <nickc@redhat.com>
265 * doc/binutils.texi (windres): Correct the description of the
266 default value of the --preprocessor argument.
268 2021-04-27 Nick Clifton <nickc@redhat.com>
271 * dwarf.c (parse_gnu_debuglink): Reject empty names.
272 (parse_gnu_debugaltlink): Likewise.
274 2021-04-22 Clément Chigot <clement.chigot@atos.net>
276 * od-xcoff.c (dump_xcoff32_symbols): Adapt to new
279 2021-04-21 Nick Lott <nick.lott@gmail.com>
282 * readelf.c (sym_base): New variable.
283 (enum print_mode): Add more modes.
284 (print_vma): Add suport for new modes.
285 (options): Add sym-base.
286 (usage): Add sym-base.
287 (parse_args): Add support for --sym-base.
288 (print_dynamic_symbol_size): New function.
289 (print_dynamic_symbol): Use new function.
290 * doc/binutils.texi: Document the new feature.
291 * NEWS: Mention the new feature.
293 2021-04-21 Nick Clifton <nickc@redhat.com>
295 * testsuite/binutils-all/mips/global-local-symtab-sort-n64t.d:
296 Adjust expected output to allow for named section symbols.
297 * testsuite/binutils-all/mips/global-local-symtab-sort-o32t.d:
299 * testsuite/binutils-all/readelf.s-64: Likewise.
300 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
301 * testsuite/binutils-all/readelf.ss-tmips: Likewise.
302 * testsuite/binutils-all/readelf.ss-unused: Likewise.
304 2021-04-21 Luo Longjun <luolongjun@huawei.com>
306 * readelf.c (print_dynamic_symbol): Print the section name for
307 section symbols without a name of their own.
309 2021-04-20 Andreas Krebbel <krebbel@linux.ibm.com>
311 * MAINTAINERS: Remove Martin Schwidefsky as s390 maintainer and
312 add him to Past Maintainers.
313 Update my email address.
315 2021-04-19 Nick Clifton <nickc@redhat.com>
318 * arsup.c (ar_addmod): Enable plugin support, if available.
320 2021-04-19 Nick Clifton <nickc@redhat.com>
322 * rename.c: (get_stat_atime_ns): Add prototype.
323 (get_stat_mtime_ns): Add prototype.
325 2021-04-16 Alan Modra <amodra@gmail.com>
328 * rename.c (get_stat_atime, get_stat_mtime): Make static.
329 (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
331 2021-04-15 Pekka Seppänen <pexu@sourceware.mail.kapsi.fi>
334 * rename.c (get_stat_atime_ns): Add ATTRIBUTE_UNUSED.
335 (get_stat_mtime_ns): Likewise.
337 2021-04-15 Alan Modra <amodra@gmail.com>
340 * configure.ac: Check for sys/time.h and utimensat. Use standard
341 checks for mkstemp and mkdtemp. Whitespace. Check for nanosecond
342 members of struct stat.
343 * rename.c: Prefer sys/time.h for utimes over utime.h for utime.
344 (STAT_TIMESPEC, STAT_TIMESPEC_NS): Define
345 (get_stat_atime_ns, get_stat_mtime_ns): New inline functions.
346 (get_stat_atime, get_stat_mtime): Likewise.
347 (set_times): Choose first available of utimensat, utimes, utime.
348 Use above inline functions to set timespec and timeval values.
349 * configure: Regenerate.
350 * config.in: Regenerate.
351 * testsuite/binutils-all/objcopy.exp (objcopy_test): Add test of
352 file timestamp when --preserve-dates is used.
354 2021-04-15 Alan Modra <amodra@gmail.com>
357 * rename.c (smart_rename): When TO and FROM are equal, just set
359 * objcopy.c (strip_main, copy_main): Always call smart_rename.
361 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
364 * testsuite/binutils-all/x86-64/pr27708.dump: New file.
365 * testsuite/binutils-all/x86-64/pr27708.exe.bz2: Likewise.
366 * testsuite/binutils-all/x86-64/x86-64.exp: Run binutils/27708
369 2021-04-14 Mark Harmstone <mark@harmstone.com>
372 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the
373 end of the structure.
375 2021-04-14 Frederic Cambus <fred@statdns.com>
377 * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
378 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
380 2021-04-14 Alan Modra <amodra@gmail.com>
383 * objdump.c (show_line): Don't limit paths to PATH_MAX.
384 * readelf.c (struct filedata): Change program_interpreter from
385 a char array to a char pointer.
386 (process_program_headers): Sanity check PT_INTERP p_filesz.
387 Malloc program_interpreter using p_filesz and read directly from
389 (process_dynamic_section): Check program_interpreter is non-NULL.
390 (free_filedata): New function, split out from..
391 (process_object): ..here.
392 (close_debug_file): Call free_filedata.
393 * sysdep.h: Don't include sys/param.h.
394 (PATH_MAX): Don't define.
395 * configure.ac: Don't check for sys/param.h.
396 * configure: Regenerate.
398 2021-04-13 Frederic Cambus <fred@statdns.com>
400 * readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
401 check for NT_NETBSD_PAX.
403 2021-04-12 Alan Modra <amodra@gmail.com>
405 * configure.ac (--enable-checking): Add support.
406 * config.in: Regenerate.
407 * configure: Regenerate.
409 2021-04-09 Alan Modra <amodra@gmail.com>
411 * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
413 (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move.
414 (disassemble_section, disassemble_data): Likewise.
416 2021-04-06 Alan Modra <amodra@gmail.com>
418 * objdump.c (objdump_symbol_at_address): Return asymbol*.
420 2021-04-06 Alan Modra <amodra@gmail.com>
422 * NEWS: Mention C99 requirement.
423 * README: Likewise. Modernise examples and "Reporting bugs".
425 2021-04-05 Alan Modra <amodra@gmail.com>
427 * configure.ac: Assume long long is available. Don't test for
428 strings.h, stdlib.h, limits.h, locale.h, or wchar.h. Check
429 inttypes.h, stdint.h, sys/stat.h and sys/types.h. Don't check for
430 strcoll, setlocale, setmode or location of time_t. Don't check
431 for fprintf, getenv, snprintf, strnlen, strstr or vsnprintf decls.
432 (AC_ISC_POSIX, AXC_HEADER_STRING, AC_FUNC_ALLOCA): Don't invoke.
433 * sysdep.h: Don't include alloca-conf.h, include config.h instead.
434 Test HAVE_SYS_TYPES_H and reorder includes. Include limits.h,
435 locale.h, string.h and stdlib.h unconditionally. Remove various
436 fallback declarations. Assume long long is available.
437 * addr2line.c: Don't test HAVE_SETLOCALE.
439 * coffdump.c: Likewise.
440 * dlltool.c: Likewise.
441 * dllwrap.c: Likewise.
442 * elfedit.c: Likewise.
444 * objcopy.c: Likewise.
445 * objdump.c: Likewise.
446 * readelf.c: Likewise.
448 * srconv.c: Likewise.
449 * strings.c: Likewise.
450 * sysdump.c: Likewise.
451 * windmc.c: Likewise.
452 * windres.c: Likewise.
453 * bucomm.c: Don't test HAVE_TIME_T_IN_TIME_H or HAVE_TIME_T_IN_TYPES_H.
454 * dwarf.c: Include limits.h unconditionally. Assume long long
456 * nm.c: Don't test HAVE_STRCOLL.
457 * readelf.c: Don't test HAVE_WCHAR_H.
458 * strings.c: Assume long long is available.
459 * syslex.l: Include string.h unconditionally.
460 * aclocal.m4: Regenerate.
461 * config.in: Regenerate.
462 * configure: Regenerate.
463 * Makefile.in: Regenerate.
464 * doc/Makefile.in: Regenerate.
466 2021-04-01 Martin Liska <mliska@suse.cz>
468 * elfcomm.h (strneq): Remove strneq and use startswith.
469 * readelf.c (ia64_process_unwind): Likewise.
470 (process_note): Likewise.
472 2021-04-01 Martin Liska <mliska@suse.cz>
474 * dllwrap.c: Use startswith function.
475 * objcopy.c (is_dwo_section): Likewise.
476 (handle_remove_section_option): Likewise.
477 (copy_main): Likewise.
478 * objdump.c (is_significant_symbol_name): Likewise.
480 2021-04-01 Martin Liska <mliska@suse.cz>
482 * dwarf.c (display_debug_lines_raw): Replace const_strneq with
484 (display_debug_lines_decoded): Likewise.
485 (display_debug_links): Likewise.
486 * elfcomm.c (setup_archive): Likewise.
487 * elfcomm.h (const_strneq): Likewise.
488 * readelf.c (process_section_headers): Likewise.
489 (slurp_ia64_unwind_table): Likewise.
490 (slurp_hppa_unwind_table): Likewise.
491 (decode_arm_unwind): Likewise.
492 (display_debug_section): Likewise.
493 (process_note): Likewise.
495 2021-03-31 Alan Modra <amodra@gmail.com>
497 * sysdep.h (POISON_BFD_BOOLEAN): Define.
498 * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
499 * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
500 * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
501 * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
502 * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
503 * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
504 * windmc.c, * windmc.h, * windres.c, * winduni.c,
505 * wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
506 and TRUE with true throughout.
508 2021-03-31 Alan Modra <amodra@gmail.com>
510 * coffdump.c: Include stdint.h in place of bfd_stdint.h.
513 2021-03-31 Alan Modra <amodra@gmail.com>
515 * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
517 2021-03-29 Alan Modra <amodra@gmail.com>
519 * dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
520 * dwarf.c (read_and_display_attr_value): Likewise.
521 (display_debug_str_offsets): Likewise.
522 * objdump.c (dump_bfd): Likewise.
523 * readelf.c (dump_section_as_strings): Likewise.
524 (dump_section_as_bytes): Likewise.
526 2021-03-29 Alan Modra <amodra@gmail.com>
528 * objdump.c (process_links): Use type int.
529 * readelf.c (request_dump): Don't increment do_dump, set it.
530 * windint.h (target_is_bigendian): Use type bfd_boolean.
531 * windmc.c (target_is_bigendian): Likewise.
532 * windres.c (target_is_bigendian): Likewise.
534 2021-03-22 Martin Liska <mliska@suse.cz>
536 * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ
538 * emul_aix.c (ar_emul_aix_parse_arg): Likewise.
539 * objcopy.c (is_mergeable_note_section): Likewise.
540 * objdump.c (dump_dwarf_section): Likewise.
541 * prdbg.c (pr_method_type): Likewise.
542 (pr_class_baseclass): Likewise.
543 (tg_class_baseclass): Likewise.
544 * readelf.c (process_lto_symbol_tables): Likewise.
545 * stabs.c (ULLHIGH): Likewise.
546 (parse_stab_argtypes): Likewise.
547 (stab_demangle_function_name): Likewise.
549 2021-03-19 H.J. Lu <hongjiu.lu@intel.com>
551 * readelf.c (get_machine_name): Add EM_INTELGT.
553 2021-03-18 Nick Clifton <nickc@redhat.com>
556 * readelf.c (dump_section_as_strings): Mention separate filename.
557 (dump_section_as_bytes): Likewise.
558 (dump_section_as_ctf): Likewise.
559 (initialise_dumkps_byname): Only issue a warning for missing
560 sections if processing the main file.
561 (process_section_contents): Only issue a warning for unsumped
562 section numbers in the main file.
563 (initialise_dump_sects): New function. Contains code extracted
565 (process_object): ... here. Also call initialise_dump_sects for
568 2021-03-16 Nick Clifton <nickc@redhat.com>
571 * readelf.c (display_debug_section): Also retain .debug_addr
574 2021-03-16 Nick Clifton <nickc@redhat.com>
577 * readelf.c (process_section_contents): Only dump debug
578 information for separate files unless process_links is enabled.
579 (process_object): Always call process_section_contents for
582 2021-03-15 Nick Clifton <nickc@redhat.com>
585 * nm.c (FORMAT_JUST_SYMBOLS): Define.
586 (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS.
587 (long_options): Add just-symbols.
588 (set_output_format): Add support for just-symbols.
589 (get_print_format): Likewise.
590 (do_not_print_object_filename): New function.
591 (do_not_print_archive_filename): New function.
592 (do_not_print_archive_member): New function.
593 (do_not_print_symbol_filename): New function.
594 (just_print_symbol_name): New function.
595 (main): Handle --just-symbols.
596 * NEWS: Mention the new feature.
597 * doc/binutils.texi: Document the new feature.
599 2021-03-12 Clément Chigot <clement.chigot@atos.net>
601 * od-xcoff.c: Replace RTB by TRL entry.
603 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
604 Andrew Burgess <andrew.burgess@embecosm.com>
606 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
608 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
609 Andrew Burgess <andrew.burgess@embecosm.com>
611 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
613 2021-03-05 Nick Clifton <nickc@redhat.com>
616 * dwarf.c (display_debug_macro): Handle the displaying of
617 DW_MACRO_define_strp and DW_MACRO_undef_strp in v4
618 .debug_macro.dwo sections.
620 2021-03-04 Nick Clifton <nickc@redhat.com>
623 * objdump.c (process_links): New variable.
624 (usage): Add --process-links.
625 (long_options): Likewise.
626 (dump_bfd): Stop processing once the bfd has been loaded unless
627 this is the main file or process_links has been enabled.
628 (main): Handle the process-links option.
629 * readelf.c (process_links): New variable.
630 (struct filedata): Add is_separate field.
631 (options): Add --process-links.
633 (parse_args): Likewise.
634 (process_file_header): Include the filename when dumping
635 information for separate debuginfo files.
636 (process_program_headers): Likewise.
637 (process_section_headers): Likewise.
638 (process_section_groups): Likewise.
639 (process_relocs): Likewise.
640 (process_dynamic_section): Likewise.
641 (process_version_sections): Likewise.
642 (display_lto_symtab): Likewise.
643 (process_symbol_table): Likewise.
644 (process_syminfo): Likewise.
645 (initialise_dumps_by_name): Likewise.
646 (process_section_contents): Likewise.
647 (process_notes_at): Likewise.
648 (process_notes): Likewise.
649 (open_file): Add is_separate parameter. Use to initialise the
650 is_separate field in the filedata structure.
651 (open_deug): Update call to open_file.
652 (process_object): Add processing of the contents of separate
653 debuginfo files, gated by the process_links variable.
654 (process_archive): Update call to open_file.
655 (process_file): Initialise the is_separate field in the filedata
657 * dwarf.c (load_separate_debug_info_file): Only report the
658 loading of a separate file if debug links are being dumped.
659 * objcopy.c (keep_section_symbols): New variable.
660 (enum command_line_switch): Add OPTION_KEEP_SYMBOLS.
661 (strip_options): Add keep-section-symbols.
662 (copy_options): Likewise.
663 (copy_usage): Likewise.
664 (strip_usage): Likewise.
665 (copy_object): Keep section symbols if requested by command line
667 (strip_main): Handle --keep-section-symbols.
668 (copy_main): Likewise.
669 * doc/binutils.texi: Document the new options.
670 * NEWS: Mention the new features.
671 * testsuite/binutils-all/compress.exp (test_gnu_debuglink):
672 Update options passed to objdump. Use diff rather than cmp to
673 compare the dumped data.
674 * testsuite/binutils-all/objdump.WK2: Update regexp.
675 * testsuite/binutils-all/objdump.WK3: Update regexp.
676 * testsuite/binutils-all/objdump.exp: Use --process-links
677 instead of --dwarf=follow-links.
678 * testsuite/binutils-all/readelf.exp (readelf_test): Include
679 readelf's output in the log when the test fails.
680 Add the -P option to the -wKis test.
681 * testsuite/binutils-all/readelf.wKis: Update expected output.
683 2021-03-03 Alan Modra <amodra@gmail.com>
686 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
687 * NEWS: Mention feature.
689 2021-03-01 H.J. Lu <hongjiu.lu@intel.com>
692 * dwarf.c (load_separate_debug_info): Issue warning only if
693 do_debug_links is set.
694 * testsuite/binutils-all/compress.exp: Run objdump and readelf
695 with missing debug file.
697 2021-03-01 Alan Modra <amodra@gmail.com>
700 * doc/binutils.texi: Add nm --with-symbol-versions and
701 --without-symbol-versions documentation.
702 * nm.c (with_symbol_versions): New variable.
703 (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
704 (long_options): Make --with-symbol-versions entry twiddle the flag.
705 Add --without-symbol-versions.
706 (print_symname): Strip version when !with_symbol_versions. Add
707 dynamic version info under control of with_symbol_versions.
708 (main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
710 2021-02-26 Fangrui Song <maskray@google.com>
713 * readelf.c (quiet): New option flag.
714 (enum long_option_values): New enum to hold long option value.
715 (long_options): Add --quiet.
716 (usage): Mention --quiet.
717 (display_rel_file): If quiet is enabled, suppress "no symbols".
718 (main): Handle the new option.
719 * NEWS: Mention --quiet.
720 * docs/binutils.texi: Document --quiet.
722 2021-02-26 Tom de Vries <tdevries@suse.de>
724 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
726 2021-02-26 Tom de Vries <tdevries@suse.de>
729 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
731 (read_and_display_attr_value): Likewise.
733 2021-02-25 Nick Clifton <nickc@redhat.com>
735 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
737 (read_and_display_attr_value): Handle sup forms.
738 (display_debug_sup): New function. Displays the contents of a
740 (load_debug_sup_file): New function. Loads the contents of a file
741 referenced by a .debug_sup section.
742 (check_for_and_load_links): Call load_debug_sup_file.
743 (debug_displays): Add entry for .debug_sup.
744 * dwarf.h (enum dwarf_section_display_enum): Add debug_sup.
745 * readelf.c (process_section_headers): Add support for debug_sup.
746 * doc/debug.options.texi: Note that the =links option will display
747 the contents of .debug_sup sections.
748 * NEWS: Mention the new support.
750 2021-02-25 Alan Modra <amodra@gmail.com>
753 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
755 2021-02-24 Nick Clifton <nickc@redhat.com>
758 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
759 when adding together the section sizes.
761 2021-02-24 Nick Clifton <nickc@redhat.com>
763 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
765 * readelf.c (print_gnu_build_attribute_description): Likewise.
767 2021-02-24 Alan Modra <amodra@gmail.com>
768 Siddhesh Poyarekar <siddhesh@gotplt.org>
771 * bucomm.h (smart_rename): Update prototype.
772 * rename.c (smart_rename): Add fromfd and preserve_dates params.
773 Pass fromfd and target_stat to simple_copy. Call set_times
775 (simple_copy): Accept fromfd rather than from filename. Add
776 target_stat param. Rewind fromfd rather than opening. Open
777 "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
778 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
779 closing output temp file, and pass tmpfd to smart_rename.
780 * arsup.c (temp_fd): Rename from real_fd.
781 (ar_save): Dup temp_fd and pass to smart_rename.
782 * objcopy.c (strip_main, copy_main): Likewise, and pass
785 2021-02-24 Alan Modra <amodra@gmail.com>
788 * rename.c: Tidy throughout.
789 (smart_rename): Always copy. Remove windows specific code.
791 2021-02-20 Alan Modra <amodra@gmail.com>
793 * testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
794 (run_dump_test): Fail if expecting errors from a file like we do
795 for error strings, if no error is seen.
797 2021-02-19 Alan Modra <amodra@gmail.com>
799 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
801 2021-02-19 Siddhesh Poyarekar <siddhesh@gotplt.org>
803 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
805 * arsup.c (ar_save): Likewise.
806 * objcopy (strip_main): Don't copy TMPFD. Don't set times on
807 temporary file and adjust call to SMART_RENAME.
808 (copy_main): Likewise.
809 * rename.c [!S_ISLNK]: Remove definitions.
810 (try_preserve_permissions): Remove function.
811 (smart_rename): Remove FD, PRESERVE_DATES arguments. Use
812 rename system call only if TO does not exist.
813 * bucomm.h (smart_rename): Adjust declaration.
815 2021-02-18 Nick Clifton <nickc@redhat.com>
817 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
818 address that is higher than the end address.
820 2021-02-17 Alan Modra <amodra@gmail.com>
822 * dwarf.c: Include limits.h.
823 (CHAR_BIT): Provide backup define.
824 (read_leb128): Use CHAR_BIT to size "result" in bits. Correct
825 signed overflow checking.
826 * testsuite/binutils-all/pr26548.s,
827 * testsuite/binutils-all/pr26548.d,
828 * testsuite/binutils-all/pr26548e.d: New tests.
829 * testsuite/binutils-all/readelf.exp: Run them.
830 (readelf_test): Drop unused "xfails" parameter. Update all uses.
832 2021-02-16 Jan Beulich <jbeulich@suse.com>
834 * dwarf.c (process_debug_info): Initialize "dwo_id".
836 2021-02-15 Alan Modra <amodra@gmail.com>
838 * objdump.c (load_specific_debug_section): Don't call
839 bfd_cache_section_contents. Rearrange so that
840 bfd_get_full_section_contents is not called on path where
841 bfd_simple_get_relocated_section_contents is called.
842 Don't set section->user_data.
843 (free_debug_section): Always free section->start. Don't twiddle
845 * readelf.c (load_specific_debug_section): Don't set user_data.
846 * dwarf.h (struct dwarf_section): Remove use_data field.
847 * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
849 2021-02-15 Alan Modra <amodra@gmail.com>
851 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
852 * testsuite/binutils-all/objdump.exp: Likewise.
854 2021-02-14 Alan Modra <amodra@gmail.com>
856 * objdump.c (slurp_symtab): Don't add an extra entry for NULL
858 (slurp_dynamic_symtab): Likewise.
859 (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
861 2021-02-14 Alan Modra <amodra@gmail.com>
863 * Makefile.in: Regenerate.
864 * doc/Makefile.in: Regenerate.
866 2021-02-13 Mike Frysinger <vapier@gentoo.org>
868 * aclocal.m4: Regenerate.
870 2021-02-12 Nick Clifton <nickc@redhat.com>
872 * configure.ac (follow-debug-links): Add option to enable or
873 disable the following of debug links by default. Set the
874 default for the option to be 'follow'.
875 * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
876 (dwarf_select_sections_by_names): Add no-follow-links option.
877 (dwarf_select_sections_by_letter): Add 'N' option.
878 * objdump.c (usage): Add conditional text describing the
880 (slurp_symtab): Ensure that there is a NULL entry at the end
882 (slurp_dynamic_symtab): Likewise.
883 (dump_bfd): When extending the symbol table, ensure that there
884 is still a NULL entry at the end.
885 * readelf.c (usage): Add conditional text describing the
887 * doc/binutils.texi: Update documentation for objcopy and
889 * doc/debug.options.texi: Update documentation of the
891 * config.in: Regenerate.
892 * configure: Regenerate.
893 * testsuite/binutils-all/compress.exp: Add the -WN option to
894 objdump command lines that are not expecting to follow links.
895 * testsuite/binutils-all/readelf.exp: Add the
896 --debug-dump=no-follow-links option to tests that are not
897 expecting to follow debug links.
898 * NEWS: Mention the new behaviour.
900 2021-02-12 Alan Modra <amodra@gmail.com>
902 * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
903 gas or ld fails to build a testcase rather than "unresolved".
904 Report "fail" when readelf returns an error status rather than
906 * testsuite/binutils-all/ar.exp: Likewise.
907 * testsuite/binutils-all/compress.exp: Likewise.
908 * testsuite/binutils-all/readelf.exp: Likewise.
910 2021-02-12 Alan Modra <amodra@gmail.com>
912 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
913 "c" with "ccc" labels.
915 2021-02-12 Tom de Vries <tdevries@suse.de>
917 * dwarf.h (debug_info): Fix typo in comment.
919 2021-02-12 Tom de Vries <tdevries@suse.de>
921 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
924 2021-02-12 Tom de Vries <tdevries@suse.de>
926 * dwarf.c (process_debug_info): Print DWO ID.
928 2021-02-11 Alan Modra <amodra@gmail.com>
933 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
934 Use bfd_malloc_and_get_section.
935 (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
936 check namesz. Return NULL if descsz is too small. Ensure
937 string table is terminated.
938 (elf32_avr_get_device_info): Formatting. Add note_size param.
940 (elf32_avr_dump_mem_usage): Adjust to suit.
942 2021-02-10 Tom de Vries <tdevries@suse.de>
945 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
947 2021-02-10 Tom de Vries <tdevries@suse.de>
950 * dwarf.c (display_debug_ranges): Filter range lists according to
953 2021-02-09 Tom de Vries <tdevries@suse.de>
956 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
958 2021-02-09 Tom de Vries <tdevries@suse.de>
961 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
964 2021-02-09 Alan Modra <amodra@gmail.com>
966 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
969 2021-02-07 Alan Modra <amodra@gmail.com>
971 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
972 uninitialised on invalid input.
974 2021-02-06 Alan Modra <amodra@gmail.com>
977 * rename.c (smart_rename): Test for existence and type of output
980 2021-02-05 Nick Clifton <nickc@redhat.com>
982 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
984 2021-02-05 Eli Zaretskii <eliz@gnu.org>
987 * elfedit.c (check_file):
988 * bucomm.c (get_file_size): Fix typos in comments.
990 2021-02-05 Alan Modra <amodra@gmail.com>
993 * arsup.c (ar_save): Use stat rather than lstat.
995 2021-02-03 Alan Modra <amodra@gmail.com>
1000 * ar.c: Don't include libbfd.h.
1001 (write_archive): Replace xmalloc+strcpy with xstrdup. Use
1002 bfd_stat rather than fstat on iostream. Move stat and fd tests
1003 outside of _WIN32 ifdef. Delete skip_stat variable.
1004 * arsup.c (temp_name, real_ofd): New static variables.
1005 (ar_open): Use make_tempname and bfd_fdopenw.
1006 (ar_save): Adjust to suit ar_open changes. Move stat output
1008 * objcopy.c: Don't include libbfd.h.
1009 (copy_file): Use bfd_stat.
1011 2021-02-02 H.J. Lu <hongjiu.lu@intel.com>
1014 * readelf.c (process_section_headers): Add 'R' and 'D' to
1016 * testsuite/binutils-all/retain1a.d: Updated.
1018 2021-01-30 Nick Clifton <nickc@redhat.com>
1020 * README-how-to-make-a-release: Small updates after the 2.35.2
1023 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1026 * windres.c (quot): Use double quotes to protect strings on
1029 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1032 * bucomm.c (get_file_size): Add code to handle /dev/null on
1034 * elfedit.c (check_file): Likewise.
1036 2021-01-27 Nick Clifton <nickc@redhat.com>
1038 * objcopy.c (copy_main): Remove conditional control of the calls
1039 to free, simplifying the code and making it easier to detect
1042 2021-01-26 Frederic Cambus <fred@statdns.com>
1044 * objcopy.c (copy_main): Fix a double free happening when both
1045 --localize-symbols and --globalize-symbols options are invoked
1048 2021-01-24 Nick Clifton <nickc@redhat.com>
1050 * README-how-to-make-a-release: Minor updates after the 2.36 release.
1052 2021-01-16 Alan Modra <amodra@gmail.com>
1054 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
1056 2021-01-15 Alan Modra <amodra@gmail.com>
1059 * readelf.c (uncompress_section_contents): Always call inflateEnd.
1061 2021-01-14 Alexandre Oliva <oliva@gnu.org>
1063 * MAINTAINERS: Update my email address.
1065 2021-01-14 Nick Clifton <nickc@redhat.com>
1067 * po/sv.po: Updated Swedish translation.
1069 2021-01-13 Alan Modra <amodra@gmail.com>
1071 * Makefile.in: Regenerate.
1072 * doc/Makefile.in: Regenerate.
1074 2021-01-13 Zebediah Figura <z.figura12@gmail.com>
1077 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
1079 (i386_x64_trampoline): Add SEH annotations.
1080 (struct mac): Add how_seh field.
1081 (make_delay_head): If how_set field is true add SEh instructions.
1083 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1086 * configure.ac: Use GNU_MAKE_JOBSERVER.
1087 * aclocal.m4: Regenerated.
1088 * configure: Likewise.
1090 2021-01-12 Nick Clifton <nickc@redhat.com>
1092 * po/fr.po: Updated French translation.
1094 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1097 * configure: Regenerated.
1099 2021-01-11 Nick Clifton <nickc@redhat.com>
1101 * po/pt.po: Updated Portuguese translation.
1102 * po/sr.po: Updated Serbian translation.
1103 * po/uk.po: Updated Ukranian translation.
1105 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1107 * configure: Regenerated.
1109 2021-01-09 Nick Clifton <nickc@redhat.com>
1111 * configure: Regenerate.
1112 * po/binutils.pot: Regenerate.
1114 2021-01-09 Nick Clifton <nickc@redhat.com>
1116 * 2.36 release branch crated.
1117 * README-how-to-make-a-release: Add note about updating Makefiles
1119 * BRANCHES: Add binutils-2.36-branch.
1121 2021-01-09 Alan Modra <amodra@gmail.com>
1123 * configure: Regenerate.
1125 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1127 * configure: Regenerate.
1129 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1132 * objcopy.c (copy_object): Handle section symbols for
1133 non-relocatable inputs.
1134 * testsuite/binutils-all/readelf.exp (readelf_test): Check
1135 is_elf_unused_section_symbols.
1136 * testsuite/binutils-all/readelf.s-64: Updated.
1137 * testsuite/binutils-all/readelf.ss: Likewise.
1138 * testsuite/binutils-all/readelf.ss-64: Likewise.
1139 * testsuite/binutils-all/readelf.s-64-unused: New file.
1140 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
1141 * testsuite/binutils-all/readelf.ss-unused: Likewise.
1142 * testsuite/lib/binutils-common.exp
1143 (is_elf_unused_section_symbols): New proc.
1145 2021-01-06 Reuben Thomas <rrt@sc3d.org>
1147 * binutils/readelf.c: Correct grammar in comment.
1149 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1151 * coffgrok.c (do_type): Correct spelling of auxiliary in errors.
1152 * doc/binutils.texi: Correct grammar.
1153 * readelf.c (process_version_sections): Correct spelling of auxiliary
1155 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
1157 2021-01-01 Alan Modra <amodra@gmail.com>
1159 Update year range in copyright notice of all files.
1161 For older changes see ChangeLog-2020
1163 Copyright (C) 2021 Free Software Foundation, Inc.
1165 Copying and distribution of this file, with or without modification,
1166 are permitted in any medium without royalty provided the copyright
1167 notice and this notice are preserved.
1173 version-control: never