1 2015-05-15 Nick Clifton <nickc@redhat.com>
3 * readelf.c (options): Add "decompress".
4 (usage): Mention -z/--decompress.
5 (parse_args): Handle -z.
6 (uncompress_section_contents): Move to earlier in the file.
7 (dump_section_as_strings): If requested, decompress the section
9 (dump_section_as_bytes): Likewise.
10 * doc/binutils.texi: Document the new option.
12 2015-05-14 Peter Bergner <bergner@vnet.ibm.com>
14 * MAINTAINERS: Add myself as PPC maintainer.
16 2015-05-14 H.J. Lu <hongjiu.lu@intel.com>
18 * readelf.c (uncompress_section_contents): Add a parameter for
19 uncompressed size. Don't check the zlib header.
20 (load_specific_debug_section): Updated.
22 2015-05-15 Nick Clifton <nickc@redhat.com>
25 * dwarf.h (struct dwarf_section): Add reloc_info and num_relocs
27 (struct dwarf_section_display): Change bitfield to boolean.
28 (reloc_at): Add prototype.
29 * dwarf.c (display_loc_list): Ignore list terminators if there are
31 (display_debug_loc): Issue a warning if there are relocs against
32 the .debug_loc section.
33 (display_displays): Initialise reloc_info and num_relocs fields.
34 * objdump.c (load_specific_debug_section): Initialise reloc_info
35 and num_relocs fields.
36 (reloc_at): New function.
37 * readelf.c (is_32bit_abs_reloc): Add IA64's R_IA64_DIS32LSB
39 (reloc_at): New function.
40 (apply_relocations): Add relocs_return and num_relocs_return
41 parameters. Fill them in with the loaded relocs if non-NULL.
42 (dump_section_as_bytes): Update call to apply_relocations.
43 (load_specific_debug_section): Initialise reloc_info and
46 2015-05-13 H.J. Lu <hongjiu.lu@intel.com>
48 * elfedit.c (elf_class): Return ELF_CLASS_BOTH by default.
50 2015-05-13 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
52 * MAINTAINERS: Add myself as s390 and s390x maintainer.
54 2015-05-12 Stephen Kitt <steve@sk2.org>
56 * dlltool.c (main): Accept -t as an abbreviation for
59 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
61 * dwarf.c (dwarf_regnames_iamcu): New.
62 (init_dwarf_regnames_iamcu): Likewise.
63 (init_dwarf_regnames): Call init_dwarf_regnames_iamcu for EM_IAMCU.
64 * dwarf.h (init_dwarf_regnames_iamcu): New.
65 * objdump.c (dump_dwarf): Call init_dwarf_regnames_iamcu for
68 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
70 * elfedit.c (enum elfclass): New.
71 (input_elf_class): Change type to enum elfclass.
72 (output_elf_class): New.
73 (elf_class): Change return type to enum elfclass. Support EM_386
75 (update_elf_header): Check if input and output ELF classes match.
76 (elf_machine): Support EM_386 and EM_IAMCU.
77 (main): Update input_elf_class. Set output_elf_class.
78 * doc/binutils.texi: Update elfedit.
80 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
82 * dwarf.c (init_dwarf_regnames): Replace EM_486 with EM_IAMCU.
83 * readelf.c (guess_is_rela): Likewise.
84 (dump_relocations): Likewise.
85 (get_machine_name): Likewise.
86 (get_elf_section_flags): Likewise.
87 (process_section_headers): Likewise.
88 (is_32bit_abs_reloc): Likewise.
89 (is_32bit_pcrel_reloc): Likewise.
91 2015-04-30 Nick Clifton <nickc@redhat.com>
93 * readelf.c (get_machine_flags): Add description of MeP flags.
95 2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
97 * readelf.c (display_s390_gnu_attribute): New function.
98 (process_s390_specific): New function.
99 (process_arch_specific): Call process_s390_specific.
101 2015-04-24 Nick Clifton <nickc@redhat.com>
104 * ieee.c (ieee_read_cxx_class): Initialise the varargs variable.
105 * readelf.c (uncompress_section_contents): Zero initialise the
108 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
111 * objcopy.c (setup_section): Copy compress status.
113 2015-04-15 H.J. Lu <hongjiu.lu@intel.com>
116 --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi].
118 2015-04-14 Nick Clifton <nickc@redhat.com>
120 * readelf.c (target_specific_reloc_handling): Add code to handle
123 2015-04-13 Doug Evans <dje@google.com>
126 * readelf.c (printable_section_name): Constify sec argument.
127 (apply_relocations): Ditto. New arg "size". All callers updated.
128 (load_specific_debug_section): Constify sec argument.
129 Remove side-effect of modifying sec->sh_size.
131 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
133 * objcopy.c (do_debug_sections): Use bit patterns.
134 (copy_object): Return FALSE for compress_zlib, compress_gnu_zlib
135 and compress_gabi_zlib on non-ELF input.
136 (copy_file): Don't check non-ELF input here.
138 2015-04-09 Nick Clifton <nickc@redhat.com>
140 * readelf.c (get_machine_flags): Report the setting of the string
143 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
145 * objcopy.c (do_debug_sections): Add compress_zlib,
146 compress_gnu_zlib and compress_gabi_zlib.
147 (copy_options): Use optional_argument on compress-debug-sections.
148 (copy_usage): Update --compress-debug-sections.
149 (copy_file): Handle compress_zlib, compress_gnu_zlib and
152 --compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}.
153 * doc/binutils.texi: Document
154 --compress-debug-sections={none|zlib|zlib-gnu|zlib-gabi}.
156 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
158 * objcopy.c (copy_usage): Replace "--interleave [<number>]" with
159 --interleave[=<number>].
161 2015-04-05 H.J. Lu <hongjiu.lu@intel.com>
163 * readelf.c (get_elf_section_flags): Support SHF_COMPRESSED.
164 (get_compression_header): New.
165 (process_section_headers): Dump compression header if needed.
166 (uncompress_section_contents): Don't free compressed_buffer here.
167 (load_specific_debug_section): Free the compressed buffer, update
168 the section buffer and the section size if uncompress is
171 2015-04-02 H.J. Lu <hongjiu.lu@intel.com>
173 * configure: Regenerated.
175 2015-04-02 Mike Frysinger <vapier@gentoo.org>
177 * MAINTAINERS: Update my e-mail address.
179 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
181 * configure: Regenerated.
183 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
185 * configure.ac: Revert the AM_ZLIB change.
186 * Makefile.in: Regenerated.
187 * aclocal.m4: Likewise.
188 * configure: Likewise.
190 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
192 * Makefile.am (ZLIB): New.
194 (AM_CFLAGS): Add $(ZLIBINC).
195 (readelf_LDADD): Add $(ZLIB).
196 * configure.ac (AM_ZLIB): Removed.
197 (zlibdir): New. AC_SUBST.
199 Add --with-system-zlib.
200 * Makefile.in: Regenerated.
201 * config.in: Likewise.
202 * configure: Likewise.
204 2015-03-19 Nick Clifton <nickc@redhat.com>
206 * readelf.c (get_machine_flags): Decode RL78's G13 and G14 flags.
208 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
209 Nick Clifton <nickc@redhat.com>
212 * doc/binutils.texi: Note that when objcopy compresses debug
213 sections the compression is only performed if it makes the section
216 2015-03-10 H.J. Lu <hongjiu.lu@intel.com>
219 * readelf.c (parse_args): Move nothing to do warning to ...
222 2015-03-10 Nick Clifton <nickc@redhat.com>
225 * readelf.c (parse_args): Enhance check for nothing to do by
226 accounting for the --wide option.
229 * objcopy.c (copy_object): Avoid calling fatal as that does not
230 allow the parent to clean up temporary files.
232 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
235 * readelf.c: Remove support for ELF_ARM_HASENTRY.
237 2015-03-05 Nick Clifton <nickc@redhat.com>
240 * doc/binutils.texi (objcopy): Extend description of
241 --add-gnu-debuglink option to explain that the separate debug info
242 file must exist. Add a description of what to do if the debug
243 info file is built in one place but then installed into a separate
246 2015-03-05 Nick Clifton <nickc@redhat.com>
249 * dlltool.c (temp_file_to_remove): New local array.
250 (unlink_temp_files): New functions - unlinks any file in the
251 temp_file_to_remove array, unless dotdeltemps is set.
252 (gen_exp_file): Add temp files to array.
253 (make_head): Likewise.
254 (make_delay_head): Likewise.
255 (make_tail): Likewise.
256 (gen_lib_file): Call unlink_temp_files.
258 2015-02-28 Andrew Burgess <andrew.burgess@embecosm.com>
260 * objcopy.c (update_sections): New list.
261 (command_line_switch): Add OPTION_UPDATE_SECTION.
262 (copy_options): Add update-section.
263 (copy_usage): Document new option.
264 (is_update_section): New function.
265 (is_strip_section_1): Add check for attempt to update and remove
267 (copy_object): Update size and content of requested sections.
268 (skip_section): Don't copy for updated sections.
269 (copy_main): Handle --update-section.
270 * doc/binutils.texi (objcopy): Add description of --update-section
272 * NEWS: Mention --update-section option.
274 2015-02-26 Nick Clifton <nickc@redhat.com>
277 * coffgrok.c (do_type): Check for an out of range tag index.
278 Check for integer overflow computing array dimension.
279 (do_define): Likewise.
281 2015-02-26 Andrew Burgess <andrew.burgess@embecosm.com>
283 * objcopy.c (init_section_add): Rename optarg to arg in order to
284 avoid shadowing a global variable.
286 2015-02-26 Nick Clifton <nickc@redhat.com>
289 * resrc.c (write_rc_messagetable): Tighten check for invalid
292 * dwarf.c (display_debug_loc): Pacify the undefined behaviour
293 sanitizer by simplifying address difference calculation.
294 (struct Frame_Chunk): Change type of cfa_offset to dwarf_vma in
295 order to avoid arithmetic overflows.
296 (frame_display_row): Cast cfa_offset before printing it.
297 (display_debug_frames): Likewise.
298 Check for an unexpected segment size.
299 Chnage type of 'l' local to dwarf_vma and cast it back to an int
301 (process_cu_tu_index): Tighten check for an invalid ncols value.
302 * readelf.c (process_corefile_note_segment): Check for
303 inote.descdata extending beyond the end of the section.
304 (process_v850_notes): Likewise.
306 2015-02-26 Terry Guo <terry.guo@arm.com>
308 * readelf.c (arm_attr_tag_ABI_HardFP_use): Update how we
311 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
313 * objcopy.c (init_section_add): New function.
314 (section_add_load_file): New function.
315 (copy_main): Make use of new functions.
317 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
319 * od-elf32_avr.c: Add elf32-avr.h include.
320 (OPT_AVRPROP): Define.
321 (options[]): Add 'avr-prop' entry.
322 (elf32_avr_help): Add avr-prop help text.
323 (elf32_avr_dump_avr_prop): New function.
324 (elf32_avr_dump): Add check for avr-prop.
326 2015-02-24 Nick Clifton <nickc@redhat.com>
328 * readelf.c (get_machine_flags): Remove deprecated V850 machine
330 (get_v850_section_type_name): New function. Handles V850 special
332 (get_section_type_name): Add support for V850.
333 (get_v850_elf_note_type): New function. Returns the name of a
335 (print_v850_note): New function. Prints a V850 note.
336 (process_v850_notes): New function. Prints V850 notes.
337 (process_note_sections): Add support for V850.
339 2015-02-24 Mike Frysinger <vapier@gentoo.org>
342 * readelf.c (process_symbol_table): Declare chained. Increment it
343 in every loop. Abort when chained is larger than nchains. Move
344 error check outside of chain loop.
346 2015-02-24 Dmitry Antipov <dantipov@nvidia.com>
348 * readelf.c (find_symbol_for_address): Use a binary search to
349 speed up symbol location. Skip check for function symbol type.
350 (*_unw_aux_info): Add funtab and nfuns fields contains a sorted
351 list of function symbols.
352 (dump_ia64_unwind): Initialise the funtab and nfuns fields and
353 pass them to find_symbol_for_address.
354 (dump_hppa_unwind): Likewise.
355 (arm_print_vma_and_name): Pass funtab to find_symbol_for_address.
356 (dump_arm_unwind): Initialise the funtab and nfuns fields.
358 2015-02-24 Nick Clifton <nickc@redhat.com>
360 * objdump.c (dump_section): Extend the warning message displayed
361 when a section cannot be loaded.
363 2015-02-21 Mike Frysinger <vapier@gentoo.org>
365 * readelf.c (process_program_headers): Add newline to warning
368 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
370 * readelf.c (get_note_type): Add NT_S390_VXRS_LOW and
373 2015-02-13 Nick Clifton <nickc@redhat.com>
376 * dwarf.c (read_leb128): Fix test for shift becoming too large.
378 * coffgrok.c (do_define): Add check for type size overflow.
379 * srconv.c (walk_tree_sfile): Check that enough sections are
380 available before parsing.
384 * dwarf.c (display_debug_aranges): Add check for an excessive
386 (process_cu_tu_index): Check for a row * columns sum being too
389 2015-02-13 Alan Modra <amodra@gmail.com>
391 * dwarf.c: Formatting, whitespace.
392 (process_debug_info): Style fix.
394 2015-02-11 Nick Clifton <nickc@redhat.com>
396 * rl78-decode.opc: Add 'a' attribute to instructions that support
398 * rl78-decode.c: Regenerate.
399 * rl78-dis.c (print_insn_rl78): Display the offset in [HL+0]
402 2015-02-11 Nick Clifton <nickc@redhat.com>
405 * dwarf.c (display_debug_pubnames_worker): Work around compiler
406 bug checking address ranges.
407 (display_debug_frames): Likewise.
408 (display_gdb_index): Likewise.
409 (process_cu_tu_index): Add range check on the ncols value.
411 2015-02-10 Nick Clifton <nickc@redhat.com>
414 * dwarf.c (eh_addr_size): Use an unsigned type.
415 (size_of_encoded_value): Return an unsigned type.
416 (read_leb128): Break if the shift becomes too big.
417 (process_extended_line_op): Do not read the address if the length
419 (read_cie): Warn and fail if the pointer size or segment size are
421 * dwarf.h (DWARF2_External_LineInfo): Delete unused and incorrect
422 structure definition.
423 (DWARF2_External_PubNames): Likewise.
424 (DWARF2_External_CompUnit): Likewise.
425 (DWARF2_External_ARange): Likewise.
426 (DWARF2_Internal_LineInfo): Use dwarf_vma type for
428 (eh_addr_size): Update prototype.
431 * dwarf.c (process_debug_info): Zero the debug information array
432 since correct initialisation cannot be relied upon.
433 (process_cu_tu_index): Improve range checks.
436 * dwarf.c (display_debug_pubnames_worker): Use dwarf_vma type for
438 * readelf.c (dump_relocations): Handle printing offsets which are
440 (process_corefile_note_segment): Add range check of the namesz
443 2015-02-09 Mark Wielaard <mjw@redhat.com>
445 * dwarf.c (read_and_display_attr_value): Handle DW_LANG_Fortran03
446 and DW_LANG_Fortran08.
448 2015-02-06 Nick Clifton <nickc@redhat.com>
451 * dwarf.c (display_debug_frames): Fix range checks to work on
452 32-bit binaries complied on a 64-bit host.
455 * dwarf.c (xcmalloc): Fail if the arguments are too big.
456 (xcrealloc): Likewise.
457 (xcalloc2): Likewise.
458 * readelf.c (process_mips_specific): Fail if an option has an
461 2015-02-05 Alan Modra <amodra@gmail.com>
464 * dwarf.c (dwarf_select_sections_by_letters): Don't refer to optarg.
466 2015-02-04 Nick Clifton <nickc@redhat.com>
469 * dwarf.c (read_and_display_attr_value): Test for a block length
470 being so long that it wraps around to before the start of the block.
471 (process_debug_info): Test for section_begin wrapping around to
472 before the start of the section.
473 (display_gdb_index): Test for num_cus being so large that the end
474 address wraps around to before the start of the section.
475 (process_cu_tu_index): Test for j being so large that the section
476 index pool wraps around to before the start of the section.
478 2015-02-03 Nick Clifton <nickc@redhat.com>
481 * dwarf.c (process_debug_info): Add range check.
482 (display_debug_pubnames_worker): Likewise.
483 (display_gdb_index): Fix range check.
484 (process_cu_tu_index): Add range check.
485 * readelf.c (get_data): Change parameter types from size_t to
486 bfd_size_type. Add checks for loss of accuracy when casting from
487 bfd_size_type to size_t.
488 (get_dynamic_data): Likewise.
489 (process_section_groups): Limit number of error messages.
491 2015-02-03 Nick Clifton <nickc@redhat.com>
494 * objdump.c (display_any_bfd): Fail if archives nest too deeply.
496 2015-01-28 James Bowman <james.bowman@ftdichip.com>
498 * readelf.c: Add FT32 support.
500 2015-01-27 Nick Clifton <nickc@redhat.com>
503 * dlltool.c (identify_search_archive): If the last archive was the
504 same as the current archive, terminate the loop.
506 * addr2line.c (slurp_symtab): If the symcount is zero, free the
507 symbol table pointer.
509 * rcparse.y: Add checks to avoid integer divide by zero.
510 * rescoff.c (read_coff_rsrc): Add check on the size of the
512 (read_coff_res_dir): Add check on the nesting level.
513 Check for resource names overrunning the buffer.
514 * resrc.c (write_rc_messagetable): Update formatting.
515 Add check of 'elen' being zero.
517 2015-01-23 Nick Clifton <nickc@redhat.com>
519 * nlmconv.c (powerpc_mangle_relocs): Fix build errors introduced
520 by recent delta, when compiling on for a 32-bit host.
522 2015-01-21 Nick Clifton <nickc@redhat.com>
525 * addr2line.c (main): Call bfd_set_error_program_name.
526 * ar.c (main): Likewise.
527 * coffdump.c (main): Likewise.
528 * cxxfilt.c (main): Likewise.
529 * dlltool.c (main): Likewise.
530 * nlmconv.c (main): Likewise.
531 * nm.c (main): Likewise.
532 * objdump.c (main): Likewise.
533 * size.c (main): Likewise.
534 * srconv.c (main): Likewise.
535 * strings.c (main): Likewise.
536 * sysdump.c (main): Likewise.
537 * windmc.c (main): Likewise.
538 * windres.c (main): Likewise.
539 * objcopy.c (main): Likewise.
540 (copy_relocations_in_section): Check for relocs without associated
543 2015-01-21 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
545 * MAINTAINERS: Add self to ARM maintainers list.
547 2015-01-21 Nick Clifton <nickc@redhat.com>
550 * coffgrok.c (do_type): Check that computed ref exists.
551 (doit): Add range checks when computing section for scope.
553 2015-01-12 H.J. Lu <hongjiu.lu@intel.com>
555 * dwarf.c (process_debug_info): Properly check abbrev size.
557 2015-01-12 Nick Clifton <nickc@redhat.com>
560 * dwarf.c (process_debug_info): Check for abbrev_base being larger
561 than the section size.
562 (process_cu_tu_index): Use xcalloc2 to allocate the CU and TU
564 (xcalloc2): New function. Like xcalloc, but checks for overflow.
565 (display_debug_addr): Use xcalloc to allocate the debug_addr_info
566 array. Check for an address_base that is too large.
568 * dwarf.h (xcalloc2): Prototype.
570 2015-01-12 Alan Modra <amodra@gmail.com>
572 * prdbg.c (print_debugging_info): Don't use void* for function
574 * budbg.h (print_debugging_info): Update prototype.
576 2015-01-08 Nick Clifton <nickc@redhat.com>
579 * ojcopy.c (copy_object): Free the symbol table if no symbols
581 (copy_file): Use bfd_close_all_done to close files that could not
584 * sysdump.c (getINT): Fail if reading off the end of the buffer.
585 Replace call to abort with a call to fatal.
586 (getCHARS): Prevetn reading off the end of the buffer.
588 * nlmconv.c (i386_mangle_relocs): Skip relocs without an
590 (powerpc_mangle_relocs): Skip unrecognised relocs. Check address
591 range before applying a reloc.
593 2015-01-07 Nick Clifton <nickc@redhat.com>
596 * dlltool.c (scan_obj_file): Break loop if the last archive
597 displayed matches the current archive.
599 * objdump.c (display_any_bfd): Add a depth limit to nested archive
600 display in order to avoid infinite loops.
601 * srconv.c: Replace calls to abort with calls to fatal with an
604 2015-01-06 Nick Clifton <nickc@redhat.com>
607 * coffdump.c (dump_coff_section): Check for a symbol being
608 available before printing its name.
609 (main): Check the return value from coff_grok.
610 * coffgrok.c: Reformat and tidy.
611 Add range checks to most functions.
612 (coff_grok): Return NULL if the input bfd is not in a COFF
614 * coffgrok.h: Reformat and tidy.
615 (struct coff_section): Change the nrelocs field to unsigned.
616 * srconv.c (main): Check the return value from coff_grok.
618 2015-01-05 Nick Clifton <nickc@redhat.com>
621 * nm.c (print_symbol): Add 'is_synthetic' parameter. Use it to
622 help initialize the info.elfinfo field.
623 (print_size_symbols): Add 'synth_count' parameter. Use it to set
624 the is_synthetic parameter when calling print_symbol.
625 (print_symbols): Likewise.
626 (display_rel_file): Pass synth_count to printing function.
627 (display_archive): Break loop if the last archive displayed
628 matches the current archive.
629 * size.c (display_archive): Likewise.
631 2015-01-05 Nick Clifton <nickc@redhat.com>
634 * dwarf.c (alloc_num_debug_info_entries): New variable.
635 (process_debug_info): Set it. Use it to avoid displaying
636 attributes for which there is no info.
637 (display_debug_abbrev): Check that the debug_info_entry index is
638 valid before using it.
639 (display_loc_list_dwo): Likewise.
640 (process_cu_tu_index): Add range check for an overlarge dw_sect
642 (free_debug_memory): Reset alloc_num_debug_info_entries.
643 * readelf.c (slurp_ia64_unwind_table): Warn if the reloc could not
645 (dynamic_section_mips_val): Warn if the timestamp is invalid.
646 (print_mips_got_entry): Add a data_end parameter. Warn if a read
647 would go beyond the end of the data, and return an error value.
648 (process_mips_specific): Do not read options from beyond the end
650 Correct code to display optional data at the end of an option.
651 Warn if there are too many GOT symbols.
652 Update calls to print_mips_got_entry, and handle error returns.
654 2015-01-05 Daniel Klauer <daniel.c.klauer@web.de>
657 * doc/binutils.texi (dlltool): Correct description of --kill-at
660 2015-01-01 Alan Modra <amodra@gmail.com>
662 * version.c (print_version): Just print current year.
664 2015-01-01 Alan Modra <amodra@gmail.com>
666 Update year range in copyright notice of all files.
668 For older changes see ChangeLog-2014
670 Copyright (C) 2015 Free Software Foundation, Inc.
672 Copying and distribution of this file, with or without modification,
673 are permitted in any medium without royalty provided the copyright
674 notice and this notice are preserved.
680 version-control: never