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