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