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