Make objdump's --wide command line option affect its output of DWARF debug information.
[binutils-gdb.git] / binutils / ChangeLog
1 2017-03-10 Chia-Hao Lo <fcamel@gmail.com>
2
3 PR binutils/21235
4 * objdump.c (main): Set do_wide with --wide.
5
6 2017-03-10 Nick Clifton <nickc@redhat.com>
7
8 * readelf.c (get_machine_name): Rearrange switch table in order of
9 increasing machine number. Add missing entries.
10
11 2017-03-08 H.J. Lu <hongjiu.lu@intel.com>
12
13 PR binutils/21231
14 * readelf.c (decode_x86_isa): Change argument to unsigned int.
15 (print_gnu_property_note): Retrieve property type and datasz as
16 4-byte integer. Consolidate property datasz check. Check
17 GNU_PROPERTY_LOPROC and GNU_PROPERTY_LOUSER.
18 * testsuite/binutils-all/i386/pr21231a.d: New file.
19 * testsuite/binutils-all/i386/pr21231a.s: Likewise.
20 * testsuite/binutils-all/i386/pr21231b.d: Likewise.
21 * testsuite/binutils-all/i386/pr21231b.s: Likewise.
22 * testsuite/binutils-all/x86-64/pr21231a.d: Likewise.
23 * testsuite/binutils-all/x86-64/pr21231a.s: Likewise.
24 * testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
25 * testsuite/binutils-all/x86-64/pr21231b.s: Likewise.
26
27 2017-03-06 Nick Clifton <nickc@redhat.com>
28
29 * readelf.c (print_gnu_build_attribute_name): Read byte values
30 from the name string as unsigned bytes.
31 (process_notes_at): Use memcpy to copy an unterminated name
32 string.
33
34 2017-03-06 Sam Thursfield <sam.thursfield@codethink.co.uk>
35
36 * configure.ac (AC_CHECK_DECLS): Add asprintf.
37 * config.in: Regenerate.
38 * configure: Regenerate.
39
40 2017-03-02 Nick Clifton <nickc@redhat.com>
41
42 * readelf.c (print_gnu_build_attribute_description): Use global
43 symbols for OPEN attributes if at all possible.
44 * objcopy.c (is_merged_note_section): Support build note sections
45 without the SHF_GNU_BUILD_NOTE section flag set.
46
47 2017-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
48
49 * dwarf.c (debug_displays_assert): New static assertion.
50
51 2017-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
52
53 * dwarf.h (enum dwarf_section_display_enum): Add loclists and rnglists.
54
55 2017-03-01 Nick Clifton <nickc@redhat.com>
56
57 * readelf.c (get_note_type): Add support for GNU_BUILD_NOTEs.
58 (get_gnu_elf_note_type): Add support for GNU_PROPERTY_NOTEs.
59 (decode_x86_isa): New function.
60 (print_gnu_property_note): New function.
61 (print_gnu_note): Handle GNU_PROPERTY_NOTEs.
62 (print_gnu_build_attribute_description): New function.
63 (print_gnu_build_attribute_name): New function.
64 (process_note): Add support for GNU_BUILD_NOTEs.
65 * objcopy.c (--merge-notes): New command line option.
66 (copy_options): Add merge-notes.
67 (copy_usage): Likewise.
68 (is_merge_note_section): New function.
69 (merge_gnu_build_notes): New function.
70 (copy_object): Merge note sections if asked to do so.
71 (skip_section): Add skip_copy parameter. Add support for skipping
72 merged note sections.
73 (copy_relocations_in_section): Update call to skip_section.
74 (copy_section): Likewise.
75 (copy_main): Add support for merge-notes option.
76 * doc/binutils.texi: Document the new option to objcopy.
77 * NEWS: Mention the new feature.
78 * testsuite/binutils-all/note-2-32.d: New test. Checks note
79 merging on 32-bit targets.
80 * testsuite/binutils-all/note-2-32.s: New test source file.
81 * testsuite/binutils-all/note-2-64.d: New test. Like note-2-32.d
82 but for 64-bit targets.
83 * testsuite/binutils-all/note-2-64.s: New test source file.
84 * testsuite/binutils-all/objcopy.exp: Run the new test.
85
86 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
87
88 * objdump.c (main): Use remove_whitespace_and_extra_commas.
89
90 2017-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
91
92 Fix compilation with GCC 4.4.7.
93 * dwarf.c (display_loclists_list, display_debug_rnglists_list):
94 Initialize begin and end.
95
96 2017-02-25 Alan Modra <amodra@gmail.com>
97
98 * testsuite/binutils-all/dw5.S: Replace .string with .asciz.
99 Support hpux .comm variant.
100 * testsuite/binutils-all/readelf.exp: Define HPUX when assembling
101 dw5 test for hppa64-hpux.
102
103 2017-02-24 Nick Clifton <nickc@redhat.com>
104
105 * readelf.c (show_name, do_dynamic, do_syms, do_dyn_syms,
106 (do_reloc, do_sections, do_section_groups, do_section_details,
107 (do_segments, do_unwind, do_using_dynamic, do_header, do_dump,
108 (do_version, do_histogram, do_debugging, do_arch, do_notes,
109 (do_archive_index, is_32bit_elf, decompress_dumps): Use
110 bfd_boolean type.
111 (parse_args): Treat the do_* variables as booleans.
112 (print_vma): Return an unsigned int.
113 (print_symbol): Change width parameter to signed int.
114 (is_ia64_vms): Change return type to bfd_boolean.
115 (guess_is_rela): Likewise.
116 (slurp_rela_relocs): Likewise.
117 (slurp_rel_relocs): Likewise.
118 (dump_relocations): Likewise.
119 (process_file_header): Likewise.
120 (get_program_headers): Likewise.
121 (process_program_headers): Likewise.
122 (process_section_headers): Likewise.
123 (process_section_groups): Likewise.
124 (dump_ia64_vms_dynamic_fixups): Likewise.
125 (dump_ia64_vms_dynamic_relocs): Likewise.
126 (process_ia64_vms_dynamic_relocs): Likewise.
127 (process_relocs): Likewise.
128 (dump_ia64_unwind): Likewise.
129 (ia64_process_unwind): Likewise.
130 (dump_hppa_unwind): Likewise.
131 (slurp_hppa_unwind_table): Likewise.
132 (hppa_process_unwind): Likewise.
133 (decode_arm_unwind_bytecode): Likewise.
134 (decode_tic6x_unwind_bytecode): Likewise.
135 (decode_arm_unwind): Likewise.
136 (dump_arm_unwind): Likewise.
137 (arm_process_unwind): Likewise.
138 (process_unwind): Likewise.
139 (get_32bit_dynamic_section): Likewise.
140 (get_64bit_dynamic_section): Likewise.
141 (process_dynamic_section): Likewise.
142 (process_version_sections): Likewise.
143 (process_symbol_table): Likewise.
144 (process_syminfo): Likewise.
145 (apply_relocations): Likewise.
146 (disassemble_section): Likewise.
147 (dump_section_as_strings): Likewise.
148 (dump_section_as_bytes): Likewise.
149 (load_specific_debug_section): Likewise.
150 (load_debug_section): Likewise.
151 (display_debug_section): Likewise.
152 (process_section_contents): Likewise.
153 (process_attributes): Likewise.
154 (process_nds32_specific): Likewise.
155 (process_gnu_liblist): Likewise.
156 (print_core_note): Likewise.
157 (print_gnu_note): Likewise.
158 (print_v850_note): Likewise.
159 (process_netbsd_elf_note): Likewise.
160 (print_stapsdt_note): Likewise.
161 (print_ia64_vms_note): Likewise.
162 (process_note): Likewise.
163 (process_notes_at): Likewise.
164 (process_corefile_note_segments): Likewise.
165 (process_v850_notes): Likewise.
166 (process_note_sections): Likewise.
167 (process_notes): Likewise.
168 (process_arch_specific): Likewise.
169 (get_file_header): Likewise.
170 (process_object): Likewise.
171 (process_archive): Likewise.
172 (process_file): Likewise.
173 (section_subset): Make static.
174 (get_mips_reg_size): Return a signed integer.
175 (process_object): Reverse the logic of the return value.
176 (process_archive): Likewise.
177 (process_file): Likewise.
178 (process_program_headers): Fix snafu - if the program headers are
179 not available then this is not a cause to fail.
180 (process_corefile_note_segments): Likewise.
181
182 2017-02-24 Maciej W. Rozycki <macro@imgtec.com>
183
184 * readelf.c (get_ver_flags): Tidy the formatting of the string
185 returned
186
187 2017-02-24 Maciej W. Rozycki <macro@imgtec.com>
188
189 * readelf.c (process_version_sections) <SHT_GNU_verdef>: Make
190 `isum' unsigned.
191 <SHT_GNU_verneed>: Likewise.
192
193 2017-02-24 Maciej W. Rozycki <macro@imgtec.com>
194
195 * readelf.c (process_version_sections) <SHT_GNU_verdef>: Limit
196 the number of entries processed by the section size. Don't
197 break out of the loop if `ent.vd_next' is 0.
198
199 2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
200
201 * testsuite/binutils-all/dw5.S: New file.
202 * testsuite/binutils-all/dw5.W: New file.
203 * testsuite/binutils-all/readelf.exp (readelf -wiaoRlL): New test.
204
205 2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
206
207 * dwarf.c (read_and_display_attr_value): Support DW_FORM_data16.
208
209 2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
210
211 * dwarf.c (display_debug_macro): Support DWARF-5. Rename
212 DW_MACRO_GNU_*.
213
214 2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
215
216 * dwarf.c (decode_location_expression): Support DW_OP_implicit_pointer,
217 DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type, DW_OP_convert
218 and DW_OP_reinterpret.
219 (read_and_display_attr_value): Support DW_AT_call_value,
220 DW_AT_call_data_value, DW_AT_call_target and
221 DW_AT_call_target_clobbered.
222
223 2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
224
225 * dwarf.c (fetch_indirect_line_string): New function.
226 (abbrev_attr): New field implicit_const.
227 (add_abbrev_attr): New parameter implicit_const.
228 (process_abbrev_section): Support DW_FORM_implicit_const.
229 (decode_location_expression): Support DW_OP_entry_value.
230 (read_and_display_attr_value): Add parameter implicit_const. Support
231 DW_FORM_line_strp and DW_FORM_implicit_const.
232 (read_and_display_attr): Add parameter implicit_const.
233 (process_debug_info): Support line_str and DWARF-5.
234 (read_debug_line_header): Support DWARF-5.
235 (display_formatted_table): New function.
236 (display_debug_lines_raw): New parameter file. Support DWARF-5.
237 (display_debug_lines_decoded): New parameter fileptr. Support DWARF-5.
238 (display_debug_lines): Pass file parameter.
239 (display_debug_macro): Update read_and_display_attr_value caller.
240 (display_debug_abbrev): Support DW_FORM_implicit_const.
241 (display_loclists_list): New function.
242 (display_loc_list): Support .debug_loclists.
243 (display_debug_ranges_list): New function from display_debug_ranges.
244 (display_debug_rnglists_list): New function.
245 (display_debug_ranges): Support .debug_rnglists.
246 (debug_displays): Add .debug_line_str, .debug_loclists and
247 .debug_rnglists.
248 * dwarf.h: Include dwarf2.h
249 (DWARF2_Internal_LineInfo): Add li_offset_size.
250 (DWARF2_Internal_CompUnit): Add cu_unit_type.
251 (enum dwarf_section_display_enum): Add line_str.
252 * readelf.c (process_section_headers): Add rnglists and loclists.
253
254 2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
255
256 * dwarf.c (display_block): Add parameter delimiter.
257 (decode_location_expression): Update display_block callers.
258 (read_and_display_attr_value): Add parameter delimiter.
259 (read_and_display_attr, display_debug_macro): Update
260 read_and_display_attr_value caller.
261
262 2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
263
264 * dwarf.c (display_loc_list): Use dwarf_vma for offset, base_address
265 and off.
266 (display_loc_list_dwo): Use dwarf_vma for offset.
267 (display_debug_loc): Use dwarf_vma for offset, base_address.
268 (struct range_entry, range_entry_compar): Use dwarf_vma for
269 ranges_offset.
270 (display_debug_ranges): Use dwarf_vma for ranges_offset, offset and
271 base_address.
272
273 2017-02-23 Nick Clifton <nickc@redhat.com>
274
275 * readelf.c (display_tag_value): Use an explicit signed type for
276 the tag parameter.
277 (display_gnu_attributes): Use an unsigned integer type for
278 attribute tags.
279 (display_power_gnu_attribute): Likewise.
280 (display_s390_gnu_attribute): Likewise.
281 (display_sparc_hwcaps): Likewise.
282 (display_sparc_hwcaps2): Likewise.
283 (display_sparc_gnu_attribute): Likewise.
284 (display_mips_gnu_attribute): Likewise.
285 (display_tic6x_attribute): Likewise.
286 (display_raw_attribute): Likewise.
287 (process_attributes): Likewise.
288 (process_arm_specific): Delete redundant function.
289 (process_power_specific): Likewise.
290 (process_s390_specific): Likewise.
291 (process_sparc_specific): Likewise.
292 (process_tic6x_specific): Likewise.
293 (process_msp430x_specific): Likewise.
294 (display_public_gnu_attributes): New function. Displays known
295 information about an unknown gnu attribute.
296 (display_generic_attribute): New function. Calls
297 display_tag_value for non-nul tags.
298 (process_arch_specific): Call process_attributes even for
299 architectures not known to specifically support gnu attributes.
300
301 2017-02-22 Jan Kratochvil <jan.kratochvil@redhat.com>
302
303 * dwarf.c (decode_location_expression): Display also OP.
304
305 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
306
307 * readelf.c (process_version_sections) <SHT_GNU_verdef>: Print a
308 new line between the heading and the first version definition
309 entry.
310
311 2017-02-20 Nick Clifton <nickc@redhat.com>
312
313 PR binutils/21156
314 * dwarf.c (cu_tu_indexes_read): Move into...
315 (load_cu_tu_indexes): ... here. Change the variable into
316 tri-state. Change the function into boolean, returning
317 false if the indicies could not be loaded.
318 (find_cu_tu_set): Return NULL if the indicies could not be
319 loaded.
320
321 2017-02-17 Nick Clifton <nickc@redhat.com>
322
323 PR binutils/21156
324 * readelf.c (find_section_in_set): Test for invalid section
325 indicies.
326
327 2017-02-17 Nick Clifton <nickc@redhat.com>
328
329 * readelf.c (get_section_type_name): Add decoding of GNU section
330 types.
331
332 2017-02-15 Nick Clifton <nickc@redhat.com>
333
334 * MAINTAINERS: (MIPS, MN10300): Move Eric Christopher to Past
335 Maintainers section.
336
337 2017-02-14 Nick Clifton <nickc@redhat.com>
338
339 PR binutils/21159
340 * readelf.c (dump_section_as_strings): Reset the start address if
341 no decompression is perfromed.
342 (dump_section_as_bytes): Likewise.
343
344 2017-02-14 Nick Clifton <nickc@redhat.com>
345
346 PR binutils/21158
347 * rddbg.c (read_symbol_stabs_debugging_info): Check for a null or
348 empty symbol name.
349
350 2017-02-14 Nick Clifton <nickc@redhat.com>
351
352 PR binutils/21157
353 * stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE
354 pairs.
355 (parse_number): Exit early if passed an empty string.
356
357 2017-02-14 Nick Clifton <nickc@redhat.com>
358
359 PR binutils/21155
360 * readelf.c (IN_RANGE): New macro. Tests for an address + offset
361 being within a given range.
362 (target_specific_reloc_handling): Use macro to test for underflow
363 as well as overflow of reloc offset.
364
365 2017-02-13 Nick Clifton <nickc@redhat.com>
366
367 PR binutils/21150
368 * nm.c (file_symbol): Add test of string length before testing
369 string characters.
370
371 2017-02-13 Nick Clifton <nickc@redhat.com>
372
373 PR binutils/21135
374 * readelf.c (dump_section_as_bytes): Handle the case where
375 uncompress_section_contents returns false.
376 (dump_section_as_bytes, load_specific_debug_section): Likewise.
377
378 2017-02-13 Nick Clifton <nickc@redhat.com>
379
380 PR binutils/21149
381 * readelf.c (get_compression_header): Add size parameter. Check
382 size against sizeof compression header before attempting to
383 extract the header.
384 (process_section_headers): Pass size to get_compression_header.
385 (dump_section_as_strings): Likewise.
386 (dump_section_as_bytes): Likewise.
387 (load_specific_debug_section): Likewise.
388
389 2017-02-13 Nick Clifton <nickc@redhat.com>
390
391 PR binutils/21148
392 * readelf.c (process_version_sections): Include size of auxillary
393 version information when checking for buffer overflow.
394
395 2017-02-13 Nick Clifton <nickc@redhat.com>
396
397 PR binutils/21147
398 * readelf.c (process_section_contents): Fix off by one error
399 reporting un-dumped sections.
400
401 2017-02-13 Nick Clifton <nickc@redhat.com>
402
403 PR binutils/21139
404 * readelf.c (target_specific_reloc_handling): Add num_syms
405 parameter. Check for symbol table overflow before accessing
406 symbol value. If reloc pointer is NULL, discard all saved state.
407 (apply_relocations): Pass num_syms to target_specific_reloc_handling.
408 Call target_specific_reloc_handling with a NULL reloc pointer
409 after processing all of the relocs.
410
411 2017-02-13 Nick Clifton <nickc@redhat.com>
412
413 PR binutils/21137
414 * readelf.c (target_specific_reloc_handling): Add end parameter.
415 Check for buffer overflow before writing relocated values.
416 (apply_relocations): Pass end to target_specific_reloc_handling.
417
418 2017-01-27 Dilyan Palauzov <dilyan.palauzov@aegee.org>
419 Nick Clifton <nickc@redhat.com>
420
421 PR 20343
422 * doc/binutils.texi (ar): Extend documentation of the --plugin
423 option. Include a description of where the plugins should be
424 located.
425 (nm): Likewise.
426
427 2017-01-23 Nick Clifton <nickc@redhat.com>
428
429 * MAINTAINERS: Add Bernd to Past Maintainers section.
430 (SCORE): Remove Mei Ligang as maintainer. Add to Past Maintainers
431 section.
432
433 2017-01-23 Bernd Schmidt <bschmidt@redhat.com>
434
435 * MAINTAINERS (BFIN): Remove myself as Blackfin maintainer.
436
437 2017-01-20 Andrew Burgess <andrew.burgess@embecosm.com>
438
439 * objdump.c (dump_section_header): Extract max section name length
440 from data parameter, use this when formatting output.
441 (find_longest_section_name): New function.
442 (dump_headers): Calculate longest section name when in wide mode,
443 reformat to unify printing of header line.
444
445 2017-01-18 Bernhard Rosenkranzer <bero@lindev.ch>
446
447 PR 21059
448 * arlex.l: Support processing with flex 2.6.3.
449 * deflex.l: Likewise.
450
451 2017-01-17 Dmitry Timoshkov <dmitry@baikal.ru>
452
453 * resbin.c: Optional dialog control data immediately follows
454 the control description without alignment.
455 * testsuite/binutils-all/windres/controldata.rc: New test.
456 source.
457 * testsuite/binutils-all/windres/controldata.rsd: New test.
458
459 2017-01-12 Nick Clifton <nickc@redhat.com>
460
461 PR binutils/20876
462 * NEWS: Mention the new feature.
463 * testsuite/binutils-all/objdump.exp (test_build_id_debuglink):
464 New proc to test the location of separate debug info files using
465 the build-id method.
466
467 2017-01-10 Nick Clifton <nickc@redhat.com>
468
469 PR 21034
470 * stabs.c (parse_stab_members): Fix thinko checking for g++
471 version 1 stabs information.
472
473 2017-01-09 Nick Clifton <nickc@redhat.com>
474
475 * objdump.c (display_file): Add new parameter 'last_file'. If
476 last_file is true, do not call bfd_close at the end of the
477 function.
478 (main): Set the value of the last_file parameter when calling
479 display_file.
480
481 2017-01-09 Alan Modra <amodra@gmail.com>
482
483 * readelf.c (process_section_headers): Correct .rel.dyn/.rela.dyn
484 comment.
485
486 2017-01-06 Nick Clifton <nickc@redhat.com>
487
488 * MAINTAINERS: Move Paul Brook to the Past Maintainers section.
489
490 2017-01-04 Dilan Palauzov <dilyan.palauzov@aegee.org>
491
492 PR 20958
493 * syslex.l (option): Add noyywrap
494 (yywrap): Delete.
495
496 2017-01-02 Alan Modra <amodra@gmail.com>
497
498 Update year range in copyright notice of all files.
499
500 For older changes see ChangeLog-2016
501 \f
502 Copyright (C) 2017 Free Software Foundation, Inc.
503
504 Copying and distribution of this file, with or without modification,
505 are permitted in any medium without royalty provided the copyright
506 notice and this notice are preserved.
507
508 Local Variables:
509 mode: change-log
510 left-margin: 8
511 fill-column: 74
512 version-control: never
513 End: