1 2021-05-23 Tiezhu Yang <yangtiezhu@loongson.cn>
3 * readelf.c (get_machine_name): Change Loongson Loongarch to
6 2021-05-21 Luis Machado <luis.machado@linaro.org>
8 * readelf.c (get_note_type): Add missing NT_ARM_* entries.
10 2021-05-21 Luis Machado <luis.machado@linaro.org>
12 * readelf.c (get_note_type): Handle NT_MEMTAG note types.
14 2021-05-19 Eli Schwartz <eschwartz@archlinux.org>
16 * dwarf.c (ENABLE_CHECKING): Define to 0 if not previously set.
18 2021-05-19 Alan Modra <amodra@gmail.com>
21 * dwarf.c (get_type_abbrev_from_form): Replace cu_offset_return
22 param with map_return, and return map for DW_FORM_ref_addr.
23 (get_type_signedness): Adjust calls to get_type_abbrev_from_form.
24 Pass returned cu map start and end to recursive call.
25 (read_and_display_attr_value): Similarly.
27 2021-05-19 Alan Modra <amodra@gmail.com>
30 * sysdump.c (getBARRAY): Sanity check size against max.
31 (getINT): Avoid UB shift left.
33 2021-05-15 Alan Modra <amodra@gmail.com>
35 * dwarf.c (process_cu_tu_index): Avoid pointer UB. Use _mul_overflow.
38 2021-05-15 Alan Modra <amodra@gmail.com>
40 * dwarf.c (display_gdb_index): Avoid pointer UB and overflow in
43 2021-05-15 Alan Modra <amodra@gmail.com>
45 * dwarf.c (display_debug_names): Complain when header length is
46 too small. Avoid pointer UB. Sanity check augmentation string,
47 CU table, TU table and foreign TU table sizes.
49 2021-05-15 Alan Modra <amodra@gmail.com>
51 * dwarf.c (display_debug_frames): Delete initial_length_size.
52 Avoid pointer UB. Constrain data reads to length given in header.
53 Sanity check cie header length. Only skip up to next FDE on
54 finding augmentation data too long.
56 2021-05-15 Alan Modra <amodra@gmail.com>
58 * dwarf.c (read_cie): Add more sanity checks to ensure data
59 pointer is not bumped past end.
61 2021-05-15 Alan Modra <amodra@gmail.com>
63 * dwarf.c (display_debug_ranges): Delete initial_length_size.
64 Correct fallback size calculated on finding a reloc. Constrain
65 data reads to length given in header. Avoid pointer UB.
67 2021-05-15 Alan Modra <amodra@gmail.com>
69 * dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
71 2021-05-15 Alan Modra <amodra@gmail.com>
73 * dwarf.c (display_debug_str_offsets): Constrain reads to length
76 2021-05-15 Alan Modra <amodra@gmail.com>
78 * dwarf.c (display_debug_aranges): Delete initial_length_size.
79 Use end_ranges to constrain data reads to header length. Avoid
82 2021-05-15 Alan Modra <amodra@gmail.com>
84 * dwarf.c (display_loc_list): Avoid pointer UB. Correct check
85 before reading uleb length. Warn on excess length.
87 2021-05-15 Alan Modra <amodra@gmail.com>
89 * dwarf.c (display_debug_macro): Print strings that might not
90 be zero terminated with %*s. Don't bump curr if unterminated.
92 2021-05-15 Alan Modra <amodra@gmail.com>
94 * dwarf.c (get_line_filename_and_dirname): Delete initial_length_size.
95 Simplify length sanity check, and check for too small lengths.
96 Constrain data reads to header length. Avoid pointer UB.
98 2021-05-15 Alan Modra <amodra@gmail.com>
100 * dwarf.c (display_debug_macinfo): Print strings that might not
101 be zero terminated with %*s. Don't bump curr if unterminated.
103 2021-05-15 Alan Modra <amodra@gmail.com>
105 * dwarf.c (display_debug_pubnames_worker): Delete initial_length_size.
106 Simplify length check. Constrain reads to length given by header.
108 2021-05-15 Alan Modra <amodra@gmail.com>
110 * dwarf.c (display_debug_lines_decoded): Don't use strnlen when
111 we have already checked for NUL termination.
113 2021-05-15 Alan Modra <amodra@gmail.com>
115 * dwarf.c (read_debug_line_header): Delete initial_length_size.
116 Avoid pointer UB. Keep within length specified by header.
119 2021-05-15 Alan Modra <amodra@gmail.com>
121 * dwarf.c (process_debug_info): Always do the first CU length
122 scan for sanity checks. Remove initial_length_size var and
123 instead calculate end_cu. Use end_cu to limit data reads.
124 Delete now dead code checking length.
126 2021-05-15 Alan Modra <amodra@gmail.com>
128 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Assert only when ENABLE_CHECKING.
130 2021-05-15 Alan Modra <amodra@gmail.com>
132 * bucomm.h (_mul_overflow): Define.
133 * dwarf.c (get_encoded_value): Avoid pointer UB.
135 2021-05-13 Alan Modra <amodra@gmail.com>
138 * dwarf.c (display_debug_str_offsets): Sanity check dwarf5
141 2021-05-13 Alan Modra <amodra@gmail.com>
144 * dwarf.c (display_debug_frames): Sanity check cie_off before
145 attempting to read cie.
147 2021-05-12 Alan Modra <amodra@gmail.com>
149 * dwarf.c (process_extended_line_op): Don't bump data pointer past
150 end when strnlen doesn't find string terminator.
151 (decode_location_expression): Remove dead code.
152 (skip_attr_bytes): Remove const from end param. Ensure data
153 pointer doesn't pass end.
154 (get_type_signedness): Remove const from end param.
155 (read_and_display_attr_value): Ensure data pointer doesn't pass end.
156 (display_debug_lines_raw, display_debug_lines_decoded): Likewise.
157 (display_debug_pubnames_worker): Likewise.
158 (display_debug_pubnames_worker): Use SAFE_BYTE_GET_AND INC rather
159 than blindly incrementing data pointer.
160 (display_debug_addr, display_debug_str_offsets): Likewise. Don't
161 compare pointers, compare lengths.
163 2021-05-12 Alan Modra <amodra@gmail.com>
165 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Define.
166 (SAFE_BYTE_GET, SAFE_BYTE_GET_AND_INC): Define using the above.
167 (SAFE_SIGNED_BYTE_GET, SAFE_SIGNED_BYTE_GET_AND_INC): Likewise.
168 (display_discr_list): Use SAFE_BYTE_GET_AND_INC rather than
169 SAFE_BYTE_GET followed by increment.
170 (process_debug_info): Likewise, and test bytes remaining before
171 incrementing section_begin rather than using pointer comparison.
172 (display_debug_names): Pass lvalue as SAFE_BYTE_GET PTR.
173 (process_cu_tu_index): Likewise for SAFE_BYTE_GET_AND_INC.
175 2021-05-12 Alan Modra <amodra@gmail.com>
177 * dwarf.c (dwarf_vmatoa64, SAFE_BYTE_GET64, add64): Delete.
178 (skip_attr_bytes): Replace use of SAFE_BYTE_GET64 with
179 SAFE_BYTE_GET_AND_INC.
180 (read_and_display_attr_value): Likewise. Print using dwarf_vmatoa.
181 (process_debug_info, process_cu_tu_index): Likewise.
182 * elfcomm.c (byte_put, byte_put_little_endian, byte_put_big_endian),
183 (byte_get, byte_get_little_endian, byte_get_big_endian),
184 (byte_get_signed): Make size param unsigned. Remove code dealing
186 (byte_get_64): Delete.
187 * elfcomm.h (byte_put, byte_put_little_endian, byte_put_big_endian),
188 (byte_get, byte_get_little_endian, byte_get_big_endian),
189 (byte_get_signed): Update prototypes.
190 (byte_get_64): Delete.
192 2021-05-12 Alan Modra <amodra@gmail.com>
195 * dwarf.c (display_debug_frames): Don't compare pointers derived
196 from user input. Test offset against bounds instead.
198 2021-05-12 Alan Modra <amodra@gmail.com>
201 * dwarf.c (display_formatted_table): Test for data >= end rather
203 (process_extended_line_op): Likewise.
204 (display_debug_lines_raw): Likewise.
205 (display_debug_lines_decoded): Likewise.
207 2021-05-12 Alan Modra <amodra@gmail.com>
210 * dwarf.c (fetch_indexed_string): Correct length sanity checks.
211 Sanity check section size for version and padding too. Correct
212 index sanity check. Handle multiple tables in .debug_str_offsets.
214 2021-05-11 Hans-Peter Nilsson <hp@axis.com>
216 * dwarf.c (process_abbrev_set): Properly parenthesize before
217 casting to unsigned long.
219 2021-05-11 Alan Modra <amodra@gmail.com>
222 * dwarf.c (process_abbrev_set): Replace start and end parameters
223 with section, abbrev_base, abbrev_size, abbrev_offset. Update
224 all callers. Sanity check parameters correctly and emit warnings
226 (process_debug_info): ..here.
228 2021-05-10 Thomas Wolff <towo@towo.net>
233 * windres.c (quot): Revert previous delta. Do not use double
234 quotes when spaces are detected in options.
235 * doc/binutils.texi (windres): Remove suggestion that the
236 --preprocessor option can take arguments.
238 2021-05-10 Alan Modra <amodra@gmail.com>
240 * dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
241 END rather than adding amount to PTR.
242 (SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise.
244 2021-05-09 Alan Modra <amodra@gmail.com>
246 * objcopy.c (eq_string): Delete.
247 (create_symbol_htab): Use htab_eq_string.
249 2021-05-08 Mike Frysinger <vapier@gentoo.org>
251 * README-how-to-make-a-release: Update html & pdf entries.
253 2021-05-08 Mike Frysinger <vapier@gentoo.org>
255 * doc/Makefile.am (html-local, binutils/index.html): New targets.
256 * doc/Makefile.in: Regenerate.
258 2021-05-08 Mike Frysinger <vapier@gentoo.org>
260 * doc/Makefile.am (AM_MAKEINFOFLAGS): Add --no-split.
261 * doc/Makefile.in: Regenerate.
263 2021-05-07 Nick Clifton <nickc@redhat.com>
265 * readelf.c (no_processor_specific_unwind): New function.
266 (process_unwind): Use no_processor_specific_unwind for X86
269 2021-05-07 Michael Forney <mforney@mforney.org>
271 * dwarf.c: Don't omit second operand of '?' operator.
273 2021-04-30 Nick Clifton <nickc@redhat.com>
276 * dwarf.c (load_debug_sup_file): Allocate memory for filename in
279 2021-04-29 Nick Clifton <nickc@redhat.com>
282 * doc/binutils.texi (windres): Correct the description of the
283 default value of the --preprocessor argument.
285 2021-04-27 Nick Clifton <nickc@redhat.com>
288 * dwarf.c (parse_gnu_debuglink): Reject empty names.
289 (parse_gnu_debugaltlink): Likewise.
291 2021-04-22 Clément Chigot <clement.chigot@atos.net>
293 * od-xcoff.c (dump_xcoff32_symbols): Adapt to new
296 2021-04-21 Nick Lott <nick.lott@gmail.com>
299 * readelf.c (sym_base): New variable.
300 (enum print_mode): Add more modes.
301 (print_vma): Add suport for new modes.
302 (options): Add sym-base.
303 (usage): Add sym-base.
304 (parse_args): Add support for --sym-base.
305 (print_dynamic_symbol_size): New function.
306 (print_dynamic_symbol): Use new function.
307 * doc/binutils.texi: Document the new feature.
308 * NEWS: Mention the new feature.
310 2021-04-21 Nick Clifton <nickc@redhat.com>
312 * testsuite/binutils-all/mips/global-local-symtab-sort-n64t.d:
313 Adjust expected output to allow for named section symbols.
314 * testsuite/binutils-all/mips/global-local-symtab-sort-o32t.d:
316 * testsuite/binutils-all/readelf.s-64: Likewise.
317 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
318 * testsuite/binutils-all/readelf.ss-tmips: Likewise.
319 * testsuite/binutils-all/readelf.ss-unused: Likewise.
321 2021-04-21 Luo Longjun <luolongjun@huawei.com>
323 * readelf.c (print_dynamic_symbol): Print the section name for
324 section symbols without a name of their own.
326 2021-04-20 Andreas Krebbel <krebbel@linux.ibm.com>
328 * MAINTAINERS: Remove Martin Schwidefsky as s390 maintainer and
329 add him to Past Maintainers.
330 Update my email address.
332 2021-04-19 Nick Clifton <nickc@redhat.com>
335 * arsup.c (ar_addmod): Enable plugin support, if available.
337 2021-04-19 Nick Clifton <nickc@redhat.com>
339 * rename.c: (get_stat_atime_ns): Add prototype.
340 (get_stat_mtime_ns): Add prototype.
342 2021-04-16 Alan Modra <amodra@gmail.com>
345 * rename.c (get_stat_atime, get_stat_mtime): Make static.
346 (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
348 2021-04-15 Pekka Seppänen <pexu@sourceware.mail.kapsi.fi>
351 * rename.c (get_stat_atime_ns): Add ATTRIBUTE_UNUSED.
352 (get_stat_mtime_ns): Likewise.
354 2021-04-15 Alan Modra <amodra@gmail.com>
357 * configure.ac: Check for sys/time.h and utimensat. Use standard
358 checks for mkstemp and mkdtemp. Whitespace. Check for nanosecond
359 members of struct stat.
360 * rename.c: Prefer sys/time.h for utimes over utime.h for utime.
361 (STAT_TIMESPEC, STAT_TIMESPEC_NS): Define
362 (get_stat_atime_ns, get_stat_mtime_ns): New inline functions.
363 (get_stat_atime, get_stat_mtime): Likewise.
364 (set_times): Choose first available of utimensat, utimes, utime.
365 Use above inline functions to set timespec and timeval values.
366 * configure: Regenerate.
367 * config.in: Regenerate.
368 * testsuite/binutils-all/objcopy.exp (objcopy_test): Add test of
369 file timestamp when --preserve-dates is used.
371 2021-04-15 Alan Modra <amodra@gmail.com>
374 * rename.c (smart_rename): When TO and FROM are equal, just set
376 * objcopy.c (strip_main, copy_main): Always call smart_rename.
378 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
381 * testsuite/binutils-all/x86-64/pr27708.dump: New file.
382 * testsuite/binutils-all/x86-64/pr27708.exe.bz2: Likewise.
383 * testsuite/binutils-all/x86-64/x86-64.exp: Run binutils/27708
386 2021-04-14 Mark Harmstone <mark@harmstone.com>
389 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the
390 end of the structure.
392 2021-04-14 Frederic Cambus <fred@statdns.com>
394 * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
395 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
397 2021-04-14 Alan Modra <amodra@gmail.com>
400 * objdump.c (show_line): Don't limit paths to PATH_MAX.
401 * readelf.c (struct filedata): Change program_interpreter from
402 a char array to a char pointer.
403 (process_program_headers): Sanity check PT_INTERP p_filesz.
404 Malloc program_interpreter using p_filesz and read directly from
406 (process_dynamic_section): Check program_interpreter is non-NULL.
407 (free_filedata): New function, split out from..
408 (process_object): ..here.
409 (close_debug_file): Call free_filedata.
410 * sysdep.h: Don't include sys/param.h.
411 (PATH_MAX): Don't define.
412 * configure.ac: Don't check for sys/param.h.
413 * configure: Regenerate.
415 2021-04-13 Frederic Cambus <fred@statdns.com>
417 * readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
418 check for NT_NETBSD_PAX.
420 2021-04-12 Alan Modra <amodra@gmail.com>
422 * configure.ac (--enable-checking): Add support.
423 * config.in: Regenerate.
424 * configure: Regenerate.
426 2021-04-09 Alan Modra <amodra@gmail.com>
428 * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
430 (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move.
431 (disassemble_section, disassemble_data): Likewise.
433 2021-04-06 Alan Modra <amodra@gmail.com>
435 * objdump.c (objdump_symbol_at_address): Return asymbol*.
437 2021-04-06 Alan Modra <amodra@gmail.com>
439 * NEWS: Mention C99 requirement.
440 * README: Likewise. Modernise examples and "Reporting bugs".
442 2021-04-05 Alan Modra <amodra@gmail.com>
444 * configure.ac: Assume long long is available. Don't test for
445 strings.h, stdlib.h, limits.h, locale.h, or wchar.h. Check
446 inttypes.h, stdint.h, sys/stat.h and sys/types.h. Don't check for
447 strcoll, setlocale, setmode or location of time_t. Don't check
448 for fprintf, getenv, snprintf, strnlen, strstr or vsnprintf decls.
449 (AC_ISC_POSIX, AXC_HEADER_STRING, AC_FUNC_ALLOCA): Don't invoke.
450 * sysdep.h: Don't include alloca-conf.h, include config.h instead.
451 Test HAVE_SYS_TYPES_H and reorder includes. Include limits.h,
452 locale.h, string.h and stdlib.h unconditionally. Remove various
453 fallback declarations. Assume long long is available.
454 * addr2line.c: Don't test HAVE_SETLOCALE.
456 * coffdump.c: Likewise.
457 * dlltool.c: Likewise.
458 * dllwrap.c: Likewise.
459 * elfedit.c: Likewise.
461 * objcopy.c: Likewise.
462 * objdump.c: Likewise.
463 * readelf.c: Likewise.
465 * srconv.c: Likewise.
466 * strings.c: Likewise.
467 * sysdump.c: Likewise.
468 * windmc.c: Likewise.
469 * windres.c: Likewise.
470 * bucomm.c: Don't test HAVE_TIME_T_IN_TIME_H or HAVE_TIME_T_IN_TYPES_H.
471 * dwarf.c: Include limits.h unconditionally. Assume long long
473 * nm.c: Don't test HAVE_STRCOLL.
474 * readelf.c: Don't test HAVE_WCHAR_H.
475 * strings.c: Assume long long is available.
476 * syslex.l: Include string.h unconditionally.
477 * aclocal.m4: Regenerate.
478 * config.in: Regenerate.
479 * configure: Regenerate.
480 * Makefile.in: Regenerate.
481 * doc/Makefile.in: Regenerate.
483 2021-04-01 Martin Liska <mliska@suse.cz>
485 * elfcomm.h (strneq): Remove strneq and use startswith.
486 * readelf.c (ia64_process_unwind): Likewise.
487 (process_note): Likewise.
489 2021-04-01 Martin Liska <mliska@suse.cz>
491 * dllwrap.c: Use startswith function.
492 * objcopy.c (is_dwo_section): Likewise.
493 (handle_remove_section_option): Likewise.
494 (copy_main): Likewise.
495 * objdump.c (is_significant_symbol_name): Likewise.
497 2021-04-01 Martin Liska <mliska@suse.cz>
499 * dwarf.c (display_debug_lines_raw): Replace const_strneq with
501 (display_debug_lines_decoded): Likewise.
502 (display_debug_links): Likewise.
503 * elfcomm.c (setup_archive): Likewise.
504 * elfcomm.h (const_strneq): Likewise.
505 * readelf.c (process_section_headers): Likewise.
506 (slurp_ia64_unwind_table): Likewise.
507 (slurp_hppa_unwind_table): Likewise.
508 (decode_arm_unwind): Likewise.
509 (display_debug_section): Likewise.
510 (process_note): Likewise.
512 2021-03-31 Alan Modra <amodra@gmail.com>
514 * sysdep.h (POISON_BFD_BOOLEAN): Define.
515 * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
516 * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
517 * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
518 * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
519 * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
520 * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
521 * windmc.c, * windmc.h, * windres.c, * winduni.c,
522 * wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
523 and TRUE with true throughout.
525 2021-03-31 Alan Modra <amodra@gmail.com>
527 * coffdump.c: Include stdint.h in place of bfd_stdint.h.
530 2021-03-31 Alan Modra <amodra@gmail.com>
532 * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
534 2021-03-29 Alan Modra <amodra@gmail.com>
536 * dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
537 * dwarf.c (read_and_display_attr_value): Likewise.
538 (display_debug_str_offsets): Likewise.
539 * objdump.c (dump_bfd): Likewise.
540 * readelf.c (dump_section_as_strings): Likewise.
541 (dump_section_as_bytes): Likewise.
543 2021-03-29 Alan Modra <amodra@gmail.com>
545 * objdump.c (process_links): Use type int.
546 * readelf.c (request_dump): Don't increment do_dump, set it.
547 * windint.h (target_is_bigendian): Use type bfd_boolean.
548 * windmc.c (target_is_bigendian): Likewise.
549 * windres.c (target_is_bigendian): Likewise.
551 2021-03-22 Martin Liska <mliska@suse.cz>
553 * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ
555 * emul_aix.c (ar_emul_aix_parse_arg): Likewise.
556 * objcopy.c (is_mergeable_note_section): Likewise.
557 * objdump.c (dump_dwarf_section): Likewise.
558 * prdbg.c (pr_method_type): Likewise.
559 (pr_class_baseclass): Likewise.
560 (tg_class_baseclass): Likewise.
561 * readelf.c (process_lto_symbol_tables): Likewise.
562 * stabs.c (ULLHIGH): Likewise.
563 (parse_stab_argtypes): Likewise.
564 (stab_demangle_function_name): Likewise.
566 2021-03-19 H.J. Lu <hongjiu.lu@intel.com>
568 * readelf.c (get_machine_name): Add EM_INTELGT.
570 2021-03-18 Nick Clifton <nickc@redhat.com>
573 * readelf.c (dump_section_as_strings): Mention separate filename.
574 (dump_section_as_bytes): Likewise.
575 (dump_section_as_ctf): Likewise.
576 (initialise_dumkps_byname): Only issue a warning for missing
577 sections if processing the main file.
578 (process_section_contents): Only issue a warning for unsumped
579 section numbers in the main file.
580 (initialise_dump_sects): New function. Contains code extracted
582 (process_object): ... here. Also call initialise_dump_sects for
585 2021-03-16 Nick Clifton <nickc@redhat.com>
588 * readelf.c (display_debug_section): Also retain .debug_addr
591 2021-03-16 Nick Clifton <nickc@redhat.com>
594 * readelf.c (process_section_contents): Only dump debug
595 information for separate files unless process_links is enabled.
596 (process_object): Always call process_section_contents for
599 2021-03-15 Nick Clifton <nickc@redhat.com>
602 * nm.c (FORMAT_JUST_SYMBOLS): Define.
603 (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS.
604 (long_options): Add just-symbols.
605 (set_output_format): Add support for just-symbols.
606 (get_print_format): Likewise.
607 (do_not_print_object_filename): New function.
608 (do_not_print_archive_filename): New function.
609 (do_not_print_archive_member): New function.
610 (do_not_print_symbol_filename): New function.
611 (just_print_symbol_name): New function.
612 (main): Handle --just-symbols.
613 * NEWS: Mention the new feature.
614 * doc/binutils.texi: Document the new feature.
616 2021-03-12 Clément Chigot <clement.chigot@atos.net>
618 * od-xcoff.c: Replace RTB by TRL entry.
620 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
621 Andrew Burgess <andrew.burgess@embecosm.com>
623 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
625 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
626 Andrew Burgess <andrew.burgess@embecosm.com>
628 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
630 2021-03-05 Nick Clifton <nickc@redhat.com>
633 * dwarf.c (display_debug_macro): Handle the displaying of
634 DW_MACRO_define_strp and DW_MACRO_undef_strp in v4
635 .debug_macro.dwo sections.
637 2021-03-04 Nick Clifton <nickc@redhat.com>
640 * objdump.c (process_links): New variable.
641 (usage): Add --process-links.
642 (long_options): Likewise.
643 (dump_bfd): Stop processing once the bfd has been loaded unless
644 this is the main file or process_links has been enabled.
645 (main): Handle the process-links option.
646 * readelf.c (process_links): New variable.
647 (struct filedata): Add is_separate field.
648 (options): Add --process-links.
650 (parse_args): Likewise.
651 (process_file_header): Include the filename when dumping
652 information for separate debuginfo files.
653 (process_program_headers): Likewise.
654 (process_section_headers): Likewise.
655 (process_section_groups): Likewise.
656 (process_relocs): Likewise.
657 (process_dynamic_section): Likewise.
658 (process_version_sections): Likewise.
659 (display_lto_symtab): Likewise.
660 (process_symbol_table): Likewise.
661 (process_syminfo): Likewise.
662 (initialise_dumps_by_name): Likewise.
663 (process_section_contents): Likewise.
664 (process_notes_at): Likewise.
665 (process_notes): Likewise.
666 (open_file): Add is_separate parameter. Use to initialise the
667 is_separate field in the filedata structure.
668 (open_deug): Update call to open_file.
669 (process_object): Add processing of the contents of separate
670 debuginfo files, gated by the process_links variable.
671 (process_archive): Update call to open_file.
672 (process_file): Initialise the is_separate field in the filedata
674 * dwarf.c (load_separate_debug_info_file): Only report the
675 loading of a separate file if debug links are being dumped.
676 * objcopy.c (keep_section_symbols): New variable.
677 (enum command_line_switch): Add OPTION_KEEP_SYMBOLS.
678 (strip_options): Add keep-section-symbols.
679 (copy_options): Likewise.
680 (copy_usage): Likewise.
681 (strip_usage): Likewise.
682 (copy_object): Keep section symbols if requested by command line
684 (strip_main): Handle --keep-section-symbols.
685 (copy_main): Likewise.
686 * doc/binutils.texi: Document the new options.
687 * NEWS: Mention the new features.
688 * testsuite/binutils-all/compress.exp (test_gnu_debuglink):
689 Update options passed to objdump. Use diff rather than cmp to
690 compare the dumped data.
691 * testsuite/binutils-all/objdump.WK2: Update regexp.
692 * testsuite/binutils-all/objdump.WK3: Update regexp.
693 * testsuite/binutils-all/objdump.exp: Use --process-links
694 instead of --dwarf=follow-links.
695 * testsuite/binutils-all/readelf.exp (readelf_test): Include
696 readelf's output in the log when the test fails.
697 Add the -P option to the -wKis test.
698 * testsuite/binutils-all/readelf.wKis: Update expected output.
700 2021-03-03 Alan Modra <amodra@gmail.com>
703 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
704 * NEWS: Mention feature.
706 2021-03-01 H.J. Lu <hongjiu.lu@intel.com>
709 * dwarf.c (load_separate_debug_info): Issue warning only if
710 do_debug_links is set.
711 * testsuite/binutils-all/compress.exp: Run objdump and readelf
712 with missing debug file.
714 2021-03-01 Alan Modra <amodra@gmail.com>
717 * doc/binutils.texi: Add nm --with-symbol-versions and
718 --without-symbol-versions documentation.
719 * nm.c (with_symbol_versions): New variable.
720 (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
721 (long_options): Make --with-symbol-versions entry twiddle the flag.
722 Add --without-symbol-versions.
723 (print_symname): Strip version when !with_symbol_versions. Add
724 dynamic version info under control of with_symbol_versions.
725 (main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
727 2021-02-26 Fangrui Song <maskray@google.com>
730 * readelf.c (quiet): New option flag.
731 (enum long_option_values): New enum to hold long option value.
732 (long_options): Add --quiet.
733 (usage): Mention --quiet.
734 (display_rel_file): If quiet is enabled, suppress "no symbols".
735 (main): Handle the new option.
736 * NEWS: Mention --quiet.
737 * docs/binutils.texi: Document --quiet.
739 2021-02-26 Tom de Vries <tdevries@suse.de>
741 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
743 2021-02-26 Tom de Vries <tdevries@suse.de>
746 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
748 (read_and_display_attr_value): Likewise.
750 2021-02-25 Nick Clifton <nickc@redhat.com>
752 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
754 (read_and_display_attr_value): Handle sup forms.
755 (display_debug_sup): New function. Displays the contents of a
757 (load_debug_sup_file): New function. Loads the contents of a file
758 referenced by a .debug_sup section.
759 (check_for_and_load_links): Call load_debug_sup_file.
760 (debug_displays): Add entry for .debug_sup.
761 * dwarf.h (enum dwarf_section_display_enum): Add debug_sup.
762 * readelf.c (process_section_headers): Add support for debug_sup.
763 * doc/debug.options.texi: Note that the =links option will display
764 the contents of .debug_sup sections.
765 * NEWS: Mention the new support.
767 2021-02-25 Alan Modra <amodra@gmail.com>
770 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
772 2021-02-24 Nick Clifton <nickc@redhat.com>
775 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
776 when adding together the section sizes.
778 2021-02-24 Nick Clifton <nickc@redhat.com>
780 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
782 * readelf.c (print_gnu_build_attribute_description): Likewise.
784 2021-02-24 Alan Modra <amodra@gmail.com>
785 Siddhesh Poyarekar <siddhesh@gotplt.org>
788 * bucomm.h (smart_rename): Update prototype.
789 * rename.c (smart_rename): Add fromfd and preserve_dates params.
790 Pass fromfd and target_stat to simple_copy. Call set_times
792 (simple_copy): Accept fromfd rather than from filename. Add
793 target_stat param. Rewind fromfd rather than opening. Open
794 "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
795 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
796 closing output temp file, and pass tmpfd to smart_rename.
797 * arsup.c (temp_fd): Rename from real_fd.
798 (ar_save): Dup temp_fd and pass to smart_rename.
799 * objcopy.c (strip_main, copy_main): Likewise, and pass
802 2021-02-24 Alan Modra <amodra@gmail.com>
805 * rename.c: Tidy throughout.
806 (smart_rename): Always copy. Remove windows specific code.
808 2021-02-20 Alan Modra <amodra@gmail.com>
810 * testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
811 (run_dump_test): Fail if expecting errors from a file like we do
812 for error strings, if no error is seen.
814 2021-02-19 Alan Modra <amodra@gmail.com>
816 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
818 2021-02-19 Siddhesh Poyarekar <siddhesh@gotplt.org>
820 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
822 * arsup.c (ar_save): Likewise.
823 * objcopy (strip_main): Don't copy TMPFD. Don't set times on
824 temporary file and adjust call to SMART_RENAME.
825 (copy_main): Likewise.
826 * rename.c [!S_ISLNK]: Remove definitions.
827 (try_preserve_permissions): Remove function.
828 (smart_rename): Remove FD, PRESERVE_DATES arguments. Use
829 rename system call only if TO does not exist.
830 * bucomm.h (smart_rename): Adjust declaration.
832 2021-02-18 Nick Clifton <nickc@redhat.com>
834 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
835 address that is higher than the end address.
837 2021-02-17 Alan Modra <amodra@gmail.com>
839 * dwarf.c: Include limits.h.
840 (CHAR_BIT): Provide backup define.
841 (read_leb128): Use CHAR_BIT to size "result" in bits. Correct
842 signed overflow checking.
843 * testsuite/binutils-all/pr26548.s,
844 * testsuite/binutils-all/pr26548.d,
845 * testsuite/binutils-all/pr26548e.d: New tests.
846 * testsuite/binutils-all/readelf.exp: Run them.
847 (readelf_test): Drop unused "xfails" parameter. Update all uses.
849 2021-02-16 Jan Beulich <jbeulich@suse.com>
851 * dwarf.c (process_debug_info): Initialize "dwo_id".
853 2021-02-15 Alan Modra <amodra@gmail.com>
855 * objdump.c (load_specific_debug_section): Don't call
856 bfd_cache_section_contents. Rearrange so that
857 bfd_get_full_section_contents is not called on path where
858 bfd_simple_get_relocated_section_contents is called.
859 Don't set section->user_data.
860 (free_debug_section): Always free section->start. Don't twiddle
862 * readelf.c (load_specific_debug_section): Don't set user_data.
863 * dwarf.h (struct dwarf_section): Remove use_data field.
864 * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
866 2021-02-15 Alan Modra <amodra@gmail.com>
868 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
869 * testsuite/binutils-all/objdump.exp: Likewise.
871 2021-02-14 Alan Modra <amodra@gmail.com>
873 * objdump.c (slurp_symtab): Don't add an extra entry for NULL
875 (slurp_dynamic_symtab): Likewise.
876 (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
878 2021-02-14 Alan Modra <amodra@gmail.com>
880 * Makefile.in: Regenerate.
881 * doc/Makefile.in: Regenerate.
883 2021-02-13 Mike Frysinger <vapier@gentoo.org>
885 * aclocal.m4: Regenerate.
887 2021-02-12 Nick Clifton <nickc@redhat.com>
889 * configure.ac (follow-debug-links): Add option to enable or
890 disable the following of debug links by default. Set the
891 default for the option to be 'follow'.
892 * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
893 (dwarf_select_sections_by_names): Add no-follow-links option.
894 (dwarf_select_sections_by_letter): Add 'N' option.
895 * objdump.c (usage): Add conditional text describing the
897 (slurp_symtab): Ensure that there is a NULL entry at the end
899 (slurp_dynamic_symtab): Likewise.
900 (dump_bfd): When extending the symbol table, ensure that there
901 is still a NULL entry at the end.
902 * readelf.c (usage): Add conditional text describing the
904 * doc/binutils.texi: Update documentation for objcopy and
906 * doc/debug.options.texi: Update documentation of the
908 * config.in: Regenerate.
909 * configure: Regenerate.
910 * testsuite/binutils-all/compress.exp: Add the -WN option to
911 objdump command lines that are not expecting to follow links.
912 * testsuite/binutils-all/readelf.exp: Add the
913 --debug-dump=no-follow-links option to tests that are not
914 expecting to follow debug links.
915 * NEWS: Mention the new behaviour.
917 2021-02-12 Alan Modra <amodra@gmail.com>
919 * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
920 gas or ld fails to build a testcase rather than "unresolved".
921 Report "fail" when readelf returns an error status rather than
923 * testsuite/binutils-all/ar.exp: Likewise.
924 * testsuite/binutils-all/compress.exp: Likewise.
925 * testsuite/binutils-all/readelf.exp: Likewise.
927 2021-02-12 Alan Modra <amodra@gmail.com>
929 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
930 "c" with "ccc" labels.
932 2021-02-12 Tom de Vries <tdevries@suse.de>
934 * dwarf.h (debug_info): Fix typo in comment.
936 2021-02-12 Tom de Vries <tdevries@suse.de>
938 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
941 2021-02-12 Tom de Vries <tdevries@suse.de>
943 * dwarf.c (process_debug_info): Print DWO ID.
945 2021-02-11 Alan Modra <amodra@gmail.com>
950 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
951 Use bfd_malloc_and_get_section.
952 (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
953 check namesz. Return NULL if descsz is too small. Ensure
954 string table is terminated.
955 (elf32_avr_get_device_info): Formatting. Add note_size param.
957 (elf32_avr_dump_mem_usage): Adjust to suit.
959 2021-02-10 Tom de Vries <tdevries@suse.de>
962 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
964 2021-02-10 Tom de Vries <tdevries@suse.de>
967 * dwarf.c (display_debug_ranges): Filter range lists according to
970 2021-02-09 Tom de Vries <tdevries@suse.de>
973 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
975 2021-02-09 Tom de Vries <tdevries@suse.de>
978 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
981 2021-02-09 Alan Modra <amodra@gmail.com>
983 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
986 2021-02-07 Alan Modra <amodra@gmail.com>
988 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
989 uninitialised on invalid input.
991 2021-02-06 Alan Modra <amodra@gmail.com>
994 * rename.c (smart_rename): Test for existence and type of output
997 2021-02-05 Nick Clifton <nickc@redhat.com>
999 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
1001 2021-02-05 Eli Zaretskii <eliz@gnu.org>
1004 * elfedit.c (check_file):
1005 * bucomm.c (get_file_size): Fix typos in comments.
1007 2021-02-05 Alan Modra <amodra@gmail.com>
1010 * arsup.c (ar_save): Use stat rather than lstat.
1012 2021-02-03 Alan Modra <amodra@gmail.com>
1017 * ar.c: Don't include libbfd.h.
1018 (write_archive): Replace xmalloc+strcpy with xstrdup. Use
1019 bfd_stat rather than fstat on iostream. Move stat and fd tests
1020 outside of _WIN32 ifdef. Delete skip_stat variable.
1021 * arsup.c (temp_name, real_ofd): New static variables.
1022 (ar_open): Use make_tempname and bfd_fdopenw.
1023 (ar_save): Adjust to suit ar_open changes. Move stat output
1025 * objcopy.c: Don't include libbfd.h.
1026 (copy_file): Use bfd_stat.
1028 2021-02-02 H.J. Lu <hongjiu.lu@intel.com>
1031 * readelf.c (process_section_headers): Add 'R' and 'D' to
1033 * testsuite/binutils-all/retain1a.d: Updated.
1035 2021-01-30 Nick Clifton <nickc@redhat.com>
1037 * README-how-to-make-a-release: Small updates after the 2.35.2
1040 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1043 * windres.c (quot): Use double quotes to protect strings on
1046 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1049 * bucomm.c (get_file_size): Add code to handle /dev/null on
1051 * elfedit.c (check_file): Likewise.
1053 2021-01-27 Nick Clifton <nickc@redhat.com>
1055 * objcopy.c (copy_main): Remove conditional control of the calls
1056 to free, simplifying the code and making it easier to detect
1059 2021-01-26 Frederic Cambus <fred@statdns.com>
1061 * objcopy.c (copy_main): Fix a double free happening when both
1062 --localize-symbols and --globalize-symbols options are invoked
1065 2021-01-24 Nick Clifton <nickc@redhat.com>
1067 * README-how-to-make-a-release: Minor updates after the 2.36 release.
1069 2021-01-16 Alan Modra <amodra@gmail.com>
1071 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
1073 2021-01-15 Alan Modra <amodra@gmail.com>
1076 * readelf.c (uncompress_section_contents): Always call inflateEnd.
1078 2021-01-14 Alexandre Oliva <oliva@gnu.org>
1080 * MAINTAINERS: Update my email address.
1082 2021-01-14 Nick Clifton <nickc@redhat.com>
1084 * po/sv.po: Updated Swedish translation.
1086 2021-01-13 Alan Modra <amodra@gmail.com>
1088 * Makefile.in: Regenerate.
1089 * doc/Makefile.in: Regenerate.
1091 2021-01-13 Zebediah Figura <z.figura12@gmail.com>
1094 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
1096 (i386_x64_trampoline): Add SEH annotations.
1097 (struct mac): Add how_seh field.
1098 (make_delay_head): If how_set field is true add SEh instructions.
1100 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1103 * configure.ac: Use GNU_MAKE_JOBSERVER.
1104 * aclocal.m4: Regenerated.
1105 * configure: Likewise.
1107 2021-01-12 Nick Clifton <nickc@redhat.com>
1109 * po/fr.po: Updated French translation.
1111 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1114 * configure: Regenerated.
1116 2021-01-11 Nick Clifton <nickc@redhat.com>
1118 * po/pt.po: Updated Portuguese translation.
1119 * po/sr.po: Updated Serbian translation.
1120 * po/uk.po: Updated Ukranian translation.
1122 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1124 * configure: Regenerated.
1126 2021-01-09 Nick Clifton <nickc@redhat.com>
1128 * configure: Regenerate.
1129 * po/binutils.pot: Regenerate.
1131 2021-01-09 Nick Clifton <nickc@redhat.com>
1133 * 2.36 release branch crated.
1134 * README-how-to-make-a-release: Add note about updating Makefiles
1136 * BRANCHES: Add binutils-2.36-branch.
1138 2021-01-09 Alan Modra <amodra@gmail.com>
1140 * configure: Regenerate.
1142 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1144 * configure: Regenerate.
1146 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1149 * objcopy.c (copy_object): Handle section symbols for
1150 non-relocatable inputs.
1151 * testsuite/binutils-all/readelf.exp (readelf_test): Check
1152 is_elf_unused_section_symbols.
1153 * testsuite/binutils-all/readelf.s-64: Updated.
1154 * testsuite/binutils-all/readelf.ss: Likewise.
1155 * testsuite/binutils-all/readelf.ss-64: Likewise.
1156 * testsuite/binutils-all/readelf.s-64-unused: New file.
1157 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
1158 * testsuite/binutils-all/readelf.ss-unused: Likewise.
1159 * testsuite/lib/binutils-common.exp
1160 (is_elf_unused_section_symbols): New proc.
1162 2021-01-06 Reuben Thomas <rrt@sc3d.org>
1164 * binutils/readelf.c: Correct grammar in comment.
1166 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1168 * coffgrok.c (do_type): Correct spelling of auxiliary in errors.
1169 * doc/binutils.texi: Correct grammar.
1170 * readelf.c (process_version_sections): Correct spelling of auxiliary
1172 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
1174 2021-01-01 Alan Modra <amodra@gmail.com>
1176 Update year range in copyright notice of all files.
1178 For older changes see ChangeLog-2020
1180 Copyright (C) 2021 Free Software Foundation, Inc.
1182 Copying and distribution of this file, with or without modification,
1183 are permitted in any medium without royalty provided the copyright
1184 notice and this notice are preserved.
1190 version-control: never