readelf memory leaks processing mips
[deliverable/binutils-gdb.git] / binutils / ChangeLog
1 2020-04-14 Alan Modra <amodra@gmail.com>
2
3 * readelf.c (process_mips_specific): Free eopt and iopt. Avoid
4 possibility of overflow when checking number of conflicts.
5
6 2020-04-14 H.J. Lu <hongjiu.lu@intel.com>
7
8 PR binutils/25707
9 * readelf.c (nbuckets): New.
10 (nchains): Likewise.
11 (buckets): Likewise.
12 (chains): Likewise.
13 (ngnubuckets): Likewise.
14 (gnubuckets): Likewise.
15 (gnuchains): Likewise.
16 (mipsxlat): Likewise.
17 (ngnuchains): Likewise.
18 (gnusymidx): Likewise.
19 (VALID_SYMBOL_NAME): Likewise.
20 (VALID_DYNAMIC_NAME): Use it.
21 (get_dynamic_data): Moved before process_dynamic_section.
22 (get_num_dynamic_syms): New function.
23 (process_dynamic_section): Use DT_SYMTAB, DT_SYMENT, DT_HASH,
24 DT_GNU_HASH and DT_MIPS_XHASH to reconstruct dynamic symbol
25 table. Use DT_STRTAB and DT_STRSZ to reconstruct dynamic string
26 table.
27 (get_symbol_index_type): Don't print "bad section index" when
28 there is no section header.
29 (print_dynamic_symbol): Rewrite.
30 (process_symbol_table): Call print_dynamic_symbol to dump dynamic
31 symbol table.
32
33 2020-04-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
34
35 * testsuite/lib/binutils-common.exp (supports_gnu_osabi): Don't
36 enable on *-*-solaris*.
37
38 2020-03-30 Nick Clifton <nickc@redhat.com>
39
40 PR binutils/25662
41 * objcopy.c (copy_object): When copying PE format files set the
42 timestamp field in the pe_data structure if the preserve_dates
43 flag is set.
44 * testsuite/binutils-all/objcopy.exp (objcopy_test) Use
45 --preserve-dates in place of the -p option, in order to make its
46 effect more obvious.
47
48 2020-03-28 Alan Modra <amodra@gmail.com>
49
50 * testsuite/binutils-all/objcopy.exp (objcopy_test): Only
51 clear_xfail hppa*-*-*elf*. Revert mips xfails.
52
53 2020-03-28 Alan Modra <amodra@gmail.com>
54
55 * testsuite/binutils-all/objcopy.exp (objcopy_test): Move xfails
56 from here to calls. Remove "m8*-*-*" entry. Don't xfail tic54x
57 but do xfail spu, mipstx39 and mips-sgi-irix for the executable
58 test. Pass "-p" to objcopy for the executable test.
59
60 2020-03-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
61
62 PR binutils/25662
63 * testsuite/binutils-all/objcopy.exp (objcopy_test): Add argument to
64 specify whether an object file or executable should be built and tested.
65 Change test names to report whether an object file or executable is
66 being tested.
67 * testsuite/binutils-all/pr25662.ld: New test.
68 * testsuite/binutils-all/pr25662.s: New test.
69
70 2020-03-27 Alan Modra <amodra@gmail.com>
71
72 * readelf.c (process_archive): Don't double free qualified_name.
73 Don't break out of loop with "negative" archive_file_size, just
74 set file offset to max.
75
76 2020-03-25 Alan Modra <amodra@gmail.com>
77
78 * readelf.c (process_archive): Prevent endless loop.
79
80 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
81
82 PR binutils/25708
83 * nm.c (print_symname): Replace _bfd_elf_get_symbol_version_name
84 with bfd_get_symbol_version_string.
85 (print_symbo): Pass TRUE to bfd_get_symbol_version_string.
86 * objdump.c (objdump_print_symname): Likewise.
87
88 2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
89
90 PR binutils/25708
91 * nm.c (SYM_NAME): Removed.
92 (print_symname): Add a pointer to struct extended_symbol_info
93 argument. Call _bfd_elf_get_symbol_version_name to get symbol
94 version.
95 (print_symdef_entry): Pass NULL to print_symname.
96 (print_symbol_info_bsd): Update call to print_symname.
97 (print_symbol_info_sysv): Likewise.
98 (print_symbol_info_posix): Likewise.
99
100 2020-03-24 Alan Modra <amodra@gmail.com>
101
102 * readelf.c (process_mips_specific): Free iconf on error path.
103
104 2020-03-23 Nick Clifton <nickc@redhat.com>
105
106 PR 25714
107 * wrstabs.c (stab_pop_type): Replace assertion with error return.
108 * write_stabs_in_sections_debugging_info: Likewise.
109 * stab_enum_type: Likewise.
110 * stab_modify_type: Likewise.
111 * stab_struct_field: Likewise.
112 * stab_end_struct_type: Likewise.
113 * stab_start_class_type: Likewise.
114 * stab_class_static_member: Likewise.
115 * stab_class_baseclass: Likewise.
116 * stab_class_start_method: Likewise.
117 * stab_class_method_var: Likewise.
118 * stab_class_end_method: Likewise.
119 * stab_end_class_type: Likewise.
120 * stab_typedef_type: Likewise.
121 * stab_start_function: Likewise.
122 * stab_end_block: Likewise.
123 * stab_lineno: Likewise.
124
125 2020-03-20 Nick Clifton <nickc@redhat.com>
126
127 * readelf.c (get_compression_header): Add ATTRIBUTE_WARN_UNUSED_RESULT.
128 (process_section_headers): Check the return value from
129 get_compression_header.
130 (dump_section_as_strings): Likewise.
131 (dump_section_as_bytes): Likewise.
132 (load_specific_debug_section): Likewise.
133
134 2020-03-20 H.J. Lu <hongjiu.lu@intel.com>
135
136 * ar.c (main): Update bfd_plugin_set_program_name call.
137 * nm.c (main): Likewise.
138
139 2020-03-19 Nick Clifton <nickc@redhat.com>
140
141 PR 25676
142 * testsuite/binutils-all/dw4.s: New test source file.
143 * testsuite/binutils-all/nm.exp: Run the new test.
144
145 2020-03-19 H.J. Lu <hongjiu.lu@intel.com>
146
147 * readelf.c (process_symbol_table): Use unsigned long for si.
148
149 2020-03-19 Alan Modra <amodra@gmail.com>
150
151 * elfcomm.c: Don't include bfd.h or bucomm.h.
152 (program_name): Declare.
153 (process_archive_index_and_symbols): Replace bfd_boolean with int,
154 and substitute FALSE and TRUE.
155 (setup_archive, setup_nested_archive): Likewise.
156 * elfcomm.h: Likewise.
157
158 2020-03-19 Alan Modra <amodra@gmail.com>
159
160 * readelf.c (process_archive): Always return via path freeing
161 memory. Formatting.
162
163 2020-03-19 Alan Modra <amodra@gmail.com>
164
165 * readelf.c (process_netbsd_elf_note): Validate descsz before
166 accessing descdata. Formatting.
167
168 2020-03-19 Alan Modra <amodra@gmail.com>
169
170 * elfcomm.c (setup_archive): Make file_size an off_t. Comment.
171 * elfcomm.h (setup_archive): Update prototype.
172
173 2020-03-16 Alan Modra <amodra@gmail.com>
174
175 * readelf.c (get_symbols): New function.
176 (process_relocs, ia64_process_unwind, hppa_process_unwind),
177 (arm_process_unwind, get_symbol_for_build_attribute): Use it.
178
179 2020-03-16 Alan Modra <amodra@gmail.com>
180
181 * unwind-ia64.c (unw_decode_uleb128): Prevent overlarge shifts.
182 Detect shift overflows and check that terminating byte is found.
183 Print an error on a bad uleb128.
184
185 2020-03-14 Alan Modra <amodra@gmail.com>
186
187 * readelf.c (process_file): Clean ba_cache.
188
189 2020-03-14 Alan Modra <amodra@gmail.com>
190
191 * elfcomm.h (setup_archive): Update prototype.
192 * elfcomm.c (setup_archive): Add file_size parameter and sanity
193 check longnames_size.
194 (setup_nested_archive): Get file size and pass to setup_archive.
195 * elfedit.c (process_archive): Likewise.
196 * readelf.c (process_archive): Pass filedata->file_size to
197 setup_archive.
198
199 2020-03-14 Alan Modra <amodra@gmail.com>
200
201 * readelf.c (dump_section_as_strings): Free memory on error exit.
202 (dump_section_as_bytes, process_notes_at): Likewise.
203 (get_build_id): Free enote.
204
205 2020-03-13 Kamil Rytarowski <n54@gmx.com>
206
207 * readelf.c (get_netbsd_elfcore_note_type): Add support for
208 NT_NETBSDCORE_LWPSTATUS notes.
209
210 2020-03-13 Alan Modra <amodra@gmail.com>
211
212 * elfcomm.c (get_archive_member_name): Always return malloc'd
213 string or NULL.
214 * elfedit.c (process_archive): Tidy memory on all return paths.
215 * readelf.c (process_archive): Likewise.
216 (process_symbol_table): Likewise.
217 (ba_cache): New, replacing ..
218 (get_symbol_for_build_attribute): ..static vars here. Free
219 strtab and symtab before loading new ones. Reject symtab without
220 valid strtab in loop, breaking out of loop on valid symtab.
221 (process_file): Free ba_cache symtab and strtab here, resetting
222 ba_cache.
223
224 2020-03-12 Alan Modra <amodra@gmail.com>
225
226 * readelf.c (process_section_headers): Don't just set
227 filedata->section_headers NULL, free it first. Similarly for
228 dynamic_symbols, dynamic_strings, dynamic_syminfo and
229 symtab_shndx_list. Zero associated counts too.
230 (process_object): Free symtab_shndx_list.
231 (process_file): Free various allocated filedata tables.
232
233 2020-03-11 Nick Clifton <nickc@redhat.com>
234
235 PR 25611
236 PR 25614
237 * dwarf.h (DWARF2_Internal_LineInfo): Add li_address_size and
238 li_segment_size fields.
239 * dwarf.c (read_debug_line_header): Record the address size and
240 segment selector size values (if present) in the lineinfo
241 structure.
242 (display_formatted_table): Warn if the format count is empty but
243 the table itself is not empty.
244 Display the format count and entry count at the start of the table
245 dump.
246 (display_debug_lines_raw): Display the address size and segement
247 selector size fields, if present.
248 * testsuite/binutils-all/dw5.W: Update expected output.
249
250 2020-03-11 Alan Modra <amodra@gmail.com>
251
252 PR 25651
253 * objcopy.c (copy_object): Test "gaps" not gap_fill_set or
254 pad_to_set on second block of code dealing with padding.
255 Replace "c" with "num_sec" and don't recalculate number of
256 sections on second block. Size arrays using sizeof (element)
257 rather than sizeof (element type).
258
259 2020-03-10 Alan Modra <amodra@gmail.com>
260
261 * objdump.c (disassemble_section): Don't call qsort unless
262 sym count is at least two.
263 (disassemble_data): Don't call memcpy with NULL src.
264
265 2020-03-09 Alan Modra <amodra@gmail.com>
266
267 PR 25645
268 * readelf.c (dump_ia64_vms_dynamic_fixups): Pass size and nmemb
269 to get_data rather than multiplying.
270 (dump_ia64_vms_dynamic_relocs): Likewise.
271 (process_version_sections): Correct order of size and nmemb args
272 in get_data call.
273 (process_mips_specific): Likewise.
274
275 2020-03-08 H.J. Lu <hongjiu.lu@intel.com>
276
277 * readelf.c (get_dynamic_data): Replace "memory chekers" with
278 "memory checkers" in comments.
279
280 2020-03-06 Simon Marchi <simon.marchi@efficios.com>
281
282 PR 25491
283 * doc/Makefile.am: Rename MOSTLYCLEANFILES to MAINTAINERCLEANFILES.
284 * doc/Makefile.in: Re-generate.
285
286 2020-03-06 Nick Clifton <nickc@redhat.com>
287
288 * objcopy.c (check_new_section_flags): New function. Reject the
289 SEC_COFF_SHARED flag if the target is not a COFF binary.
290 (copy_object): Call check_new_section_flags.
291 (setup_section): Likewise.
292 * doc/binutils.texi (objcopy): Add a note that the 'share' section
293 flag cannot be applied to ELF binaries.
294
295 2020-03-06 Alan Modra <amodra@gmail.com>
296
297 PR 25637
298 * objcopy.c (filter_symbols): Correct rem_leading_char logic.
299
300 2020-03-05 Alan Modra <amodra@gmail.com>
301
302 PR 25629
303 * objcopy.c (filter_symbols): Don't segfault on NULL
304 prefix_symbols_string.
305
306 2020-03-04 Christian Eggers <ceggers@gmx.de>
307
308 * objcopy.c (copy_object): Convert from bytes to octets for
309 --gap-fill and --pad-to.
310
311 2020-03-03 Nick Clifton <nickc@redhat.com>
312
313 PR 25625
314 * prdbg.c (pr_tag_type): Remove call to abort.
315
316 2020-03-02 Aaron Merey <amerey@redhat.com>
317
318 * binutils/testsuite/binutils-all/debuginfod.exp: Improve port
319 selection.
320
321 2020-03-02 Nick Clifton <nickc@redhat.com>
322
323 PR 25543
324 * readelf.c (dump_section_as_strings): Display new-line characters
325 as \n and then insert a line break.
326 * testsuite/binutils-all/pr25543.s: New test.
327 * testsuite/binutils-all/pr25543.d: Test driver.
328 * testsuite/binutils-all/readelf.exp: Run the new test.
329
330 2020-02-27 Nick Clifton <nickc@redhat.com>
331
332 PR 25526
333 * readelf.c (process_ia64_vms_dynamic_relocs): Check to see if
334 get_data is unable to load the string table.
335
336 2020-02-26 Alan Modra <amodra@gmail.com>
337
338 * elfedit.c: Indent labels correctly.
339 * readelf.c: Likewise.
340 * resres.c: Likewise.
341
342 2020-02-25 H.J. Lu <hongjiu.lu@intel.com>
343
344 PR binutils/25584
345 * ar.c (main): Pass 0 to bfd_plugin_set_program_name.
346 * nm.c (main): Pass 1 to bfd_plugin_set_program_name.
347
348 2020-02-24 Nick Clifton <nickc@redhat.com>
349
350 PR 25499
351 * doc/binutils.texi (objdump): Fix typo in description of
352 objdump's -g option.
353
354 2020-02-20 Nelson Chu <nelson.chu@sifive.com>
355
356 * dwarf.c (regname_internal_riscv): Updated since the DECLARE_CSR
357 is changed.
358
359 2020-02-19 Jordan Rupprecht <rupprecht@google.com>
360
361 * objdump.c (show_line): call bfd_demangle when using do_demangle.
362
363 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
364
365 * configure: Regenerate.
366
367 2020-02-10 Fangrui Song <maskray@google.com>
368
369 * objcopy.c (parse_flags): Handle "exclude".
370 * doc/binutils.texi: Document the support.
371
372 2020-02-10 Aaron Merey <amerey@redhat.com>
373
374 * binutils/testsuite/binutils-all/debuginfod.exp:
375 Replace set ::env with setenv.
376 Start server before setting environment variable.
377 Specify tmpdir as the location of the server's
378 database.
379 Check additional server metrics at start-up.
380
381 2020-02-07 Nick Clifton <nickc@redhat.com>
382
383 * README-how-to-make-a-release: Add note about updating the
384 GAS/NEWS URL in the next release.
385
386 2020-02-07 Sergey Belyashov <sergey.belyashov@gmail.com>
387
388 PR 25469
389 * readelf.c (get_machine_flags): Add support for Z80N machine
390 number.
391
392 2020-02-07 Nick Clifton <nickc@redhat.com>
393
394 * dwarf.c (display_debug_lines_decoded): Force a NUL termination
395 of the truncated file name.
396
397 2020-02-06 Andrew Burgess <andrew.burgess@embecosm.com>
398
399 * objdump.c (print_jump_visualisation): New function.
400 (disassemble_bytes): Call new function.
401
402 2020-02-06 Alan Modra <amodra@gmail.com>
403
404 * testsuite/lib/binutils-common.exp (match_target): Accept '!' before
405 TCL procedure.
406 (supports_gnu_osabi): New procedure.
407 (is_generic): New, from ld-lib.exp.
408 (supports_gnu_unique): Use the above.
409
410 2020-02-04 Alan Modra <amodra@gmail.com>
411
412 * Makefile.am (CFILES): Add od-elf32_avr.c.
413 * Makefile.in: Regenerate.
414 * po/POTFILES.in: Regenerate.
415
416 2020-02-03 Andreas Schwab <schwab@linux-m68k.org>
417
418 * readelf.c (dump_relocations, dump_relocations)
419 (decode_arm_unwind_bytecode, process_dynamic_section)
420 (get_symbol_visibility, get_alpha_symbol_other): Add newline to
421 error message.
422
423 2020-02-03 Sergei Trofimovich <siarheit@google.com>
424
425 * coffdump.c (program_name): Drop redundant definition.
426 * srconv.c (program_name): Likewise
427 * sysdump.c (program_name): Likewise
428
429 2020-02-02 H.J. Lu <hongjiu.lu@intel.com>
430
431 PR gas/25380
432 * objdump.c (sym_ok): Return FALSE if 2 sections are in the
433 same file with different section pointers.
434
435 2020-02-01 Nick Clifton <nickc@redhat.com>
436
437 * README-how-to-make-a-release: Update with more details on the
438 release making process.
439
440 2020-01-31 Nick Clifton <nickc@redhat.com>
441
442 * po/sv.po: Updated Swedish translation.
443
444 2020-01-28 Nick Clifton <nickc@redhat.com>
445
446 * readelf.c (get_build_id): Simplify warning message about corrupt
447 notes encountered whilst scanning for the build-id.
448
449 2020-01-27 Roland McGrath <mcgrathr@google.com>
450
451 * objcopy.c (compare_gnu_build_notes): Fix comparison results
452 for overlapping ranges so that (A == B) == (B == A) holds.
453
454 2020-01-27 Alan Modra <amodra@gmail.com>
455
456 * testsuite/lib/binutils-common.exp (big_or_little_endian): Replace
457 case statement with switch statement.
458
459 2020-01-24 Nick Clifton <nickc@redhat.com>
460
461 * readelf.c (get_build_id): Fix warning messages about corrupt
462 notes.
463
464 2020-01-23 Nick Clifton <nickc@redhat.com>
465
466 * po/fr.po: Updated French translation.
467
468 2020-01-22 Yuri Chornoivan <yurchor@mageia.org>
469
470 PR 25417
471 * readelf.c (get_alpha_symbol_other): Fix error message typo.
472
473 2020-01-20 Nick Clifton <nickc@redhat.com>
474
475 * po/pt.po: Updated Portuguese translation.
476 * po/uk.po: Updated Ukranian translation.
477
478 2020-01-18 Nick Clifton <nickc@redhat.com>
479
480 * README-how-to-make-a-release: Update notes on how to cut a
481 branch for a release.
482
483 2020-01-18 Nick Clifton <nickc@redhat.com>
484
485 * configure: Regenerate.
486 * po/binutils.pot: Regenerate.
487
488 2020-01-18 Nick Clifton <nickc@redhat.com>
489
490 Binutils 2.34 branch created.
491
492 2020-01-17 Thomas Troeger <tstroege@gmx.de>
493
494 * objdump.c (jump_info_visualize_address): Discard jumps that are
495 no longer needed.
496 (disassemble_bytes): Only compute the maximum level if jumps were
497 detected.
498
499 2020-01-13 Nick Clifton <nickc@redhat.com>
500
501 * objdump.c (disassemble_bytes): Remove C99-ism.
502 * testsuite/binutils-all/debuginfod.exp: New tests.
503
504 2020-01-13 Thomas Troeger <tstroege@gmx.de>
505
506 * objdump.c (visualize_jumps, color_output, extended_color_output)
507 (detected_jumps): New variables.
508 (usage): Add the new jump visualization options.
509 (option_values): Add new option value.
510 (long_options): Add the new option.
511 (jump_info_new, jump_info_free): New functions.
512 (jump_info_min_address, jump_info_max_address): Likewise.
513 (jump_info_end_address, jump_info_is_start_address): Likewise.
514 (jump_info_is_end_address, jump_info_size): Likewise.
515 (jump_info_unlink, jump_info_insert): Likewise.
516 (jump_info_add_front, jump_info_move_linked): Likewise.
517 (jump_info_intersect, jump_info_merge): Likewise.
518 (jump_info_sort, jump_info_visualize_address): Likewise.
519 (disassemble_jumps): New function - used to locate jumps.
520 (disassemble_bytes): Add ascii art generation.
521 (disassemble_section): Add scan to locate jumps.
522 (main): Parse the new visualization option.
523 * doc/binutils.texi: Document the new feature.
524 * NEWS: Mention the new feature.
525
526 2020-01-13 Alan Modra <amodra@gmail.com>
527
528 PR 25360
529 PR 25361
530 * dwarf.c (display_debug_frames): Move fde_fc earlier. Free
531 fde_fc col_type and col_offset.
532 * readelf.c (apply_relocations): Move symsec check earlier.
533 (free_debug_section): Free reloc_info.
534 (process_notes_at): Free pnotes on error path.
535 (process_object): Free dump_sects here..
536 (process_archive): ..not here.
537
538 2020-01-13 Alan Modra <amodra@gmail.com>
539
540 PR 25362
541 * nm.c (display_rel_file): Free dyn_syms.
542
543 2020-01-09 Nick Clifton <nickc@redhat.com>
544
545 PR 25220
546 * objcopy.c (empty_name): New variable.
547 (need_sym_before): Prevent an attempt to free a static variable.
548 (filter_symbols): Avoid strcmp test by checking for pointer
549 equality.
550
551 2020-01-09 Nick Clifton <nickc@redhat.com>
552
553 * po/zh_TW.po: Updated Traditional Chinese translation.
554
555 2020-01-09 Aaron Merey <amerey@redhat.com>
556
557 * Makefile.am (readelf_LDADD, objdump_LDADD): Add libdebuginfod.
558 * Makefile.in: Regenerate.
559 * NEWS: Update.
560 * config.in: Regenerate.
561 * configure: Regenerate.
562 * configure.ac: Call AC_DEBUGINFOD.
563 * doc/Makefile.in: Regenerate.
564 * doc/binutils.texi: Add section on using binutils
565 with debuginfod.
566 * dwarf.c (debuginfod_fetch_separate_debug_info): New function.
567 Query debuginfod servers for the target debug file.
568 (load_separate_debug_info): Call
569 debuginfod_fetch_separate_debug_info if configured with
570 debuginfod.
571 (load_separate_debug_files): Add file argument to
572 load_separate_debug_info calls.
573 * dwarf.h (get_build_id): Add declaration.
574 * objdump.c (get_build_id): New function. Get build-id of file.
575 * readelf.c (get_build_id): Likewise.
576 * testsuite/binutils-all/debuginfod.exp: New tests.
577 * testsuite/binutils-all/linkdebug.s: Add .note.gnu.build-id
578 section.
579
580 2020-01-02 Sergey Belyashov <sergey.belyashov@gmail.com>
581
582 * readelf.c: Add support for new Z*) relocations and machine
583 types.
584
585 2020-01-01 Alan Modra <amodra@gmail.com>
586
587 Update year range in copyright notice of all files.
588
589 For older changes see ChangeLog-2019
590 \f
591 Copyright (C) 2020 Free Software Foundation, Inc.
592
593 Copying and distribution of this file, with or without modification,
594 are permitted in any medium without royalty provided the copyright
595 notice and this notice are preserved.
596
597 Local Variables:
598 mode: change-log
599 left-margin: 8
600 fill-column: 74
601 version-control: never
602 End:
This page took 0.050974 seconds and 5 git commands to generate.