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