aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2014-01-01daily updateAlan Modra1-1/+1
2013-12-31daily updateAlan Modra1-1/+1
2013-12-30 * peXXigen.c (rsrc_process_section): Use ptrdiff_t as the type forIlya Tocar2-2/+7
pointer arithmetic.
2013-12-29daily updateAlan Modra1-1/+1
2013-12-28daily updateAlan Modra1-1/+1
2013-12-27daily updateAlan Modra1-1/+1
2013-12-26daily updateAlan Modra1-1/+1
2013-12-25daily updateAlan Modra1-1/+1
2013-12-24daily updateAlan Modra1-1/+1
2013-12-23daily updateAlan Modra1-1/+1
2013-12-22daily updateAlan Modra1-1/+1
2013-12-21daily updateAlan Modra1-1/+1
2013-12-21Don't segv on cie.initial_instructions[] overflow.Alan Modra2-6/+18
Don't attempt to merge CIEs with a larger number of insns than will fit in the buffer. * elf-eh-frame.c (cie_eq): Return false when initial_insn_length is too large. (cie_compute_hash): Don't exceed bounds of initial_instructions. (_bfd_elf_parse_eh_frame): Always set initial_insn_length, and save as much of insns to initial_instructions[] as will fit.
2013-12-20daily updateAlan Modra1-1/+1
2013-12-19Set SHF_INFO_LINK bit for SHT_REL/SHT_RELA sectionsH.J. Lu2-1/+12
It is a good pratice to set the SHF_INFO_LINK bit when the sh_info field represents a section header index. bfd/ PR binutils/16317 * elf.c (assign_section_numbers): Set the SHF_INFO_LINK bit for SHT_REL/SHT_RELA sections when setting the sh_info field. binutils/testsuite/ PR binutils/16317 * binutils-all/readelf.s: Updated. * binutils-all/readelf.s-64: Likewise. ld/testsuite/ PR binutils/16317 * ld-elf/linkinfo1.s: New file. * ld-elf/linkinfo1a.d: Likewise. * ld-elf/linkinfo1b.d: Likewise.
2013-12-19 * Fix indentation issue and reorganize last commit entryPierre Muller2-21/+26
so that it is shorter than 80. peXXigen.c (rsrc_cmp): Fix unused variable warning.
2013-12-19 * peXXigen.c (u16_mbtouc): Avoid unused function warning by excluding ifPierre Muller2-75/+122
__CYGWIN__ or __MINGW32__ macro is defined. (rsrc_cmp): Fix Windows host version and version without wchar header. [__CYGWIN__, __MINGW32__]: Introduce rsrccmp macro. Fix coding standard issues.
2013-12-19Set proper OS ABI magic for ELF/m68kAndreas Schwab2-0/+26
* elf32-m68k.c (elf_m68k_add_symbol_hook): New function. (elf_backend_add_symbol_hook): Define.
2013-12-19daily updateAlan Modra1-1/+1
2013-12-18 * peXXigen.c (rsrc_print_section): Use ptrdiff_t as the type forNick Clifton2-1/+8
pointer arithmetic.
2013-12-18daily updateAlan Modra1-1/+1
2013-12-17Call _bfd_elf_post_process_headersH.J. Lu2-1/+6
* elf32-arm.c (elf32_arm_post_process_headers): Call _bfd_elf_post_process_headers.
2013-12-17Call _bfd_elf_post_process_headersH.J. Lu3-2/+11
* elf32-spu.c (spu_elf_post_process_headers): Call _bfd_elf_post_process_headers. * elfxx-mips.c (_bfd_mips_post_process_headers): Likewise.
2013-12-17Default elf_backend_post_process_headers to set OSABIH.J. Lu19-74/+41
* elf-bfd.h (_bfd_elf_set_osabi): Renamed to ... (_bfd_elf_post_process_headers): This. * elf.c (_bfd_elf_compute_section_file_positions): Always call elf_backend_post_process_headers. (_bfd_elf_set_osabi): Renamed to ... (_bfd_elf_post_process_headers): This. * elf32-hppa.c (elf_backend_post_process_headers): Removed. * elf32-i370.c (elf_backend_post_process_headers): Likewise. * elf32-msp430.c (elf_backend_post_process_headers): Likewise. * elf32-ppc.c (elf_backend_post_process_headers): Likewise. * elf32-sparc.c (elf_backend_post_process_headers): Likewise. * elf64-hppa.c (elf_backend_post_process_headers): Likewise. * elf64-ppc.c (elf_backend_post_process_headers): Likewise. * elf64-sparc.c (elf_backend_post_process_headers): Likewise. * elf64-x86-64.c (elf_backend_post_process_headers): Likewise. * (elf_backend_post_process_headers): Likewise. * (elf_backend_post_process_headers): Likewise. * elf32-i386.c (elf_backend_post_process_headers): Don't define as _bfd_elf_set_osabi. (elf_i386_fbsd_post_process_headers): Updated. * elf32-mips.c (elf_fbsd_post_process_headers): Removed. (elf_backend_post_process_headers): Likewise. * elf32-tic6x.c (elf32_tic6x_set_osabi): Removed. (elf_backend_post_process_headers): Likewise. * elf64-mips.c (elf_fbsd_post_process_headers): Removed. (elf_backend_post_process_headers): Likewise. * elfn32-mips.c (elf_fbsd_post_process_headers): Removed. (elf_backend_post_process_headers): Likewise. * elfnn-aarch64.c (elfNN_aarch64_post_process_headers): Updated. * elfxx-target.h (elf_backend_post_process_headers): Default to _bfd_elf_post_process_headers.
2013-12-17Use _bfd_elf_copy_private_bfd_dataH.J. Lu11-231/+34
PR binutils/16318 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Call _bfd_elf_copy_private_bfd_data. * elf32-bfin.c (bfin_elf_copy_private_bfd_data): Removed. (elf32_bfinfdpic_copy_private_bfd_data): Likewise. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-frv.c (frv_elf_copy_private_bfd_data): Removed. (elf32_frvfdpic_copy_private_bfd_data): Likewise. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Removed. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-lm32.c (lm32_elf_copy_private_bfd_data): Removed. (lm32_elf_fdpic_copy_private_bfd_data): Call _bfd_elf_copy_private_bfd_data. * elf32-mep.c (mep_elf_copy_private_bfd_data): Removed. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-msp430.c (elf32_msp430_copy_private_bfd_data): Removed. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-mt.c (mt_elf_copy_private_bfd_data): Removed. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-sh.c (sh_elf_set_private_flags): Removed. (sh_elf_copy_private_data): Call _bfd_elf_copy_private_bfd_data and sh_elf_set_mach_from_flags. * elfnn-aarch64.c (elfNN_aarch64_copy_private_bfd_data): Removed. (bfd_elfNN_bfd_copy_private_bfd_data): Don't define.
2013-12-17Rename index to indxH.J. Lu2-8/+12
* peXXigen.c (rsrc_process_section): Rename index to indx.
2013-12-17 * peXXigen.c: Include wchar.h if available.Nick Clifton5-81/+1236
Include safe-ctype.h. (HighBitSet, SetHighBit, WithoutHighBit): New macros. (pe_print_resource_entries): Rename to rsrc_print_resource_entries. Handle names that are not RVAs. (pe_print_resource_directory): Rename to rsrc_print_resource_directory. (pe_print_rsrc): Rename to rsrc_print_section. Corrupt computation of RVA bias. (rsrc_count_entries): New function. (rsrc_count_directory): New function. (rsrc_parse_entry): New function. (rsrc_parse_entries): New function. (rsrc_parse_directory): New function. (rsrc_write_string): New function. (rsrc_compute_rva): New function. (rsrc_write_leaf): New function. (rsrc_write_entry): New function. (rsrc_write_directory): New function. (u16_mbtouc): New function. (rsrc_cmp): New function. (rsrc_print_name): New function. (rsrc_resource_name): New function. (rsrc_merge_string_entries): New function. (rsrc_sort_entries): New function. (rsrc_attach_chain): New function. (rsrc_merge): New function. (rsrc_process_section): New function - merges the contents of a .rsrc section. (_bfd_XXi_final_link_postscript): Call rsrc_process_section. * configure.in (AC_CHECK_HEADERS): Add wchar.h * config.in: Regenerate. * configure: Regenerate.
2013-12-17daily updateAlan Modra1-1/+1
2013-12-16Fix missing newline in error messageAndreas Schwab2-1/+6
* elf64-ppc.c (ppc64_elf_relocate_section): Add newline to error message.
2013-12-16daily updateAlan Modra1-1/+1
2013-12-15daily updateAlan Modra1-1/+1
2013-12-14Correct elf_merge_st_other arguments for weak symbolsAlan Modra2-1/+9
* elflink.c (_bfd_elf_merge_symbol): If merging a new weak symbol that will be skipped, we don't have a new definition.
2013-12-14daily updateAlan Modra1-1/+1
2013-12-13Add support for Andes NDS32:Kuan-Lin Chen15-0/+15088
BFD: * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add nds32 files. * Makefile.in: Regenerate. * archures.c (bfd_nds32_arch): Add nds32 target. * bfd-in2.h: Regenerate. * config.bfd (nds32*le-*-linux): Add bfd_elf32_nds32lelin_vec and bfd_elf32_nds32belin_vec. (nds32*be-*-linux*): Likewise. (nds32*le-*-*): Add bfd_elf32_nds32le_vec and bfd_elf32_nds32be_vec. (nds32*be-*-*): Likewise. * configure.in (bfd_elf32_nds32be_vec): Add elf32-nds32.lo. (bfd_elf32_nds32le_vec): Likewise. (bfd_elf32_nds32belin_vec): Likewise. (bfd_elf32_nds32lelin_vec): Likewise. * configure: Regenerate. * cpu-nds32.c: New file for nds32. * elf-bfd.h: Add NDS32_ELF_DATA. * elf32-nds32.c: New file for nds32. * elf32-nds32.h: New file for nds32. * libbfd.h: Regenerate. * reloc.c: Add relocations for nds32. * targets.c (bfd_elf32_nds32be_vec): New declaration for nds32. (bfd_elf32_nds32le_vec): Likewise. (bfd_elf32_nds32belin_vec): Likewise. (bfd_elf32_nds32lelin_vec): Likewise. BINUTILS: * readelf.c: Include elf/nds32.h (guess_is_rela): Add case for EM_NDS32. (dump_relocations): Add case for EM_NDS32. (decode_NDS32_machine_flags): New. (get_machine_flags): Add case for EM_NDS32. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (process_nds32_specific): New. (process_arch_specific): Add case for EM_NDS32. * NEWS: Announce Andes nds32 support. * MAINTAINERS: Add nds32 maintainers. TESTSUITE: * binutils-all/objdump.exp: Add NDS32 cpu. * binutils-all/readelf.r: Skip extra reloc created by NDS32. GAS: * Makefile.am (TARGET_CPU_CFILES): Add config/tc-nds32.c. (TARGET_CPU_HFILES): Add config/tc-nds32.h. * Makefile.in: Regenerate. * configure.in (nds32): Add nds32 target extension config support. * configure.tgt : Add case for nds32-*-elf* and nds32-*-linux*. * configure: Regenerate. * config/tc-nds32.c: New file for nds32. * config/tc-nds32.h: New file for nds32. * doc/Makefile.am (CPU_DOCS): Add c-nds32.texi. * doc/Makefile.in: Regenerate. * doc/as.texinfo: Add nds32 options. * doc/all.texi: Set NDS32. * doc/c-nds32.texi: New file dor nds32 document. * NEWS: Announce Andes nds32 support. TESTSUITE: * gas/all/gas.exp: Add expected failures for NDS32. * gas/elf/elf.exp: Likewise. * gas/lns/lns.exp: Use alternate test. * gas/macros/irp.d: Skip for NDS32. * gas/macros/macros.exp: Skip some tests for the NDS32. * gas/macros/rept.d: Skip for NDS32. * gas/macros/test3.d: Skip for NDS32. * gas/nds32: New directory. * gas/nds32/alu-1.s: New test. * gas/nds32/alu-1.d: Likewise. * gas/nds32/alu-2.s: Likewise. * gas/nds32/alu-2.d: Likewise. * gas/nds32/br-1.d: Likewise. * gas/nds32/br-1.s: Likewise. * gas/nds32/br-2.d: Likewise. * gas/nds32/br-2.s: Likewise. * gas/nds32/ji-jr.d: Likewise. * gas/nds32/ji-jr.s: Likewise. * gas/nds32/ls.d: Likewise. * gas/nds32/ls.s: Likewise. * gas/nds32/lsi.d: Likewise. * gas/nds32/lsi.s: Likewise. * gas/nds32/to-16bit-v1.d: Likewise. * gas/nds32/to-16bit-v1.s: Likewise. * gas/nds32/to-16bit-v2.d: Likewise. * gas/nds32/to-16bit-v2.s: Likewise. * gas/nds32/to-16bit-v3.d: Likewise. * gas/nds32/to-16bit-v3.s: Likewise. * gas/nds32/nds32.exp: New test driver. LD: * Makefile.am (ALL_EMULATION_SOURCES): Add nds32 target. * Makefile.in: Regenerate. * configure.tgt: Add case for nds32*le-*-elf*, nds32*be-*-elf*, nds32*le-*-linux-gnu*, and nds32*be-*-linux-gnu*. * emulparams/nds32belf.sh: New file for nds32. * emulparams/nds32belf_linux.sh: Likewise. * emulparams/nds32belf16m.sh: Likewise. * emulparams/nds32elf.sh: Likewise. * emulparams/nds32elf_linux.sh: Likewise. * emulparams/nds32elf16m.sh: Likewise. * emultempl/nds32elf.em: Likewise. * scripttempl/nds32elf.sc}: Likewise. * gen-doc.texi: Set NDS32. * ld.texinfo: Set NDS32. * NEWS: Announce Andes nds32 support. TESTSUITE: * lib/ld-lib.exp: Add NDS32 to list of targets that do not support shared library generation. * ld-nds32: New directory. * ld-nds32/branch.d: New test. * ld-nds32/branch.ld: New test. * ld-nds32/branch.s: New test. * ld-nds32/diff.d: New test. * ld-nds32/diff.ld: New test. * ld-nds32/diff.s: New test. * ld-nds32/gp.d: New test. * ld-nds32/gp.ld: New test. * ld-nds32/gp.s: New test. * ld-nds32/imm.d: New test. * ld-nds32/imm.ld: New test. * ld-nds32/imm.s: New test. * ld-nds32/imm_symbol.s: New test. * ld-nds32/relax_jmp.d: New test. * ld-nds32/relax_jmp.ld: New test. * ld-nds32/relax_jmp.s: New test. * ld-nds32/relax_load_store.d: New test. * ld-nds32/relax_load_store.ld: New test. * ld-nds32/relax_load_store.s: New test. * ld-nds32/nds32.exp: New file. OPCODES: * Makefile.am (TARGET_LIBOPCODES_CFILES): Add nds32-asm.c and nds32-dis.c. * Makefile.in: Regenerate. * configure.in: Add case for bfd_nds32_arch. * configure: Regenerate. * disassemble.c (ARCH_nds32): Define. * nds32-asm.c: New file for nds32. * nds32-asm.h: New file for nds32. * nds32-dis.c: New file for nds32. * nds32-opc.h: New file for nds32. INCLUDE: * dis-asm.h (print_insn_nds32): Add nds32 target. * elf/nds32.h: New file for nds32. * opcode/nds32.h: New file for nds32.
2013-12-13daily updateAlan Modra1-1/+1
2013-12-12Also copy EI_OSABI fieldH.J. Lu2-5/+16
bfd/ PR binutils/16318 * elf.c (_bfd_elf_copy_private_bfd_data): Remove BFD_ASSERT. Set e_flags only if elf_flags_init is FALSE. Copy EI_OSABI field. binutils/testsuite/ PR binutils/16318 * binutils-all/strip-10.d: Check OS/ABI.
2013-12-12Remove bfd_elf32_bfd_set_private_bfd_flagsH.J. Lu2-2/+4
* elf32-sh.c (bfd_elf32_bfd_set_private_bfd_flags): Removed.
2013-12-12Set ET_EXEC for -pie -Ttext-segment=H.J. Lu2-0/+26
bfd/ * elf.c (assign_file_positions_except_relocs): Set e_type in ELF header to ET_EXEC for -pie -Ttext-segment=. 2013-12-10 H.J. Lu <hongjiu.lu@intel.com> * ld-pie/vaddr-0.d: New file. * ld-pie/vaddr-1.d: Likewise. * ld-pie/vaddr.s: Likewise.
2013-12-12daily updateAlan Modra1-1/+1
2013-12-11daily updateAlan Modra1-1/+1
2013-12-10daily updateAlan Modra1-1/+1
2013-12-09daily updateAlan Modra1-1/+1
2013-12-08correct file referenceAlan Modra1-1/+1
2013-12-08Fix --as-needed undefined symbol references from dynamic libraries.Alan Modra2-0/+14
libx.so refers to some_sym, liby.so provides some_sym@some_version wasn't seen as satisfying the reference. * elf64-ppc.c (_bfd_elf_add_default_symbol): Set dynamic_def and ref_dynamic_nonweak when chaining together indirect symbols.
2013-12-08daily updateAlan Modra1-1/+1
2013-12-07daily updateAlan Modra1-1/+1
2013-12-06Add epilog unwind for x86_64 pe/coffTristan Gingold2-14/+41
include/coff/ 2013-12-06 Tristan Gingold <gingold@adacore.com> * pe.h (UWOP_EPILOG, UWOP_PARE): Define. bfd/ 2013-12-06 Tristan Gingold <gingold@adacore.com> * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add argument rf. Display epilog opcode. (pex64_dump_xdata): Add argument rf; make addr a local variable. Adjust call to pex64_xdata_print_uwd_codes. (pex64_bfd_print_pdata): Display code range, adjust call to pex64_dump_xdata.
2013-12-06daily updateAlan Modra1-1/+1
2013-12-05Clear allocated target data.Tristan Gingold2-1/+5
2013-12-05 Tristan Gingold <gingold@adacore.com> * mach-o.c (bfd_mach_o_mkobject_init): Use bfd_zalloc.
2013-12-05daily updateAlan Modra1-1/+1