Revert previous delta to debug.c. Replace with patch to reject indirect types that...
[binutils-gdb.git] / binutils / ChangeLog
1 2022-01-07 Pavel Mayorov <pmayorov@cloudlinux.com>
2
3 PR 28718
4 * dwarf.c: Revert previous delta.
5 (debug_get_real_type): Reject indirect types that point to
6 indirect types.
7 (debug_get_type_name, debug_get_type_size, debug_write_type):
8 Likewise.
9
10 2022-01-06 Nick Clifton <nickc@redhat.com>
11
12 * debug.c (debug_write_type): Allow for malicious recursion via
13 indirect debug types.
14
15 2022-01-04 Nick Clifton <nickc@redhat.com>
16
17 PR 28716
18 * dwarf.c (load_build_id_debug_file): Remove spurious printf.
19
20 2021-12-16 Nick Clifton <nickc@redhat.com>
21
22 PR 28697
23 * dwarf.c (load_build_id_debug_file): New function.
24 (try_build_id_prefix): New function.
25 (check_for_and_load_links): Call load_build_id_debug_file.
26 (debug_displays): Add entry for .note.gnu.build-id.
27 * dwarf.h (enum dwarf_section_display_enum): Add
28 note_gnu_build_id.
29 * testsuite/binutils-all/debuginfod.exp (test_fetch_debuglink):
30 Fix regexp for loads via debuglink section.
31
32 2021-12-03 Chenghua Xu <xuchenghua@loongson.cn>
33
34 * MAINTAINERS: Add myself and Zhensong Liu
35 as the LoongArch maintainer.
36
37 2021-12-02 Nick Clifton <nickc@redhat.com>
38
39 PR 28645
40 * dwarf.c (process_cu_tu_index): Add test for overruning section
41 whilst processing slots.
42
43 2021-11-30 Roland McGrath <mcgrathr@google.com>
44
45 * doc/local.mk: Give each man page target its missing dependency on
46 doc/$(am__dirstamp).
47
48 2021-11-30 Nick Clifton <nickc@redhat.com>
49
50 * dwarf.c (find_debug_info_for_offset): Use dwarf_vma type for
51 offsets, sizes and ranges.
52 (display_loc_list): Likewise. Also use print_dwarf_vma to print
53 the offset.
54 (display_loclists_list): Likewise.
55 (display_loc_list_dwo): Likewise.
56 (display_debug_str): Likewise.
57 (display_debug_aranges): Likewise.
58 (display_debug_ranges_list): Likewise.
59 (display_debug_rnglists_list): Likewise.
60 (display_debug_ranges): Likewise.
61
62 2021-11-29 Nick Clifton <nickc@redhat.com>
63
64 PR 28632
65 * strings.c (usage): Update desciption of -n option.
66 * doc/binutils.texi: Likewise.
67
68 2021-11-24 Nick Clifton <nickc@redhat.com>
69
70 PR 28564
71 * sysdump.c (getCHARS): Check for an out of bounds read.
72
73 2021-11-16 Fangrui Song <maskray@google.com>
74
75 * readelf.c (enum relocation_type): New.
76 (slurp_relr_relocs): New.
77 (dump_relocations): Change is_rela to rel_type.
78 Dump RELR.
79 (dynamic_relocations): Add DT_RELR.
80 (process_relocs): Check SHT_RELR and DT_RELR.
81 (process_dynamic_section): Store into dynamic_info for
82 DT_RELR/DT_RELRENT/DT_RELRSZ.
83
84 2021-11-09 Nick Clifton <nickc@redhat.com>
85
86 * nm.c: Add --unicode option to control how unicode characters are
87 handled.
88 * objdump.c: Likewise.
89 * readelf.c: Likewise.
90 * strings.c: Likewise.
91 * binutils.texi: Document the new feature.
92 * NEWS: Document the new feature.
93 * testsuite/binutils-all/unicode.exp: New file.
94 * testsuite/binutils-all/nm.hex.unicode
95 * testsuite/binutils-all/strings.escape.unicode
96 * testsuite/binutils-all/objdump.highlight.unicode
97 * testsuite/binutils-all/readelf.invalid.unicode
98
99 2021-11-03 Tom Tromey <tromey@adacore.com>
100
101 * dwarf.c (display_debug_loc): Use section name in warnings.
102
103 2021-10-25 Nick Alcock <nick.alcock@oracle.com>
104
105 * objdump.c (usage): --ctf now has an optional argument.
106 (main): Adjust accordingly.
107 (dump_ctf): Default it.
108 * doc/ctf.options.texi: Adjust.
109
110 2021-10-25 Nick Alcock <nick.alcock@oracle.com>
111
112 * objdump.c (usage): --ctf-parent now takes a name, not a section.
113 (dump_ctf): Don't open a separate section; use the parent_name in
114 ctf_dict_open instead. Use ctf_archive_next, not ctf_archive_iter,
115 so we can pass down a member count.
116 (dump_ctf_archive_member): Add the member count; don't return
117 anything. Import parents into children no matter what the
118 parent's name, while still avoiding displaying the header for the
119 common parent name of ".ctf".
120 * readelf.c (usage): Adjust similarly.
121 (dump_section_as_ctf): Likewise.
122 (dump_ctf_archive_member): Likewise. Never stop iterating over
123 archive members, even if ctf_dump of one member fails.
124 * doc/ctf.options.texi: Adjust.
125
126 2021-10-19 Nick Clifton <nickc@redhat.com>
127
128 * nm.c (filter_symbols): Test for a NULL name before checking to
129 see if the symbol is __gnu_lto_slim.
130 * objcopy.c (filter_symbols): Likewise.
131
132 2021-09-30 Nick Clifton <nickc@redhat.com>
133
134 * objcopy.c (filter_symbols): Fail if attempting to dredefine
135 symbols in an LTO object file.
136
137 2021-09-27 Nick Alcock <nick.alcock@oracle.com>
138
139 * configure: Regenerate.
140
141 2021-09-20 Andrew Burgess <andrew.burgess@embecosm.com>
142
143 * testsuite/binutils-all/riscv/riscv.exp: New file.
144 * testsuite/binutils-all/riscv/unknown.d: New file.
145 * testsuite/binutils-all/riscv/unknown.s: New file.
146
147 2021-09-07 Luis Machado <luis.machado@linaro.org>
148
149 Revert: [AArch64] MTE corefile support
150
151 2021-05-21 Luis Machado <luis.machado@linaro.org>
152
153 * readelf.c (get_note_type): Handle NT_MEMTAG note types.
154
155 2021-08-11 Nick Clifton <nickc@redhat.com>
156
157 * po/pt.po: Updated Portuguese translation.
158
159 2021-08-10 Nick Clifton <nickc@redhat.com>
160
161 * po/sr.po: Updated Serbian translation.
162
163 2021-07-16 Nick Clifton <nickc@redhat.com>
164
165 * po/sv.po: Updated Swedish translation.
166
167 2021-07-14 Clément Chigot <clement.chigot@atos.net>
168
169 * dwarf.h (struct dwarf_section): Add XCOFF name.
170 * dwarf.c (struct dwarf_section_display): Update.
171 * objdump.c (load_debug_section): Add XCOFF name handler.
172 (dump_dwarf_section): Likewise.
173
174 2021-07-12 Nick Clifton <nickc@redhat.com>
175
176 * po/fr.po: Updated French translation.
177
178 2021-07-10 Alan Modra <amodra@gmail.com>
179
180 PR 28069
181 * dwarf.c (display_discr_list): Remove assertions. Delete "end"
182 parameter, use initial "data" pointer as the end. Formatting.
183 Don't count down bytes as they are read.
184 (read_and_display_attr_value): Adjust display_discr_list call.
185 (read_and_print_leb128): Don't pass __FILE__ and __LINE__ to
186 report_leb_status.
187 * dwarf.h (report_leb_status): Don't report file and line
188 numbers. Delete file and lnum parameters,
189 (READ_ULEB, READ_SLEB): Adjust.
190
191 2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
192
193 * configure.ac: Check for strnlen declaration.
194 * configure, config.in: Regenerate.
195
196 2021-07-05 Alan Modra <amodra@gmail.com>
197
198 PR 28047
199 * dwarf.c (get_type_abbrev_from_form): Add cu_end parameter.
200 Check DW_FORM_ref1 etc. arg against cu_end rather than end of
201 section. Adjust all callers.
202
203 2021-07-03 Nick Clifton <nickc@redhat.com>
204
205 * configure: Regenerate.
206 * po/opcodes.pot: Regenerate.
207 * README-how-to-make-a-release: Update.
208
209 2021-07-03 Nick Clifton <nickc@redhat.com>
210
211 * 2.37 release branch created.
212
213 2021-07-02 Alan Modra <amodra@gmail.com>
214
215 PR 28048
216 * dwarf.c (get_type_signedness): Don't run off end of buffer
217 printing DW_FORM_string attribute.
218
219 2021-07-01 Nick Clifton <nickc@redhat.com>
220
221 PR 28029
222 * testsuite/binutils-all/debuginfod.exp: Replace -wK with -wk.
223
224 2021-07-01 Andrei Homescu <ah@immunant.com>
225
226 * readelf.c (process_archive): Reset file position to the
227 beginning when calling process_object for thin archive members.
228 * testsuite/binutils-all/readelf.exp: Add test.
229 * testsuite/binutils-all/readelf.h.thin: New file.
230
231 2021-06-30 Tom Tromey <tom@tromey.com>
232
233 * dwarf.c (read_and_display_attr_value): Handle
234 DW_FORM_implicit_const.
235
236 2021-06-30 Richard Henderson <richard.henderson@linaro.org>
237
238 * dwarf.c (display_debug_frames): Both DW_CFA_def_cfa_sf
239 and DW_CFA_def_cfa_offset_sf have a signed offset.
240
241 2021-06-19 Alan Modra <amodra@gmail.com>
242
243 * dwarf.c (display_debug_lines_decoded): Use memcpy rather than
244 strncpy when trimming file name length to MAX_FILENAME_LENGTH.
245 Don't make an unnecessary copy when length is good.
246
247 2021-06-18 H.J. Lu <hongjiu.lu@intel.com>
248
249 * readelf.c (print_gnu_property_note): Handle
250 GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI,
251 GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI.
252
253 2021-06-15 Nick Clifton <nickc@redhat.com>
254
255 * readelf.c (get_note_type): Add support for NT_GO_BUILDID.
256
257 2021-06-15 Alan Modra <amodra@gmail.com>
258
259 * readelf.c (locate_dynamic_section, is_pie): New functions.
260 (get_file_type): Replace e_type parameter with filedata. Call
261 is_pie for ET_DYN. Update all callers.
262 (process_program_headers): Use local variables dynamic_addr and
263 dynamic_size, updating filedata on exit from function. Set
264 dynamic_size of 1 to indicate no dynamic section or segment.
265 Update tests of dynamic_size throughout.
266 * testsuite/binutils-all/x86-64/pr27708.dump: Update expected output.
267
268 2021-06-14 Eric Botcazou <ebotcazou@adacore.com>
269
270 * dwarf.c (struct abbrev_attr): Change type of implicit_const.
271 (add_abbrev_attr): Likewise.
272 (process_abbrev_set): Likewise.
273 (display_debug_abbrev): Adjust to above change.
274
275 2021-06-12 Alan Modra <amodra@gmail.com>
276
277 * readelf.c (process_file_header): Don't clear section_headers.
278
279 2021-06-12 Alan Modra <amodra@gmail.com>
280
281 * readelf.c (get_section_headers): Don't test e_shoff here, leave
282 that to get_32bit_section_headers or get_64bit_section_headers.
283 (process_object): Throw away section header read to print file
284 header extension.
285
286 2021-06-11 Alan Modra <amodra@gmail.com>
287
288 * readelf.c (struct filedata): Move archive_file_offset and
289 archive_file_size earlier.
290 (free_filedata): Clear using memset.
291
292 2021-06-11 Alan Modra <amodra@gmail.com>
293
294 * readelf.c (GET_ELF_SYMBOLS): Delete. Replace with..
295 (get_elf_symbols): ..this new function throughout.
296 (get_32bit_section_headers): Don't free section_headers.
297 (get_64bit_section_headers): Likewise.
298 (get_section_headers): New function, use throughout in place of
299 32bit and 64bit variants.
300 (get_dynamic_section): Similarly.
301 (process_section_headers): Don't free filedata memory here.
302 (get_file_header): Don't get section headers here..
303 (process_object): ..Read them here instead. Don't exit without
304 freeing filedata memory.
305
306 2021-06-09 Nick Clifton <nickc@redhat.com>
307
308 * MAINTAINERS: Remove Daniel Jacobwitz from the maintainers list.
309
310 2021-06-07 Jan Beulich <jbeulich@suse.com>
311
312 * dwarf.c (display_debug_aranges): Add u suffix to constant.
313
314 2021-05-29 Alan Modra <amodra@gmail.com>
315
316 * objdump (usage): Add missing \n.
317
318 2021-05-29 Alan Modra <amodra@gmail.com>
319
320 * readelf.c (parse_args): Call dwarf_select_sections_all on
321 --debug-dump without optarg.
322 (usage): Associate -w and --debug-dump options closely.
323 Split up help message. Remove extraneous blank lines around
324 ctf help.
325 * objdump.c (usage): Similarly.
326
327 2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
328
329 * testsuite/binutils-all/mips/mips-xpa-virt-1.d: Correct CFC0
330 operand disassembly.
331 * testsuite/binutils-all/mips/mips-xpa-virt-3.d: Likewise.
332
333 2021-05-29 Maciej W. Rozycki <macro@orcam.me.uk>
334
335 * testsuite/binutils-all/mips/mips-xpa-virt-1.d: Use `mips:3000'
336 machine for disassembly.
337 * testsuite/binutils-all/mips/mips-xpa-virt-2.d: Likewise.
338 * testsuite/binutils-all/mips/mips-xpa-virt-3.d: Likewise.
339 * testsuite/binutils-all/mips/mips-xpa-virt-4.d: Likewise.
340
341 2021-05-28 H.J. Lu <hongjiu.lu@intel.com>
342
343 PR ld/27905
344 * readelf.c (decode_x86_feature_2): Revert commit 50c95a739c9.
345
346 2021-05-27 Alan Modra <amodra@gmail.com>
347
348 * readelf (usage): Order -w letters to match --debug-dump= and
349 move common '=' for --debug-dump out of brackets.
350
351 2021-05-26 H.J. Lu <hongjiu.lu@intel.com>
352
353 PR ld/27905
354 * readelf.c (decode_x86_feature_2): Support
355 GNU_PROPERTY_X86_FEATURE_2_CODE16.
356
357 2021-05-23 Tiezhu Yang <yangtiezhu@loongson.cn>
358
359 * readelf.c (get_machine_name): Change Loongson Loongarch to
360 LoongArch.
361
362 2021-05-21 Luis Machado <luis.machado@linaro.org>
363
364 * readelf.c (get_note_type): Add missing NT_ARM_* entries.
365
366 2021-05-21 Luis Machado <luis.machado@linaro.org>
367
368 * readelf.c (get_note_type): Handle NT_MEMTAG note types.
369
370 2021-05-19 Eli Schwartz <eschwartz@archlinux.org>
371
372 * dwarf.c (ENABLE_CHECKING): Define to 0 if not previously set.
373
374 2021-05-19 Alan Modra <amodra@gmail.com>
375
376 PR 27884
377 * dwarf.c (get_type_abbrev_from_form): Replace cu_offset_return
378 param with map_return, and return map for DW_FORM_ref_addr.
379 (get_type_signedness): Adjust calls to get_type_abbrev_from_form.
380 Pass returned cu map start and end to recursive call.
381 (read_and_display_attr_value): Similarly.
382
383 2021-05-19 Alan Modra <amodra@gmail.com>
384
385 PR 27879
386 * sysdump.c (getBARRAY): Sanity check size against max.
387 (getINT): Avoid UB shift left.
388
389 2021-05-15 Alan Modra <amodra@gmail.com>
390
391 * dwarf.c (process_cu_tu_index): Avoid pointer UB. Use _mul_overflow.
392 Delete dead code.
393
394 2021-05-15 Alan Modra <amodra@gmail.com>
395
396 * dwarf.c (display_gdb_index): Avoid pointer UB and overflow in
397 length calculations.
398
399 2021-05-15 Alan Modra <amodra@gmail.com>
400
401 * dwarf.c (display_debug_names): Complain when header length is
402 too small. Avoid pointer UB. Sanity check augmentation string,
403 CU table, TU table and foreign TU table sizes.
404
405 2021-05-15 Alan Modra <amodra@gmail.com>
406
407 * dwarf.c (display_debug_frames): Delete initial_length_size.
408 Avoid pointer UB. Constrain data reads to length given in header.
409 Sanity check cie header length. Only skip up to next FDE on
410 finding augmentation data too long.
411
412 2021-05-15 Alan Modra <amodra@gmail.com>
413
414 * dwarf.c (read_cie): Add more sanity checks to ensure data
415 pointer is not bumped past end.
416
417 2021-05-15 Alan Modra <amodra@gmail.com>
418
419 * dwarf.c (display_debug_ranges): Delete initial_length_size.
420 Correct fallback size calculated on finding a reloc. Constrain
421 data reads to length given in header. Avoid pointer UB.
422
423 2021-05-15 Alan Modra <amodra@gmail.com>
424
425 * dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
426
427 2021-05-15 Alan Modra <amodra@gmail.com>
428
429 * dwarf.c (display_debug_str_offsets): Constrain reads to length
430 given in header.
431
432 2021-05-15 Alan Modra <amodra@gmail.com>
433
434 * dwarf.c (display_debug_aranges): Delete initial_length_size.
435 Use end_ranges to constrain data reads to header length. Avoid
436 pointer UB.
437
438 2021-05-15 Alan Modra <amodra@gmail.com>
439
440 * dwarf.c (display_loc_list): Avoid pointer UB. Correct check
441 before reading uleb length. Warn on excess length.
442
443 2021-05-15 Alan Modra <amodra@gmail.com>
444
445 * dwarf.c (display_debug_macro): Print strings that might not
446 be zero terminated with %*s. Don't bump curr if unterminated.
447
448 2021-05-15 Alan Modra <amodra@gmail.com>
449
450 * dwarf.c (get_line_filename_and_dirname): Delete initial_length_size.
451 Simplify length sanity check, and check for too small lengths.
452 Constrain data reads to header length. Avoid pointer UB.
453
454 2021-05-15 Alan Modra <amodra@gmail.com>
455
456 * dwarf.c (display_debug_macinfo): Print strings that might not
457 be zero terminated with %*s. Don't bump curr if unterminated.
458
459 2021-05-15 Alan Modra <amodra@gmail.com>
460
461 * dwarf.c (display_debug_pubnames_worker): Delete initial_length_size.
462 Simplify length check. Constrain reads to length given by header.
463
464 2021-05-15 Alan Modra <amodra@gmail.com>
465
466 * dwarf.c (display_debug_lines_decoded): Don't use strnlen when
467 we have already checked for NUL termination.
468
469 2021-05-15 Alan Modra <amodra@gmail.com>
470
471 * dwarf.c (read_debug_line_header): Delete initial_length_size.
472 Avoid pointer UB. Keep within length specified by header.
473 Delete dead code.
474
475 2021-05-15 Alan Modra <amodra@gmail.com>
476
477 * dwarf.c (process_debug_info): Always do the first CU length
478 scan for sanity checks. Remove initial_length_size var and
479 instead calculate end_cu. Use end_cu to limit data reads.
480 Delete now dead code checking length.
481
482 2021-05-15 Alan Modra <amodra@gmail.com>
483
484 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Assert only when ENABLE_CHECKING.
485
486 2021-05-15 Alan Modra <amodra@gmail.com>
487
488 * bucomm.h (_mul_overflow): Define.
489 * dwarf.c (get_encoded_value): Avoid pointer UB.
490
491 2021-05-13 Alan Modra <amodra@gmail.com>
492
493 PR 27861
494 * dwarf.c (display_debug_str_offsets): Sanity check dwarf5
495 header length.
496
497 2021-05-13 Alan Modra <amodra@gmail.com>
498
499 PR 27860
500 * dwarf.c (display_debug_frames): Sanity check cie_off before
501 attempting to read cie.
502
503 2021-05-12 Alan Modra <amodra@gmail.com>
504
505 * dwarf.c (process_extended_line_op): Don't bump data pointer past
506 end when strnlen doesn't find string terminator.
507 (decode_location_expression): Remove dead code.
508 (skip_attr_bytes): Remove const from end param. Ensure data
509 pointer doesn't pass end.
510 (get_type_signedness): Remove const from end param.
511 (read_and_display_attr_value): Ensure data pointer doesn't pass end.
512 (display_debug_lines_raw, display_debug_lines_decoded): Likewise.
513 (display_debug_pubnames_worker): Likewise.
514 (display_debug_pubnames_worker): Use SAFE_BYTE_GET_AND INC rather
515 than blindly incrementing data pointer.
516 (display_debug_addr, display_debug_str_offsets): Likewise. Don't
517 compare pointers, compare lengths.
518
519 2021-05-12 Alan Modra <amodra@gmail.com>
520
521 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Define.
522 (SAFE_BYTE_GET, SAFE_BYTE_GET_AND_INC): Define using the above.
523 (SAFE_SIGNED_BYTE_GET, SAFE_SIGNED_BYTE_GET_AND_INC): Likewise.
524 (display_discr_list): Use SAFE_BYTE_GET_AND_INC rather than
525 SAFE_BYTE_GET followed by increment.
526 (process_debug_info): Likewise, and test bytes remaining before
527 incrementing section_begin rather than using pointer comparison.
528 (display_debug_names): Pass lvalue as SAFE_BYTE_GET PTR.
529 (process_cu_tu_index): Likewise for SAFE_BYTE_GET_AND_INC.
530
531 2021-05-12 Alan Modra <amodra@gmail.com>
532
533 * dwarf.c (dwarf_vmatoa64, SAFE_BYTE_GET64, add64): Delete.
534 (skip_attr_bytes): Replace use of SAFE_BYTE_GET64 with
535 SAFE_BYTE_GET_AND_INC.
536 (read_and_display_attr_value): Likewise. Print using dwarf_vmatoa.
537 (process_debug_info, process_cu_tu_index): Likewise.
538 * elfcomm.c (byte_put, byte_put_little_endian, byte_put_big_endian),
539 (byte_get, byte_get_little_endian, byte_get_big_endian),
540 (byte_get_signed): Make size param unsigned. Remove code dealing
541 with 4-byte elf_vma.
542 (byte_get_64): Delete.
543 * elfcomm.h (byte_put, byte_put_little_endian, byte_put_big_endian),
544 (byte_get, byte_get_little_endian, byte_get_big_endian),
545 (byte_get_signed): Update prototypes.
546 (byte_get_64): Delete.
547
548 2021-05-12 Alan Modra <amodra@gmail.com>
549
550 PR 27836
551 * dwarf.c (display_debug_frames): Don't compare pointers derived
552 from user input. Test offset against bounds instead.
553
554 2021-05-12 Alan Modra <amodra@gmail.com>
555
556 PR 27853
557 * dwarf.c (display_formatted_table): Test for data >= end rather
558 than data == end.
559 (process_extended_line_op): Likewise.
560 (display_debug_lines_raw): Likewise.
561 (display_debug_lines_decoded): Likewise.
562
563 2021-05-12 Alan Modra <amodra@gmail.com>
564
565 PR 27849
566 * dwarf.c (fetch_indexed_string): Correct length sanity checks.
567 Sanity check section size for version and padding too. Correct
568 index sanity check. Handle multiple tables in .debug_str_offsets.
569
570 2021-05-11 Hans-Peter Nilsson <hp@axis.com>
571
572 * dwarf.c (process_abbrev_set): Properly parenthesize before
573 casting to unsigned long.
574
575 2021-05-11 Alan Modra <amodra@gmail.com>
576
577 PR 27845
578 * dwarf.c (process_abbrev_set): Replace start and end parameters
579 with section, abbrev_base, abbrev_size, abbrev_offset. Update
580 all callers. Sanity check parameters correctly and emit warnings
581 here rather than..
582 (process_debug_info): ..here.
583
584 2021-05-10 Thomas Wolff <towo@towo.net>
585
586 PR 4356
587 PR 26865
588 PR 27594
589 * windres.c (quot): Revert previous delta. Do not use double
590 quotes when spaces are detected in options.
591 * doc/binutils.texi (windres): Remove suggestion that the
592 --preprocessor option can take arguments.
593
594 2021-05-10 Alan Modra <amodra@gmail.com>
595
596 * dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
597 END rather than adding amount to PTR.
598 (SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise.
599
600 2021-05-09 Alan Modra <amodra@gmail.com>
601
602 * objcopy.c (eq_string): Delete.
603 (create_symbol_htab): Use htab_eq_string.
604
605 2021-05-08 Mike Frysinger <vapier@gentoo.org>
606
607 * README-how-to-make-a-release: Update html & pdf entries.
608
609 2021-05-08 Mike Frysinger <vapier@gentoo.org>
610
611 * doc/Makefile.am (html-local, binutils/index.html): New targets.
612 * doc/Makefile.in: Regenerate.
613
614 2021-05-08 Mike Frysinger <vapier@gentoo.org>
615
616 * doc/Makefile.am (AM_MAKEINFOFLAGS): Add --no-split.
617 * doc/Makefile.in: Regenerate.
618
619 2021-05-07 Nick Clifton <nickc@redhat.com>
620
621 * readelf.c (no_processor_specific_unwind): New function.
622 (process_unwind): Use no_processor_specific_unwind for X86
623 targets.
624
625 2021-05-07 Michael Forney <mforney@mforney.org>
626
627 * dwarf.c: Don't omit second operand of '?' operator.
628
629 2021-04-30 Nick Clifton <nickc@redhat.com>
630
631 PR 27796
632 * dwarf.c (load_debug_sup_file): Allocate memory for filename in
633 .debug_sup section.
634
635 2021-04-29 Nick Clifton <nickc@redhat.com>
636
637 PR 27594
638 * doc/binutils.texi (windres): Correct the description of the
639 default value of the --preprocessor argument.
640
641 2021-04-27 Nick Clifton <nickc@redhat.com>
642
643 PR 27779
644 * dwarf.c (parse_gnu_debuglink): Reject empty names.
645 (parse_gnu_debugaltlink): Likewise.
646
647 2021-04-22 Clément Chigot <clement.chigot@atos.net>
648
649 * od-xcoff.c (dump_xcoff32_symbols): Adapt to new
650 aux structures.
651
652 2021-04-21 Nick Lott <nick.lott@gmail.com>
653
654 PR 27672
655 * readelf.c (sym_base): New variable.
656 (enum print_mode): Add more modes.
657 (print_vma): Add suport for new modes.
658 (options): Add sym-base.
659 (usage): Add sym-base.
660 (parse_args): Add support for --sym-base.
661 (print_dynamic_symbol_size): New function.
662 (print_dynamic_symbol): Use new function.
663 * doc/binutils.texi: Document the new feature.
664 * NEWS: Mention the new feature.
665
666 2021-04-21 Nick Clifton <nickc@redhat.com>
667
668 * testsuite/binutils-all/mips/global-local-symtab-sort-n64t.d:
669 Adjust expected output to allow for named section symbols.
670 * testsuite/binutils-all/mips/global-local-symtab-sort-o32t.d:
671 Likewise.
672 * testsuite/binutils-all/readelf.s-64: Likewise.
673 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
674 * testsuite/binutils-all/readelf.ss-tmips: Likewise.
675 * testsuite/binutils-all/readelf.ss-unused: Likewise.
676
677 2021-04-21 Luo Longjun <luolongjun@huawei.com>
678
679 * readelf.c (print_dynamic_symbol): Print the section name for
680 section symbols without a name of their own.
681
682 2021-04-20 Andreas Krebbel <krebbel@linux.ibm.com>
683
684 * MAINTAINERS: Remove Martin Schwidefsky as s390 maintainer and
685 add him to Past Maintainers.
686 Update my email address.
687
688 2021-04-19 Nick Clifton <nickc@redhat.com>
689
690 PR 21702
691 * arsup.c (ar_addmod): Enable plugin support, if available.
692
693 2021-04-19 Nick Clifton <nickc@redhat.com>
694
695 * rename.c: (get_stat_atime_ns): Add prototype.
696 (get_stat_mtime_ns): Add prototype.
697
698 2021-04-16 Alan Modra <amodra@gmail.com>
699
700 PR 27725
701 * rename.c (get_stat_atime, get_stat_mtime): Make static.
702 (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
703
704 2021-04-15 Pekka Seppänen <pexu@sourceware.mail.kapsi.fi>
705
706 PR 27725
707 * rename.c (get_stat_atime_ns): Add ATTRIBUTE_UNUSED.
708 (get_stat_mtime_ns): Likewise.
709
710 2021-04-15 Alan Modra <amodra@gmail.com>
711
712 PR 27725
713 * configure.ac: Check for sys/time.h and utimensat. Use standard
714 checks for mkstemp and mkdtemp. Whitespace. Check for nanosecond
715 members of struct stat.
716 * rename.c: Prefer sys/time.h for utimes over utime.h for utime.
717 (STAT_TIMESPEC, STAT_TIMESPEC_NS): Define
718 (get_stat_atime_ns, get_stat_mtime_ns): New inline functions.
719 (get_stat_atime, get_stat_mtime): Likewise.
720 (set_times): Choose first available of utimensat, utimes, utime.
721 Use above inline functions to set timespec and timeval values.
722 * configure: Regenerate.
723 * config.in: Regenerate.
724 * testsuite/binutils-all/objcopy.exp (objcopy_test): Add test of
725 file timestamp when --preserve-dates is used.
726
727 2021-04-15 Alan Modra <amodra@gmail.com>
728
729 PR 27456
730 * rename.c (smart_rename): When TO and FROM are equal, just set
731 file timestamp.
732 * objcopy.c (strip_main, copy_main): Always call smart_rename.
733
734 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
735
736 PR binutils/27708
737 * testsuite/binutils-all/x86-64/pr27708.dump: New file.
738 * testsuite/binutils-all/x86-64/pr27708.exe.bz2: Likewise.
739 * testsuite/binutils-all/x86-64/x86-64.exp: Run binutils/27708
740 test.
741
742 2021-04-14 Mark Harmstone <mark@harmstone.com>
743
744 PR 27686
745 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the
746 end of the structure.
747
748 2021-04-14 Frederic Cambus <fred@statdns.com>
749
750 * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
751 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
752
753 2021-04-14 Alan Modra <amodra@gmail.com>
754
755 PR 27716
756 * objdump.c (show_line): Don't limit paths to PATH_MAX.
757 * readelf.c (struct filedata): Change program_interpreter from
758 a char array to a char pointer.
759 (process_program_headers): Sanity check PT_INTERP p_filesz.
760 Malloc program_interpreter using p_filesz and read directly from
761 file.
762 (process_dynamic_section): Check program_interpreter is non-NULL.
763 (free_filedata): New function, split out from..
764 (process_object): ..here.
765 (close_debug_file): Call free_filedata.
766 * sysdep.h: Don't include sys/param.h.
767 (PATH_MAX): Don't define.
768 * configure.ac: Don't check for sys/param.h.
769 * configure: Regenerate.
770
771 2021-04-13 Frederic Cambus <fred@statdns.com>
772
773 * readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
774 check for NT_NETBSD_PAX.
775
776 2021-04-12 Alan Modra <amodra@gmail.com>
777
778 * configure.ac (--enable-checking): Add support.
779 * config.in: Regenerate.
780 * configure: Regenerate.
781
782 2021-04-09 Alan Modra <amodra@gmail.com>
783
784 * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
785 dynrelcount.
786 (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move.
787 (disassemble_section, disassemble_data): Likewise.
788
789 2021-04-06 Alan Modra <amodra@gmail.com>
790
791 * objdump.c (objdump_symbol_at_address): Return asymbol*.
792
793 2021-04-06 Alan Modra <amodra@gmail.com>
794
795 * NEWS: Mention C99 requirement.
796 * README: Likewise. Modernise examples and "Reporting bugs".
797
798 2021-04-05 Alan Modra <amodra@gmail.com>
799
800 * configure.ac: Assume long long is available. Don't test for
801 strings.h, stdlib.h, limits.h, locale.h, or wchar.h. Check
802 inttypes.h, stdint.h, sys/stat.h and sys/types.h. Don't check for
803 strcoll, setlocale, setmode or location of time_t. Don't check
804 for fprintf, getenv, snprintf, strnlen, strstr or vsnprintf decls.
805 (AC_ISC_POSIX, AXC_HEADER_STRING, AC_FUNC_ALLOCA): Don't invoke.
806 * sysdep.h: Don't include alloca-conf.h, include config.h instead.
807 Test HAVE_SYS_TYPES_H and reorder includes. Include limits.h,
808 locale.h, string.h and stdlib.h unconditionally. Remove various
809 fallback declarations. Assume long long is available.
810 * addr2line.c: Don't test HAVE_SETLOCALE.
811 * ar.c: Likewise.
812 * coffdump.c: Likewise.
813 * dlltool.c: Likewise.
814 * dllwrap.c: Likewise.
815 * elfedit.c: Likewise.
816 * nm.c: Likewise.
817 * objcopy.c: Likewise.
818 * objdump.c: Likewise.
819 * readelf.c: Likewise.
820 * size.c: Likewise.
821 * srconv.c: Likewise.
822 * strings.c: Likewise.
823 * sysdump.c: Likewise.
824 * windmc.c: Likewise.
825 * windres.c: Likewise.
826 * bucomm.c: Don't test HAVE_TIME_T_IN_TIME_H or HAVE_TIME_T_IN_TYPES_H.
827 * dwarf.c: Include limits.h unconditionally. Assume long long
828 is available.
829 * nm.c: Don't test HAVE_STRCOLL.
830 * readelf.c: Don't test HAVE_WCHAR_H.
831 * strings.c: Assume long long is available.
832 * syslex.l: Include string.h unconditionally.
833 * aclocal.m4: Regenerate.
834 * config.in: Regenerate.
835 * configure: Regenerate.
836 * Makefile.in: Regenerate.
837 * doc/Makefile.in: Regenerate.
838
839 2021-04-01 Martin Liska <mliska@suse.cz>
840
841 * elfcomm.h (strneq): Remove strneq and use startswith.
842 * readelf.c (ia64_process_unwind): Likewise.
843 (process_note): Likewise.
844
845 2021-04-01 Martin Liska <mliska@suse.cz>
846
847 * dllwrap.c: Use startswith function.
848 * objcopy.c (is_dwo_section): Likewise.
849 (handle_remove_section_option): Likewise.
850 (copy_main): Likewise.
851 * objdump.c (is_significant_symbol_name): Likewise.
852
853 2021-04-01 Martin Liska <mliska@suse.cz>
854
855 * dwarf.c (display_debug_lines_raw): Replace const_strneq with
856 startswith.
857 (display_debug_lines_decoded): Likewise.
858 (display_debug_links): Likewise.
859 * elfcomm.c (setup_archive): Likewise.
860 * elfcomm.h (const_strneq): Likewise.
861 * readelf.c (process_section_headers): Likewise.
862 (slurp_ia64_unwind_table): Likewise.
863 (slurp_hppa_unwind_table): Likewise.
864 (decode_arm_unwind): Likewise.
865 (display_debug_section): Likewise.
866 (process_note): Likewise.
867
868 2021-03-31 Alan Modra <amodra@gmail.com>
869
870 * sysdep.h (POISON_BFD_BOOLEAN): Define.
871 * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
872 * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
873 * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
874 * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
875 * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
876 * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
877 * windmc.c, * windmc.h, * windres.c, * winduni.c,
878 * wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
879 and TRUE with true throughout.
880
881 2021-03-31 Alan Modra <amodra@gmail.com>
882
883 * coffdump.c: Include stdint.h in place of bfd_stdint.h.
884 * dwarf.c: Likewise.
885
886 2021-03-31 Alan Modra <amodra@gmail.com>
887
888 * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
889
890 2021-03-29 Alan Modra <amodra@gmail.com>
891
892 * dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
893 * dwarf.c (read_and_display_attr_value): Likewise.
894 (display_debug_str_offsets): Likewise.
895 * objdump.c (dump_bfd): Likewise.
896 * readelf.c (dump_section_as_strings): Likewise.
897 (dump_section_as_bytes): Likewise.
898
899 2021-03-29 Alan Modra <amodra@gmail.com>
900
901 * objdump.c (process_links): Use type int.
902 * readelf.c (request_dump): Don't increment do_dump, set it.
903 * windint.h (target_is_bigendian): Use type bfd_boolean.
904 * windmc.c (target_is_bigendian): Likewise.
905 * windres.c (target_is_bigendian): Likewise.
906
907 2021-03-22 Martin Liska <mliska@suse.cz>
908
909 * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ
910 with startswith.
911 * emul_aix.c (ar_emul_aix_parse_arg): Likewise.
912 * objcopy.c (is_mergeable_note_section): Likewise.
913 * objdump.c (dump_dwarf_section): Likewise.
914 * prdbg.c (pr_method_type): Likewise.
915 (pr_class_baseclass): Likewise.
916 (tg_class_baseclass): Likewise.
917 * readelf.c (process_lto_symbol_tables): Likewise.
918 * stabs.c (ULLHIGH): Likewise.
919 (parse_stab_argtypes): Likewise.
920 (stab_demangle_function_name): Likewise.
921
922 2021-03-19 H.J. Lu <hongjiu.lu@intel.com>
923
924 * readelf.c (get_machine_name): Add EM_INTELGT.
925
926 2021-03-18 Nick Clifton <nickc@redhat.com>
927
928 PR 27478
929 * readelf.c (dump_section_as_strings): Mention separate filename.
930 (dump_section_as_bytes): Likewise.
931 (dump_section_as_ctf): Likewise.
932 (initialise_dumkps_byname): Only issue a warning for missing
933 sections if processing the main file.
934 (process_section_contents): Only issue a warning for unsumped
935 section numbers in the main file.
936 (initialise_dump_sects): New function. Contains code extracted
937 from ...
938 (process_object): ... here. Also call initialise_dump_sects for
939 separate files.
940
941 2021-03-16 Nick Clifton <nickc@redhat.com>
942
943 PR 27534
944 * readelf.c (display_debug_section): Also retain .debug_addr
945 sections.
946
947 2021-03-16 Nick Clifton <nickc@redhat.com>
948
949 PR 27533
950 * readelf.c (process_section_contents): Only dump debug
951 information for separate files unless process_links is enabled.
952 (process_object): Always call process_section_contents for
953 separate info files.
954
955 2021-03-15 Nick Clifton <nickc@redhat.com>
956
957 PR 27487
958 * nm.c (FORMAT_JUST_SYMBOLS): Define.
959 (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS.
960 (long_options): Add just-symbols.
961 (set_output_format): Add support for just-symbols.
962 (get_print_format): Likewise.
963 (do_not_print_object_filename): New function.
964 (do_not_print_archive_filename): New function.
965 (do_not_print_archive_member): New function.
966 (do_not_print_symbol_filename): New function.
967 (just_print_symbol_name): New function.
968 (main): Handle --just-symbols.
969 * NEWS: Mention the new feature.
970 * doc/binutils.texi: Document the new feature.
971
972 2021-03-12 Clément Chigot <clement.chigot@atos.net>
973
974 * od-xcoff.c: Replace RTB by TRL entry.
975
976 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
977 Andrew Burgess <andrew.burgess@embecosm.com>
978
979 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
980
981 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
982 Andrew Burgess <andrew.burgess@embecosm.com>
983
984 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
985
986 2021-03-05 Nick Clifton <nickc@redhat.com>
987
988 PR 27387
989 * dwarf.c (display_debug_macro): Handle the displaying of
990 DW_MACRO_define_strp and DW_MACRO_undef_strp in v4
991 .debug_macro.dwo sections.
992
993 2021-03-04 Nick Clifton <nickc@redhat.com>
994
995 PR 27478
996 * objdump.c (process_links): New variable.
997 (usage): Add --process-links.
998 (long_options): Likewise.
999 (dump_bfd): Stop processing once the bfd has been loaded unless
1000 this is the main file or process_links has been enabled.
1001 (main): Handle the process-links option.
1002 * readelf.c (process_links): New variable.
1003 (struct filedata): Add is_separate field.
1004 (options): Add --process-links.
1005 (usage): Likewise.
1006 (parse_args): Likewise.
1007 (process_file_header): Include the filename when dumping
1008 information for separate debuginfo files.
1009 (process_program_headers): Likewise.
1010 (process_section_headers): Likewise.
1011 (process_section_groups): Likewise.
1012 (process_relocs): Likewise.
1013 (process_dynamic_section): Likewise.
1014 (process_version_sections): Likewise.
1015 (display_lto_symtab): Likewise.
1016 (process_symbol_table): Likewise.
1017 (process_syminfo): Likewise.
1018 (initialise_dumps_by_name): Likewise.
1019 (process_section_contents): Likewise.
1020 (process_notes_at): Likewise.
1021 (process_notes): Likewise.
1022 (open_file): Add is_separate parameter. Use to initialise the
1023 is_separate field in the filedata structure.
1024 (open_deug): Update call to open_file.
1025 (process_object): Add processing of the contents of separate
1026 debuginfo files, gated by the process_links variable.
1027 (process_archive): Update call to open_file.
1028 (process_file): Initialise the is_separate field in the filedata
1029 structure.
1030 * dwarf.c (load_separate_debug_info_file): Only report the
1031 loading of a separate file if debug links are being dumped.
1032 * objcopy.c (keep_section_symbols): New variable.
1033 (enum command_line_switch): Add OPTION_KEEP_SYMBOLS.
1034 (strip_options): Add keep-section-symbols.
1035 (copy_options): Likewise.
1036 (copy_usage): Likewise.
1037 (strip_usage): Likewise.
1038 (copy_object): Keep section symbols if requested by command line
1039 option.
1040 (strip_main): Handle --keep-section-symbols.
1041 (copy_main): Likewise.
1042 * doc/binutils.texi: Document the new options.
1043 * NEWS: Mention the new features.
1044 * testsuite/binutils-all/compress.exp (test_gnu_debuglink):
1045 Update options passed to objdump. Use diff rather than cmp to
1046 compare the dumped data.
1047 * testsuite/binutils-all/objdump.WK2: Update regexp.
1048 * testsuite/binutils-all/objdump.WK3: Update regexp.
1049 * testsuite/binutils-all/objdump.exp: Use --process-links
1050 instead of --dwarf=follow-links.
1051 * testsuite/binutils-all/readelf.exp (readelf_test): Include
1052 readelf's output in the log when the test fails.
1053 Add the -P option to the -wKis test.
1054 * testsuite/binutils-all/readelf.wKis: Update expected output.
1055
1056 2021-03-03 Alan Modra <amodra@gmail.com>
1057
1058 PR 27493
1059 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
1060 * NEWS: Mention feature.
1061
1062 2021-03-01 H.J. Lu <hongjiu.lu@intel.com>
1063
1064 PR binutils/27486
1065 * dwarf.c (load_separate_debug_info): Issue warning only if
1066 do_debug_links is set.
1067 * testsuite/binutils-all/compress.exp: Run objdump and readelf
1068 with missing debug file.
1069
1070 2021-03-01 Alan Modra <amodra@gmail.com>
1071
1072 PR 27128
1073 * doc/binutils.texi: Add nm --with-symbol-versions and
1074 --without-symbol-versions documentation.
1075 * nm.c (with_symbol_versions): New variable.
1076 (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
1077 (long_options): Make --with-symbol-versions entry twiddle the flag.
1078 Add --without-symbol-versions.
1079 (print_symname): Strip version when !with_symbol_versions. Add
1080 dynamic version info under control of with_symbol_versions.
1081 (main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
1082
1083 2021-02-26 Fangrui Song <maskray@google.com>
1084
1085 PR 27408
1086 * readelf.c (quiet): New option flag.
1087 (enum long_option_values): New enum to hold long option value.
1088 (long_options): Add --quiet.
1089 (usage): Mention --quiet.
1090 (display_rel_file): If quiet is enabled, suppress "no symbols".
1091 (main): Handle the new option.
1092 * NEWS: Mention --quiet.
1093 * docs/binutils.texi: Document --quiet.
1094
1095 2021-02-26 Tom de Vries <tdevries@suse.de>
1096
1097 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
1098
1099 2021-02-26 Tom de Vries <tdevries@suse.de>
1100
1101 PR 27390
1102 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
1103 DW_FORM_addrx*.
1104 (read_and_display_attr_value): Likewise.
1105
1106 2021-02-25 Nick Clifton <nickc@redhat.com>
1107
1108 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
1109 forms.
1110 (read_and_display_attr_value): Handle sup forms.
1111 (display_debug_sup): New function. Displays the contents of a
1112 .debug_sup section.
1113 (load_debug_sup_file): New function. Loads the contents of a file
1114 referenced by a .debug_sup section.
1115 (check_for_and_load_links): Call load_debug_sup_file.
1116 (debug_displays): Add entry for .debug_sup.
1117 * dwarf.h (enum dwarf_section_display_enum): Add debug_sup.
1118 * readelf.c (process_section_headers): Add support for debug_sup.
1119 * doc/debug.options.texi: Note that the =links option will display
1120 the contents of .debug_sup sections.
1121 * NEWS: Mention the new support.
1122
1123 2021-02-25 Alan Modra <amodra@gmail.com>
1124
1125 PR 27456
1126 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
1127
1128 2021-02-24 Nick Clifton <nickc@redhat.com>
1129
1130 PR 27285
1131 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
1132 when adding together the section sizes.
1133
1134 2021-02-24 Nick Clifton <nickc@redhat.com>
1135
1136 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
1137 build notes.
1138 * readelf.c (print_gnu_build_attribute_description): Likewise.
1139
1140 2021-02-24 Alan Modra <amodra@gmail.com>
1141 Siddhesh Poyarekar <siddhesh@gotplt.org>
1142
1143 PR 27456
1144 * bucomm.h (smart_rename): Update prototype.
1145 * rename.c (smart_rename): Add fromfd and preserve_dates params.
1146 Pass fromfd and target_stat to simple_copy. Call set_times
1147 when preserve_dates.
1148 (simple_copy): Accept fromfd rather than from filename. Add
1149 target_stat param. Rewind fromfd rather than opening. Open
1150 "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
1151 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
1152 closing output temp file, and pass tmpfd to smart_rename.
1153 * arsup.c (temp_fd): Rename from real_fd.
1154 (ar_save): Dup temp_fd and pass to smart_rename.
1155 * objcopy.c (strip_main, copy_main): Likewise, and pass
1156 preserve_dates.
1157
1158 2021-02-24 Alan Modra <amodra@gmail.com>
1159
1160 PR 27456
1161 * rename.c: Tidy throughout.
1162 (smart_rename): Always copy. Remove windows specific code.
1163
1164 2021-02-20 Alan Modra <amodra@gmail.com>
1165
1166 * testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
1167 (run_dump_test): Fail if expecting errors from a file like we do
1168 for error strings, if no error is seen.
1169
1170 2021-02-19 Alan Modra <amodra@gmail.com>
1171
1172 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
1173
1174 2021-02-19 Siddhesh Poyarekar <siddhesh@gotplt.org>
1175
1176 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
1177 SMART_RENAME.
1178 * arsup.c (ar_save): Likewise.
1179 * objcopy (strip_main): Don't copy TMPFD. Don't set times on
1180 temporary file and adjust call to SMART_RENAME.
1181 (copy_main): Likewise.
1182 * rename.c [!S_ISLNK]: Remove definitions.
1183 (try_preserve_permissions): Remove function.
1184 (smart_rename): Remove FD, PRESERVE_DATES arguments. Use
1185 rename system call only if TO does not exist.
1186 * bucomm.h (smart_rename): Adjust declaration.
1187
1188 2021-02-18 Nick Clifton <nickc@redhat.com>
1189
1190 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
1191 address that is higher than the end address.
1192
1193 2021-02-17 Alan Modra <amodra@gmail.com>
1194
1195 * dwarf.c: Include limits.h.
1196 (CHAR_BIT): Provide backup define.
1197 (read_leb128): Use CHAR_BIT to size "result" in bits. Correct
1198 signed overflow checking.
1199 * testsuite/binutils-all/pr26548.s,
1200 * testsuite/binutils-all/pr26548.d,
1201 * testsuite/binutils-all/pr26548e.d: New tests.
1202 * testsuite/binutils-all/readelf.exp: Run them.
1203 (readelf_test): Drop unused "xfails" parameter. Update all uses.
1204
1205 2021-02-16 Jan Beulich <jbeulich@suse.com>
1206
1207 * dwarf.c (process_debug_info): Initialize "dwo_id".
1208
1209 2021-02-15 Alan Modra <amodra@gmail.com>
1210
1211 * objdump.c (load_specific_debug_section): Don't call
1212 bfd_cache_section_contents. Rearrange so that
1213 bfd_get_full_section_contents is not called on path where
1214 bfd_simple_get_relocated_section_contents is called.
1215 Don't set section->user_data.
1216 (free_debug_section): Always free section->start. Don't twiddle
1217 section flags.
1218 * readelf.c (load_specific_debug_section): Don't set user_data.
1219 * dwarf.h (struct dwarf_section): Remove use_data field.
1220 * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
1221
1222 2021-02-15 Alan Modra <amodra@gmail.com>
1223
1224 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
1225 * testsuite/binutils-all/objdump.exp: Likewise.
1226
1227 2021-02-14 Alan Modra <amodra@gmail.com>
1228
1229 * objdump.c (slurp_symtab): Don't add an extra entry for NULL
1230 to the symbol array.
1231 (slurp_dynamic_symtab): Likewise.
1232 (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
1233
1234 2021-02-14 Alan Modra <amodra@gmail.com>
1235
1236 * Makefile.in: Regenerate.
1237 * doc/Makefile.in: Regenerate.
1238
1239 2021-02-13 Mike Frysinger <vapier@gentoo.org>
1240
1241 * aclocal.m4: Regenerate.
1242
1243 2021-02-12 Nick Clifton <nickc@redhat.com>
1244
1245 * configure.ac (follow-debug-links): Add option to enable or
1246 disable the following of debug links by default. Set the
1247 default for the option to be 'follow'.
1248 * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
1249 (dwarf_select_sections_by_names): Add no-follow-links option.
1250 (dwarf_select_sections_by_letter): Add 'N' option.
1251 * objdump.c (usage): Add conditional text describing the
1252 follow links option.
1253 (slurp_symtab): Ensure that there is a NULL entry at the end
1254 of the symbol table.
1255 (slurp_dynamic_symtab): Likewise.
1256 (dump_bfd): When extending the symbol table, ensure that there
1257 is still a NULL entry at the end.
1258 * readelf.c (usage): Add conditional text describing the
1259 follow links option.
1260 * doc/binutils.texi: Update documentation for objcopy and
1261 readelf.
1262 * doc/debug.options.texi: Update documentation of the
1263 follow-links option.
1264 * config.in: Regenerate.
1265 * configure: Regenerate.
1266 * testsuite/binutils-all/compress.exp: Add the -WN option to
1267 objdump command lines that are not expecting to follow links.
1268 * testsuite/binutils-all/readelf.exp: Add the
1269 --debug-dump=no-follow-links option to tests that are not
1270 expecting to follow debug links.
1271 * NEWS: Mention the new behaviour.
1272
1273 2021-02-12 Alan Modra <amodra@gmail.com>
1274
1275 * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
1276 gas or ld fails to build a testcase rather than "unresolved".
1277 Report "fail" when readelf returns an error status rather than
1278 "unresolved".
1279 * testsuite/binutils-all/ar.exp: Likewise.
1280 * testsuite/binutils-all/compress.exp: Likewise.
1281 * testsuite/binutils-all/readelf.exp: Likewise.
1282
1283 2021-02-12 Alan Modra <amodra@gmail.com>
1284
1285 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
1286 "c" with "ccc" labels.
1287
1288 2021-02-12 Tom de Vries <tdevries@suse.de>
1289
1290 * dwarf.h (debug_info): Fix typo in comment.
1291
1292 2021-02-12 Tom de Vries <tdevries@suse.de>
1293
1294 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
1295 entries.
1296
1297 2021-02-12 Tom de Vries <tdevries@suse.de>
1298
1299 * dwarf.c (process_debug_info): Print DWO ID.
1300
1301 2021-02-11 Alan Modra <amodra@gmail.com>
1302
1303 PR 27290
1304 PR 27293
1305 PR 27295
1306 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
1307 Use bfd_malloc_and_get_section.
1308 (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
1309 check namesz. Return NULL if descsz is too small. Ensure
1310 string table is terminated.
1311 (elf32_avr_get_device_info): Formatting. Add note_size param.
1312 Sanity check note.
1313 (elf32_avr_dump_mem_usage): Adjust to suit.
1314
1315 2021-02-10 Tom de Vries <tdevries@suse.de>
1316
1317 PR binutils/27391
1318 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
1319
1320 2021-02-10 Tom de Vries <tdevries@suse.de>
1321
1322 PR binutils/27371
1323 * dwarf.c (display_debug_ranges): Filter range lists according to
1324 section.
1325
1326 2021-02-09 Tom de Vries <tdevries@suse.de>
1327
1328 PR binutils/27370
1329 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
1330
1331 2021-02-09 Tom de Vries <tdevries@suse.de>
1332
1333 PR binutils/27386
1334 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
1335 DW_UT_split_compile.
1336
1337 2021-02-09 Alan Modra <amodra@gmail.com>
1338
1339 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
1340 symbianelf.
1341
1342 2021-02-07 Alan Modra <amodra@gmail.com>
1343
1344 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
1345 uninitialised on invalid input.
1346
1347 2021-02-06 Alan Modra <amodra@gmail.com>
1348
1349 PR 27349
1350 * rename.c (smart_rename): Test for existence and type of output
1351 file with lstat.
1352
1353 2021-02-05 Nick Clifton <nickc@redhat.com>
1354
1355 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
1356
1357 2021-02-05 Eli Zaretskii <eliz@gnu.org>
1358
1359 PR 27252
1360 * elfedit.c (check_file):
1361 * bucomm.c (get_file_size): Fix typos in comments.
1362
1363 2021-02-05 Alan Modra <amodra@gmail.com>
1364
1365 PR 27345
1366 * arsup.c (ar_save): Use stat rather than lstat.
1367
1368 2021-02-03 Alan Modra <amodra@gmail.com>
1369
1370 PR 27270
1371 PR 27284
1372 PR 26945
1373 * ar.c: Don't include libbfd.h.
1374 (write_archive): Replace xmalloc+strcpy with xstrdup. Use
1375 bfd_stat rather than fstat on iostream. Move stat and fd tests
1376 outside of _WIN32 ifdef. Delete skip_stat variable.
1377 * arsup.c (temp_name, real_ofd): New static variables.
1378 (ar_open): Use make_tempname and bfd_fdopenw.
1379 (ar_save): Adjust to suit ar_open changes. Move stat output
1380 of _WIN32 ifdef.
1381 * objcopy.c: Don't include libbfd.h.
1382 (copy_file): Use bfd_stat.
1383
1384 2021-02-02 H.J. Lu <hongjiu.lu@intel.com>
1385
1386 PR binutils/27281
1387 * readelf.c (process_section_headers): Add 'R' and 'D' to
1388 "Key to Flags:".
1389 * testsuite/binutils-all/retain1a.d: Updated.
1390
1391 2021-01-30 Nick Clifton <nickc@redhat.com>
1392
1393 * README-how-to-make-a-release: Small updates after the 2.35.2
1394 release.
1395
1396 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1397
1398 PR 4356
1399 * windres.c (quot): Use double quotes to protect strings on
1400 Windows platforms.
1401
1402 2021-01-28 Eli Zaretskii <eliz@gnu.org>
1403
1404 PR 27252
1405 * bucomm.c (get_file_size): Add code to handle /dev/null on
1406 Windows systems.
1407 * elfedit.c (check_file): Likewise.
1408
1409 2021-01-27 Nick Clifton <nickc@redhat.com>
1410
1411 * objcopy.c (copy_main): Remove conditional control of the calls
1412 to free, simplifying the code and making it easier to detect
1413 typos.
1414
1415 2021-01-26 Frederic Cambus <fred@statdns.com>
1416
1417 * objcopy.c (copy_main): Fix a double free happening when both
1418 --localize-symbols and --globalize-symbols options are invoked
1419 together.
1420
1421 2021-01-24 Nick Clifton <nickc@redhat.com>
1422
1423 * README-how-to-make-a-release: Minor updates after the 2.36 release.
1424
1425 2021-01-16 Alan Modra <amodra@gmail.com>
1426
1427 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
1428
1429 2021-01-15 Alan Modra <amodra@gmail.com>
1430
1431 PR 26539
1432 * readelf.c (uncompress_section_contents): Always call inflateEnd.
1433
1434 2021-01-14 Alexandre Oliva <oliva@gnu.org>
1435
1436 * MAINTAINERS: Update my email address.
1437
1438 2021-01-14 Nick Clifton <nickc@redhat.com>
1439
1440 * po/sv.po: Updated Swedish translation.
1441
1442 2021-01-13 Alan Modra <amodra@gmail.com>
1443
1444 * Makefile.in: Regenerate.
1445 * doc/Makefile.in: Regenerate.
1446
1447 2021-01-13 Zebediah Figura <z.figura12@gmail.com>
1448
1449 PR 27037
1450 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
1451 and before exit.
1452 (i386_x64_trampoline): Add SEH annotations.
1453 (struct mac): Add how_seh field.
1454 (make_delay_head): If how_set field is true add SEh instructions.
1455
1456 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1457
1458 PR binutils/26792
1459 * configure.ac: Use GNU_MAKE_JOBSERVER.
1460 * aclocal.m4: Regenerated.
1461 * configure: Likewise.
1462
1463 2021-01-12 Nick Clifton <nickc@redhat.com>
1464
1465 * po/fr.po: Updated French translation.
1466
1467 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1468
1469 PR ld/27173
1470 * configure: Regenerated.
1471
1472 2021-01-11 Nick Clifton <nickc@redhat.com>
1473
1474 * po/pt.po: Updated Portuguese translation.
1475 * po/sr.po: Updated Serbian translation.
1476 * po/uk.po: Updated Ukranian translation.
1477
1478 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1479
1480 * configure: Regenerated.
1481
1482 2021-01-09 Nick Clifton <nickc@redhat.com>
1483
1484 * configure: Regenerate.
1485 * po/binutils.pot: Regenerate.
1486
1487 2021-01-09 Nick Clifton <nickc@redhat.com>
1488
1489 * 2.36 release branch crated.
1490 * README-how-to-make-a-release: Add note about updating Makefiles
1491 and libtool files.
1492 * BRANCHES: Add binutils-2.36-branch.
1493
1494 2021-01-09 Alan Modra <amodra@gmail.com>
1495
1496 * configure: Regenerate.
1497
1498 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1499
1500 * configure: Regenerate.
1501
1502 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1503
1504 PR 27109
1505 * objcopy.c (copy_object): Handle section symbols for
1506 non-relocatable inputs.
1507 * testsuite/binutils-all/readelf.exp (readelf_test): Check
1508 is_elf_unused_section_symbols.
1509 * testsuite/binutils-all/readelf.s-64: Updated.
1510 * testsuite/binutils-all/readelf.ss: Likewise.
1511 * testsuite/binutils-all/readelf.ss-64: Likewise.
1512 * testsuite/binutils-all/readelf.s-64-unused: New file.
1513 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
1514 * testsuite/binutils-all/readelf.ss-unused: Likewise.
1515 * testsuite/lib/binutils-common.exp
1516 (is_elf_unused_section_symbols): New proc.
1517
1518 2021-01-06 Reuben Thomas <rrt@sc3d.org>
1519
1520 * binutils/readelf.c: Correct grammar in comment.
1521
1522 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1523
1524 * coffgrok.c (do_type): Correct spelling of auxiliary in errors.
1525 * doc/binutils.texi: Correct grammar.
1526 * readelf.c (process_version_sections): Correct spelling of auxiliary
1527 in warning.
1528 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
1529
1530 2021-01-01 Alan Modra <amodra@gmail.com>
1531
1532 Update year range in copyright notice of all files.
1533
1534 For older changes see ChangeLog-2020
1535 \f
1536 Copyright (C) 2021-2022 Free Software Foundation, Inc.
1537
1538 Copying and distribution of this file, with or without modification,
1539 are permitted in any medium without royalty provided the copyright
1540 notice and this notice are preserved.
1541
1542 Local Variables:
1543 mode: change-log
1544 left-margin: 8
1545 fill-column: 74
1546 version-control: never
1547 End: