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