1 2022-04-06 Nick Clifton <nickc@redhat.com>
4 * dwarf.c (fetch_indexed_value): Rename to fecth_indexed_addr and
5 return the address, rather than a string.
6 (fetch_indexed_value): New function - returns a value indexed by a
7 DW_FORM_loclistx or DW_FORM_rnglistx form.
8 (read_and_display_attr_value): Add support for DW_FORM_loclistx
10 (process_debug_info): Load the loclists and rnglists sections.
11 (display_loclists_list): Add support for DW_LLE_base_addressx,
12 DW_LLE_startx_endx, DW_LLE_startx_length and
13 DW_LLE_default_location.
14 (display_offset_entry_loclists): New function. Displays a
15 .debug_loclists section that contains offset entry tables.
16 (display_debug_loc): Call the new function.
17 (display_debug_rnglists_list): Add support for
18 DW_RLE_base_addressx, DW_RLE_startx_endx and DW_RLE_startx_length.
19 (display_debug_ranges): Display the contents of the section's
21 * dwarf.h (struct debug_info): Add loclists_base field.
22 * testsuite/binutils-all/dw5.W: Update expected output.
23 * testsuite/binutils-all/x86-64/pr26808.dump: Likewise.
25 2022-04-01 John Baldwin <jhb@FreeBSD.org>
27 * readelf.c (get_freebsd_elfcore_note_type): Handle
28 NT_FREEBSD_X86_SEGBASES.
30 2022-03-31 Nick Clifton <nickc@redhat.com>
32 * arlex.l: Accept the plus character as part of a filename.
34 2022-03-16 Fangrui Song <maskray@google.com>
37 * objcopy.c (filter_symbols): Apply weaken to STB_GNU_UNIQUE symbols
38 * NEWS: Mention feature.
39 * testsuite/binutils-all/objcopy.exp (objcopy_test_symbol_manipulation): New test.
40 * testsuite/binutils-all/weaken-gnu-unique.s: New.
42 2022-03-16 Martin Storsjö <martin@martin.st>
45 * dlltool.c (main): use imp_name rather than dll_name when
46 generating a temporary file name.
48 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
50 * readelf.c (dump_relocations): Handle EM_AMDGPU.
52 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
54 * Makefile.am (readelf_CFLAGS): New.
55 (readelf_LDADD): Add MSGPACK_LIBS.
56 * Makefile.in: Re-generate.
57 * config.in: Re-generate.
58 * configure: Re-generate.
59 * configure.ac: Add --with-msgpack flag and check for msgpack
61 * readelf.c: Include msgpack.h if HAVE_MSGPACK.
62 (print_note_contents_hex): New.
64 (dump_msgpack_obj): New.
66 (print_amdgpu_note): New.
67 (process_note): Handle NT_AMDGPU_METADATA note contents.
68 Use print_note_contents_hex.
70 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
72 * readelf.c (get_amdgpu_elf_note_type): New.
73 (process_note): Handle "AMDGPU" notes.
75 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
77 * readelf.c: Include elf/amdgcn.h.
78 (decode_AMDGPU_machine_flags): New.
79 (get_machine_flags): Handle flags for EM_AMDGPU machine type.
81 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
83 * readelf.c (get_osabi_name): Handle EM_AMDGPU OS ABIs.
85 2022-03-16 Nick Clifton <nickc@redhat.com>
87 * po/sr.po: Updated Serbian translation.
89 2022-03-15 Tom Tromey <tromey@adacore.com>
91 * dwarf-mode.el: Now 1.7.
92 (dwarf--sentinel): Switch to the process buffer.
94 2022-03-11 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
96 * MAINTAINERS: Add gprofng maintainer.
97 * README-how-to-make-a-release: Add gprofng.
99 2022-03-10 Nick Clifton <nickc@redhat.com>
101 * dwarf.c (use_debuginfod): New variable. Set to 1.
102 (load_separate_debug_info): Only call
103 debuginfod_fetch_separate_debug_info is use_debuginfod is true.
104 (dwarf_select_sections_by_names): Add do-not-use-debuginfod and
105 use-debuginfod options.
106 (dwarf_select_sections_by_letters): Add D and E options.
107 * dwarf.h (use_debuginfod): New extern.
108 * objdump.c (usage): Mention the new options.
109 * readelf.c (usage): Likewise.
110 * doc/binutils.texi: Document the new options.
111 * doc/debug-options.texi: Describe the new options.
112 * NEWS: Mention the new feature.
113 * testsuite/binutils-all/debuginfod.exp: Add tests of the new
116 2021-03-06 Maciej W. Rozycki <macro@orcam.me.uk>
118 * testsuite/binutils-all/mips/mips1-branch-alias.d: New test.
119 * testsuite/binutils-all/mips/mips1-branch-noalias.d: New test.
120 * testsuite/binutils-all/mips/mips2-branch-alias.d: New test.
121 * testsuite/binutils-all/mips/mips2-branch-noalias.d: New test.
122 * testsuite/binutils-all/mips/mips32r6-branch-alias.d: New test.
123 * testsuite/binutils-all/mips/mips32r6-branch-noalias.d: New
125 * testsuite/binutils-all/mips/micromips-branch-alias.d: New
127 * testsuite/binutils-all/mips/micromips-branch-noalias.d: New
129 * testsuite/binutils-all/mips/mips-branch-alias.s: New test
131 * testsuite/binutils-all/mips/micromips-branch-alias.s: New test
133 * testsuite/binutils-all/mips/mips.exp: Run the new tests.
135 2022-03-04 Simon Marchi <simon.marchi@polymtl.ca>
137 * readelf.c (process_dynamic_section): Fix indentation.
139 2022-02-09 Nick Clifton <nickc@redhat.com>
141 * README-how-to-make-a-release: Update after the 2.38 release.
143 2022-01-27 Nick Clifton <nickc@redhat.com>
145 * po/sv.po: Updated Swedish translation.
147 2022-01-24 Nick Clifton <nickc@redhat.com>
149 * po/bg.po: Updated Bulgarian translation.
150 * po/fr.po: Updated French translation.
151 * po/ro.po: Updated Romanian translation.
152 * po/uk.po: Updated Ukranian translation.
154 2022-01-22 Martin Storsjö <martin@martin.st>
156 * dlltool.c (main): Allow inferring tmp_prefix from the dll name
159 2022-01-22 Nick Clifton <nickc@redhat.com>
161 * configure: Regenerate.
162 * po/binutils.pot: Regenerate.
164 2022-01-22 Nick Clifton <nickc@redhat.com>
166 * 2.38 release branch created.
168 2022-01-17 Nick Clifton <nickc@redhat.com>
170 * Makefile.in: Regenerate.
172 2022-01-11 Fangrui Song <maskray@google.com>
175 * ar.c (long_options): Add --thin.
176 (usage) Add --thin. Deprecate -T without diagnostics.
177 * doc/binutils.texi: Add doc.
178 * NEWS: Mention --thin.
179 * binutils/testsuite/binutils-all/ar.exp: Add tests.
181 2022-01-11 Martin Storsjö <martin@martin.st>
183 * dlltool.c (main): If a prefix has not been provided, attempt to
184 use a deterministic one based upon the dll name.
186 2022-01-07 Pavel Mayorov <pmayorov@cloudlinux.com>
189 * dwarf.c: Revert previous delta.
190 (debug_get_real_type): Reject indirect types that point to
192 (debug_get_type_name, debug_get_type_size, debug_write_type):
195 2022-01-06 Nick Clifton <nickc@redhat.com>
197 * debug.c (debug_write_type): Allow for malicious recursion via
198 indirect debug types.
200 2022-01-04 Nick Clifton <nickc@redhat.com>
203 * dwarf.c (load_build_id_debug_file): Remove spurious printf.
205 2021-12-16 Nick Clifton <nickc@redhat.com>
208 * dwarf.c (load_build_id_debug_file): New function.
209 (try_build_id_prefix): New function.
210 (check_for_and_load_links): Call load_build_id_debug_file.
211 (debug_displays): Add entry for .note.gnu.build-id.
212 * dwarf.h (enum dwarf_section_display_enum): Add
214 * testsuite/binutils-all/debuginfod.exp (test_fetch_debuglink):
215 Fix regexp for loads via debuglink section.
217 2021-12-03 Chenghua Xu <xuchenghua@loongson.cn>
219 * MAINTAINERS: Add myself and Zhensong Liu
220 as the LoongArch maintainer.
222 2021-12-02 Nick Clifton <nickc@redhat.com>
225 * dwarf.c (process_cu_tu_index): Add test for overruning section
226 whilst processing slots.
228 2021-11-30 Roland McGrath <mcgrathr@google.com>
230 * doc/local.mk: Give each man page target its missing dependency on
233 2021-11-30 Nick Clifton <nickc@redhat.com>
235 * dwarf.c (find_debug_info_for_offset): Use dwarf_vma type for
236 offsets, sizes and ranges.
237 (display_loc_list): Likewise. Also use print_dwarf_vma to print
239 (display_loclists_list): Likewise.
240 (display_loc_list_dwo): Likewise.
241 (display_debug_str): Likewise.
242 (display_debug_aranges): Likewise.
243 (display_debug_ranges_list): Likewise.
244 (display_debug_rnglists_list): Likewise.
245 (display_debug_ranges): Likewise.
247 2021-11-29 Nick Clifton <nickc@redhat.com>
250 * strings.c (usage): Update desciption of -n option.
251 * doc/binutils.texi: Likewise.
253 2021-11-24 Nick Clifton <nickc@redhat.com>
256 * sysdump.c (getCHARS): Check for an out of bounds read.
258 2021-11-16 Fangrui Song <maskray@google.com>
260 * readelf.c (enum relocation_type): New.
261 (slurp_relr_relocs): New.
262 (dump_relocations): Change is_rela to rel_type.
264 (dynamic_relocations): Add DT_RELR.
265 (process_relocs): Check SHT_RELR and DT_RELR.
266 (process_dynamic_section): Store into dynamic_info for
267 DT_RELR/DT_RELRENT/DT_RELRSZ.
269 2021-11-09 Nick Clifton <nickc@redhat.com>
271 * nm.c: Add --unicode option to control how unicode characters are
273 * objdump.c: Likewise.
274 * readelf.c: Likewise.
275 * strings.c: Likewise.
276 * binutils.texi: Document the new feature.
277 * NEWS: Document the new feature.
278 * testsuite/binutils-all/unicode.exp: New file.
279 * testsuite/binutils-all/nm.hex.unicode
280 * testsuite/binutils-all/strings.escape.unicode
281 * testsuite/binutils-all/objdump.highlight.unicode
282 * testsuite/binutils-all/readelf.invalid.unicode
284 2021-11-03 Tom Tromey <tromey@adacore.com>
286 * dwarf.c (display_debug_loc): Use section name in warnings.
288 2021-10-25 Nick Alcock <nick.alcock@oracle.com>
290 * objdump.c (usage): --ctf now has an optional argument.
291 (main): Adjust accordingly.
292 (dump_ctf): Default it.
293 * doc/ctf.options.texi: Adjust.
295 2021-10-25 Nick Alcock <nick.alcock@oracle.com>
297 * objdump.c (usage): --ctf-parent now takes a name, not a section.
298 (dump_ctf): Don't open a separate section; use the parent_name in
299 ctf_dict_open instead. Use ctf_archive_next, not ctf_archive_iter,
300 so we can pass down a member count.
301 (dump_ctf_archive_member): Add the member count; don't return
302 anything. Import parents into children no matter what the
303 parent's name, while still avoiding displaying the header for the
304 common parent name of ".ctf".
305 * readelf.c (usage): Adjust similarly.
306 (dump_section_as_ctf): Likewise.
307 (dump_ctf_archive_member): Likewise. Never stop iterating over
308 archive members, even if ctf_dump of one member fails.
309 * doc/ctf.options.texi: Adjust.
311 2021-10-19 Nick Clifton <nickc@redhat.com>
313 * nm.c (filter_symbols): Test for a NULL name before checking to
314 see if the symbol is __gnu_lto_slim.
315 * objcopy.c (filter_symbols): Likewise.
317 2021-09-30 Nick Clifton <nickc@redhat.com>
319 * objcopy.c (filter_symbols): Fail if attempting to dredefine
320 symbols in an LTO object file.
322 2021-09-27 Nick Alcock <nick.alcock@oracle.com>
324 * configure: Regenerate.
326 2021-09-20 Andrew Burgess <andrew.burgess@embecosm.com>
328 * testsuite/binutils-all/riscv/riscv.exp: New file.
329 * testsuite/binutils-all/riscv/unknown.d: New file.
330 * testsuite/binutils-all/riscv/unknown.s: New file.
332 2021-09-07 Luis Machado <luis.machado@linaro.org>
334 Revert: [AArch64] MTE corefile support
336 2021-05-21 Luis Machado <luis.machado@linaro.org>
338 * readelf.c (get_note_type): Handle NT_MEMTAG note types.
340 2021-08-11 Nick Clifton <nickc@redhat.com>
342 * po/pt.po: Updated Portuguese translation.
344 2021-08-10 Nick Clifton <nickc@redhat.com>
346 * po/sr.po: Updated Serbian translation.
348 2021-07-16 Nick Clifton <nickc@redhat.com>
350 * po/sv.po: Updated Swedish translation.
352 2021-07-14 Clément Chigot <clement.chigot@atos.net>
354 * dwarf.h (struct dwarf_section): Add XCOFF name.
355 * dwarf.c (struct dwarf_section_display): Update.
356 * objdump.c (load_debug_section): Add XCOFF name handler.
357 (dump_dwarf_section): Likewise.
359 2021-07-12 Nick Clifton <nickc@redhat.com>
361 * po/fr.po: Updated French translation.
363 2021-07-10 Alan Modra <amodra@gmail.com>
366 * dwarf.c (display_discr_list): Remove assertions. Delete "end"
367 parameter, use initial "data" pointer as the end. Formatting.
368 Don't count down bytes as they are read.
369 (read_and_display_attr_value): Adjust display_discr_list call.
370 (read_and_print_leb128): Don't pass __FILE__ and __LINE__ to
372 * dwarf.h (report_leb_status): Don't report file and line
373 numbers. Delete file and lnum parameters,
374 (READ_ULEB, READ_SLEB): Adjust.
376 2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
378 * configure.ac: Check for strnlen declaration.
379 * configure, config.in: Regenerate.
381 2021-07-05 Alan Modra <amodra@gmail.com>
384 * dwarf.c (get_type_abbrev_from_form): Add cu_end parameter.
385 Check DW_FORM_ref1 etc. arg against cu_end rather than end of
386 section. Adjust all callers.
388 2021-07-03 Nick Clifton <nickc@redhat.com>
390 * configure: Regenerate.
391 * po/opcodes.pot: Regenerate.
392 * README-how-to-make-a-release: Update.
394 2021-07-03 Nick Clifton <nickc@redhat.com>
396 * 2.37 release branch created.
398 2021-07-02 Alan Modra <amodra@gmail.com>
401 * dwarf.c (get_type_signedness): Don't run off end of buffer
402 printing DW_FORM_string attribute.
404 2021-07-01 Nick Clifton <nickc@redhat.com>
407 * testsuite/binutils-all/debuginfod.exp: Replace -wK with -wk.
409 2021-07-01 Andrei Homescu <ah@immunant.com>
411 * readelf.c (process_archive): Reset file position to the
412 beginning when calling process_object for thin archive members.
413 * testsuite/binutils-all/readelf.exp: Add test.
414 * testsuite/binutils-all/readelf.h.thin: New file.
416 2021-06-30 Tom Tromey <tom@tromey.com>
418 * dwarf.c (read_and_display_attr_value): Handle
419 DW_FORM_implicit_const.
421 2021-06-30 Richard Henderson <richard.henderson@linaro.org>
423 * dwarf.c (display_debug_frames): Both DW_CFA_def_cfa_sf
424 and DW_CFA_def_cfa_offset_sf have a signed offset.
426 2021-06-19 Alan Modra <amodra@gmail.com>
428 * dwarf.c (display_debug_lines_decoded): Use memcpy rather than
429 strncpy when trimming file name length to MAX_FILENAME_LENGTH.
430 Don't make an unnecessary copy when length is good.
432 2021-06-18 H.J. Lu <hongjiu.lu@intel.com>
434 * readelf.c (print_gnu_property_note): Handle
435 GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI,
436 GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI.
438 2021-06-15 Nick Clifton <nickc@redhat.com>
440 * readelf.c (get_note_type): Add support for NT_GO_BUILDID.
442 2021-06-15 Alan Modra <amodra@gmail.com>
444 * readelf.c (locate_dynamic_section, is_pie): New functions.
445 (get_file_type): Replace e_type parameter with filedata. Call
446 is_pie for ET_DYN. Update all callers.
447 (process_program_headers): Use local variables dynamic_addr and
448 dynamic_size, updating filedata on exit from function. Set
449 dynamic_size of 1 to indicate no dynamic section or segment.
450 Update tests of dynamic_size throughout.
451 * testsuite/binutils-all/x86-64/pr27708.dump: Update expected output.
453 2021-06-14 Eric Botcazou <ebotcazou@adacore.com>
455 * dwarf.c (struct abbrev_attr): Change type of implicit_const.
456 (add_abbrev_attr): Likewise.
457 (process_abbrev_set): Likewise.
458 (display_debug_abbrev): Adjust to above change.
460 2021-06-12 Alan Modra <amodra@gmail.com>
462 * readelf.c (process_file_header): Don't clear section_headers.
464 2021-06-12 Alan Modra <amodra@gmail.com>
466 * readelf.c (get_section_headers): Don't test e_shoff here, leave
467 that to get_32bit_section_headers or get_64bit_section_headers.
468 (process_object): Throw away section header read to print file
471 2021-06-11 Alan Modra <amodra@gmail.com>
473 * readelf.c (struct filedata): Move archive_file_offset and
474 archive_file_size earlier.
475 (free_filedata): Clear using memset.
477 2021-06-11 Alan Modra <amodra@gmail.com>
479 * readelf.c (GET_ELF_SYMBOLS): Delete. Replace with..
480 (get_elf_symbols): ..this new function throughout.
481 (get_32bit_section_headers): Don't free section_headers.
482 (get_64bit_section_headers): Likewise.
483 (get_section_headers): New function, use throughout in place of
484 32bit and 64bit variants.
485 (get_dynamic_section): Similarly.
486 (process_section_headers): Don't free filedata memory here.
487 (get_file_header): Don't get section headers here..
488 (process_object): ..Read them here instead. Don't exit without
489 freeing filedata memory.
491 2021-06-09 Nick Clifton <nickc@redhat.com>
493 * MAINTAINERS: Remove Daniel Jacobwitz from the maintainers list.
495 2021-06-07 Jan Beulich <jbeulich@suse.com>
497 * dwarf.c (display_debug_aranges): Add u suffix to constant.
499 2021-05-29 Alan Modra <amodra@gmail.com>
501 * objdump (usage): Add missing \n.
503 2021-05-29 Alan Modra <amodra@gmail.com>
505 * readelf.c (parse_args): Call dwarf_select_sections_all on
506 --debug-dump without optarg.
507 (usage): Associate -w and --debug-dump options closely.
508 Split up help message. Remove extraneous blank lines around
510 * objdump.c (usage): Similarly.
512 2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
514 * testsuite/binutils-all/mips/mips-xpa-virt-1.d: Correct CFC0
516 * testsuite/binutils-all/mips/mips-xpa-virt-3.d: Likewise.
518 2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
520 * testsuite/binutils-all/mips/mips-xpa-virt-1.d: Use `mips:3000'
521 machine for disassembly.
522 * testsuite/binutils-all/mips/mips-xpa-virt-2.d: Likewise.
523 * testsuite/binutils-all/mips/mips-xpa-virt-3.d: Likewise.
524 * testsuite/binutils-all/mips/mips-xpa-virt-4.d: Likewise.
526 2021-05-28 H.J. Lu <hongjiu.lu@intel.com>
529 * readelf.c (decode_x86_feature_2): Revert commit 50c95a739c9.
531 2021-05-27 Alan Modra <amodra@gmail.com>
533 * readelf (usage): Order -w letters to match --debug-dump= and
534 move common '=' for --debug-dump out of brackets.
536 2021-05-26 H.J. Lu <hongjiu.lu@intel.com>
539 * readelf.c (decode_x86_feature_2): Support
540 GNU_PROPERTY_X86_FEATURE_2_CODE16.
542 2021-05-23 Tiezhu Yang <yangtiezhu@loongson.cn>
544 * readelf.c (get_machine_name): Change Loongson Loongarch to
547 2021-05-21 Luis Machado <luis.machado@linaro.org>
549 * readelf.c (get_note_type): Add missing NT_ARM_* entries.
551 2021-05-21 Luis Machado <luis.machado@linaro.org>
553 * readelf.c (get_note_type): Handle NT_MEMTAG note types.
555 2021-05-19 Eli Schwartz <eschwartz@archlinux.org>
557 * dwarf.c (ENABLE_CHECKING): Define to 0 if not previously set.
559 2021-05-19 Alan Modra <amodra@gmail.com>
562 * dwarf.c (get_type_abbrev_from_form): Replace cu_offset_return
563 param with map_return, and return map for DW_FORM_ref_addr.
564 (get_type_signedness): Adjust calls to get_type_abbrev_from_form.
565 Pass returned cu map start and end to recursive call.
566 (read_and_display_attr_value): Similarly.
568 2021-05-19 Alan Modra <amodra@gmail.com>
571 * sysdump.c (getBARRAY): Sanity check size against max.
572 (getINT): Avoid UB shift left.
574 2021-05-15 Alan Modra <amodra@gmail.com>
576 * dwarf.c (process_cu_tu_index): Avoid pointer UB. Use _mul_overflow.
579 2021-05-15 Alan Modra <amodra@gmail.com>
581 * dwarf.c (display_gdb_index): Avoid pointer UB and overflow in
584 2021-05-15 Alan Modra <amodra@gmail.com>
586 * dwarf.c (display_debug_names): Complain when header length is
587 too small. Avoid pointer UB. Sanity check augmentation string,
588 CU table, TU table and foreign TU table sizes.
590 2021-05-15 Alan Modra <amodra@gmail.com>
592 * dwarf.c (display_debug_frames): Delete initial_length_size.
593 Avoid pointer UB. Constrain data reads to length given in header.
594 Sanity check cie header length. Only skip up to next FDE on
595 finding augmentation data too long.
597 2021-05-15 Alan Modra <amodra@gmail.com>
599 * dwarf.c (read_cie): Add more sanity checks to ensure data
600 pointer is not bumped past end.
602 2021-05-15 Alan Modra <amodra@gmail.com>
604 * dwarf.c (display_debug_ranges): Delete initial_length_size.
605 Correct fallback size calculated on finding a reloc. Constrain
606 data reads to length given in header. Avoid pointer UB.
608 2021-05-15 Alan Modra <amodra@gmail.com>
610 * dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
612 2021-05-15 Alan Modra <amodra@gmail.com>
614 * dwarf.c (display_debug_str_offsets): Constrain reads to length
617 2021-05-15 Alan Modra <amodra@gmail.com>
619 * dwarf.c (display_debug_aranges): Delete initial_length_size.
620 Use end_ranges to constrain data reads to header length. Avoid
623 2021-05-15 Alan Modra <amodra@gmail.com>
625 * dwarf.c (display_loc_list): Avoid pointer UB. Correct check
626 before reading uleb length. Warn on excess length.
628 2021-05-15 Alan Modra <amodra@gmail.com>
630 * dwarf.c (display_debug_macro): Print strings that might not
631 be zero terminated with %*s. Don't bump curr if unterminated.
633 2021-05-15 Alan Modra <amodra@gmail.com>
635 * dwarf.c (get_line_filename_and_dirname): Delete initial_length_size.
636 Simplify length sanity check, and check for too small lengths.
637 Constrain data reads to header length. Avoid pointer UB.
639 2021-05-15 Alan Modra <amodra@gmail.com>
641 * dwarf.c (display_debug_macinfo): Print strings that might not
642 be zero terminated with %*s. Don't bump curr if unterminated.
644 2021-05-15 Alan Modra <amodra@gmail.com>
646 * dwarf.c (display_debug_pubnames_worker): Delete initial_length_size.
647 Simplify length check. Constrain reads to length given by header.
649 2021-05-15 Alan Modra <amodra@gmail.com>
651 * dwarf.c (display_debug_lines_decoded): Don't use strnlen when
652 we have already checked for NUL termination.
654 2021-05-15 Alan Modra <amodra@gmail.com>
656 * dwarf.c (read_debug_line_header): Delete initial_length_size.
657 Avoid pointer UB. Keep within length specified by header.
660 2021-05-15 Alan Modra <amodra@gmail.com>
662 * dwarf.c (process_debug_info): Always do the first CU length
663 scan for sanity checks. Remove initial_length_size var and
664 instead calculate end_cu. Use end_cu to limit data reads.
665 Delete now dead code checking length.
667 2021-05-15 Alan Modra <amodra@gmail.com>
669 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Assert only when ENABLE_CHECKING.
671 2021-05-15 Alan Modra <amodra@gmail.com>
673 * bucomm.h (_mul_overflow): Define.
674 * dwarf.c (get_encoded_value): Avoid pointer UB.
676 2021-05-13 Alan Modra <amodra@gmail.com>
679 * dwarf.c (display_debug_str_offsets): Sanity check dwarf5
682 2021-05-13 Alan Modra <amodra@gmail.com>
685 * dwarf.c (display_debug_frames): Sanity check cie_off before
686 attempting to read cie.
688 2021-05-12 Alan Modra <amodra@gmail.com>
690 * dwarf.c (process_extended_line_op): Don't bump data pointer past
691 end when strnlen doesn't find string terminator.
692 (decode_location_expression): Remove dead code.
693 (skip_attr_bytes): Remove const from end param. Ensure data
694 pointer doesn't pass end.
695 (get_type_signedness): Remove const from end param.
696 (read_and_display_attr_value): Ensure data pointer doesn't pass end.
697 (display_debug_lines_raw, display_debug_lines_decoded): Likewise.
698 (display_debug_pubnames_worker): Likewise.
699 (display_debug_pubnames_worker): Use SAFE_BYTE_GET_AND INC rather
700 than blindly incrementing data pointer.
701 (display_debug_addr, display_debug_str_offsets): Likewise. Don't
702 compare pointers, compare lengths.
704 2021-05-12 Alan Modra <amodra@gmail.com>
706 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Define.
707 (SAFE_BYTE_GET, SAFE_BYTE_GET_AND_INC): Define using the above.
708 (SAFE_SIGNED_BYTE_GET, SAFE_SIGNED_BYTE_GET_AND_INC): Likewise.
709 (display_discr_list): Use SAFE_BYTE_GET_AND_INC rather than
710 SAFE_BYTE_GET followed by increment.
711 (process_debug_info): Likewise, and test bytes remaining before
712 incrementing section_begin rather than using pointer comparison.
713 (display_debug_names): Pass lvalue as SAFE_BYTE_GET PTR.
714 (process_cu_tu_index): Likewise for SAFE_BYTE_GET_AND_INC.
716 2021-05-12 Alan Modra <amodra@gmail.com>
718 * dwarf.c (dwarf_vmatoa64, SAFE_BYTE_GET64, add64): Delete.
719 (skip_attr_bytes): Replace use of SAFE_BYTE_GET64 with
720 SAFE_BYTE_GET_AND_INC.
721 (read_and_display_attr_value): Likewise. Print using dwarf_vmatoa.
722 (process_debug_info, process_cu_tu_index): Likewise.
723 * elfcomm.c (byte_put, byte_put_little_endian, byte_put_big_endian),
724 (byte_get, byte_get_little_endian, byte_get_big_endian),
725 (byte_get_signed): Make size param unsigned. Remove code dealing
727 (byte_get_64): Delete.
728 * elfcomm.h (byte_put, byte_put_little_endian, byte_put_big_endian),
729 (byte_get, byte_get_little_endian, byte_get_big_endian),
730 (byte_get_signed): Update prototypes.
731 (byte_get_64): Delete.
733 2021-05-12 Alan Modra <amodra@gmail.com>
736 * dwarf.c (display_debug_frames): Don't compare pointers derived
737 from user input. Test offset against bounds instead.
739 2021-05-12 Alan Modra <amodra@gmail.com>
742 * dwarf.c (display_formatted_table): Test for data >= end rather
744 (process_extended_line_op): Likewise.
745 (display_debug_lines_raw): Likewise.
746 (display_debug_lines_decoded): Likewise.
748 2021-05-12 Alan Modra <amodra@gmail.com>
751 * dwarf.c (fetch_indexed_string): Correct length sanity checks.
752 Sanity check section size for version and padding too. Correct
753 index sanity check. Handle multiple tables in .debug_str_offsets.
755 2021-05-11 Hans-Peter Nilsson <hp@axis.com>
757 * dwarf.c (process_abbrev_set): Properly parenthesize before
758 casting to unsigned long.
760 2021-05-11 Alan Modra <amodra@gmail.com>
763 * dwarf.c (process_abbrev_set): Replace start and end parameters
764 with section, abbrev_base, abbrev_size, abbrev_offset. Update
765 all callers. Sanity check parameters correctly and emit warnings
767 (process_debug_info): ..here.
769 2021-05-10 Thomas Wolff <towo@towo.net>
774 * windres.c (quot): Revert previous delta. Do not use double
775 quotes when spaces are detected in options.
776 * doc/binutils.texi (windres): Remove suggestion that the
777 --preprocessor option can take arguments.
779 2021-05-10 Alan Modra <amodra@gmail.com>
781 * dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
782 END rather than adding amount to PTR.
783 (SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise.
785 2021-05-09 Alan Modra <amodra@gmail.com>
787 * objcopy.c (eq_string): Delete.
788 (create_symbol_htab): Use htab_eq_string.
790 2021-05-08 Mike Frysinger <vapier@gentoo.org>
792 * README-how-to-make-a-release: Update html & pdf entries.
794 2021-05-08 Mike Frysinger <vapier@gentoo.org>
796 * doc/Makefile.am (html-local, binutils/index.html): New targets.
797 * doc/Makefile.in: Regenerate.
799 2021-05-08 Mike Frysinger <vapier@gentoo.org>
801 * doc/Makefile.am (AM_MAKEINFOFLAGS): Add --no-split.
802 * doc/Makefile.in: Regenerate.
804 2021-05-07 Nick Clifton <nickc@redhat.com>
806 * readelf.c (no_processor_specific_unwind): New function.
807 (process_unwind): Use no_processor_specific_unwind for X86
810 2021-05-07 Michael Forney <mforney@mforney.org>
812 * dwarf.c: Don't omit second operand of '?' operator.
814 2021-04-30 Nick Clifton <nickc@redhat.com>
817 * dwarf.c (load_debug_sup_file): Allocate memory for filename in
820 2021-04-29 Nick Clifton <nickc@redhat.com>
823 * doc/binutils.texi (windres): Correct the description of the
824 default value of the --preprocessor argument.
826 2021-04-27 Nick Clifton <nickc@redhat.com>
829 * dwarf.c (parse_gnu_debuglink): Reject empty names.
830 (parse_gnu_debugaltlink): Likewise.
832 2021-04-22 Clément Chigot <clement.chigot@atos.net>
834 * od-xcoff.c (dump_xcoff32_symbols): Adapt to new
837 2021-04-21 Nick Lott <nick.lott@gmail.com>
840 * readelf.c (sym_base): New variable.
841 (enum print_mode): Add more modes.
842 (print_vma): Add suport for new modes.
843 (options): Add sym-base.
844 (usage): Add sym-base.
845 (parse_args): Add support for --sym-base.
846 (print_dynamic_symbol_size): New function.
847 (print_dynamic_symbol): Use new function.
848 * doc/binutils.texi: Document the new feature.
849 * NEWS: Mention the new feature.
851 2021-04-21 Nick Clifton <nickc@redhat.com>
853 * testsuite/binutils-all/mips/global-local-symtab-sort-n64t.d:
854 Adjust expected output to allow for named section symbols.
855 * testsuite/binutils-all/mips/global-local-symtab-sort-o32t.d:
857 * testsuite/binutils-all/readelf.s-64: Likewise.
858 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
859 * testsuite/binutils-all/readelf.ss-tmips: Likewise.
860 * testsuite/binutils-all/readelf.ss-unused: Likewise.
862 2021-04-21 Luo Longjun <luolongjun@huawei.com>
864 * readelf.c (print_dynamic_symbol): Print the section name for
865 section symbols without a name of their own.
867 2021-04-20 Andreas Krebbel <krebbel@linux.ibm.com>
869 * MAINTAINERS: Remove Martin Schwidefsky as s390 maintainer and
870 add him to Past Maintainers.
871 Update my email address.
873 2021-04-19 Nick Clifton <nickc@redhat.com>
876 * arsup.c (ar_addmod): Enable plugin support, if available.
878 2021-04-19 Nick Clifton <nickc@redhat.com>
880 * rename.c: (get_stat_atime_ns): Add prototype.
881 (get_stat_mtime_ns): Add prototype.
883 2021-04-16 Alan Modra <amodra@gmail.com>
886 * rename.c (get_stat_atime, get_stat_mtime): Make static.
887 (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
889 2021-04-15 Pekka Seppänen <pexu@sourceware.mail.kapsi.fi>
892 * rename.c (get_stat_atime_ns): Add ATTRIBUTE_UNUSED.
893 (get_stat_mtime_ns): Likewise.
895 2021-04-15 Alan Modra <amodra@gmail.com>
898 * configure.ac: Check for sys/time.h and utimensat. Use standard
899 checks for mkstemp and mkdtemp. Whitespace. Check for nanosecond
900 members of struct stat.
901 * rename.c: Prefer sys/time.h for utimes over utime.h for utime.
902 (STAT_TIMESPEC, STAT_TIMESPEC_NS): Define
903 (get_stat_atime_ns, get_stat_mtime_ns): New inline functions.
904 (get_stat_atime, get_stat_mtime): Likewise.
905 (set_times): Choose first available of utimensat, utimes, utime.
906 Use above inline functions to set timespec and timeval values.
907 * configure: Regenerate.
908 * config.in: Regenerate.
909 * testsuite/binutils-all/objcopy.exp (objcopy_test): Add test of
910 file timestamp when --preserve-dates is used.
912 2021-04-15 Alan Modra <amodra@gmail.com>
915 * rename.c (smart_rename): When TO and FROM are equal, just set
917 * objcopy.c (strip_main, copy_main): Always call smart_rename.
919 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
922 * testsuite/binutils-all/x86-64/pr27708.dump: New file.
923 * testsuite/binutils-all/x86-64/pr27708.exe.bz2: Likewise.
924 * testsuite/binutils-all/x86-64/x86-64.exp: Run binutils/27708
927 2021-04-14 Mark Harmstone <mark@harmstone.com>
930 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the
931 end of the structure.
933 2021-04-14 Frederic Cambus <fred@statdns.com>
935 * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
936 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
938 2021-04-14 Alan Modra <amodra@gmail.com>
941 * objdump.c (show_line): Don't limit paths to PATH_MAX.
942 * readelf.c (struct filedata): Change program_interpreter from
943 a char array to a char pointer.
944 (process_program_headers): Sanity check PT_INTERP p_filesz.
945 Malloc program_interpreter using p_filesz and read directly from
947 (process_dynamic_section): Check program_interpreter is non-NULL.
948 (free_filedata): New function, split out from..
949 (process_object): ..here.
950 (close_debug_file): Call free_filedata.
951 * sysdep.h: Don't include sys/param.h.
952 (PATH_MAX): Don't define.
953 * configure.ac: Don't check for sys/param.h.
954 * configure: Regenerate.
956 2021-04-13 Frederic Cambus <fred@statdns.com>
958 * readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
959 check for NT_NETBSD_PAX.
961 2021-04-12 Alan Modra <amodra@gmail.com>
963 * configure.ac (--enable-checking): Add support.
964 * config.in: Regenerate.
965 * configure: Regenerate.
967 2021-04-09 Alan Modra <amodra@gmail.com>
969 * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
971 (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move.
972 (disassemble_section, disassemble_data): Likewise.
974 2021-04-06 Alan Modra <amodra@gmail.com>
976 * objdump.c (objdump_symbol_at_address): Return asymbol*.
978 2021-04-06 Alan Modra <amodra@gmail.com>
980 * NEWS: Mention C99 requirement.
981 * README: Likewise. Modernise examples and "Reporting bugs".
983 2021-04-05 Alan Modra <amodra@gmail.com>
985 * configure.ac: Assume long long is available. Don't test for
986 strings.h, stdlib.h, limits.h, locale.h, or wchar.h. Check
987 inttypes.h, stdint.h, sys/stat.h and sys/types.h. Don't check for
988 strcoll, setlocale, setmode or location of time_t. Don't check
989 for fprintf, getenv, snprintf, strnlen, strstr or vsnprintf decls.
990 (AC_ISC_POSIX, AXC_HEADER_STRING, AC_FUNC_ALLOCA): Don't invoke.
991 * sysdep.h: Don't include alloca-conf.h, include config.h instead.
992 Test HAVE_SYS_TYPES_H and reorder includes. Include limits.h,
993 locale.h, string.h and stdlib.h unconditionally. Remove various
994 fallback declarations. Assume long long is available.
995 * addr2line.c: Don't test HAVE_SETLOCALE.
997 * coffdump.c: Likewise.
998 * dlltool.c: Likewise.
999 * dllwrap.c: Likewise.
1000 * elfedit.c: Likewise.
1002 * objcopy.c: Likewise.
1003 * objdump.c: Likewise.
1004 * readelf.c: Likewise.
1006 * srconv.c: Likewise.
1007 * strings.c: Likewise.
1008 * sysdump.c: Likewise.
1009 * windmc.c: Likewise.
1010 * windres.c: Likewise.
1011 * bucomm.c: Don't test HAVE_TIME_T_IN_TIME_H or HAVE_TIME_T_IN_TYPES_H.
1012 * dwarf.c: Include limits.h unconditionally. Assume long long
1014 * nm.c: Don't test HAVE_STRCOLL.
1015 * readelf.c: Don't test HAVE_WCHAR_H.
1016 * strings.c: Assume long long is available.
1017 * syslex.l: Include string.h unconditionally.
1018 * aclocal.m4: Regenerate.
1019 * config.in: Regenerate.
1020 * configure: Regenerate.
1021 * Makefile.in: Regenerate.
1022 * doc/Makefile.in: Regenerate.
1024 2021-04-01 Martin Liska <mliska@suse.cz>
1026 * elfcomm.h (strneq): Remove strneq and use startswith.
1027 * readelf.c (ia64_process_unwind): Likewise.
1028 (process_note): Likewise.
1030 2021-04-01 Martin Liska <mliska@suse.cz>
1032 * dllwrap.c: Use startswith function.
1033 * objcopy.c (is_dwo_section): Likewise.
1034 (handle_remove_section_option): Likewise.
1035 (copy_main): Likewise.
1036 * objdump.c (is_significant_symbol_name): Likewise.
1038 2021-04-01 Martin Liska <mliska@suse.cz>
1040 * dwarf.c (display_debug_lines_raw): Replace const_strneq with
1042 (display_debug_lines_decoded): Likewise.
1043 (display_debug_links): Likewise.
1044 * elfcomm.c (setup_archive): Likewise.
1045 * elfcomm.h (const_strneq): Likewise.
1046 * readelf.c (process_section_headers): Likewise.
1047 (slurp_ia64_unwind_table): Likewise.
1048 (slurp_hppa_unwind_table): Likewise.
1049 (decode_arm_unwind): Likewise.
1050 (display_debug_section): Likewise.
1051 (process_note): Likewise.
1053 2021-03-31 Alan Modra <amodra@gmail.com>
1055 * sysdep.h (POISON_BFD_BOOLEAN): Define.
1056 * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
1057 * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
1058 * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
1059 * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
1060 * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
1061 * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
1062 * windmc.c, * windmc.h, * windres.c, * winduni.c,
1063 * wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
1064 and TRUE with true throughout.
1066 2021-03-31 Alan Modra <amodra@gmail.com>
1068 * coffdump.c: Include stdint.h in place of bfd_stdint.h.
1069 * dwarf.c: Likewise.
1071 2021-03-31 Alan Modra <amodra@gmail.com>
1073 * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
1075 2021-03-29 Alan Modra <amodra@gmail.com>
1077 * dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
1078 * dwarf.c (read_and_display_attr_value): Likewise.
1079 (display_debug_str_offsets): Likewise.
1080 * objdump.c (dump_bfd): Likewise.
1081 * readelf.c (dump_section_as_strings): Likewise.
1082 (dump_section_as_bytes): Likewise.
1084 2021-03-29 Alan Modra <amodra@gmail.com>
1086 * objdump.c (process_links): Use type int.
1087 * readelf.c (request_dump): Don't increment do_dump, set it.
1088 * windint.h (target_is_bigendian): Use type bfd_boolean.
1089 * windmc.c (target_is_bigendian): Likewise.
1090 * windres.c (target_is_bigendian): Likewise.
1092 2021-03-22 Martin Liska <mliska@suse.cz>
1094 * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ
1096 * emul_aix.c (ar_emul_aix_parse_arg): Likewise.
1097 * objcopy.c (is_mergeable_note_section): Likewise.
1098 * objdump.c (dump_dwarf_section): Likewise.
1099 * prdbg.c (pr_method_type): Likewise.
1100 (pr_class_baseclass): Likewise.
1101 (tg_class_baseclass): Likewise.
1102 * readelf.c (process_lto_symbol_tables): Likewise.
1103 * stabs.c (ULLHIGH): Likewise.
1104 (parse_stab_argtypes): Likewise.
1105 (stab_demangle_function_name): Likewise.
1107 2021-03-19 H.J. Lu <hongjiu.lu@intel.com>
1109 * readelf.c (get_machine_name): Add EM_INTELGT.
1111 2021-03-18 Nick Clifton <nickc@redhat.com>
1114 * readelf.c (dump_section_as_strings): Mention separate filename.
1115 (dump_section_as_bytes): Likewise.
1116 (dump_section_as_ctf): Likewise.
1117 (initialise_dumkps_byname): Only issue a warning for missing
1118 sections if processing the main file.
1119 (process_section_contents): Only issue a warning for unsumped
1120 section numbers in the main file.
1121 (initialise_dump_sects): New function. Contains code extracted
1123 (process_object): ... here. Also call initialise_dump_sects for
1126 2021-03-16 Nick Clifton <nickc@redhat.com>
1129 * readelf.c (display_debug_section): Also retain .debug_addr
1132 2021-03-16 Nick Clifton <nickc@redhat.com>
1135 * readelf.c (process_section_contents): Only dump debug
1136 information for separate files unless process_links is enabled.
1137 (process_object): Always call process_section_contents for
1138 separate info files.
1140 2021-03-15 Nick Clifton <nickc@redhat.com>
1143 * nm.c (FORMAT_JUST_SYMBOLS): Define.
1144 (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS.
1145 (long_options): Add just-symbols.
1146 (set_output_format): Add support for just-symbols.
1147 (get_print_format): Likewise.
1148 (do_not_print_object_filename): New function.
1149 (do_not_print_archive_filename): New function.
1150 (do_not_print_archive_member): New function.
1151 (do_not_print_symbol_filename): New function.
1152 (just_print_symbol_name): New function.
1153 (main): Handle --just-symbols.
1154 * NEWS: Mention the new feature.
1155 * doc/binutils.texi: Document the new feature.
1157 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1159 * od-xcoff.c: Replace RTB by TRL entry.
1161 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1162 Andrew Burgess <andrew.burgess@embecosm.com>
1164 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
1166 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1167 Andrew Burgess <andrew.burgess@embecosm.com>
1169 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
1171 2021-03-05 Nick Clifton <nickc@redhat.com>
1174 * dwarf.c (display_debug_macro): Handle the displaying of
1175 DW_MACRO_define_strp and DW_MACRO_undef_strp in v4
1176 .debug_macro.dwo sections.
1178 2021-03-04 Nick Clifton <nickc@redhat.com>
1181 * objdump.c (process_links): New variable.
1182 (usage): Add --process-links.
1183 (long_options): Likewise.
1184 (dump_bfd): Stop processing once the bfd has been loaded unless
1185 this is the main file or process_links has been enabled.
1186 (main): Handle the process-links option.
1187 * readelf.c (process_links): New variable.
1188 (struct filedata): Add is_separate field.
1189 (options): Add --process-links.
1191 (parse_args): Likewise.
1192 (process_file_header): Include the filename when dumping
1193 information for separate debuginfo files.
1194 (process_program_headers): Likewise.
1195 (process_section_headers): Likewise.
1196 (process_section_groups): Likewise.
1197 (process_relocs): Likewise.
1198 (process_dynamic_section): Likewise.
1199 (process_version_sections): Likewise.
1200 (display_lto_symtab): Likewise.
1201 (process_symbol_table): Likewise.
1202 (process_syminfo): Likewise.
1203 (initialise_dumps_by_name): Likewise.
1204 (process_section_contents): Likewise.
1205 (process_notes_at): Likewise.
1206 (process_notes): Likewise.
1207 (open_file): Add is_separate parameter. Use to initialise the
1208 is_separate field in the filedata structure.
1209 (open_deug): Update call to open_file.
1210 (process_object): Add processing of the contents of separate
1211 debuginfo files, gated by the process_links variable.
1212 (process_archive): Update call to open_file.
1213 (process_file): Initialise the is_separate field in the filedata
1215 * dwarf.c (load_separate_debug_info_file): Only report the
1216 loading of a separate file if debug links are being dumped.
1217 * objcopy.c (keep_section_symbols): New variable.
1218 (enum command_line_switch): Add OPTION_KEEP_SYMBOLS.
1219 (strip_options): Add keep-section-symbols.
1220 (copy_options): Likewise.
1221 (copy_usage): Likewise.
1222 (strip_usage): Likewise.
1223 (copy_object): Keep section symbols if requested by command line
1225 (strip_main): Handle --keep-section-symbols.
1226 (copy_main): Likewise.
1227 * doc/binutils.texi: Document the new options.
1228 * NEWS: Mention the new features.
1229 * testsuite/binutils-all/compress.exp (test_gnu_debuglink):
1230 Update options passed to objdump. Use diff rather than cmp to
1231 compare the dumped data.
1232 * testsuite/binutils-all/objdump.WK2: Update regexp.
1233 * testsuite/binutils-all/objdump.WK3: Update regexp.
1234 * testsuite/binutils-all/objdump.exp: Use --process-links
1235 instead of --dwarf=follow-links.
1236 * testsuite/binutils-all/readelf.exp (readelf_test): Include
1237 readelf's output in the log when the test fails.
1238 Add the -P option to the -wKis test.
1239 * testsuite/binutils-all/readelf.wKis: Update expected output.
1241 2021-03-03 Alan Modra <amodra@gmail.com>
1244 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
1245 * NEWS: Mention feature.
1247 2021-03-01 H.J. Lu <hongjiu.lu@intel.com>
1250 * dwarf.c (load_separate_debug_info): Issue warning only if
1251 do_debug_links is set.
1252 * testsuite/binutils-all/compress.exp: Run objdump and readelf
1253 with missing debug file.
1255 2021-03-01 Alan Modra <amodra@gmail.com>
1258 * doc/binutils.texi: Add nm --with-symbol-versions and
1259 --without-symbol-versions documentation.
1260 * nm.c (with_symbol_versions): New variable.
1261 (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
1262 (long_options): Make --with-symbol-versions entry twiddle the flag.
1263 Add --without-symbol-versions.
1264 (print_symname): Strip version when !with_symbol_versions. Add
1265 dynamic version info under control of with_symbol_versions.
1266 (main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
1268 2021-02-26 Fangrui Song <maskray@google.com>
1271 * readelf.c (quiet): New option flag.
1272 (enum long_option_values): New enum to hold long option value.
1273 (long_options): Add --quiet.
1274 (usage): Mention --quiet.
1275 (display_rel_file): If quiet is enabled, suppress "no symbols".
1276 (main): Handle the new option.
1277 * NEWS: Mention --quiet.
1278 * docs/binutils.texi: Document --quiet.
1280 2021-02-26 Tom de Vries <tdevries@suse.de>
1282 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
1284 2021-02-26 Tom de Vries <tdevries@suse.de>
1287 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
1289 (read_and_display_attr_value): Likewise.
1291 2021-02-25 Nick Clifton <nickc@redhat.com>
1293 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
1295 (read_and_display_attr_value): Handle sup forms.
1296 (display_debug_sup): New function. Displays the contents of a
1298 (load_debug_sup_file): New function. Loads the contents of a file
1299 referenced by a .debug_sup section.
1300 (check_for_and_load_links): Call load_debug_sup_file.
1301 (debug_displays): Add entry for .debug_sup.
1302 * dwarf.h (enum dwarf_section_display_enum): Add debug_sup.
1303 * readelf.c (process_section_headers): Add support for debug_sup.
1304 * doc/debug.options.texi: Note that the =links option will display
1305 the contents of .debug_sup sections.
1306 * NEWS: Mention the new support.
1308 2021-02-25 Alan Modra <amodra@gmail.com>
1311 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
1313 2021-02-24 Nick Clifton <nickc@redhat.com>
1316 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
1317 when adding together the section sizes.
1319 2021-02-24 Nick Clifton <nickc@redhat.com>
1321 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
1323 * readelf.c (print_gnu_build_attribute_description): Likewise.
1325 2021-02-24 Alan Modra <amodra@gmail.com>
1326 Siddhesh Poyarekar <siddhesh@gotplt.org>
1329 * bucomm.h (smart_rename): Update prototype.
1330 * rename.c (smart_rename): Add fromfd and preserve_dates params.
1331 Pass fromfd and target_stat to simple_copy. Call set_times
1332 when preserve_dates.
1333 (simple_copy): Accept fromfd rather than from filename. Add
1334 target_stat param. Rewind fromfd rather than opening. Open
1335 "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
1336 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
1337 closing output temp file, and pass tmpfd to smart_rename.
1338 * arsup.c (temp_fd): Rename from real_fd.
1339 (ar_save): Dup temp_fd and pass to smart_rename.
1340 * objcopy.c (strip_main, copy_main): Likewise, and pass
1343 2021-02-24 Alan Modra <amodra@gmail.com>
1346 * rename.c: Tidy throughout.
1347 (smart_rename): Always copy. Remove windows specific code.
1349 2021-02-20 Alan Modra <amodra@gmail.com>
1351 * testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
1352 (run_dump_test): Fail if expecting errors from a file like we do
1353 for error strings, if no error is seen.
1355 2021-02-19 Alan Modra <amodra@gmail.com>
1357 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
1359 2021-02-19 Siddhesh Poyarekar <siddhesh@gotplt.org>
1361 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
1363 * arsup.c (ar_save): Likewise.
1364 * objcopy (strip_main): Don't copy TMPFD. Don't set times on
1365 temporary file and adjust call to SMART_RENAME.
1366 (copy_main): Likewise.
1367 * rename.c [!S_ISLNK]: Remove definitions.
1368 (try_preserve_permissions): Remove function.
1369 (smart_rename): Remove FD, PRESERVE_DATES arguments. Use
1370 rename system call only if TO does not exist.
1371 * bucomm.h (smart_rename): Adjust declaration.
1373 2021-02-18 Nick Clifton <nickc@redhat.com>
1375 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
1376 address that is higher than the end address.
1378 2021-02-17 Alan Modra <amodra@gmail.com>
1380 * dwarf.c: Include limits.h.
1381 (CHAR_BIT): Provide backup define.
1382 (read_leb128): Use CHAR_BIT to size "result" in bits. Correct
1383 signed overflow checking.
1384 * testsuite/binutils-all/pr26548.s,
1385 * testsuite/binutils-all/pr26548.d,
1386 * testsuite/binutils-all/pr26548e.d: New tests.
1387 * testsuite/binutils-all/readelf.exp: Run them.
1388 (readelf_test): Drop unused "xfails" parameter. Update all uses.
1390 2021-02-16 Jan Beulich <jbeulich@suse.com>
1392 * dwarf.c (process_debug_info): Initialize "dwo_id".
1394 2021-02-15 Alan Modra <amodra@gmail.com>
1396 * objdump.c (load_specific_debug_section): Don't call
1397 bfd_cache_section_contents. Rearrange so that
1398 bfd_get_full_section_contents is not called on path where
1399 bfd_simple_get_relocated_section_contents is called.
1400 Don't set section->user_data.
1401 (free_debug_section): Always free section->start. Don't twiddle
1403 * readelf.c (load_specific_debug_section): Don't set user_data.
1404 * dwarf.h (struct dwarf_section): Remove use_data field.
1405 * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
1407 2021-02-15 Alan Modra <amodra@gmail.com>
1409 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
1410 * testsuite/binutils-all/objdump.exp: Likewise.
1412 2021-02-14 Alan Modra <amodra@gmail.com>
1414 * objdump.c (slurp_symtab): Don't add an extra entry for NULL
1415 to the symbol array.
1416 (slurp_dynamic_symtab): Likewise.
1417 (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
1419 2021-02-14 Alan Modra <amodra@gmail.com>
1421 * Makefile.in: Regenerate.
1422 * doc/Makefile.in: Regenerate.
1424 2021-02-13 Mike Frysinger <vapier@gentoo.org>
1426 * aclocal.m4: Regenerate.
1428 2021-02-12 Nick Clifton <nickc@redhat.com>
1430 * configure.ac (follow-debug-links): Add option to enable or
1431 disable the following of debug links by default. Set the
1432 default for the option to be 'follow'.
1433 * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
1434 (dwarf_select_sections_by_names): Add no-follow-links option.
1435 (dwarf_select_sections_by_letter): Add 'N' option.
1436 * objdump.c (usage): Add conditional text describing the
1437 follow links option.
1438 (slurp_symtab): Ensure that there is a NULL entry at the end
1439 of the symbol table.
1440 (slurp_dynamic_symtab): Likewise.
1441 (dump_bfd): When extending the symbol table, ensure that there
1442 is still a NULL entry at the end.
1443 * readelf.c (usage): Add conditional text describing the
1444 follow links option.
1445 * doc/binutils.texi: Update documentation for objcopy and
1447 * doc/debug.options.texi: Update documentation of the
1448 follow-links option.
1449 * config.in: Regenerate.
1450 * configure: Regenerate.
1451 * testsuite/binutils-all/compress.exp: Add the -WN option to
1452 objdump command lines that are not expecting to follow links.
1453 * testsuite/binutils-all/readelf.exp: Add the
1454 --debug-dump=no-follow-links option to tests that are not
1455 expecting to follow debug links.
1456 * NEWS: Mention the new behaviour.
1458 2021-02-12 Alan Modra <amodra@gmail.com>
1460 * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
1461 gas or ld fails to build a testcase rather than "unresolved".
1462 Report "fail" when readelf returns an error status rather than
1464 * testsuite/binutils-all/ar.exp: Likewise.
1465 * testsuite/binutils-all/compress.exp: Likewise.
1466 * testsuite/binutils-all/readelf.exp: Likewise.
1468 2021-02-12 Alan Modra <amodra@gmail.com>
1470 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
1471 "c" with "ccc" labels.
1473 2021-02-12 Tom de Vries <tdevries@suse.de>
1475 * dwarf.h (debug_info): Fix typo in comment.
1477 2021-02-12 Tom de Vries <tdevries@suse.de>
1479 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
1482 2021-02-12 Tom de Vries <tdevries@suse.de>
1484 * dwarf.c (process_debug_info): Print DWO ID.
1486 2021-02-11 Alan Modra <amodra@gmail.com>
1491 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
1492 Use bfd_malloc_and_get_section.
1493 (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
1494 check namesz. Return NULL if descsz is too small. Ensure
1495 string table is terminated.
1496 (elf32_avr_get_device_info): Formatting. Add note_size param.
1498 (elf32_avr_dump_mem_usage): Adjust to suit.
1500 2021-02-10 Tom de Vries <tdevries@suse.de>
1503 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
1505 2021-02-10 Tom de Vries <tdevries@suse.de>
1508 * dwarf.c (display_debug_ranges): Filter range lists according to
1511 2021-02-09 Tom de Vries <tdevries@suse.de>
1514 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
1516 2021-02-09 Tom de Vries <tdevries@suse.de>
1519 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
1520 DW_UT_split_compile.
1522 2021-02-09 Alan Modra <amodra@gmail.com>
1524 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
1527 2021-02-07 Alan Modra <amodra@gmail.com>
1529 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
1530 uninitialised on invalid input.
1532 2021-02-06 Alan Modra <amodra@gmail.com>
1535 * rename.c (smart_rename): Test for existence and type of output
1538 2021-02-05 Nick Clifton <nickc@redhat.com>
1540 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
1542 2021-02-05 Eli Zaretskii <eliz@gnu.org>
1545 * elfedit.c (check_file):
1546 * bucomm.c (get_file_size): Fix typos in comments.
1548 2021-02-05 Alan Modra <amodra@gmail.com>
1551 * arsup.c (ar_save): Use stat rather than lstat.
1553 2021-02-03 Alan Modra <amodra@gmail.com>
1558 * ar.c: Don't include libbfd.h.
1559 (write_archive): Replace xmalloc+strcpy with xstrdup. Use
1560 bfd_stat rather than fstat on iostream. Move stat and fd tests
1561 outside of _WIN32 ifdef. Delete skip_stat variable.
1562 * arsup.c (temp_name, real_ofd): New static variables.
1563 (ar_open): Use make_tempname and bfd_fdopenw.
1564 (ar_save): Adjust to suit ar_open changes. Move stat output
1566 * objcopy.c: Don't include libbfd.h.
1567 (copy_file): Use bfd_stat.
1569 2021-02-02 H.J. Lu <hongjiu.lu@intel.com>
1572 * readelf.c (process_section_headers): Add 'R' and 'D' to
1574 * testsuite/binutils-all/retain1a.d: Updated.
1576 2021-01-30 Nick Clifton <nickc@redhat.com>
1578 * README-how-to-make-a-release: Small updates after the 2.35.2
1581 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1584 * windres.c (quot): Use double quotes to protect strings on
1587 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1590 * bucomm.c (get_file_size): Add code to handle /dev/null on
1592 * elfedit.c (check_file): Likewise.
1594 2021-01-27 Nick Clifton <nickc@redhat.com>
1596 * objcopy.c (copy_main): Remove conditional control of the calls
1597 to free, simplifying the code and making it easier to detect
1600 2021-01-26 Frederic Cambus <fred@statdns.com>
1602 * objcopy.c (copy_main): Fix a double free happening when both
1603 --localize-symbols and --globalize-symbols options are invoked
1606 2021-01-24 Nick Clifton <nickc@redhat.com>
1608 * README-how-to-make-a-release: Minor updates after the 2.36 release.
1610 2021-01-16 Alan Modra <amodra@gmail.com>
1612 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
1614 2021-01-15 Alan Modra <amodra@gmail.com>
1617 * readelf.c (uncompress_section_contents): Always call inflateEnd.
1619 2021-01-14 Alexandre Oliva <oliva@gnu.org>
1621 * MAINTAINERS: Update my email address.
1623 2021-01-14 Nick Clifton <nickc@redhat.com>
1625 * po/sv.po: Updated Swedish translation.
1627 2021-01-13 Alan Modra <amodra@gmail.com>
1629 * Makefile.in: Regenerate.
1630 * doc/Makefile.in: Regenerate.
1632 2021-01-13 Zebediah Figura <z.figura12@gmail.com>
1635 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
1637 (i386_x64_trampoline): Add SEH annotations.
1638 (struct mac): Add how_seh field.
1639 (make_delay_head): If how_set field is true add SEh instructions.
1641 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1644 * configure.ac: Use GNU_MAKE_JOBSERVER.
1645 * aclocal.m4: Regenerated.
1646 * configure: Likewise.
1648 2021-01-12 Nick Clifton <nickc@redhat.com>
1650 * po/fr.po: Updated French translation.
1652 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1655 * configure: Regenerated.
1657 2021-01-11 Nick Clifton <nickc@redhat.com>
1659 * po/pt.po: Updated Portuguese translation.
1660 * po/sr.po: Updated Serbian translation.
1661 * po/uk.po: Updated Ukranian translation.
1663 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1665 * configure: Regenerated.
1667 2021-01-09 Nick Clifton <nickc@redhat.com>
1669 * configure: Regenerate.
1670 * po/binutils.pot: Regenerate.
1672 2021-01-09 Nick Clifton <nickc@redhat.com>
1674 * 2.36 release branch crated.
1675 * README-how-to-make-a-release: Add note about updating Makefiles
1677 * BRANCHES: Add binutils-2.36-branch.
1679 2021-01-09 Alan Modra <amodra@gmail.com>
1681 * configure: Regenerate.
1683 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1685 * configure: Regenerate.
1687 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1690 * objcopy.c (copy_object): Handle section symbols for
1691 non-relocatable inputs.
1692 * testsuite/binutils-all/readelf.exp (readelf_test): Check
1693 is_elf_unused_section_symbols.
1694 * testsuite/binutils-all/readelf.s-64: Updated.
1695 * testsuite/binutils-all/readelf.ss: Likewise.
1696 * testsuite/binutils-all/readelf.ss-64: Likewise.
1697 * testsuite/binutils-all/readelf.s-64-unused: New file.
1698 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
1699 * testsuite/binutils-all/readelf.ss-unused: Likewise.
1700 * testsuite/lib/binutils-common.exp
1701 (is_elf_unused_section_symbols): New proc.
1703 2021-01-06 Reuben Thomas <rrt@sc3d.org>
1705 * binutils/readelf.c: Correct grammar in comment.
1707 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1709 * coffgrok.c (do_type): Correct spelling of auxiliary in errors.
1710 * doc/binutils.texi: Correct grammar.
1711 * readelf.c (process_version_sections): Correct spelling of auxiliary
1713 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
1715 2021-01-01 Alan Modra <amodra@gmail.com>
1717 Update year range in copyright notice of all files.
1719 For older changes see ChangeLog-2020
1721 Copyright (C) 2021-2022 Free Software Foundation, Inc.
1723 Copying and distribution of this file, with or without modification,
1724 are permitted in any medium without royalty provided the copyright
1725 notice and this notice are preserved.
1731 version-control: never