Don't use the output section size to copy input section
[external/binutils.git] / binutils / ChangeLog
1 2015-09-29  Andrew Stubbs  <ams@codesourcery.com>
2             H.J. Lu  <hongjiu.lu@intel.com>
3
4         PR binutils/19020
5         * objcopy.c (copy_object): Don't adjust the output section size
6         when copying from input sections.
7         (copy_section): Use input section size for the copy.  Get the
8         updated section size from bfd_convert_section_contents.
9
10 2015-09-29  H.J. Lu  <hongjiu.lu@intel.com>
11
12         PR binutils/19005
13         * objcopy.c (copy_object): Adjust the output section size to
14         skip gap fills between sections when copying from input sections
15         to output sections.
16
17 2015-09-28  Nick Clifton  <nickc@redhat.com>
18
19         * po/fr.po: Updated French translation.
20
21 2015-09-25  James Bowman  <james.bowman@ftdichip.com>
22
23         * ft32-dis.c (print_insn_ft32): Fix incorrect data field mask.
24
25 2015-09-23  Nick Clifton  <nickc@redhat.com>
26
27         PR binutils/15835
28         * readelf.c (struct elf_section_list): New structure.
29         (symtab_shndx_hdr): Replace with symtab_shndx_list.
30         (get_32bit_elf_symbols): Scan for a symbol index table matching
31         the symbol table in use.
32         (get_64bit_elf_symbols): Likewise.
33         (process_section_headers): Handle multiple symbol index sections.
34
35 2015-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
36
37         * readelf.c (process_dynamic_section): Handle DF_1_STUB, DF_1_PIE.
38
39 2015-09-10  Erik Ackermann  <kurterikackermann@gmail.com>
40
41         * strings.c: Add -s/--output-separator option to specify custom
42         separator string.
43         * NEWS: Mention the new feature.
44         * doc/binutils.text (strings): Document the new command line
45         option.
46
47 2015-09-09  Nick Clifton  <nickc@redhat.com>
48
49         * doc/binutils.texi (ar): Remove bogus sentance concerning thin
50         archives and invalid paths.
51
52 2015-09-03  Nick Clifton  <nickc@redhat.com>
53
54         PR binutils/18879
55         * readelf.c (get_unwind_section_word): Check for negative offsets
56         and very small sections.
57         (dump_arm_unwind): Warn if the table offset is too large.
58
59 2015-08-28  H.J. Lu  <hongjiu.lu@intel.com>
60
61         * Makefile.am (TOOL_PROGS): Add readelf.
62         * Makefile.in: Regenerated.
63
64 2015-08-24  Yaakov Selkowitz  <yselkowi@redhat.com>
65
66         * configure: Regenerate.
67
68 2015-08-17  Alan Modra  <amodra@gmail.com>
69
70         * configure: Regenerate.
71
72 2015-08-07  Andrew Burgess  <andrew.burgess@embecosm.com>
73
74         * objcopy.c (is_specified_symbol_predicate): Don't stop at first
75         match.  Non-match rules set found to FALSE.
76
77 2015-08-06  Yaakov Selkowitz  <yselkowi@redhat.com>
78
79         * configure: Regenerate.
80
81 2015-08-05  Nick Clifton  <nickc@redhat.com>
82
83         * doc/binutils.texi: Document that the --only-keep-debug option
84         to strip and objcopy preserves the section headers of stripped
85         sections.
86
87 2015-08-04  Yuriy M. Kaminskiy"  <yumkam@gmail.com>
88             Tyler Hicks  <tyhicks@canonical.com>
89
90         PR binutils/18750
91         * readelf.c (process_mips_specific): Fix incorrect escape
92         sequence handling.
93
94 2015-08-04  Nick Clifton  <nickc@redhat.com>
95
96         * ar.c (extract_file): Free cbuf if the path is invalid.
97
98 2015-07-27  H.J. Lu  <hongjiu.lu@intel.com>
99
100         * configure: Regenerated.
101
102 2015-07-24  H.J. Lu  <hongjiu.lu@intel.com>
103
104         * stabs.c (parse_stab_range_type): Use 0xffffffffffffffffLL.
105
106 2015-07-22  Alan Modra  <amodra@gmail.com>
107
108         * readelf.c (dump_relocations): Show MIN_INT addends as negative.
109
110 2015-07-20  Alan Modra  <amodra@gmail.com>
111
112         * doc/Makefile.in: Regenerate.
113
114 2015-07-16  Alan Modra  <amodra@gmail.com>
115
116         PR binutils/18672
117         * readelf.c (get_32bit_dynamic_section): Correct buffer limit test.
118         (get_64bit_dynamic_section): Likewise.
119
120 2015-07-14  H.J. Lu  <hongjiu.lu@intel.com>
121
122         * objcopy.c (copy_file): Set BFD_COMPRESS_GABI if not
123         zlib-gnu.
124         * doc/binutils.texi: Change --compress-debug-sections and
125         --compress-debug-sections=zlib to zlib-gabi.
126
127 2015-07-10  H.J. Lu  <hongjiu.lu@intel.com>
128
129          PR binutils/18656
130          * objcopy.c (setup_section): Call bfd_convert_section_size
131          to get the output section size.
132          (copy_section): Get the section size from the output section
133          and call bfd_get_full_section_contents to convert section
134          contents for output.
135
136 2015-07-10  H.J. Lu  <hongjiu.lu@intel.com>
137
138         * readelf.c (dump_section_as_strings): Warn unsupported compress
139         type and corrupted compressed section.
140         (dump_section_as_bytes): Likewise.
141         (load_specific_debug_section): Likewise.
142
143 2015-07-09  Catherine Moore  <clm@codesourcery.com>
144
145         * readelf.c (print_mips_fp_abi_value): Handle
146         Val_GNU_MIPS_ABI_FP_NAN2008.
147
148 2015-06-26  Matthew Fortune  <matthew.fortune@imgtec.com>
149
150         * readelf.c (get_mips_dynamic_type): Handle DT_MIPS_RLD_MAP_REL.
151
152 2015-06-22  Nick Clifton  <nickc@redhat.com>
153
154         * objdump.c (disassemble_bytes): Set the stop_vma field in the
155         disassemble_info structure when disassembling code sections with
156         -d.
157         * doc/binutils.texi (objdump): Document the discrepancy between -d
158         and -D.
159
160 2015-06-05  Nick Clifton  <nickc@redhat.com>
161
162         * dwarf.c (read_debug_line_header): Use reloc_at to detect
163         incomplete .debug_line headers
164
165 2015-05-29  Roland McGrath  <mcgrathr@google.com>
166
167         * readelf.c (print_gnu_note: NT_GNU_ABI_TAG): Recognize
168         GNU_ABI_TAG_SYLLABLE and GNU_ABI_TAG_NACL.
169
170 2015-05-29  Stephen Kitt  <steve@sk2.org>
171
172         * dlltool.c (make_one_lib_file): Clear .idata$6 before use.
173         (main): Fail if the output file specified by the -z option cannot
174         be opened.
175
176 2015-05-18  Nick Clifton  <nickc@redhat.com>
177
178         PR binutils/18420
179         * ia64-unwind.c (unw_decode): Add end parameter.  Pass parameter
180         on to decode functions.
181         (unw_devode_p2_p5): Pass end paraemter to UNW_DEC_SPILL_MASK.
182         (UNW_DEC_SPILL_MASK): Add end parameter.  Check that unw_rlen does
183         not take us beyond the end of the buffer.
184         * ia64-unwind.h (unw_decode): Update prototype.
185         * readelf.c (dump_ia64_unwind): Pass end pointer to unw_decode.
186
187 2015-05-15  H.J. Lu  <hongjiu.lu@intel.com>
188
189         * readelf.c (dump_section_as_strings): Change pointers from
190         char * to unsigned char *.
191
192 2015-05-15  H.J. Lu  <hongjiu.lu@intel.com>
193
194         PR binutis/18386
195         * doc/binutils.texi: Document -Mamd64 and -Mintel64.
196
197 2015-05-15  Nick Clifton  <nickc@redhat.com>
198
199         * readelf.c (options): Add "decompress".
200         (usage): Mention -z/--decompress.
201         (parse_args): Handle -z.
202         (uncompress_section_contents): Move to earlier in the file.
203         (dump_section_as_strings): If requested, decompress the section
204         before dumping.
205         (dump_section_as_bytes): Likewise.
206         * doc/binutils.texi: Document the new option.
207
208 2015-05-14  Peter Bergner  <bergner@vnet.ibm.com>
209
210         * MAINTAINERS: Add myself as PPC maintainer.
211
212 2015-05-14  H.J. Lu  <hongjiu.lu@intel.com>
213
214         * readelf.c (uncompress_section_contents): Add a parameter for
215         uncompressed size.  Don't check the zlib header.
216         (load_specific_debug_section): Updated.
217
218 2015-05-15  Nick Clifton  <nickc@redhat.com>
219
220         PR binutils/18374
221         * dwarf.h (struct dwarf_section): Add reloc_info and num_relocs
222         fields.
223         (struct dwarf_section_display): Change bitfield to boolean.
224         (reloc_at): Add prototype.
225         * dwarf.c (display_loc_list): Ignore list terminators if there are
226         relocs against them.
227         (display_debug_loc): Issue a warning if there are relocs against
228         the .debug_loc section.
229         (display_displays): Initialise reloc_info and num_relocs fields.
230         * objdump.c (load_specific_debug_section): Initialise reloc_info
231         and num_relocs fields.
232         (reloc_at): New function.
233         * readelf.c (is_32bit_abs_reloc): Add IA64's R_IA64_DIS32LSB
234         reloc.
235         (reloc_at): New function.
236         (apply_relocations): Add relocs_return and num_relocs_return
237         parameters.  Fill them in with the loaded relocs if non-NULL.
238         (dump_section_as_bytes): Update call to apply_relocations.
239         (load_specific_debug_section): Initialise reloc_info and
240         num_relocs fields.
241
242 2015-05-13  H.J. Lu  <hongjiu.lu@intel.com>
243
244         * elfedit.c (elf_class): Return ELF_CLASS_BOTH by default.
245
246 2015-05-13  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
247
248         * MAINTAINERS: Add myself as s390 and s390x maintainer.
249
250 2015-05-12  Stephen Kitt  <steve@sk2.org>
251
252         * dlltool.c (main): Accept -t as an abbreviation for
253         --temp-prefix.
254
255 2015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
256
257         * dwarf.c (dwarf_regnames_iamcu): New.
258         (init_dwarf_regnames_iamcu): Likewise.
259         (init_dwarf_regnames): Call init_dwarf_regnames_iamcu for EM_IAMCU.
260         * dwarf.h (init_dwarf_regnames_iamcu): New.
261         * objdump.c (dump_dwarf): Call init_dwarf_regnames_iamcu for
262         bfd_arch_iamcu.
263
264 2015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
265
266         * elfedit.c (enum elfclass): New.
267         (input_elf_class): Change type to enum elfclass.
268         (output_elf_class): New.
269         (elf_class): Change return type to enum elfclass.  Support EM_386
270         and EM_IAMCU.
271         (update_elf_header): Check if input and output ELF classes match.
272         (elf_machine): Support EM_386 and EM_IAMCU.
273         (main): Update input_elf_class.  Set output_elf_class.
274         * doc/binutils.texi: Update elfedit.
275
276 2015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
277
278         * dwarf.c (init_dwarf_regnames): Replace EM_486 with EM_IAMCU.
279         * readelf.c (guess_is_rela): Likewise.
280         (dump_relocations): Likewise.
281         (get_machine_name): Likewise.
282         (get_elf_section_flags): Likewise.
283         (process_section_headers): Likewise.
284         (is_32bit_abs_reloc): Likewise.
285         (is_32bit_pcrel_reloc): Likewise.
286
287 2015-04-30  Nick Clifton  <nickc@redhat.com>
288
289         * readelf.c (get_machine_flags): Add description of MeP flags.
290
291 2015-04-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
292
293         * readelf.c (display_s390_gnu_attribute): New function.
294         (process_s390_specific): New function.
295         (process_arch_specific): Call process_s390_specific.
296
297 2015-04-24  Nick Clifton  <nickc@redhat.com>
298
299         PR 18313
300         * ieee.c (ieee_read_cxx_class): Initialise the varargs variable.
301         * readelf.c (uncompress_section_contents): Zero initialise the
302         zstream structure.
303
304 2015-04-23  H.J. Lu  <hongjiu.lu@intel.com>
305
306         PR binutils/18209
307         * objcopy.c (setup_section): Copy compress status.
308
309 2015-04-15  H.J. Lu  <hongjiu.lu@intel.com>
310
311         * NEWS: Mention
312         --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi].
313
314 2015-04-14  Nick Clifton  <nickc@redhat.com>
315
316         * readelf.c (target_specific_reloc_handling): Add code to handle
317         RL78 complex relocs.
318
319 2015-04-13  Doug Evans  <dje@google.com>
320
321         PR binutils/18218
322         * readelf.c (printable_section_name): Constify sec argument.
323         (apply_relocations): Ditto.  New arg "size".  All callers updated.
324         (load_specific_debug_section): Constify sec argument.
325         Remove side-effect of modifying sec->sh_size.
326
327 2015-04-09  H.J. Lu  <hongjiu.lu@intel.com>
328
329         * objcopy.c (do_debug_sections): Use bit patterns.
330         (copy_object): Return FALSE for compress_zlib, compress_gnu_zlib
331         and compress_gabi_zlib on non-ELF input.
332         (copy_file): Don't check non-ELF input here.
333
334 2015-04-09  Nick Clifton  <nickc@redhat.com>
335
336         * readelf.c (get_machine_flags): Report the setting of the string
337         insn using bits.
338
339 2015-04-08  H.J. Lu  <hongjiu.lu@intel.com>
340
341         * objcopy.c (do_debug_sections): Add compress_zlib,
342         compress_gnu_zlib and compress_gabi_zlib.
343         (copy_options): Use optional_argument on compress-debug-sections.
344         (copy_usage): Update --compress-debug-sections.
345         (copy_file): Handle compress_zlib, compress_gnu_zlib and
346         compress_gabi_zlib.
347         (copy_main): Handle
348         --compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}.
349         * doc/binutils.texi: Document
350         --compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}.
351
352 2015-04-08  H.J. Lu  <hongjiu.lu@intel.com>
353
354         * objcopy.c (copy_usage): Replace "--interleave [<number>]" with
355         --interleave[=<number>].
356
357 2015-04-05  H.J. Lu  <hongjiu.lu@intel.com>
358
359         * readelf.c (get_elf_section_flags): Support SHF_COMPRESSED.
360         (get_compression_header): New.
361         (process_section_headers): Dump compression header if needed.
362         (uncompress_section_contents): Don't free compressed_buffer here.
363         (load_specific_debug_section): Free the compressed buffer, update
364         the section buffer and the section size if uncompress is
365         successful.
366
367 2015-04-02  H.J. Lu  <hongjiu.lu@intel.com>
368
369         * configure: Regenerated.
370
371 2015-04-02  Mike Frysinger  <vapier@gentoo.org>
372
373         * MAINTAINERS: Update my e-mail address.
374
375 2015-04-01  H.J. Lu  <hongjiu.lu@intel.com>
376
377         * configure: Regenerated.
378
379 2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
380
381         * configure.ac: Revert the AM_ZLIB change.
382         * Makefile.in: Regenerated.
383         * aclocal.m4: Likewise.
384         * configure: Likewise.
385
386 2015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
387
388         * Makefile.am (ZLIB): New.
389         (ZLIBINC): Likewise.
390         (AM_CFLAGS): Add $(ZLIBINC).
391         (readelf_LDADD): Add $(ZLIB).
392         * configure.ac (AM_ZLIB): Removed.
393         (zlibdir): New.  AC_SUBST.
394         (zlibinc): Likewise.
395         Add --with-system-zlib.
396         * Makefile.in: Regenerated.
397         * config.in: Likewise.
398         * configure: Likewise.
399
400 2015-03-19  Nick Clifton  <nickc@redhat.com>
401
402         * readelf.c (get_machine_flags): Decode RL78's G13 and G14 flags.
403
404 2015-03-18  Jon Turney  <jon.turney@dronecode.org.uk>
405             Nick Clifton  <nickc@redhat.com>
406
407         PR binutils/18087
408         * doc/binutils.texi: Note that when objcopy compresses debug
409         sections the compression is only performed if it makes the section
410         smaller.
411
412 2015-03-10  H.J. Lu  <hongjiu.lu@intel.com>
413
414         PR binutils/18101
415         * readelf.c (parse_args): Move nothing to do warning to ...
416         (main): Here.
417
418 2015-03-10  Nick Clifton  <nickc@redhat.com>
419
420         PR binutils/18101
421         * readelf.c (parse_args): Enhance check for nothing to do by
422         accounting for the --wide option.
423
424         PR binutils/17636
425         * objcopy.c (copy_object): Avoid calling fatal as that does not
426         allow the parent to clean up temporary files.
427
428 2015-03-10  Yuri Gribov  <y.gribov@samsung.arm>
429
430         PR ld/16572
431         * readelf.c: Remove support for ELF_ARM_HASENTRY.
432
433 2015-03-05  Nick Clifton  <nickc@redhat.com>
434
435         PR binutils/18064
436         * doc/binutils.texi (objcopy): Extend description of
437         --add-gnu-debuglink option to explain that the separate debug info
438         file must exist.  Add a description of what to do if the debug
439         info file is built in one place but then installed into a separate
440         location.
441
442 2015-03-05  Nick Clifton  <nickc@redhat.com>
443
444         PR binutils/17994
445         * dlltool.c (temp_file_to_remove): New local array.
446         (unlink_temp_files): New functions - unlinks any file in the
447         temp_file_to_remove array, unless dotdeltemps is set.
448         (gen_exp_file): Add temp files to array.
449         (make_head): Likewise.
450         (make_delay_head): Likewise.
451         (make_tail): Likewise.
452         (gen_lib_file): Call unlink_temp_files.
453
454 2015-02-28  Andrew Burgess  <andrew.burgess@embecosm.com>
455
456         * objcopy.c (update_sections): New list.
457         (command_line_switch): Add OPTION_UPDATE_SECTION.
458         (copy_options): Add update-section.
459         (copy_usage): Document new option.
460         (is_update_section): New function.
461         (is_strip_section_1): Add check for attempt to update and remove
462         the same section.
463         (copy_object): Update size and content of requested sections.
464         (skip_section): Don't copy for updated sections.
465         (copy_main): Handle --update-section.
466         * doc/binutils.texi (objcopy): Add description of --update-section
467         option.
468         * NEWS: Mention --update-section option.
469
470 2015-02-26  Nick Clifton  <nickc@redhat.com>
471
472         PR binutils/17512
473         * coffgrok.c (do_type): Check for an out of range tag index.
474         Check for integer overflow computing array dimension.
475         (do_define): Likewise.
476
477 2015-02-26  Andrew Burgess  <andrew.burgess@embecosm.com>
478
479         * objcopy.c (init_section_add): Rename optarg to arg in order to
480         avoid shadowing a global variable.
481
482 2015-02-26  Nick Clifton  <nickc@redhat.com>
483
484         PR binutils/17512
485         * resrc.c (write_rc_messagetable): Tighten check for invalid
486         message lengths.
487
488         * dwarf.c (display_debug_loc): Pacify the undefined behaviour
489         sanitizer by simplifying address difference calculation.
490         (struct Frame_Chunk): Change type of cfa_offset to dwarf_vma in
491         order to avoid arithmetic overflows.
492         (frame_display_row): Cast cfa_offset before printing it.
493         (display_debug_frames): Likewise.
494         Check for an unexpected segment size.
495         Chnage type of 'l' local to dwarf_vma and cast it back to an int
496         when printing.
497         (process_cu_tu_index): Tighten check for an invalid ncols value.
498         * readelf.c (process_corefile_note_segment): Check for
499         inote.descdata extending beyond the end of the section.
500         (process_v850_notes): Likewise.
501
502 2015-02-26  Terry Guo  <terry.guo@arm.com>
503
504         * readelf.c (arm_attr_tag_ABI_HardFP_use): Update how we
505         display it.
506
507 2015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
508
509         * objcopy.c (init_section_add): New function.
510         (section_add_load_file): New function.
511         (copy_main): Make use of new functions.
512
513 2015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
514
515         * od-elf32_avr.c: Add elf32-avr.h include.
516         (OPT_AVRPROP): Define.
517         (options[]): Add 'avr-prop' entry.
518         (elf32_avr_help): Add avr-prop help text.
519         (elf32_avr_dump_avr_prop): New function.
520         (elf32_avr_dump): Add check for avr-prop.
521
522 2015-02-24  Nick Clifton  <nickc@redhat.com>
523
524         * readelf.c (get_machine_flags): Remove deprecated V850 machine
525         flags.
526         (get_v850_section_type_name): New function.  Handles V850 special
527         sections.
528         (get_section_type_name): Add support for V850.
529         (get_v850_elf_note_type): New function.  Returns the name of a
530         V850 note.
531         (print_v850_note): New function.  Prints a V850 note.
532         (process_v850_notes): New function.  Prints V850 notes.
533         (process_note_sections): Add support for V850.
534
535 2015-02-24  Mike Frysinger  <vapier@gentoo.org>
536
537         PR binutils/17531
538         * readelf.c (process_symbol_table): Declare chained.  Increment it
539         in every loop.  Abort when chained is larger than nchains.  Move
540         error check outside of chain loop.
541
542 2015-02-24  Dmitry Antipov  <dantipov@nvidia.com>
543
544         * readelf.c (find_symbol_for_address): Use a binary search to
545         speed up symbol location.  Skip check for function symbol type.
546         (*_unw_aux_info): Add funtab and nfuns fields contains a sorted
547         list of function symbols.
548         (dump_ia64_unwind): Initialise the funtab and nfuns fields and
549         pass them to find_symbol_for_address.
550         (dump_hppa_unwind): Likewise.
551         (arm_print_vma_and_name): Pass funtab to find_symbol_for_address.
552         (dump_arm_unwind): Initialise the funtab and nfuns fields.
553
554 2015-02-24  Nick Clifton  <nickc@redhat.com>
555
556         * objdump.c (dump_section): Extend the warning message displayed
557         when a section cannot be loaded.
558
559 2015-02-21  Mike Frysinger  <vapier@gentoo.org>
560
561         * readelf.c (process_program_headers): Add newline to warning
562         message.
563
564 2015-02-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
565
566         * readelf.c (get_note_type): Add NT_S390_VXRS_LOW and
567         NT_S390_VXRS_HIGH.
568
569 2015-02-13  Nick Clifton  <nickc@redhat.com>
570
571         PR binutils/17512
572         * dwarf.c (read_leb128): Fix test for shift becoming too large.
573
574         * coffgrok.c (do_define): Add check for type size overflow.
575         * srconv.c (walk_tree_sfile): Check that enough sections are
576         available before parsing.
577         (prescan): Likewise.
578
579         PR binutils/17531
580         * dwarf.c (display_debug_aranges): Add check for an excessive
581         ar_length value.
582         (process_cu_tu_index): Check for a row * columns sum being too
583         large.
584
585 2015-02-13  Alan Modra  <amodra@gmail.com>
586
587         * dwarf.c: Formatting, whitespace.
588         (process_debug_info): Style fix.
589
590 2015-02-11  Nick Clifton  <nickc@redhat.com>
591
592         * rl78-decode.opc: Add 'a' attribute to instructions that support
593         [HL+0] addressing.
594         * rl78-decode.c: Regenerate.
595         * rl78-dis.c (print_insn_rl78): Display the offset in [HL+0]
596         addresses.
597
598 2015-02-11  Nick Clifton  <nickc@redhat.com>
599
600         PR binutils/17531
601         * dwarf.c (display_debug_pubnames_worker): Work around compiler
602         bug checking address ranges.
603         (display_debug_frames): Likewise.
604         (display_gdb_index): Likewise.
605         (process_cu_tu_index): Add range check on the ncols value.
606
607 2015-02-10  Nick Clifton  <nickc@redhat.com>
608
609         PR binutils/17512
610         * dwarf.c (eh_addr_size): Use an unsigned type.
611         (size_of_encoded_value): Return an unsigned type.
612         (read_leb128): Break if the shift becomes too big.
613         (process_extended_line_op): Do not read the address if the length
614         is too long.
615         (read_cie): Warn and fail if the pointer size or segment size are
616         too big.
617         * dwarf.h (DWARF2_External_LineInfo): Delete unused and incorrect
618         structure definition.
619         (DWARF2_External_PubNames): Likewise.
620         (DWARF2_External_CompUnit): Likewise.
621         (DWARF2_External_ARange): Likewise.
622         (DWARF2_Internal_LineInfo): Use dwarf_vma type for
623         li_prologue_length.
624         (eh_addr_size): Update prototype.
625
626         PR binutils/17531
627         * dwarf.c (process_debug_info): Zero the debug information array
628         since correct initialisation cannot be relied upon.
629         (process_cu_tu_index): Improve range checks.
630
631         PR binutils/17531
632         * dwarf.c (display_debug_pubnames_worker): Use dwarf_vma type for
633         offset.
634         * readelf.c (dump_relocations): Handle printing offsets which are
635         MIN_INT.
636         (process_corefile_note_segment): Add range check of the namesz
637         field.
638
639 2015-02-09  Mark Wielaard  <mjw@redhat.com>
640
641         * dwarf.c (read_and_display_attr_value): Handle DW_LANG_Fortran03
642         and DW_LANG_Fortran08.
643
644 2015-02-06  Nick Clifton  <nickc@redhat.com>
645
646         PR binutils/17512
647         * dwarf.c (display_debug_frames): Fix range checks to work on
648         32-bit binaries complied on a 64-bit host.
649
650         PR binutils/17531
651         * dwarf.c (xcmalloc): Fail if the arguments are too big.
652         (xcrealloc): Likewise.
653         (xcalloc2): Likewise.
654         * readelf.c (process_mips_specific): Fail if an option has an
655         invalid size.
656
657 2015-02-05  Alan Modra  <amodra@gmail.com>
658
659         PR binutils/17926
660         * dwarf.c (dwarf_select_sections_by_letters): Don't refer to optarg.
661
662 2015-02-04  Nick Clifton  <nickc@redhat.com>
663
664         PR binutils/17531
665         * dwarf.c (read_and_display_attr_value): Test for a block length
666         being so long that it wraps around to before the start of the block.
667         (process_debug_info): Test for section_begin wrapping around to
668         before the start of the section.
669         (display_gdb_index): Test for num_cus being so large that the end
670         address wraps around to before the start of the section.
671         (process_cu_tu_index): Test for j being so large that the section
672         index pool wraps around to before the start of the section.
673
674 2015-02-03  Nick Clifton  <nickc@redhat.com>
675
676         PR binutils/17531
677         * dwarf.c (process_debug_info): Add range check.
678         (display_debug_pubnames_worker): Likewise.
679         (display_gdb_index): Fix range check.
680         (process_cu_tu_index): Add range check.
681         * readelf.c (get_data): Change parameter types from size_t to
682         bfd_size_type.  Add checks for loss of accuracy when casting from
683         bfd_size_type to size_t.
684         (get_dynamic_data): Likewise.
685         (process_section_groups): Limit number of error messages.
686
687 2015-02-03  Nick Clifton  <nickc@redhat.com>
688
689         PR binutils/17512
690         * objdump.c (display_any_bfd): Fail if archives nest too deeply.
691
692 2015-01-28  James Bowman  <james.bowman@ftdichip.com>
693
694         * readelf.c: Add FT32 support.
695
696 2015-01-27  Nick Clifton  <nickc@redhat.com>
697
698         PR binutils/17512
699         * dlltool.c (identify_search_archive): If the last archive was the
700         same as the current archive, terminate the loop.
701
702         * addr2line.c (slurp_symtab): If the symcount is zero, free the
703         symbol table pointer.
704
705         * rcparse.y: Add checks to avoid integer divide by zero.
706         * rescoff.c (read_coff_rsrc): Add check on the size of the
707         resource section.
708         (read_coff_res_dir): Add check on the nesting level.
709         Check for resource names overrunning the buffer.
710         * resrc.c (write_rc_messagetable): Update formatting.
711         Add check of 'elen' being zero.
712
713 2015-01-23  Nick Clifton  <nickc@redhat.com>
714
715         * nlmconv.c (powerpc_mangle_relocs): Fix build errors introduced
716         by recent delta, when compiling on for a 32-bit host.
717
718 2015-01-21  Nick Clifton  <nickc@redhat.com>
719
720         PR binutils/17512
721         * addr2line.c (main): Call bfd_set_error_program_name.
722         * ar.c (main): Likewise.
723         * coffdump.c (main): Likewise.
724         * cxxfilt.c (main): Likewise.
725         * dlltool.c (main): Likewise.
726         * nlmconv.c (main): Likewise.
727         * nm.c (main): Likewise.
728         * objdump.c (main): Likewise.
729         * size.c (main): Likewise.
730         * srconv.c (main): Likewise.
731         * strings.c (main): Likewise.
732         * sysdump.c (main): Likewise.
733         * windmc.c (main): Likewise.
734         * windres.c (main): Likewise.
735         * objcopy.c (main): Likewise.
736         (copy_relocations_in_section): Check for relocs without associated
737         symbol pointers.
738
739 2015-01-21  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
740
741         * MAINTAINERS: Add self to ARM maintainers list.
742
743 2015-01-21  Nick Clifton  <nickc@redhat.com>
744
745         PR binutils/17512
746         * coffgrok.c (do_type): Check that computed ref exists.
747         (doit): Add range checks when computing section for scope.
748
749 2015-01-12  H.J. Lu  <hongjiu.lu@intel.com>
750
751         * dwarf.c (process_debug_info): Properly check abbrev size.
752
753 2015-01-12  Nick Clifton  <nickc@redhat.com>
754
755         PR binutils/17531
756         * dwarf.c (process_debug_info): Check for abbrev_base being larger
757         than the section size.
758         (process_cu_tu_index): Use xcalloc2 to allocate the CU and TU
759         arrays.
760         (xcalloc2): New function.  Like xcalloc, but checks for overflow.
761         (display_debug_addr): Use xcalloc to allocate the debug_addr_info
762         array.  Check for an address_base that is too large.
763
764         * dwarf.h (xcalloc2): Prototype.
765
766 2015-01-12  Alan Modra  <amodra@gmail.com>
767
768         * prdbg.c (print_debugging_info): Don't use void* for function
769         pointer param.
770         * budbg.h (print_debugging_info): Update prototype.
771
772 2015-01-08  Nick Clifton  <nickc@redhat.com>
773
774         PR binutils/17512
775         * ojcopy.c (copy_object): Free the symbol table if no symbols
776         could be loaded.
777         (copy_file): Use bfd_close_all_done to close files that could not
778         be copied.
779
780         * sysdump.c (getINT): Fail if reading off the end of the buffer.
781         Replace call to abort with a call to fatal.
782         (getCHARS): Prevetn reading off the end of the buffer.
783
784         * nlmconv.c (i386_mangle_relocs): Skip relocs without an
785         associated symbol.
786         (powerpc_mangle_relocs): Skip unrecognised relocs.  Check address
787         range before applying a reloc.
788
789 2015-01-07  Nick Clifton  <nickc@redhat.com>
790
791         PR binutils/17512
792         * dlltool.c (scan_obj_file): Break loop if the last archive
793         displayed matches the current archive.
794
795         * objdump.c (display_any_bfd): Add a depth limit to nested archive
796         display in order to avoid infinite loops.
797         * srconv.c: Replace calls to abort with calls to fatal with an
798         error message.
799
800 2015-01-06  Nick Clifton  <nickc@redhat.com>
801
802         PR binutils/17512
803         * coffdump.c (dump_coff_section): Check for a symbol being
804         available before printing its name.
805         (main): Check the return value from coff_grok.
806         * coffgrok.c: Reformat and tidy.
807         Add range checks to most functions.
808         (coff_grok): Return NULL if the input bfd is not in a COFF
809         format.
810         * coffgrok.h: Reformat and tidy.
811         (struct coff_section): Change the nrelocs field to unsigned.
812         * srconv.c (main): Check the return value from coff_grok.
813
814 2015-01-05  Nick Clifton  <nickc@redhat.com>
815
816         PR binutils/17512
817         * nm.c (print_symbol): Add 'is_synthetic' parameter.  Use it to
818         help initialize the info.elfinfo field.
819         (print_size_symbols): Add 'synth_count' parameter.  Use it to set
820         the is_synthetic parameter when calling print_symbol.
821         (print_symbols): Likewise.
822         (display_rel_file): Pass synth_count to printing function.
823         (display_archive): Break loop if the last archive displayed
824         matches the current archive.
825         * size.c (display_archive): Likewise.
826
827 2015-01-05  Nick Clifton  <nickc@redhat.com>
828
829         PR binutils/17531
830         * dwarf.c (alloc_num_debug_info_entries): New variable.
831         (process_debug_info): Set it.  Use it to avoid displaying
832         attributes for which there is no info.
833         (display_debug_abbrev): Check that the debug_info_entry index is
834         valid before using it.
835         (display_loc_list_dwo): Likewise.
836         (process_cu_tu_index): Add range check for an overlarge dw_sect
837         value.
838         (free_debug_memory): Reset alloc_num_debug_info_entries.
839         * readelf.c (slurp_ia64_unwind_table): Warn if the reloc could not
840         be indentified.
841         (dynamic_section_mips_val): Warn if the timestamp is invalid.
842         (print_mips_got_entry): Add a data_end parameter.  Warn if a read
843         would go beyond the end of the data, and return an error value.
844         (process_mips_specific): Do not read options from beyond the end
845         of the section.
846         Correct code to display optional data at the end of an option.
847         Warn if there are too many GOT symbols.
848         Update calls to print_mips_got_entry, and handle error returns.
849
850 2015-01-05  Daniel Klauer  <daniel.c.klauer@web.de>
851
852         PR binutils/17489
853         * doc/binutils.texi (dlltool): Correct description of --kill-at
854         option.
855
856 2015-01-01  Alan Modra  <amodra@gmail.com>
857
858         * version.c (print_version): Just print current year.
859
860 2015-01-01  Alan Modra  <amodra@gmail.com>
861
862         Update year range in copyright notice of all files.
863
864 For older changes see ChangeLog-2014
865 \f
866 Copyright (C) 2015 Free Software Foundation, Inc.
867
868 Copying and distribution of this file, with or without modification,
869 are permitted in any medium without royalty provided the copyright
870 notice and this notice are preserved.
871
872 Local Variables:
873 mode: change-log
874 left-margin: 8
875 fill-column: 74
876 version-control: never
877 End: