Add bfd_get_file_size to get archive element size
[external/binutils.git] / binutils / ChangeLog
1 2017-05-30  H.J. Lu  <hongjiu.lu@intel.com>
2
3         PR binutils/21519
4         * objdump.c (dump_relocs_in_section): Replace get_file_size
5         with bfd_get_file_size to get archive element size.
6         * testsuite/binutils-all/objdump.exp (test_objdump_f): New
7         proc.
8         (test_objdump_h): Likewise.
9         (test_objdump_t): Likewise.
10         (test_objdump_r): Likewise.
11         (test_objdump_s): Likewise.
12         Add objdump tests on archive.
13
14 2017-05-24  Yao Qi  <yao.qi@linaro.org>
15
16         * objdump.c (disassemble_data): Caller update.
17
18 2017-05-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
19
20         * objcopy.c (merge_gnu_build_notes): Remove workaround that
21         prevented deleting relocations in duplicated notes in mips64 and
22         sparc.
23
24 2017-05-19  Maciej W. Rozycki  <macro@imgtec.com>
25
26         * testsuite/binutils-all/mips/mips-note-2.d: New test.
27         * testsuite/binutils-all/mips/mips-note-2r.d: New test.
28         * testsuite/binutils-all/mips/mips-note-2-n32.d: New test.
29         * testsuite/binutils-all/mips/mips-note-2-n64.d: New test.
30         * testsuite/binutils-all/mips/mips-note-2r-n32.d: New test.
31         * testsuite/binutils-all/mips/mips-note-2r-n64.d: New test.
32         * testsuite/binutils-all/mips/mips.exp: Define `has_newabi'.
33         Run the new tests.
34
35 2017-05-19  Maciej W. Rozycki  <macro@imgtec.com>
36
37         * testsuite/lib/utils-lib.exp (run_dump_test): Handle the `dump'
38         option.
39
40 2017-05-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
41
42         * NEWS: Mention the SPARC M8 support.
43
44 2017-05-19  Maciej W. Rozycki  <macro@imgtec.com>
45
46         * testsuite/binutils-all/mips/mips.exp: Bail out right away if
47         non-ELF.
48
49 2017-05-18  Alan Modra  <amodra@gmail.com>
50
51         * strings.c: Don't compare boolean values against TRUE or FALSE.
52
53 2017-05-15  Jeff Law  <law@redhat.com>
54
55         * readelf.c (display_arc_attribute): Avoid implicit fallthru.
56
57 2017-05-15  Maciej W. Rozycki  <macro@imgtec.com>
58
59         * testsuite/binutils-all/mips/mips16-undecoded.d: Add `-mips3'
60         to `as' flags.
61         * testsuite/binutils-all/mips/mips16e2-undecoded.d: New test.
62         * testsuite/binutils-all/mips/mips16e2-extend-insn.d: New test.
63         * testsuite/binutils-all/mips/mips16-undecoded.s: Remove
64         `.module mips3'.
65         * testsuite/binutils-all/mips/mips.exp: Run the new tests.
66
67 2017-05-15  Maciej W. Rozycki  <macro@imgtec.com>
68
69         * readelf.c (print_mips_ases): Handle MIPS16e2 ASE.
70         * NEWS: Mention MIPS16e2 ASE support.
71
72 2017-05-12  Maciej W. Rozycki  <macro@imgtec.com>
73
74         * testsuite/binutils-all/mips/mips16-extend-insn.d: Adjust BREAK
75         and SDBBP disassembly.
76
77 2017-05-10  Maciej W. Rozycki  <macro@imgtec.com>
78
79         * testsuite/binutils-all/mips/mips.exp: Define `tempfile' and
80         `copyfile' variables.
81
82 2017-05-10  Claudiu Zissulescu  <claziss@synopsys.com>
83
84         * readelf.c (decode_ARC_machine_flags): Recognize OSABI v4.
85         (get_arc_section_type_name): New function.
86         (get_section_type_name): Use the above function.
87         (display_arc_attribute): New function.
88         (process_arc_specific): Likewise.
89         (process_arch_specific): Handle ARC specific information.
90
91 2017-05-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
92
93         * MAINTAINERS (SH): Remove myself as SH maintainer.
94
95 2017-05-02  H.J. Lu  <hongjiu.lu@intel.com>
96
97         * objcopy.c (merge_gnu_build_notes): Cast relcount to unsigned
98         long when comparing with sec->reloc_count.
99
100 2017-05-02  Nick Clifton  <nickc@redhat.com>
101
102         * objcopy.c (merge_gnu_build_notes): Disable merge if there are
103         more internal relocs than external relocs.
104
105 2017-05-02  Maciej W. Rozycki  <macro@imgtec.com>
106
107         * testsuite/binutils-all/mips/mips16-undecoded.d: Adjust the
108         disassembly of PC-relative LA and LW synthetic instructions.
109
110 2017-05-02  Nick Clifton  <nickc@redhat.com>
111
112         PR 21440
113         * objdump.c (dump_relocs_in_section): Check for an excessive
114         number of relocs before attempting to dump them.
115
116 2017-05-01  Alan Modra  <amodra@gmail.com>
117
118         * objcopy.c (merge_gnu_build_notes): Correct code deleting
119         relocs.
120
121 2017-04-28  Nick Clifton  <nickc@redhat.com>
122
123         PR binutils/21439
124         * readelf.c (print_gnu_build_attribute_name): Allow for an empty
125         name field.
126
127 2017-04-28  Nick Clifton  <nickc@redhat.com>
128
129         PR binutils/21437
130         * readelf.c (process_version_sections): Check for underflow when
131         computing the start address of the auxillary version data.
132
133 2017-04-28  Nick Clifton  <nickc@redhat.com>
134
135         PR binutils/21438
136         * dwarf.c (process_extended_line_op): Do not assume that the
137         string extracted from the section is NUL terminated.
138         (fetch_indirect_string): If the string retrieved from the section
139         is not NUL terminated, return an error message.
140         (fetch_indirect_line_string): Likewise.
141         (fetch_indexed_string): Likewise.
142
143 2017-04-26  Nick Clifton  <nickc@redhat.com>
144
145         PR binutils/21433
146         * bucomm.c (get_file_size): Return -1 if file_name is NULL.
147         * ar.c (main): Fail with usage() invocation if no file names are
148         provided.
149
150 2017-04-26  Nick Clifton  <nickc@redhat.com>
151
152         * readelf.c (process_section_headers): Warn about overlarge
153         sections.
154         (print_gnu_build_attribute_name): Print the number of unrecognised
155         note types.  Fix formatting in the presence of errors.
156         (testsuite/binutils-all/note-2-32.s): Fix encoding of numeric notes.
157         (testsuite/binutils-all/note-2-64.s): Likewise.
158
159 2017-04-26  Maciej W. Rozycki  <macro@imgtec.com>
160
161         * readelf.c (process_mips_specific): Add static GOT support.
162
163 2017-04-25  Maciej W. Rozycki  <macro@imgtec.com>
164
165         * readelf.c (process_mips_specific): Remove error reporting from
166         GOT[1] processing.
167
168 2017-04-25  Maciej W. Rozycki  <macro@imgtec.com>
169
170         * readelf.c (process_mips_specific): Remove null GOT data check.
171
172 2017-04-25  Maciej W. Rozycki  <macro@imgtec.com>
173
174         * testsuite/binutils-all/mips/mips16-alias.d: New test.
175         * testsuite/binutils-all/mips/mips16-noalias.d: New test.
176         * testsuite/binutils-all/mips/mips16-alias.s: New test source.
177         * testsuite/binutils-all/mips/mips.exp: Run the new tests.
178
179 2017-04-23  Alan Modra  <amodra@gmail.com>
180
181         PR 21418
182         * ar.c (main): Check -a, -b, -i and -N args are given.
183
184 2017-04-23  Alan Modra  <amodra@gmail.com>
185
186         PR 21417
187         * ar.c (main): Check that an archive file is given after options.
188
189 2017-04-23  Alan Modra  <amodra@gmail.com>
190
191         PR 21415
192         * objdump.c (disassemble_section): Check bfd_get_section_contents
193         status.
194
195 2017-04-23  Alan Modra  <amodra@gmail.com>
196
197         PR 21408
198         * dwarf.c (display_debug_lines_decoded): Don't segfault on NULL
199         file_table.
200
201 2017-04-21  Nick Clifton  <nickc@redhat.com>
202
203         PR binutils/21378
204         * readelf.c (print_gnu_build_attribute_name): Check for an
205         overlarge name field.
206
207 2017-04-13  Nick Clifton  <nickc@redhat.com>
208
209         PR binutils/21379
210         * readelf.c (process_dynamic_section): Detect over large section
211         offsets in the DT_SYMTAB entry.
212
213 2017-04-13  Nick Clifton  <nickc@redhat.com>
214
215         PR binutils/21345
216         * readelf.c (process_mips_specific): Catch an unfeasible memory
217         allocation before it happens and print a suitable error message.
218
219 2017-04-13  Nick Clifton  <nickc@redhat.com>
220
221         * objcopy.c: Add --no-merge-notes option to disable note merging.
222         Add --[no-]merge-notes option to strip, and enable it by default.
223         (num_bytes): New function.
224         (merge_gnu_build_notes): Add code to merge stack size notes.
225         * binutils.texi: Update strip and objcopy documentation.
226         * readelf.c (print_gnu_build_attribute_name): Use defined
227         constants for note types.
228
229 2017-04-10  John Delsignor  <john.delsignore@roguewave.com>
230
231         PR binutils/21319
232         * dwarf.c (display_gdb_index): Correct test for a corrupt address
233         table size.
234
235 2017-04-05  Jiong Wang  <jiong.wang@arm.com>
236
237         * objcopy.c (struct redefine_node): Delete the field "next".
238         (redefine_sym_list): Deleted.
239         (redefine_specific_htab): New hash table.
240         (redefine_specific_reverse_htab): Likewise.
241         (eq_string_redefnode): New function.
242         (htab_hash_redefnode): Likewise.
243         (create_symbol2redef_htab): Likewise.
244         (add_specific_symbol_node): Likewise.
245         (create_symbol_htabs): Create redefine_specific_htab and
246         redefine_specific_reverse_htab.
247         (lookup_sym_redefinition): Use hash table instead of list.
248         (redefine_list_append): Likewise, and rename to add_redefine_and_check.
249         (copy_main): Use redefine_specific_htab instead of redefine_sym_list.
250         Update comments.
251
252 2017-04-04  H.J. Lu  <hongjiu.lu@intel.com>
253
254         * NEWS: Mention support for ELF SHF_GNU_MBIND and
255         PT_GNU_MBIND_XXX.
256         * readelf.c (get_segment_type): Handle PT_GNU_MBIND_XXX.
257         (get_elf_section_flags): Handle SHF_GNU_MBIND.
258         (process_section_headers): Likewise.
259         * testsuite/binutils-all/mbind1.s: New file.
260         * testsuite/binutils-all/objcopy.exp: Run readelf test on
261         mbind1.s.
262
263 2017-04-03  Nick Clifton  <nickc@redhat.com>
264
265         PR binutils/21345
266         * readelf.c (get_program_headers): Check for there being too many
267         program headers before attempting to allocate space for them.
268
269 2017-04-03  Nick Clifton  <nickc@redhat.com>
270
271         PR binutils/21344
272         * readelf.c (process_mips_specific): Check for an out of range GOT
273         entry before reading the module pointer.
274
275 2017-04-03  Nick Clifton  <nickc@redhat.com>
276
277         PR binutils/21343
278         * readelf.c (get_unwind_section_word): Fix snafu checking for
279         invalid word offsets in ARM unwind information.
280
281 2017-03-31  Pip Cet  <pipcet@gmail.com>
282
283         * NEWS: Use "WebAssembly" consistently.
284         * testsuite/binutils-all/wasm32/wasm32.exp: Fix copyright notice.
285
286 2017-03-30  Pip Cet  <pipcet@gmail.com>
287
288         * readelf.c: Add support for wasm32 ELF format WebAssembly files.
289         (guess_is_rela): Likewise.
290         (dump_relocations): Likewise.
291         (is_32bit_abs_reloc): Likewise.
292         (is_none_reloc_): Likewise.
293         * NEWS: Mention the new support.
294         * testsuite/lib/binutils-common.exp (is_elf_format): Mark wasm32
295         as ELF target.
296         (supports_gnu_unique): Mark wasm32 as supporting STB_GNU_UNIQUE.
297         * testsuite/binutils-all/nm.exp: Mark wasm32 as requiring .size annotations.
298         * testsuite/binutils-all/wasm32: New directory.
299         * testsuite/binutils-all/wasm32/create-wasm.d: New file.
300         * testsuite/binutils-all/wasm32/create-wasm.s: Likewise.
301         * testsuite/binutils-all/wasm32/custom-section.d: Likewise.
302         * testsuite/binutils-all/wasm32/custom-section.s: Likewise.
303         * testsuite/binutils-all/wasm32/invalid-wasm-1.d: Likewise.
304         * testsuite/binutils-all/wasm32/invalid-wasm-1.s: Likewise.
305         * testsuite/binutils-all/wasm32/long-sections.d: Likewise.
306         * testsuite/binutils-all/wasm32/long-sections.s: Likewise.
307         * testsuite/binutils-all/wasm32/parse-wasm.d: Likewise.
308         * testsuite/binutils-all/wasm32/parse-wasm.s: Likewise.
309         * testsuite/binutils-all/wasm32/parse-wasm-2.d: Likewise.
310         * testsuite/binutils-all/wasm32/parse-wasm-2.s: Likewise.
311         * testsuite/binutils-all/wasm32/prepared-section.d: Likewise.
312         * testsuite/binutils-all/wasm32/prepared-section.s: Likewise.
313         * testsuite/binutils-all/wasm32/wasm32.exp: New file, run tests.
314
315 2017-03-29  Alan Modra  <amodra@gmail.com>
316
317         * doc/binutils.texi (objdump): Document PowerPC -M options.
318
319 2017-03-21  Andi Kleen  <ak@linux.intel.com>
320
321         * objdump.c (unwind_inlines): Add.
322         (option_values): Add OPTION_INLINES.
323         (show_line): Unwind inlines if requested.
324         (main): Parse OPTION_INLINES.
325         (usage): Document --inlines.
326         * doc/binutils.texi: Document --inlines.
327         * NEWS: Likewise.
328
329 2017-03-21  Nick Clifton  <nickc@redhat.com>
330
331         * readelf.c (print_gnu_build_attribute_name): Allow stack
332         protection notes to contain numeric values.  Use a colon rather
333         than a space to separate a string name from its values.  Decode
334         the numeric value of a stack protection note.
335         * objcopy.c (merge_gnu_build_notes): Allow version notes to
336         contain extra text after the protocol version number.
337
338 2017-03-20  Mark Wielaard  <mark@klomp.org>
339
340         * readelf.c (process_program_headers): Move dynamic_addr check
341         after .dynamic section cross check.
342
343 2017-03-17  Nick Clifton  <nickc@redhat.com>
344
345         * readelf.c (print_gnu_build_attribute_name): Fix off by one error
346         printing the value for a build note with an ascii name.
347
348 2017-03-16  Nick Clifton  <nickc@redhat.com>
349
350         * readelf.c (print_gnu_build_attribute_name): Add support for
351         GNU_BUILD_ATTRIBUTE_SHORT_ENUM.
352
353 2017-03-14  Nick Clifton  <nickc@redhat.com>
354
355         * readelf.c (print_gnu_build_attribute_description): Move symbol
356         printing code to...
357         (print_symbol_for_build_attribute): New function.  ...here.
358         Add to find the best symbol to associate with an OPEN note.
359         Add code to cache the symbol table and string table, so that they
360         are not loaded every time a note is displayed.
361         * testsuite/binutils-all/note-2-32.s: Add a function symbol.
362         * testsuite/binutils-all/note-2-64.s: Likewise.
363         * testsuite/binutils-all/note-2-32.d: Update expected note output.
364         * testsuite/binutils-all/note-2-64.d: Likewise.
365
366 2017-03-13  Alan Modra  <amodra@gmail.com>
367             Taeung Song <treeze.taeung@gmail.com>
368
369         * objdump.c (update_source_path): Add abfd param.  Add struct
370         stat var.  Pass to try_print_file_open.  Warn if source is more
371         recent than object.
372         (try_print_file_open, slurp_file): Add struct stat param to
373         return fstat.
374         (show_line): Call update_source_path with bfd.
375
376 2017-03-10  Chia-Hao Lo  <fcamel@gmail.com>
377
378         PR binutils/21235
379         * objdump.c (main): Set do_wide with --wide.
380
381 2017-03-10  Nick Clifton  <nickc@redhat.com>
382
383         * readelf.c (get_machine_name): Rearrange switch table in order of
384         increasing machine number.  Add missing entries.
385
386 2017-03-08  H.J. Lu  <hongjiu.lu@intel.com>
387
388         PR binutils/21231
389         * readelf.c (decode_x86_isa): Change argument to unsigned int.
390         (print_gnu_property_note): Retrieve property type and datasz as
391         4-byte integer.  Consolidate property datasz check.  Check
392         GNU_PROPERTY_LOPROC and GNU_PROPERTY_LOUSER.
393         * testsuite/binutils-all/i386/pr21231a.d: New file.
394         * testsuite/binutils-all/i386/pr21231a.s: Likewise.
395         * testsuite/binutils-all/i386/pr21231b.d: Likewise.
396         * testsuite/binutils-all/i386/pr21231b.s: Likewise.
397         * testsuite/binutils-all/x86-64/pr21231a.d: Likewise.
398         * testsuite/binutils-all/x86-64/pr21231a.s: Likewise.
399         * testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
400         * testsuite/binutils-all/x86-64/pr21231b.s: Likewise.
401
402 2017-03-06  Nick Clifton  <nickc@redhat.com>
403
404         * readelf.c (print_gnu_build_attribute_name): Read byte values
405         from the name string as unsigned bytes.
406         (process_notes_at): Use memcpy to copy an unterminated name
407         string.
408
409 2017-03-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
410
411         * configure.ac (AC_CHECK_DECLS): Add asprintf.
412         * config.in: Regenerate.
413         * configure: Regenerate.
414
415 2017-03-02  Nick Clifton  <nickc@redhat.com>
416
417         * readelf.c (print_gnu_build_attribute_description): Use global
418         symbols for OPEN attributes if at all possible.
419         * objcopy.c (is_merged_note_section): Support build note sections
420         without the SHF_GNU_BUILD_NOTE section flag set.
421
422 2017-03-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
423
424         * dwarf.c (debug_displays_assert): New static assertion.
425
426 2017-03-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
427
428         * dwarf.h (enum dwarf_section_display_enum): Add loclists and rnglists.
429
430 2017-03-01  Nick Clifton  <nickc@redhat.com>
431
432         * readelf.c (get_note_type): Add support for GNU_BUILD_NOTEs.
433         (get_gnu_elf_note_type): Add support for GNU_PROPERTY_NOTEs.
434         (decode_x86_isa): New function.
435         (print_gnu_property_note): New function.
436         (print_gnu_note): Handle GNU_PROPERTY_NOTEs.
437         (print_gnu_build_attribute_description): New function.
438         (print_gnu_build_attribute_name): New function.
439         (process_note): Add support for GNU_BUILD_NOTEs.
440         * objcopy.c (--merge-notes): New command line option.
441         (copy_options): Add merge-notes.
442         (copy_usage): Likewise.
443         (is_merge_note_section): New function.
444         (merge_gnu_build_notes): New function.
445         (copy_object): Merge note sections if asked to do so.
446         (skip_section): Add skip_copy parameter.  Add support for skipping
447         merged note sections.
448         (copy_relocations_in_section): Update call to skip_section.
449         (copy_section): Likewise.
450         (copy_main): Add support for merge-notes option.
451         * doc/binutils.texi: Document the new option to objcopy.
452         * NEWS: Mention the new feature.
453         * testsuite/binutils-all/note-2-32.d: New test.  Checks note
454         merging on 32-bit targets.
455         * testsuite/binutils-all/note-2-32.s: New test source file.
456         * testsuite/binutils-all/note-2-64.d: New test.  Like note-2-32.d
457         but for 64-bit targets.
458         * testsuite/binutils-all/note-2-64.s: New test source file.
459         * testsuite/binutils-all/objcopy.exp: Run the new test.
460
461 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
462
463         * objdump.c (main): Use remove_whitespace_and_extra_commas.
464
465 2017-02-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
466
467         Fix compilation with GCC 4.4.7.
468         * dwarf.c (display_loclists_list, display_debug_rnglists_list):
469         Initialize begin and end.
470
471 2017-02-25  Alan Modra  <amodra@gmail.com>
472
473         * testsuite/binutils-all/dw5.S: Replace .string with .asciz.
474         Support hpux .comm variant.
475         * testsuite/binutils-all/readelf.exp: Define HPUX when assembling
476         dw5 test for hppa64-hpux.
477
478 2017-02-24  Nick Clifton  <nickc@redhat.com>
479
480         * readelf.c (show_name, do_dynamic, do_syms, do_dyn_syms,
481         (do_reloc, do_sections, do_section_groups, do_section_details,
482         (do_segments, do_unwind, do_using_dynamic, do_header, do_dump,
483         (do_version, do_histogram, do_debugging, do_arch, do_notes,
484         (do_archive_index, is_32bit_elf, decompress_dumps): Use
485         bfd_boolean type.
486         (parse_args): Treat the do_* variables as booleans.
487         (print_vma): Return an unsigned int.
488         (print_symbol): Change width parameter to signed int.
489         (is_ia64_vms): Change return type to bfd_boolean.
490         (guess_is_rela): Likewise.
491         (slurp_rela_relocs): Likewise.
492         (slurp_rel_relocs): Likewise.
493         (dump_relocations): Likewise.
494         (process_file_header): Likewise.
495         (get_program_headers): Likewise.
496         (process_program_headers): Likewise.
497         (process_section_headers): Likewise.
498         (process_section_groups): Likewise.
499         (dump_ia64_vms_dynamic_fixups): Likewise.
500         (dump_ia64_vms_dynamic_relocs): Likewise.
501         (process_ia64_vms_dynamic_relocs): Likewise.
502         (process_relocs): Likewise.
503         (dump_ia64_unwind): Likewise.
504         (ia64_process_unwind): Likewise.
505         (dump_hppa_unwind): Likewise.
506         (slurp_hppa_unwind_table): Likewise.
507         (hppa_process_unwind): Likewise.
508         (decode_arm_unwind_bytecode): Likewise.
509         (decode_tic6x_unwind_bytecode): Likewise.
510         (decode_arm_unwind): Likewise.
511         (dump_arm_unwind): Likewise.
512         (arm_process_unwind): Likewise.
513         (process_unwind): Likewise.
514         (get_32bit_dynamic_section): Likewise.
515         (get_64bit_dynamic_section): Likewise.
516         (process_dynamic_section): Likewise.
517         (process_version_sections): Likewise.
518         (process_symbol_table): Likewise.
519         (process_syminfo): Likewise.
520         (apply_relocations): Likewise.
521         (disassemble_section): Likewise.
522         (dump_section_as_strings): Likewise.
523         (dump_section_as_bytes): Likewise.
524         (load_specific_debug_section): Likewise.
525         (load_debug_section): Likewise.
526         (display_debug_section): Likewise.
527         (process_section_contents): Likewise.
528         (process_attributes): Likewise.
529         (process_nds32_specific): Likewise.
530         (process_gnu_liblist): Likewise.
531         (print_core_note): Likewise.
532         (print_gnu_note): Likewise.
533         (print_v850_note): Likewise.
534         (process_netbsd_elf_note): Likewise.
535         (print_stapsdt_note): Likewise.
536         (print_ia64_vms_note): Likewise.
537         (process_note): Likewise.
538         (process_notes_at): Likewise.
539         (process_corefile_note_segments): Likewise.
540         (process_v850_notes): Likewise.
541         (process_note_sections): Likewise.
542         (process_notes): Likewise.
543         (process_arch_specific): Likewise.
544         (get_file_header): Likewise.
545         (process_object): Likewise.
546         (process_archive): Likewise.
547         (process_file): Likewise.
548         (section_subset): Make static.
549         (get_mips_reg_size): Return a signed integer.
550         (process_object): Reverse the logic of the return value.
551         (process_archive): Likewise.
552         (process_file): Likewise.
553         (process_program_headers): Fix snafu - if the program headers are
554         not available then this is not a cause to fail.
555         (process_corefile_note_segments): Likewise.
556
557 2017-02-24  Maciej W. Rozycki  <macro@imgtec.com>
558
559         * readelf.c (get_ver_flags): Tidy the formatting of the string
560         returned
561
562 2017-02-24  Maciej W. Rozycki  <macro@imgtec.com>
563
564         * readelf.c (process_version_sections) <SHT_GNU_verdef>: Make
565         `isum' unsigned.
566         <SHT_GNU_verneed>: Likewise.
567
568 2017-02-24  Maciej W. Rozycki  <macro@imgtec.com>
569
570         * readelf.c (process_version_sections) <SHT_GNU_verdef>: Limit
571         the number of entries processed by the section size.  Don't
572         break out of the loop if `ent.vd_next' is 0.
573
574 2017-02-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
575
576         * testsuite/binutils-all/dw5.S: New file.
577         * testsuite/binutils-all/dw5.W: New file.
578         * testsuite/binutils-all/readelf.exp (readelf -wiaoRlL): New test.
579
580 2017-02-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
581
582         * dwarf.c (read_and_display_attr_value): Support DW_FORM_data16.
583
584 2017-02-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
585
586         * dwarf.c (display_debug_macro): Support DWARF-5.  Rename
587         DW_MACRO_GNU_*.
588
589 2017-02-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
590
591         * dwarf.c (decode_location_expression): Support DW_OP_implicit_pointer,
592         DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type, DW_OP_convert
593         and DW_OP_reinterpret.
594         (read_and_display_attr_value): Support DW_AT_call_value,
595         DW_AT_call_data_value, DW_AT_call_target and
596         DW_AT_call_target_clobbered.
597
598 2017-02-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
599
600         * dwarf.c (fetch_indirect_line_string): New function.
601         (abbrev_attr): New field implicit_const.
602         (add_abbrev_attr): New parameter implicit_const.
603         (process_abbrev_section): Support DW_FORM_implicit_const.
604         (decode_location_expression): Support DW_OP_entry_value.
605         (read_and_display_attr_value): Add parameter implicit_const.  Support
606         DW_FORM_line_strp and DW_FORM_implicit_const.
607         (read_and_display_attr): Add parameter implicit_const.
608         (process_debug_info): Support line_str and DWARF-5.
609         (read_debug_line_header): Support DWARF-5.
610         (display_formatted_table): New function.
611         (display_debug_lines_raw): New parameter file.  Support DWARF-5.
612         (display_debug_lines_decoded): New parameter fileptr.  Support DWARF-5.
613         (display_debug_lines): Pass file parameter.
614         (display_debug_macro): Update read_and_display_attr_value caller.
615         (display_debug_abbrev): Support DW_FORM_implicit_const.
616         (display_loclists_list): New function.
617         (display_loc_list): Support .debug_loclists.
618         (display_debug_ranges_list): New function from display_debug_ranges.
619         (display_debug_rnglists_list): New function.
620         (display_debug_ranges): Support .debug_rnglists.
621         (debug_displays): Add .debug_line_str, .debug_loclists and
622         .debug_rnglists.
623         * dwarf.h: Include dwarf2.h
624         (DWARF2_Internal_LineInfo): Add li_offset_size.
625         (DWARF2_Internal_CompUnit): Add cu_unit_type.
626         (enum dwarf_section_display_enum): Add line_str.
627         * readelf.c (process_section_headers): Add rnglists and loclists.
628
629 2017-02-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
630
631         * dwarf.c (display_block): Add parameter delimiter.
632         (decode_location_expression): Update display_block callers.
633         (read_and_display_attr_value): Add parameter delimiter.
634         (read_and_display_attr, display_debug_macro): Update
635         read_and_display_attr_value caller.
636
637 2017-02-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
638
639         * dwarf.c (display_loc_list): Use dwarf_vma for offset, base_address
640         and off.
641         (display_loc_list_dwo): Use dwarf_vma for offset.
642         (display_debug_loc): Use dwarf_vma for offset, base_address.
643         (struct range_entry, range_entry_compar): Use dwarf_vma for
644         ranges_offset.
645         (display_debug_ranges): Use dwarf_vma for ranges_offset, offset and
646         base_address.
647
648 2017-02-23  Nick Clifton  <nickc@redhat.com>
649
650         * readelf.c (display_tag_value): Use an explicit signed type for
651         the tag parameter.
652         (display_gnu_attributes): Use an unsigned integer type for
653         attribute tags.
654         (display_power_gnu_attribute): Likewise.
655         (display_s390_gnu_attribute): Likewise.
656         (display_sparc_hwcaps): Likewise.
657         (display_sparc_hwcaps2): Likewise.
658         (display_sparc_gnu_attribute): Likewise.
659         (display_mips_gnu_attribute): Likewise.
660         (display_tic6x_attribute): Likewise.
661         (display_raw_attribute): Likewise.
662         (process_attributes): Likewise.
663         (process_arm_specific): Delete redundant function.
664         (process_power_specific): Likewise.
665         (process_s390_specific): Likewise.
666         (process_sparc_specific): Likewise.
667         (process_tic6x_specific): Likewise.
668         (process_msp430x_specific): Likewise.
669         (display_public_gnu_attributes): New function.  Displays known
670         information about an unknown gnu attribute.
671         (display_generic_attribute): New function.  Calls
672         display_tag_value for non-nul tags.
673         (process_arch_specific): Call process_attributes even for
674         architectures not known to specifically support gnu attributes.
675
676 2017-02-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
677
678         * dwarf.c (decode_location_expression): Display also OP.
679
680 2017-02-22  Maciej W. Rozycki  <macro@imgtec.com>
681
682         * readelf.c (process_version_sections) <SHT_GNU_verdef>: Print a
683         new line between the heading and the first version definition
684         entry.
685
686 2017-02-20  Nick Clifton  <nickc@redhat.com>
687
688         PR binutils/21156
689         * dwarf.c (cu_tu_indexes_read): Move into...
690         (load_cu_tu_indexes): ... here.  Change the variable into
691         tri-state.  Change the function into boolean, returning
692         false if the indicies could not be loaded.
693         (find_cu_tu_set): Return NULL if the indicies could not be
694         loaded.
695
696 2017-02-17  Nick Clifton  <nickc@redhat.com>
697
698         PR binutils/21156
699         * readelf.c (find_section_in_set): Test for invalid section
700         indicies.
701
702 2017-02-17  Nick Clifton  <nickc@redhat.com>
703
704         * readelf.c (get_section_type_name): Add decoding of GNU section
705         types.
706
707 2017-02-15  Nick Clifton  <nickc@redhat.com>
708
709         * MAINTAINERS: (MIPS, MN10300): Move Eric Christopher to Past
710         Maintainers section.
711
712 2017-02-14  Nick Clifton  <nickc@redhat.com>
713
714         PR binutils/21159
715         * readelf.c (dump_section_as_strings): Reset the start address if
716         no decompression is perfromed.
717         (dump_section_as_bytes): Likewise.
718
719 2017-02-14  Nick Clifton  <nickc@redhat.com>
720
721         PR binutils/21158
722         * rddbg.c (read_symbol_stabs_debugging_info): Check for a null or
723         empty symbol name.
724
725 2017-02-14  Nick Clifton  <nickc@redhat.com>
726
727         PR binutils/21157
728         * stabs.c (parse_stab_enum_type): Check for corrupt NAME:VALUE
729         pairs.
730         (parse_number): Exit early if passed an empty string.
731
732 2017-02-14  Nick Clifton  <nickc@redhat.com>
733
734         PR binutils/21155
735         * readelf.c (IN_RANGE): New macro.  Tests for an address + offset
736         being within a given range.
737         (target_specific_reloc_handling): Use macro to test for underflow
738         as well as overflow of reloc offset.
739
740 2017-02-13  Nick Clifton  <nickc@redhat.com>
741
742         PR binutils/21150
743         * nm.c (file_symbol): Add test of string length before testing
744         string characters.
745
746 2017-02-13  Nick Clifton  <nickc@redhat.com>
747
748         PR binutils/21135
749         * readelf.c (dump_section_as_bytes): Handle the case where
750         uncompress_section_contents returns false.
751         (dump_section_as_bytes, load_specific_debug_section): Likewise.
752
753 2017-02-13  Nick Clifton  <nickc@redhat.com>
754
755         PR binutils/21149
756         * readelf.c (get_compression_header): Add size parameter.  Check
757         size against sizeof compression header before attempting to
758         extract the header.
759         (process_section_headers): Pass size to get_compression_header.
760         (dump_section_as_strings): Likewise.
761         (dump_section_as_bytes): Likewise.
762         (load_specific_debug_section): Likewise.
763
764 2017-02-13  Nick Clifton  <nickc@redhat.com>
765
766         PR binutils/21148
767         * readelf.c (process_version_sections): Include size of auxillary
768         version information when checking for buffer overflow.
769
770 2017-02-13  Nick Clifton  <nickc@redhat.com>
771
772         PR binutils/21147
773         * readelf.c (process_section_contents): Fix off by one error
774         reporting un-dumped sections.
775
776 2017-02-13  Nick Clifton  <nickc@redhat.com>
777
778         PR binutils/21139
779         * readelf.c (target_specific_reloc_handling): Add num_syms
780         parameter.  Check for symbol table overflow before accessing
781         symbol value.  If reloc pointer is NULL, discard all saved state.
782         (apply_relocations): Pass num_syms to target_specific_reloc_handling.
783         Call target_specific_reloc_handling with a NULL reloc pointer
784         after processing all of the relocs.
785
786 2017-02-13  Nick Clifton  <nickc@redhat.com>
787
788         PR binutils/21137
789         * readelf.c (target_specific_reloc_handling): Add end parameter.
790         Check for buffer overflow before writing relocated values.
791         (apply_relocations): Pass end to target_specific_reloc_handling.
792
793 2017-01-27  Dilyan Palauzov  <dilyan.palauzov@aegee.org>
794             Nick Clifton  <nickc@redhat.com>
795
796         PR 20343
797         * doc/binutils.texi (ar): Extend documentation of the --plugin
798         option.  Include a description of where the plugins should be
799         located.
800         (nm): Likewise.
801
802 2017-01-23  Nick Clifton  <nickc@redhat.com>
803
804         * MAINTAINERS: Add Bernd to Past Maintainers section.
805         (SCORE): Remove Mei Ligang as maintainer.  Add to Past Maintainers
806         section.
807
808 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
809
810         * MAINTAINERS (BFIN): Remove myself as Blackfin maintainer.
811
812 2017-01-20  Andrew Burgess  <andrew.burgess@embecosm.com>
813
814         * objdump.c (dump_section_header): Extract max section name length
815         from data parameter, use this when formatting output.
816         (find_longest_section_name): New function.
817         (dump_headers): Calculate longest section name when in wide mode,
818         reformat to unify printing of header line.
819
820 2017-01-18  Bernhard Rosenkranzer  <bero@lindev.ch>
821
822         PR 21059
823         * arlex.l: Support processing with flex 2.6.3.
824         * deflex.l: Likewise.
825
826 2017-01-17  Dmitry Timoshkov  <dmitry@baikal.ru>
827
828         * resbin.c: Optional dialog control data immediately follows
829         the control description without alignment.
830         * testsuite/binutils-all/windres/controldata.rc: New test.
831         source.
832         * testsuite/binutils-all/windres/controldata.rsd: New test.
833
834 2017-01-12  Nick Clifton  <nickc@redhat.com>
835
836         PR binutils/20876
837         * NEWS: Mention the new feature.
838         * testsuite/binutils-all/objdump.exp (test_build_id_debuglink):
839         New proc to test the location of separate debug info files using
840         the build-id method.
841
842 2017-01-10  Nick Clifton  <nickc@redhat.com>
843
844         PR 21034
845         * stabs.c (parse_stab_members): Fix thinko checking for g++
846         version 1 stabs information.
847
848 2017-01-09  Nick Clifton  <nickc@redhat.com>
849
850         * objdump.c (display_file): Add new parameter 'last_file'.  If
851         last_file is true, do not call bfd_close at the end of the
852         function.
853         (main): Set the value of the last_file parameter when calling
854         display_file.
855
856 2017-01-09  Alan Modra  <amodra@gmail.com>
857
858         * readelf.c (process_section_headers): Correct .rel.dyn/.rela.dyn
859         comment.
860
861 2017-01-06  Nick Clifton  <nickc@redhat.com>
862
863         * MAINTAINERS: Move Paul Brook to the Past Maintainers section.
864
865 2017-01-04  Dilan Palauzov  <dilyan.palauzov@aegee.org>
866
867         PR 20958
868         * syslex.l (option): Add noyywrap
869         (yywrap): Delete.
870
871 2017-01-02  Alan Modra  <amodra@gmail.com>
872
873         Update year range in copyright notice of all files.
874
875 For older changes see ChangeLog-2016
876 \f
877 Copyright (C) 2017 Free Software Foundation, Inc.
878
879 Copying and distribution of this file, with or without modification,
880 are permitted in any medium without royalty provided the copyright
881 notice and this notice are preserved.
882
883 Local Variables:
884 mode: change-log
885 left-margin: 8
886 fill-column: 74
887 version-control: never
888 End: