aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2014-11-21Fix a snafu setting up the string table read in from a COFF file.Alexander Cherepanov2-3/+9
PR binutils/17512 * coffgen.c (_bfd_coff_read_string_table): Test allocation of string table before clearing the first few bytes.
2014-11-21Support ARM Cortex-M7Terry Guo2-2/+7
include/ChangeLog: 2014-11-21 Terry Guo <terry.guo@arm.com> * opcode/arm.h (FPU_VFP_EXT_ARMV8xD): New macro. (FPU_VFP_V5D16): Likewise. (FPU_VFP_V5_SP_D16): Likewise. (FPU_ARCH_VFP_V5D16): Likewise. (FPU_ARCH_VFP_V5_SP_D16): Likewise. bfd/ChangeLog: 2014-11-21 Terry Guo <terry.guo@arm.com> * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support FPv5. binutils/ChangeLog: 2014-11-21 Terry Guo <terry.guo@arm.com> * readelf.c (arm_attr_tag_FP_arch): Extended to support FPv5. gas/ChangeLog: 2014-11-21 Terry Guo <terry.guo@arm.com> * config/tc-arm.c (fpu_vfp_ext_armv8xd): New. (arm_cpus): Support cortex-m7. (arm_fpus): Support fpv5-sp-d16 and fpv5-d16. (do_vfp_nsyn_cvt_fpv8): Generate error when use D register for S register only target like FPv5-SP-D16. (do_neon_cvttb_1): Likewise. (do_vfp_nsyn_fpv8): Likewise. (do_vrint_1): Likewise. (aeabi_set_public_attributes): Set proper FP arch for FPv5. * doc/c-arm.texi: Document new cpu and fpu names for cortex-m7. gas/testsuite/ChangeLog: 2014-11-21 Terry Guo <terry.guo@arm.com> * gas/arm/armv7e-m+fpv5-d16.s: New. * gas/arm/armv7e-m+fpv5-d16.d: Likewise. * gas/arm/armv7e-m+fpv5-sp-d16.s: Likewise. * gas/arm/armv7e-m+fpv5-sp-d16.d: Likewise. ld/testsuite/ChangeLog: 2014-11-21 Terry Guo <terry.guo@arm.com> * ld-arm/attr-merge-vfp-4-sp.s: New test source file. * ld-arm/attr-merge-vfp-5-sp.s: Likewise. * ld-arm/attr-merge-vfp-5.s: Likewise. * ld-arm/attr-merge-vfp-8.d: New test. * ld-arm/attr-merge-vfp-8r.d: Likewise. * ld-arm/attr-merge-vfp-9.d: Likewise. * ld-arm/attr-merge-vfp-9r.d: Likewise. * ld-arm/attr-merge-vfp-10.d: Likewise. * ld-arm/attr-merge-vfp-10r.d: Likewise. * ld-arm/attr-merge-vfp-11.d: Likewise. * ld-arm/attr-merge-vfp-11r.d: Likewise. * ld-arm/attr-merge-vfp-12.d: Likewise. * ld-arm/attr-merge-vfp-12r.d: Likewise. * ld-arm/attr-merge-vfp-13.d: Likewise. * ld-arm/attr-merge-vfp-13r.d: Likewise. * ld-arm/attr-merge-vfp-14.d: Likewise. * ld-arm/attr-merge-vfp-14r.d: Likewise. * ld-arm/arm-elf.exp: Run the new tests.
2014-11-21Automatic date update in version.inGDB Administrator1-1/+1
2014-11-20PPC gold doesn't check for overflow properlyAlan Modra2-1/+6
Corrects overflow test for rel14, addr14, rel24, addr24 branch relocs, and prints an information message to give a hint as to how a branch that can't reach a stub might be cured. bfd/ * elf64-ppc.c (group_sections): Init stub14_group_size from --stub-group-size parameter divided by 1024. gold/ * powerpc.cc (Stub_control::Stub_control): Init stub14_group_size_ from --stub-group-size parameter divided by 1024. (Powerpc_relocate_functions::rela, rela_ua): Add fieldsize template parameter. Update all uses. (Target_powerpc::Relocate::relocate): Rename has_plt_value to has_stub_value. Set for long branches. Don't report overflow for branch to undefined weak symbols. Print info message on overflowing branch to stub.
2014-11-20ppc476 workaround sizingAlan Modra2-1/+6
* elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround alignment calculation.
2014-11-20Enable to link ARM object file that hasn't attribute section.Terry Guo2-0/+12
bfd/ChangeLog 2014-11-20 Terry Guo <terry.guo@arm.com> * elf32-arm.c (elf32_arm_merge_eabi_attributes): Skip if input bfd hasn't attribute section. ld/testsuite/ChangeLog: 2014-11-20 Terry Guo <terry.guo@arm.com> * ld-arm/attr-merge-nosection-1.d: New file. * ld-arm/attr-merge-nosection-1a.s: Likewise. * ld-arm/attr-merge-nosection-1b.s: Likewise. * ld-arm/arm-elf.exp: Include the new test.
2014-11-20Automatic date update in version.inGDB Administrator1-1/+1
2014-11-20Default powerpc64 to --plt-thread-safe for GoAlan Modra2-0/+6
Go is multi-threaded, so use thread-safe plt stubs. __go_go doesn't actually start threads, but is a convenient libgo function with a reasonably unique name that is called by all Go executables. (Threads are started by a static function of libgo, runtime_newosproc, called by a whole lot of global functions, including runtime_starttheworld and runtime_main.) bfd/ * elf64-ppc.c (ppc64_elf_size_stubs): Add __go_go to thread_starters. gold/ * powerpc.cc (Target_powerpc::do_relax): Add __go_go to thread_starters.
2014-11-19Automatic date update in version.inGDB Administrator1-1/+1
2014-11-18Check PC-relative offset overflow in PLT entryH.J. Lu2-8/+25
This patch checks PC-relative offset overflow in pushq instruction in x86-64 PLT entry. bfd/ PR ld/17618 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check PC-relative offset overflow in PLT entry. ld/testsuite/ PR ld/17618 * ld-x86-64/x86-64.exp: Run pr17618 for Linux target. * ld-x86-64/pr17618.d: New file. * ld-x86-64/pr17618.s: Likewise.
2014-11-18More fixes for illegal memory accesses exposed by fuzzed binaries.Nick Clifton3-1/+25
PR binutils/17512 * peXXIgen.c (pe_print_pdata): Fail if the section's virtual size is larger than its real size. (rsrc_print_section): Fix off-by-one error checking for overflow. * pei-x86_64.c (pex64_bfd_print_pdata): Handle empty unwind sections. * dwarf.c (get_encoded_value): Warn and return if the encoded value is more than 64-bits long. (SAFE_BYTE_GET): Do not attempt to read more than 64-bits. (process_extended_line_op): Add more range checks. (decode_location_expression): Use the return value from display_block. Add more range checks. (read_debug_line_header): Add range check. (display_debug_lines_raw): Add range checks. (display_debug_frames): Silently skip multiple zero terminators. Add range checks. (process_cu_tu_index): Check for non-existant or empty sections. Use SAFE_BYTE_GET instead of byte_get.
2014-11-18Add -z bndplt to generate BND prefix in PLT entriesIgor Zamyatin2-6/+12
This patch adds "-z bndplt" option Linux/x86-64 linker to generate BND prefix in PLT entries. It also updated Linux/x86-64 assembler not to generate R_X86_64_PLT32_BND nor R_X86_64_PC32_BND relocations. bfd/ 2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com> * elf64-x86-64.c (elf_x86_64_check_relocs): Enable MPX PLT only for -z bndplt. gas/ 2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com> * config/tc-i386-intel.c (i386_operator): Remove last argument from lex_got call. * config/tc-i386.c (reloc): Remove bnd_prefix from parameters' list. Return always BFD_RELOC_32_PCREL. * (output_branch): Remove condition for BFD_RELOC_X86_64_PC32_BND. * (output_jump): Update call to reloc accordingly. * (output_interseg_jump): Likewise. * (output_disp): Likewise. * (output_imm): Likewise. * (x86_cons_fix_new): Likewise. * (lex_got): Remove bnd_prefix from parameters' list in macro and declarations. Don't use BFD_RELOC_X86_64_PLT32_BND. * (x86_cons): Update call to lex_got accordingly. * (i386_immediate): Likewise. * (i386_displacement): Likewise. * (md_apply_fix): Don't use BFD_RELOC_X86_64_PLT32_BND nor BFD_RELOC_X86_64_PC32_BND. * (tc_gen_reloc): Likewise. include/ 2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com> * bfdlink.h (struct bfd_link_info): Add bndplt. ld/ 2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com> * emulparams/elf_x86_64.sh (BNDPLT): Set to yes for x86_64. * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle "-z bndplt" if BNDPLT is yes. (gld${EMULATION_NAME}_list_options): Add "-z bndplt" entry. * ld.texinfo: Add description for bndplt. ld/testsuite/ 2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com> * testsuite/ld-x86-64/bnd-ifunc-1.d: Add bndplt option. * testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise. * testsuite/ld-x86-64/bnd-plt-1.d: Likewise. Update dissassembly sections. * testsuite/ld-x86-64/mpx.exp: Handle mpx3 and mpx4 tests. * testsuite/ld-x86-64/mpx1a.rd: Remove _BND from relocation name. * testsuite/ld-x86-64/mpx1c.rd: Likewise. * testsuite/ld-x86-64/mpx2a.rd: Likewise. * testsuite/ld-x86-64/mpx2c.rd: Likewise. * testsuite/ld-x86-64/mpx3.dd: New file. * testsuite/ld-x86-64/mpx3a.s: Likewise. * testsuite/ld-x86-64/mpx3b.s: Likewise. * testsuite/ld-x86-64/mpx4.dd: Likewise. * testsuite/ld-x86-64/mpx4a.s: Likewise. * testsuite/ld-x86-64/mpx4b.s: Likewise.
2014-11-18daily updateAlan Modra1-1/+1
2014-11-17daily updateAlan Modra1-1/+1
2014-11-14Fix a null pointer dereference when reading the debug link info from a ↵Nick Clifton2-5/+17
corrupt file. PR binutils/17597 * opncls.c (bfd_get_debug_link_info): Avoid reading off the end of the section. (bfd_get_alt_debug_link_info): Likewise.
2014-11-14More fixes for invalid memory accesses triggered by corrupt binaries.Nick Clifton2-2/+11
PR binutils/17512 * dwarf.c (get_encoded_value): Add an 'end' parameter. Change the 'data' parameter to a double pointer and return the updated value. (decode_location_expression): Update call to get_encoded_value. (frame_need_space): Handle the case where one or both of the mallocs fails. (read_cie): Initialise the cie pointer, even if the read fails. (display_debug_frames): Warn if the calculated block_end is before the start of the block. Break the loop if the CIE could not be read. Update call to get_encoded_value. Warn if the read CFA expressions are too big. * ieee.c (ieee_archive_p) Skip processing if no bytes are read at all. (ieee_object_p): Likewise.
2014-11-13Add cast to unsigned intH.J. Lu2-1/+5
* coffcode.h (coff_slurp_line_table): Add cast to unsigned int.
2014-11-13Rename symbbol to symbolH.J. Lu2-1/+5
* coffcode.h (coff_pointerize_aux_hook): Fix a typo.
2014-11-13Add assembler support for @gotpltH.J. Lu2-16/+8
Obsolete R_X86_64_GOTPLT64 and treat it the same as R_X86_64_GOT64. bfd/ PR gas/17598 * elf64-x86-64.c (elf_x86_64_check_relocs): Treat R_X86_64_GOTPLT64 the same as R_X86_64_GOT64. (elf_x86_64_relocate_section): Likewise. gas/ PR gas/17598 * config/tc-i386.c (reloc): Support BFD_RELOC_X86_64_GOTPLT64. gas/testsuite/ PR gas/17598 * gas/i386/reloc64.s: Add @gotplt check. * gas/i386/reloc64.d: Updated. * gas/i386/reloc64.l: Likewise. ld/testsuite/ PR gas/17598 * ld-x86-64/x86-64.exp: Run gotplt1. * ld-x86-64/gotplt1.d: New file. * ld-x86-64/gotplt1.s: Likewise.
2014-11-13More fixes for memory access violations whilst scanning corrupt binaries.Nick Clifton6-31/+134
PR binutils/17512 * config/obj-coff.c (coff_obj_symbol_new_hook): Set the is_sym field. * coffcode.h (coff_ptr_struct): Add is_sym field. (coff_new_section_hook): Set the is_sym field. (coff_pointerize_aux_hook): Check the is_sym field. (coff_print_aux): Likewise. (coff_compute_section_file_positions): Likewise. (coff_write_object_contents): Likewise. (coff_slurp_line_table): Likewise. (coff_slurp_symbol_table): Likewise. (CALC_ADDEND): Likewise. * coffgen.c (coff_renumber_symbols): Likewise. (coff_mangle_symbols): Likewise. (coff_fix_symbol_name): Likewise. (coff_write_symbol): Likewise. (coff_write_alien_symbol): Likewise. (coff_write_native_symbol): Likewise. (coff_write_symbols): Likewise. (coff_write_linenumbers): Likewise. (coff_pointerize_aux): Likewise. (coff_get_normalized_symtab): Likewise. (coff_get_symbol_info): Likewise. (bfd_coff_get_syment): Likewise. (bfd_coff_get_auxent): Likewise. (coff_print_symbol): Likewise. (coff_find_nearest_line_with_names): Likewise. (bfd_coff_set_symbol_class): Likewise. (coff_make_empty_symbol): Set the is_sym field. (coff_bfd_make_debug_symbol): Likewise. * peicode.h (pe_ILF_make_a_symbol): Likewise. * libcoff.h: Regenerate. * libcoff-in.h: Regenerate.
2014-11-12Fix more memory faults uncovered by fuzzing various executables.Nick Clifton4-14/+53
PR binutils/17512 * dwarf.c (read_and_display_attr_value): Check that we do not read past end. (display_debug_pubnames_worker): Add range checks. (process_debug_info): Check for invalid pointer sizes. (display_loc_list): Likewise. (display_loc_list_dwo): Likewise. (display_debug_ranges): Likewise. (display_debug_aranges): Check for invalid address size. (read_cie): Add range checks. Replace call strchr with while loop. * objdump.c (dump_dwarf): Replace abort with a warning message. (print_section_stabs): Improve range checks. * rdcoff.c (coff_get_slot): Use long for indx parameter type. Add check for an excesively large index. * rddbg.c (read_section_stabs_debugging_info): Zero terminate the string table. Avoid walking off the end of the stabs data. * stabs.c (parse_stab_string): Add check for a NULL name. PR binutils/17512 * coffcode.h (coff_slurp_line_table): Set the line number of corrupt entries to -1. (coff_slurp_symbol_table): Alway initialise the value of the symbol. * coffgen.c (coff_print_symbol): Check that the combined pointer is valid. (coff_print_symbol): Do not print negative line numbers. * peXXigen.c (pe_print_idata): Add range checking displaying member names.
2014-11-12Throw away dodgy coff line number info earlierAlan Modra2-10/+15
PR 17521 * coffcode.h (coff_slurp_line_table): Drop line number info not preceded by a valid function entry. Revert last change.
2014-11-12daily updateAlan Modra1-1/+1
2014-11-11More fixes for invalid memory accesses, uncovered by valgrind and binary ↵Nick Clifton5-31/+78
fuzzers. PR binutils/17512 * coffcode.h (coff_slurp_line_table): Initialise the parts of the line number cache that would not be initialised by the copy from the new line number table. (coff_classify_symbol): Allow for _bfd_coff_internal_syment_name returning NULL. * coffgen.c (coff_get_normalized_symbols): Get the external symbols before allocating space for the internal symbols, in case the get fails. * elf.c (_bfd_elf_slurp_version_tables): Only allocate a verref array if one is needed. Likewise with the verdef array. * peXXigen.c (_bfd_XXi_swap_sym_in): Replace abort()'s with error messages. (_bfd_XXi_swap_aux_in): Make sure that all fields of the aux structure are initialised. (pe_print_edata): Avoid reading off the end of the data buffer.
2014-11-11coff coffAlan Modra2-1/+8
I missed this use of the loop induction variable outside the loop. PR binutils/17512 * coffcode.h (coff_slurp_line_table): Use updated lineno_count when building func_table.
2014-11-11Avoid coff OOMAlan Modra3-31/+44
bfd_zalloc/bfd_zmalloc to fix uninitialized memory reads is too big a hammer, when the size allocated depends on user input. A typical bfd_alloc, bfd_seek, bfd_bread sequence will give an error or warning at the point the file read fails when some enormous item as described by headers is not actually present in the file. Nice operating system allow memory overcommit. But not if you write to the memory. So bfd_zalloc can cause an OOM, thrashing, or system hangs. The patch also fixes a recently introduced endless loop on bad input. PR binutils/17512 * coffcode.h (coff_slurp_line_table): Don't bfd_zalloc, just memset the particular bits we need. Update src after hitting loop "continue". Don't count lineno omitted due to invalid symbols in nbr_func, and update lineno_count. Init entire terminating lineno. Don't both allocating terminator in n_lineno_cache. Redirect sym->lineno pointer to where n_lineno_cache will be copied, and free n_lineno_cache. * pe-mips.c (NUM_HOWTOS): Typo fix.
2014-11-11ld -r abort in _bfd_elf_write_section_eh_frameAlan Modra2-1/+11
Turning on .eh_frame processing for ld -r resulted in systemtap tickling a ld bug. Triggered by the zero terminator not being added to .eh_frame in a separate file as it usually is (crtend.o), but instead being present in the last .eh_frame section along with CIEs and FDEs. The 4-byte terminator makes the section size check fail on 64-bit targets. * elf-eh-frame (_bfd_elf_write_section_eh_frame): Adjust section size check to account for possible zero terminator.
2014-11-11daily updateAlan Modra1-1/+1
2014-11-10bfd/Richard Sandiford2-12/+8
2014-11-10 James Cowgill <James.Cowgill@imgtec.com> * elfxx-mips.c (_bfd_mips_elf_section_processing): don't force small data sections to be PROGBITS
2014-11-10More fixes for problems exposed by valgrind and the address sanitizerNick Clifton9-54/+119
when displaying the contents of corrupt files. PR binutils/17521 * coff-i386.c (NUM_HOWTOS): New define. (RTYPE2HOWTO): Use it. (coff_i386_rtype_to_howto): Likewise. (coff_i386_reloc_name_lookup): Likewise. (CALC_ADDEND): Check that reloc r_type field is valid. * coff-x86_64.c (NUM_HOWTOS): New define. (RTYPE2HOWTO): Use it. (coff_amd64_rtype_to_howto): Likewise. (coff_amd64_reloc_name_lookup): Likewise. (CALC_ADDEND): Check that reloc r_type field is valid. * coffcode.h (coff_slurp_line_table): Check for symbol table indexing underflow. (coff_slurp_symbol_table): Use zalloc to ensure that all table entries are initialised. * coffgen.c (_bfd_coff_read_string_table): Initialise unused bits in the string table. Also ensure that the table is 0 terminated. (coff_get_normalized_symtab): Check for symbol table indexing underflow. * opncls.c (bfd_alloc): Catch the case where a small negative size can result in only 1 byte being allocated. (bfd_alloc2): Use bfd_alloc. * pe-mips.c (NUM_HOWTOS): New define. (coff_mips_reloc_name_lookup): Use it. (CALC_ADDEND): Check that reloc r_type field is valid. * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Initialise unused entries in the DataDirectory. (pe_print_idata): Avoid reading beyond the end of the data block wen printing strings. (pe_print_edata): Likewise. Check for table indexing underflow. * peicode.h (pe_mkobject): Initialise the pe_opthdr field. (pe_bfd_object_p): Allocate and initialize enough space to hold a PEAOUTHDR, even if the opt_hdr field specified less.
2014-11-10daily updateAlan Modra1-1/+1
2014-11-09daily updateAlan Modra1-1/+1
2014-11-08Correct buffer overrun testAlan Modra2-2/+6
* peXXigen.c (pe_print_idata): Revert last patch, cast lhs instead.
2014-11-08daily updateAlan Modra1-1/+1
2014-11-07Cast to unsigned long in range checksH.J. Lu2-2/+7
* peXXigen.c (pe_print_idata): Cast to unsigned long in range checks.
2014-11-07X32: Add REX prefix to encode R_X86_64_GOTTPOFFH.J. Lu2-6/+22
Structions with R_X86_64_GOTTPOFF relocation must be encoded with REX prefix even if it isn't required by destination register. Otherwise linker can't safely perform IE -> LE optimization. bfd/ PR ld/17482 * elf64-x86-64.c (elf_x86_64_relocate_section): Update comments for IE->LE transition. gas/ PR ld/17482 * config/tc-i386.c (output_insn): Add a dummy REX_OPCODE prefix for structions with R_X86_64_GOTTPOFF relocation for x32 if needed. gas/testsuite/ PR ld/17482 * gas/i386/ilp32/x32-tls.d: New file. * gas/i386/ilp32/x32-tls.s: Likewise. ld/testsuite/ PR ld/17482 * ld-x86-64/tlsie4.dd: Updated.
2014-11-07tekhex architecureAlan Modra2-1/+7
is a don't care. * tekhex.c (tekhex_set_arch_mach): Ignore unknown arch errors.
2014-11-07tekhex buffer management and symbol typesAlan Modra2-45/+79
Dramatically reduces memory consumption and processing time for large all-zero data segments. Allows multiple symbol types attached to a given segment to survive objcopy. * tekhex.c (CHUNK_SPAN): Define. (struct data_struct <chunk_init>): Use one byte per span, update all code accessing this field. (find_chunk): Add create param, don't create new entry unless set. (insert_byte): Don't save zeros. (first_phase): Set section SEC_CODE or SEC_DATA flag depending on symbol type. Create an alternate section if both types of symbol are given. Attach type '2' and '6' symbols to absolute section. (move_section_contents): Fix caching of chunk. Don't create chunk when reading, or for writing zeros. (tekhex_set_section_contents): Don't create initial chunks. (tekhex_write_object_contents): Use CHUNK_SPAN.
2014-11-07aoutx.h tidyAlan Modra2-14/+14
Save a multiplication, and any concern that the buffer allocation might be smaller than the amount read (as it could be if the header size isn't a multiple of EXTERNAL_NLIST_SIZE). * aoutx.h (aout_get_external_symbols): Tidy allocation of symbol buffer.
2014-11-07Revert bfd_get_size checksAlan Modra6-40/+11
* archive.c (_bfd_slurp_extended_name_table): Revert bfd_get_size check. * coffcode.h (coff_set_alignment_hook): Likewise. (coff_slurp_line_table): Likewise. * coffgen.c (coff_get_normalized_symtab): Likewise. (_bfd_coff_get_external_symbols): Likewise. * elf.c (bfd_elf_get_str_section): Likewise. * tekhex.c (first_phase): Likewise.
2014-11-07daily updateAlan Modra1-1/+1
2014-11-06Revert changes in previous deltas that introduced new failures intoNick Clifton4-19/+17
the linker testsuite. * aoutx.h (slurp_symbol_table): Revert previous delta. (slurp_reloc_table): Likewise. * compress.c (bfd_get_full_section_contents): Remove file size test. * coffgen.c (coff_get_normalized_symtab): Allow zero-sized symtabs and do not complain about linker generated files.
2014-11-06bfd/elf-attrs.c: Fix possible infinite loop parsing attributesWill Newton2-0/+9
Handle the case of a zero length section or sub-section in _bfd_elf_parse_attributes and in doing so prevent an infinite loop in the parser. bfd/ChangeLog: 2014-11-06 Will Newton <will.newton@linaro.org> * elf-attrs.c (_bfd_elf_parse_attributes): Handle zero length sections and sub-sections.
2014-11-06daily updateAlan Modra1-1/+1
2014-11-05More fixes for memory problems uncovered by file fuzzers.Nick Clifton3-7/+28
PR binutils/17512 * coffcode.h (handle_COMDAT): Replace abort with BFD_ASSERT. Replace another abort with an error message. (coff_slurp_line_table): Add more range checking. * peXXigen.c (pe_print_debugdata): Add range checking.
2014-11-05Fix segfault when creating a dso with discarded .dynsym section.Matthew Fortune2-2/+9
bfd/ * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Fix segfault when creating a dso with discarded dynsym section.
2014-11-05Update .MIPS.abiflags to support MIPS R6Matthew Fortune2-0/+13
bfd/ * elfxx-mips.c (update_mips_abiflags_isa): Add E_MIPS_ARCH_32R6 and E_MIPS_ARCH_64R6 support. ld/testsuite/ * ld-mips-elf/abiflags-strip10-ph.d: New file. * ld-mips-elf/mips-eld.exp: Run the new test. gas/ * config/tc-mips.c (mips_elf_final_processing): Add INSN_ISA32R6 and INSN_ISA64R6 support. gas/testsuite/ * gas/mips/elf_arch_mips32r6.d: New file. * gas/mips/elf_arch_mips64r6.d: New file. * gas/mips/mips.exp: Run the new tests.
2014-11-05More fixes for processing corrupt files.Nick Clifton3-39/+129
PR binutils/17512 * coffcode.h (coff_set_alignment_hook): Warn if the file lies about the number of relocations it contains. (coff_sort_func_alent): Return 0 if the pointers are NULL. (coff_slurp_line_table): Add more range checks. Do not free new tables created when sorting line numbers. * peXXigen.c (pe_print_idata): Add range checks. (pe_print_edata): Likewise. (rsrc_print_resource_entries): Likewise. Avoid printing control characters. Terminate priniting if corruption is detected. (rsrc_print_resource_directory): Terminate printing if an unknown directory type is encountered. (pe_print_debugdata): Fix off-by-one error. (rsrc_count_entries): Add range checking. (rsrc_parse_entry): Likewise.
2014-11-05daily updateAlan Modra1-1/+1
2014-11-04Fix problem with linker created sections being mistakenly flaggedNick Clifton2-1/+6
as corrupt by the new error checking code in bfd_get_full_section_contents. PR binutils/17512 * compress.c (bfd_get_full_section_contents): Improve test for linker created objects.