1 2022-03-16 Martin Storsjö <martin@martin.st>
4 * dlltool.c (main): use imp_name rather than dll_name when
5 generating a temporary file name.
7 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
9 * readelf.c (dump_relocations): Handle EM_AMDGPU.
11 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
13 * Makefile.am (readelf_CFLAGS): New.
14 (readelf_LDADD): Add MSGPACK_LIBS.
15 * Makefile.in: Re-generate.
16 * config.in: Re-generate.
17 * configure: Re-generate.
18 * configure.ac: Add --with-msgpack flag and check for msgpack
20 * readelf.c: Include msgpack.h if HAVE_MSGPACK.
21 (print_note_contents_hex): New.
23 (dump_msgpack_obj): New.
25 (print_amdgpu_note): New.
26 (process_note): Handle NT_AMDGPU_METADATA note contents.
27 Use print_note_contents_hex.
29 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
31 * readelf.c (get_amdgpu_elf_note_type): New.
32 (process_note): Handle "AMDGPU" notes.
34 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
36 * readelf.c: Include elf/amdgcn.h.
37 (decode_AMDGPU_machine_flags): New.
38 (get_machine_flags): Handle flags for EM_AMDGPU machine type.
40 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
42 * readelf.c (get_osabi_name): Handle EM_AMDGPU OS ABIs.
44 2022-03-16 Nick Clifton <nickc@redhat.com>
46 * po/sr.po: Updated Serbian translation.
48 2022-03-15 Tom Tromey <tromey@adacore.com>
50 * dwarf-mode.el: Now 1.7.
51 (dwarf--sentinel): Switch to the process buffer.
53 2022-03-11 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
55 * MAINTAINERS: Add gprofng maintainer.
56 * README-how-to-make-a-release: Add gprofng.
58 2022-03-10 Nick Clifton <nickc@redhat.com>
60 * dwarf.c (use_debuginfod): New variable. Set to 1.
61 (load_separate_debug_info): Only call
62 debuginfod_fetch_separate_debug_info is use_debuginfod is true.
63 (dwarf_select_sections_by_names): Add do-not-use-debuginfod and
64 use-debuginfod options.
65 (dwarf_select_sections_by_letters): Add D and E options.
66 * dwarf.h (use_debuginfod): New extern.
67 * objdump.c (usage): Mention the new options.
68 * readelf.c (usage): Likewise.
69 * doc/binutils.texi: Document the new options.
70 * doc/debug-options.texi: Describe the new options.
71 * NEWS: Mention the new feature.
72 * testsuite/binutils-all/debuginfod.exp: Add tests of the new
75 2021-03-06 Maciej W. Rozycki <macro@orcam.me.uk>
77 * testsuite/binutils-all/mips/mips1-branch-alias.d: New test.
78 * testsuite/binutils-all/mips/mips1-branch-noalias.d: New test.
79 * testsuite/binutils-all/mips/mips2-branch-alias.d: New test.
80 * testsuite/binutils-all/mips/mips2-branch-noalias.d: New test.
81 * testsuite/binutils-all/mips/mips32r6-branch-alias.d: New test.
82 * testsuite/binutils-all/mips/mips32r6-branch-noalias.d: New
84 * testsuite/binutils-all/mips/micromips-branch-alias.d: New
86 * testsuite/binutils-all/mips/micromips-branch-noalias.d: New
88 * testsuite/binutils-all/mips/mips-branch-alias.s: New test
90 * testsuite/binutils-all/mips/micromips-branch-alias.s: New test
92 * testsuite/binutils-all/mips/mips.exp: Run the new tests.
94 2022-03-04 Simon Marchi <simon.marchi@polymtl.ca>
96 * readelf.c (process_dynamic_section): Fix indentation.
98 2022-02-09 Nick Clifton <nickc@redhat.com>
100 * README-how-to-make-a-release: Update after the 2.38 release.
102 2022-01-27 Nick Clifton <nickc@redhat.com>
104 * po/sv.po: Updated Swedish translation.
106 2022-01-24 Nick Clifton <nickc@redhat.com>
108 * po/bg.po: Updated Bulgarian translation.
109 * po/fr.po: Updated French translation.
110 * po/ro.po: Updated Romanian translation.
111 * po/uk.po: Updated Ukranian translation.
113 2022-01-22 Martin Storsjö <martin@martin.st>
115 * dlltool.c (main): Allow inferring tmp_prefix from the dll name
118 2022-01-22 Nick Clifton <nickc@redhat.com>
120 * configure: Regenerate.
121 * po/binutils.pot: Regenerate.
123 2022-01-22 Nick Clifton <nickc@redhat.com>
125 * 2.38 release branch created.
127 2022-01-17 Nick Clifton <nickc@redhat.com>
129 * Makefile.in: Regenerate.
131 2022-01-11 Fangrui Song <maskray@google.com>
134 * ar.c (long_options): Add --thin.
135 (usage) Add --thin. Deprecate -T without diagnostics.
136 * doc/binutils.texi: Add doc.
137 * NEWS: Mention --thin.
138 * binutils/testsuite/binutils-all/ar.exp: Add tests.
140 2022-01-11 Martin Storsjö <martin@martin.st>
142 * dlltool.c (main): If a prefix has not been provided, attempt to
143 use a deterministic one based upon the dll name.
145 2022-01-07 Pavel Mayorov <pmayorov@cloudlinux.com>
148 * dwarf.c: Revert previous delta.
149 (debug_get_real_type): Reject indirect types that point to
151 (debug_get_type_name, debug_get_type_size, debug_write_type):
154 2022-01-06 Nick Clifton <nickc@redhat.com>
156 * debug.c (debug_write_type): Allow for malicious recursion via
157 indirect debug types.
159 2022-01-04 Nick Clifton <nickc@redhat.com>
162 * dwarf.c (load_build_id_debug_file): Remove spurious printf.
164 2021-12-16 Nick Clifton <nickc@redhat.com>
167 * dwarf.c (load_build_id_debug_file): New function.
168 (try_build_id_prefix): New function.
169 (check_for_and_load_links): Call load_build_id_debug_file.
170 (debug_displays): Add entry for .note.gnu.build-id.
171 * dwarf.h (enum dwarf_section_display_enum): Add
173 * testsuite/binutils-all/debuginfod.exp (test_fetch_debuglink):
174 Fix regexp for loads via debuglink section.
176 2021-12-03 Chenghua Xu <xuchenghua@loongson.cn>
178 * MAINTAINERS: Add myself and Zhensong Liu
179 as the LoongArch maintainer.
181 2021-12-02 Nick Clifton <nickc@redhat.com>
184 * dwarf.c (process_cu_tu_index): Add test for overruning section
185 whilst processing slots.
187 2021-11-30 Roland McGrath <mcgrathr@google.com>
189 * doc/local.mk: Give each man page target its missing dependency on
192 2021-11-30 Nick Clifton <nickc@redhat.com>
194 * dwarf.c (find_debug_info_for_offset): Use dwarf_vma type for
195 offsets, sizes and ranges.
196 (display_loc_list): Likewise. Also use print_dwarf_vma to print
198 (display_loclists_list): Likewise.
199 (display_loc_list_dwo): Likewise.
200 (display_debug_str): Likewise.
201 (display_debug_aranges): Likewise.
202 (display_debug_ranges_list): Likewise.
203 (display_debug_rnglists_list): Likewise.
204 (display_debug_ranges): Likewise.
206 2021-11-29 Nick Clifton <nickc@redhat.com>
209 * strings.c (usage): Update desciption of -n option.
210 * doc/binutils.texi: Likewise.
212 2021-11-24 Nick Clifton <nickc@redhat.com>
215 * sysdump.c (getCHARS): Check for an out of bounds read.
217 2021-11-16 Fangrui Song <maskray@google.com>
219 * readelf.c (enum relocation_type): New.
220 (slurp_relr_relocs): New.
221 (dump_relocations): Change is_rela to rel_type.
223 (dynamic_relocations): Add DT_RELR.
224 (process_relocs): Check SHT_RELR and DT_RELR.
225 (process_dynamic_section): Store into dynamic_info for
226 DT_RELR/DT_RELRENT/DT_RELRSZ.
228 2021-11-09 Nick Clifton <nickc@redhat.com>
230 * nm.c: Add --unicode option to control how unicode characters are
232 * objdump.c: Likewise.
233 * readelf.c: Likewise.
234 * strings.c: Likewise.
235 * binutils.texi: Document the new feature.
236 * NEWS: Document the new feature.
237 * testsuite/binutils-all/unicode.exp: New file.
238 * testsuite/binutils-all/nm.hex.unicode
239 * testsuite/binutils-all/strings.escape.unicode
240 * testsuite/binutils-all/objdump.highlight.unicode
241 * testsuite/binutils-all/readelf.invalid.unicode
243 2021-11-03 Tom Tromey <tromey@adacore.com>
245 * dwarf.c (display_debug_loc): Use section name in warnings.
247 2021-10-25 Nick Alcock <nick.alcock@oracle.com>
249 * objdump.c (usage): --ctf now has an optional argument.
250 (main): Adjust accordingly.
251 (dump_ctf): Default it.
252 * doc/ctf.options.texi: Adjust.
254 2021-10-25 Nick Alcock <nick.alcock@oracle.com>
256 * objdump.c (usage): --ctf-parent now takes a name, not a section.
257 (dump_ctf): Don't open a separate section; use the parent_name in
258 ctf_dict_open instead. Use ctf_archive_next, not ctf_archive_iter,
259 so we can pass down a member count.
260 (dump_ctf_archive_member): Add the member count; don't return
261 anything. Import parents into children no matter what the
262 parent's name, while still avoiding displaying the header for the
263 common parent name of ".ctf".
264 * readelf.c (usage): Adjust similarly.
265 (dump_section_as_ctf): Likewise.
266 (dump_ctf_archive_member): Likewise. Never stop iterating over
267 archive members, even if ctf_dump of one member fails.
268 * doc/ctf.options.texi: Adjust.
270 2021-10-19 Nick Clifton <nickc@redhat.com>
272 * nm.c (filter_symbols): Test for a NULL name before checking to
273 see if the symbol is __gnu_lto_slim.
274 * objcopy.c (filter_symbols): Likewise.
276 2021-09-30 Nick Clifton <nickc@redhat.com>
278 * objcopy.c (filter_symbols): Fail if attempting to dredefine
279 symbols in an LTO object file.
281 2021-09-27 Nick Alcock <nick.alcock@oracle.com>
283 * configure: Regenerate.
285 2021-09-20 Andrew Burgess <andrew.burgess@embecosm.com>
287 * testsuite/binutils-all/riscv/riscv.exp: New file.
288 * testsuite/binutils-all/riscv/unknown.d: New file.
289 * testsuite/binutils-all/riscv/unknown.s: New file.
291 2021-09-07 Luis Machado <luis.machado@linaro.org>
293 Revert: [AArch64] MTE corefile support
295 2021-05-21 Luis Machado <luis.machado@linaro.org>
297 * readelf.c (get_note_type): Handle NT_MEMTAG note types.
299 2021-08-11 Nick Clifton <nickc@redhat.com>
301 * po/pt.po: Updated Portuguese translation.
303 2021-08-10 Nick Clifton <nickc@redhat.com>
305 * po/sr.po: Updated Serbian translation.
307 2021-07-16 Nick Clifton <nickc@redhat.com>
309 * po/sv.po: Updated Swedish translation.
311 2021-07-14 Clément Chigot <clement.chigot@atos.net>
313 * dwarf.h (struct dwarf_section): Add XCOFF name.
314 * dwarf.c (struct dwarf_section_display): Update.
315 * objdump.c (load_debug_section): Add XCOFF name handler.
316 (dump_dwarf_section): Likewise.
318 2021-07-12 Nick Clifton <nickc@redhat.com>
320 * po/fr.po: Updated French translation.
322 2021-07-10 Alan Modra <amodra@gmail.com>
325 * dwarf.c (display_discr_list): Remove assertions. Delete "end"
326 parameter, use initial "data" pointer as the end. Formatting.
327 Don't count down bytes as they are read.
328 (read_and_display_attr_value): Adjust display_discr_list call.
329 (read_and_print_leb128): Don't pass __FILE__ and __LINE__ to
331 * dwarf.h (report_leb_status): Don't report file and line
332 numbers. Delete file and lnum parameters,
333 (READ_ULEB, READ_SLEB): Adjust.
335 2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
337 * configure.ac: Check for strnlen declaration.
338 * configure, config.in: Regenerate.
340 2021-07-05 Alan Modra <amodra@gmail.com>
343 * dwarf.c (get_type_abbrev_from_form): Add cu_end parameter.
344 Check DW_FORM_ref1 etc. arg against cu_end rather than end of
345 section. Adjust all callers.
347 2021-07-03 Nick Clifton <nickc@redhat.com>
349 * configure: Regenerate.
350 * po/opcodes.pot: Regenerate.
351 * README-how-to-make-a-release: Update.
353 2021-07-03 Nick Clifton <nickc@redhat.com>
355 * 2.37 release branch created.
357 2021-07-02 Alan Modra <amodra@gmail.com>
360 * dwarf.c (get_type_signedness): Don't run off end of buffer
361 printing DW_FORM_string attribute.
363 2021-07-01 Nick Clifton <nickc@redhat.com>
366 * testsuite/binutils-all/debuginfod.exp: Replace -wK with -wk.
368 2021-07-01 Andrei Homescu <ah@immunant.com>
370 * readelf.c (process_archive): Reset file position to the
371 beginning when calling process_object for thin archive members.
372 * testsuite/binutils-all/readelf.exp: Add test.
373 * testsuite/binutils-all/readelf.h.thin: New file.
375 2021-06-30 Tom Tromey <tom@tromey.com>
377 * dwarf.c (read_and_display_attr_value): Handle
378 DW_FORM_implicit_const.
380 2021-06-30 Richard Henderson <richard.henderson@linaro.org>
382 * dwarf.c (display_debug_frames): Both DW_CFA_def_cfa_sf
383 and DW_CFA_def_cfa_offset_sf have a signed offset.
385 2021-06-19 Alan Modra <amodra@gmail.com>
387 * dwarf.c (display_debug_lines_decoded): Use memcpy rather than
388 strncpy when trimming file name length to MAX_FILENAME_LENGTH.
389 Don't make an unnecessary copy when length is good.
391 2021-06-18 H.J. Lu <hongjiu.lu@intel.com>
393 * readelf.c (print_gnu_property_note): Handle
394 GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI,
395 GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI.
397 2021-06-15 Nick Clifton <nickc@redhat.com>
399 * readelf.c (get_note_type): Add support for NT_GO_BUILDID.
401 2021-06-15 Alan Modra <amodra@gmail.com>
403 * readelf.c (locate_dynamic_section, is_pie): New functions.
404 (get_file_type): Replace e_type parameter with filedata. Call
405 is_pie for ET_DYN. Update all callers.
406 (process_program_headers): Use local variables dynamic_addr and
407 dynamic_size, updating filedata on exit from function. Set
408 dynamic_size of 1 to indicate no dynamic section or segment.
409 Update tests of dynamic_size throughout.
410 * testsuite/binutils-all/x86-64/pr27708.dump: Update expected output.
412 2021-06-14 Eric Botcazou <ebotcazou@adacore.com>
414 * dwarf.c (struct abbrev_attr): Change type of implicit_const.
415 (add_abbrev_attr): Likewise.
416 (process_abbrev_set): Likewise.
417 (display_debug_abbrev): Adjust to above change.
419 2021-06-12 Alan Modra <amodra@gmail.com>
421 * readelf.c (process_file_header): Don't clear section_headers.
423 2021-06-12 Alan Modra <amodra@gmail.com>
425 * readelf.c (get_section_headers): Don't test e_shoff here, leave
426 that to get_32bit_section_headers or get_64bit_section_headers.
427 (process_object): Throw away section header read to print file
430 2021-06-11 Alan Modra <amodra@gmail.com>
432 * readelf.c (struct filedata): Move archive_file_offset and
433 archive_file_size earlier.
434 (free_filedata): Clear using memset.
436 2021-06-11 Alan Modra <amodra@gmail.com>
438 * readelf.c (GET_ELF_SYMBOLS): Delete. Replace with..
439 (get_elf_symbols): ..this new function throughout.
440 (get_32bit_section_headers): Don't free section_headers.
441 (get_64bit_section_headers): Likewise.
442 (get_section_headers): New function, use throughout in place of
443 32bit and 64bit variants.
444 (get_dynamic_section): Similarly.
445 (process_section_headers): Don't free filedata memory here.
446 (get_file_header): Don't get section headers here..
447 (process_object): ..Read them here instead. Don't exit without
448 freeing filedata memory.
450 2021-06-09 Nick Clifton <nickc@redhat.com>
452 * MAINTAINERS: Remove Daniel Jacobwitz from the maintainers list.
454 2021-06-07 Jan Beulich <jbeulich@suse.com>
456 * dwarf.c (display_debug_aranges): Add u suffix to constant.
458 2021-05-29 Alan Modra <amodra@gmail.com>
460 * objdump (usage): Add missing \n.
462 2021-05-29 Alan Modra <amodra@gmail.com>
464 * readelf.c (parse_args): Call dwarf_select_sections_all on
465 --debug-dump without optarg.
466 (usage): Associate -w and --debug-dump options closely.
467 Split up help message. Remove extraneous blank lines around
469 * objdump.c (usage): Similarly.
471 2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
473 * testsuite/binutils-all/mips/mips-xpa-virt-1.d: Correct CFC0
475 * testsuite/binutils-all/mips/mips-xpa-virt-3.d: Likewise.
477 2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
479 * testsuite/binutils-all/mips/mips-xpa-virt-1.d: Use `mips:3000'
480 machine for disassembly.
481 * testsuite/binutils-all/mips/mips-xpa-virt-2.d: Likewise.
482 * testsuite/binutils-all/mips/mips-xpa-virt-3.d: Likewise.
483 * testsuite/binutils-all/mips/mips-xpa-virt-4.d: Likewise.
485 2021-05-28 H.J. Lu <hongjiu.lu@intel.com>
488 * readelf.c (decode_x86_feature_2): Revert commit 50c95a739c9.
490 2021-05-27 Alan Modra <amodra@gmail.com>
492 * readelf (usage): Order -w letters to match --debug-dump= and
493 move common '=' for --debug-dump out of brackets.
495 2021-05-26 H.J. Lu <hongjiu.lu@intel.com>
498 * readelf.c (decode_x86_feature_2): Support
499 GNU_PROPERTY_X86_FEATURE_2_CODE16.
501 2021-05-23 Tiezhu Yang <yangtiezhu@loongson.cn>
503 * readelf.c (get_machine_name): Change Loongson Loongarch to
506 2021-05-21 Luis Machado <luis.machado@linaro.org>
508 * readelf.c (get_note_type): Add missing NT_ARM_* entries.
510 2021-05-21 Luis Machado <luis.machado@linaro.org>
512 * readelf.c (get_note_type): Handle NT_MEMTAG note types.
514 2021-05-19 Eli Schwartz <eschwartz@archlinux.org>
516 * dwarf.c (ENABLE_CHECKING): Define to 0 if not previously set.
518 2021-05-19 Alan Modra <amodra@gmail.com>
521 * dwarf.c (get_type_abbrev_from_form): Replace cu_offset_return
522 param with map_return, and return map for DW_FORM_ref_addr.
523 (get_type_signedness): Adjust calls to get_type_abbrev_from_form.
524 Pass returned cu map start and end to recursive call.
525 (read_and_display_attr_value): Similarly.
527 2021-05-19 Alan Modra <amodra@gmail.com>
530 * sysdump.c (getBARRAY): Sanity check size against max.
531 (getINT): Avoid UB shift left.
533 2021-05-15 Alan Modra <amodra@gmail.com>
535 * dwarf.c (process_cu_tu_index): Avoid pointer UB. Use _mul_overflow.
538 2021-05-15 Alan Modra <amodra@gmail.com>
540 * dwarf.c (display_gdb_index): Avoid pointer UB and overflow in
543 2021-05-15 Alan Modra <amodra@gmail.com>
545 * dwarf.c (display_debug_names): Complain when header length is
546 too small. Avoid pointer UB. Sanity check augmentation string,
547 CU table, TU table and foreign TU table sizes.
549 2021-05-15 Alan Modra <amodra@gmail.com>
551 * dwarf.c (display_debug_frames): Delete initial_length_size.
552 Avoid pointer UB. Constrain data reads to length given in header.
553 Sanity check cie header length. Only skip up to next FDE on
554 finding augmentation data too long.
556 2021-05-15 Alan Modra <amodra@gmail.com>
558 * dwarf.c (read_cie): Add more sanity checks to ensure data
559 pointer is not bumped past end.
561 2021-05-15 Alan Modra <amodra@gmail.com>
563 * dwarf.c (display_debug_ranges): Delete initial_length_size.
564 Correct fallback size calculated on finding a reloc. Constrain
565 data reads to length given in header. Avoid pointer UB.
567 2021-05-15 Alan Modra <amodra@gmail.com>
569 * dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
571 2021-05-15 Alan Modra <amodra@gmail.com>
573 * dwarf.c (display_debug_str_offsets): Constrain reads to length
576 2021-05-15 Alan Modra <amodra@gmail.com>
578 * dwarf.c (display_debug_aranges): Delete initial_length_size.
579 Use end_ranges to constrain data reads to header length. Avoid
582 2021-05-15 Alan Modra <amodra@gmail.com>
584 * dwarf.c (display_loc_list): Avoid pointer UB. Correct check
585 before reading uleb length. Warn on excess length.
587 2021-05-15 Alan Modra <amodra@gmail.com>
589 * dwarf.c (display_debug_macro): Print strings that might not
590 be zero terminated with %*s. Don't bump curr if unterminated.
592 2021-05-15 Alan Modra <amodra@gmail.com>
594 * dwarf.c (get_line_filename_and_dirname): Delete initial_length_size.
595 Simplify length sanity check, and check for too small lengths.
596 Constrain data reads to header length. Avoid pointer UB.
598 2021-05-15 Alan Modra <amodra@gmail.com>
600 * dwarf.c (display_debug_macinfo): Print strings that might not
601 be zero terminated with %*s. Don't bump curr if unterminated.
603 2021-05-15 Alan Modra <amodra@gmail.com>
605 * dwarf.c (display_debug_pubnames_worker): Delete initial_length_size.
606 Simplify length check. Constrain reads to length given by header.
608 2021-05-15 Alan Modra <amodra@gmail.com>
610 * dwarf.c (display_debug_lines_decoded): Don't use strnlen when
611 we have already checked for NUL termination.
613 2021-05-15 Alan Modra <amodra@gmail.com>
615 * dwarf.c (read_debug_line_header): Delete initial_length_size.
616 Avoid pointer UB. Keep within length specified by header.
619 2021-05-15 Alan Modra <amodra@gmail.com>
621 * dwarf.c (process_debug_info): Always do the first CU length
622 scan for sanity checks. Remove initial_length_size var and
623 instead calculate end_cu. Use end_cu to limit data reads.
624 Delete now dead code checking length.
626 2021-05-15 Alan Modra <amodra@gmail.com>
628 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Assert only when ENABLE_CHECKING.
630 2021-05-15 Alan Modra <amodra@gmail.com>
632 * bucomm.h (_mul_overflow): Define.
633 * dwarf.c (get_encoded_value): Avoid pointer UB.
635 2021-05-13 Alan Modra <amodra@gmail.com>
638 * dwarf.c (display_debug_str_offsets): Sanity check dwarf5
641 2021-05-13 Alan Modra <amodra@gmail.com>
644 * dwarf.c (display_debug_frames): Sanity check cie_off before
645 attempting to read cie.
647 2021-05-12 Alan Modra <amodra@gmail.com>
649 * dwarf.c (process_extended_line_op): Don't bump data pointer past
650 end when strnlen doesn't find string terminator.
651 (decode_location_expression): Remove dead code.
652 (skip_attr_bytes): Remove const from end param. Ensure data
653 pointer doesn't pass end.
654 (get_type_signedness): Remove const from end param.
655 (read_and_display_attr_value): Ensure data pointer doesn't pass end.
656 (display_debug_lines_raw, display_debug_lines_decoded): Likewise.
657 (display_debug_pubnames_worker): Likewise.
658 (display_debug_pubnames_worker): Use SAFE_BYTE_GET_AND INC rather
659 than blindly incrementing data pointer.
660 (display_debug_addr, display_debug_str_offsets): Likewise. Don't
661 compare pointers, compare lengths.
663 2021-05-12 Alan Modra <amodra@gmail.com>
665 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Define.
666 (SAFE_BYTE_GET, SAFE_BYTE_GET_AND_INC): Define using the above.
667 (SAFE_SIGNED_BYTE_GET, SAFE_SIGNED_BYTE_GET_AND_INC): Likewise.
668 (display_discr_list): Use SAFE_BYTE_GET_AND_INC rather than
669 SAFE_BYTE_GET followed by increment.
670 (process_debug_info): Likewise, and test bytes remaining before
671 incrementing section_begin rather than using pointer comparison.
672 (display_debug_names): Pass lvalue as SAFE_BYTE_GET PTR.
673 (process_cu_tu_index): Likewise for SAFE_BYTE_GET_AND_INC.
675 2021-05-12 Alan Modra <amodra@gmail.com>
677 * dwarf.c (dwarf_vmatoa64, SAFE_BYTE_GET64, add64): Delete.
678 (skip_attr_bytes): Replace use of SAFE_BYTE_GET64 with
679 SAFE_BYTE_GET_AND_INC.
680 (read_and_display_attr_value): Likewise. Print using dwarf_vmatoa.
681 (process_debug_info, process_cu_tu_index): Likewise.
682 * elfcomm.c (byte_put, byte_put_little_endian, byte_put_big_endian),
683 (byte_get, byte_get_little_endian, byte_get_big_endian),
684 (byte_get_signed): Make size param unsigned. Remove code dealing
686 (byte_get_64): Delete.
687 * elfcomm.h (byte_put, byte_put_little_endian, byte_put_big_endian),
688 (byte_get, byte_get_little_endian, byte_get_big_endian),
689 (byte_get_signed): Update prototypes.
690 (byte_get_64): Delete.
692 2021-05-12 Alan Modra <amodra@gmail.com>
695 * dwarf.c (display_debug_frames): Don't compare pointers derived
696 from user input. Test offset against bounds instead.
698 2021-05-12 Alan Modra <amodra@gmail.com>
701 * dwarf.c (display_formatted_table): Test for data >= end rather
703 (process_extended_line_op): Likewise.
704 (display_debug_lines_raw): Likewise.
705 (display_debug_lines_decoded): Likewise.
707 2021-05-12 Alan Modra <amodra@gmail.com>
710 * dwarf.c (fetch_indexed_string): Correct length sanity checks.
711 Sanity check section size for version and padding too. Correct
712 index sanity check. Handle multiple tables in .debug_str_offsets.
714 2021-05-11 Hans-Peter Nilsson <hp@axis.com>
716 * dwarf.c (process_abbrev_set): Properly parenthesize before
717 casting to unsigned long.
719 2021-05-11 Alan Modra <amodra@gmail.com>
722 * dwarf.c (process_abbrev_set): Replace start and end parameters
723 with section, abbrev_base, abbrev_size, abbrev_offset. Update
724 all callers. Sanity check parameters correctly and emit warnings
726 (process_debug_info): ..here.
728 2021-05-10 Thomas Wolff <towo@towo.net>
733 * windres.c (quot): Revert previous delta. Do not use double
734 quotes when spaces are detected in options.
735 * doc/binutils.texi (windres): Remove suggestion that the
736 --preprocessor option can take arguments.
738 2021-05-10 Alan Modra <amodra@gmail.com>
740 * dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
741 END rather than adding amount to PTR.
742 (SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise.
744 2021-05-09 Alan Modra <amodra@gmail.com>
746 * objcopy.c (eq_string): Delete.
747 (create_symbol_htab): Use htab_eq_string.
749 2021-05-08 Mike Frysinger <vapier@gentoo.org>
751 * README-how-to-make-a-release: Update html & pdf entries.
753 2021-05-08 Mike Frysinger <vapier@gentoo.org>
755 * doc/Makefile.am (html-local, binutils/index.html): New targets.
756 * doc/Makefile.in: Regenerate.
758 2021-05-08 Mike Frysinger <vapier@gentoo.org>
760 * doc/Makefile.am (AM_MAKEINFOFLAGS): Add --no-split.
761 * doc/Makefile.in: Regenerate.
763 2021-05-07 Nick Clifton <nickc@redhat.com>
765 * readelf.c (no_processor_specific_unwind): New function.
766 (process_unwind): Use no_processor_specific_unwind for X86
769 2021-05-07 Michael Forney <mforney@mforney.org>
771 * dwarf.c: Don't omit second operand of '?' operator.
773 2021-04-30 Nick Clifton <nickc@redhat.com>
776 * dwarf.c (load_debug_sup_file): Allocate memory for filename in
779 2021-04-29 Nick Clifton <nickc@redhat.com>
782 * doc/binutils.texi (windres): Correct the description of the
783 default value of the --preprocessor argument.
785 2021-04-27 Nick Clifton <nickc@redhat.com>
788 * dwarf.c (parse_gnu_debuglink): Reject empty names.
789 (parse_gnu_debugaltlink): Likewise.
791 2021-04-22 Clément Chigot <clement.chigot@atos.net>
793 * od-xcoff.c (dump_xcoff32_symbols): Adapt to new
796 2021-04-21 Nick Lott <nick.lott@gmail.com>
799 * readelf.c (sym_base): New variable.
800 (enum print_mode): Add more modes.
801 (print_vma): Add suport for new modes.
802 (options): Add sym-base.
803 (usage): Add sym-base.
804 (parse_args): Add support for --sym-base.
805 (print_dynamic_symbol_size): New function.
806 (print_dynamic_symbol): Use new function.
807 * doc/binutils.texi: Document the new feature.
808 * NEWS: Mention the new feature.
810 2021-04-21 Nick Clifton <nickc@redhat.com>
812 * testsuite/binutils-all/mips/global-local-symtab-sort-n64t.d:
813 Adjust expected output to allow for named section symbols.
814 * testsuite/binutils-all/mips/global-local-symtab-sort-o32t.d:
816 * testsuite/binutils-all/readelf.s-64: Likewise.
817 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
818 * testsuite/binutils-all/readelf.ss-tmips: Likewise.
819 * testsuite/binutils-all/readelf.ss-unused: Likewise.
821 2021-04-21 Luo Longjun <luolongjun@huawei.com>
823 * readelf.c (print_dynamic_symbol): Print the section name for
824 section symbols without a name of their own.
826 2021-04-20 Andreas Krebbel <krebbel@linux.ibm.com>
828 * MAINTAINERS: Remove Martin Schwidefsky as s390 maintainer and
829 add him to Past Maintainers.
830 Update my email address.
832 2021-04-19 Nick Clifton <nickc@redhat.com>
835 * arsup.c (ar_addmod): Enable plugin support, if available.
837 2021-04-19 Nick Clifton <nickc@redhat.com>
839 * rename.c: (get_stat_atime_ns): Add prototype.
840 (get_stat_mtime_ns): Add prototype.
842 2021-04-16 Alan Modra <amodra@gmail.com>
845 * rename.c (get_stat_atime, get_stat_mtime): Make static.
846 (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
848 2021-04-15 Pekka Seppänen <pexu@sourceware.mail.kapsi.fi>
851 * rename.c (get_stat_atime_ns): Add ATTRIBUTE_UNUSED.
852 (get_stat_mtime_ns): Likewise.
854 2021-04-15 Alan Modra <amodra@gmail.com>
857 * configure.ac: Check for sys/time.h and utimensat. Use standard
858 checks for mkstemp and mkdtemp. Whitespace. Check for nanosecond
859 members of struct stat.
860 * rename.c: Prefer sys/time.h for utimes over utime.h for utime.
861 (STAT_TIMESPEC, STAT_TIMESPEC_NS): Define
862 (get_stat_atime_ns, get_stat_mtime_ns): New inline functions.
863 (get_stat_atime, get_stat_mtime): Likewise.
864 (set_times): Choose first available of utimensat, utimes, utime.
865 Use above inline functions to set timespec and timeval values.
866 * configure: Regenerate.
867 * config.in: Regenerate.
868 * testsuite/binutils-all/objcopy.exp (objcopy_test): Add test of
869 file timestamp when --preserve-dates is used.
871 2021-04-15 Alan Modra <amodra@gmail.com>
874 * rename.c (smart_rename): When TO and FROM are equal, just set
876 * objcopy.c (strip_main, copy_main): Always call smart_rename.
878 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
881 * testsuite/binutils-all/x86-64/pr27708.dump: New file.
882 * testsuite/binutils-all/x86-64/pr27708.exe.bz2: Likewise.
883 * testsuite/binutils-all/x86-64/x86-64.exp: Run binutils/27708
886 2021-04-14 Mark Harmstone <mark@harmstone.com>
889 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the
890 end of the structure.
892 2021-04-14 Frederic Cambus <fred@statdns.com>
894 * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
895 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
897 2021-04-14 Alan Modra <amodra@gmail.com>
900 * objdump.c (show_line): Don't limit paths to PATH_MAX.
901 * readelf.c (struct filedata): Change program_interpreter from
902 a char array to a char pointer.
903 (process_program_headers): Sanity check PT_INTERP p_filesz.
904 Malloc program_interpreter using p_filesz and read directly from
906 (process_dynamic_section): Check program_interpreter is non-NULL.
907 (free_filedata): New function, split out from..
908 (process_object): ..here.
909 (close_debug_file): Call free_filedata.
910 * sysdep.h: Don't include sys/param.h.
911 (PATH_MAX): Don't define.
912 * configure.ac: Don't check for sys/param.h.
913 * configure: Regenerate.
915 2021-04-13 Frederic Cambus <fred@statdns.com>
917 * readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
918 check for NT_NETBSD_PAX.
920 2021-04-12 Alan Modra <amodra@gmail.com>
922 * configure.ac (--enable-checking): Add support.
923 * config.in: Regenerate.
924 * configure: Regenerate.
926 2021-04-09 Alan Modra <amodra@gmail.com>
928 * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
930 (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move.
931 (disassemble_section, disassemble_data): Likewise.
933 2021-04-06 Alan Modra <amodra@gmail.com>
935 * objdump.c (objdump_symbol_at_address): Return asymbol*.
937 2021-04-06 Alan Modra <amodra@gmail.com>
939 * NEWS: Mention C99 requirement.
940 * README: Likewise. Modernise examples and "Reporting bugs".
942 2021-04-05 Alan Modra <amodra@gmail.com>
944 * configure.ac: Assume long long is available. Don't test for
945 strings.h, stdlib.h, limits.h, locale.h, or wchar.h. Check
946 inttypes.h, stdint.h, sys/stat.h and sys/types.h. Don't check for
947 strcoll, setlocale, setmode or location of time_t. Don't check
948 for fprintf, getenv, snprintf, strnlen, strstr or vsnprintf decls.
949 (AC_ISC_POSIX, AXC_HEADER_STRING, AC_FUNC_ALLOCA): Don't invoke.
950 * sysdep.h: Don't include alloca-conf.h, include config.h instead.
951 Test HAVE_SYS_TYPES_H and reorder includes. Include limits.h,
952 locale.h, string.h and stdlib.h unconditionally. Remove various
953 fallback declarations. Assume long long is available.
954 * addr2line.c: Don't test HAVE_SETLOCALE.
956 * coffdump.c: Likewise.
957 * dlltool.c: Likewise.
958 * dllwrap.c: Likewise.
959 * elfedit.c: Likewise.
961 * objcopy.c: Likewise.
962 * objdump.c: Likewise.
963 * readelf.c: Likewise.
965 * srconv.c: Likewise.
966 * strings.c: Likewise.
967 * sysdump.c: Likewise.
968 * windmc.c: Likewise.
969 * windres.c: Likewise.
970 * bucomm.c: Don't test HAVE_TIME_T_IN_TIME_H or HAVE_TIME_T_IN_TYPES_H.
971 * dwarf.c: Include limits.h unconditionally. Assume long long
973 * nm.c: Don't test HAVE_STRCOLL.
974 * readelf.c: Don't test HAVE_WCHAR_H.
975 * strings.c: Assume long long is available.
976 * syslex.l: Include string.h unconditionally.
977 * aclocal.m4: Regenerate.
978 * config.in: Regenerate.
979 * configure: Regenerate.
980 * Makefile.in: Regenerate.
981 * doc/Makefile.in: Regenerate.
983 2021-04-01 Martin Liska <mliska@suse.cz>
985 * elfcomm.h (strneq): Remove strneq and use startswith.
986 * readelf.c (ia64_process_unwind): Likewise.
987 (process_note): Likewise.
989 2021-04-01 Martin Liska <mliska@suse.cz>
991 * dllwrap.c: Use startswith function.
992 * objcopy.c (is_dwo_section): Likewise.
993 (handle_remove_section_option): Likewise.
994 (copy_main): Likewise.
995 * objdump.c (is_significant_symbol_name): Likewise.
997 2021-04-01 Martin Liska <mliska@suse.cz>
999 * dwarf.c (display_debug_lines_raw): Replace const_strneq with
1001 (display_debug_lines_decoded): Likewise.
1002 (display_debug_links): Likewise.
1003 * elfcomm.c (setup_archive): Likewise.
1004 * elfcomm.h (const_strneq): Likewise.
1005 * readelf.c (process_section_headers): Likewise.
1006 (slurp_ia64_unwind_table): Likewise.
1007 (slurp_hppa_unwind_table): Likewise.
1008 (decode_arm_unwind): Likewise.
1009 (display_debug_section): Likewise.
1010 (process_note): Likewise.
1012 2021-03-31 Alan Modra <amodra@gmail.com>
1014 * sysdep.h (POISON_BFD_BOOLEAN): Define.
1015 * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
1016 * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
1017 * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
1018 * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
1019 * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
1020 * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
1021 * windmc.c, * windmc.h, * windres.c, * winduni.c,
1022 * wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
1023 and TRUE with true throughout.
1025 2021-03-31 Alan Modra <amodra@gmail.com>
1027 * coffdump.c: Include stdint.h in place of bfd_stdint.h.
1028 * dwarf.c: Likewise.
1030 2021-03-31 Alan Modra <amodra@gmail.com>
1032 * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
1034 2021-03-29 Alan Modra <amodra@gmail.com>
1036 * dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
1037 * dwarf.c (read_and_display_attr_value): Likewise.
1038 (display_debug_str_offsets): Likewise.
1039 * objdump.c (dump_bfd): Likewise.
1040 * readelf.c (dump_section_as_strings): Likewise.
1041 (dump_section_as_bytes): Likewise.
1043 2021-03-29 Alan Modra <amodra@gmail.com>
1045 * objdump.c (process_links): Use type int.
1046 * readelf.c (request_dump): Don't increment do_dump, set it.
1047 * windint.h (target_is_bigendian): Use type bfd_boolean.
1048 * windmc.c (target_is_bigendian): Likewise.
1049 * windres.c (target_is_bigendian): Likewise.
1051 2021-03-22 Martin Liska <mliska@suse.cz>
1053 * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ
1055 * emul_aix.c (ar_emul_aix_parse_arg): Likewise.
1056 * objcopy.c (is_mergeable_note_section): Likewise.
1057 * objdump.c (dump_dwarf_section): Likewise.
1058 * prdbg.c (pr_method_type): Likewise.
1059 (pr_class_baseclass): Likewise.
1060 (tg_class_baseclass): Likewise.
1061 * readelf.c (process_lto_symbol_tables): Likewise.
1062 * stabs.c (ULLHIGH): Likewise.
1063 (parse_stab_argtypes): Likewise.
1064 (stab_demangle_function_name): Likewise.
1066 2021-03-19 H.J. Lu <hongjiu.lu@intel.com>
1068 * readelf.c (get_machine_name): Add EM_INTELGT.
1070 2021-03-18 Nick Clifton <nickc@redhat.com>
1073 * readelf.c (dump_section_as_strings): Mention separate filename.
1074 (dump_section_as_bytes): Likewise.
1075 (dump_section_as_ctf): Likewise.
1076 (initialise_dumkps_byname): Only issue a warning for missing
1077 sections if processing the main file.
1078 (process_section_contents): Only issue a warning for unsumped
1079 section numbers in the main file.
1080 (initialise_dump_sects): New function. Contains code extracted
1082 (process_object): ... here. Also call initialise_dump_sects for
1085 2021-03-16 Nick Clifton <nickc@redhat.com>
1088 * readelf.c (display_debug_section): Also retain .debug_addr
1091 2021-03-16 Nick Clifton <nickc@redhat.com>
1094 * readelf.c (process_section_contents): Only dump debug
1095 information for separate files unless process_links is enabled.
1096 (process_object): Always call process_section_contents for
1097 separate info files.
1099 2021-03-15 Nick Clifton <nickc@redhat.com>
1102 * nm.c (FORMAT_JUST_SYMBOLS): Define.
1103 (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS.
1104 (long_options): Add just-symbols.
1105 (set_output_format): Add support for just-symbols.
1106 (get_print_format): Likewise.
1107 (do_not_print_object_filename): New function.
1108 (do_not_print_archive_filename): New function.
1109 (do_not_print_archive_member): New function.
1110 (do_not_print_symbol_filename): New function.
1111 (just_print_symbol_name): New function.
1112 (main): Handle --just-symbols.
1113 * NEWS: Mention the new feature.
1114 * doc/binutils.texi: Document the new feature.
1116 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1118 * od-xcoff.c: Replace RTB by TRL entry.
1120 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1121 Andrew Burgess <andrew.burgess@embecosm.com>
1123 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
1125 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1126 Andrew Burgess <andrew.burgess@embecosm.com>
1128 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
1130 2021-03-05 Nick Clifton <nickc@redhat.com>
1133 * dwarf.c (display_debug_macro): Handle the displaying of
1134 DW_MACRO_define_strp and DW_MACRO_undef_strp in v4
1135 .debug_macro.dwo sections.
1137 2021-03-04 Nick Clifton <nickc@redhat.com>
1140 * objdump.c (process_links): New variable.
1141 (usage): Add --process-links.
1142 (long_options): Likewise.
1143 (dump_bfd): Stop processing once the bfd has been loaded unless
1144 this is the main file or process_links has been enabled.
1145 (main): Handle the process-links option.
1146 * readelf.c (process_links): New variable.
1147 (struct filedata): Add is_separate field.
1148 (options): Add --process-links.
1150 (parse_args): Likewise.
1151 (process_file_header): Include the filename when dumping
1152 information for separate debuginfo files.
1153 (process_program_headers): Likewise.
1154 (process_section_headers): Likewise.
1155 (process_section_groups): Likewise.
1156 (process_relocs): Likewise.
1157 (process_dynamic_section): Likewise.
1158 (process_version_sections): Likewise.
1159 (display_lto_symtab): Likewise.
1160 (process_symbol_table): Likewise.
1161 (process_syminfo): Likewise.
1162 (initialise_dumps_by_name): Likewise.
1163 (process_section_contents): Likewise.
1164 (process_notes_at): Likewise.
1165 (process_notes): Likewise.
1166 (open_file): Add is_separate parameter. Use to initialise the
1167 is_separate field in the filedata structure.
1168 (open_deug): Update call to open_file.
1169 (process_object): Add processing of the contents of separate
1170 debuginfo files, gated by the process_links variable.
1171 (process_archive): Update call to open_file.
1172 (process_file): Initialise the is_separate field in the filedata
1174 * dwarf.c (load_separate_debug_info_file): Only report the
1175 loading of a separate file if debug links are being dumped.
1176 * objcopy.c (keep_section_symbols): New variable.
1177 (enum command_line_switch): Add OPTION_KEEP_SYMBOLS.
1178 (strip_options): Add keep-section-symbols.
1179 (copy_options): Likewise.
1180 (copy_usage): Likewise.
1181 (strip_usage): Likewise.
1182 (copy_object): Keep section symbols if requested by command line
1184 (strip_main): Handle --keep-section-symbols.
1185 (copy_main): Likewise.
1186 * doc/binutils.texi: Document the new options.
1187 * NEWS: Mention the new features.
1188 * testsuite/binutils-all/compress.exp (test_gnu_debuglink):
1189 Update options passed to objdump. Use diff rather than cmp to
1190 compare the dumped data.
1191 * testsuite/binutils-all/objdump.WK2: Update regexp.
1192 * testsuite/binutils-all/objdump.WK3: Update regexp.
1193 * testsuite/binutils-all/objdump.exp: Use --process-links
1194 instead of --dwarf=follow-links.
1195 * testsuite/binutils-all/readelf.exp (readelf_test): Include
1196 readelf's output in the log when the test fails.
1197 Add the -P option to the -wKis test.
1198 * testsuite/binutils-all/readelf.wKis: Update expected output.
1200 2021-03-03 Alan Modra <amodra@gmail.com>
1203 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
1204 * NEWS: Mention feature.
1206 2021-03-01 H.J. Lu <hongjiu.lu@intel.com>
1209 * dwarf.c (load_separate_debug_info): Issue warning only if
1210 do_debug_links is set.
1211 * testsuite/binutils-all/compress.exp: Run objdump and readelf
1212 with missing debug file.
1214 2021-03-01 Alan Modra <amodra@gmail.com>
1217 * doc/binutils.texi: Add nm --with-symbol-versions and
1218 --without-symbol-versions documentation.
1219 * nm.c (with_symbol_versions): New variable.
1220 (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
1221 (long_options): Make --with-symbol-versions entry twiddle the flag.
1222 Add --without-symbol-versions.
1223 (print_symname): Strip version when !with_symbol_versions. Add
1224 dynamic version info under control of with_symbol_versions.
1225 (main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
1227 2021-02-26 Fangrui Song <maskray@google.com>
1230 * readelf.c (quiet): New option flag.
1231 (enum long_option_values): New enum to hold long option value.
1232 (long_options): Add --quiet.
1233 (usage): Mention --quiet.
1234 (display_rel_file): If quiet is enabled, suppress "no symbols".
1235 (main): Handle the new option.
1236 * NEWS: Mention --quiet.
1237 * docs/binutils.texi: Document --quiet.
1239 2021-02-26 Tom de Vries <tdevries@suse.de>
1241 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
1243 2021-02-26 Tom de Vries <tdevries@suse.de>
1246 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
1248 (read_and_display_attr_value): Likewise.
1250 2021-02-25 Nick Clifton <nickc@redhat.com>
1252 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
1254 (read_and_display_attr_value): Handle sup forms.
1255 (display_debug_sup): New function. Displays the contents of a
1257 (load_debug_sup_file): New function. Loads the contents of a file
1258 referenced by a .debug_sup section.
1259 (check_for_and_load_links): Call load_debug_sup_file.
1260 (debug_displays): Add entry for .debug_sup.
1261 * dwarf.h (enum dwarf_section_display_enum): Add debug_sup.
1262 * readelf.c (process_section_headers): Add support for debug_sup.
1263 * doc/debug.options.texi: Note that the =links option will display
1264 the contents of .debug_sup sections.
1265 * NEWS: Mention the new support.
1267 2021-02-25 Alan Modra <amodra@gmail.com>
1270 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
1272 2021-02-24 Nick Clifton <nickc@redhat.com>
1275 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
1276 when adding together the section sizes.
1278 2021-02-24 Nick Clifton <nickc@redhat.com>
1280 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
1282 * readelf.c (print_gnu_build_attribute_description): Likewise.
1284 2021-02-24 Alan Modra <amodra@gmail.com>
1285 Siddhesh Poyarekar <siddhesh@gotplt.org>
1288 * bucomm.h (smart_rename): Update prototype.
1289 * rename.c (smart_rename): Add fromfd and preserve_dates params.
1290 Pass fromfd and target_stat to simple_copy. Call set_times
1291 when preserve_dates.
1292 (simple_copy): Accept fromfd rather than from filename. Add
1293 target_stat param. Rewind fromfd rather than opening. Open
1294 "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
1295 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
1296 closing output temp file, and pass tmpfd to smart_rename.
1297 * arsup.c (temp_fd): Rename from real_fd.
1298 (ar_save): Dup temp_fd and pass to smart_rename.
1299 * objcopy.c (strip_main, copy_main): Likewise, and pass
1302 2021-02-24 Alan Modra <amodra@gmail.com>
1305 * rename.c: Tidy throughout.
1306 (smart_rename): Always copy. Remove windows specific code.
1308 2021-02-20 Alan Modra <amodra@gmail.com>
1310 * testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
1311 (run_dump_test): Fail if expecting errors from a file like we do
1312 for error strings, if no error is seen.
1314 2021-02-19 Alan Modra <amodra@gmail.com>
1316 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
1318 2021-02-19 Siddhesh Poyarekar <siddhesh@gotplt.org>
1320 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
1322 * arsup.c (ar_save): Likewise.
1323 * objcopy (strip_main): Don't copy TMPFD. Don't set times on
1324 temporary file and adjust call to SMART_RENAME.
1325 (copy_main): Likewise.
1326 * rename.c [!S_ISLNK]: Remove definitions.
1327 (try_preserve_permissions): Remove function.
1328 (smart_rename): Remove FD, PRESERVE_DATES arguments. Use
1329 rename system call only if TO does not exist.
1330 * bucomm.h (smart_rename): Adjust declaration.
1332 2021-02-18 Nick Clifton <nickc@redhat.com>
1334 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
1335 address that is higher than the end address.
1337 2021-02-17 Alan Modra <amodra@gmail.com>
1339 * dwarf.c: Include limits.h.
1340 (CHAR_BIT): Provide backup define.
1341 (read_leb128): Use CHAR_BIT to size "result" in bits. Correct
1342 signed overflow checking.
1343 * testsuite/binutils-all/pr26548.s,
1344 * testsuite/binutils-all/pr26548.d,
1345 * testsuite/binutils-all/pr26548e.d: New tests.
1346 * testsuite/binutils-all/readelf.exp: Run them.
1347 (readelf_test): Drop unused "xfails" parameter. Update all uses.
1349 2021-02-16 Jan Beulich <jbeulich@suse.com>
1351 * dwarf.c (process_debug_info): Initialize "dwo_id".
1353 2021-02-15 Alan Modra <amodra@gmail.com>
1355 * objdump.c (load_specific_debug_section): Don't call
1356 bfd_cache_section_contents. Rearrange so that
1357 bfd_get_full_section_contents is not called on path where
1358 bfd_simple_get_relocated_section_contents is called.
1359 Don't set section->user_data.
1360 (free_debug_section): Always free section->start. Don't twiddle
1362 * readelf.c (load_specific_debug_section): Don't set user_data.
1363 * dwarf.h (struct dwarf_section): Remove use_data field.
1364 * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
1366 2021-02-15 Alan Modra <amodra@gmail.com>
1368 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
1369 * testsuite/binutils-all/objdump.exp: Likewise.
1371 2021-02-14 Alan Modra <amodra@gmail.com>
1373 * objdump.c (slurp_symtab): Don't add an extra entry for NULL
1374 to the symbol array.
1375 (slurp_dynamic_symtab): Likewise.
1376 (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
1378 2021-02-14 Alan Modra <amodra@gmail.com>
1380 * Makefile.in: Regenerate.
1381 * doc/Makefile.in: Regenerate.
1383 2021-02-13 Mike Frysinger <vapier@gentoo.org>
1385 * aclocal.m4: Regenerate.
1387 2021-02-12 Nick Clifton <nickc@redhat.com>
1389 * configure.ac (follow-debug-links): Add option to enable or
1390 disable the following of debug links by default. Set the
1391 default for the option to be 'follow'.
1392 * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
1393 (dwarf_select_sections_by_names): Add no-follow-links option.
1394 (dwarf_select_sections_by_letter): Add 'N' option.
1395 * objdump.c (usage): Add conditional text describing the
1396 follow links option.
1397 (slurp_symtab): Ensure that there is a NULL entry at the end
1398 of the symbol table.
1399 (slurp_dynamic_symtab): Likewise.
1400 (dump_bfd): When extending the symbol table, ensure that there
1401 is still a NULL entry at the end.
1402 * readelf.c (usage): Add conditional text describing the
1403 follow links option.
1404 * doc/binutils.texi: Update documentation for objcopy and
1406 * doc/debug.options.texi: Update documentation of the
1407 follow-links option.
1408 * config.in: Regenerate.
1409 * configure: Regenerate.
1410 * testsuite/binutils-all/compress.exp: Add the -WN option to
1411 objdump command lines that are not expecting to follow links.
1412 * testsuite/binutils-all/readelf.exp: Add the
1413 --debug-dump=no-follow-links option to tests that are not
1414 expecting to follow debug links.
1415 * NEWS: Mention the new behaviour.
1417 2021-02-12 Alan Modra <amodra@gmail.com>
1419 * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
1420 gas or ld fails to build a testcase rather than "unresolved".
1421 Report "fail" when readelf returns an error status rather than
1423 * testsuite/binutils-all/ar.exp: Likewise.
1424 * testsuite/binutils-all/compress.exp: Likewise.
1425 * testsuite/binutils-all/readelf.exp: Likewise.
1427 2021-02-12 Alan Modra <amodra@gmail.com>
1429 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
1430 "c" with "ccc" labels.
1432 2021-02-12 Tom de Vries <tdevries@suse.de>
1434 * dwarf.h (debug_info): Fix typo in comment.
1436 2021-02-12 Tom de Vries <tdevries@suse.de>
1438 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
1441 2021-02-12 Tom de Vries <tdevries@suse.de>
1443 * dwarf.c (process_debug_info): Print DWO ID.
1445 2021-02-11 Alan Modra <amodra@gmail.com>
1450 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
1451 Use bfd_malloc_and_get_section.
1452 (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
1453 check namesz. Return NULL if descsz is too small. Ensure
1454 string table is terminated.
1455 (elf32_avr_get_device_info): Formatting. Add note_size param.
1457 (elf32_avr_dump_mem_usage): Adjust to suit.
1459 2021-02-10 Tom de Vries <tdevries@suse.de>
1462 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
1464 2021-02-10 Tom de Vries <tdevries@suse.de>
1467 * dwarf.c (display_debug_ranges): Filter range lists according to
1470 2021-02-09 Tom de Vries <tdevries@suse.de>
1473 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
1475 2021-02-09 Tom de Vries <tdevries@suse.de>
1478 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
1479 DW_UT_split_compile.
1481 2021-02-09 Alan Modra <amodra@gmail.com>
1483 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
1486 2021-02-07 Alan Modra <amodra@gmail.com>
1488 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
1489 uninitialised on invalid input.
1491 2021-02-06 Alan Modra <amodra@gmail.com>
1494 * rename.c (smart_rename): Test for existence and type of output
1497 2021-02-05 Nick Clifton <nickc@redhat.com>
1499 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
1501 2021-02-05 Eli Zaretskii <eliz@gnu.org>
1504 * elfedit.c (check_file):
1505 * bucomm.c (get_file_size): Fix typos in comments.
1507 2021-02-05 Alan Modra <amodra@gmail.com>
1510 * arsup.c (ar_save): Use stat rather than lstat.
1512 2021-02-03 Alan Modra <amodra@gmail.com>
1517 * ar.c: Don't include libbfd.h.
1518 (write_archive): Replace xmalloc+strcpy with xstrdup. Use
1519 bfd_stat rather than fstat on iostream. Move stat and fd tests
1520 outside of _WIN32 ifdef. Delete skip_stat variable.
1521 * arsup.c (temp_name, real_ofd): New static variables.
1522 (ar_open): Use make_tempname and bfd_fdopenw.
1523 (ar_save): Adjust to suit ar_open changes. Move stat output
1525 * objcopy.c: Don't include libbfd.h.
1526 (copy_file): Use bfd_stat.
1528 2021-02-02 H.J. Lu <hongjiu.lu@intel.com>
1531 * readelf.c (process_section_headers): Add 'R' and 'D' to
1533 * testsuite/binutils-all/retain1a.d: Updated.
1535 2021-01-30 Nick Clifton <nickc@redhat.com>
1537 * README-how-to-make-a-release: Small updates after the 2.35.2
1540 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1543 * windres.c (quot): Use double quotes to protect strings on
1546 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1549 * bucomm.c (get_file_size): Add code to handle /dev/null on
1551 * elfedit.c (check_file): Likewise.
1553 2021-01-27 Nick Clifton <nickc@redhat.com>
1555 * objcopy.c (copy_main): Remove conditional control of the calls
1556 to free, simplifying the code and making it easier to detect
1559 2021-01-26 Frederic Cambus <fred@statdns.com>
1561 * objcopy.c (copy_main): Fix a double free happening when both
1562 --localize-symbols and --globalize-symbols options are invoked
1565 2021-01-24 Nick Clifton <nickc@redhat.com>
1567 * README-how-to-make-a-release: Minor updates after the 2.36 release.
1569 2021-01-16 Alan Modra <amodra@gmail.com>
1571 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
1573 2021-01-15 Alan Modra <amodra@gmail.com>
1576 * readelf.c (uncompress_section_contents): Always call inflateEnd.
1578 2021-01-14 Alexandre Oliva <oliva@gnu.org>
1580 * MAINTAINERS: Update my email address.
1582 2021-01-14 Nick Clifton <nickc@redhat.com>
1584 * po/sv.po: Updated Swedish translation.
1586 2021-01-13 Alan Modra <amodra@gmail.com>
1588 * Makefile.in: Regenerate.
1589 * doc/Makefile.in: Regenerate.
1591 2021-01-13 Zebediah Figura <z.figura12@gmail.com>
1594 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
1596 (i386_x64_trampoline): Add SEH annotations.
1597 (struct mac): Add how_seh field.
1598 (make_delay_head): If how_set field is true add SEh instructions.
1600 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1603 * configure.ac: Use GNU_MAKE_JOBSERVER.
1604 * aclocal.m4: Regenerated.
1605 * configure: Likewise.
1607 2021-01-12 Nick Clifton <nickc@redhat.com>
1609 * po/fr.po: Updated French translation.
1611 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1614 * configure: Regenerated.
1616 2021-01-11 Nick Clifton <nickc@redhat.com>
1618 * po/pt.po: Updated Portuguese translation.
1619 * po/sr.po: Updated Serbian translation.
1620 * po/uk.po: Updated Ukranian translation.
1622 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1624 * configure: Regenerated.
1626 2021-01-09 Nick Clifton <nickc@redhat.com>
1628 * configure: Regenerate.
1629 * po/binutils.pot: Regenerate.
1631 2021-01-09 Nick Clifton <nickc@redhat.com>
1633 * 2.36 release branch crated.
1634 * README-how-to-make-a-release: Add note about updating Makefiles
1636 * BRANCHES: Add binutils-2.36-branch.
1638 2021-01-09 Alan Modra <amodra@gmail.com>
1640 * configure: Regenerate.
1642 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1644 * configure: Regenerate.
1646 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1649 * objcopy.c (copy_object): Handle section symbols for
1650 non-relocatable inputs.
1651 * testsuite/binutils-all/readelf.exp (readelf_test): Check
1652 is_elf_unused_section_symbols.
1653 * testsuite/binutils-all/readelf.s-64: Updated.
1654 * testsuite/binutils-all/readelf.ss: Likewise.
1655 * testsuite/binutils-all/readelf.ss-64: Likewise.
1656 * testsuite/binutils-all/readelf.s-64-unused: New file.
1657 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
1658 * testsuite/binutils-all/readelf.ss-unused: Likewise.
1659 * testsuite/lib/binutils-common.exp
1660 (is_elf_unused_section_symbols): New proc.
1662 2021-01-06 Reuben Thomas <rrt@sc3d.org>
1664 * binutils/readelf.c: Correct grammar in comment.
1666 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1668 * coffgrok.c (do_type): Correct spelling of auxiliary in errors.
1669 * doc/binutils.texi: Correct grammar.
1670 * readelf.c (process_version_sections): Correct spelling of auxiliary
1672 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
1674 2021-01-01 Alan Modra <amodra@gmail.com>
1676 Update year range in copyright notice of all files.
1678 For older changes see ChangeLog-2020
1680 Copyright (C) 2021-2022 Free Software Foundation, Inc.
1682 Copying and distribution of this file, with or without modification,
1683 are permitted in any medium without royalty provided the copyright
1684 notice and this notice are preserved.
1690 version-control: never