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