]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - binutils/ChangeLog
display_debug_macro
[thirdparty/binutils-gdb.git] / binutils / ChangeLog
1 2021-05-15 Alan Modra <amodra@gmail.com>
2
3 * dwarf.c (display_debug_macro): Print strings that might not
4 be zero terminated with %*s. Don't bump curr if unterminated.
5
6 2021-05-15 Alan Modra <amodra@gmail.com>
7
8 * dwarf.c (get_line_filename_and_dirname): Delete initial_length_size.
9 Simplify length sanity check, and check for too small lengths.
10 Constrain data reads to header length. Avoid pointer UB.
11
12 2021-05-15 Alan Modra <amodra@gmail.com>
13
14 * dwarf.c (display_debug_macinfo): Print strings that might not
15 be zero terminated with %*s. Don't bump curr if unterminated.
16
17 2021-05-15 Alan Modra <amodra@gmail.com>
18
19 * dwarf.c (display_debug_pubnames_worker): Delete initial_length_size.
20 Simplify length check. Constrain reads to length given by header.
21
22 2021-05-15 Alan Modra <amodra@gmail.com>
23
24 * dwarf.c (display_debug_lines_decoded): Don't use strnlen when
25 we have already checked for NUL termination.
26
27 2021-05-15 Alan Modra <amodra@gmail.com>
28
29 * dwarf.c (read_debug_line_header): Delete initial_length_size.
30 Avoid pointer UB. Keep within length specified by header.
31 Delete dead code.
32
33 2021-05-15 Alan Modra <amodra@gmail.com>
34
35 * dwarf.c (process_debug_info): Always do the first CU length
36 scan for sanity checks. Remove initial_length_size var and
37 instead calculate end_cu. Use end_cu to limit data reads.
38 Delete now dead code checking length.
39
40 2021-05-15 Alan Modra <amodra@gmail.com>
41
42 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Assert only when ENABLE_CHECKING.
43
44 2021-05-15 Alan Modra <amodra@gmail.com>
45
46 * bucomm.h (_mul_overflow): Define.
47 * dwarf.c (get_encoded_value): Avoid pointer UB.
48
49 2021-05-13 Alan Modra <amodra@gmail.com>
50
51 PR 27861
52 * dwarf.c (display_debug_str_offsets): Sanity check dwarf5
53 header length.
54
55 2021-05-13 Alan Modra <amodra@gmail.com>
56
57 PR 27860
58 * dwarf.c (display_debug_frames): Sanity check cie_off before
59 attempting to read cie.
60
61 2021-05-12 Alan Modra <amodra@gmail.com>
62
63 * dwarf.c (process_extended_line_op): Don't bump data pointer past
64 end when strnlen doesn't find string terminator.
65 (decode_location_expression): Remove dead code.
66 (skip_attr_bytes): Remove const from end param. Ensure data
67 pointer doesn't pass end.
68 (get_type_signedness): Remove const from end param.
69 (read_and_display_attr_value): Ensure data pointer doesn't pass end.
70 (display_debug_lines_raw, display_debug_lines_decoded): Likewise.
71 (display_debug_pubnames_worker): Likewise.
72 (display_debug_pubnames_worker): Use SAFE_BYTE_GET_AND INC rather
73 than blindly incrementing data pointer.
74 (display_debug_addr, display_debug_str_offsets): Likewise. Don't
75 compare pointers, compare lengths.
76
77 2021-05-12 Alan Modra <amodra@gmail.com>
78
79 * dwarf.c (SAFE_BYTE_GET_INTERNAL): Define.
80 (SAFE_BYTE_GET, SAFE_BYTE_GET_AND_INC): Define using the above.
81 (SAFE_SIGNED_BYTE_GET, SAFE_SIGNED_BYTE_GET_AND_INC): Likewise.
82 (display_discr_list): Use SAFE_BYTE_GET_AND_INC rather than
83 SAFE_BYTE_GET followed by increment.
84 (process_debug_info): Likewise, and test bytes remaining before
85 incrementing section_begin rather than using pointer comparison.
86 (display_debug_names): Pass lvalue as SAFE_BYTE_GET PTR.
87 (process_cu_tu_index): Likewise for SAFE_BYTE_GET_AND_INC.
88
89 2021-05-12 Alan Modra <amodra@gmail.com>
90
91 * dwarf.c (dwarf_vmatoa64, SAFE_BYTE_GET64, add64): Delete.
92 (skip_attr_bytes): Replace use of SAFE_BYTE_GET64 with
93 SAFE_BYTE_GET_AND_INC.
94 (read_and_display_attr_value): Likewise. Print using dwarf_vmatoa.
95 (process_debug_info, process_cu_tu_index): Likewise.
96 * elfcomm.c (byte_put, byte_put_little_endian, byte_put_big_endian),
97 (byte_get, byte_get_little_endian, byte_get_big_endian),
98 (byte_get_signed): Make size param unsigned. Remove code dealing
99 with 4-byte elf_vma.
100 (byte_get_64): Delete.
101 * elfcomm.h (byte_put, byte_put_little_endian, byte_put_big_endian),
102 (byte_get, byte_get_little_endian, byte_get_big_endian),
103 (byte_get_signed): Update prototypes.
104 (byte_get_64): Delete.
105
106 2021-05-12 Alan Modra <amodra@gmail.com>
107
108 PR 27836
109 * dwarf.c (display_debug_frames): Don't compare pointers derived
110 from user input. Test offset against bounds instead.
111
112 2021-05-12 Alan Modra <amodra@gmail.com>
113
114 PR 27853
115 * dwarf.c (display_formatted_table): Test for data >= end rather
116 than data == end.
117 (process_extended_line_op): Likewise.
118 (display_debug_lines_raw): Likewise.
119 (display_debug_lines_decoded): Likewise.
120
121 2021-05-12 Alan Modra <amodra@gmail.com>
122
123 PR 27849
124 * dwarf.c (fetch_indexed_string): Correct length sanity checks.
125 Sanity check section size for version and padding too. Correct
126 index sanity check. Handle multiple tables in .debug_str_offsets.
127
128 2021-05-11 Hans-Peter Nilsson <hp@axis.com>
129
130 * dwarf.c (process_abbrev_set): Properly parenthesize before
131 casting to unsigned long.
132
133 2021-05-11 Alan Modra <amodra@gmail.com>
134
135 PR 27845
136 * dwarf.c (process_abbrev_set): Replace start and end parameters
137 with section, abbrev_base, abbrev_size, abbrev_offset. Update
138 all callers. Sanity check parameters correctly and emit warnings
139 here rather than..
140 (process_debug_info): ..here.
141
142 2021-05-10 Thomas Wolff <towo@towo.net>
143
144 PR 4356
145 PR 26865
146 PR 27594
147 * windres.c (quot): Revert previous delta. Do not use double
148 quotes when spaces are detected in options.
149 * doc/binutils.texi (windres): Remove suggestion that the
150 --preprocessor option can take arguments.
151
152 2021-05-10 Alan Modra <amodra@gmail.com>
153
154 * dwarf.c (SAFE_BYTE_GET): Check bounds by subtracting amount from
155 END rather than adding amount to PTR.
156 (SAFE_SIGNED_BYTE_GET, SAFE_BYTE_GET64): Likewise.
157
158 2021-05-09 Alan Modra <amodra@gmail.com>
159
160 * objcopy.c (eq_string): Delete.
161 (create_symbol_htab): Use htab_eq_string.
162
163 2021-05-08 Mike Frysinger <vapier@gentoo.org>
164
165 * README-how-to-make-a-release: Update html & pdf entries.
166
167 2021-05-08 Mike Frysinger <vapier@gentoo.org>
168
169 * doc/Makefile.am (html-local, binutils/index.html): New targets.
170 * doc/Makefile.in: Regenerate.
171
172 2021-05-08 Mike Frysinger <vapier@gentoo.org>
173
174 * doc/Makefile.am (AM_MAKEINFOFLAGS): Add --no-split.
175 * doc/Makefile.in: Regenerate.
176
177 2021-05-07 Nick Clifton <nickc@redhat.com>
178
179 * readelf.c (no_processor_specific_unwind): New function.
180 (process_unwind): Use no_processor_specific_unwind for X86
181 targets.
182
183 2021-05-07 Michael Forney <mforney@mforney.org>
184
185 * dwarf.c: Don't omit second operand of '?' operator.
186
187 2021-04-30 Nick Clifton <nickc@redhat.com>
188
189 PR 27796
190 * dwarf.c (load_debug_sup_file): Allocate memory for filename in
191 .debug_sup section.
192
193 2021-04-29 Nick Clifton <nickc@redhat.com>
194
195 PR 27594
196 * doc/binutils.texi (windres): Correct the description of the
197 default value of the --preprocessor argument.
198
199 2021-04-27 Nick Clifton <nickc@redhat.com>
200
201 PR 27779
202 * dwarf.c (parse_gnu_debuglink): Reject empty names.
203 (parse_gnu_debugaltlink): Likewise.
204
205 2021-04-22 Clément Chigot <clement.chigot@atos.net>
206
207 * od-xcoff.c (dump_xcoff32_symbols): Adapt to new
208 aux structures.
209
210 2021-04-21 Nick Lott <nick.lott@gmail.com>
211
212 PR 27672
213 * readelf.c (sym_base): New variable.
214 (enum print_mode): Add more modes.
215 (print_vma): Add suport for new modes.
216 (options): Add sym-base.
217 (usage): Add sym-base.
218 (parse_args): Add support for --sym-base.
219 (print_dynamic_symbol_size): New function.
220 (print_dynamic_symbol): Use new function.
221 * doc/binutils.texi: Document the new feature.
222 * NEWS: Mention the new feature.
223
224 2021-04-21 Nick Clifton <nickc@redhat.com>
225
226 * testsuite/binutils-all/mips/global-local-symtab-sort-n64t.d:
227 Adjust expected output to allow for named section symbols.
228 * testsuite/binutils-all/mips/global-local-symtab-sort-o32t.d:
229 Likewise.
230 * testsuite/binutils-all/readelf.s-64: Likewise.
231 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
232 * testsuite/binutils-all/readelf.ss-tmips: Likewise.
233 * testsuite/binutils-all/readelf.ss-unused: Likewise.
234
235 2021-04-21 Luo Longjun <luolongjun@huawei.com>
236
237 * readelf.c (print_dynamic_symbol): Print the section name for
238 section symbols without a name of their own.
239
240 2021-04-20 Andreas Krebbel <krebbel@linux.ibm.com>
241
242 * MAINTAINERS: Remove Martin Schwidefsky as s390 maintainer and
243 add him to Past Maintainers.
244 Update my email address.
245
246 2021-04-19 Nick Clifton <nickc@redhat.com>
247
248 PR 21702
249 * arsup.c (ar_addmod): Enable plugin support, if available.
250
251 2021-04-19 Nick Clifton <nickc@redhat.com>
252
253 * rename.c: (get_stat_atime_ns): Add prototype.
254 (get_stat_mtime_ns): Add prototype.
255
256 2021-04-16 Alan Modra <amodra@gmail.com>
257
258 PR 27725
259 * rename.c (get_stat_atime, get_stat_mtime): Make static.
260 (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
261
262 2021-04-15 Pekka Seppänen <pexu@sourceware.mail.kapsi.fi>
263
264 PR 27725
265 * rename.c (get_stat_atime_ns): Add ATTRIBUTE_UNUSED.
266 (get_stat_mtime_ns): Likewise.
267
268 2021-04-15 Alan Modra <amodra@gmail.com>
269
270 PR 27725
271 * configure.ac: Check for sys/time.h and utimensat. Use standard
272 checks for mkstemp and mkdtemp. Whitespace. Check for nanosecond
273 members of struct stat.
274 * rename.c: Prefer sys/time.h for utimes over utime.h for utime.
275 (STAT_TIMESPEC, STAT_TIMESPEC_NS): Define
276 (get_stat_atime_ns, get_stat_mtime_ns): New inline functions.
277 (get_stat_atime, get_stat_mtime): Likewise.
278 (set_times): Choose first available of utimensat, utimes, utime.
279 Use above inline functions to set timespec and timeval values.
280 * configure: Regenerate.
281 * config.in: Regenerate.
282 * testsuite/binutils-all/objcopy.exp (objcopy_test): Add test of
283 file timestamp when --preserve-dates is used.
284
285 2021-04-15 Alan Modra <amodra@gmail.com>
286
287 PR 27456
288 * rename.c (smart_rename): When TO and FROM are equal, just set
289 file timestamp.
290 * objcopy.c (strip_main, copy_main): Always call smart_rename.
291
292 2021-04-14 H.J. Lu <hongjiu.lu@intel.com>
293
294 PR binutils/27708
295 * testsuite/binutils-all/x86-64/pr27708.dump: New file.
296 * testsuite/binutils-all/x86-64/pr27708.exe.bz2: Likewise.
297 * testsuite/binutils-all/x86-64/x86-64.exp: Run binutils/27708
298 test.
299
300 2021-04-14 Mark Harmstone <mark@harmstone.com>
301
302 PR 27686
303 * resbin.c (bin_to_res_version): Ignore any trailing bytes at the
304 end of the structure.
305
306 2021-04-14 Frederic Cambus <fred@statdns.com>
307
308 * readelf.c (get_netbsd_elfcore_note_type): Remove unneeded #ifdef
309 checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS.
310
311 2021-04-14 Alan Modra <amodra@gmail.com>
312
313 PR 27716
314 * objdump.c (show_line): Don't limit paths to PATH_MAX.
315 * readelf.c (struct filedata): Change program_interpreter from
316 a char array to a char pointer.
317 (process_program_headers): Sanity check PT_INTERP p_filesz.
318 Malloc program_interpreter using p_filesz and read directly from
319 file.
320 (process_dynamic_section): Check program_interpreter is non-NULL.
321 (free_filedata): New function, split out from..
322 (process_object): ..here.
323 (close_debug_file): Call free_filedata.
324 * sysdep.h: Don't include sys/param.h.
325 (PATH_MAX): Don't define.
326 * configure.ac: Don't check for sys/param.h.
327 * configure: Regenerate.
328
329 2021-04-13 Frederic Cambus <fred@statdns.com>
330
331 * readelf.c (process_netbsd_elf_note): Remove now unneeded #ifdef
332 check for NT_NETBSD_PAX.
333
334 2021-04-12 Alan Modra <amodra@gmail.com>
335
336 * configure.ac (--enable-checking): Add support.
337 * config.in: Regenerate.
338 * configure: Regenerate.
339
340 2021-04-09 Alan Modra <amodra@gmail.com>
341
342 * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
343 dynrelcount.
344 (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move.
345 (disassemble_section, disassemble_data): Likewise.
346
347 2021-04-06 Alan Modra <amodra@gmail.com>
348
349 * objdump.c (objdump_symbol_at_address): Return asymbol*.
350
351 2021-04-06 Alan Modra <amodra@gmail.com>
352
353 * NEWS: Mention C99 requirement.
354 * README: Likewise. Modernise examples and "Reporting bugs".
355
356 2021-04-05 Alan Modra <amodra@gmail.com>
357
358 * configure.ac: Assume long long is available. Don't test for
359 strings.h, stdlib.h, limits.h, locale.h, or wchar.h. Check
360 inttypes.h, stdint.h, sys/stat.h and sys/types.h. Don't check for
361 strcoll, setlocale, setmode or location of time_t. Don't check
362 for fprintf, getenv, snprintf, strnlen, strstr or vsnprintf decls.
363 (AC_ISC_POSIX, AXC_HEADER_STRING, AC_FUNC_ALLOCA): Don't invoke.
364 * sysdep.h: Don't include alloca-conf.h, include config.h instead.
365 Test HAVE_SYS_TYPES_H and reorder includes. Include limits.h,
366 locale.h, string.h and stdlib.h unconditionally. Remove various
367 fallback declarations. Assume long long is available.
368 * addr2line.c: Don't test HAVE_SETLOCALE.
369 * ar.c: Likewise.
370 * coffdump.c: Likewise.
371 * dlltool.c: Likewise.
372 * dllwrap.c: Likewise.
373 * elfedit.c: Likewise.
374 * nm.c: Likewise.
375 * objcopy.c: Likewise.
376 * objdump.c: Likewise.
377 * readelf.c: Likewise.
378 * size.c: Likewise.
379 * srconv.c: Likewise.
380 * strings.c: Likewise.
381 * sysdump.c: Likewise.
382 * windmc.c: Likewise.
383 * windres.c: Likewise.
384 * bucomm.c: Don't test HAVE_TIME_T_IN_TIME_H or HAVE_TIME_T_IN_TYPES_H.
385 * dwarf.c: Include limits.h unconditionally. Assume long long
386 is available.
387 * nm.c: Don't test HAVE_STRCOLL.
388 * readelf.c: Don't test HAVE_WCHAR_H.
389 * strings.c: Assume long long is available.
390 * syslex.l: Include string.h unconditionally.
391 * aclocal.m4: Regenerate.
392 * config.in: Regenerate.
393 * configure: Regenerate.
394 * Makefile.in: Regenerate.
395 * doc/Makefile.in: Regenerate.
396
397 2021-04-01 Martin Liska <mliska@suse.cz>
398
399 * elfcomm.h (strneq): Remove strneq and use startswith.
400 * readelf.c (ia64_process_unwind): Likewise.
401 (process_note): Likewise.
402
403 2021-04-01 Martin Liska <mliska@suse.cz>
404
405 * dllwrap.c: Use startswith function.
406 * objcopy.c (is_dwo_section): Likewise.
407 (handle_remove_section_option): Likewise.
408 (copy_main): Likewise.
409 * objdump.c (is_significant_symbol_name): Likewise.
410
411 2021-04-01 Martin Liska <mliska@suse.cz>
412
413 * dwarf.c (display_debug_lines_raw): Replace const_strneq with
414 startswith.
415 (display_debug_lines_decoded): Likewise.
416 (display_debug_links): Likewise.
417 * elfcomm.c (setup_archive): Likewise.
418 * elfcomm.h (const_strneq): Likewise.
419 * readelf.c (process_section_headers): Likewise.
420 (slurp_ia64_unwind_table): Likewise.
421 (slurp_hppa_unwind_table): Likewise.
422 (decode_arm_unwind): Likewise.
423 (display_debug_section): Likewise.
424 (process_note): Likewise.
425
426 2021-03-31 Alan Modra <amodra@gmail.com>
427
428 * sysdep.h (POISON_BFD_BOOLEAN): Define.
429 * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c,
430 * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c,
431 * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h,
432 * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c,
433 * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c,
434 * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h,
435 * windmc.c, * windmc.h, * windres.c, * winduni.c,
436 * wrstabs.c: Replace bfd_boolean with bool, FALSE with false,
437 and TRUE with true throughout.
438
439 2021-03-31 Alan Modra <amodra@gmail.com>
440
441 * coffdump.c: Include stdint.h in place of bfd_stdint.h.
442 * dwarf.c: Likewise.
443
444 2021-03-31 Alan Modra <amodra@gmail.com>
445
446 * prdbg.c (pr_function_type): Replace LITSTTCPY with strcpy.
447
448 2021-03-29 Alan Modra <amodra@gmail.com>
449
450 * dlltool.c (main): Don't use "boolean_condition ? TRUE : FALSE".
451 * dwarf.c (read_and_display_attr_value): Likewise.
452 (display_debug_str_offsets): Likewise.
453 * objdump.c (dump_bfd): Likewise.
454 * readelf.c (dump_section_as_strings): Likewise.
455 (dump_section_as_bytes): Likewise.
456
457 2021-03-29 Alan Modra <amodra@gmail.com>
458
459 * objdump.c (process_links): Use type int.
460 * readelf.c (request_dump): Don't increment do_dump, set it.
461 * windint.h (target_is_bigendian): Use type bfd_boolean.
462 * windmc.c (target_is_bigendian): Likewise.
463 * windres.c (target_is_bigendian): Likewise.
464
465 2021-03-22 Martin Liska <mliska@suse.cz>
466
467 * dlltool.c (scan_drectve_symbols): Replace usage of CONST_STRNEQ
468 with startswith.
469 * emul_aix.c (ar_emul_aix_parse_arg): Likewise.
470 * objcopy.c (is_mergeable_note_section): Likewise.
471 * objdump.c (dump_dwarf_section): Likewise.
472 * prdbg.c (pr_method_type): Likewise.
473 (pr_class_baseclass): Likewise.
474 (tg_class_baseclass): Likewise.
475 * readelf.c (process_lto_symbol_tables): Likewise.
476 * stabs.c (ULLHIGH): Likewise.
477 (parse_stab_argtypes): Likewise.
478 (stab_demangle_function_name): Likewise.
479
480 2021-03-19 H.J. Lu <hongjiu.lu@intel.com>
481
482 * readelf.c (get_machine_name): Add EM_INTELGT.
483
484 2021-03-18 Nick Clifton <nickc@redhat.com>
485
486 PR 27478
487 * readelf.c (dump_section_as_strings): Mention separate filename.
488 (dump_section_as_bytes): Likewise.
489 (dump_section_as_ctf): Likewise.
490 (initialise_dumkps_byname): Only issue a warning for missing
491 sections if processing the main file.
492 (process_section_contents): Only issue a warning for unsumped
493 section numbers in the main file.
494 (initialise_dump_sects): New function. Contains code extracted
495 from ...
496 (process_object): ... here. Also call initialise_dump_sects for
497 separate files.
498
499 2021-03-16 Nick Clifton <nickc@redhat.com>
500
501 PR 27534
502 * readelf.c (display_debug_section): Also retain .debug_addr
503 sections.
504
505 2021-03-16 Nick Clifton <nickc@redhat.com>
506
507 PR 27533
508 * readelf.c (process_section_contents): Only dump debug
509 information for separate files unless process_links is enabled.
510 (process_object): Always call process_section_contents for
511 separate info files.
512
513 2021-03-15 Nick Clifton <nickc@redhat.com>
514
515 PR 27487
516 * nm.c (FORMAT_JUST_SYMBOLS): Define.
517 (struct optput_fns): Add entry for FORMAT_JUST_SYMBOLS.
518 (long_options): Add just-symbols.
519 (set_output_format): Add support for just-symbols.
520 (get_print_format): Likewise.
521 (do_not_print_object_filename): New function.
522 (do_not_print_archive_filename): New function.
523 (do_not_print_archive_member): New function.
524 (do_not_print_symbol_filename): New function.
525 (just_print_symbol_name): New function.
526 (main): Handle --just-symbols.
527 * NEWS: Mention the new feature.
528 * doc/binutils.texi: Document the new feature.
529
530 2021-03-12 Clément Chigot <clement.chigot@atos.net>
531
532 * od-xcoff.c: Replace RTB by TRL entry.
533
534 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
535 Andrew Burgess <andrew.burgess@embecosm.com>
536
537 * readelf.c (get_note_type): Handle NT_RISCV_CSR.
538
539 2021-03-05 Craig Blackmore <craig.blackmore@embecosm.com>
540 Andrew Burgess <andrew.burgess@embecosm.com>
541
542 * readelf.c (get_note_type): Handle NT_GDB_TDESC.
543
544 2021-03-05 Nick Clifton <nickc@redhat.com>
545
546 PR 27387
547 * dwarf.c (display_debug_macro): Handle the displaying of
548 DW_MACRO_define_strp and DW_MACRO_undef_strp in v4
549 .debug_macro.dwo sections.
550
551 2021-03-04 Nick Clifton <nickc@redhat.com>
552
553 PR 27478
554 * objdump.c (process_links): New variable.
555 (usage): Add --process-links.
556 (long_options): Likewise.
557 (dump_bfd): Stop processing once the bfd has been loaded unless
558 this is the main file or process_links has been enabled.
559 (main): Handle the process-links option.
560 * readelf.c (process_links): New variable.
561 (struct filedata): Add is_separate field.
562 (options): Add --process-links.
563 (usage): Likewise.
564 (parse_args): Likewise.
565 (process_file_header): Include the filename when dumping
566 information for separate debuginfo files.
567 (process_program_headers): Likewise.
568 (process_section_headers): Likewise.
569 (process_section_groups): Likewise.
570 (process_relocs): Likewise.
571 (process_dynamic_section): Likewise.
572 (process_version_sections): Likewise.
573 (display_lto_symtab): Likewise.
574 (process_symbol_table): Likewise.
575 (process_syminfo): Likewise.
576 (initialise_dumps_by_name): Likewise.
577 (process_section_contents): Likewise.
578 (process_notes_at): Likewise.
579 (process_notes): Likewise.
580 (open_file): Add is_separate parameter. Use to initialise the
581 is_separate field in the filedata structure.
582 (open_deug): Update call to open_file.
583 (process_object): Add processing of the contents of separate
584 debuginfo files, gated by the process_links variable.
585 (process_archive): Update call to open_file.
586 (process_file): Initialise the is_separate field in the filedata
587 structure.
588 * dwarf.c (load_separate_debug_info_file): Only report the
589 loading of a separate file if debug links are being dumped.
590 * objcopy.c (keep_section_symbols): New variable.
591 (enum command_line_switch): Add OPTION_KEEP_SYMBOLS.
592 (strip_options): Add keep-section-symbols.
593 (copy_options): Likewise.
594 (copy_usage): Likewise.
595 (strip_usage): Likewise.
596 (copy_object): Keep section symbols if requested by command line
597 option.
598 (strip_main): Handle --keep-section-symbols.
599 (copy_main): Likewise.
600 * doc/binutils.texi: Document the new options.
601 * NEWS: Mention the new features.
602 * testsuite/binutils-all/compress.exp (test_gnu_debuglink):
603 Update options passed to objdump. Use diff rather than cmp to
604 compare the dumped data.
605 * testsuite/binutils-all/objdump.WK2: Update regexp.
606 * testsuite/binutils-all/objdump.WK3: Update regexp.
607 * testsuite/binutils-all/objdump.exp: Use --process-links
608 instead of --dwarf=follow-links.
609 * testsuite/binutils-all/readelf.exp (readelf_test): Include
610 readelf's output in the log when the test fails.
611 Add the -P option to the -wKis test.
612 * testsuite/binutils-all/readelf.wKis: Update expected output.
613
614 2021-03-03 Alan Modra <amodra@gmail.com>
615
616 PR 27493
617 * objcopy.c (filter_symbols): Apply --weaken to undefined symbols.
618 * NEWS: Mention feature.
619
620 2021-03-01 H.J. Lu <hongjiu.lu@intel.com>
621
622 PR binutils/27486
623 * dwarf.c (load_separate_debug_info): Issue warning only if
624 do_debug_links is set.
625 * testsuite/binutils-all/compress.exp: Run objdump and readelf
626 with missing debug file.
627
628 2021-03-01 Alan Modra <amodra@gmail.com>
629
630 PR 27128
631 * doc/binutils.texi: Add nm --with-symbol-versions and
632 --without-symbol-versions documentation.
633 * nm.c (with_symbol_versions): New variable.
634 (enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
635 (long_options): Make --with-symbol-versions entry twiddle the flag.
636 Add --without-symbol-versions.
637 (print_symname): Strip version when !with_symbol_versions. Add
638 dynamic version info under control of with_symbol_versions.
639 (main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
640
641 2021-02-26 Fangrui Song <maskray@google.com>
642
643 PR 27408
644 * readelf.c (quiet): New option flag.
645 (enum long_option_values): New enum to hold long option value.
646 (long_options): Add --quiet.
647 (usage): Mention --quiet.
648 (display_rel_file): If quiet is enabled, suppress "no symbols".
649 (main): Handle the new option.
650 * NEWS: Mention --quiet.
651 * docs/binutils.texi: Document --quiet.
652
653 2021-02-26 Tom de Vries <tdevries@suse.de>
654
655 * dwarf.c (display_debug_addr): Handle dwarf-5 .debug_addr bits.
656
657 2021-02-26 Tom de Vries <tdevries@suse.de>
658
659 PR 27390
660 * dwarf.c: (skip_attr_bytes): Add support for DW_FORM_str* and
661 DW_FORM_addrx*.
662 (read_and_display_attr_value): Likewise.
663
664 2021-02-25 Nick Clifton <nickc@redhat.com>
665
666 * dwarf.c (get_type_abbrev_from_form): Accept but ignore sup
667 forms.
668 (read_and_display_attr_value): Handle sup forms.
669 (display_debug_sup): New function. Displays the contents of a
670 .debug_sup section.
671 (load_debug_sup_file): New function. Loads the contents of a file
672 referenced by a .debug_sup section.
673 (check_for_and_load_links): Call load_debug_sup_file.
674 (debug_displays): Add entry for .debug_sup.
675 * dwarf.h (enum dwarf_section_display_enum): Add debug_sup.
676 * readelf.c (process_section_headers): Add support for debug_sup.
677 * doc/debug.options.texi: Note that the =links option will display
678 the contents of .debug_sup sections.
679 * NEWS: Mention the new support.
680
681 2021-02-25 Alan Modra <amodra@gmail.com>
682
683 PR 27456
684 * rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
685
686 2021-02-24 Nick Clifton <nickc@redhat.com>
687
688 PR 27285
689 * od-elf32_avr.c (elf32_avr_get_memory_usage): Check for overflows
690 when adding together the section sizes.
691
692 2021-02-24 Nick Clifton <nickc@redhat.com>
693
694 * objcopy.c (merge_gnu_build_notes): Remove support for v1/v2 GNU
695 build notes.
696 * readelf.c (print_gnu_build_attribute_description): Likewise.
697
698 2021-02-24 Alan Modra <amodra@gmail.com>
699 Siddhesh Poyarekar <siddhesh@gotplt.org>
700
701 PR 27456
702 * bucomm.h (smart_rename): Update prototype.
703 * rename.c (smart_rename): Add fromfd and preserve_dates params.
704 Pass fromfd and target_stat to simple_copy. Call set_times
705 when preserve_dates.
706 (simple_copy): Accept fromfd rather than from filename. Add
707 target_stat param. Rewind fromfd rather than opening. Open
708 "to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
709 * ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
710 closing output temp file, and pass tmpfd to smart_rename.
711 * arsup.c (temp_fd): Rename from real_fd.
712 (ar_save): Dup temp_fd and pass to smart_rename.
713 * objcopy.c (strip_main, copy_main): Likewise, and pass
714 preserve_dates.
715
716 2021-02-24 Alan Modra <amodra@gmail.com>
717
718 PR 27456
719 * rename.c: Tidy throughout.
720 (smart_rename): Always copy. Remove windows specific code.
721
722 2021-02-20 Alan Modra <amodra@gmail.com>
723
724 * testsuite/lib/binutils-common.exp: Whitespace fixes throughout.
725 (run_dump_test): Fail if expecting errors from a file like we do
726 for error strings, if no error is seen.
727
728 2021-02-19 Alan Modra <amodra@gmail.com>
729
730 * testsuite/binutils-all/readelf.exp (pr26548): Run for 32-bit too.
731
732 2021-02-19 Siddhesh Poyarekar <siddhesh@gotplt.org>
733
734 * ar.c (write_archive): Remove TARGET_STAT. Adjust call to
735 SMART_RENAME.
736 * arsup.c (ar_save): Likewise.
737 * objcopy (strip_main): Don't copy TMPFD. Don't set times on
738 temporary file and adjust call to SMART_RENAME.
739 (copy_main): Likewise.
740 * rename.c [!S_ISLNK]: Remove definitions.
741 (try_preserve_permissions): Remove function.
742 (smart_rename): Remove FD, PRESERVE_DATES arguments. Use
743 rename system call only if TO does not exist.
744 * bucomm.h (smart_rename): Adjust declaration.
745
746 2021-02-18 Nick Clifton <nickc@redhat.com>
747
748 * objcopy.c (merge_gnu_build_notes): Handle notes with a start
749 address that is higher than the end address.
750
751 2021-02-17 Alan Modra <amodra@gmail.com>
752
753 * dwarf.c: Include limits.h.
754 (CHAR_BIT): Provide backup define.
755 (read_leb128): Use CHAR_BIT to size "result" in bits. Correct
756 signed overflow checking.
757 * testsuite/binutils-all/pr26548.s,
758 * testsuite/binutils-all/pr26548.d,
759 * testsuite/binutils-all/pr26548e.d: New tests.
760 * testsuite/binutils-all/readelf.exp: Run them.
761 (readelf_test): Drop unused "xfails" parameter. Update all uses.
762
763 2021-02-16 Jan Beulich <jbeulich@suse.com>
764
765 * dwarf.c (process_debug_info): Initialize "dwo_id".
766
767 2021-02-15 Alan Modra <amodra@gmail.com>
768
769 * objdump.c (load_specific_debug_section): Don't call
770 bfd_cache_section_contents. Rearrange so that
771 bfd_get_full_section_contents is not called on path where
772 bfd_simple_get_relocated_section_contents is called.
773 Don't set section->user_data.
774 (free_debug_section): Always free section->start. Don't twiddle
775 section flags.
776 * readelf.c (load_specific_debug_section): Don't set user_data.
777 * dwarf.h (struct dwarf_section): Remove use_data field.
778 * dwarf.c (NO_ABBREVS, ABBREV): Adjust to suit.
779
780 2021-02-15 Alan Modra <amodra@gmail.com>
781
782 * testsuite/binutils-all/compress.exp: Remove nds32 xfails.
783 * testsuite/binutils-all/objdump.exp: Likewise.
784
785 2021-02-14 Alan Modra <amodra@gmail.com>
786
787 * objdump.c (slurp_symtab): Don't add an extra entry for NULL
788 to the symbol array.
789 (slurp_dynamic_symtab): Likewise.
790 (dump_bfd): Formatting. Copy terminating NULL from extra_syms.
791
792 2021-02-14 Alan Modra <amodra@gmail.com>
793
794 * Makefile.in: Regenerate.
795 * doc/Makefile.in: Regenerate.
796
797 2021-02-13 Mike Frysinger <vapier@gentoo.org>
798
799 * aclocal.m4: Regenerate.
800
801 2021-02-12 Nick Clifton <nickc@redhat.com>
802
803 * configure.ac (follow-debug-links): Add option to enable or
804 disable the following of debug links by default. Set the
805 default for the option to be 'follow'.
806 * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS.
807 (dwarf_select_sections_by_names): Add no-follow-links option.
808 (dwarf_select_sections_by_letter): Add 'N' option.
809 * objdump.c (usage): Add conditional text describing the
810 follow links option.
811 (slurp_symtab): Ensure that there is a NULL entry at the end
812 of the symbol table.
813 (slurp_dynamic_symtab): Likewise.
814 (dump_bfd): When extending the symbol table, ensure that there
815 is still a NULL entry at the end.
816 * readelf.c (usage): Add conditional text describing the
817 follow links option.
818 * doc/binutils.texi: Update documentation for objcopy and
819 readelf.
820 * doc/debug.options.texi: Update documentation of the
821 follow-links option.
822 * config.in: Regenerate.
823 * configure: Regenerate.
824 * testsuite/binutils-all/compress.exp: Add the -WN option to
825 objdump command lines that are not expecting to follow links.
826 * testsuite/binutils-all/readelf.exp: Add the
827 --debug-dump=no-follow-links option to tests that are not
828 expecting to follow debug links.
829 * NEWS: Mention the new behaviour.
830
831 2021-02-12 Alan Modra <amodra@gmail.com>
832
833 * testsuite/binutils-all/objcopy.exp: Report "unsupported" when
834 gas or ld fails to build a testcase rather than "unresolved".
835 Report "fail" when readelf returns an error status rather than
836 "unresolved".
837 * testsuite/binutils-all/ar.exp: Likewise.
838 * testsuite/binutils-all/compress.exp: Likewise.
839 * testsuite/binutils-all/readelf.exp: Likewise.
840
841 2021-02-12 Alan Modra <amodra@gmail.com>
842
843 * testsuite/binutils-all/pr25662.s: Replace "a" with "aaa" and
844 "c" with "ccc" labels.
845
846 2021-02-12 Tom de Vries <tdevries@suse.de>
847
848 * dwarf.h (debug_info): Fix typo in comment.
849
850 2021-02-12 Tom de Vries <tdevries@suse.de>
851
852 * dwarf.c (display_debug_str_offsets): Handle multiple sets of
853 entries.
854
855 2021-02-12 Tom de Vries <tdevries@suse.de>
856
857 * dwarf.c (process_debug_info): Print DWO ID.
858
859 2021-02-11 Alan Modra <amodra@gmail.com>
860
861 PR 27290
862 PR 27293
863 PR 27295
864 * od-elf32_avr.c (elf32_avr_get_note_section_contents): Formatting.
865 Use bfd_malloc_and_get_section.
866 (elf32_avr_get_note_desc): Formatting. Return descsz. Sanity
867 check namesz. Return NULL if descsz is too small. Ensure
868 string table is terminated.
869 (elf32_avr_get_device_info): Formatting. Add note_size param.
870 Sanity check note.
871 (elf32_avr_dump_mem_usage): Adjust to suit.
872
873 2021-02-10 Tom de Vries <tdevries@suse.de>
874
875 PR binutils/27391
876 * dwarf.c (load_dwo_file): Handle case that name is absolute path.
877
878 2021-02-10 Tom de Vries <tdevries@suse.de>
879
880 PR binutils/27371
881 * dwarf.c (display_debug_ranges): Filter range lists according to
882 section.
883
884 2021-02-09 Tom de Vries <tdevries@suse.de>
885
886 PR binutils/27370
887 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
888
889 2021-02-09 Tom de Vries <tdevries@suse.de>
890
891 PR binutils/27386
892 * dwarf.c (process_debug_info): Handling DW_UT_skeleton and
893 DW_UT_split_compile.
894
895 2021-02-09 Alan Modra <amodra@gmail.com>
896
897 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
898 symbianelf.
899
900 2021-02-07 Alan Modra <amodra@gmail.com>
901
902 * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
903 uninitialised on invalid input.
904
905 2021-02-06 Alan Modra <amodra@gmail.com>
906
907 PR 27349
908 * rename.c (smart_rename): Test for existence and type of output
909 file with lstat.
910
911 2021-02-05 Nick Clifton <nickc@redhat.com>
912
913 * MAINTAINERS: Remove Richard Henderson as the ALPHA maintainer.
914
915 2021-02-05 Eli Zaretskii <eliz@gnu.org>
916
917 PR 27252
918 * elfedit.c (check_file):
919 * bucomm.c (get_file_size): Fix typos in comments.
920
921 2021-02-05 Alan Modra <amodra@gmail.com>
922
923 PR 27345
924 * arsup.c (ar_save): Use stat rather than lstat.
925
926 2021-02-03 Alan Modra <amodra@gmail.com>
927
928 PR 27270
929 PR 27284
930 PR 26945
931 * ar.c: Don't include libbfd.h.
932 (write_archive): Replace xmalloc+strcpy with xstrdup. Use
933 bfd_stat rather than fstat on iostream. Move stat and fd tests
934 outside of _WIN32 ifdef. Delete skip_stat variable.
935 * arsup.c (temp_name, real_ofd): New static variables.
936 (ar_open): Use make_tempname and bfd_fdopenw.
937 (ar_save): Adjust to suit ar_open changes. Move stat output
938 of _WIN32 ifdef.
939 * objcopy.c: Don't include libbfd.h.
940 (copy_file): Use bfd_stat.
941
942 2021-02-02 H.J. Lu <hongjiu.lu@intel.com>
943
944 PR binutils/27281
945 * readelf.c (process_section_headers): Add 'R' and 'D' to
946 "Key to Flags:".
947 * testsuite/binutils-all/retain1a.d: Updated.
948
949 2021-01-30 Nick Clifton <nickc@redhat.com>
950
951 * README-how-to-make-a-release: Small updates after the 2.35.2
952 release.
953
954 2021-01-28 Eli Zaretskii <eliz@gnu.org>
955
956 PR 4356
957 * windres.c (quot): Use double quotes to protect strings on
958 Windows platforms.
959
960 2021-01-28 Eli Zaretskii <eliz@gnu.org>
961
962 PR 27252
963 * bucomm.c (get_file_size): Add code to handle /dev/null on
964 Windows systems.
965 * elfedit.c (check_file): Likewise.
966
967 2021-01-27 Nick Clifton <nickc@redhat.com>
968
969 * objcopy.c (copy_main): Remove conditional control of the calls
970 to free, simplifying the code and making it easier to detect
971 typos.
972
973 2021-01-26 Frederic Cambus <fred@statdns.com>
974
975 * objcopy.c (copy_main): Fix a double free happening when both
976 --localize-symbols and --globalize-symbols options are invoked
977 together.
978
979 2021-01-24 Nick Clifton <nickc@redhat.com>
980
981 * README-how-to-make-a-release: Minor updates after the 2.36 release.
982
983 2021-01-16 Alan Modra <amodra@gmail.com>
984
985 * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
986
987 2021-01-15 Alan Modra <amodra@gmail.com>
988
989 PR 26539
990 * readelf.c (uncompress_section_contents): Always call inflateEnd.
991
992 2021-01-14 Alexandre Oliva <oliva@gnu.org>
993
994 * MAINTAINERS: Update my email address.
995
996 2021-01-14 Nick Clifton <nickc@redhat.com>
997
998 * po/sv.po: Updated Swedish translation.
999
1000 2021-01-13 Alan Modra <amodra@gmail.com>
1001
1002 * Makefile.in: Regenerate.
1003 * doc/Makefile.in: Regenerate.
1004
1005 2021-01-13 Zebediah Figura <z.figura12@gmail.com>
1006
1007 PR 27037
1008 * dlltool.c (i386_trampoline): Adjust %rsp immediately on entry
1009 and before exit.
1010 (i386_x64_trampoline): Add SEH annotations.
1011 (struct mac): Add how_seh field.
1012 (make_delay_head): If how_set field is true add SEh instructions.
1013
1014 2021-01-12 H.J. Lu <hongjiu.lu@intel.com>
1015
1016 PR binutils/26792
1017 * configure.ac: Use GNU_MAKE_JOBSERVER.
1018 * aclocal.m4: Regenerated.
1019 * configure: Likewise.
1020
1021 2021-01-12 Nick Clifton <nickc@redhat.com>
1022
1023 * po/fr.po: Updated French translation.
1024
1025 2021-01-11 H.J. Lu <hongjiu.lu@intel.com>
1026
1027 PR ld/27173
1028 * configure: Regenerated.
1029
1030 2021-01-11 Nick Clifton <nickc@redhat.com>
1031
1032 * po/pt.po: Updated Portuguese translation.
1033 * po/sr.po: Updated Serbian translation.
1034 * po/uk.po: Updated Ukranian translation.
1035
1036 2021-01-09 H.J. Lu <hongjiu.lu@intel.com>
1037
1038 * configure: Regenerated.
1039
1040 2021-01-09 Nick Clifton <nickc@redhat.com>
1041
1042 * configure: Regenerate.
1043 * po/binutils.pot: Regenerate.
1044
1045 2021-01-09 Nick Clifton <nickc@redhat.com>
1046
1047 * 2.36 release branch crated.
1048 * README-how-to-make-a-release: Add note about updating Makefiles
1049 and libtool files.
1050 * BRANCHES: Add binutils-2.36-branch.
1051
1052 2021-01-09 Alan Modra <amodra@gmail.com>
1053
1054 * configure: Regenerate.
1055
1056 2021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
1057
1058 * configure: Regenerate.
1059
1060 2021-01-07 H.J. Lu <hongjiu.lu@intel.com>
1061
1062 PR 27109
1063 * objcopy.c (copy_object): Handle section symbols for
1064 non-relocatable inputs.
1065 * testsuite/binutils-all/readelf.exp (readelf_test): Check
1066 is_elf_unused_section_symbols.
1067 * testsuite/binutils-all/readelf.s-64: Updated.
1068 * testsuite/binutils-all/readelf.ss: Likewise.
1069 * testsuite/binutils-all/readelf.ss-64: Likewise.
1070 * testsuite/binutils-all/readelf.s-64-unused: New file.
1071 * testsuite/binutils-all/readelf.ss-64-unused: Likewise.
1072 * testsuite/binutils-all/readelf.ss-unused: Likewise.
1073 * testsuite/lib/binutils-common.exp
1074 (is_elf_unused_section_symbols): New proc.
1075
1076 2021-01-06 Reuben Thomas <rrt@sc3d.org>
1077
1078 * binutils/readelf.c: Correct grammar in comment.
1079
1080 2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
1081
1082 * coffgrok.c (do_type): Correct spelling of auxiliary in errors.
1083 * doc/binutils.texi: Correct grammar.
1084 * readelf.c (process_version_sections): Correct spelling of auxiliary
1085 in warning.
1086 * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix.
1087
1088 2021-01-01 Alan Modra <amodra@gmail.com>
1089
1090 Update year range in copyright notice of all files.
1091
1092 For older changes see ChangeLog-2020
1093 \f
1094 Copyright (C) 2021 Free Software Foundation, Inc.
1095
1096 Copying and distribution of this file, with or without modification,
1097 are permitted in any medium without royalty provided the copyright
1098 notice and this notice are preserved.
1099
1100 Local Variables:
1101 mode: change-log
1102 left-margin: 8
1103 fill-column: 74
1104 version-control: never
1105 End: