dlltool: Use the output name as basis for deterministic temp prefixes
[binutils-gdb.git] / binutils / ChangeLog
1 2022-03-16 Martin Storsjö <martin@martin.st>
2
3 PR 28885
4 * dlltool.c (main): use imp_name rather than dll_name when
5 generating a temporary file name.
6
7 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
8
9 * readelf.c (dump_relocations): Handle EM_AMDGPU.
10
11 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
12
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
19 using pkg-config.
20 * readelf.c: Include msgpack.h if HAVE_MSGPACK.
21 (print_note_contents_hex): New.
22 (print_indents): New.
23 (dump_msgpack_obj): New.
24 (dump_msgpack): New.
25 (print_amdgpu_note): New.
26 (process_note): Handle NT_AMDGPU_METADATA note contents.
27 Use print_note_contents_hex.
28
29 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
30
31 * readelf.c (get_amdgpu_elf_note_type): New.
32 (process_note): Handle "AMDGPU" notes.
33
34 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
35
36 * readelf.c: Include elf/amdgcn.h.
37 (decode_AMDGPU_machine_flags): New.
38 (get_machine_flags): Handle flags for EM_AMDGPU machine type.
39
40 2022-03-16 Simon Marchi <simon.marchi@efficios.com>
41
42 * readelf.c (get_osabi_name): Handle EM_AMDGPU OS ABIs.
43
44 2022-03-16 Nick Clifton <nickc@redhat.com>
45
46 * po/sr.po: Updated Serbian translation.
47
48 2022-03-15 Tom Tromey <tromey@adacore.com>
49
50 * dwarf-mode.el: Now 1.7.
51 (dwarf--sentinel): Switch to the process buffer.
52
53 2022-03-11 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
54
55 * MAINTAINERS: Add gprofng maintainer.
56 * README-how-to-make-a-release: Add gprofng.
57
58 2022-03-10 Nick Clifton <nickc@redhat.com>
59
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
73 options.
74
75 2021-03-06 Maciej W. Rozycki <macro@orcam.me.uk>
76
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
83 test.
84 * testsuite/binutils-all/mips/micromips-branch-alias.d: New
85 test.
86 * testsuite/binutils-all/mips/micromips-branch-noalias.d: New
87 test.
88 * testsuite/binutils-all/mips/mips-branch-alias.s: New test
89 source.
90 * testsuite/binutils-all/mips/micromips-branch-alias.s: New test
91 source.
92 * testsuite/binutils-all/mips/mips.exp: Run the new tests.
93
94 2022-03-04 Simon Marchi <simon.marchi@polymtl.ca>
95
96 * readelf.c (process_dynamic_section): Fix indentation.
97
98 2022-02-09 Nick Clifton <nickc@redhat.com>
99
100 * README-how-to-make-a-release: Update after the 2.38 release.
101
102 2022-01-27 Nick Clifton <nickc@redhat.com>
103
104 * po/sv.po: Updated Swedish translation.
105
106 2022-01-24 Nick Clifton <nickc@redhat.com>
107
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.
112
113 2022-01-22 Martin Storsjö <martin@martin.st>
114
115 * dlltool.c (main): Allow inferring tmp_prefix from the dll name
116 from a def file.
117
118 2022-01-22 Nick Clifton <nickc@redhat.com>
119
120 * configure: Regenerate.
121 * po/binutils.pot: Regenerate.
122
123 2022-01-22 Nick Clifton <nickc@redhat.com>
124
125 * 2.38 release branch created.
126
127 2022-01-17 Nick Clifton <nickc@redhat.com>
128
129 * Makefile.in: Regenerate.
130
131 2022-01-11 Fangrui Song <maskray@google.com>
132
133 PR binutils/28759
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.
139
140 2022-01-11 Martin Storsjö <martin@martin.st>
141
142 * dlltool.c (main): If a prefix has not been provided, attempt to
143 use a deterministic one based upon the dll name.
144
145 2022-01-07 Pavel Mayorov <pmayorov@cloudlinux.com>
146
147 PR 28718
148 * dwarf.c: Revert previous delta.
149 (debug_get_real_type): Reject indirect types that point to
150 indirect types.
151 (debug_get_type_name, debug_get_type_size, debug_write_type):
152 Likewise.
153
154 2022-01-06 Nick Clifton <nickc@redhat.com>
155
156 * debug.c (debug_write_type): Allow for malicious recursion via
157 indirect debug types.
158
159 2022-01-04 Nick Clifton <nickc@redhat.com>
160
161 PR 28716
162 * dwarf.c (load_build_id_debug_file): Remove spurious printf.
163
164 2021-12-16 Nick Clifton <nickc@redhat.com>
165
166 PR 28697
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
172 note_gnu_build_id.
173 * testsuite/binutils-all/debuginfod.exp (test_fetch_debuglink):
174 Fix regexp for loads via debuglink section.
175
176 2021-12-03 Chenghua Xu <xuchenghua@loongson.cn>
177
178 * MAINTAINERS: Add myself and Zhensong Liu
179 as the LoongArch maintainer.
180
181 2021-12-02 Nick Clifton <nickc@redhat.com>
182
183 PR 28645
184 * dwarf.c (process_cu_tu_index): Add test for overruning section
185 whilst processing slots.
186
187 2021-11-30 Roland McGrath <mcgrathr@google.com>
188
189 * doc/local.mk: Give each man page target its missing dependency on
190 doc/$(am__dirstamp).
191
192 2021-11-30 Nick Clifton <nickc@redhat.com>
193
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
197 the offset.
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.
205
206 2021-11-29 Nick Clifton <nickc@redhat.com>
207
208 PR 28632
209 * strings.c (usage): Update desciption of -n option.
210 * doc/binutils.texi: Likewise.
211
212 2021-11-24 Nick Clifton <nickc@redhat.com>
213
214 PR 28564
215 * sysdump.c (getCHARS): Check for an out of bounds read.
216
217 2021-11-16 Fangrui Song <maskray@google.com>
218
219 * readelf.c (enum relocation_type): New.
220 (slurp_relr_relocs): New.
221 (dump_relocations): Change is_rela to rel_type.
222 Dump RELR.
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.
227
228 2021-11-09 Nick Clifton <nickc@redhat.com>
229
230 * nm.c: Add --unicode option to control how unicode characters are
231 handled.
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
242
243 2021-11-03 Tom Tromey <tromey@adacore.com>
244
245 * dwarf.c (display_debug_loc): Use section name in warnings.
246
247 2021-10-25 Nick Alcock <nick.alcock@oracle.com>
248
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.
253
254 2021-10-25 Nick Alcock <nick.alcock@oracle.com>
255
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.
269
270 2021-10-19 Nick Clifton <nickc@redhat.com>
271
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.
275
276 2021-09-30 Nick Clifton <nickc@redhat.com>
277
278 * objcopy.c (filter_symbols): Fail if attempting to dredefine
279 symbols in an LTO object file.
280
281 2021-09-27 Nick Alcock <nick.alcock@oracle.com>
282
283 * configure: Regenerate.
284
285 2021-09-20 Andrew Burgess <andrew.burgess@embecosm.com>
286
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.
290
291 2021-09-07 Luis Machado <luis.machado@linaro.org>
292
293 Revert: [AArch64] MTE corefile support
294
295 2021-05-21 Luis Machado <luis.machado@linaro.org>
296
297 * readelf.c (get_note_type): Handle NT_MEMTAG note types.
298
299 2021-08-11 Nick Clifton <nickc@redhat.com>
300
301 * po/pt.po: Updated Portuguese translation.
302
303 2021-08-10 Nick Clifton <nickc@redhat.com>
304
305 * po/sr.po: Updated Serbian translation.
306
307 2021-07-16 Nick Clifton <nickc@redhat.com>
308
309 * po/sv.po: Updated Swedish translation.
310
311 2021-07-14 Clément Chigot <clement.chigot@atos.net>
312
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.
317
318 2021-07-12 Nick Clifton <nickc@redhat.com>
319
320 * po/fr.po: Updated French translation.
321
322 2021-07-10 Alan Modra <amodra@gmail.com>
323
324 PR 28069
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
330 report_leb_status.
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.
334
335 2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
336
337 * configure.ac: Check for strnlen declaration.
338 * configure, config.in: Regenerate.
339
340 2021-07-05 Alan Modra <amodra@gmail.com>
341
342 PR 28047
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.
346
347 2021-07-03 Nick Clifton <nickc@redhat.com>
348
349 * configure: Regenerate.
350 * po/opcodes.pot: Regenerate.
351 * README-how-to-make-a-release: Update.
352
353 2021-07-03 Nick Clifton <nickc@redhat.com>
354
355 * 2.37 release branch created.
356
357 2021-07-02 Alan Modra <amodra@gmail.com>
358
359 PR 28048
360 * dwarf.c (get_type_signedness): Don't run off end of buffer
361 printing DW_FORM_string attribute.
362
363 2021-07-01 Nick Clifton <nickc@redhat.com>
364
365 PR 28029
366 * testsuite/binutils-all/debuginfod.exp: Replace -wK with -wk.
367
368 2021-07-01 Andrei Homescu <ah@immunant.com>
369
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.
374
375 2021-06-30 Tom Tromey <tom@tromey.com>
376
377 * dwarf.c (read_and_display_attr_value): Handle
378 DW_FORM_implicit_const.
379
380 2021-06-30 Richard Henderson <richard.henderson@linaro.org>
381
382 * dwarf.c (display_debug_frames): Both DW_CFA_def_cfa_sf
383 and DW_CFA_def_cfa_offset_sf have a signed offset.
384
385 2021-06-19 Alan Modra <amodra@gmail.com>
386
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.
390
391 2021-06-18 H.J. Lu <hongjiu.lu@intel.com>
392
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.
396
397 2021-06-15 Nick Clifton <nickc@redhat.com>
398
399 * readelf.c (get_note_type): Add support for NT_GO_BUILDID.
400
401 2021-06-15 Alan Modra <amodra@gmail.com>
402
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.
411
412 2021-06-14 Eric Botcazou <ebotcazou@adacore.com>
413
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.
418
419 2021-06-12 Alan Modra <amodra@gmail.com>
420
421 * readelf.c (process_file_header): Don't clear section_headers.
422
423 2021-06-12 Alan Modra <amodra@gmail.com>
424
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
428 header extension.
429
430 2021-06-11 Alan Modra <amodra@gmail.com>
431
432 * readelf.c (struct filedata): Move archive_file_offset and
433 archive_file_size earlier.
434 (free_filedata): Clear using memset.
435
436 2021-06-11 Alan Modra <amodra@gmail.com>
437
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.
449
450 2021-06-09 Nick Clifton <nickc@redhat.com>
451
452 * MAINTAINERS: Remove Daniel Jacobwitz from the maintainers list.
453
454 2021-06-07 Jan Beulich <jbeulich@suse.com>
455
456 * dwarf.c (display_debug_aranges): Add u suffix to constant.
457
458 2021-05-29 Alan Modra <amodra@gmail.com>
459
460 * objdump (usage): Add missing \n.
461
462 2021-05-29 Alan Modra <amodra@gmail.com>
463
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
468 ctf help.
469 * objdump.c (usage): Similarly.
470
471 2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
472
473 * testsuite/binutils-all/mips/mips-xpa-virt-1.d: Correct CFC0
474 operand disassembly.
475 * testsuite/binutils-all/mips/mips-xpa-virt-3.d: Likewise.
476
477 2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
478
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.
484
485 2021-05-28 H.J. Lu <hongjiu.lu@intel.com>
486
487 PR ld/27905
488 * readelf.c (decode_x86_feature_2): Revert commit 50c95a739c9.
489
490 2021-05-27 Alan Modra <amodra@gmail.com>
491
492 * readelf (usage): Order -w letters to match --debug-dump= and
493 move common '=' for --debug-dump out of brackets.
494
495 2021-05-26 H.J. Lu <hongjiu.lu@intel.com>
496
497 PR ld/27905
498 * readelf.c (decode_x86_feature_2): Support
499 GNU_PROPERTY_X86_FEATURE_2_CODE16.
500
501 2021-05-23 Tiezhu Yang <yangtiezhu@loongson.cn>
502
503 * readelf.c (get_machine_name): Change Loongson Loongarch to
504 LoongArch.
505
506 2021-05-21 Luis Machado <luis.machado@linaro.org>
507
508 * readelf.c (get_note_type): Add missing NT_ARM_* entries.
509
510 2021-05-21 Luis Machado <luis.machado@linaro.org>
511
512 * readelf.c (get_note_type): Handle NT_MEMTAG note types.
513
514 2021-05-19 Eli Schwartz <eschwartz@archlinux.org>
515
516 * dwarf.c (ENABLE_CHECKING): Define to 0 if not previously set.
517
518 2021-05-19 Alan Modra <amodra@gmail.com>
519
520 PR 27884
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.
526
527 2021-05-19 Alan Modra <amodra@gmail.com>
528
529 PR 27879
530 * sysdump.c (getBARRAY): Sanity check size against max.
531 (getINT): Avoid UB shift left.
532
533 2021-05-15 Alan Modra <amodra@gmail.com>
534
535 * dwarf.c (process_cu_tu_index): Avoid pointer UB. Use _mul_overflow.
536 Delete dead code.
537
538 2021-05-15 Alan Modra <amodra@gmail.com>
539
540 * dwarf.c (display_gdb_index): Avoid pointer UB and overflow in
541 length calculations.
542
543 2021-05-15 Alan Modra <amodra@gmail.com>
544
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.
548
549 2021-05-15 Alan Modra <amodra@gmail.com>
550
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.
555
556 2021-05-15 Alan Modra <amodra@gmail.com>
557
558 * dwarf.c (read_cie): Add more sanity checks to ensure data
559 pointer is not bumped past end.
560
561 2021-05-15 Alan Modra <amodra@gmail.com>
562
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.
566
567 2021-05-15 Alan Modra <amodra@gmail.com>
568
569 * dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
570
571 2021-05-15 Alan Modra <amodra@gmail.com>
572
573 * dwarf.c (display_debug_str_offsets): Constrain reads to length
574 given in header.
575
576 2021-05-15 Alan Modra <amodra@gmail.com>
577
578 * dwarf.c (display_debug_aranges): Delete initial_length_size.
579 Use end_ranges to constrain data reads to header length. Avoid
580 pointer UB.
581
582 2021-05-15 Alan Modra <amodra@gmail.com>
583
584 * dwarf.c (display_loc_list): Avoid pointer UB. Correct check
585 before reading uleb length. Warn on excess length.
586
587 2021-05-15 Alan Modra <amodra@gmail.com>
588
589 * dwarf.c (display_debug_macro): Print strings that might not
590 be zero terminated with %*s. Don't bump curr if unterminated.
591
592 2021-05-15 Alan Modra <amodra@gmail.com>
593
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.
597
598 2021-05-15 Alan Modra <amodra@gmail.com>
599
600 * dwarf.c (display_debug_macinfo): Print strings that might not
601 be zero terminated with %*s. Don't bump curr if unterminated.
602
603 2021-05-15 Alan Modra <amodra@gmail.com>
604
605 * dwarf.c (display_debug_pubnames_worker): Delete initial_length_size.
606 Simplify length check. Constrain reads to length given by header.
607
608 2021-05-15 Alan Modra <amodra@gmail.com>
609
610 * dwarf.c (display_debug_lines_decoded): Don't use strnlen when
611 we have already checked for NUL termination.
612
613 2021-05-15 Alan Modra <amodra@gmail.com>
614
615 * dwarf.c (read_debug_line_header): Delete initial_length_size.
616 Avoid pointer UB. Keep within length specified by header.
617 Delete dead code.
618
619 2021-05-15 Alan Modra <amodra@gmail.com>
620
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.
625
626 2021-05-15 Alan Modra <amodra@gmail.com>
627
628 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Assert only when ENABLE_CHECKING.
629
630 2021-05-15 Alan Modra <amodra@gmail.com>
631
632 * bucomm.h (_mul_overflow): Define.
633 * dwarf.c (get_encoded_value): Avoid pointer UB.
634
635 2021-05-13 Alan Modra <amodra@gmail.com>
636
637 PR 27861
638 * dwarf.c (display_debug_str_offsets): Sanity check dwarf5
639 header length.
640
641 2021-05-13 Alan Modra <amodra@gmail.com>
642
643 PR 27860
644 * dwarf.c (display_debug_frames): Sanity check cie_off before
645 attempting to read cie.
646
647 2021-05-12 Alan Modra <amodra@gmail.com>
648
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.
662
663 2021-05-12 Alan Modra <amodra@gmail.com>
664
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.
674
675 2021-05-12 Alan Modra <amodra@gmail.com>
676
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
685 with 4-byte elf_vma.
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.
691
692 2021-05-12 Alan Modra <amodra@gmail.com>
693
694 PR 27836
695 * dwarf.c (display_debug_frames): Don't compare pointers derived
696 from user input. Test offset against bounds instead.
697
698 2021-05-12 Alan Modra <amodra@gmail.com>
699
700 PR 27853
701 * dwarf.c (display_formatted_table): Test for data >= end rather
702 than data == end.
703 (process_extended_line_op): Likewise.
704 (display_debug_lines_raw): Likewise.
705 (display_debug_lines_decoded): Likewise.
706
707 2021-05-12 Alan Modra <amodra@gmail.com>
708
709 PR 27849
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.
713
714 2021-05-11 Hans-Peter Nilsson <hp@axis.com>
715
716 * dwarf.c (process_abbrev_set): Properly parenthesize before
717 casting to unsigned long.
718
719 2021-05-11 Alan Modra <amodra@gmail.com>
720
721 PR 27845
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
725 here rather than..
726 (process_debug_info): ..here.
727
728 2021-05-10 Thomas Wolff <towo@towo.net>
729
730 PR 4356
731 PR 26865
732 PR 27594
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.
737
738 2021-05-10 Alan Modra <amodra@gmail.com>
739
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.
743
744 2021-05-09 Alan Modra <amodra@gmail.com>
745
746 * objcopy.c (eq_string): Delete.
747 (create_symbol_htab): Use htab_eq_string.
748
749 2021-05-08 Mike Frysinger <vapier@gentoo.org>
750
751 * README-how-to-make-a-release: Update html & pdf entries.
752
753 2021-05-08 Mike Frysinger <vapier@gentoo.org>
754
755 * doc/Makefile.am (html-local, binutils/index.html): New targets.
756 * doc/Makefile.in: Regenerate.
757
758 2021-05-08 Mike Frysinger <vapier@gentoo.org>
759
760 * doc/Makefile.am (AM_MAKEINFOFLAGS): Add --no-split.
761 * doc/Makefile.in: Regenerate.
762
763 2021-05-07 Nick Clifton <nickc@redhat.com>
764
765 * readelf.c (no_processor_specific_unwind): New function.
766 (process_unwind): Use no_processor_specific_unwind for X86
767 targets.
768
769 2021-05-07 Michael Forney <mforney@mforney.org>
770
771 * dwarf.c: Don't omit second operand of '?' operator.
772
773 2021-04-30 Nick Clifton <nickc@redhat.com>
774
775 PR 27796
776 * dwarf.c (load_debug_sup_file): Allocate memory for filename in
777 .debug_sup section.
778
779 2021-04-29 Nick Clifton <nickc@redhat.com>
780
781 PR 27594
782 * doc/binutils.texi (windres): Correct the description of the
783 default value of the --preprocessor argument.
784
785 2021-04-27 Nick Clifton <nickc@redhat.com>
786
787 PR 27779
788 * dwarf.c (parse_gnu_debuglink): Reject empty names.
789 (parse_gnu_debugaltlink): Likewise.
790
791 2021-04-22 Clément Chigot <clement.chigot@atos.net>
792
793 * od-xcoff.c (dump_xcoff32_symbols): Adapt to new
794 aux structures.
795
796 2021-04-21 Nick Lott <nick.lott@gmail.com>
797
798 PR 27672
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.
809
810 2021-04-21 Nick Clifton <nickc@redhat.com>
811
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:
815 Likewise.
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.
820
821 2021-04-21 Luo Longjun <luolongjun@huawei.com>
822
823 * readelf.c (print_dynamic_symbol): Print the section name for
824 section symbols without a name of their own.
825
826 2021-04-20 Andreas Krebbel <krebbel@linux.ibm.com>
827
828 * MAINTAINERS: Remove Martin Schwidefsky as s390 maintainer and
829 add him to Past Maintainers.
830 Update my email address.
831
832 2021-04-19 Nick Clifton <nickc@redhat.com>
833
834 PR 21702
835 * arsup.c (ar_addmod): Enable plugin support, if available.
836
837 2021-04-19 Nick Clifton <nickc@redhat.com>
838
839 * rename.c: (get_stat_atime_ns): Add prototype.
840 (get_stat_mtime_ns): Add prototype.
841
842 2021-04-16 Alan Modra <amodra@gmail.com>
843
844 PR 27725
845 * rename.c (get_stat_atime, get_stat_mtime): Make static.
846 (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
847
848 2021-04-15 Pekka Seppänen <pexu@sourceware.mail.kapsi.fi>
849
850 PR 27725
851 * rename.c (get_stat_atime_ns): Add ATTRIBUTE_UNUSED.
852 (get_stat_mtime_ns): Likewise.
853
854 2021-04-15 Alan Modra <amodra@gmail.com>
855
856 PR 27725
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.
870
871 2021-04-15 Alan Modra <amodra@gmail.com>
872
873 PR 27456
874 * rename.c (smart_rename): When TO and FROM are equal, just set
875 file timestamp.
876 * objcopy.c (strip_main, copy_main): Always call smart_rename.
877
878 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
879
880 PR binutils/27708
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
884 test.
885
886 2021-04-14 Mark Harmstone <mark@harmstone.com>
887
888 PR 27686
889 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the
890 end of the structure.
891
892 2021-04-14 Frederic Cambus <fred@statdns.com>
893
894 * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
895 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
896
897 2021-04-14 Alan Modra <amodra@gmail.com>
898
899 PR 27716
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
905 file.
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.
914
915 2021-04-13 Frederic Cambus <fred@statdns.com>
916
917 * readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
918 check for NT_NETBSD_PAX.
919
920 2021-04-12 Alan Modra <amodra@gmail.com>
921
922 * configure.ac (--enable-checking): Add support.
923 * config.in: Regenerate.
924 * configure: Regenerate.
925
926 2021-04-09 Alan Modra <amodra@gmail.com>
927
928 * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
929 dynrelcount.
930 (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move.
931 (disassemble_section, disassemble_data): Likewise.
932
933 2021-04-06 Alan Modra <amodra@gmail.com>
934
935 * objdump.c (objdump_symbol_at_address): Return asymbol*.
936
937 2021-04-06 Alan Modra <amodra@gmail.com>
938
939 * NEWS: Mention C99 requirement.
940 * README: Likewise. Modernise examples and "Reporting bugs".
941
942 2021-04-05 Alan Modra <amodra@gmail.com>
943
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.
955 * ar.c: Likewise.
956 * coffdump.c: Likewise.
957 * dlltool.c: Likewise.
958 * dllwrap.c: Likewise.
959 * elfedit.c: Likewise.
960 * nm.c: Likewise.
961 * objcopy.c: Likewise.
962 * objdump.c: Likewise.
963 * readelf.c: Likewise.
964 * size.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
972 is available.
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.
982
983 2021-04-01 Martin Liska <mliska@suse.cz>
984
985 * elfcomm.h (strneq): Remove strneq and use startswith.
986 * readelf.c (ia64_process_unwind): Likewise.
987 (process_note): Likewise.
988
989 2021-04-01 Martin Liska <mliska@suse.cz>
990
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.
996
997 2021-04-01 Martin Liska <mliska@suse.cz>
998
999 * dwarf.c (display_debug_lines_raw): Replace const_strneq with
1000 startswith.
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.
1011
1012 2021-03-31 Alan Modra <amodra@gmail.com>
1013
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.
1024
1025 2021-03-31 Alan Modra <amodra@gmail.com>
1026
1027 * coffdump.c: Include stdint.h in place of bfd_stdint.h.
1028 * dwarf.c: Likewise.
1029
1030 2021-03-31 Alan Modra <amodra@gmail.com>
1031
1032 * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
1033
1034 2021-03-29 Alan Modra <amodra@gmail.com>
1035
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.
1042
1043 2021-03-29 Alan Modra <amodra@gmail.com>
1044
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.
1050
1051 2021-03-22 Martin Liska <mliska@suse.cz>
1052
1053 * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ
1054 with startswith.
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.
1065
1066 2021-03-19 H.J. Lu <hongjiu.lu@intel.com>
1067
1068 * readelf.c (get_machine_name): Add EM_INTELGT.
1069
1070 2021-03-18 Nick Clifton <nickc@redhat.com>
1071
1072 PR 27478
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
1081 from ...
1082 (process_object): ... here. Also call initialise_dump_sects for
1083 separate files.
1084
1085 2021-03-16 Nick Clifton <nickc@redhat.com>
1086
1087 PR 27534
1088 * readelf.c (display_debug_section): Also retain .debug_addr
1089 sections.
1090
1091 2021-03-16 Nick Clifton <nickc@redhat.com>
1092
1093 PR 27533
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.
1098
1099 2021-03-15 Nick Clifton <nickc@redhat.com>
1100
1101 PR 27487
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.
1115
1116 2021-03-12 Clément Chigot <clement.chigot@atos.net>
1117
1118 * od-xcoff.c: Replace RTB by TRL entry.
1119
1120 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1121 Andrew Burgess <andrew.burgess@embecosm.com>
1122
1123 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
1124
1125 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
1126 Andrew Burgess <andrew.burgess@embecosm.com>
1127
1128 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
1129
1130 2021-03-05 Nick Clifton <nickc@redhat.com>
1131
1132 PR 27387
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.
1136
1137 2021-03-04 Nick Clifton <nickc@redhat.com>
1138
1139 PR 27478
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.
1149 (usage): Likewise.
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
1173 structure.
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
1183 option.
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.
1199
1200 2021-03-03 Alan Modra <amodra@gmail.com>
1201
1202 PR 27493
1203 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
1204 * NEWS: Mention feature.
1205
1206 2021-03-01 H.J. Lu <hongjiu.lu@intel.com>
1207
1208 PR binutils/27486
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.
1213
1214 2021-03-01 Alan Modra <amodra@gmail.com>
1215
1216 PR 27128
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.
1226
1227 2021-02-26 Fangrui Song <maskray@google.com>
1228
1229 PR 27408
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.
1238
1239 2021-02-26 Tom de Vries <tdevries@suse.de>
1240
1241 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
1242
1243 2021-02-26 Tom de Vries <tdevries@suse.de>
1244
1245 PR 27390
1246 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
1247 DW_FORM_addrx*.
1248 (read_and_display_attr_value): Likewise.
1249
1250 2021-02-25 Nick Clifton <nickc@redhat.com>
1251
1252 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
1253 forms.
1254 (read_and_display_attr_value): Handle sup forms.
1255 (display_debug_sup): New function. Displays the contents of a
1256 .debug_sup section.
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.
1266
1267 2021-02-25 Alan Modra <amodra@gmail.com>
1268
1269 PR 27456
1270 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
1271
1272 2021-02-24 Nick Clifton <nickc@redhat.com>
1273
1274 PR 27285
1275 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
1276 when adding together the section sizes.
1277
1278 2021-02-24 Nick Clifton <nickc@redhat.com>
1279
1280 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
1281 build notes.
1282 * readelf.c (print_gnu_build_attribute_description): Likewise.
1283
1284 2021-02-24 Alan Modra <amodra@gmail.com>
1285 Siddhesh Poyarekar <siddhesh@gotplt.org>
1286
1287 PR 27456
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
1300 preserve_dates.
1301
1302 2021-02-24 Alan Modra <amodra@gmail.com>
1303
1304 PR 27456
1305 * rename.c: Tidy throughout.
1306 (smart_rename): Always copy. Remove windows specific code.
1307
1308 2021-02-20 Alan Modra <amodra@gmail.com>
1309
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.
1313
1314 2021-02-19 Alan Modra <amodra@gmail.com>
1315
1316 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
1317
1318 2021-02-19 Siddhesh Poyarekar <siddhesh@gotplt.org>
1319
1320 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
1321 SMART_RENAME.
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.
1331
1332 2021-02-18 Nick Clifton <nickc@redhat.com>
1333
1334 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
1335 address that is higher than the end address.
1336
1337 2021-02-17 Alan Modra <amodra@gmail.com>
1338
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.
1348
1349 2021-02-16 Jan Beulich <jbeulich@suse.com>
1350
1351 * dwarf.c (process_debug_info): Initialize "dwo_id".
1352
1353 2021-02-15 Alan Modra <amodra@gmail.com>
1354
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
1361 section flags.
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.
1365
1366 2021-02-15 Alan Modra <amodra@gmail.com>
1367
1368 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
1369 * testsuite/binutils-all/objdump.exp: Likewise.
1370
1371 2021-02-14 Alan Modra <amodra@gmail.com>
1372
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.
1377
1378 2021-02-14 Alan Modra <amodra@gmail.com>
1379
1380 * Makefile.in: Regenerate.
1381 * doc/Makefile.in: Regenerate.
1382
1383 2021-02-13 Mike Frysinger <vapier@gentoo.org>
1384
1385 * aclocal.m4: Regenerate.
1386
1387 2021-02-12 Nick Clifton <nickc@redhat.com>
1388
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
1405 readelf.
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.
1416
1417 2021-02-12 Alan Modra <amodra@gmail.com>
1418
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
1422 "unresolved".
1423 * testsuite/binutils-all/ar.exp: Likewise.
1424 * testsuite/binutils-all/compress.exp: Likewise.
1425 * testsuite/binutils-all/readelf.exp: Likewise.
1426
1427 2021-02-12 Alan Modra <amodra@gmail.com>
1428
1429 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
1430 "c" with "ccc" labels.
1431
1432 2021-02-12 Tom de Vries <tdevries@suse.de>
1433
1434 * dwarf.h (debug_info): Fix typo in comment.
1435
1436 2021-02-12 Tom de Vries <tdevries@suse.de>
1437
1438 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
1439 entries.
1440
1441 2021-02-12 Tom de Vries <tdevries@suse.de>
1442
1443 * dwarf.c (process_debug_info): Print DWO ID.
1444
1445 2021-02-11 Alan Modra <amodra@gmail.com>
1446
1447 PR 27290
1448 PR 27293
1449 PR 27295
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.
1456 Sanity check note.
1457 (elf32_avr_dump_mem_usage): Adjust to suit.
1458
1459 2021-02-10 Tom de Vries <tdevries@suse.de>
1460
1461 PR binutils/27391
1462 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
1463
1464 2021-02-10 Tom de Vries <tdevries@suse.de>
1465
1466 PR binutils/27371
1467 * dwarf.c (display_debug_ranges): Filter range lists according to
1468 section.
1469
1470 2021-02-09 Tom de Vries <tdevries@suse.de>
1471
1472 PR binutils/27370
1473 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
1474
1475 2021-02-09 Tom de Vries <tdevries@suse.de>
1476
1477 PR binutils/27386
1478 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
1479 DW_UT_split_compile.
1480
1481 2021-02-09 Alan Modra <amodra@gmail.com>
1482
1483 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
1484 symbianelf.
1485
1486 2021-02-07 Alan Modra <amodra@gmail.com>
1487
1488 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
1489 uninitialised on invalid input.
1490
1491 2021-02-06 Alan Modra <amodra@gmail.com>
1492
1493 PR 27349
1494 * rename.c (smart_rename): Test for existence and type of output
1495 file with lstat.
1496
1497 2021-02-05 Nick Clifton <nickc@redhat.com>
1498
1499 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
1500
1501 2021-02-05 Eli Zaretskii <eliz@gnu.org>
1502
1503 PR 27252
1504 * elfedit.c (check_file):
1505 * bucomm.c (get_file_size): Fix typos in comments.
1506
1507 2021-02-05 Alan Modra <amodra@gmail.com>
1508
1509 PR 27345
1510 * arsup.c (ar_save): Use stat rather than lstat.
1511
1512 2021-02-03 Alan Modra <amodra@gmail.com>
1513
1514 PR 27270
1515 PR 27284
1516 PR 26945
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
1524 of _WIN32 ifdef.
1525 * objcopy.c: Don't include libbfd.h.
1526 (copy_file): Use bfd_stat.
1527
1528 2021-02-02 H.J. Lu <hongjiu.lu@intel.com>
1529
1530 PR binutils/27281
1531 * readelf.c (process_section_headers): Add 'R' and 'D' to
1532 "Key to Flags:".
1533 * testsuite/binutils-all/retain1a.d: Updated.
1534
1535 2021-01-30 Nick Clifton <nickc@redhat.com>
1536
1537 * README-how-to-make-a-release: Small updates after the 2.35.2
1538 release.
1539
1540 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1541
1542 PR 4356
1543 * windres.c (quot): Use double quotes to protect strings on
1544 Windows platforms.
1545
1546 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1547
1548 PR 27252
1549 * bucomm.c (get_file_size): Add code to handle /dev/null on
1550 Windows systems.
1551 * elfedit.c (check_file): Likewise.
1552
1553 2021-01-27 Nick Clifton <nickc@redhat.com>
1554
1555 * objcopy.c (copy_main): Remove conditional control of the calls
1556 to free, simplifying the code and making it easier to detect
1557 typos.
1558
1559 2021-01-26 Frederic Cambus <fred@statdns.com>
1560
1561 * objcopy.c (copy_main): Fix a double free happening when both
1562 --localize-symbols and --globalize-symbols options are invoked
1563 together.
1564
1565 2021-01-24 Nick Clifton <nickc@redhat.com>
1566
1567 * README-how-to-make-a-release: Minor updates after the 2.36 release.
1568
1569 2021-01-16 Alan Modra <amodra@gmail.com>
1570
1571 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
1572
1573 2021-01-15 Alan Modra <amodra@gmail.com>
1574
1575 PR 26539
1576 * readelf.c (uncompress_section_contents): Always call inflateEnd.
1577
1578 2021-01-14 Alexandre Oliva <oliva@gnu.org>
1579
1580 * MAINTAINERS: Update my email address.
1581
1582 2021-01-14 Nick Clifton <nickc@redhat.com>
1583
1584 * po/sv.po: Updated Swedish translation.
1585
1586 2021-01-13 Alan Modra <amodra@gmail.com>
1587
1588 * Makefile.in: Regenerate.
1589 * doc/Makefile.in: Regenerate.
1590
1591 2021-01-13 Zebediah Figura <z.figura12@gmail.com>
1592
1593 PR 27037
1594 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
1595 and before exit.
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.
1599
1600 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1601
1602 PR binutils/26792
1603 * configure.ac: Use GNU_MAKE_JOBSERVER.
1604 * aclocal.m4: Regenerated.
1605 * configure: Likewise.
1606
1607 2021-01-12 Nick Clifton <nickc@redhat.com>
1608
1609 * po/fr.po: Updated French translation.
1610
1611 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1612
1613 PR ld/27173
1614 * configure: Regenerated.
1615
1616 2021-01-11 Nick Clifton <nickc@redhat.com>
1617
1618 * po/pt.po: Updated Portuguese translation.
1619 * po/sr.po: Updated Serbian translation.
1620 * po/uk.po: Updated Ukranian translation.
1621
1622 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1623
1624 * configure: Regenerated.
1625
1626 2021-01-09 Nick Clifton <nickc@redhat.com>
1627
1628 * configure: Regenerate.
1629 * po/binutils.pot: Regenerate.
1630
1631 2021-01-09 Nick Clifton <nickc@redhat.com>
1632
1633 * 2.36 release branch crated.
1634 * README-how-to-make-a-release: Add note about updating Makefiles
1635 and libtool files.
1636 * BRANCHES: Add binutils-2.36-branch.
1637
1638 2021-01-09 Alan Modra <amodra@gmail.com>
1639
1640 * configure: Regenerate.
1641
1642 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1643
1644 * configure: Regenerate.
1645
1646 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1647
1648 PR 27109
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.
1661
1662 2021-01-06 Reuben Thomas <rrt@sc3d.org>
1663
1664 * binutils/readelf.c: Correct grammar in comment.
1665
1666 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1667
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
1671 in warning.
1672 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
1673
1674 2021-01-01 Alan Modra <amodra@gmail.com>
1675
1676 Update year range in copyright notice of all files.
1677
1678 For older changes see ChangeLog-2020
1679 \f
1680 Copyright (C) 2021-2022 Free Software Foundation, Inc.
1681
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.
1685
1686 Local Variables:
1687 mode: change-log
1688 left-margin: 8
1689 fill-column: 74
1690 version-control: never
1691 End: