aboutsummaryrefslogtreecommitdiff
path: root/bfd/peicode.h
AgeCommit message (Collapse)AuthorFilesLines
2019-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2018-04-16Remove m68k-aout and m68k-coff supportAlan Modra1-6/+0
include/ * aout/host.h: Remove m68k-aout and m68k-coff support. * aout/hp300hpux.h: Delete. * coff/apollo.h: Delete. * coff/aux-coff.h: Delete. * coff/m68k.h: Delete. bfd/ * Makefile.am: Remove m68k-aout and m68k-coff support. * aoutf1.h: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * bfd-in.h: Likewise. * bfd.c: Likewise. * coffcode.h: Likewise. * coffswap.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * configure.host: Likewise. * doc/bfd.texinfo: Likewise. * doc/bfdint.texi: Likewise. * freebsd.h: Likewise. * gen-aout.c: Likewise. * hpux-core.c: Likewise. * libaout.h: Likewise. * libbfd-in.h: Likewise. * pdp11.c: Likewise. * peicode.h: Likewise. * riscix.c: Likewise. * targets.c: Likewise. * aout0.c: Delete. * coff-apollo.c: Delete. * coff-aux.c: Delete. * coff-m68k.c: Delete. * coff-svm68k.c: Delete. * coff-u68k.c: Delete. * hosts/delta68.h: Delete. * hosts/hp300bsd.h: Delete. * hosts/m68kaux.h: Delete. * hosts/news.h: Delete. * hp300bsd.c: Delete. * hp300hpux.c: Delete. * liboasys.h: Delete. * m68k4knetbsd.c: Delete. * m68klinux.c: Delete. * m68knetbsd.c: Delete. * oasys.c: Delete. * versados.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. binutils/ * testsuite/binutils-all/copy-2.d: Remove m68k-aout and m68k-coff support. * testsuite/binutils-all/copy-3.d: Likewise. * testsuite/binutils-all/objcopy.exp: Likewise. * testsuite/lib/binutils-common.exp: Likewise. gas/ * Makefile.am: Remove m68k-aout and m68k-coff support. * config/tc-m68k.c: Likewise. * config/tc-m68k.h: Likewise. * configure.ac: Likewise. * configure.tgt: Likewise. * testsuite/gas/all/weakref1u.d: Likewise. * testsuite/gas/m68k/all.exp: Likewise. * testsuite/gas/m68k/br-isaa.d: Likewise. * testsuite/gas/m68k/br-isab.d: Likewise. * testsuite/gas/m68k/br-isac.d: Likewise. * config/te-psos.h: Delete. * config/te-sun3.h: Delete. * testsuite/gas/m68k-coff/gas.exp: Delete. * testsuite/gas/m68k-coff/p2389.s: Delete. * testsuite/gas/m68k-coff/p2389a.s: Delete. * testsuite/gas/m68k-coff/p2430.s: Delete. * testsuite/gas/m68k-coff/p2430a.s: Delete. * testsuite/gas/m68k-coff/t1.s: Delete. * testsuite/gas/m68k/p3041.d: Delete. * testsuite/gas/m68k/p3041.s: Delete. * testsuite/gas/m68k/p3041data.d: Delete. * testsuite/gas/m68k/p3041data.s: Delete. * testsuite/gas/m68k/p3041pcrel.d: Delete. * testsuite/gas/m68k/p3041pcrel.s: Delete. * testsuite/gas/m68k/t2.d: Delete. * Makefile.in: Regenerate. * config.in: Regenerate. * configure: Regenerate. * po/POTFILES.in: Regenerate. ld/ * Makefile.am: Remove m68k-aout and m68k-coff support. * configure.tgt: Likewise. * emultempl/m68kelf.em: Likewise. * ld.texinfo: Likewise. * mri.c: Likewise. * emulparams/delta68.sh: Delete. * emulparams/hp300bsd.sh: Delete. * emulparams/hp3hpux.sh: Delete. * emulparams/m68k4knbsd.sh: Delete. * emulparams/m68kaout.sh: Delete. * emulparams/m68kaux.sh: Delete. * emulparams/m68kcoff.sh: Delete. * emulparams/m68klinux.sh: Delete. * emulparams/m68knbsd.sh: Delete. * emulparams/m68kpsos.sh: Delete. * emulparams/sun3.sh: Delete. * emultempl/m68kcoff.em: Delete. * scripttempl/delta68.sc: Delete. * scripttempl/m68kaux.sc: Delete. * scripttempl/m68kcoff.sc: Delete. * scripttempl/psos.sc: Delete. * testsuite/ld-versados/t1-1.ro: Delete. * testsuite/ld-versados/t1-2.ro: Delete. * testsuite/ld-versados/t1.ld: Delete. * testsuite/ld-versados/t1.ook: Delete. * testsuite/ld-versados/t2-1.ro: Delete. * testsuite/ld-versados/t2-2.ro: Delete. * testsuite/ld-versados/t2-3.ro: Delete. * testsuite/ld-versados/t2.ld: Delete. * testsuite/ld-versados/t2.ook: Delete. * testsuite/ld-versados/versados.exp: Delete. * Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate.
2018-02-26AOUT/COFF/PE messagesAlan Modra1-8/+9
Capitalization, full-stops and unnecessary trailing \n fixes. * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c, * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c, * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c, * peXXigen.c, * peicode.h: Standardize error/warning messages.
2018-02-19Use %pA and %pB in messages rather than %A and %BAlan Modra1-8/+8
First step towards compiler verification of _bfd_error_handler arguments, and better verification of translated messages. bfd/ * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. ld/ * ldmisc.c (vfinfo): Handle %pA and %pB in place of %A and %B. * ldcref.c: Update all messages using %A and %B. * ldexp.c: Likewise. * ldlang.c: Likewise. * ldmain.c: Likewise. * ldmisc.c: Likewise. * pe-dll.c: Likewise. * plugin.c: Likewise. * emultempl/beos.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/nds32elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/xtensaelf.em: Likewise.
2018-02-12Add support for reading msdos MZ executables.Zebediah Figura1-3/+3
See email thread starting here: https://www.sourceware.org/ml/binutils/2018-01/msg00001.html include * coff/msdos.h: New header. * coff/pe.h: Move common defines to msdos.h. * coff/powerpc.h: Likewise. bfd * i386msdos.c (msdos_mkobject); New function. (msdos_object_p): New function. (i386_msdos_vec): Use msdos_object_p as the check_format function. * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and IMAGE_NT_SIGNATURE. * peXXigen.c: Likewise. * coff-ia64.c: Likewise.
2018-01-03Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2017-12-06BFD whitespace fixesAlan Modra1-79/+79
Binutils is supposed to use tabs. In my git config I have whitespace = indent-with-non-tab,space-before-tab,trailing-space and I got annoyed enough seeing red in "git diff" output to fix the problems. * doc/header.sed: Trim trailing space when splitting lines. * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h, * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c, * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c, * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c, * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c, * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c, * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c, * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c, * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c, * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c, * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c, * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c, * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c, * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c, * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c, * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c, * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h, * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h, * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c, * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c, * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c, * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h, * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c, * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c, * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c, * xsym.c, * xsym.h: Whitespace fixes. * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
2017-11-01Update check for invalid values in pe_bfd_read_buildid function.Nick Clifton1-3/+2
PR 22373 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size and offset in light of further possible bogus values.
2017-10-31Fix illegal memory access triggered when parsing a PE binary with a corrupt ↵Nick Clifton1-3/+6
data dictionary. PR 22373 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data offset values.
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-12-05Fix seg-fault in the binutils utilities when reading a corrupt input file.Nick Clifton1-1/+2
PR binutils/20905 * peicode.h (pe_ILF_object_p): Use strnlen to avoid running over the end of the string buffer.
2016-12-05Fix abort when running tools on a bogus binary.Nick Clifton1-2/+2
PR binutils/20907 * peicode.h (pe_ILF_build_a_bfd): Replace abort with error return.
2016-10-19Add c-format tags to translatable strings with more than one argument-using ↵Nick Clifton1-0/+5
formatting token. * aout-adobe.c: Add missing c-format tags for translatable strings. * aout-cris.c: Likewise. * aoutx.h: Likewise. * bfd.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * cpu-arm.c: Likewise. * dwarf2.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * m68klinux.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * pei-x86_64.c: Likewise. * peicode.h: Likewise. * ppcboot.c: Likewise. * reloc.c: Likewise. * sparclinux.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * vms-lib.c: Likewise. * xcofflink.c: Likewise.
2016-09-14Fix seg-fault in objdump when run on a fuzzed PE binary.Nick Clifton1-11/+16
PR binutils/20605 * peicode.h (pe_bfd_read_buildid): Check that the Data Directory contains a valid size for the Debug directory.
2016-02-01Add support for importing data from ILF images.Nathaniel Smith1-14/+15
* peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both CODE and DATA.
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-08-12Remove trailing spaces in bfdH.J. Lu1-1/+1
2015-08-11Fix memory access problems discovered when running some binary tools on ↵Nick Clifton1-0/+32
corrupt files. PR binutils/18758 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section group information. * peicode.h (pe_ILF_make_a_section): Ensure alignment of the used_by_bfd pointer. (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
2015-06-15Allow gdb to find debug symbols file by build-id for PE file format alsoJon Turney1-4/+96
This promotes BFD's struct elf_build_id to the generic struct bfd_build_id, populated when an ELF or PE BFD is read. gdb is updated to use that, and to use the build-id to find symbols for PE files also. There is currently no generic way to extract the build-id from an object file, perhaps an option to objdump to do this might make sense? On x86_64-pc-cygwin, gdb's sepdebug.exp changes: -# of unsupported tests 1 +# of expected passes 90 I don't seem to get consistent testsuite runs on i686-linux-gnu, but there don't appear to be any regressions. bfd/ChangeLog: 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk> * elf-bfd.h : Remove struct elf_build_id. * bfd.c : Add struct bfd_build_id. * bfd-in2.h: Regenerate. * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id. * libpei.h: Add protoype and macros for bfd_XXi_slurp_codeview_record. * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public * peicode.h (pe_bfd_read_buildid): Add. (pe_bfd_object_p): Use pe_bfd_read_buildid(). gdb/ChangeLog: 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk> * build-id.c: Don't include elf-bfd.h. (build_id_bfd_get): Use bfd_build_id. (build_id_verify): Ditto. * build-id.h: Ditto. (find_separate_debug_file_by_buildid): Ditto. * python/py-objfile.c: Don't include elf-bfd.h. (objfpy_get_build_id) Use bfd_build_id. (objfpy_build_id_matches, objfpy_lookup_objfile_by_build_id): Ditto. * coffread.c: Include build-id.h. (coff_symfile_read): Try find_separate_debug_file_by_buildid. gdb/doc/ChangeLog: 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk> * gdb.texinfo (Separate Debug Files): Document that PE is also supported. gdb/testsuite/ChangeLog: 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk> * gdb.base/sepdebug.exp: Add EXEEXT where needed. * lib/gdb.exp (get_build_id): Teach how to extract build-id from a PE file. * lib/future.exp (gdb_find_objdump): Add gdb_find_objdump. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2015-03-18Fixes a problem generating relocs for import libraries created by Microsoft ↵Nick Clifton1-0/+9
tools for the x85_64 architecture. PR ld/16598 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs suitable for the AMD64.
2015-01-21Fix memory access violations triggered by running strip on fuzzed binaries.Nick Clifton1-0/+3
PR binutils/17512 * coffcode.h (coff_set_arch_mach_hook): Check return value from bfd_malloc. (coff_slurp_line_table): Return FALSE if the line number information was corrupt. (coff_slurp_symbol_table): Return FALSE if the symbol information was corrupt. * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always initialise the fields of the dyld_info structure. (bfd_mach_o_build_exec_seg_command): Replace assertion with an error message and a return value. (bfd_mach_o_layout_commands): Change the function to boolean. Return FALSE if the function fails. (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands fails. (bfd_mach_o_read_command): Fail if an unrecognised command is encountered. * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the read fails. (slurp_symtab): Check the return from bfd_malloc. (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy encountered an error. (_bfd_XXi_final_link_postscript): Fail if a section could not be copied. * peicode.h (pe_bfd_object_p): Fail if the header could not be swapped in. * tekhex.c (first_phase): Fail if the section is too big. * versados.c (struct esdid): Add content_size field. (process_otr): Use and check the new field. (versados_get_section_contents): Check that the section exists and that the requested data is available. PR binutils/17512 * addr2line.c (main): Call bfd_set_error_program_name. * ar.c (main): Likewise. * coffdump.c (main): Likewise. * cxxfilt.c (main): Likewise. * dlltool.c (main): Likewise. * nlmconv.c (main): Likewise. * nm.c (main): Likewise. * objdump.c (main): Likewise. * size.c (main): Likewise. * srconv.c (main): Likewise. * strings.c (main): Likewise. * sysdump.c (main): Likewise. * windmc.c (main): Likewise. * windres.c (main): Likewise. * objcopy.c (main): Likewise. (copy_relocations_in_section): Check for relocs without associated symbol pointers.
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-11-13More fixes for memory access violations whilst scanning corrupt binaries.Nick Clifton1-0/+1
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-10More fixes for problems exposed by valgrind and the address sanitizerNick Clifton1-4/+10
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-03-13Add pe/x86_64 bigobj file format.Tristan Gingold1-10/+9
bfd/ * peicode.h (pe_ILF_object_p): Adjust, as the version number has been read. (pe_bfd_object_p): Also read version number to detect ILF. * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define. (x86_64pe_bigobj_vec): Define * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field. (bfd_coff_max_nscns): New macro. (coff_compute_section_file_positions): Use unsigned int for target_index. Compare with bfd_coff_max_nscns. (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table): Set a value for _bfd_coff_max_nscns. (header_bigobj_classid): New constant. (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out) (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out) (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New functions. (bigobj_swap_table): New table. * libcoff.h: Regenerate. * coff-sh.c (bfd_coff_small_swap_table): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Add value for _bfd_coff_max_nscns. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coff-rs6000.c (bfd_xcoff_backend_data) (bfd_pmac_xcoff_backend_data): Likewise. * coff64-rs6000.c (bfd_xcoff_backend_data) (bfd_xcoff_aix5_backend_data): Likewise. * targets.c (x86_64pe_bigobj_vec): Declare. * configure.in (x86_64pe_bigobj_vec): New vector. * configure: Regenerate. * config.bfd: Add bigobj object format for Windows targets. gas/ * config/tc-i386.c (use_big_obj): Declare. (OPTION_MBIG_OBJ): Define. (md_longopts): Add -mbig-obj option. (md_parse_option): Handle it. (md_show_usage): Display help for this option. (i386_target_format): Use bigobj for x86-64 if -mbig-obj. * doc/c-i386.texi: Document the option. gas/testsuite/ * gas/pe/big-obj.d, gas/pe/big-obj.s: Add test. * gas/pe/pe.exp: Add test. include/coff/ * pe.h (struct external_ANON_OBJECT_HEADER_BIGOBJ): Declare. (FILHSZ_BIGOBJ): Define. (struct external_SYMBOL_EX): Declare. (SYMENT_BIGOBJ, SYMESZ_BIGOBJ): Define. (union external_AUX_SYMBOL_EX): Declare. (AUXENT_BIGOBJ, AUXESZ_BIGOBJ): Define. * internal.h (struct internal_filehdr): Change type of f_nscns.
2014-03-05Update copyright yearsAlan Modra1-1/+1
2013-04-17 * coffcode.h: Added a cast to void when a bfd_set_section_*()Nick Clifton1-4/+2
macro's return value is ignored. * elf32-hppa.c: Likewise. * elf32-tic6x.c: Likewise. * mach-o.c: Likewise. * mmo.c: Likewise. * opncls.c: Likewise. * peicode.h: Likewise. * elf32-m32r.c: Check return value of bfd_set_section_*(). * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * vms-alpha.c: Likewise.
2013-03-21 * coffgen.c (coff_real_object_p): Make global.Kai Tietz1-7/+39
* peicode.h (coff_real_object_p): Add prototype. (FILHDR): Defined for COFF_IMAGE_WITH_PE as external_PEI_IMAGE_hdr structure. (coff_swap_filehdr_in): Handle variable header-size. * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Just handle amount of directory-entiries as specified in pe-header.
2013-01-10Remove trailing white spaces in bfdH.J. Lu1-4/+4
* aout0.c: Remove trailing white spaces. * archive.c: Likewise. * archures.c: Likewise. * bfd-in.h: Likewise. * bfd-in2.h: Likewise. * coff-alpha.c: Likewise. * coff-i860.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-tic80.c: Likewise. * coff-x86_64.c: Likewise. * coff-z80.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * compress.c: Likewise. * corefile.c: Likewise. * cpu-arm.c: Likewise. * cpu-avr.c: Likewise. * cpu-bfin.c: Likewise. * cpu-cr16.c: Likewise. * cpu-cr16c.c: Likewise. * cpu-crx.c: Likewise. * cpu-h8300.c: Likewise. * cpu-i386.c: Likewise. * cpu-lm32.c: Likewise. * cpu-m68k.c: Likewise. * cpu-moxie.c: Likewise. * cpu-msp430.c: Likewise. * cpu-sh.c: Likewise. * cpu-xc16x.c: Likewise. * dwarf2.c: Likewise. * ecofflink.c: Likewise. * ecoffswap.h: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-vxworks.c: Likewise. * elf32-avr.c: Likewise. * elf32-avr.h: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.h: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-v850.c: Likewise. * elf32-xc16x.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * ieee.c: Likewise. * libcoff.h: Likewise. * libpei.h: Likewise. * libxcoff.h: Likewise. * linker.c: Likewise. * mach-o-i386.c: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * mach-o.h: Likewise. * mmo.c: Likewise. * opncls.c: Likewise. * pdp11.c: Likewise. * pe-x86_64.c: Likewise. * peXXigen.c: Likewise. * pef-traceback.h: Likewise. * pei-x86_64.c: Likewise. * peicode.h: Likewise. * plugin.c: Likewise. * reloc.c: Likewise. * riscix.c: Likewise. * section.c: Likewise. * som.c: Likewise. * syms.c: Likewise. * tekhex.c: Likewise. * ticoff.h: Likewise. * vaxbsd.c: Likewise. * xcofflink.c: Likewise. * xtensa-isa.c: Likewise.
2012-05-05Replace all uses of bfd_abs_section, bfd_com_section, bfd_und_sectionAlan Modra1-2/+3
and bfd_ind_section with their _ptr variants, or use corresponding bfd_is_* macros.
2011-09-092011-09-09 Kai Tietz <ktietz@redhat.com>Kai Tietz1-1/+5
* peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore for targets without symbol_leading_char.
2010-05-262010-05-25 Tristan Gingold <gingold@adacore.com>Tristan Gingold1-0/+2
* bfdio.c: Declare and define _bfd_memory_iovec. (bfd_bread): Move code for BFD_IN_MEMORY... (bfd_bwrite): ... Ditto ... (bfd_tell): ... Ditto ... (bfd_flush): ... Ditto ... (bfd_stat): ... Ditto ... (bfd_seek): ... Ditto ... (bfd_get_size): ... Ditto ... (bfd_mmap): ... Ditto ... (memory_bread): ... to these new functions. (memory_bwrite): Ditto. (memory_btell): Ditto. (memory_bseek): Ditto. (memory_bflush): Ditto. (memory_bstat): Ditto. (memory_bmmap): Ditto. (memory_bclose): New function. * peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY. * xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto. * opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case. (bfd_make_writable): Use _bfd_memory_iovec. * elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec. * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use _bfd_memory_iovec. (alpha_ecoff_openr_next_archived_file): Use proxy_origin instead of origin. * libbfd.h: Regenerate.
2009-10-16 PR binutils/10785Alan Modra1-11/+17
* coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Don't bfd_alloc bim and bim->buffer. bfd_malloc instead. * peicode.h (pe_ILF_build_a_bfd): Similarly. (ILF_DATA_SIZE): Don't include bim. * opncls.c (bfd_close): Test bim->buffer non-NULL before freeing.
2009-09-09 Updated soruces in bfd/* to compile cleanly with -Wc++-compat.Nick Clifton1-2/+2
* bfd/aoutx.h: Add casts. * bfd/archive.c: Add casts. * bfd/archive64.c: Add casts. * bfd/archures.c: Add casts. * bfd/bfd-in2.h: Regenerated. * bfd/bfd.c: Add casts. (enum bfd_direction): Move out to top level. * bfd/bfdio.c: Add casts. * bfd/binary.c: Add casts. * bfd/cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated parameter to use enum value instead of int. * bfd/coffcode.h: Add casts. * bfd/coffgen.c: Add casts. * bfd/cofflink.c: Add casts. * bfd/compress.c: Add casts. * bfd/dwarf1.c: Add casts. * bfd/dwarf2.c: Add casts. (struct dwarf2_debug): Rename member bfd to bfd_ptr. Update code to use new name. * bfd/elf-attrs.c: Add casts. * bfd/elf-bfd.h (elf_link_virtual_table_entry): Gives name to anonymous struct. (union gotplt_union, struct elf_link_virtual_table_entry): Move to top level. * bfd/elf-eh-frame.c: Add casts. * bfd/elf-strtab.c: Add casts. * bfd/elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change argument name from typename to type_name. * bfd/elf32-i386.c: Add casts. * bfd/elf64-x86-64.c: Add casts. * bfd/elfcode.h: Add casts. * bfd/elfcore.h: Add casts. * bfd/elflink.c: Add casts. * bfd/format.c: Add casts. * bfd/hash.c: Add casts. * bfd/ihex.c: Add casts. * bfd/libaout.h (enum aout_subformat, enum aout_magic): Move to top level. * bfd/libbfd.c: Add casts. * bfd/linker.c: Add casts. * bfd/merge.c: Add casts. * bfd/opncls.c: Add casts. * bfd/peXXigen.c: Add casts. * bfd/peicode.h: Add casts. * bfd/reloc.c: Add casts. * bfd/section.c: Add casts. * bfd/simple.c: Add casts. * bfd/srec.c: Add casts. * bfd/stabs.c: Add casts. * bfd/syms.c: Add casts. * bfd/targets.c: Add casts. * bfd/tekhex.c: Add casts. * bfd/verilog.c: Add casts. * include/bfdlink.h (struct bfd_link_hash_common_entry): Move to top level.
2009-09-02update copyright datesAlan Modra1-1/+1
2009-04-212009-04-21 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-7/+0
* coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K. * coffcode.h (coff_compute_section_file_positions): Clear D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE. * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and force_minimum_alignment. * libcoff.h: Regenerated. * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed. (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise. * peicode.h (pe_mkobject): Don't set force_minimum_alignment nor target_subsystem. * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check force_minimum_alignment nor target_subsystem.
2009-04-17bfd/H.J. Lu1-127/+3
2009-04-17 H.J. Lu <hongjiu.lu@intel.com> PR binutils/10074 * coffcode.h (bfd_pei_p): New. * config.bfd: Remove bfd_efi_bsdrv_ia32_vec, bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec, bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec, bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively. * configure.in: Remove bfd_efi_bsdrv_ia32_vec, bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec, bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_ia64_vec with bfd_pei_ia64_vec. * targets.c: Likewise. * configure: Regenerated. * libcoff.h: Likewise. * Makefile.in: Likewise. * efi-app-ia32.c: Removed. * efi-app-x86_64.c: Likewise. * efi-bsdrv-ia32.c: Likewise. * efi-bsdrv-ia64.c: Likewise. * efi-bsdrv-x86_64.c: Likewise. * efi-rtdrv-ia32.c: Likewise. * efi-rtdrv-ia64.c: Likewise. * efi-rtdrv-x86_64.c: Likewise. * efi-rtdrv-ia32.c: Likewise. * efi-app-ia64.c: Moved to ... * pei-ia64.c: This. (TARGET_SYM): Set to bfd_pei_ia64_vec. (TARGET_NAME): Set to pei-ia64. * libpei.h (bfd_target_pei_p): Removed. (bfd_target_pei_arch): Likewise. (bfd_target_efi_app_p): Likewise. (bfd_target_efi_app_arch): Likewise. (bfd_target_efi_bsdrv_p): Likewise. (bfd_target_efi_bsdrv_arch): Likewise. (bfd_target_efi_rtdrv_p): Likewise. (bfd_target_efi_rtdrv_arch): Likewise. (bfd_pe_executable_p): Likewise. * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo, efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo. (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c and efi-rtdrv-ia32.c. (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo, efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and efi-rtdrv-x86_64.lo. Add pei-ia64.lo. (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c, efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and efi-rtdrv-x86_64.c. Add pei-ia64.c. (efi-app-ia64.lo): Removed. (efi-bsdrv-ia32.lo): Likewise. (efi-rtdrv-ia32.lo): Likewise. (efi-app-ia64.lo): Likewise. (efi-bsdrv-ia64.lo): Likewise. (efi-rtdrv-ia64.lo): Likewise. (efi-app-x86_64.lo): Likewise. (efi-bsdrv-x86_64.lo): Likewise. (efi-rtdrv-x86_64.lo): Likewise. (pei-ia64.lo): New. * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p with bfd_pei_p. (arch_type): Removed. (pe_arch): Likewise. (pe_bfd_object_p): Just return coff_object_p. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace bfd_pe_executable_p with bfd_pei_p. binutils/ 2009-04-17 H.J. Lu <hongjiu.lu@intel.com> PR binutils/10074 * objcopy.c: Include coff/i386.h and coff/pe.h. (pe_file_alignment): New. (pe_heap_commit): Likewise. (pe_heap_reserve): Likewise. (pe_image_base): Likewise. (pe_section_alignment): Likewise. (pe_stack_commit): Likewise. (pe_stack_reserve): Likewise. (pe_subsystem): Likewise. (pe_major_subsystem_version): Likewise. (pe_minor_subsystem_version): Likewise. (set_pe_subsystem): Likewise. (convert_efi_target): Likewise. (command_line_switch): Add OPTION_FILE_ALIGNMENT, OPTION_HEAP, OPTION_IMAGE_BASE, OPTION_SECTION_ALIGNMENT, OPTION_STACK and OPTION_SUBSYSTEM. (copy_options): Likewise. (copy_usage): Add --file-alignment, --heap, --image-base, --section-alignment, --stack and --subsystem. (copy_object): Set up PE parameters. (copy_main): Process Add OPTION_FILE_ALIGNMENT, OPTION_HEAP, OPTION_IMAGE_BASE, OPTION_SECTION_ALIGNMENT, OPTION_STACK and OPTION_SUBSYSTEM. Convert EFI target to PEI target. * NEWS: Mention --file-alignment, --heap, --image-base, --section-alignment, --stack and --subsystem command line options for objcopy. * doc/binutils.texi: Document --file-alignment, --heap, --image-base, --section-alignment, --stack and --subsystem command line options for objcopy.
2008-02-14 * efi-rtdrv-ia32.c: New file.Nick Clifton1-7/+41
* efi-bsdrv-ia32.c: New file. * efi-rtdrv-ia64.c: New file. * efi-bsdrv-ia64.c: New file. * efi-rtdrv-x86_64.c: New file. * efi-bsdrv-x86_64.c: New file. * peicode.h (pe_bfd_object_p): Add support for boot service and runtime service drivers. * libpei.h: Add macros for EFI formats, and rename the efi application format macros to disambiguate. * targets.c: Add bfd_target _vec externs. (_bfd_tar): Add EFI _vec entries. * config.bfd: Add EFI vectors into the selection routines. * configure.in: add EFI _vec entries. * configure: Regenerate. * Makefile.am: Add EFI files. * Makefile.in: Regenerate.
2007-11-122007-11-12 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-3/+16
PR binutils/5299 * peicode.h (pe_bfd_object_p): Save and restore previous bfd state when calling coff_object_p.
2007-07-12Add support for building on a 64-bit Windows host.Nick Clifton1-1/+1
2007-07-052007-07-04 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-14/+18
* peicode.h (pe_bfd_object_p): Don't check PE vs. EFI target if arch is unknown.
2007-07-03Switch sources over to use the GPL version 3Nick Clifton1-3/+5
2007-06-182007-06-18 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-1/+74
* libpei.h (_bfd_XXi_final_link_postscript): Remove duplication. (bfd_target_pei_p): New. (bfd_target_pei_arch): New (bfd_target_efi_p): Likewise. (bfd_target_efi_arch): New (bfd_pe_executable_p): Use bfd_target_pei_p and bfd_target_efi_p. * peicode.h (arch_type): New enum. (pe_arch): New function. (pe_bfd_object_p): Don't match PE/EFI target with EFI/PE file if there is an EFI/PE target.
2006-09-20Add x86_64-mingw64 targetNick Clifton1-2/+41
2005-05-04Update the address and phone number of the FSF organization in the GPL noticesNick Clifton1-1/+1
2005-05-04Update the FSF address in the copyright/GPL noticeNick Clifton1-1/+1
2005-04-21Update to ISO-C90 and fix formattingNick Clifton1-98/+70
2005-03-19 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefixDanny Smith1-31/+10
character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX cases. Add comment.
2005-02-28(pe_ILF_build_a_bfd): Do not assume that an @ will be present whenNick Clifton1-5/+8
IMPORT_NAME_UNDOECRATE is used.
2005-02-20include/Alan Modra1-23/+15
* xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix. * xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise. (xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise. include/coff/ * xcoff.h (struct xcoff_loader_info): Warning fix. bfd/ * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix. * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise. * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove useless assignments. (xcoff_write_archive_contents_big): Likewise. (_bfd_xcoff_put_ldsymbol_name): Likewise. * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise. * coffgen.c (coff_write_symbols): Make "written" a bfd_vma. * cofflink.c (process_embedded_commands): Warning fixes. * cpu-arm.c: Delete unnecessary prototypes. Convert to C90. Warning fixes. * dwarf2.c: Warning fixes. * elf-bfd.h: Likewise. * elf-eh-frame.c: Likewise. * elf-strtab.c: Likewise. * elf.c: Likewise. * elf32-m68k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Delete unnecessary prototypes. Warning fixes. * elf64-sh64.c: Likewise. * peicode.h: Likewise. * elf64-mmix.c: Warning fixes. * elfcode.h: Likewise. * elfxx-mips.c: Likewise. * libbfd-in.h: Likewise. * libbfd.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * opncls.c: Likewise. * pef.c: Likewise. * srec.c: Likewise. * vms-hdr.c: Likewise. * vms-tir.c: Likewise. * xtensa-isa.c: Likewise. * xtensa-modules.c: Likewise. * xsym.c: Likewise. (pstrcmp): Use correct choice of string lengths. Fix return value. (bfd_sym_module_name): Correct string length. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate.