From a74dddd84bc42e1afc9b3c5605333135f7bb8a30 Mon Sep 17 00:00:00 2001 From: dannybackx Date: Sat, 17 Oct 2009 10:06:21 +0000 Subject: [PATCH] Part of binutils 2.20 update git-svn-id: svn://svn.code.sf.net/p/cegcc/code/trunk@1384 d7810a3d-100a-0410-8641-c3624a9c11f1 --- cegcc/src/binutils/bfd/CVS/Entries | 843 +- cegcc/src/binutils/bfd/ChangeLog | 4288 +++++- cegcc/src/binutils/bfd/Makefile.am | 3001 ++-- cegcc/src/binutils/bfd/Makefile.in | 4631 +++--- cegcc/src/binutils/bfd/acinclude.m4 | 2 + cegcc/src/binutils/bfd/aclocal.m4 | 465 +- cegcc/src/binutils/bfd/aix386-core.c | 2 +- cegcc/src/binutils/bfd/aout-adobe.c | 3 +- cegcc/src/binutils/bfd/aout-cris.c | 7 +- cegcc/src/binutils/bfd/aout-ns32k.c | 2 +- cegcc/src/binutils/bfd/aout-sparcle.c | 2 +- cegcc/src/binutils/bfd/aout-target.h | 5 +- cegcc/src/binutils/bfd/aout-tic30.c | 5 +- cegcc/src/binutils/bfd/aout0.c | 2 +- cegcc/src/binutils/bfd/aout32.c | 3 +- cegcc/src/binutils/bfd/aout64.c | 3 +- cegcc/src/binutils/bfd/aoutx.h | 74 +- cegcc/src/binutils/bfd/archive.c | 114 +- cegcc/src/binutils/bfd/archive64.c | 6 +- cegcc/src/binutils/bfd/archures.c | 30 +- cegcc/src/binutils/bfd/bfd-in.h | 25 +- cegcc/src/binutils/bfd/bfd-in2.h | 253 +- cegcc/src/binutils/bfd/bfd.c | 43 +- cegcc/src/binutils/bfd/bfd.m4 | 1 - cegcc/src/binutils/bfd/bfdio.c | 74 +- cegcc/src/binutils/bfd/bfdwin.c | 4 +- cegcc/src/binutils/bfd/binary.c | 20 +- cegcc/src/binutils/bfd/bout.c | 7 +- cegcc/src/binutils/bfd/cache.c | 42 +- cegcc/src/binutils/bfd/cf-i386lynx.c | 3 +- cegcc/src/binutils/bfd/cf-sparclynx.c | 2 +- cegcc/src/binutils/bfd/cisco-core.c | 2 +- cegcc/src/binutils/bfd/coff-alpha.c | 17 +- cegcc/src/binutils/bfd/coff-apollo.c | 2 +- cegcc/src/binutils/bfd/coff-arm.c | 32 +- cegcc/src/binutils/bfd/coff-aux.c | 2 +- cegcc/src/binutils/bfd/coff-go32.c | 2 +- cegcc/src/binutils/bfd/coff-i386.c | 2 +- cegcc/src/binutils/bfd/coff-i960.c | 10 +- cegcc/src/binutils/bfd/coff-ia64.c | 6 +- cegcc/src/binutils/bfd/coff-m88k.c | 2 +- cegcc/src/binutils/bfd/coff-maxq.c | 2 +- cegcc/src/binutils/bfd/coff-mips.c | 6 +- cegcc/src/binutils/bfd/coff-or32.c | 2 +- cegcc/src/binutils/bfd/coff-pmac.c | 2 +- cegcc/src/binutils/bfd/coff-rs6000.c | 616 +- cegcc/src/binutils/bfd/coff-sh.c | 10 +- cegcc/src/binutils/bfd/coff-stgo32.c | 121 +- cegcc/src/binutils/bfd/coff-svm68k.c | 2 +- cegcc/src/binutils/bfd/coff-tic30.c | 2 +- cegcc/src/binutils/bfd/coff-u68k.c | 2 +- cegcc/src/binutils/bfd/coff-we32k.c | 2 +- cegcc/src/binutils/bfd/coff-x86_64.c | 9 +- cegcc/src/binutils/bfd/coff-z80.c | 2 +- cegcc/src/binutils/bfd/coff64-rs6000.c | 106 +- cegcc/src/binutils/bfd/coffcode.h | 283 +- cegcc/src/binutils/bfd/coffgen.c | 122 +- cegcc/src/binutils/bfd/cofflink.c | 74 +- cegcc/src/binutils/bfd/coffswap.h | 24 +- cegcc/src/binutils/bfd/compress.c | 2 +- cegcc/src/binutils/bfd/config.bfd | 68 +- cegcc/src/binutils/bfd/config.in | 60 +- cegcc/src/binutils/bfd/configure | 21147 ++++++++++------------------ cegcc/src/binutils/bfd/configure.com | 119 +- cegcc/src/binutils/bfd/configure.in | 98 +- cegcc/src/binutils/bfd/cpu-alpha.c | 2 +- cegcc/src/binutils/bfd/cpu-arc.c | 2 +- cegcc/src/binutils/bfd/cpu-arm.c | 6 +- cegcc/src/binutils/bfd/cpu-avr.c | 3 +- cegcc/src/binutils/bfd/cpu-cr16c.c | 2 +- cegcc/src/binutils/bfd/cpu-crx.c | 2 +- cegcc/src/binutils/bfd/cpu-dlx.c | 2 +- cegcc/src/binutils/bfd/cpu-fr30.c | 2 +- cegcc/src/binutils/bfd/cpu-frv.c | 2 +- cegcc/src/binutils/bfd/cpu-h8300.c | 2 +- cegcc/src/binutils/bfd/cpu-hppa.c | 2 +- cegcc/src/binutils/bfd/cpu-i386.c | 15 +- cegcc/src/binutils/bfd/cpu-i860.c | 2 +- cegcc/src/binutils/bfd/cpu-i960.c | 2 +- cegcc/src/binutils/bfd/cpu-ia64-opc.c | 18 +- cegcc/src/binutils/bfd/cpu-ia64.c | 2 +- cegcc/src/binutils/bfd/cpu-ip2k.c | 2 +- cegcc/src/binutils/bfd/cpu-iq2000.c | 2 +- cegcc/src/binutils/bfd/cpu-m10200.c | 2 +- cegcc/src/binutils/bfd/cpu-m10300.c | 2 +- cegcc/src/binutils/bfd/cpu-m32c.c | 2 +- cegcc/src/binutils/bfd/cpu-m32r.c | 2 +- cegcc/src/binutils/bfd/cpu-m68hc11.c | 2 +- cegcc/src/binutils/bfd/cpu-m68hc12.c | 2 +- cegcc/src/binutils/bfd/cpu-m68k.c | 2 +- cegcc/src/binutils/bfd/cpu-m88k.c | 2 +- cegcc/src/binutils/bfd/cpu-mcore.c | 2 +- cegcc/src/binutils/bfd/cpu-mep.c | 5 +- cegcc/src/binutils/bfd/cpu-mips.c | 2 +- cegcc/src/binutils/bfd/cpu-mmix.c | 2 +- cegcc/src/binutils/bfd/cpu-msp430.c | 2 +- cegcc/src/binutils/bfd/cpu-openrisc.c | 2 +- cegcc/src/binutils/bfd/cpu-or32.c | 2 +- cegcc/src/binutils/bfd/cpu-pdp11.c | 2 +- cegcc/src/binutils/bfd/cpu-pj.c | 3 +- cegcc/src/binutils/bfd/cpu-powerpc.c | 2 +- cegcc/src/binutils/bfd/cpu-rs6000.c | 2 +- cegcc/src/binutils/bfd/cpu-s390.c | 2 +- cegcc/src/binutils/bfd/cpu-score.c | 68 +- cegcc/src/binutils/bfd/cpu-sparc.c | 2 +- cegcc/src/binutils/bfd/cpu-tic30.c | 2 +- cegcc/src/binutils/bfd/cpu-tic4x.c | 2 +- cegcc/src/binutils/bfd/cpu-tic54x.c | 2 +- cegcc/src/binutils/bfd/cpu-tic80.c | 2 +- cegcc/src/binutils/bfd/cpu-v850.c | 2 +- cegcc/src/binutils/bfd/cpu-vax.c | 2 +- cegcc/src/binutils/bfd/cpu-w65.c | 2 +- cegcc/src/binutils/bfd/cpu-we32k.c | 2 +- cegcc/src/binutils/bfd/cpu-xstormy16.c | 2 +- cegcc/src/binutils/bfd/cpu-xtensa.c | 2 +- cegcc/src/binutils/bfd/cpu-z8k.c | 2 +- cegcc/src/binutils/bfd/demo64.c | 2 +- cegcc/src/binutils/bfd/dep-in.sed | 14 +- cegcc/src/binutils/bfd/doc/CVS/Entries | 28 +- cegcc/src/binutils/bfd/doc/ChangeLog | 32 + cegcc/src/binutils/bfd/doc/Makefile.am | 39 +- cegcc/src/binutils/bfd/doc/Makefile.in | 292 +- cegcc/src/binutils/bfd/doc/bfd.texinfo | 2 +- cegcc/src/binutils/bfd/doc/bfdint.texi | 6 +- cegcc/src/binutils/bfd/doc/chew.c | 40 +- cegcc/src/binutils/bfd/dwarf1.c | 11 +- cegcc/src/binutils/bfd/dwarf2.c | 261 +- cegcc/src/binutils/bfd/ecoff.c | 78 +- cegcc/src/binutils/bfd/ecofflink.c | 16 +- cegcc/src/binutils/bfd/elf-attrs.c | 12 +- cegcc/src/binutils/bfd/elf-bfd.h | 149 +- cegcc/src/binutils/bfd/elf-eh-frame.c | 148 +- cegcc/src/binutils/bfd/elf-hppa.h | 1159 +- cegcc/src/binutils/bfd/elf-m10200.c | 2 +- cegcc/src/binutils/bfd/elf-m10300.c | 32 +- cegcc/src/binutils/bfd/elf-strtab.c | 13 +- cegcc/src/binutils/bfd/elf-vxworks.c | 6 +- cegcc/src/binutils/bfd/elf-vxworks.h | 2 +- cegcc/src/binutils/bfd/elf.c | 406 +- cegcc/src/binutils/bfd/elf32-arm.c | 3420 +++-- cegcc/src/binutils/bfd/elf32-avr.c | 25 +- cegcc/src/binutils/bfd/elf32-bfin.c | 736 +- cegcc/src/binutils/bfd/elf32-cr16.c | 34 +- cegcc/src/binutils/bfd/elf32-cr16c.c | 6 +- cegcc/src/binutils/bfd/elf32-cris.c | 37 +- cegcc/src/binutils/bfd/elf32-crx.c | 42 +- cegcc/src/binutils/bfd/elf32-dlx.c | 2 +- cegcc/src/binutils/bfd/elf32-fr30.c | 2 +- cegcc/src/binutils/bfd/elf32-frv.c | 8 +- cegcc/src/binutils/bfd/elf32-h8300.c | 96 +- cegcc/src/binutils/bfd/elf32-hppa.c | 105 +- cegcc/src/binutils/bfd/elf32-hppa.h | 2 +- cegcc/src/binutils/bfd/elf32-i386.c | 1186 +- cegcc/src/binutils/bfd/elf32-lm32.c | 16 +- cegcc/src/binutils/bfd/elf32-m32c.c | 33 +- cegcc/src/binutils/bfd/elf32-m32r.c | 37 +- cegcc/src/binutils/bfd/elf32-m68hc1x.c | 7 +- cegcc/src/binutils/bfd/elf32-m68hc1x.h | 6 +- cegcc/src/binutils/bfd/elf32-m68k.c | 435 +- cegcc/src/binutils/bfd/elf32-m88k.c | 2 +- cegcc/src/binutils/bfd/elf32-mep.c | 3 +- cegcc/src/binutils/bfd/elf32-mips.c | 7 +- cegcc/src/binutils/bfd/elf32-ppc.c | 1462 +- cegcc/src/binutils/bfd/elf32-ppc.h | 2 +- cegcc/src/binutils/bfd/elf32-s390.c | 64 +- cegcc/src/binutils/bfd/elf32-score.c | 2256 +-- cegcc/src/binutils/bfd/elf32-sh-relocs.h | 2 +- cegcc/src/binutils/bfd/elf32-sh.c | 34 +- cegcc/src/binutils/bfd/elf32-sh64-com.c | 2 +- cegcc/src/binutils/bfd/elf32-sh64.c | 8 +- cegcc/src/binutils/bfd/elf32-sh64.h | 2 +- cegcc/src/binutils/bfd/elf32-sparc.c | 2 +- cegcc/src/binutils/bfd/elf32-spu.c | 947 +- cegcc/src/binutils/bfd/elf32-spu.h | 14 +- cegcc/src/binutils/bfd/elf32-v850.c | 8 +- cegcc/src/binutils/bfd/elf32-vax.c | 124 +- cegcc/src/binutils/bfd/elf32-xc16x.c | 4 +- cegcc/src/binutils/bfd/elf32-xtensa.c | 35 +- cegcc/src/binutils/bfd/elf32.c | 3 +- cegcc/src/binutils/bfd/elf64-alpha.c | 107 +- cegcc/src/binutils/bfd/elf64-hppa.c | 2414 +++- cegcc/src/binutils/bfd/elf64-hppa.h | 8 +- cegcc/src/binutils/bfd/elf64-mips.c | 33 +- cegcc/src/binutils/bfd/elf64-mmix.c | 10 +- cegcc/src/binutils/bfd/elf64-ppc.c | 1672 ++- cegcc/src/binutils/bfd/elf64-ppc.h | 2 +- cegcc/src/binutils/bfd/elf64-s390.c | 66 +- cegcc/src/binutils/bfd/elf64-sh64.c | 6 +- cegcc/src/binutils/bfd/elf64-sparc.c | 19 +- cegcc/src/binutils/bfd/elf64-x86-64.c | 1337 +- cegcc/src/binutils/bfd/elf64.c | 2 +- cegcc/src/binutils/bfd/elfcode.h | 66 +- cegcc/src/binutils/bfd/elfcore.h | 2 +- cegcc/src/binutils/bfd/elflink.c | 615 +- cegcc/src/binutils/bfd/elfn32-mips.c | 4 +- cegcc/src/binutils/bfd/elfxx-ia64.c | 132 +- cegcc/src/binutils/bfd/elfxx-mips.c | 103 +- cegcc/src/binutils/bfd/elfxx-mips.h | 4 +- cegcc/src/binutils/bfd/elfxx-sparc.c | 26 +- cegcc/src/binutils/bfd/elfxx-sparc.h | 6 +- cegcc/src/binutils/bfd/elfxx-target.h | 6 +- cegcc/src/binutils/bfd/epoc-pe-arm.c | 2 +- cegcc/src/binutils/bfd/epoc-pei-arm.c | 2 +- cegcc/src/binutils/bfd/format.c | 4 +- cegcc/src/binutils/bfd/gen-aout.c | 2 +- cegcc/src/binutils/bfd/hash.c | 31 +- cegcc/src/binutils/bfd/host-aout.c | 2 +- cegcc/src/binutils/bfd/hosts/CVS/Entries | 54 +- cegcc/src/binutils/bfd/hosts/alphavms.h | 6 +- cegcc/src/binutils/bfd/hosts/delta68.h | 2 +- cegcc/src/binutils/bfd/hosts/vaxbsd.h | 2 +- cegcc/src/binutils/bfd/hosts/vaxlinux.h | 2 +- cegcc/src/binutils/bfd/hp300bsd.c | 3 +- cegcc/src/binutils/bfd/hp300hpux.c | 2 +- cegcc/src/binutils/bfd/hpux-core.c | 4 +- cegcc/src/binutils/bfd/i386bsd.c | 3 +- cegcc/src/binutils/bfd/i386dynix.c | 2 +- cegcc/src/binutils/bfd/i386freebsd.c | 3 +- cegcc/src/binutils/bfd/i386linux.c | 3 +- cegcc/src/binutils/bfd/i386lynx.c | 4 +- cegcc/src/binutils/bfd/i386mach3.c | 2 +- cegcc/src/binutils/bfd/i386msdos.c | 3 +- cegcc/src/binutils/bfd/i386netbsd.c | 2 +- cegcc/src/binutils/bfd/i386os9k.c | 3 +- cegcc/src/binutils/bfd/ieee.c | 11 +- cegcc/src/binutils/bfd/ihex.c | 18 +- cegcc/src/binutils/bfd/init.c | 2 +- cegcc/src/binutils/bfd/irix-core.c | 2 +- cegcc/src/binutils/bfd/libaout.h | 34 +- cegcc/src/binutils/bfd/libbfd-in.h | 5 +- cegcc/src/binutils/bfd/libbfd.c | 40 +- cegcc/src/binutils/bfd/libbfd.h | 61 +- cegcc/src/binutils/bfd/libcoff-in.h | 22 +- cegcc/src/binutils/bfd/libcoff.h | 32 +- cegcc/src/binutils/bfd/libecoff.h | 9 +- cegcc/src/binutils/bfd/libhppa.h | 2 +- cegcc/src/binutils/bfd/libieee.h | 2 +- cegcc/src/binutils/bfd/liboasys.h | 2 +- cegcc/src/binutils/bfd/libpei.h | 42 +- cegcc/src/binutils/bfd/libxcoff.h | 4 +- cegcc/src/binutils/bfd/linker.c | 248 +- cegcc/src/binutils/bfd/lynx-core.c | 2 +- cegcc/src/binutils/bfd/m68k4knetbsd.c | 2 +- cegcc/src/binutils/bfd/m68klinux.c | 3 +- cegcc/src/binutils/bfd/m68knetbsd.c | 2 +- cegcc/src/binutils/bfd/m88kmach3.c | 3 +- cegcc/src/binutils/bfd/m88kopenbsd.c | 2 +- cegcc/src/binutils/bfd/mach-o-target.c | 73 +- cegcc/src/binutils/bfd/mach-o.c | 3009 ++-- cegcc/src/binutils/bfd/mach-o.h | 533 +- cegcc/src/binutils/bfd/makefile.vms | 133 +- cegcc/src/binutils/bfd/merge.c | 15 +- cegcc/src/binutils/bfd/mipsbsd.c | 3 +- cegcc/src/binutils/bfd/mmo.c | 3 +- cegcc/src/binutils/bfd/newsos3.c | 3 +- cegcc/src/binutils/bfd/nlm-target.h | 3 +- cegcc/src/binutils/bfd/nlm.c | 2 +- cegcc/src/binutils/bfd/nlm32.c | 2 +- cegcc/src/binutils/bfd/nlm64.c | 2 +- cegcc/src/binutils/bfd/oasys.c | 11 +- cegcc/src/binutils/bfd/opncls.c | 136 +- cegcc/src/binutils/bfd/osf-core.c | 2 +- cegcc/src/binutils/bfd/pc532-mach.c | 3 +- cegcc/src/binutils/bfd/pdp11.c | 11 +- cegcc/src/binutils/bfd/pe-arm.c | 2 +- cegcc/src/binutils/bfd/pe-i386.c | 2 +- cegcc/src/binutils/bfd/pe-mcore.c | 2 +- cegcc/src/binutils/bfd/pe-mips.c | 8 +- cegcc/src/binutils/bfd/pe-ppc.c | 2 +- cegcc/src/binutils/bfd/pe-sh.c | 2 +- cegcc/src/binutils/bfd/peXXigen.c | 147 +- cegcc/src/binutils/bfd/pef.c | 5 +- cegcc/src/binutils/bfd/pef.h | 4 +- cegcc/src/binutils/bfd/pei-arm.c | 6 +- cegcc/src/binutils/bfd/pei-i386.c | 5 +- cegcc/src/binutils/bfd/pei-mcore.c | 6 +- cegcc/src/binutils/bfd/pei-mips.c | 6 +- cegcc/src/binutils/bfd/pei-ppc.c | 6 +- cegcc/src/binutils/bfd/pei-sh.c | 6 +- cegcc/src/binutils/bfd/pei-x86_64.c | 480 +- cegcc/src/binutils/bfd/peicode.h | 169 +- cegcc/src/binutils/bfd/po/CVS/Entries | 37 +- cegcc/src/binutils/bfd/po/Make-in | 2 +- cegcc/src/binutils/bfd/po/SRC-POTFILES.in | 22 +- cegcc/src/binutils/bfd/po/bfd.pot | 2576 ++-- cegcc/src/binutils/bfd/po/es.po | 2882 ++-- cegcc/src/binutils/bfd/po/fi.po | 2943 ++-- cegcc/src/binutils/bfd/po/id.po | 12 +- cegcc/src/binutils/bfd/po/vi.po | 1867 +-- cegcc/src/binutils/bfd/ppcboot.c | 5 +- cegcc/src/binutils/bfd/ptrace-core.c | 2 +- cegcc/src/binutils/bfd/reloc.c | 196 +- cegcc/src/binutils/bfd/reloc16.c | 6 +- cegcc/src/binutils/bfd/rs6000-core.c | 64 +- cegcc/src/binutils/bfd/section.c | 50 +- cegcc/src/binutils/bfd/simple.c | 13 +- cegcc/src/binutils/bfd/som.c | 42 +- cegcc/src/binutils/bfd/som.h | 2 +- cegcc/src/binutils/bfd/sparclinux.c | 3 +- cegcc/src/binutils/bfd/sparcnetbsd.c | 2 +- cegcc/src/binutils/bfd/srec.c | 28 +- cegcc/src/binutils/bfd/stab-syms.c | 2 +- cegcc/src/binutils/bfd/stabs.c | 20 +- cegcc/src/binutils/bfd/syms.c | 51 +- cegcc/src/binutils/bfd/sysdep.h | 2 +- cegcc/src/binutils/bfd/targets.c | 57 +- cegcc/src/binutils/bfd/tekhex.c | 47 +- cegcc/src/binutils/bfd/ticoff.h | 17 +- cegcc/src/binutils/bfd/vax1knetbsd.c | 2 +- cegcc/src/binutils/bfd/vaxbsd.c | 3 +- cegcc/src/binutils/bfd/vaxnetbsd.c | 3 +- cegcc/src/binutils/bfd/versados.c | 3 +- cegcc/src/binutils/bfd/version.h | 2 +- cegcc/src/binutils/bfd/vms-gsd.c | 347 +- cegcc/src/binutils/bfd/vms-hdr.c | 1092 +- cegcc/src/binutils/bfd/vms-misc.c | 520 +- cegcc/src/binutils/bfd/vms-tir.c | 1559 +- cegcc/src/binutils/bfd/vms.c | 827 +- cegcc/src/binutils/bfd/vms.h | 635 +- cegcc/src/binutils/bfd/xcoff-target.h | 3 +- cegcc/src/binutils/bfd/xcofflink.c | 3035 ++-- cegcc/src/binutils/bfd/xsym.c | 6 +- cegcc/src/binutils/bfd/xtensa-modules.c | 2 +- 323 files changed, 46273 insertions(+), 35943 deletions(-) rewrite cegcc/src/binutils/bfd/CVS/Entries (98%) rewrite cegcc/src/binutils/bfd/Makefile.am (76%) rewrite cegcc/src/binutils/bfd/Makefile.in (67%) rewrite cegcc/src/binutils/bfd/doc/CVS/Entries (99%) rewrite cegcc/src/binutils/bfd/hosts/CVS/Entries (99%) rewrite cegcc/src/binutils/bfd/makefile.vms (74%) rewrite cegcc/src/binutils/bfd/po/CVS/Entries (99%) diff --git a/cegcc/src/binutils/bfd/CVS/Entries b/cegcc/src/binutils/bfd/CVS/Entries dissimilarity index 98% index e37af7f99..64aea81a7 100644 --- a/cegcc/src/binutils/bfd/CVS/Entries +++ b/cegcc/src/binutils/bfd/CVS/Entries @@ -1,419 +1,424 @@ -D/doc//// -D/hosts//// -D/po//// -/COPYING/1.4/Fri Feb 8 14:23:23 2008// -/ChangeLog/1.4454/Wed Feb 4 22:27:56 2009// -/ChangeLog-0001/1.2/Fri Feb 8 14:23:23 2008// -/ChangeLog-0203/1.2/Fri Feb 8 14:23:23 2008// -/ChangeLog-2004/1.2/Fri Feb 8 14:23:23 2008// -/ChangeLog-2005/1.2/Fri Feb 8 14:23:23 2008// -/ChangeLog-2006/1.1/Fri Feb 8 14:23:23 2008// -/ChangeLog-2007/1.1/Fri Feb 8 14:23:23 2008// -/ChangeLog-2008/1.1/Fri Jan 2 16:48:10 2009// -/ChangeLog-9193/1.2/Fri Feb 8 14:23:23 2008// -/ChangeLog-9495/1.3/Fri Feb 8 14:23:23 2008// -/ChangeLog-9697/1.2/Fri Feb 8 14:23:23 2008// -/ChangeLog-9899/1.2/Fri Feb 8 14:23:23 2008// -/MAINTAINERS/1.1/Fri Feb 8 14:23:23 2008// -/Makefile.am/1.219/Wed Feb 4 22:27:56 2009// -/Makefile.in/1.242/Wed Feb 4 22:27:57 2009// -/PORTING/1.1.1.1/Fri Feb 8 14:23:23 2008// -/README/1.3/Fri Feb 8 14:23:23 2008// -/TODO/1.1.1.1/Fri Feb 8 14:23:23 2008// -/acinclude.m4/1.18/Fri Feb 8 14:23:23 2008// -/aclocal.m4/1.43/Wed Feb 4 22:27:57 2009// -/aix386-core.c/1.18/Fri Feb 8 14:23:23 2008// -/aix5ppc-core.c/1.18/Wed Feb 4 22:27:57 2009// -/aout-adobe.c/1.29/Fri Feb 8 14:23:23 2008// -/aout-arm.c/1.19/Fri Feb 8 14:23:23 2008// -/aout-cris.c/1.15/Fri Feb 8 14:23:23 2008// -/aout-ns32k.c/1.20/Fri Feb 8 14:23:23 2008// -/aout-sparcle.c/1.6/Fri Feb 8 14:23:23 2008// -/aout-target.h/1.35/Fri Feb 8 14:23:23 2008// -/aout-tic30.c/1.34/Fri Feb 8 14:23:23 2008// -/aout0.c/1.6/Fri Feb 8 14:23:23 2008// -/aout32.c/1.5/Fri Feb 8 14:23:23 2008// -/aout64.c/1.5/Fri Feb 8 14:23:23 2008// -/aoutf1.h/1.20/Fri Feb 8 14:23:23 2008// -/aoutx.h/1.74/Wed Feb 4 22:27:57 2009// -/archive.c/1.55/Wed Feb 4 22:27:58 2009// -/archive64.c/1.10/Fri Feb 8 14:23:23 2008// -/archures.c/1.135/Wed Feb 4 22:27:58 2009// -/armnetbsd.c/1.10/Fri Feb 8 14:23:23 2008// -/bfd-in.h/1.140/Wed Feb 4 22:27:58 2009// -/bfd-in2.h/1.464/Wed Feb 4 22:27:59 2009// -/bfd.c/1.106/Wed Feb 4 22:27:59 2009// -/bfd.m4/1.4/Fri Feb 8 14:23:23 2008// -/bfdio.c/1.19/Wed Feb 4 22:27:59 2009// -/bfdwin.c/1.11/Wed Feb 4 22:27:59 2009// -/binary.c/1.34/Fri Feb 8 14:23:23 2008// -/bout.c/1.31/Fri Feb 8 14:23:23 2008// -/cache.c/1.34/Wed Feb 4 22:27:59 2009// -/cf-i386lynx.c/1.7/Wed Feb 4 22:27:59 2009// -/cf-sparclynx.c/1.5/Fri Feb 8 14:23:23 2008// -/cisco-core.c/1.16/Fri Feb 8 14:23:23 2008// -/coff-alpha.c/1.38/Wed Feb 4 22:28:00 2009// -/coff-apollo.c/1.13/Wed Feb 4 22:28:00 2009// -/coff-arm.c/1.74/Wed Feb 4 22:28:00 2009// -/coff-aux.c/1.9/Wed Feb 4 22:28:00 2009// -/coff-go32.c/1.12/Fri Feb 8 14:23:23 2008// -/coff-h8300.c/1.43/Wed Feb 4 22:28:00 2009// -/coff-h8500.c/1.18/Wed Feb 4 22:28:00 2009// -/coff-i386.c/1.29/Wed Feb 4 22:28:00 2009// -/coff-i860.c/1.23/Wed Feb 4 22:28:00 2009// -/coff-i960.c/1.20/Wed Feb 4 22:28:00 2009// -/coff-ia64.c/1.14/Wed Feb 4 22:28:00 2009// -/coff-m68k.c/1.22/Wed Feb 4 22:28:00 2009// -/coff-m88k.c/1.16/Wed Feb 4 22:28:01 2009// -/coff-maxq.c/1.8/Wed Feb 4 22:28:01 2009// -/coff-mcore.c/1.39/Fri Feb 8 14:23:23 2008// -/coff-mips.c/1.35/Wed Feb 4 22:28:01 2009// -/coff-or32.c/1.14/Wed Feb 4 22:28:01 2009// -/coff-pmac.c/1.10/Fri Feb 8 14:23:23 2008// -/coff-ppc.c/1.37/Wed Feb 4 22:28:01 2009// -/coff-sh.c/1.39/Result of merge// -/coff-sparc.c/1.18/Wed Feb 4 22:28:02 2009// -/coff-stgo32.c/1.18/Fri Feb 8 14:23:23 2008// -/coff-svm68k.c/1.4/Fri Feb 8 14:23:23 2008// -/coff-tic30.c/1.14/Wed Feb 4 22:28:02 2009// -/coff-tic4x.c/1.16/Wed Feb 4 22:28:02 2009// -/coff-tic54x.c/1.24/Wed Feb 4 22:28:02 2009// -/coff-tic80.c/1.22/Wed Feb 4 22:28:02 2009// -/coff-u68k.c/1.4/Fri Feb 8 14:23:23 2008// -/coff-w65.c/1.20/Wed Feb 4 22:28:02 2009// -/coff-we32k.c/1.13/Wed Feb 4 22:28:02 2009// -/coff-x86_64.c/1.5/Wed Feb 4 22:28:02 2009// -/coff-z80.c/1.8/Wed Feb 4 22:28:02 2009// -/coff-z8k.c/1.25/Wed Feb 4 22:28:02 2009// -/coffgen.c/1.68/Wed Feb 4 22:28:03 2009// -/cofflink.c/1.67/Wed Feb 4 22:28:03 2009// -/coffswap.h/1.17/Fri Feb 8 14:23:23 2008// -/compress.c/1.1/Thu Jul 10 01:32:21 2008// -/config.bfd/1.244/Result of merge// -/config.in/1.42/Wed Feb 4 22:28:03 2009// -/configure/1.294/Wed Feb 4 22:28:04 2009// -/configure.com/1.2/Wed Feb 4 22:28:04 2009// -/configure.host/1.17/Fri Feb 8 14:23:23 2008// -/configure.in/1.254/Wed Feb 4 22:28:04 2009// -/corefile.c/1.15/Fri Feb 8 14:23:23 2008// -/cpu-alpha.c/1.10/Fri Feb 8 14:23:23 2008// -/cpu-arc.c/1.10/Fri Feb 8 14:23:23 2008// -/cpu-arm.c/1.25/Fri Feb 8 14:23:23 2008// -/cpu-avr.c/1.14/Wed Feb 4 22:28:04 2009// -/cpu-bfin.c/1.3/Fri Feb 8 14:23:23 2008// -/cpu-cr16.c/1.2/Fri Feb 8 14:23:23 2008// -/cpu-cr16c.c/1.5/Fri Feb 8 14:23:23 2008// -/cpu-cris.c/1.12/Fri Feb 8 14:23:23 2008// -/cpu-crx.c/1.5/Fri Feb 8 14:23:23 2008// -/cpu-d10v.c/1.10/Fri Feb 8 14:23:23 2008// -/cpu-d30v.c/1.7/Fri Feb 8 14:23:23 2008// -/cpu-dlx.c/1.6/Fri Feb 8 14:23:23 2008// -/cpu-fr30.c/1.7/Fri Feb 8 14:23:23 2008// -/cpu-frv.c/1.11/Fri Feb 8 14:23:23 2008// -/cpu-h8300.c/1.23/Fri Feb 8 14:23:23 2008// -/cpu-h8500.c/1.15/Fri Feb 8 14:23:23 2008// -/cpu-hppa.c/1.11/Fri Feb 8 14:23:23 2008// -/cpu-i370.c/1.11/Fri Feb 8 14:23:23 2008// -/cpu-i386.c/1.15/Fri Feb 8 14:23:23 2008// -/cpu-i860.c/1.7/Fri Feb 8 14:23:23 2008// -/cpu-i960.c/1.12/Fri Feb 8 14:23:23 2008// -/cpu-ia64-opc.c/1.15/Fri Feb 8 14:23:23 2008// -/cpu-ia64.c/1.9/Fri Feb 8 14:23:23 2008// -/cpu-ip2k.c/1.6/Fri Feb 8 14:23:23 2008// -/cpu-iq2000.c/1.6/Fri Feb 8 14:23:23 2008// -/cpu-lm32.c/1.1/Tue Dec 23 19:10:18 2008// -/cpu-m10200.c/1.6/Fri Feb 8 14:23:23 2008// -/cpu-m10300.c/1.13/Fri Feb 8 14:23:23 2008// -/cpu-m32c.c/1.3/Fri Feb 8 14:23:23 2008// -/cpu-m32r.c/1.10/Fri Feb 8 14:23:23 2008// -/cpu-m68hc11.c/1.9/Fri Feb 8 14:23:23 2008// -/cpu-m68hc12.c/1.8/Fri Feb 8 14:23:23 2008// -/cpu-m68k.c/1.20/Fri Feb 8 14:23:23 2008// -/cpu-m88k.c/1.8/Fri Feb 8 14:23:23 2008// -/cpu-maxq.c/1.6/Fri Feb 8 14:23:23 2008// -/cpu-mcore.c/1.10/Fri Feb 8 14:23:23 2008// -/cpu-mep.c/1.3/Fri Feb 8 14:23:23 2008// -/cpu-mips.c/1.31/Wed Feb 4 22:28:05 2009// -/cpu-mmix.c/1.6/Fri Feb 8 14:23:23 2008// -/cpu-msp430.c/1.8/Fri Feb 8 14:23:23 2008// -/cpu-mt.c/1.4/Fri Feb 8 14:23:23 2008// -/cpu-ns32k.c/1.21/Fri Feb 8 14:23:23 2008// -/cpu-openrisc.c/1.6/Fri Feb 8 14:23:23 2008// -/cpu-or32.c/1.6/Fri Feb 8 14:23:23 2008// -/cpu-pdp11.c/1.8/Fri Feb 8 14:23:23 2008// -/cpu-pj.c/1.10/Fri Feb 8 14:23:23 2008// -/cpu-powerpc.c/1.21/Wed Feb 4 22:28:05 2009// -/cpu-rs6000.c/1.12/Fri Feb 8 14:23:23 2008// -/cpu-s390.c/1.9/Fri Feb 8 14:23:23 2008// -/cpu-score.c/1.3/Fri Feb 8 14:23:23 2008// -/cpu-sh.c/1.22/Fri Feb 8 14:23:23 2008// -/cpu-sparc.c/1.10/Fri Feb 8 14:23:23 2008// -/cpu-spu.c/1.3/Fri Feb 8 14:23:23 2008// -/cpu-tic30.c/1.6/Fri Feb 8 14:23:23 2008// -/cpu-tic4x.c/1.8/Fri Feb 8 14:23:23 2008// -/cpu-tic54x.c/1.9/Fri Feb 8 14:23:23 2008// -/cpu-tic80.c/1.7/Fri Feb 8 14:23:23 2008// -/cpu-v850.c/1.13/Fri Feb 8 14:23:23 2008// -/cpu-vax.c/1.9/Fri Feb 8 14:23:23 2008// -/cpu-w65.c/1.10/Fri Feb 8 14:23:23 2008// -/cpu-we32k.c/1.8/Fri Feb 8 14:23:23 2008// -/cpu-xc16x.c/1.3/Fri Feb 8 14:23:23 2008// -/cpu-xstormy16.c/1.7/Fri Feb 8 14:23:23 2008// -/cpu-xtensa.c/1.5/Fri Feb 8 14:23:23 2008// -/cpu-z80.c/1.3/Fri Feb 8 14:23:23 2008// -/cpu-z8k.c/1.13/Fri Feb 8 14:23:23 2008// -/demo64.c/1.6/Fri Feb 8 14:23:23 2008// -/dep-in.sed/1.7/Fri Feb 8 14:23:23 2008// -/dwarf1.c/1.19/Wed Feb 4 22:28:05 2009// -/dwarf2.c/1.118/Wed Feb 4 22:28:05 2009// -/ecoff.c/1.61/Wed Feb 4 22:28:05 2009// -/ecofflink.c/1.24/Wed Feb 4 22:28:05 2009// -/ecoffswap.h/1.13/Fri Feb 8 14:23:23 2008// -/efi-app-ia32.c/1.10/Fri Feb 8 14:23:23 2008// -/efi-app-ia64.c/1.8/Fri Feb 8 14:23:23 2008// -/efi-app-x86_64.c/1.3/Fri Feb 8 14:23:23 2008// -/efi-bsdrv-ia32.c/1.1/Thu Feb 14 15:20:26 2008// -/efi-bsdrv-ia64.c/1.1/Thu Feb 14 15:20:26 2008// -/efi-bsdrv-x86_64.c/1.1/Thu Feb 14 15:20:26 2008// -/efi-rtdrv-ia32.c/1.1/Thu Feb 14 15:20:26 2008// -/efi-rtdrv-ia64.c/1.1/Thu Feb 14 15:20:26 2008// -/efi-rtdrv-x86_64.c/1.1/Thu Feb 14 15:20:26 2008// -/elf-attrs.c/1.7/Wed Feb 4 22:28:05 2009// -/elf-bfd.h/1.280/Wed Feb 4 22:28:06 2009// -/elf-eh-frame.c/1.74/Wed Feb 4 22:28:06 2009// -/elf-hppa.h/1.90/Wed Feb 4 22:28:06 2009// -/elf-m10200.c/1.34/Fri Feb 8 14:23:23 2008// -/elf-m10300.c/1.96/Wed Feb 4 22:28:06 2009// -/elf-strtab.c/1.15/Wed Feb 4 22:28:06 2009// -/elf-vxworks.c/1.11/Fri Feb 8 14:23:23 2008// -/elf-vxworks.h/1.5/Fri Feb 8 14:23:23 2008// -/elf.c/1.476/Wed Feb 4 22:28:07 2009// -/elf32-am33lin.c/1.7/Fri Feb 8 14:23:23 2008// -/elf32-arc.c/1.20/Fri Feb 8 14:23:23 2008// -/elf32-arm.c/1.170/Wed Feb 4 22:28:08 2009// -/elf32-avr.c/1.39/Wed Feb 4 22:28:08 2009// -/elf32-avr.h/1.2/Fri Feb 8 14:23:23 2008// -/elf32-bfin.c/1.35/Wed Feb 4 22:28:09 2009// -/elf32-cr16.c/1.7/Wed Feb 4 22:28:09 2009// -/elf32-cr16c.c/1.12/Fri Feb 8 14:23:23 2008// -/elf32-cris.c/1.101/Wed Feb 4 22:28:09 2009// -/elf32-crx.c/1.12/Fri Feb 8 14:23:23 2008// -/elf32-d10v.c/1.38/Fri Feb 8 14:23:23 2008// -/elf32-d30v.c/1.21/Fri Feb 8 14:23:23 2008// -/elf32-dlx.c/1.22/Fri Feb 8 14:23:23 2008// -/elf32-fr30.c/1.38/Wed Feb 4 22:28:09 2009// -/elf32-frv.c/1.63/Wed Feb 4 22:28:10 2009// -/elf32-gen.c/1.18/Fri Feb 8 14:23:23 2008// -/elf32-h8300.c/1.53/Fri Feb 8 14:23:23 2008// -/elf32-hppa.c/1.164/Wed Feb 4 22:28:10 2009// -/elf32-hppa.h/1.17/Fri Feb 8 14:23:23 2008// -/elf32-i370.c/1.63/Wed Feb 4 22:28:11 2009// -/elf32-i386.c/1.191/Wed Feb 4 22:28:11 2009// -/elf32-i860.c/1.41/Fri Feb 8 14:23:23 2008// -/elf32-i960.c/1.17/Fri Feb 8 14:23:23 2008// -/elf32-ip2k.c/1.25/Fri Feb 8 14:23:23 2008// -/elf32-iq2000.c/1.26/Wed Feb 4 22:28:11 2009// -/elf32-lm32.c/1.1/Tue Dec 23 19:10:18 2008// -/elf32-m32c.c/1.18/Wed Feb 4 22:28:11 2009// -/elf32-m32r.c/1.92/Wed Feb 4 22:28:12 2009// -/elf32-m68hc11.c/1.37/Fri Feb 8 14:23:23 2008// -/elf32-m68hc12.c/1.29/Fri Feb 8 14:23:23 2008// -/elf32-m68hc1x.c/1.33/Wed Feb 4 22:28:12 2009// -/elf32-m68hc1x.h/1.8/Fri Feb 8 14:23:23 2008// -/elf32-m68k.c/1.111/Wed Feb 4 22:28:12 2009// -/elf32-m88k.c/1.8/Fri Feb 8 14:23:23 2008// -/elf32-mcore.c/1.52/Fri Feb 8 14:23:23 2008// -/elf32-mep.c/1.11/Wed Feb 4 22:28:13 2009// -/elf32-mips.c/1.202/Wed Feb 4 22:28:13 2009// -/elf32-msp430.c/1.20/Fri Feb 8 14:23:23 2008// -/elf32-mt.c/1.12/Wed Feb 4 22:28:13 2009// -/elf32-openrisc.c/1.30/Fri Feb 8 14:23:23 2008// -/elf32-or32.c/1.13/Fri Feb 8 14:23:23 2008// -/elf32-pj.c/1.13/Fri Feb 8 14:23:23 2008// -/elf32-ppc.c/1.250/Wed Feb 4 22:28:13 2009// -/elf32-ppc.h/1.11/Fri Feb 8 14:23:23 2008// -/elf32-s390.c/1.98/Wed Feb 4 22:28:14 2009// -/elf32-score.c/1.13/Fri Feb 8 14:23:23 2008// -/elf32-sh-relocs.h/1.2/Fri Feb 8 14:23:23 2008// -/elf32-sh-symbian.c/1.14/Wed Feb 4 22:28:14 2009// -/elf32-sh.c/1.158/Wed Feb 4 22:28:15 2009// -/elf32-sh64-com.c/1.12/Fri Feb 8 14:23:23 2008// -/elf32-sh64.c/1.43/Fri Feb 8 14:23:23 2008// -/elf32-sh64.h/1.5/Fri Feb 8 14:23:23 2008// -/elf32-sparc.c/1.89/Fri Feb 8 14:23:23 2008// -/elf32-spu.c/1.63/Wed Feb 4 22:28:15 2009// -/elf32-spu.h/1.12/Wed Feb 4 22:28:15 2009// -/elf32-v850.c/1.72/Wed Feb 4 22:28:16 2009// -/elf32-vax.c/1.48/Wed Feb 4 22:28:16 2009// -/elf32-xc16x.c/1.5/Fri Feb 8 14:23:23 2008// -/elf32-xstormy16.c/1.41/Fri Feb 8 14:23:23 2008// -/elf32-xtensa.c/1.112/Wed Feb 4 22:28:17 2009// -/elf32.c/1.6/Fri Feb 8 14:23:23 2008// -/elf64-alpha.c/1.166/Wed Feb 4 22:28:18 2009// -/elf64-gen.c/1.18/Fri Feb 8 14:23:23 2008// -/elf64-hppa.c/1.87/Wed Feb 4 22:28:18 2009// -/elf64-hppa.h/1.8/Fri Feb 8 14:23:23 2008// -/elf64-mips.c/1.89/Wed Feb 4 22:28:19 2009// -/elf64-mmix.c/1.57/Fri Feb 8 14:23:23 2008// -/elf64-ppc.c/1.290/Wed Feb 4 22:28:20 2009// -/elf64-ppc.h/1.25/Wed Feb 4 22:28:20 2009// -/elf64-s390.c/1.100/Wed Feb 4 22:28:20 2009// -/elf64-sh64.c/1.82/Wed Feb 4 22:28:20 2009// -/elf64-sparc.c/1.117/Wed Feb 4 22:28:20 2009// -/elf64-x86-64.c/1.151/Wed Feb 4 22:28:21 2009// -/elf64.c/1.4/Fri Feb 8 14:23:23 2008// -/elfcode.h/1.93/Wed Feb 4 22:28:21 2009// -/elfcore.h/1.28/Wed Feb 4 22:28:21 2009// -/elflink.c/1.329/Wed Feb 4 22:28:22 2009// -/elfn32-mips.c/1.44/Wed Feb 4 22:28:22 2009// -/elfxx-ia64.c/1.209/Wed Feb 4 22:28:23 2009// -/elfxx-mips.c/1.253/Wed Feb 4 22:28:25 2009// -/elfxx-mips.h/1.41/Wed Feb 4 22:28:25 2009// -/elfxx-sparc.c/1.42/Wed Feb 4 22:28:25 2009// -/elfxx-sparc.h/1.9/Fri Feb 8 14:23:23 2008// -/elfxx-target.h/1.117/Wed Feb 4 22:28:26 2009// -/epoc-pe-arm.c/1.7/Fri Feb 8 14:23:23 2008// -/epoc-pei-arm.c/1.8/Fri Feb 8 14:23:23 2008// -/format.c/1.27/Wed Feb 4 22:28:26 2009// -/freebsd.h/1.10/Fri Feb 8 14:23:23 2008// -/gen-aout.c/1.9/Fri Feb 8 14:23:23 2008// -/genlink.h/1.8/Fri Feb 8 14:23:23 2008// -/go32stub.h/1.2/Fri Feb 8 14:23:23 2008// -/hash.c/1.27/Fri Feb 8 14:23:23 2008// -/host-aout.c/1.7/Fri Feb 8 14:23:23 2008// -/hp300bsd.c/1.8/Fri Feb 8 14:23:23 2008// -/hp300hpux.c/1.17/Fri Feb 8 14:23:23 2008// -/hppabsd-core.c/1.21/Fri Feb 8 14:23:23 2008// -/hpux-core.c/1.24/Wed Feb 4 22:28:26 2009// -/i386aout.c/1.14/Fri Feb 8 14:23:23 2008// -/i386bsd.c/1.7/Fri Feb 8 14:23:23 2008// -/i386dynix.c/1.8/Fri Feb 8 14:23:23 2008// -/i386freebsd.c/1.6/Fri Feb 8 14:23:23 2008// -/i386linux.c/1.21/Wed Feb 4 22:28:26 2009// -/i386lynx.c/1.14/Fri Feb 8 14:23:23 2008// -/i386mach3.c/1.11/Fri Feb 8 14:23:23 2008// -/i386msdos.c/1.27/Fri Feb 8 14:23:23 2008// -/i386netbsd.c/1.6/Fri Feb 8 14:23:23 2008// -/i386os9k.c/1.23/Fri Feb 8 14:23:23 2008// -/ieee.c/1.62/Fri Feb 8 14:23:23 2008// -/ihex.c/1.36/Fri Feb 8 14:23:23 2008// -/init.c/1.9/Fri Feb 8 14:23:23 2008// -/irix-core.c/1.21/Fri Feb 8 14:23:23 2008// -/libaout.h/1.26/Fri Feb 8 14:23:23 2008// -/libbfd-in.h/1.74/Wed Feb 4 22:28:26 2009// -/libbfd.c/1.49/Wed Feb 4 22:28:26 2009// -/libbfd.h/1.211/Wed Feb 4 22:28:26 2009// -/libcoff-in.h/1.32/Wed Feb 4 22:28:27 2009// -/libecoff.h/1.24/Wed Feb 4 22:28:27 2009// -/libhppa.h/1.20/Fri Feb 8 14:23:23 2008// -/libieee.h/1.8/Fri Feb 8 14:23:23 2008// -/libnlm.h/1.10/Fri Feb 8 14:23:23 2008// -/liboasys.h/1.6/Fri Feb 8 14:23:23 2008// -/libpei.h/1.20/Wed Feb 4 22:28:27 2009// -/libxcoff.h/1.17/Fri Feb 8 14:23:23 2008// -/linker.c/1.66/Wed Feb 4 22:28:27 2009// -/lynx-core.c/1.13/Fri Feb 8 14:23:23 2008// -/m68k4knetbsd.c/1.7/Fri Feb 8 14:23:23 2008// -/m68klinux.c/1.23/Wed Feb 4 22:28:27 2009// -/m68knetbsd.c/1.8/Fri Feb 8 14:23:23 2008// -/m88kmach3.c/1.8/Fri Feb 8 14:23:23 2008// -/m88kopenbsd.c/1.4/Fri Feb 8 14:23:23 2008// -/mach-o-target.c/1.6/Wed Feb 4 22:28:27 2009// -/mach-o.c/1.32/Wed Feb 4 22:28:27 2009// -/mach-o.h/1.12/Wed Feb 4 22:28:28 2009// -/makefile.vms/1.2/Wed Feb 4 22:28:28 2009// -/mep-relocs.pl/1.2/Fri Feb 8 14:23:23 2008// -/merge.c/1.35/Fri Feb 8 14:23:23 2008// -/mipsbsd.c/1.19/Fri Feb 8 14:23:23 2008// -/mmo.c/1.37/Fri Feb 8 14:23:23 2008// -/netbsd-core.c/1.27/Fri Feb 8 14:23:23 2008// -/netbsd.h/1.10/Fri Feb 8 14:23:23 2008// -/newsos3.c/1.9/Fri Feb 8 14:23:23 2008// -/nlm-target.h/1.19/Fri Feb 8 14:23:23 2008// -/nlm.c/1.10/Fri Feb 8 14:23:23 2008// -/nlm32-alpha.c/1.16/Fri Feb 8 14:23:23 2008// -/nlm32-i386.c/1.13/Fri Feb 8 14:23:23 2008// -/nlm32-ppc.c/1.15/Fri Feb 8 14:23:23 2008// -/nlm32-sparc.c/1.18/Fri Feb 8 14:23:23 2008// -/nlm32.c/1.5/Fri Feb 8 14:23:23 2008// -/nlm64.c/1.5/Fri Feb 8 14:23:23 2008// -/nlmcode.h/1.22/Fri Feb 8 14:23:23 2008// -/nlmswap.h/1.8/Fri Feb 8 14:23:23 2008// -/ns32k.h/1.7/Fri Feb 8 14:23:23 2008// -/ns32knetbsd.c/1.9/Fri Feb 8 14:23:23 2008// -/oasys.c/1.38/Fri Feb 8 14:23:23 2008// -/opncls.c/1.53/Wed Feb 4 22:28:28 2009// -/osf-core.c/1.20/Fri Feb 8 14:23:23 2008// -/pc532-mach.c/1.11/Fri Feb 8 14:23:23 2008// -/pdp11.c/1.40/Wed Feb 4 22:28:28 2009// -/pe-i386.c/1.14/Fri Feb 8 14:23:23 2008// -/pe-mcore.c/1.7/Wed Feb 4 22:28:28 2009// -/pe-mips.c/1.22/Wed Feb 4 22:28:29 2009// -/pe-ppc.c/1.10/Wed Feb 4 22:28:29 2009// -/pe-sh.c/1.8/Fri Feb 8 14:23:23 2008// -/pe-x86_64.c/1.3/Fri Feb 8 14:23:23 2008// -/pef-traceback.h/1.5/Fri Feb 8 14:23:23 2008// -/pef.c/1.25/Wed Feb 4 22:28:29 2009// -/pef.h/1.6/Fri Feb 8 14:23:23 2008// -/pei-i386.c/1.13/Fri Feb 8 14:23:23 2008// -/pei-mcore.c/1.8/Wed Feb 4 22:28:29 2009// -/pei-mips.c/1.8/Fri Feb 8 14:23:23 2008// -/pei-ppc.c/1.9/Wed Feb 4 22:28:29 2009// -/pei-sh.c/1.8/Fri Feb 8 14:23:23 2008// -/pei-x86_64.c/1.3/Fri Feb 8 14:23:23 2008// -/peicode.h/1.56/Wed Feb 4 22:28:29 2009// -/ppcboot.c/1.30/Wed Feb 4 22:28:29 2009// -/ptrace-core.c/1.17/Fri Feb 8 14:23:23 2008// -/reloc.c/1.182/Wed Feb 4 22:28:30 2009// -/reloc16.c/1.18/Wed Feb 4 22:28:30 2009// -/riscix.c/1.18/Fri Feb 8 14:23:23 2008// -/rs6000-core.c/1.22/Wed Feb 4 22:28:30 2009// -/sco5-core.c/1.22/Fri Feb 8 14:23:23 2008// -/section.c/1.99/Wed Feb 4 22:28:30 2009// -/simple.c/1.30/Wed Feb 4 22:28:30 2009// -/som.c/1.71/Wed Feb 4 22:28:31 2009// -/som.h/1.17/Fri Feb 8 14:23:23 2008// -/sparclinux.c/1.23/Wed Feb 4 22:28:31 2009// -/sparclynx.c/1.16/Fri Feb 8 14:23:23 2008// -/sparcnetbsd.c/1.8/Fri Feb 8 14:23:23 2008// -/srec.c/1.46/Wed Feb 4 22:28:31 2009// -/stab-syms.c/1.6/Fri Feb 8 14:23:23 2008// -/stabs.c/1.31/Wed Feb 4 22:28:31 2009// -/stamp-h.in/1.1.1.1/Fri Feb 8 14:23:23 2008// -/sunos.c/1.25/Wed Feb 4 22:28:31 2009// -/syms.c/1.50/Wed Feb 4 22:28:31 2009// -/sysdep.h/1.20/Fri Feb 8 14:23:23 2008// -/targets.c/1.166/Wed Feb 4 22:28:31 2009// -/targmatch.sed/1.2/Fri Feb 8 14:23:23 2008// -/tekhex.c/1.33/Fri Feb 8 14:23:23 2008// -/ticoff.h/1.5/Fri Feb 8 14:23:23 2008// -/trad-core.c/1.28/Fri Feb 8 14:23:23 2008// -/vax1knetbsd.c/1.4/Fri Feb 8 14:23:23 2008// -/vaxbsd.c/1.6/Fri Feb 8 14:23:23 2008// -/vaxnetbsd.c/1.8/Fri Feb 8 14:23:23 2008// -/versados.c/1.34/Fri Feb 8 14:23:23 2008// -/version.h/1.2590/Wed Feb 4 22:28:31 2009// -/vms-gsd.c/1.21/Fri Feb 8 14:23:23 2008// -/vms-hdr.c/1.22/Wed Feb 4 22:28:31 2009// -/vms-misc.c/1.29/Wed Feb 4 22:28:31 2009// -/vms-tir.c/1.20/Wed Feb 4 22:28:31 2009// -/vms.c/1.45/Wed Feb 4 22:28:32 2009// -/vms.h/1.13/Fri Feb 8 14:23:23 2008// -/vmsutil.c/1.2/Wed Jan 21 11:58:05 2009// -/vmsutil.h/1.1/Thu Jan 15 12:42:52 2009// -/warning.m4/1.4/Wed Feb 4 22:28:32 2009// -/xcoff-target.h/1.18/Fri Feb 8 14:23:23 2008// -/xcofflink.c/1.48/Wed Feb 4 22:28:32 2009// -/xsym.c/1.23/Wed Feb 4 22:28:32 2009// -/xsym.h/1.12/Fri Feb 8 14:23:23 2008// -/xtensa-isa.c/1.12/Wed Feb 4 22:28:33 2009// -/xtensa-modules.c/1.11/Wed Feb 4 22:28:33 2009// -/coff-rs6000.c/1.83/Wed Feb 4 23:05:49 2009// -/libcoff.h/1.48/Wed Feb 4 23:06:41 2009// -/coff64-rs6000.c/1.72/Wed Feb 4 23:06:54 2009// -/pe-arm-wince.c/1.5/Wed Feb 4 23:07:20 2009// -/pe-arm.c/1.13/Wed Feb 4 23:07:50 2009// -/peXXigen.c/1.46/Wed Feb 4 23:08:21 2009// -/pei-arm-wince.c/1.3/Wed Feb 4 23:08:40 2009// -/coffcode.h/1.146/Wed Feb 4 23:15:15 2009// -/pei-arm.c/1.13/Wed Feb 4 23:15:40 2009// +D/doc//// +D/hosts//// +D/po//// +/COPYING/1.4/Fri Oct 16 21:38:46 2009// +/ChangeLog/1.4816/Fri Oct 16 21:49:21 2009// +/ChangeLog-0001/1.2/Fri Oct 16 21:38:46 2009// +/ChangeLog-0203/1.2/Fri Oct 16 21:38:46 2009// +/ChangeLog-2004/1.2/Fri Oct 16 21:38:46 2009// +/ChangeLog-2005/1.2/Fri Oct 16 21:38:46 2009// +/ChangeLog-2006/1.1/Fri Oct 16 21:38:46 2009// +/ChangeLog-2007/1.1/Fri Oct 16 21:38:46 2009// +/ChangeLog-2008/1.1/Fri Oct 16 21:38:46 2009// +/ChangeLog-9193/1.2/Fri Oct 16 21:38:46 2009// +/ChangeLog-9495/1.3/Fri Oct 16 21:38:46 2009// +/ChangeLog-9697/1.2/Fri Oct 16 21:38:46 2009// +/ChangeLog-9899/1.2/Fri Oct 16 21:38:46 2009// +/MAINTAINERS/1.1/Fri Oct 16 21:38:46 2009// +/Makefile.am/1.243/Fri Oct 16 21:49:21 2009// +/Makefile.in/1.268/Fri Oct 16 21:49:21 2009// +/PORTING/1.1.1.1/Fri Oct 16 21:38:46 2009// +/README/1.3/Fri Oct 16 21:38:46 2009// +/TODO/1.1.1.1/Fri Oct 16 21:38:46 2009// +/acinclude.m4/1.19/Fri Oct 16 21:49:21 2009// +/aclocal.m4/1.45/Fri Oct 16 21:49:21 2009// +/aix386-core.c/1.19/Fri Oct 16 21:49:21 2009// +/aix5ppc-core.c/1.18/Fri Oct 16 21:38:46 2009// +/aout-adobe.c/1.31/Fri Oct 16 21:49:21 2009// +/aout-arm.c/1.19/Fri Oct 16 21:38:46 2009// +/aout-cris.c/1.16/Fri Oct 16 21:49:21 2009// +/aout-ns32k.c/1.21/Fri Oct 16 21:49:21 2009// +/aout-sparcle.c/1.7/Fri Oct 16 21:49:21 2009// +/aout-target.h/1.37/Fri Oct 16 21:49:21 2009// +/aout-tic30.c/1.36/Fri Oct 16 21:49:21 2009// +/aout0.c/1.7/Fri Oct 16 21:49:21 2009// +/aout32.c/1.6/Fri Oct 16 21:49:21 2009// +/aout64.c/1.6/Fri Oct 16 21:49:21 2009// +/aoutf1.h/1.20/Fri Oct 16 21:38:46 2009// +/aoutx.h/1.79/Fri Oct 16 21:49:21 2009// +/archive.c/1.59/Fri Oct 16 21:49:21 2009// +/archive64.c/1.12/Fri Oct 16 21:49:21 2009// +/archures.c/1.145/Fri Oct 16 21:49:21 2009// +/armnetbsd.c/1.10/Fri Oct 16 21:38:46 2009// +/bfd-in.h/1.147/Fri Oct 16 21:49:21 2009// +/bfd-in2.h/1.496/Fri Oct 16 21:49:21 2009// +/bfd.c/1.111/Fri Oct 16 21:49:21 2009// +/bfd.m4/1.6/Fri Oct 16 21:49:21 2009// +/bfdio.c/1.25/Fri Oct 16 21:49:21 2009// +/bfdwin.c/1.12/Fri Oct 16 21:49:21 2009// +/binary.c/1.38/Fri Oct 16 21:49:21 2009// +/bout.c/1.34/Fri Oct 16 21:49:21 2009// +/cache.c/1.37/Fri Oct 16 21:49:21 2009// +/cf-i386lynx.c/1.8/Fri Oct 16 21:49:21 2009// +/cf-sparclynx.c/1.6/Fri Oct 16 21:49:21 2009// +/cisco-core.c/1.17/Fri Oct 16 21:49:21 2009// +/coff-alpha.c/1.41/Fri Oct 16 21:49:21 2009// +/coff-apollo.c/1.14/Fri Oct 16 21:49:21 2009// +/coff-arm.c/1.77/Fri Oct 16 21:49:21 2009// +/coff-aux.c/1.10/Fri Oct 16 21:49:21 2009// +/coff-go32.c/1.13/Fri Oct 16 21:49:21 2009// +/coff-h8300.c/1.43/Fri Oct 16 21:38:46 2009// +/coff-h8500.c/1.18/Fri Oct 16 21:38:46 2009// +/coff-i386.c/1.30/Fri Oct 16 21:49:21 2009// +/coff-i860.c/1.23/Fri Oct 16 21:38:46 2009// +/coff-i960.c/1.22/Fri Oct 16 21:49:21 2009// +/coff-ia64.c/1.16/Fri Oct 16 21:49:21 2009// +/coff-m68k.c/1.22/Fri Oct 16 21:38:46 2009// +/coff-m88k.c/1.17/Fri Oct 16 21:49:21 2009// +/coff-maxq.c/1.9/Fri Oct 16 21:49:21 2009// +/coff-mcore.c/1.39/Fri Oct 16 21:38:46 2009// +/coff-mips.c/1.38/Fri Oct 16 21:49:21 2009// +/coff-or32.c/1.15/Fri Oct 16 21:49:21 2009// +/coff-pmac.c/1.11/Fri Oct 16 21:49:21 2009// +/coff-ppc.c/1.37/Fri Oct 16 21:38:46 2009// +/coff-rs6000.c/1.91/Fri Oct 16 21:49:21 2009// +/coff-sh.c/1.41/Fri Oct 16 21:49:21 2009// +/coff-sparc.c/1.18/Fri Oct 16 21:38:46 2009// +/coff-stgo32.c/1.22/Fri Oct 16 21:49:21 2009// +/coff-svm68k.c/1.5/Fri Oct 16 21:49:21 2009// +/coff-tic30.c/1.15/Fri Oct 16 21:49:21 2009// +/coff-tic4x.c/1.16/Fri Oct 16 21:38:46 2009// +/coff-tic54x.c/1.24/Fri Oct 16 21:38:46 2009// +/coff-tic80.c/1.22/Fri Oct 16 21:38:46 2009// +/coff-u68k.c/1.5/Fri Oct 16 21:49:21 2009// +/coff-w65.c/1.20/Fri Oct 16 21:38:46 2009// +/coff-we32k.c/1.14/Fri Oct 16 21:49:21 2009// +/coff-x86_64.c/1.9/Fri Oct 16 21:49:21 2009// +/coff-z80.c/1.9/Fri Oct 16 21:49:21 2009// +/coff-z8k.c/1.25/Fri Oct 16 21:38:46 2009// +/coff64-rs6000.c/1.79/Fri Oct 16 21:49:21 2009// +/coffcode.h/1.161/Fri Oct 16 21:49:21 2009// +/coffgen.c/1.76/Fri Oct 16 21:49:21 2009// +/cofflink.c/1.73/Fri Oct 16 21:49:21 2009// +/coffswap.h/1.19/Fri Oct 16 21:49:21 2009// +/compress.c/1.2/Fri Oct 16 21:49:21 2009// +/config.bfd/1.256/Result of merge+Fri Oct 16 21:49:21 2009// +/config.in/1.45/Fri Oct 16 21:49:21 2009// +/configure/1.317/Fri Oct 16 21:49:21 2009// +/configure.com/1.4/Fri Oct 16 21:49:21 2009// +/configure.host/1.17/Fri Oct 16 21:38:46 2009// +/configure.in/1.272/Fri Oct 16 21:49:21 2009// +/corefile.c/1.15/Fri Oct 16 21:38:46 2009// +/cpu-alpha.c/1.11/Fri Oct 16 21:49:21 2009// +/cpu-arc.c/1.11/Fri Oct 16 21:49:21 2009// +/cpu-arm.c/1.27/Fri Oct 16 21:49:21 2009// +/cpu-avr.c/1.15/Fri Oct 16 21:49:21 2009// +/cpu-bfin.c/1.3/Fri Oct 16 21:38:46 2009// +/cpu-cr16.c/1.2/Fri Oct 16 21:38:46 2009// +/cpu-cr16c.c/1.6/Fri Oct 16 21:49:21 2009// +/cpu-cris.c/1.12/Fri Oct 16 21:38:46 2009// +/cpu-crx.c/1.6/Fri Oct 16 21:49:21 2009// +/cpu-d10v.c/1.10/Fri Oct 16 21:38:46 2009// +/cpu-d30v.c/1.7/Fri Oct 16 21:38:46 2009// +/cpu-dlx.c/1.7/Fri Oct 16 21:49:21 2009// +/cpu-fr30.c/1.8/Fri Oct 16 21:49:21 2009// +/cpu-frv.c/1.12/Fri Oct 16 21:49:21 2009// +/cpu-h8300.c/1.24/Fri Oct 16 21:49:21 2009// +/cpu-h8500.c/1.15/Fri Oct 16 21:38:46 2009// +/cpu-hppa.c/1.12/Fri Oct 16 21:49:21 2009// +/cpu-i370.c/1.11/Fri Oct 16 21:38:46 2009// +/cpu-i386.c/1.18/Fri Oct 16 21:49:21 2009// +/cpu-i860.c/1.8/Fri Oct 16 21:49:21 2009// +/cpu-i960.c/1.13/Fri Oct 16 21:49:21 2009// +/cpu-ia64-opc.c/1.17/Fri Oct 16 21:49:21 2009// +/cpu-ia64.c/1.10/Fri Oct 16 21:49:21 2009// +/cpu-ip2k.c/1.7/Fri Oct 16 21:49:21 2009// +/cpu-iq2000.c/1.7/Fri Oct 16 21:49:21 2009// +/cpu-l1om.c/1.2/Sat Jul 25 15:50:20 2009// +/cpu-lm32.c/1.1/Fri Oct 16 21:38:46 2009// +/cpu-m10200.c/1.7/Fri Oct 16 21:49:21 2009// +/cpu-m10300.c/1.14/Fri Oct 16 21:49:21 2009// +/cpu-m32c.c/1.4/Fri Oct 16 21:49:21 2009// +/cpu-m32r.c/1.11/Fri Oct 16 21:49:21 2009// +/cpu-m68hc11.c/1.10/Fri Oct 16 21:49:21 2009// +/cpu-m68hc12.c/1.9/Fri Oct 16 21:49:21 2009// +/cpu-m68k.c/1.21/Fri Oct 16 21:49:21 2009// +/cpu-m88k.c/1.9/Fri Oct 16 21:49:21 2009// +/cpu-maxq.c/1.6/Fri Oct 16 21:38:46 2009// +/cpu-mcore.c/1.11/Fri Oct 16 21:49:21 2009// +/cpu-mep.c/1.5/Fri Oct 16 21:49:21 2009// +/cpu-microblaze.c/1.1/Thu Aug 6 17:38:00 2009// +/cpu-mips.c/1.32/Fri Oct 16 21:49:21 2009// +/cpu-mmix.c/1.7/Fri Oct 16 21:49:21 2009// +/cpu-moxie.c/1.1/Thu Apr 16 15:39:42 2009// +/cpu-msp430.c/1.9/Fri Oct 16 21:49:21 2009// +/cpu-mt.c/1.4/Fri Oct 16 21:38:46 2009// +/cpu-ns32k.c/1.21/Fri Oct 16 21:38:46 2009// +/cpu-openrisc.c/1.7/Fri Oct 16 21:49:21 2009// +/cpu-or32.c/1.7/Fri Oct 16 21:49:21 2009// +/cpu-pdp11.c/1.9/Fri Oct 16 21:49:21 2009// +/cpu-pj.c/1.11/Fri Oct 16 21:49:21 2009// +/cpu-plugin.c/1.1/Tue May 26 14:12:02 2009// +/cpu-powerpc.c/1.22/Fri Oct 16 21:49:21 2009// +/cpu-rs6000.c/1.13/Fri Oct 16 21:49:21 2009// +/cpu-rx.c/1.1/Tue Sep 29 14:17:03 2009// +/cpu-s390.c/1.10/Fri Oct 16 21:49:21 2009// +/cpu-score.c/1.4/Fri Oct 16 21:49:21 2009// +/cpu-sh.c/1.22/Fri Oct 16 21:38:46 2009// +/cpu-sparc.c/1.11/Fri Oct 16 21:49:21 2009// +/cpu-spu.c/1.3/Fri Oct 16 21:38:46 2009// +/cpu-tic30.c/1.7/Fri Oct 16 21:49:21 2009// +/cpu-tic4x.c/1.9/Fri Oct 16 21:49:21 2009// +/cpu-tic54x.c/1.10/Fri Oct 16 21:49:21 2009// +/cpu-tic80.c/1.8/Fri Oct 16 21:49:21 2009// +/cpu-v850.c/1.14/Fri Oct 16 21:49:21 2009// +/cpu-vax.c/1.10/Fri Oct 16 21:49:21 2009// +/cpu-w65.c/1.11/Fri Oct 16 21:49:21 2009// +/cpu-we32k.c/1.9/Fri Oct 16 21:49:21 2009// +/cpu-xc16x.c/1.3/Fri Oct 16 21:38:46 2009// +/cpu-xstormy16.c/1.8/Fri Oct 16 21:49:21 2009// +/cpu-xtensa.c/1.6/Fri Oct 16 21:49:21 2009// +/cpu-z80.c/1.3/Fri Oct 16 21:38:46 2009// +/cpu-z8k.c/1.14/Fri Oct 16 21:49:21 2009// +/demo64.c/1.7/Fri Oct 16 21:49:21 2009// +/dep-in.sed/1.9/Fri Oct 16 21:49:21 2009// +/dwarf1.c/1.21/Fri Oct 16 21:49:21 2009// +/dwarf2.c/1.124/Fri Oct 16 21:49:21 2009// +/ecoff.c/1.66/Fri Oct 16 21:49:21 2009// +/ecofflink.c/1.25/Fri Oct 16 21:49:21 2009// +/ecoffswap.h/1.13/Fri Oct 16 21:38:46 2009// +/elf-attrs.c/1.10/Fri Oct 16 21:49:21 2009// +/elf-bfd.h/1.296/Fri Oct 16 21:49:21 2009// +/elf-eh-frame.c/1.81/Fri Oct 16 21:49:21 2009// +/elf-hppa.h/1.93/Fri Oct 16 21:49:21 2009// +/elf-ifunc.c/1.3/Mon Aug 3 15:50:51 2009// +/elf-m10200.c/1.35/Fri Oct 16 21:49:21 2009// +/elf-m10300.c/1.101/Fri Oct 16 21:49:21 2009// +/elf-strtab.c/1.16/Fri Oct 16 21:49:21 2009// +/elf-vxworks.c/1.13/Fri Oct 16 21:49:21 2009// +/elf-vxworks.h/1.6/Fri Oct 16 21:49:22 2009// +/elf.c/1.493/Fri Oct 16 21:49:22 2009// +/elf32-am33lin.c/1.7/Fri Oct 16 21:38:46 2009// +/elf32-arc.c/1.20/Fri Oct 16 21:38:46 2009// +/elf32-arm.c/1.213/Fri Oct 16 21:49:22 2009// +/elf32-avr.c/1.42/Fri Oct 16 21:49:22 2009// +/elf32-avr.h/1.2/Fri Oct 16 21:38:46 2009// +/elf32-bfin.c/1.44/Fri Oct 16 21:49:22 2009// +/elf32-cr16.c/1.11/Fri Oct 16 21:49:22 2009// +/elf32-cr16c.c/1.14/Fri Oct 16 21:49:22 2009// +/elf32-cris.c/1.104/Fri Oct 16 21:49:22 2009// +/elf32-crx.c/1.14/Fri Oct 16 21:49:22 2009// +/elf32-d10v.c/1.38/Fri Oct 16 21:38:46 2009// +/elf32-d30v.c/1.21/Fri Oct 16 21:38:46 2009// +/elf32-dlx.c/1.23/Fri Oct 16 21:49:22 2009// +/elf32-fr30.c/1.39/Fri Oct 16 21:49:22 2009// +/elf32-frv.c/1.66/Fri Oct 16 21:49:22 2009// +/elf32-gen.c/1.18/Fri Oct 16 21:38:46 2009// +/elf32-h8300.c/1.55/Fri Oct 16 21:49:22 2009// +/elf32-hppa.c/1.168/Fri Oct 16 21:49:22 2009// +/elf32-hppa.h/1.18/Fri Oct 16 21:49:22 2009// +/elf32-i370.c/1.63/Fri Oct 16 21:38:46 2009// +/elf32-i386.c/1.226/Fri Oct 16 21:49:22 2009// +/elf32-i860.c/1.41/Fri Oct 16 21:38:46 2009// +/elf32-i960.c/1.17/Fri Oct 16 21:38:46 2009// +/elf32-ip2k.c/1.25/Fri Oct 16 21:38:46 2009// +/elf32-iq2000.c/1.26/Fri Oct 16 21:38:46 2009// +/elf32-lm32.c/1.3/Fri Oct 16 21:49:22 2009// +/elf32-m32c.c/1.20/Fri Oct 16 21:49:22 2009// +/elf32-m32r.c/1.95/Fri Oct 16 21:49:22 2009// +/elf32-m68hc11.c/1.37/Fri Oct 16 21:38:46 2009// +/elf32-m68hc12.c/1.29/Fri Oct 16 21:38:46 2009// +/elf32-m68hc1x.c/1.35/Fri Oct 16 21:49:22 2009// +/elf32-m68hc1x.h/1.10/Fri Oct 16 21:49:22 2009// +/elf32-m68k.c/1.117/Fri Oct 16 21:49:22 2009// +/elf32-m88k.c/1.9/Fri Oct 16 21:49:22 2009// +/elf32-mcore.c/1.52/Fri Oct 16 21:38:46 2009// +/elf32-mep.c/1.13/Fri Oct 16 21:49:22 2009// +/elf32-microblaze.c/1.2/Fri Aug 7 17:10:43 2009// +/elf32-mips.c/1.206/Fri Oct 16 21:49:22 2009// +/elf32-moxie.c/1.2/Thu Jun 11 11:27:57 2009// +/elf32-msp430.c/1.20/Fri Oct 16 21:38:46 2009// +/elf32-mt.c/1.12/Fri Oct 16 21:38:46 2009// +/elf32-openrisc.c/1.30/Fri Oct 16 21:38:46 2009// +/elf32-or32.c/1.13/Fri Oct 16 21:38:46 2009// +/elf32-pj.c/1.13/Fri Oct 16 21:38:46 2009// +/elf32-ppc.c/1.269/Fri Oct 16 21:49:22 2009// +/elf32-ppc.h/1.12/Fri Oct 16 21:49:22 2009// +/elf32-rx.c/1.1/Tue Sep 29 14:17:03 2009// +/elf32-s390.c/1.102/Fri Oct 16 21:49:22 2009// +/elf32-score.c/1.15/Fri Oct 16 21:49:22 2009// +/elf32-score.h/1.2/Thu May 21 14:15:48 2009// +/elf32-score7.c/1.2/Thu May 21 14:15:48 2009// +/elf32-sh-relocs.h/1.3/Fri Oct 16 21:49:22 2009// +/elf32-sh-symbian.c/1.14/Fri Oct 16 21:38:46 2009// +/elf32-sh.c/1.161/Fri Oct 16 21:49:22 2009// +/elf32-sh64-com.c/1.13/Fri Oct 16 21:49:22 2009// +/elf32-sh64.c/1.45/Fri Oct 16 21:49:22 2009// +/elf32-sh64.h/1.6/Fri Oct 16 21:49:22 2009// +/elf32-sparc.c/1.90/Fri Oct 16 21:49:22 2009// +/elf32-spu.c/1.90/Fri Oct 16 21:49:22 2009// +/elf32-spu.h/1.16/Fri Oct 16 21:49:22 2009// +/elf32-v850.c/1.75/Fri Oct 16 21:49:22 2009// +/elf32-vax.c/1.56/Fri Oct 16 21:49:22 2009// +/elf32-xc16x.c/1.7/Fri Oct 16 21:49:22 2009// +/elf32-xstormy16.c/1.41/Fri Oct 16 21:38:46 2009// +/elf32-xtensa.c/1.118/Fri Oct 16 21:49:22 2009// +/elf32.c/1.7/Fri Oct 16 21:49:22 2009// +/elf64-alpha.c/1.167/Fri Oct 16 21:49:22 2009// +/elf64-gen.c/1.18/Fri Oct 16 21:38:46 2009// +/elf64-hppa.c/1.92/Fri Oct 16 21:49:22 2009// +/elf64-hppa.h/1.10/Fri Oct 16 21:49:22 2009// +/elf64-mips.c/1.91/Fri Oct 16 21:49:22 2009// +/elf64-mmix.c/1.61/Fri Oct 16 21:49:22 2009// +/elf64-ppc.c/1.301/Fri Oct 16 21:49:22 2009// +/elf64-ppc.h/1.26/Fri Oct 16 21:49:22 2009// +/elf64-s390.c/1.104/Fri Oct 16 21:49:22 2009// +/elf64-sh64.c/1.84/Fri Oct 16 21:49:22 2009// +/elf64-sparc.c/1.119/Fri Oct 16 21:49:22 2009// +/elf64-x86-64.c/1.187/Fri Oct 16 21:49:22 2009// +/elf64.c/1.5/Fri Oct 16 21:49:22 2009// +/elfcode.h/1.98/Fri Oct 16 21:49:22 2009// +/elfcore.h/1.29/Fri Oct 16 21:49:22 2009// +/elflink.c/1.357/Fri Oct 16 21:49:22 2009// +/elfn32-mips.c/1.46/Fri Oct 16 21:49:22 2009// +/elfxx-ia64.c/1.215/Fri Oct 16 21:49:22 2009// +/elfxx-mips.c/1.262/Fri Oct 16 21:49:22 2009// +/elfxx-mips.h/1.43/Fri Oct 16 21:49:22 2009// +/elfxx-sparc.c/1.46/Fri Oct 16 21:49:22 2009// +/elfxx-sparc.h/1.11/Fri Oct 16 21:49:22 2009// +/elfxx-target.h/1.119/Fri Oct 16 21:49:22 2009// +/epoc-pe-arm.c/1.8/Fri Oct 16 21:49:22 2009// +/epoc-pei-arm.c/1.9/Fri Oct 16 21:49:22 2009// +/format.c/1.29/Fri Oct 16 21:49:22 2009// +/freebsd.h/1.10/Fri Oct 16 21:38:46 2009// +/gen-aout.c/1.10/Fri Oct 16 21:49:22 2009// +/genlink.h/1.8/Fri Oct 16 21:38:46 2009// +/go32stub.h/1.2/Fri Oct 16 21:38:46 2009// +/hash.c/1.30/Fri Oct 16 21:49:22 2009// +/host-aout.c/1.8/Fri Oct 16 21:49:22 2009// +/hp300bsd.c/1.10/Fri Oct 16 21:49:22 2009// +/hp300hpux.c/1.18/Fri Oct 16 21:49:22 2009// +/hppabsd-core.c/1.21/Fri Oct 16 21:38:46 2009// +/hpux-core.c/1.25/Fri Oct 16 21:49:22 2009// +/i386aout.c/1.14/Fri Oct 16 21:38:46 2009// +/i386bsd.c/1.9/Fri Oct 16 21:49:22 2009// +/i386dynix.c/1.9/Fri Oct 16 21:49:22 2009// +/i386freebsd.c/1.7/Fri Oct 16 21:49:22 2009// +/i386linux.c/1.23/Fri Oct 16 21:49:22 2009// +/i386lynx.c/1.16/Fri Oct 16 21:49:22 2009// +/i386mach3.c/1.12/Fri Oct 16 21:49:22 2009// +/i386msdos.c/1.29/Fri Oct 16 21:49:22 2009// +/i386netbsd.c/1.7/Fri Oct 16 21:49:22 2009// +/i386os9k.c/1.25/Fri Oct 16 21:49:22 2009// +/ieee.c/1.65/Fri Oct 16 21:49:23 2009// +/ihex.c/1.39/Fri Oct 16 21:49:23 2009// +/init.c/1.10/Fri Oct 16 21:49:23 2009// +/irix-core.c/1.22/Fri Oct 16 21:49:23 2009// +/libaout.h/1.27/Fri Oct 16 21:49:23 2009// +/libbfd-in.h/1.76/Fri Oct 16 21:49:23 2009// +/libbfd.c/1.50/Fri Oct 16 21:49:23 2009// +/libbfd.h/1.223/Fri Oct 16 21:49:23 2009// +/libcoff-in.h/1.40/Fri Oct 16 21:49:23 2009// +/libcoff.h/1.57/Fri Oct 16 21:49:23 2009// +/libecoff.h/1.25/Fri Oct 16 21:49:23 2009// +/libhppa.h/1.21/Fri Oct 16 21:49:23 2009// +/libieee.h/1.9/Fri Oct 16 21:49:23 2009// +/libnlm.h/1.10/Fri Oct 16 21:38:46 2009// +/liboasys.h/1.7/Fri Oct 16 21:49:23 2009// +/libpei.h/1.25/Fri Oct 16 21:49:23 2009// +/libxcoff.h/1.19/Fri Oct 16 21:49:23 2009// +/linker.c/1.75/Fri Oct 16 21:49:23 2009// +/lynx-core.c/1.14/Fri Oct 16 21:49:23 2009// +/m68k4knetbsd.c/1.8/Fri Oct 16 21:49:23 2009// +/m68klinux.c/1.25/Fri Oct 16 21:49:23 2009// +/m68knetbsd.c/1.9/Fri Oct 16 21:49:23 2009// +/m88kmach3.c/1.10/Fri Oct 16 21:49:23 2009// +/m88kopenbsd.c/1.5/Fri Oct 16 21:49:23 2009// +/mach-o-i386.c/1.5/Thu Jun 25 12:39:06 2009// +/mach-o-target.c/1.11/Fri Oct 16 21:49:23 2009// +/mach-o.c/1.46/Fri Oct 16 21:49:23 2009// +/mach-o.h/1.21/Fri Oct 16 21:49:23 2009// +/makefile.vms/1.5/Fri Oct 16 21:49:23 2009// +/mep-relocs.pl/1.2/Fri Oct 16 21:38:46 2009// +/merge.c/1.38/Fri Oct 16 21:49:23 2009// +/mipsbsd.c/1.21/Fri Oct 16 21:49:23 2009// +/mmo.c/1.39/Fri Oct 16 21:49:23 2009// +/netbsd-core.c/1.27/Fri Oct 16 21:38:46 2009// +/netbsd.h/1.10/Fri Oct 16 21:38:46 2009// +/newsos3.c/1.11/Fri Oct 16 21:49:23 2009// +/nlm-target.h/1.21/Fri Oct 16 21:49:23 2009// +/nlm.c/1.11/Fri Oct 16 21:49:23 2009// +/nlm32-alpha.c/1.16/Fri Oct 16 21:38:46 2009// +/nlm32-i386.c/1.13/Fri Oct 16 21:38:46 2009// +/nlm32-ppc.c/1.15/Fri Oct 16 21:38:46 2009// +/nlm32-sparc.c/1.18/Fri Oct 16 21:38:46 2009// +/nlm32.c/1.6/Fri Oct 16 21:49:23 2009// +/nlm64.c/1.6/Fri Oct 16 21:49:23 2009// +/nlmcode.h/1.22/Fri Oct 16 21:38:46 2009// +/nlmswap.h/1.8/Fri Oct 16 21:38:46 2009// +/ns32k.h/1.7/Fri Oct 16 21:38:46 2009// +/ns32knetbsd.c/1.9/Fri Oct 16 21:38:46 2009// +/oasys.c/1.41/Fri Oct 16 21:49:23 2009// +/opncls.c/1.59/Fri Oct 16 21:49:23 2009// +/osf-core.c/1.21/Fri Oct 16 21:49:23 2009// +/pc532-mach.c/1.13/Fri Oct 16 21:49:23 2009// +/pdp11.c/1.42/Fri Oct 16 21:49:23 2009// +/pe-arm-wince.c/1.5/Fri Oct 16 21:38:46 2009// +/pe-arm.c/1.14/Fri Oct 16 21:49:23 2009// +/pe-i386.c/1.15/Fri Oct 16 21:49:23 2009// +/pe-mcore.c/1.8/Fri Oct 16 21:49:23 2009// +/pe-mips.c/1.23/Fri Oct 16 21:49:23 2009// +/pe-ppc.c/1.11/Fri Oct 16 21:49:23 2009// +/pe-sh.c/1.9/Fri Oct 16 21:49:23 2009// +/pe-x86_64.c/1.3/Fri Oct 16 21:38:46 2009// +/peXXigen.c/1.59/Fri Oct 16 21:49:23 2009// +/pef-traceback.h/1.5/Fri Oct 16 21:38:46 2009// +/pef.c/1.28/Fri Oct 16 21:49:23 2009// +/pef.h/1.8/Fri Oct 16 21:49:23 2009// +/pei-arm-wince.c/1.3/Fri Oct 16 21:38:46 2009// +/pei-arm.c/1.15/Fri Oct 16 21:49:23 2009// +/pei-i386.c/1.15/Fri Oct 16 21:49:23 2009// +/pei-ia64.c/1.2/Tue Apr 21 17:08:20 2009// +/pei-mcore.c/1.10/Fri Oct 16 21:49:23 2009// +/pei-mips.c/1.10/Fri Oct 16 21:49:23 2009// +/pei-ppc.c/1.11/Fri Oct 16 21:49:23 2009// +/pei-sh.c/1.10/Fri Oct 16 21:49:23 2009// +/pei-x86_64.c/1.5/Fri Oct 16 21:49:23 2009// +/peicode.h/1.61/Fri Oct 16 21:49:23 2009// +/plugin.c/1.4/Sat Aug 29 22:10:58 2009// +/plugin.h/1.2/Thu May 28 11:30:49 2009// +/ppcboot.c/1.32/Fri Oct 16 21:49:23 2009// +/ptrace-core.c/1.18/Fri Oct 16 21:49:23 2009// +/reloc.c/1.195/Fri Oct 16 21:49:23 2009// +/reloc16.c/1.20/Fri Oct 16 21:49:23 2009// +/riscix.c/1.18/Fri Oct 16 21:38:46 2009// +/rs6000-core.c/1.25/Fri Oct 16 21:49:23 2009// +/sco5-core.c/1.22/Fri Oct 16 21:38:46 2009// +/section.c/1.104/Fri Oct 16 21:49:23 2009// +/simple.c/1.33/Fri Oct 16 21:49:23 2009// +/som.c/1.76/Fri Oct 16 21:49:23 2009// +/som.h/1.18/Fri Oct 16 21:49:23 2009// +/sparclinux.c/1.25/Fri Oct 16 21:49:23 2009// +/sparclynx.c/1.16/Fri Oct 16 21:38:46 2009// +/sparcnetbsd.c/1.9/Fri Oct 16 21:49:23 2009// +/srec.c/1.49/Fri Oct 16 21:49:23 2009// +/stab-syms.c/1.7/Fri Oct 16 21:49:23 2009// +/stabs.c/1.33/Fri Oct 16 21:49:23 2009// +/stamp-h.in/1.1.1.1/Fri Oct 16 21:38:46 2009// +/sunos.c/1.25/Fri Oct 16 21:38:46 2009// +/syms.c/1.55/Fri Oct 16 21:49:23 2009// +/sysdep.h/1.21/Fri Oct 16 21:49:23 2009// +/targets.c/1.179/Fri Oct 16 21:49:23 2009// +/targmatch.sed/1.2/Fri Oct 16 21:38:46 2009// +/tekhex.c/1.37/Fri Oct 16 21:49:23 2009// +/ticoff.h/1.7/Fri Oct 16 21:49:23 2009// +/trad-core.c/1.28/Fri Oct 16 21:38:46 2009// +/vax1knetbsd.c/1.5/Fri Oct 16 21:49:23 2009// +/vaxbsd.c/1.8/Fri Oct 16 21:49:23 2009// +/vaxnetbsd.c/1.9/Fri Oct 16 21:49:23 2009// +/verilog.c/1.2/Wed Sep 9 21:38:58 2009// +/versados.c/1.36/Fri Oct 16 21:49:23 2009// +/version.h/1.2840/Fri Oct 16 21:49:23 2009// +/vms-gsd.c/1.22/Fri Oct 16 21:49:23 2009// +/vms-hdr.c/1.24/Fri Oct 16 21:49:23 2009// +/vms-misc.c/1.30/Fri Oct 16 21:49:23 2009// +/vms-tir.c/1.21/Fri Oct 16 21:49:23 2009// +/vms.c/1.50/Fri Oct 16 21:49:23 2009// +/vms.h/1.15/Fri Oct 16 21:49:23 2009// +/warning.m4/1.4/Fri Oct 16 21:38:46 2009// +/xcoff-target.h/1.20/Fri Oct 16 21:49:23 2009// +/xcofflink.c/1.70/Fri Oct 16 21:49:23 2009// +/xsym.c/1.25/Fri Oct 16 21:49:23 2009// +/xsym.h/1.12/Fri Oct 16 21:38:46 2009// +/xtensa-isa.c/1.12/Fri Oct 16 21:38:46 2009// +/xtensa-modules.c/1.14/Fri Oct 16 21:49:23 2009// diff --git a/cegcc/src/binutils/bfd/ChangeLog b/cegcc/src/binutils/bfd/ChangeLog index de0f59609..bff11d99c 100644 --- a/cegcc/src/binutils/bfd/ChangeLog +++ b/cegcc/src/binutils/bfd/ChangeLog @@ -1,3 +1,4281 @@ +2009-10-16 Alan Modra + + PR binutils/10785 + * 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-10-14 Alan Modra + + * aoutx.h (aout_link_check_ar_symbols): Typo fix. + +2009-10-13 H.J. Lu + + PR binutils/10763 + * elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt + earlier. + +2009-10-13 Alan Modra + + * elflink.c (_bfd_elf_merge_symbol): Revert previous patch. + +2009-10-12 Roland McGrath + + * elflink.c (elf_link_add_object_symbols, _bfd_elf_merge_symbol): + Fix %s that should be %B in several message formats. + +2009-10-10 Alan Modra + + * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols for + excluded output sections. + +2009-10-09 Tristan Gingold + + * mach-o.c (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_RPATH. + (bfd_mach_o_bfd_print_private_bfd_data): Ditto. + +2009-10-09 Tristan Gingold + + * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Rename to + bfd_mach_o_read_symtab_symbols. + (bfd_mach_o_scan_write_thread): Rename to bfd_mach_o_write_thread. + (bfd_mach_o_scan_write_relocs): Rename to bfd_mach_o_write_relocs. + (bfd_mach_o_scan_write_section_32): Rename to + bfd_mach_o_write_section_32. + (bfd_mach_o_scan_write_section_64): Rename to + bfd_mach_o_write_section_64. + (bfd_mach_o_scan_write_segment_32): Rename to + bfd_mach_o_write_segment_32. + (bfd_mach_o_scan_write_segment_64): Rename to + bfd_mach_o_write_segment_64. + (bfd_mach_o_scan_write_symtab): Rename to bfd_mach_o_write_symtab. + (bfd_mach_o_scan_read_section_32): Rename to + bfd_mach_o_read_section_32. + (bfd_mach_o_scan_read_section_64): Rename to + bfd_mach_o_read_section_64. + (bfd_mach_o_scan_read_section): Rename to bfd_mach_o_read_section. + (bfd_mach_o_scan_read_symtab_strtab): Rename to + bfd_mach_o_read_symtab_strtab. + (bfd_mach_o_scan_read_symtab_symbol): Rename to + bfd_mach_o_read_symtab_symbol. + (bfd_mach_o_scan_read_dysymtab_symbol): Rename to + bfd_mach_o_read_dysymtab_symbol. + (bfd_mach_o_scan_read_dylinker): Rename to bfd_mach_o_read_dylinker. + (bfd_mach_o_scan_read_dylib): Rename to bfd_mach_o_read_dylib. + (bfd_mach_o_scan_read_prebound_dylib): Rename to + bfd_mach_o_read_prebound_dylib. + (bfd_mach_o_scan_read_thread): Rename to bfd_mach_o_read_thread. + (bfd_mach_o_scan_read_dysymtab): Rename to bfd_mach_o_read_dysymtab. + (bfd_mach_o_scan_read_symtab): Rename to bfd_mach_o_read_symtab. + (bfd_mach_o_scan_read_uuid): Rename to bfd_mach_o_read_uuid. + (bfd_mach_o_scan_read_linkedit): Rename to bfd_mach_o_read_linkedit. + (bfd_mach_o_scan_read_str): Rename to bfd_mach_o_read_str. + (bfd_mach_o_scan_read_dyld_info): Rename to bfd_mach_o_read_dyld_info. + (bfd_mach_o_scan_read_segment): Rename to bfd_mach_o_read_segment. + (bfd_mach_o_scan_read_segment_32): Rename to + bfd_mach_o_read_segment_32. + (bfd_mach_o_scan_read_segment_64): Rename to + bfd_mach_o_read_segment_64. + (bfd_mach_o_scan_read_command): Rename to bfd_mach_o_read_command. + * mach-o.h (bfd_mach_o_scan_read_dysymtab_symbol): Rename to + bfd_mach_o_read_dysymtab_symbol. + +2009-10-09 Tristan Gingold + + * mach-o.c (bfd_mach_o_section_get_entry_size): Moved. + (bfd_mach_o_section_get_nbr_indirect): Ditto. + (bfd_mach_o_get_synthetic_symtab): New function. + (bfd_mach_o_print_private_header): Print the number of commands + in decimal. + * mach-o.h (bfd_mach_o_get_synthetic_symtab): Add prototype. + * mach-o-target.c: Do not defined bfd_mach_o_get_synthetic_symtab. + +2009-10-08 Tristan Gingold + + * config.bfd: Add bfd_mach_o_i386_vec in x86_64-darwin targ_selvecs. + +2009-10-06 H.J. Lu + + * bfd-in2.h: Regenerated. + +2009-10-02 Alan Modra + + * aout-cris.c (N_SHARED_LIB): Don't define. + * hp300bsd.c (N_SHARED_LIB): Don't define. + * i386bsd.c (N_SHARED_LIB): Don't define. + * i386linux.c (N_SHARED_LIB): Don't define. + * i386lynx.c (N_SHARED_LIB): Don't define. + * m68klinux.c (N_SHARED_LIB): Don't define. + * m88kmach3.c (N_SHARED_LIB): Don't define. + * mipsbsd.c (N_SHARED_LIB): Don't define. + * newsos3.c (N_SHARED_LIB): Don't define. + * pc532-mach.c (N_SHARED_LIB): Don't define. + * pdp11.c (N_SHARED_LIB): Don't define. + * sparclinux.c (N_SHARED_LIB): Don't define. + * vaxbsd.c (N_SHARED_LIB): Don't define. + +2009-10-01 Dave Korn + + * cofflink.c (_bfd_coff_generic_relocate_section): Look for the aux + symbol for a weak undef in the auxbfd, not the input bfd. + +2009-10-01 Ulrich Weigand + + * elf32-spu.c (spu_elf_auto_overlay): Insert icache linker script + after .toe instead of before .text section. Set the LMA of all + overlay sections to their icache IA address. + (spu_elf_find_overlays): Determine icache set id without reference + to the LMA. + +2009-09-30 Tristan Gingold + + * configure.com: Use hosts/alphavms.h on both alpha and ia64 VMS. + +2009-09-29 H.J. Lu + + * elf64-x86-64.c (elf64_x86_64_append_rela): New. + (elf64_x86_64_relocate_section): Use it. + (elf64_x86_64_finish_dynamic_symbol): Likewise. + +2009-09-29 DJ Delorie + + * Makefile.am (ALL_MACHINES): Add cpu-rx.lo. + (ALL_MACHINES_CFILES): Add cpu-rx.c. + (BFD32_BACKENDS): Add elf32-rx.lo. + (BFD32_BACKENDS_CFILES): Add elf32-rx.c. + * archures.c (bfd_architecture): Add bfd_arch_rx and bfd_mach_rx. + Export bfd_rx_arch. + (bfd_archures_list): Add bfd_rx_arch. + * config.bfd: Add entry for rx-*-elf. + * configure.in: Add entries for bfd_elf32_rx_le_vec and + bfd_elf32_rx_be_vec. + * reloc.c: Add RX relocations. + * targets.c: Add RX target vectors. + * Makefile.in: Regenerate. + * bfd-in2.h: Regenerate. + * configure: Regenerate. + * libbfd.h: Regenerate. + * cpu-rx.c: New file. + * elf32-rx.c: New file. + +2009-09-29 M R Swami Reddy + + * elf32-cr16.c (elf32_cr16_relocate_section): Removed + info->relocatable to fix the ld/testsuites/ld-elf/linkonce1 test case. + +2009-09-28 Nick Clifton + + PR 10478: Accepting Solaris binaries. + * elf.c (bfd_section_from_shdr): Allow SHN_BEFORE and SHN_AFTER + section link values in x86 binaries. + * elfcode.h (elf_object_p): Likewise. + +2009-09-28 Philippe De Muyter + + * elf32-m68k.c (elf_m68k_final_write_processing): New function. + (elf_backend_final_write_processing): Macro defined as above function. + +2009-09-25 Martin Thuresson + + Update sources to make alpha and arm targets compile cleanly with + -Wc++-compat: + * ecoff.c: Add casts. + * ecofflink.c: Add casts. + * elf64-alpha.c: Add casts. + (struct alpha_elf_got_entry, struct alpha_elf_reloc_entry): Move + to top level. + (SKIP_HOWTO): Use enum name. + * elf32-arm.c: Add casts. + (elf32_arm_vxworks_bed): Update code to avoid multiple + declarations. + (struct map_stub): Move to top level. + +2009-09-24 H.J. Lu + + PR ld/10630 + * elflink.c (elf_link_output_extsym): Turn off visibility on + local symbol. + (bfd_elf_final_link): Turn off visibility on dynamic local + symbol. + +2009-09-24 Alan Modra + + PR binutils/10654 + * dwarf2.c (lookup_address_in_line_info_table): Remove workaround + for invalid location lists generated by gcc-2.95 and Intel 6.0 C++. + Remove "function" parm, adjust caller. + +2009-09-23 Matt Rice + + * bfd-in.h (bfd_elf_size_dynamic_sections): Add audit and depaudit + arguments. + * elflink.c (bfd_elf_size_dynamic_sections): Generate DT_AUDIT, + DT_DEPAUDIT from audit/depaudit arguments. + (elf_finalize_dynstr): Finalize DT_AUDIT and DT_DEPAUDIT strtab entries. + (elf_link_add_object_symbols): Set dt_audit target data when finding a + DT_AUDIT. + * bfd-in2.h: Regenerate. + * bfd-elf.h: Add dt_audit to elf_obj_tdata, and elf_dt_audit macro. + +2009-09-23 Jie Zhang + + * elf32-bfin.c (_bfinfdpic_size_got_plt): Make sure empty + .rel.plt and .plt sections are removed. + (elf32_bfinfdpic_size_dynamic_sections): Remove empty .dynbss + section. Remove the duplicated removing of empty .rel.plt + section. + +2009-09-21 Richard Sandiford + + * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Extend previous + patch to handle the new personality relaxation. + +2009-09-21 Richard Sandiford + + * elf-eh-frame.c (make_pc_relative): New function. + (_bfd_elf_write_section_eh_frame): Use it. + +2009-09-21 Alan Modra + + * elf32-ppc.c (TLS_GET_ADDR_GLINK_SIZE): Define. + (ADD_3_12_2, BEQLR, CMPWI_11_0, LWZ_11_3, LWZ_12_3): Define. + (MR_0_3, MR_3_0): Define. + (struct ppc_elf_link_hash_table): Add no_tls_get_addr_opt. + (ppc_elf_select_plt_layout): Save emit_stub_syms param earlier. + (ppc_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash + table. Check for presense of __tls_get_addr_opt + (allocate_dynrelocs): Increase glink entry size for __tls_get_addr. + (ppc_elf_size_dynamic_sections): Add DT_PPC_TLS_OPT tag. + (write_glink_stub): Add param p. + (ppc_elf_relocate_section): Adjust write_glink_stub call. + (ppc_elf_finish_dynamic_symbol): Emit special glink call stub for + __tls_get_addr. + * elf32-ppc.h (ppc_elf_tls_setup): Update prototype. + * elf64-ppc.c (struct ppc_link_hash_table): Add no_tls_get_addr_opt. + (ppc64_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash + table. Check for presense of __tls_get_addr_opt. + (ppc64_elf_size_dynamic_sections): Add DT_PPC64_TLS_OPT tag. + (LD_R11_0R3, LD_R12_0R3, MR_R0_R3, CMPDI_R11_0, ADD_R3_R12_R13, + BEQLR, MR_R3_R0, MFLR_R11, STD_R11_0R1, BCTRL, LD_R11_0R1, + LD_R2_0R1, MTLR_R11): Define. + (build_tls_get_addr_stub): New function. + (ppc_build_one_stub): Call it. + (ppc_size_one_stub): Add extra size for __tls_get_addr stub. + (ppc64_elf_relocate_section): Don't change nop to ld 2,40(1) for + __tls_get_addr plt call. + * elf64-ppc.h (ppc64_elf_tls_setup): Update prototype. + +2009-09-19 Richard Sandiford + + * elf-bfd.h (eh_cie_fde): Add personality_offset and + make_per_encoding_relative to the CIE structure. Add a padding field. + * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Use 0x70 + rather than 0xf0 when masking out the base address encoding + Record the offset of personality data from the start of the CIE. + Remove a repeated elf_backend_can_make_relative_eh_frame check. + (find_merged_cie): Take an info argument. If the personality + binds locally, try converting an absolute personality into + a local one. + (_bfd_elf_discard_section_eh_frame): Use 0x70 rather than 0xf0 + when masking out the base address encoding. Update the call to + find_merged_cie. + (_bfd_elf_eh_frame_section_offset): Discard relocations against + the personality data if we are converting into PC-relative form. + (_bfd_elf_write_section_eh_frame): Use 0x70 rather than 0xf0 + when masking out the base address encoding. Handle + make_per_encoding_relative. + +2009-09-18 Alan Modra + + PR ld/10406 + * elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and + R_PPC_EMB_SDA2I16 complain_overflow_signed. + (create_sdata_sym): Pass info rather than htab. + Update all callers. Ensure symbols are hidden. + (ppc_elf_check_relocs): Allow SDAREL16 when shared. + (ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to + _GLOBAL_OFFSET_TABLE_. + (elf_finish_pointer_linker_section): Don't assume that sdata base + symbol is always at 0x8000 offset. Don't subtract the addend here. + (is_static_defined): New function. + (ppc_elf_relocate_section): Verify symbol base used in SDA relocs + is statically defined. Clear addend for EMB_SDAI16 and EMB_SDA2I16 + relocs. Downgrade error on unexpected section for EMB_SDA2REL + reloc symbols to a warning. + +2009-09-18 Nick Clifton + + * po/es.po: Updated Spanish translation. + * po/vi.po: Updated Vietnamese translation. + +2009-09-18 Alan Modra + + * elf64-ppc.c (follow_link, elf_follow_link, ppc_follow_link): New + functions. Use throughout. + (ppc64_elf_copy_indirect_symbol): Set direct symbol "oh" field + from indirect symbol. + (lookup_fdh): Rename from get_fdh. Follow indirect sym links. + (add_symbol_adjust): Simplify. + (defined_code_entry, defined_func_desc): New functions. + (ppc64_elf_gc_keep): Follow indirect sym links. Use defined_code_entry. + (ppc64_elf_gc_mark_dynamic_ref): Use defined_func_desc and + defined_code_entry to follow indirect sym links. + (ppc64_elf_gc_mark_hook, func_desc_adjust): Likewise. + (ppc_type_of_stub): Follow indirect sym links. + (toc_adjusting_stub_needed): Likewise. + (ppc_build_one_stub): Likewise. Make undefined dot-symbols weak + rather than defining them at stub. + (ppc64_elf_relocate_section): Rewrite call test to avoid multiple + assignments in test. + +2009-09-16 Tristan Gingold + + * mach-o.h (bfd_mach_o_filetype): Add new constants from darwin10. + Reindent. + * mach-o.c (bfd_mach_o_cpu_name): Reindent. + (bfd_mach_o_filetype_name): Complete with new constants. Reindent. + (bfd_mach_o_print_private_header): Use fputs instead of fprintf + when possible to avoid warnings. + (bfd_mach_o_print_section_map): Ditto. + (bfd_mach_o_section_get_entry_size): New function. + (bfd_mach_o_section_get_nbr_indirect): Simplify using the newly + added function. + (bfd_mach_o_print_dysymtab): Print address of indirect symbols. + +2009-09-14 Nick Clifton + + * po/fi.po: Updated Finnish translation. + +2009-09-11 Nick Clifton + + * po/bfd.pot: Updated by the Translation project. + +2009-09-11 Philippe De Muyter + + * binary.c (binary_object_p): Remove bfd_external_binary_architecture + hack. objcopy `-B' (`--binary-architecture') option is now handled + in a generic way. + +2009-09-11 Nick Clifton + + * rs6000-core.c (read_hdr): Fix typo in recent C++ compatibility + changes. + +2009-09-11 Jie Zhang + + * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return + NULL if `ht' is NULL. + +2009-09-09 Martin Thuresson + + Update sources to compile cleanly with -Wc++-compat: + * aoutx.h: Add casts. + * archive.c: Add casts. + * archive64.c: Add casts. + * archures.c: Add casts. + * bfd-in2.h: Regenerated. + * bfd.c: Add casts. (enum bfd_direction): Move out to top level. + * bfdio.c: Add casts. + * binary.c: Add casts. + * cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated + parameter to use enum value instead of int. + * coffcode.h: Add casts. + * coffgen.c: Add casts. + * cofflink.c: Add casts. + * compress.c: Add casts. + * dwarf1.c: Add casts. + * dwarf2.c: Add casts. (struct dwarf2_debug): Rename member bfd to + bfd_ptr. Update code to use new name. + * elf-attrs.c: Add casts. + * 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. + * elf-eh-frame.c: Add casts. + * elf-strtab.c: Add casts. + * elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change + argument name from typename to type_name. + * elf32-i386.c: Add casts. + * elf64-x86-64.c: Add casts. + * elfcode.h: Add casts. + * elfcore.h: Add casts. + * elflink.c: Add casts. + * format.c: Add casts. + * hash.c: Add casts. + * ihex.c: Add casts. + * libaout.h (enum aout_subformat, enum aout_magic): Move to top + level. + * libbfd.c: Add casts. + * linker.c: Add casts. + * merge.c: Add casts. + * opncls.c: Add casts. + * peXXigen.c: Add casts. + * peicode.h: Add casts. + * reloc.c: Add casts. + * section.c: Add casts. + * simple.c: Add casts. + * srec.c: Add casts. + * stabs.c: Add casts. + * syms.c: Add casts. + * targets.c: Add casts. + * tekhex.c: Add casts. + * verilog.c: Add casts. + +2009-09-09 Paolo Bonzini + + * configure: Regenerate. + +2009-09-09 Daniel Jacobowitz + + * elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags + for the mode of target PLT entries. + (allocate_dynrelocs): Only adjust symbol type if setting its + value. + +2009-09-09 Paolo Bonzini + + * configure: Regenerate. + +2009-09-09 Nick Clifton + + PR 10478: + * elf.c (bfd_section_from_shdr): Do not reject sparc binaries with + section headers containing sh_link values of SHN_BEFORE or + SHN_AFTER. + * elfcode.h (elf_object_p): Likewise. + +2009-09-09 Tristan Gingold + + Handle DYLD_INFO introduced by Darwin10. + * mach-o.h (bfd_mach_o_load_command_type): Add + BFD_MACH_O_LC_DYLD_INFO. + (bfd_mach_o_dyld_info_command): New type. + (bfd_mach_o_load_command): Add dyld_info field. + * mach-o.c (bfd_mach_o_scan_read_str): Reduce size of buf. + (bfd_mach_o_scan_read_dyld_info): New function. + (bfd_mach_o_scan_read_command): Handle BFD_MACH_O_LC_DYLD_INFO. + (bfd_mach_o_bfd_print_private_bfd_data): Ditto. + (bfd_mach_o_load_command_name): AddB FD_MACH_O_LC_DYLD_INFO. + (bfd_mach_o_print_dyld_info): New function. + +2009-09-09 M R Swami Reddy + + * elf32-cr16.c (elf32_cr16_relocate_section): Add code to discard the + linkonce or linker script discarded section. + +2009-09-09 Alan Modra + + * elf32-xtensa.c (elf_xtensa_relax_section): Delete -r check. + +2009-09-07 Andreas Schwab + + * elf32-m68k.c (rtype_to_howto): If the reloc index is out of + range call the bfd error hander and use R_68K_NONE instead. + +2009-09-07 Tristan Gingold + + * po/SRC-POTFILES.in: Regenerate. + * po/bfd.pot: Regenerate. + + * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER, + BFD_HAVE_SYS_STAT_TYPE_MEMBER): Moved to gas/acinclude.m4 + * configure.in: Move tests for tm_gmtoff, st_mtim.tv_sec and + st_mtim.tv_nsec to gas/configure.in + (bfd_elf64_ia64_vms_vec): Remove vmsutil.lo + * configure: Regenerate. + * config.in: Regenerate. + * vmsutil.c: Moved to gas/config/te-vms.c + * vmsutil.h: Removed. + * Makefile.am (BFD32_BACKENDS_CFILES): Remove vmsutil.c + (BFD32_BACKENDS): Remove vmsutil.lo + * Makefile.in: Regenerate. + +2009-09-05 Eli Zaretskii + + * coffcode.h: Include libiberty.h. + +2009-09-05 Martin Thuresson + + * coff-arm.c (coff_arm_relocate_section) + (record_thumb_to_arm_glue, bfd_arm_process_before_allocation): + Change member name class to symbol_class. + * coff-i960.c (coff_i960_relocate_section) Rename variable + class to class_val. Change member name class to symbol_class. + * coff-rs6000.c (_bfd_xcoff_swap_aux_in) + (_bfd_xcoff_swap_aux_out): Rename arguments class to in_class. + * coff-stgo32.c (adjust_aux_in_post) + (adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class + to in_class. + * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in) + (_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class. + * coffcode.h (coff_pointerize_aux_hook): Rename variable class + to n_sclass. + * coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename + variables named class to n_sclass. (coff_write_symbols): Rename + variable class to sym_class. (bfd_coff_set_symbol_class): Rename + argument class to symbol_class. + * cofflink.c (_bfd_coff_link_hash_newfunc) + (coff_link_add_symbols, _bfd_coff_link_input_bfd) + (_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section): + Update code to use renamed members. + * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename + argument class to in_class. + * libcoff-in.h (struct coff_link_hash_entry, struct + coff_debug_merge_type) Renamed members class to symbol_class and + type_class. + * libcoff.h Regenerated. + * peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out): + Rename argument class to in_class. + * pef.c (bfd_pef_parse_imported_symbol): Update code to use + renamed members. + * pef.h (struct bfd_pef_imported_symbol): Changed name of + member class to symbol_class. + +2009-09-04 H.J. Lu + + * configure: Regenerated. + +2009-09-04 Tristan Gingold + + * configure.in: Bump version to 2.20.51 + +2009-09-04 Alan Modra + + * elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic. + +2009-09-04 Jie Zhang + + * elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always + create .rela.bss. + (elf32_bfinfdpic_size_dynamic_sections): Set SEC_EXCLUDE flag + for empty .rela.bss and .rel.plt sections. + +2009-09-03 Adam Nemet + + * elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate + R_MIPS_JALR unless symbol resolves locally. + +2009-09-03 Adam Nemet + + * elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't set + has_static_relocs for R_MIPS_JALR. + +2009-09-03 Maciej W. Rozycki + + * elf64-mips.c (mips_elf64_howto_table_rela): Add support for + R_MIPS_TLS_DTPMOD64 and R_MIPS_TLS_TPREL64, replacing the + respective stubs. + +2009-09-01 H.J. Lu + + * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare + plt earlier. + +2009-09-01 Tristan Gingold + + * makefile.vms: Ported to Itanium VMS. Remove useless variable and + dependencies. Reindent. + * configure.com: Ported to Itanium VMS. Now generates a build.com + to build without make. Add messages but make edit silent. + * hosts/alphavms.h: Add a prototype for stpcpy. + * vms.c: Add a missing include for Alpha VMS. + * elfxx-ia64.c (ELF_OSABI): Define for OpenVMS. + +2009-08-31 Jan Beulich + + * elf-bfd.h (bfd_elf_get_default_section_type): Declare. + * elf.c (bfd_elf_get_default_section_type): New. + (elf_fake_sections): Use bfd_elf_get_default_section_type. + +2009-08-30 H.J. Lu + + * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the + accidental checkin. + * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likwise. + +2009-08-30 Alan Modra + + PR ld/10569 + * bfd.c (bfd_emul_get_maxpagesize): Don't abort. + (bfd_emul_get_commonpagesize): Likewise. + +2009-08-29 Martin Thuresson + + * elf32-arm.c (struct stub_def): Rename member template to + template_sequence. (arm_build_one_stub, + find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub): + Rename variable template to template_sequence. + * elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl): + Rename variable template to template_val. + * aoutx.h (NAME (aout, make_empty_symbol)): Rename variable + new to new_symbol. + * coffgen.c (coff_make_empty_symbol) + (coff_bfd_make_debug_symbol): Rename variable new to new_symbol. + * cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable + new to new_insn. + * ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new + to new_symbol. + * elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument + new to new_reloc. + * hash.c (bfd_hash_lookup): Rename variable new to new_string. + * ieee.c (ieee_make_empty_symbol): Rename variable new to + new_symbol. + * linker.c (bfd_new_link_order): Rename variable new to + new_lo. + * mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to + symbol. + * oasys.c (oasys_make_empty_symbol): Rename variable new to + new_symbol_type. + * pdp11.c (NAME (aout, make_empty_symbol)): Rename variable + new to new_symbol_type. + * plugin.c (bfd_plugin_make_empty_symbol): Rename variable new + to new_symbol. + * rs6000-core.c (CoreHdr, VmInfo): Rename union member new to + new_dump. + (read_hdr, rs6000coff_core_p) + (rs6000coff_core_file_matches_executable_p) + (rs6000coff_core_file_failing_command) + (rs6000coff_core_file_failing_signal): Updated function to use new + union member name. + * som.c (som_make_empty_symbol): Rename variable new to + new_symbol_type. + * syms.c (_bfd_generic_make_empty_symbol): Rename variable new + to new_symbol. + * tekhex.c (first_phase, tekhex_make_empty_symbol): Rename + variable new to new_symbol. + +2009-08-27 Ralf Wildenhues + + * acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for + bfdlibdir and bfdincludedir. + * Makefile.am (bfdlibdir, bfdincludedir): Move definition ... + [INSTALL_LIBBFD]: ... here, ... + [INSTALL_LIBBFD]: ... and empty overrides here. + [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable. + [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it. + * Makefile.in: Regenerate. + * configure: Regenerate. + +2009-08-26 Maxim Kuvyrkov + + * elf32-m68k.c: Rewrite initialization of GOT entries for TLS + relocations. Rewrite output of dynamic TLS relocations. + (DTP_OFFSET, TP_OFFSET): New constants. + (dtpoff_base): Update. + (tpoff): Rename to tpoff_base, update. + (elf_m68k_init_got_entry_static, elf_m68k_init_got_entry_local_shared): + New functions. Move code from elf_m68k_relocate_section here. + (elf_m68k_relocate_section): Update. + (elf_m68k_finish_dynamic_symbol): Fix handling of local TLS symbols. + +2009-08-26 Maxim Kuvyrkov + + * elf32-m68k.c (elf_m68k_copy_indirect_symbol): Propagate + non_got_ref value. + (elf_m68k_check_relocs): Handle dynamic TLS relocations. + Handle non_got_ref field. + (elf_m68k_adjust_dynamic_symbol): Handle non_got_ref field. + +2009-08-26 Alan Modra + + PR ld/10518 + * linker.c (bfd_find_version_for_sym): Revert warning. + +2009-08-26 Alan Modra + + PR ld/10518 + * linker.c (bfd_find_version_for_sym): Override a "*" match by any + other wildcard match. Warn on multiple wildcard matches. + +2009-08-22 Ralf Wildenhues + + * Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow + appending. + [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set + only in this condition. + [!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New, + to build but not install libbfd.la in this condition. + (install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES) + (install_libbfd, install_libbfd): Remove. + * Makefile.in: Regenerate. + * doc/Makefile.am (AM_CPPFLAGS): Renamed from ... + (INCLUDES): ... this. + ($(MKDOC)): Adjust. + * doc/Makefile.in: Regenerate. + + * Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, instead use + no-dist and foreign. + (EXTRA_libbfd_la_SOURCES): New, list $(CFILES) to allow + dependency tracking to work for them. + (targets.lo, archures.lo, dwarf.lo): Rewrite to + use automake dependency tracking mechanism. + (MKDEP, DEP, DEP1, dep.sed, dep, dep-in, dep-am): Remove. + (mkdep section): Remove. + (BUILT_SOURCES): New, list $(BUILD_HFILES). + * Makefile.in: Regenerate. + * po/SRC-POTFILES.in, po/bfd.pot: Regenerate. + + * Makefile.am (datarootdir, docdir, htmldor, pdfdir) + (install-pdf, install-pdf-recursive, install-html) + (install-html-recursive): Remove. + * Makefile.in: Regenerate. + + * Makefile.in: Regenerate. + * aclocal.m4: Likewise. + * config.in: Likewise. + * configure: Likewise. + +2009-08-21 Daniel Gutson + + * elf32-arm.c (arch_has_thumb2_nop): New function. + (arch_has_arm_nop): New function. + (elf32_arm_final_link_relocate): NOP opcodes changed. + +2009-08-16 Doug Evans + + * opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec, + at least don't leak memory. + +2009-08-13 DJ Delorie + + * elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes + if needed. + +2009-08-12 Nick Clifton + + * po/fi.po: Updated Finnish translation. + +2009-08-11 Bernd Schmidt + + Merge some FRV FDPIC changes into the Blackfin code. + * elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to + summary reloc information. + (bfinfdpic_dynamic_got_plt_info): New. + (_bfin_create_got_section): Create the PLT section here. + (elf32_bfinfdpic_create_dynamic_sections): Not here. + (_bfinfdpic_count_nontls_entries): Move out of... + (_bfinfdpic_count_got_plt_entries): ... here. + (_bfinfdpic_count_relocs_fixups): Likewise. + (_bfinfdpic_reset_got_plt_entries): New. + (_bfinfdpic_size_got_plt): Move out of... + (elf32_bfinfdpic_size_dynamic_sections): ... here. + (bfinfdpic_relocate_section): Be careful not to call + _bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs. + (bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info): + New functions. + (elf_backend_discard_info): Define for FD-PIC. + +2009-08-11 Alan Modra + + * elflink.c: Add FIXMEs for some places that require octets_per_byte + adjustments. + * elf-eh-frame.c: Likewise. + * merge.c: Likewise. + +2009-08-11 Alan Modra + + * configure.in: Remove elf-ifunc.lo from common ELF files. Add + to x86 and x86_64 configurations. + * configure: Regenerate. + +2009-08-10 Jan Kratochvil + + Stop using bfd_usrdata in libbfd. + * coff-stgo32.c (bfd_coff_go32stub): Remove. + (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE. + (adjust_filehdr_in_post): Declare the abfd parameter as unused. + Replace STUBSIZE by GO32_STUBSIZE. Save now the stub in + filehdr_dst->u.go32.stub. New comment with the reason. + (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE. + Substitute the removed macro bfd_coff_go32stub. + (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre) + (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre) + (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE. + (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data): + Replace STUBSIZE by GO32_STUBSIZE. Substitute the removed macro + bfd_coff_go32stub. + * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub. + * libcoff-in.h (coff_data_type): New field go32stub. + * libcoff.h: Regenerated. + +2009-08-10 Jan Kratochvil + + Fix go32 stub preservation by objcopy. + * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc. + (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD + go32stub. + +2009-08-10 Nathan Sidwell + + * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local + symbols. + (elf32_arm_final_link_relocate): Treat local undefined symbols the + same as global undefined symbols. + (elf32_arm_relocate_section): Give an error for local undefined + non-weak symbols, unless the reloc will not use the symbol. + +2009-08-10 Nathan Sidwell + + * elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11. + (ppc_elf_relax_section): Use symbol index to distinguish + relocatable stubs. + +2009-08-10 Alan Modra + + * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections. + +2009-08-10 Alan Modra + + * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt + info for STT_GNU_IFUNC. + * elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry + on got refs in case the symbol turns out to be ifunc. + (ppc_elf_gc_sweep_hook): Similarly. + (ppc_elf_adjust_dynamic_symbol): Adjust assertion. + (allocate_dynrelocs): Don't specially allocate got relocs for ifunc. + (ppc_elf_size_dynamic_sections): Likewise. + (ppc_elf_relocate_section): Likewise. + +2009-08-09 Bernd Schmidt + + From Mike Frysinger + * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs, + bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook, + _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section, + bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs, + bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs): + Adjust to match the renamed reloc definitions. + +2009-08-08 Alan Modra + + PR 10494 + * elf.c (_bfd_elf_make_section_from_shdr): When setting up section + LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers. + +2009-08-07 Tom Tromey + + * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict + aliasing error. + +2009-08-06 Michael Eager + + * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}. + * Makefile.in: Regenerate. + * archures.c: Add bfd_arch_microblaze. + * bfd-in2.h: Regenerate. + * config.bfd: Add microblaze target. + * configure.in: Add bfd_elf32_microblaze_vec target. + * configure: Regenerate. + * cpu-microblaze.c: New. + * elf32-microblaze.c: New. + * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc(). + * libbfd.h: Regenerate. + * reloc.c: Add MICROBLAZE relocations. + * section.c: Add struct relax_table and relax_count to section. + * targets.c: Add bfd_elf32_microblaze_vec. + +2009-08-06 Jakub Jelinek + Alan Modra + + PR binutils/10492 + * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE + symbols. + * elf32-mips.c (mips_elf_sym_is_global): Likewise. + * elfn32-mips.c (mips_elf_sym_is_global): Likewise. + +2009-08-06 Nathan Sidwell + + * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again + at least once when fixing cortex-a8. + +2009-08-05 Chao-ying Fu + + * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR. + * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL + for CPUs. It is true for RM9000. + (JALR_TO_BAL_P): New define to transform JALR to BAL. It is true + for all CPUs. + (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P + to guard the transformation. + +2009-08-05 Trevor Smigiel + + * elf32-spu.h (spu_elf_params): Add member emit_fixups. + (spu_elf_size_sections): Declare prototype. + * elf32-spu.c (spu_link_hash_table): Add member sfixup. + (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros. + (spu_elf_emit_fixup): New function. + (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32. + (spu_elf_size_sections): New function. + +2009-08-05 Nathan Sidwell + + * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm. + (arm_build_one_stub): Build a8 veneers as a separate pass. + (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p + parameters. Use them to check if we create a different a8 fixup + than the previous pass. + (elf32_arm_size_stubs): Move scope of stub_changed and + prev_num_a8_fixes into main loop. + (elf32_arm_build_stubs): Build a8 veneers in a second pass. + +2009-08-04 Alan Modra + + * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under + which find_plt_ent is called. Delete redundant code. + +2009-08-03 H.J. Lu + + PR binutils/10363 + * elf.c (bfd_elf_string_from_elf_section): Return NULL on + invalid string offset. + +2009-08-03 H.J. Lu + + PR ld/10433 + * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got + to htab->init_got_offset and plt to htab->init_plt_offset + when discarding space for dynamic relocations. + +2009-08-03 Alan Modra + + * elf32-ppc.c (struct plt_entry): Revise comments. + (ppc_elf_check_relocs): Don't create needless plt_entry info + for non-pie executables. Don't test info->pie when info->shared + already covers that case. + (ppc_elf_gc_sweep_hook): Adjust for above change. + (add_stub_sym): Don't test info->pie when info->shared tested. + (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise. + (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise. + (ppc_elf_relax_section): Adjust find_plt_ent arguments. + (ppc_elf_relocate_section): Likewise. + +2009-08-03 Alan Modra + + * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count + for local ifunc symbols in non-pie executables, regardless of + reloc type. Don't specially create ifunc dyn relocs. Tidy ifunc + code so that it's obvious that we only do anything special for + local ifunc syms. + (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes. + (allocate_dynrelocs): Correct comment for syms defined in plt. + Don't specially allocate ifunc dyn relocs. + (ppc_elf_relax_section): Relax branches to ifunc plt entries too. + (ppc_elf_relocate_section): Set "relocation" value for ifunc + syms in non-pie executables. No specially allocated dyn relocs + for ifunc to write. Allow for local sym on R_PPC_RELAX32_PLT. + (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in + a non-pie executable. + +2009-08-02 H.J. Lu + Jakub Jelinek + + PR ld/6443 + * elf32-i386.c (elf_i386_tls_transition): Check executable + instead of shared for TLS when building PIE. + (elf_i386_check_relocs): Likewise. + (elf_i386_allocate_dynrelocs): Likewise. + (elf_i386_relocate_section): Likewise. + + * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable + instead of shared for TLS when building PIE. + (elf64_x86_64_check_relocs): Likewise. + (elf64_x86_64_allocate_dynrelocs): Likewise. + (elf64_x86_64_relocate_section): Likewise. + +2009-07-31 Anthony Green + + * config.bfd (targ_cpu): Add moxie-uclinux support. + +2009-07-31 Hans-Peter Nilsson + + * linker.c (fix_syms): Consider SEC_LOAD when choosing section. + +2009-07-30 Alan Modra + + * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections + used by indirect function support. Count dynamic relocs for + ifunc syms. + (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc. + (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries + in iplt and their relocs in reliplt. Don't make ifunc syms + dynamic. Allocate got entry relocs for non-dynamic ifunc in + reliplt. Handle other dynamic relocs for ifunc. + (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static + ifunc in reliplt, likewise relocs for got against local ifunc. + Typo fix on reliplt size adjust. + (ppc_elf_relocate_section): Don't use plt scheme of allocating + relocs 1-1 with entries for iplt, instead just add using + reloc_count. Write got relocs and dyn relocs for ifunc to reliplt. + Error on invalid ifunc dyn relocs. + (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt + in iplt/reliplt. + * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL, + R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA. + (ppc64_elf_reloc_type_lookup): Handle new relocs. + (ppc64_elf_check_relocs): Likewise. Count dyn relocs for ifunc. + (allocate_dynrelocs): As for elf32-ppc.c above. + (ppc64_elf_size_dynamic_sections): Likewise. + (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt, + and their relocs in reliplt. Use R_PPC64_JMP_IREL. + (ppc_size_one_stub): Similarly. + (ppc64_elf_relocate_section): As for elf32-ppc.c above. Handle new + relocs too. + (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above. + +2009-07-29 Hans-Peter Nilsson + + * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27 + change. Add note to head comment. + +2009-07-28 Jan Beulich + + * archive.c (get_extended_arelt_filename): Remove redundant + range check on index. + +2009-07-27 Doug Kwan + + * elf32-arm.c (stub_hash_newfunc): Initialize field output_name. + +2009-07-27 H.J. Lu + + * archures.c bfd_*_arch): Sorted. + (bfd_archures_list): Likewise. + +2009-07-27 M R Swami Reddy + + * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle + to R_cr16_NUM32 relocation. + +2009-07-26 Michael Eager + + * archures.c: Add bfd_mach_ppc_405 + * bfd-in2.h: Same. + +2009-07-25 H.J. Lu + + * cpu-i386.c (bfd_x86_64_arch): Fix comment typos. + * cpu-l1om.c (bfd_l1om_arch): Likewise. + +2009-07-25 H.J. Lu + + * archures.c (bfd_architecture): Add bfd_arch_l1om. + (bfd_l1om_arch): New. + (bfd_archures_list): Add &bfd_l1om_arch. + * bfd-in2.h: Regenerated. + + * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if + bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec + if bfd_elf64_x86_64_freebsd_vec is supported. + (targ_selvecs): Likewise. + + * configure.in: Support bfd_elf64_l1om_vec and + bfd_elf64_l1om_freebsd_vec. + * configure: Regenerated. + + * cpu-l1om.c: New. + + * elf64-x86-64.c (elf64_l1om_elf_object_p): New. + (bfd_elf64_l1om_vec): Likewise. + (bfd_elf64_l1om_freebsd_vec): Likewise. + + * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo. + (ALL_MACHINES_CFILES): Add cpu-l1om.c. + * Makefile.in: Regenerated. + + * targets.c (bfd_elf64_l1om_vec): New. + (bfd_elf64_l1om_freebsd_vec): Likewise. + (_bfd_target_vector): Add bfd_elf64_l1om_vec and + bfd_elf64_l1om_freebsd_vec. + +2009-07-24 Trevor Smigiel + Alan Modra + + * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC. + (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC. + (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC. + +2009-07-23 H.J. Lu + + PR ld/10434 + * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable + instead of shared for R_X86_64_TPOFF32. + (elf64_x86_64_relocate_section): Likewise. + +2009-07-23 Ulrich Drepper + + * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field. + * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols + with the BSF_GNU_UNIQUE flag bit set. + * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag + for symbols with STB_GNU_UNIQUE binding. + * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols + with the STB_GNU_UNIQUE binding. + (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for + symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for + symbols with the unique_global field set. + (elf_link_output_extsym): Set unique_global field for symbols with + the STB_GNU_UNIQUE binding. + * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit. + (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE + symbols. + (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE + symbols. + * bfd-in2.h: Regenerate. + +2009-07-22 H.J. Lu + + * elflink.c (elf_link_output_extsym): Revert the last change. + +2009-07-22 H.J. Lu + + PR ld/10433 + * elflink.c (elf_link_output_extsym): Special case ifunc syms + when ref_regular, not def_regular. + +2009-07-21 H.J. Lu + + PR ld/10426 + * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol + from a DSO into a normal FUNC symbol. + (elf_link_output_extsym): Turn an undefined IFUNC symbol into + a normal FUNC symbol. + +2009-07-17 Chao-ying Fu + + * elfxx-mips.c (LOAD_INTERLOCKS_P): New define. + (_bfd_mips_elf_size_dynamic_sections): For CPUs without load + interlocking, the last PLT entry needs a nop in the branch delay slot. + (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking, + output the last two PLT entries in reverse order. + +2009-07-16 H.J. Lu + + * elf32-i386.c (elf_i386_relocate_section): Don't get local + STT_GNU_IFUNC symbol for relocatable link. + * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. + +2009-07-10 H.J. Lu + + * bfdio.c (bfd_iovec): Add comments for bmmap. + * bfd-in2.h: Regenerated. + +2009-07-10 H.J. Lu + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerated. + +2009-07-10 Doug Kwan + + * elf32-arm.c (stub_hash_newfunc): Initialize fields + target_addend and orig_insn. + +2009-07-10 Tom Tromey + + * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h. + (elf-eh-frame.lo): Likewise. + (elf32-bfin.lo): Likewise. + (elf32-frv.lo): Likewise. + (elf32-xc16x.lo): Likewise. + * Makefile.in: Rebuild. + * dwarf2.c: Included dwarf.h, not elf/dwarf2.h. + * elf-eh-frame.c: Likewise. + * elf32-bfin.c: Likewise. + * elf32-frv.c: Likewise. + * elf32-xc16x.c: Likewise. + +2009-07-10 Julian Brown + + * elf32-arm.c (arm_build_one_stub): Use the hash entry of the + symbol a stub entry is derived from, not the entry for the stub + itself, in call to elf32_arm_final_link_relocate. + +2009-07-10 H.J. Lu + + * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros + when reporting addends. + +2009-07-10 Alan Modra + + * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager + data even when no stubs. + (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust. + +2009-07-10 Alan Modra + + * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE. + (ppc_elf_get_synthetic_symtab): Report addend. + (PLT_IFUNC): Define. + (struct ppc_elf_link_hash_table): Add iplt and reliplt. + (ppc_elf_create_glink): New function. + (ppc_elf_create_dynamic_sections): Use it. + (ppc_elf_add_symbol_hook): Set has_ifunc_symbols. + (update_local_sym_info): Allocate space for local_plt array. + Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt + entry pointer. + (is_branch_reloc): New function. + (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols. + (ppc_elf_gc_sweep_hook): Likewise. + (ppc_elf_adjust_dynamic_symbol): Likewise. + (allocate_dynrelocs): Likewise. + (ppc_elf_size_dynamic_sections): Likewise. + (ppc_elf_relocate_section): Likewise. + (branch_reloc_hash_match): Use is_branch_reloc. + (ppc_elf_tls_optimize): Adjust for local_plt. + (write_glink_stub): New function, extracted from.. + (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC. + (ppc_elf_finish_dynamic_sections): Only write plt resolver and + branch table when dynamic. + (elf_backend_post_process_headers): Define. + * elf64-ppc.c (elf_backend_post_process_headers): Define. + (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE. + (ppc64_elf_get_synthetic_symtab): Report addend. + (struct ppc_stub_hash_entry): Add plt_ent. + (PLT_IFUNC): Define. + (struct ppc_link_hash_table): Add iplt and reliplt. + (create_linkage_sections): Make .iplt and .rela.iplt sections. + (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols. + (update_local_sym_info): Allocate space for local_plt array. + Don't bump local_got_ents for PLT_IFUNC. Return local_plt + entry pointer. + (update_plt_info): Pass pointer to plt_entry rather than sym hash, + and don't change hash flags here. + (is_branch_reloc): New function. + (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC. + (ppc64_elf_gc_sweep_hook): Likewise. + (ppc64_elf_adjust_dynamic_symbol): Likewise. + (allocate_dynrelocs): Likewise. + (ppc64_elf_size_dynamic_sections): Likewise. + (ppc_build_one_stub, ppc_size_one_stub): Likewise. + (ppc64_elf_size_stubs): Likewise. + (ppc64_elf_relocate_section): Likewise. + (get_sym_h): Adjust for local_plt. + (branch_reloc_hash_match): Use is_branch_reloc. + (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc. + (ppc64_elf_toc): Ignore SEC_EXCLUDE sections. + +2009-07-10 Alan Modra + + * elf.c (_bfd_elf_get_synthetic_symtab): Report addends. + +2009-07-10 Alan Modra + + * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular + and ref_regular_nonweak comment. + * elflink.c (elf_link_output_extsym): Special case ifunc syms + when def_regular, not ref_regular. + (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,.. + * elf32-i386.c (elf_i386_check_relocs): ..set it here instead.. + * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here. + +2009-07-09 Alan Modra + + * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field + of malloc'd struct call_info. + (pasted_function): Likewise, priority too. + +2009-07-07 Alan Modra + + * elf32-spu.c (spu_elf_auto_overlay): Take into account section + alignment when packing sections into overlays. + +2009-07-03 Cary Coutant + + * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator. + +2009-07-03 Dave Korn + + * coffcode.h (sec_to_styp_flags): Partially revert (functional + changes only) earlier patch:- + +2009-06-25 Kai Tietz + + * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and + give .debug and .reloc data characteristics. + (DOT_RELOC): New define for .reloc section string. + (coff_write_object_contents): Use DOT_RELOC instead of string. + +2009-07-02 Tom Tromey + + * aoutx.h (aout_get_external_symbols): Declare 'amt' locally. + * bfdwin.c (bfd_free_window): Cast to unsigned long. + +2009-07-01 Nick Clifton + + * elf-m10300.c: Remove trailing white space. + * reloc.c: Likewise. + +2009-07-01 Douglas B Rupp + + * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER, + BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions. + * configure.in: Use them. + * configure: Regenerate. + * config.in: Regenerate. + * vmsutil.c: Include sysdep.h, remove ansidecl.h. + #define _BSD_SOURCE. Add comments. + (vms_file_stats_name): Calculate creation date based on available + runtime data. Return 1 for version instead of 0. + +2009-07-01 Nick Clifton + + PR 10072 + * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle + to R_ARM_THM_PC8 relocation. + +2009-06-29 Nick Clifton + + * elf-m10300.c (mn10300_elf_relax_section): Allow for the + different uses of the relocations addend when a symbol is in a + merged section. + +2009-06-27 H.J. Lu + + PR ld/10337 + * elf.c (bfd_section_from_shdr): Don't change sh_link for + SHT_REL/SHT_RELA sections on executable nor shared library. + Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF + as a normal section. + +2009-06-25 Nick Clifton + + * elf-m10300.c (mn10300_elf_relax_section): Handle non-section + symbols with SEC_MERGE flag. + +2009-06-25 Kai Tietz + + * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and + give .debug and .reloc data characteristics. + (DOT_RELOC): New define for .reloc section string. + (coff_write_object_contents): Use DOT_RELOC instead of string. + +2009-06-25 Tristan Gingold + + * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound) + (bfd_mach_o_canonicalize_dynamic_symtab) + (bfd_mach_o_get_synthetic_symtab): Defines. + (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry. + (TARGET_NAME): Use Mach-O specific functions for dynamic. + + * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes + for scattered relocations. + (bfd_mach_o_i386_print_thread): New function. + (bfd_mach_o_print_thread): Define. + + * mach-o.c (text_section_names_xlat): Add an entry for __const. + (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs): + New functions extracted from ... + (bfd_mach_o_canonicalize_reloc): ... This. Simplified. + (bfd_mach_o_get_dynamic_reloc_upper_bound): New function. + (bfd_mach_o_canonicalize_dynamic_reloc): New function. + (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming. + (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases. + (bfd_mach_o_scan_read_dylinker): Do not create a section anymore. + Set name_str field. + (bfd_mach_o_scan_read_dylib): Ditto. + (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments, + reindent. + (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly + decode isym and flags on little endian targets. Set dysymtab field. + (bfd_mach_o_scan_start_address): Adjust for enum names. + (bfd_mach_o_lookup_section): Do not look for segments anymore. + (bfd_mach_o_print_section): Display bfd section name. + (bfd_mach_o_print_segment): Display none if no name. + (bfd_mach_o_print_dysymtab): Display next index for local, external + and undefined symbols. + (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str. + Display dylinker name. Display thread and unixthread commands content. + (bfd_mach_o_print_thread): New macro. + + * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers. + (bfd_mach_o_ppc_thread_flavour): Ditto. + (bfd_mach_o_i386_thread_flavour): Ditto. + (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum. + (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces + BFD_MACH_O_THREAD_STATE_NONE. + (bfd_mach_o_segment_command): Remove segment field. + (bfd_mach_o_thread_flavour): Field offset is now unsigned long. + (bfd_mach_o_dylinker_command): Remove section field, add name_str. + (bfd_mach_o_prebound_dylib_command): Ditto. + (bfd_mach_o_dylib_command): Ditto. + (bfd_mach_o_prebound_dylib_command): Remove section field. + (mach_o_data_struct): Add dysymtab field. + (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field. + (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc) + (bfd_mach_o_build_commands): Remove parameter names and attributes. + (bfd_mach_o_get_dynamic_reloc_upper_bound) + (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes. + +2009-06-25 Rafael Avila de Espindola + + * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type + field of struct dirent. + +2009-06-23 Tristan Gingold + + * vms.c (vms_get_synthetic_symtab): Remove duplicate definition + of this macro. Fix indentation. + +2009-06-22 Christophe Lyon + + * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as + destination for defined dynamic symbols when deciding whether to + insert a stub or not. + (allocate_dynrelocs): Make sure functions are not marked as Thumb + when actually accessed through a PLT, even when generating a + shared lib. + +2009-06-22 Tristan Gingold + + * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to + the relocs array. + +2009-06-22 Alan Modra + + * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch. + * elf32-v850.c (v850_elf_relocate_section): Warning fix. + +2009-06-22 Alan Modra + + * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning. + +2009-06-19 H.J. Lu + + * elflink.c (elf_link_add_object_symbols): Avoid warning + from -Wjump-misses-init in gcc 4.5.0. + +2009-06-19 H.J. Lu + + * elf32-i386.c (elf_i386_check_relocs): Properly check local + symbol on error. + * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise. + +2009-06-19 H.J. Lu + + * elf32-i386.c (elf_i386_tls_transition): Add a parameter, + r_symndx. Report local symbol name on error. + (elf_i386_check_relocs): Updated. Report local symbol name on + error. + (elf_i386_gc_sweep_hook): Updated. + (elf_i386_relocate_section): Likewise. + + * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter, + r_symndx. Report local symbol name on error. + (elf64_x86_64_check_relocs): Updated. Report local symbol name + on error. + (elf64_x86_64_gc_sweep_hook): Updated. + (elf64_x86_64_relocate_section): Likewise. + +2009-06-19 Tristan Gingold + + * mach-o.c (bfd_mach_o_print_private_header): Fix format character. + +2009-06-19 Tristan Gingold + + * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype. + (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access. + (bfd_mach_o_valid): Ditto. + (bfd_mach_o_wide_p): Ditto. + (bfd_mach_o_canonicalize_reloc): Ditto. + (bfd_mach_o_build_commands): Ditto. + (bfd_mach_o_scan_read_thread): Ditto. + (bfd_mach_o_flatten_sections): Ditto. + (bfd_mach_o_scan_start_address): Ditto. + (bfd_mach_o_lookup_section): Ditto. + (bfd_mach_o_core_fetch_environment): Ditto. + (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib. + (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data. + (bfd_mach_o_scan_write_symtab): Ditto. + Use macros instead of hard-coded values. + (bfd_mach_o_scan_read_symtab_symbol): Make the function static. + Use bfd_mach_o_get_data instead of direct access. Use macros + instead of hard-coded values. + (bfd_mach_o_scan_read_symtab_strtab): Make the function static. + Remove sym argument and get section from mdata. + Move code into the else branch. + (bfd_mach_o_scan_read_symtab_symbols): Make the function static. + Remove sym argument and get section from mdata. Adjust code. + (bfd_mach_o_scan_read_dylib): Move assertion into the created + switch (which replaces consecutive if statements). + (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load + module table, table of content, indirect symbols and external + referenced symbols. + (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab + field. + (bfd_mach_o_scan_read_linkedit): New function. + (bfd_mach_o_scan_read_str): Ditto. + (bfd_mach_o_count_symbols): Simplify the code by using the symtab + field of mdata. + (bfd_mach_o_get_symtab_upper_bound): Remove check as + bfd_mach_o_count_symbols never returns an error. + (bfd_mach_o_canonicalize_symtab): Simplify the code by using the + symtab field (there might be only one symtab). + (bfd_mach_o_scan_read_command): Handle reexported dylib. + Handle sub frameworks, sub umbrella, sub library and sub client. + Read code signature and segment split info commands. + (bfd_mach_o_scan): Reindent. + (bfd_mach_o_xlat_name): New type. + (bfd_mach_o_print_flags): New function. + (bfd_mach_o_get_name): Ditto. + (bfd_mach_o_cpu_name): New variable. + (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name) + (bfd_mach_o_section_type_name) + (bfd_mach_o_section_attribute_name) + (bfd_mach_o_load_command_name): New variables. + (bfd_mach_o_print_private_header): New function. + (bfd_mach_o_print_section_map): New function extracted from + bfd_mach_o_print_private_bfd_data. + (bfd_mach_o_print_section): Ditto. Print more infos. + (bfd_mach_o_print_segment): Ditto. + (bfd_mach_o_print_dysymtab): Ditto. + (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle + load weak dylib, reexport dylib and id dylib. + Handle code signature and segment_split info. + Handle sub frameworks, sub umbrella, sub library and sub client. + (bfd_mach_o_section_get_nbr_indirect): New function. + + * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment. + (bfd_mach_o_header_flags): New enum to define header flags. + (bfd_mach_o_section_attribute): New enum to replace ... + (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC, + BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG, + BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT, + BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, + BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ... + these removed macros. + (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros. + (bfd_mach_o_dylib_module): New type. + (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New + macros. + (bfd_mach_o_dylib_table_of_content): New type. + (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro. + (bfd_mach_o_dylib_reference): New type. + (BFD_MACH_O_REFERENCE_SIZE): New macro. + (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded + modules, toc, references and indirect syms. + (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro. + (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were + unused). Add comment. + (bfd_mach_o_dylib_command): Ditto. + (bfd_mach_o_prebound_dylib_command): Ditto. + (bfd_mach_o_linkedit_command): New type. + (bfd_mach_o_str_command): New type. + (bfd_mach_o_load_command): Add linkedit and str fields. + (mach_o_data_struct): Add symtab field. + (bfd_get_mach_o_data): Renamed to ... + (bfd_mach_o_get_data): ... this new macro. + (bfd_mach_o_scan_read_symtab_symbol, + bfd_mach_o_scan_read_symtab_strtab, + bfd_mach_o_scan_read_symtab_symbols): Prototypes removed. + + * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data + instead of direct access. + +2009-06-19 Alan Modra + + * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for + R_PPC_PLTREL24 relocs. + (ppc_elf_relocate_section): Likewise. + +2009-06-19 Alan Modra + + * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than + pointer to sym hash. Update all uses. + (update_plt_info): Likewise. Don't check addend here. + +2009-06-18 H.J. Lu + + * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use + bfd_sym_from_r_symndx. + * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise. + +2009-06-18 Alan Modra + + * elf-bfd.h (struct sym_sec_cache): Delete. + (struct sym_cache): New. + (bfd_section_from_r_symndx): Delete prototype. + (bfd_sym_from_r_symndx): Define prototype. + * elf.c (bfd_section_from_r_symndx): Delete, replace with.. + (bfd_sym_from_r_symndx): ..new function. + * elf32-arm.c: Update all uses of struct sym_sec_cache and + bfd_section_from_r_symndx to new struct and function. + * elf32-bfin.c: Likewise. + * elf32-hppa.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-m32r.c: Likewise. + * elf32-m68hc1x.c: Likewise. + * elf32-m68hc1x.h: Likewise. + * elf32-m68k.c: Likewise. + * elf32-ppc.c: Likewise. + * elf32-s390.c: Likewise. + * elf32-sh.c: Likewise. + * elf64-ppc.c: Likewise. + * elf64-s390.c: Likewise. + * elf64-x86-64.c: Likewise. + * elfxx-sparc.c: Likewise. + * elfxx-sparc.h: Likewise. + +2009-06-18 H.J. Lu + + * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf. + * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise. + +2009-06-18 Nick Clifton + + * elflink.c (elf_link_sort_relocs): Return early if there are no + relocs to sort. + +2009-06-18 Dave Korn + + Merge cegcc and mingw32ce target name changes from + CeGCC project: + + 2007-12-25 Pedro Alves + + * config.bfd: Add arm*-*-cegcc* target. + + 2007-12-17 Pedro Alves + + * config.bfd: Add arm-*-mingw32ce* target. + +2009-06-17 H.J. Lu + + * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New. + * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise. + * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it. + * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise. + +2009-06-17 H.J. Lu + + * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New. + * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise. + * elf32-i386.c (elf_i386_check_relocs): Use it. + * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise. + +2009-06-17 H.J. Lu + + * elf-bfd.h (elf_dyn_relocs): New. + + * elf32-i386.c (elf_i386_dyn_relocs): Removed. + (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with + elf_dyn_relocs. + (elf_i386_copy_indirect_symbol): Likewise. + (elf_i386_check_relocs): Likewise. + (elf_i386_gc_sweep_hook): Likewise. + (elf_i386_allocate_dynrelocs): Likewise. + (elf_i386_readonly_dynrelocs): Likewise. + (elf_i386_size_dynamic_sections): Likewise. + + * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed. + (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs + with elf_dyn_relocs. + (elf64_x86_64_copy_indirect_symbol): Updated. + (elf64_x86_64_check_relocs): Likewise. + (elf64_x86_64_gc_sweep_hook): Likewise. + (elf64_x86_64_adjust_dynamic_symbol): Likewise. + (elf64_x86_64_allocate_dynrelocs): Likewise. + (elf64_x86_64_readonly_dynrelocs): Likewise. + (elf64_x86_64_size_dynamic_sections): Likewise. + +2009-06-17 H.J. Lu + + * elf32-arm.c (create_got_section): Get existing .rela.got + section. + * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise. + * elf32-lm32.c (create_got_section): Likewise. + * elf32-m32r.c (create_got_section): Likewise. + * elf32-ppc.c (ppc_elf_create_got): Likewise. + * elf32-s390.c (create_got_section): Likewise. + * elf32-sh.c (create_got_section): Likewise. + * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise. + * elf64-s390.c (create_got_section): Likewise. + * elfxx-sparc.c (create_got_section): Likewise. + + * elflink.c (_bfd_elf_create_got_section): Properly initialize + the GOT size. + +2009-06-16 H.J. Lu + + * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New. + + * elf32-i386.c (elf_i386_local_hash): Removed. + (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH. + (elf_i386_get_local_sym_hash): Likewise. + + * elf64-x86-64.c (elf64_x86_64_local_hash): Removed. + (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH. + (elf64_x86_64_get_local_sym_hash): Likewise. + * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise. + (get_local_sym_hash): Likewise. + +2009-06-16 H.J. Lu + + * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec, + rel_got_sec and plt_sec. + (elfNN_ia64_relax_section): Updated. + (elfNN_ia64_create_dynamic_sections): Likewise. + (get_got): Likewise. + (allocate_dynrel_entries): Likewise. + (elfNN_ia64_size_dynamic_sections): Likewise. + (set_got_entry): Likewise. + (elfNN_ia64_choose_gp): Likewise. + (elfNN_ia64_relocate_section): Likewise. + (elfNN_ia64_finish_dynamic_symbol): Likewise. + (elfNN_ia64_finish_dynamic_sections): Likewise. + +2009-06-16 Ulrich Weigand + + * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits + also for calls. + +2009-06-16 H.J. Lu + + * configure.in (elf): Add elf-ifunc.lo. + + * configure: Regenerated. + * Makefile.in: Likewise. + + * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt, + srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc. + + * elf32-i386.c (elf_i386_link_hash_table): Remove sgot, + sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and + irelifunc. + (elf_i386_link_hash_table_create): Likewise. + (elf_i386_create_dynamic_sections): Likewise. + (elf_i386_check_relocs): Likewise. + (elf_i386_allocate_dynrelocs): Likewise. + (elf_i386_size_dynamic_sections): Likewise. + (elf_i386_relocate_section): Likewise. + (elf_i386_finish_dynamic_symbol): Likewise. + (elf_i386_finish_dynamic_sections): Likewise. + (elf_i386_create_got_section): Removed. + + * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot, + sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and + irelifunc. + (elf64_x86_64_compute_jump_table_size): Updated. + (elf64_x86_64_link_hash_table_create): Likewise. + (elf64_x86_64_create_dynamic_sections): Likewise. + (elf64_x86_64_check_relocs): Likewise. + (elf64_x86_64_allocate_dynrelocs): Likewise. + (elf64_x86_64_size_dynamic_sections): Likewise. + (elf64_x86_64_relocate_section): Likewise. + (elf64_x86_64_finish_dynamic_symbol): Likewise. + (elf64_x86_64_finish_dynamic_sections): Likewise. + (elf64_x86_64_create_got_section): Removed. + + * elflink.c (_bfd_elf_create_got_section): Use log_file_align + for pointer alignment. Set up section pointers. + (_bfd_elf_create_dynamic_sections): Likewise. + (_bfd_elf_create_ifunc_sections): Moved to ... + * elf-ifunc.c: Here. New. + + * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo. + (BFD32_BACKENDS_CFILES): Add elf-ifunc.c. + Run "make dep-am". + +2009-06-16 Doug Kwan + + * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset + to bfd_signed_vma. Cast constant operands which are used in + offset related expressions to bfd_signed_vma type as appropriate. + +2009-06-16 Maciej W. Rozycki + + * elf32-vax.c (elf_vax_plt_sym_val): New function. + (elf_backend_plt_sym_val): Define. + +2009-06-16 Maciej W. Rozycki + + * elf32-vax.c (elf_vax_reloc_type_class): New function. + (elf_backend_reloc_type_class): Define. + +2009-06-16 Maciej W. Rozycki + + * elf32-vax.c (elf_vax_relocate_section): For symbol references + from an executable to a shared library treat R_VAX_PC32 + relocations as R_VAX_PLT32 ones. + +2009-06-16 Maciej W. Rozycki + + * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local + symbols in GOT space calculation. + (elf_vax_relocate_section): Adjust accordingly. + +2009-06-16 Maciej W. Rozycki + + * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to + include . + +2009-06-16 Maciej W. Rozycki + + * elf32-vax.c (elf_vax_check_relocs): Handle the visibility + attribute. + (elf_vax_relocate_section): Likewise. + +2009-06-15 H.J. Lu + + * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments. + * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise. + +2009-06-15 H.J. Lu + + * elf32-i386.c (elf_i386_check_relocs): Reformat. + * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise. + +2009-06-15 H.J. Lu + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerated. + +2009-06-15 H.J. Lu + + * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo. + * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise. + +2009-06-15 Nick Clifton + + * po/ru.po: New Russian translation. + * configure.in (ALL_LINGUAS): Add ru. + * configure: Regenerate. + +2009-06-14 H.J. Lu + + * elf32-i386.c: Remove duplicated comments. + +2009-06-14 H.J. Lu + + PR ld/10270 + * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow + dynamic IFUNC pointer in non-shared object. Use .got.plt + for IFUNC definition in PIE. + (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in + PIE locally. + + * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow + dynamic IFUNC pointer in non-shared object. Use .got.plt + for IFUNC definition in PIE. + (elf64_x86_64_relocate_section): Resolve IFUNC definition in + PIE locally. + +2009-06-13 H.J. Lu + + * elf32-i386.c (elf_i386_check_relocs): Properly report + local symbol for unhandled relocation against STT_GNU_IFUNC + symbol. + (elf_i386_relocate_section): Likewise. + * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise. + (elf64_x86_64_relocate_section): Likewise. + +2009-06-13 H.J. Lu + + PR ld/10269 + * elf32-i386.c: Include "objalloc.h" and "hashtab.h". + (elf_i386_link_hash_table): Add loc_hash_table and + loc_hash_memory. + (elf_i386_local_hash): New. + (elf_i386_local_htab_hash): Likewise. + (elf_i386_local_htab_eq): Likewise. + (elf_i386_get_local_sym_hash): Likewise. + (elf_i386_link_hash_table_free): Likewise. + (elf_i386_allocate_local_dynrelocs): Likewise. + (elf_i386_finish_local_dynamic_symbol): Likewise. + (bfd_elf64_bfd_link_hash_table_free): Likewise. + (elf_i386_link_hash_table_create): Create loc_hash_table and + loc_hash_memory. + (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols. + (elf_i386_size_dynamic_sections): Likewise. + (elf_i386_relocate_section): Likewise. + (elf_i386_finish_dynamic_sections): Likewise. + (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym + isn't NULL. + + * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h". + (elf64_x86_64_link_hash_table): Add loc_hash_table and + loc_hash_memory. + (elf64_x86_64_local_hash): New. + (elf64_x86_64_local_htab_hash): Likewise. + (elf64_x86_64_local_htab_eq): Likewise. + (elf64_x86_64_get_local_sym_hash): Likewise. + (elf64_x86_64_link_hash_table_free): Likewise. + (elf64_x86_64_allocate_local_dynrelocs): Likewise. + (elf64_x86_64_finish_local_dynamic_symbol): Likewise. + (bfd_elf64_bfd_link_hash_table_free): Likewise. + (elf64_x86_64_link_hash_table_create): Create loc_hash_table + and loc_hash_memory. + (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC + symbols. + (elf64_x86_64_size_dynamic_sections): Likewise. + (elf64_x86_64_relocate_section): Likewise. + (elf64_x86_64_finish_dynamic_sections): Likewise. + (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if + sym isn't NULL. + +2009-06-10 Philip Blundell + + * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if + elf_sec->this_hdr == NULL. + +2009-06-12 Tristan Gingold + + * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR. + * bfd-in2.h: Regenerated. + * libbfd.h: Regenerated. + + * mach-o.c (FILE_ALIGN): New macro. + (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol. + (bfd_mach_o_print_symbol): Ditto. + (bfd_mach_o_scan_write_thread): Adjust type of variable offset. + (bfd_mach_o_get_reloc_upper_bound): New function. + (bfd_mach_o_canonicalize_reloc): Ditto. + (bfd_mach_o_scan_write_relocs): Ditto. + (bfd_mach_o_scan_write_section_32): Remove offset argument. + (bfd_mach_o_scan_write_section_64): Ditto. + (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data + written for load command. Do not compute section file offset. + (bfd_mach_o_scan_write_segment_64): Ditto. + (bfd_mach_o_scan_write_symtab): Compute file offset first. + Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to + Mach-O to ... + (bfd_mach_o_mangle_symbols): ... this new function. + (bfd_mach_o_write_contents): Be sure to have load commands built. + Call bfd_mach_o_mangle_symbols. + (bfd_mach_o_build_commands): Adjust for filelen field. + Use FILE_ALIGN macro. Clear section file offset if section is empty. + Do not set symtab file offset anymore here. + (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol. + (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc. + Set reloc_count and rel_filepos section fields. + (bfd_mach_o_scan_read_section_32): Type of argument offset is now + unsigned int. + (bfd_mach_o_scan_read_section_64): Ditto. + (bfd_mach_o_scan_read_section): Ditto. + (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now + bfd_mach_o_asymbol. Use unsigned int for file offset type. + (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol. + Handle weak-ref symbols. + (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol. + (bfd_mach_o_scan_read_dysymtab_symbol): Ditto. + (bfd_mach_o_scan): Remove assignment to removed field. + (bfd_mach_o_mkobject_init): Ditto. + (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter. + (bfd_mach_o_bfd_reloc_type_lookup): New macro. + (bfd_mach_o_bfd_reloc_name_lookup): Ditto. + (bfd_mach_o_swap_reloc_in): Ditto. + (bfd_mach_o_swap_reloc_out): Ditto. + + * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY) + (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY) + (BFD_MACH_O_REFERENCE_FLAG_DEFINED) + (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED) + (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY) + (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY) + (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED) + (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF) + (BFD_MACH_O_N_WEAK_DEF): New macros. + Add comments. + (bfd_mach_o_section_type): Add new enumeration values. + (BFD_MACH_O_S_SELF_MODIFYING_CODE) + (BFD_MACH_O_S_ATTR_LIVE_SUPPORT) + (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP) + (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New + macros. + (BFD_MACH_O_GENERIC_RELOC_VANILLA) + (BFD_MACH_O_GENERIC_RELOC_PAIR) + (BFD_MACH_O_GENERIC_RELOC_SECTDIFF) + (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR) + (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto. + (BFD_MACH_O_RELENT_SIZE): Ditto. + (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH) + (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE) + (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH) + (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto. + (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL) + (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE) + (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH) + (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto. + (bfd_mach_o_reloc_info): New struct. + (bfd_mach_o_asymbol): New struct. + (bfd_mach_o_symtab_command): The symbols field is now of type + bfd_mach_o_asymbol. + (bfd_mach_o_load_command): The offset and len fields are now of type + unsigned int. + (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields. + Add a filelen field. Add comments. + (bfd_mach_o_backend_data): New struct. + (bfd_mach_o_get_backend_data): New macro. + (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type + bfd_mach_o_asymbol. + (bfd_mach_o_scan_read_dysymtab_symbol): Ditto. + (bfd_mach_o_get_reloc_upper_bound): New prototype. + (bfd_mach_o_canonicalize_reloc): Ditto. + + * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove + duplicated macro. Now defined to _bfd_generic_is_local_label. + (TARGET_NAME_BACKEND): New macro... + (TARGET_NAME_BACKEND): ... used to name a new variable. + (TARGET_NAME): Define relocs table using bfd_mach_o, reference + Mach-O backend data. + + * mach-o-i386.c (i386_howto_table): New variable. + (bfd_mach_o_i386_swap_reloc_in): New function. + (bfd_mach_o_i386_swap_reloc_out): Ditto. + (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto. + (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto. + (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros. + (bfd_mach_o_bfd_reloc_type_lookup) + (bfd_mach_o_bfd_reloc_name_lookup): Ditto. + +2009-06-11 Eric Paris + Nick Clifton + + * opncls.c (_maybe_make_executable): New function. Gives execute + permission to an executable bfd that was opened for writing + provided that it is a regular file. Replaces common code found in... + (bfd_close): here and ... + (bfd_close_all_done): here. + +2009-06-11 Anthony Green + + * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL. + * bfd-in2.h: Rebuilt. + * libbfd.h: Rebuilt. + * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10 + relocation support. + (moxie_reloc_map): Ditto. + Clean up copyright notice. + +2009-06-10 Paul Pluzhnikov + + * bfd-in2.h: bfd_mmap prototype. + * bfdio.c (bfd_mmap): New function. + * libbfd.h (bfd_iovec): Add bmmap. + * cache.c (cache_bmmap): New function. + (cache_iovec): Initialize bmmap member. + * opencls.c (opncls_bmmap): New function. + (opncls_iovec): Initialize bmmap member. + +2009-06-09 Tristan Gingold + + * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment + and stabstr_segment fields. + (mach_o_be_vec, mach_o_le_vec): Removed + (bfd_mach_o_version): New prototype. + + * mach-o.c (bfd_mach_o_version): Make this function public. + (mach_o_wide_p): New function. + (bfd_mach_o_wide_p): Ditto. + (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for + weird names. + (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment. + Search in the list only if the name starts with a dot. + (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded + test. Check bfd_seek status. + (bfd_mach_o_scan_write_thread): Check bfd_seek status. + (bfd_mach_o_scan_write_section_32): Ditto. + (bfd_mach_o_scan_write_section_64): Ditto. + (bfd_mach_o_scan_write_section): Removed. + (bfd_mach_o_scan_write_segment): Split into ... + (bfd_mach_o_scan_write_segment_32): ... this and ... + (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status. + (bfd_mach_o_scan_write_symtab_symbols): Moved into ... + (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD + symbol table. Now returns a boolean. + (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status. + Adjust for status type. + (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded + test. Write symbol table. Numbers the sections. + (bfd_mach_o_read_header): Check bfd_seek status. + Use mach_o_wide_p instead of hard-coded test. + (bfd_mach_o_scan_read_section_32): Check bfd_seek status. + (bfd_mach_o_scan_read_section_64): Ditto. + (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status. + Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly + handled common symbols. + (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status. + (bfd_mach_o_scan_read_dysymtab_symbol): Ditto. + (bfd_mach_o_scan_read_dylinker): Ditto. + (bfd_mach_o_scan_read_dylib): Ditto. + (bfd_mach_o_scan_read_thread): Ditto. + (bfd_mach_o_scan_read_symtab): Ditto. + Do not create a section for the stabs. + (bfd_mach_o_scan_read_uuid): Check bfd_seek status. + (bfd_mach_o_scan_read_segment): Ditto. + (bfd_mach_o_scan_read_command): Ditto. + (bfd_mach_o_scan_start_address): Ditto. + (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test. + (bfd_mach_o_archive_p): Check bfd_seek status. + (bfd_mach_o_core_fetch_environment): Ditto. + + * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype. + +2009-06-06 H.J. Lu + + * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc. + (elf_i386_link_hash_table_create): Initialize irelifunc. + (elf_i386_check_relocs): Updated. Set up irelifunc for + shared objects. + (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic + relocation for non-GOT reference of STT_GNU_IFUNC symbol in + shared objects. + (elf_i386_relocate_section): Likewise. + + * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc. + (elf64_x86_64_link_hash_table_create): Initialize irelifunc. + (elf64_x86_64_check_relocs): Updated. Set up irelifunc for + shared objects. + (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic + relocation for non-GOT reference of STT_GNU_IFUNC symbol in + shared objects. + (elf64_x86_64_relocate_section): Likewise. + + * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to + ... + (_bfd_elf_create_ifunc_sections): This. + + * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to + ... + (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc + for shared objects. + +2009-06-06 H.J. Lu + + * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic + relocation for R_386_32 against STT_GNU_IFUNC symbol when + building shared object. Check info->executable instead of + !info->shared when setting non_got_ref. + (elf_i386_allocate_dynrelocs): Allocate dynamic relocation + for non-GOT reference of STT_GNU_IFUNC symbol in shared + object. Allocate GOT relocation agsinst STT_GNU_IFUNC + symbol if needed. + (elf_i386_relocate_section): Output dynamic relocation for + R_386_32 against STT_GNU_IFUNC symbol to get the real + function address when building shared object. + (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT + relocation for STT_GNU_IFUNC symbol in shared object. + + * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for + dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC + symbol when building shared object. Check info->executable + instead of !info->shared when setting non_got_ref. + (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation + for non-GOT reference of STT_GNU_IFUNC symbol in shared + library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol + if needed. + (elf64_x86_64_relocate_section): Output dynamic relocation + for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real + function address when building shared object. + (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT + relocation for STT_GNU_IFUNC symbol in shared object. + +2009-06-06 Jan Kratochvil + + * Makefile.am: Run "make dep-am". + (BFD32_BACKENDS): Add mach-o-i386.lo. + (BFD32_BACKENDS_CFILES): Add mach-o-i386.c. + * Makefile.in: Regenerate. + +2009-06-06 Alan Modra + + * elf32-spu.c (spu_elf_relocate_section): Match overlay number + when looking for soft-icache stubs. + +2009-06-05 Tristan Gingold + + * mach-o.h: Update copyright year. + (bfd_mach_o_mach_header_magic): New enum. + (bfd_mach_o_cpu_subtype): Now an enum. + (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros. + (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto. + (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto. + (bfd_mach_o_load_command): Field type_required is now a boolean. + Reindent prototypes. + (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove. + (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype. + (bfd_mach_o_bfd_copy_private_section_data): Ditto. + (bfd_mach_o_bfd_copy_private_bfd_data): Ditto. + (bfd_mach_o_get_symtab_upper_bound): Ditto. + (bfd_mach_o_canonicalize_symtab): Ditto. + (bfd_mach_o_get_symbol_info): Ditto. + (bfd_mach_o_print_symbol): Ditto. + (bfd_mach_o_bfd_print_private_bfd_data): Ditto. + (bfd_mach_o_make_empty_symbol): Ditto. + (bfd_mach_o_write_contents): Ditto. + + * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p, + bfd_mach_o_mkobject): Defines. + (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1. + Do not check with target vector but with flavour. + (struct mach_o_section_name_xlat): New declaration. + (dwarf_section_names_xlat): Ditto. + (text_section_names_xlat): Ditto. + (data_section_names_xlat): Ditto. + (struct mach_o_segment_name_xlat): Ditto. + (segsec_names_xlat): Ditto. + (bfd_mach_o_convert_section_name_to_bfd): New function. + (bfd_mach_o_convert_section_name_to_mach_o): Ditto. + (bfd_mach_o_bfd_copy_private_symbol_data): Make it public. + (bfd_mach_o_bfd_copy_private_section_data): Ditto. + (bfd_mach_o_bfd_copy_private_bfd_data): Ditto. + Accept any input and output flavour. Do not share private data + anymore. + (bfd_mach_o_count_symbols): Add a comment. + (bfd_mach_o_get_symtab_upper_bound): Make it public. + (bfd_mach_o_canonicalize_symtab): Ditto. + (bfd_mach_o_get_symbol_info): Ditto. + (bfd_mach_o_print_symbol): Ditto. + (bfd_mach_o_write_header): Now returns a boolean instead of an int. + Use constants instead of hard-coded values. + (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded + values. + (bfd_mach_o_scan_write_section_64): Ditto. + (bfd_mach_o_scan_write_segment): Ditto. + Do not copy sections anymore. + (bfd_mach_o_write_contents): Make it public. + Remove dead code. Rewrite typeflag assignment. + (bfd_mach_o_build_commands): New function. + (bfd_mach_o_set_section_contents): Ditto. + (bfd_mach_o_make_empty_symbol): Make it public. + (bfd_mach_o_read_header): Make it static. + Convert to bfd_boolean. + Use constants instead of hard-coded values. + (bfd_mach_o_make_bfd_section): Call + bfd_mach_o_convert_section_name_to_bfd to create name. + (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded + values. + (bfd_mach_o_scan_read_section_64): Ditto. + (bfd_mach_o_scan_read_segment): Do not create a bfd section for + a segment anymore. Use constants instead of hard-coded values. + (bfd_mach_o_scan_read_command): Fix style. + (bfd_mach_o_scan): Use constants instead of hard-coded values. + Get rid of BFD_IO_FUNCS. + (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject. + (bfd_mach_o_header_p): Created from bfd_mach_o_object_p. + (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p. + (bfd_mach_o_object_p): Removed. + (bfd_mach_o_gen_core_p): New function, replaces ... + (bfd_mach_o_core_p): ... deleted. + (bfd_mach_o_bfd_print_private_bfd_data): Make it public. + + * mach-o-i386.c: New file. + * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin. + * configure.in (TDEFINES): Add mach_o_i386_vec. + * configure: Regenerated. + * targets.c: Add mach_o_i386_vec. + + * mach-o.c: Update copyright years. + (BFD_IO_FUNCS): Remove (was not used). + (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap + bfd_mach_o_slurp_extended_name_table, + bfd_mach_o_construct_extended_name_table, + bfd_mach_o_truncate_arname, bfd_mach_o_write_armap, + bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt, + bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup, + bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook, + bfd_mach_o_get_section_contents_in_window, + bfd_mach_o_bfd_is_local_label_name, + bfd_mach_o_bfd_is_target_special_symbol, + bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno, + bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info, + bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols, + bfd_mach_o_minisymbol_to_symbol, + bfd_mach_o_bfd_get_relocated_section_contents, + bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create, + bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols, + bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link, + bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach, + bfd_mach_o_bfd_merge_private_bfd_data, + bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents, + bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections, + bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group, + bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol, + bfd_mach_o_bfd_copy_private_header_data, + bfd_mach_o_core_file_matches_executable_p): Move these defines ... + * mach-o-target.c: ... here. + Update copyright years. + +2009-06-04 Alan Modra + + * dep-in.sed: Don't use \n in replacement part of s command. + * Makefile.am (DEP1): LC_ALL for uniq. + Run "make dep-am". + * Makefile.in: Regenerate. + +2009-06-03 H.J. Lu + + * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of + h->plt.refcount > 0 on STT_GNU_IFUNC symbol. + * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise. + +2009-06-03 H.J. Lu + + * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate + GOT entry for STT_GNU_IFUNC symbol with pointer equality. + (elf_i386_relocate_section): Adjust R_386_GOT32 relocation + against STT_GNU_IFUNC symbols for static executables. + (elf_i386_finish_dynamic_symbol): Load GOT entry with + PLT entry for STT_GNU_IFUNC symbol with pointer equality. + + * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate + GOT entry for STT_GNU_IFUNC symbol with pointer equality. + (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with + PLT entry for STT_GNU_IFUNC symbol with pointer equality. + +2009-06-02 Richard Sandiford + + * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined + symbols to be left unimported when linking statically. + * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage + code when linking statically. + +2009-06-02 H.J. Lu + + * elf32-i386.c (elf_i386_check_relocs): Increment + got.refcount for R_386_GOT32/R_386_GOTOFF relocations + against STT_GNU_IFUNC symbol. + (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if + local STT_GNU_IFUNC definition is used. + (elf_i386_relocate_section): Handle got.offset != -1 for + R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC + symbol. + + * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment + got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 + relocations against STT_GNU_IFUNC symbol. + (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if + local STT_GNU_IFUNC definition is used. + (elf64_x86_64_relocate_section): Handle got.offset != -1 + for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against + STT_GNU_IFUNC symbol. + +2009-06-01 H.J. Lu + + PR ld/10205 + * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE. + (elf_i386_reloc_type_lookup): Likewise. + (R_386_tls): Removed. + (R_386_irelative): New. + (R_386_vt_offset): Updated. + (elf_i386_rtype_to_howto): Likewise. + (elf_i386_link_hash_table): Add igotplt, iplt and irelplt. + (elf_i386_link_hash_table_create): Initialize igotplt, + iplt and irelplt. + (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first. + (elf_i386_adjust_dynamic_symbol): Likewise. + (elf_i386_allocate_dynrelocs): Likewise. + (elf_i386_relocate_section): Likewise. + (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt + sections. + (elf_i386_finish_dynamic_symbol): When building a static + executable, use .iplt, .igot.plt and .rel.iplt sections for + STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for + locally defined STT_GNU_IFUNC symbol. + + * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE. + (x86_64_reloc_map): Likewise. + (R_X86_64_standard): Updated. + (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt. + (elf64_x86_64_link_hash_table_create): Initialize igotplt, + iplt and irelplt. + (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first. + (elf64_x86_64_adjust_dynamic_symbol): Likewise. + (elf64_x86_64_allocate_dynrelocs): Likewise. + (elf64_x86_64_relocate_section): Likewise. + (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt + sections. + (elf64_x86_64_finish_dynamic_symbol): When building a static + executable, use .iplt, .igot.plt and .rela.iplt sections for + STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation + for locally defined STT_GNU_IFUNC symbol. + + * reloc.c (BFD_RELOC_386_IRELATIVE): New. + (BFD_RELOC_X86_64_IRELATIVE): Likewise. + + * bfd-in2.h: Regenerated. + * libbfd.h: Likewise. + +2009-06-01 H.J. Lu + + * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs. + (_bfd_elf_make_ifunc_reloc_section): Removed. + (_bfd_elf_is_ifunc_symbol): Likewise. + (_bfd_elf_create_static_ifunc_sections): New. + + * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC + symbol check to ... + (elf_link_add_object_symbols): Here. + (_bfd_elf_link_hash_hide_symbol): Don't clean plt on + STT_GNU_IFUNC symbol. + (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol + if a STT_GNU_IFUNC symbol is referenced in a non-shared object. + (IFUNC_INFIX): Removed. + (get_ifunc_reloc_section_name): Likewise. + (_bfd_elf_make_ifunc_reloc_section): Likewise. + (_bfd_elf_is_ifunc_symbol): Likewise. + (_bfd_elf_create_static_ifunc_sections): New. + +2009-05-29 H.J. Lu + + * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix. + (create_got_section): Likewise. + (allocate_dynrelocs): Likewise. + (readonly_dynrelocs): Likewise. + (set_tls_module_base): Likewise. + (dtpoff_base): Likewise. + (tpoff): Likewise. + (elf_i386_link_hash_table_create): Updated. + (elf_i386_create_dynamic_sections): Likewise. + (elf_i386_check_relocs): Likewise. + (elf_i386_size_dynamic_sections): Likewise. + (elf_i386_relocate_section): Likewise. + + * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix. + (create_got_section): Likewise. + (allocate_dynrelocs): Likewise. + (readonly_dynrelocs): Likewise. + (set_tls_module_base): Likewise. + (dtpoff_base): Likewise. + (tpoff): Likewise. + (elf64_x86_64_link_hash_table_create): Updated. + (elf64_x86_64_create_dynamic_sections): Likewise. + (elf64_x86_64_check_relocs): Likewise. + (elf64_x86_64_size_dynamic_sections): Likewise. + (elf64_x86_64_relocate_section): Likewise. + +2009-05-28 Nick Clifton + + * targets.c (_bfd_target_vector): Only include plugin target in + all-targets build if BFD_SUPPORTS_PLUGINS is non-zero. + +2009-05-28 Ulrich Weigand + + * elf32-spu.c (struct call_info): New member broken_cycle. + (remove_cycle): Instead of physically removing call_info structures + to break call graph cycles, mark them using the broken_cycle flag. + (mark_overlay_section): Respect broken_cycle flag. + (unmark_overlay_section): Likewise. + (collect_lib_sections): Likewise. + (collect_overlays): Likewise. + (sum_stack): Likewise. + +2009-05-28 Ulrich Weigand + + * elf32-spu.c (insert_callee): Accumulate incoming callee->count. + (mark_functions_via_relocs): Initialize callee->count to 1. + (pasted_function): Likewise. + (spu_elf_auto_overlay): Honor call counts when determining number + of stubs required in software i-cache mode. + +2009-05-27 Rafael Avila de Espindola + + * plugin.c (program_name): Remove. + (plugin_program_name): New. + (bfd_plugin_set_program_name): New. + (try_load_plugin): Use plugin_program_name. + * plugin.h (bfd_plugin_set_program_name): New. + +2009-05-27 Rafael Avila de Espindola + + * aclocal.m4: Include ../config/plugins.m4. + * configure.in: Use AC_PLUGINS. + * configure: Regenerate. + * Makefile.in: Regenerate. + * doc/Makefile.in: Regenerate. + +2009-05-27 Nathan Sidwell + + * elf32-ppc.c (ppc_elf_relax_section): Work with a partial + link. + * bout.c (b_out_bfd_relax_section): Reject relocatable links. + * elf32-m10300.c (mn10300_elf_relax_section): Likewise. + * elf32-avr.c (elf32_avr_relax_section): Likewise. + * elf32-frv.c (elf32_avr_relax_section): Likewise. + * elf32-xtensa.c (elf_xtensa_relax_section): Likewise. + * elf64-mmix.c (mmix_elf_relax_section): Likewise. + * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise. + * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise. + * reloc.c (bfd_generic_relax_section): Likewise. + * reloc16.c (bfd_coff_reloc16_relax_section): Likewise. + * vms.c (vms_bfd_relax_section): Likewise. + +2009-05-26 H.J. Lu + + * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New. + + * elf32-i386.c (is_indirect_symbol): Renamed to ... + * elflink.c (_bfd_elf_is_ifunc_symbol): This. + + * elf32-i386.c (allocate_dynrelocs): Updated. + (elf_i386_relocate_section): Likewise. + * elf64-x86-64.c (allocate_dynrelocs): Likewise. + (elf64_x86_64_relocate_section): Likewise. + + * elf64-x86-64.c (is_indirect_symbol): Removed. + +2009-05-26 Nick Clifton + + * po/id.po: Updated Indonesian translation. + +2009-05-26 Rafael Avila de Espindola + + * Makefile.am: Run "make dep-am". + (AM_CPPFLAGS): New. + (LIBDL): New. + (ALL_MACHINES): Add cpu-plugin.lo. + (ALL_MACHINES_CFILES): Add cpu-plugin.c. + (BFD32_BACKENDS): Add plugin.lo. + (BFD32_BACKENDS_CFILES): Add plugin.c. + (libbfd_la_LIBADD): Add LIBDL + * archures.c (bfd_architecture): Add bfd_arch_plugin. + (bfd_plugin_arch): Declare. + * bfd-in.h (BFD_SUPPORTS_PLUGINS): New. + * bfd.c (bfd): Add plugin_data. + * config.bfd: Handle the plugin target. + * configure.in: Check for --enable-plugins. + (LT_INIT): Use the dlopen option. + * cpu-plugin.c: New. + * plugin.c: New. + * plugin.h: New. + * targets.c (plugin_vec): Declare. + (_bfd_target_vector): Add plugin_vec. + * Makefile.in: Regenerate. + * bfd-in2.h: Regenerate. + * configure: Regenerate. + +2009-05-26 Alan Modra + + * dep-in.sed: Don't modify .o to .lo here. Output one filename + per line with all lines having continuation backslash. Prefix + first line with "A", following lines with "B". + * Makefile.am (DEP): Don't use dep.sed here. + (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use + dep.sed here on dependencies, sort and uniq. + * Makefile.in: Regenerate. + +2009-05-25 Tristan Gingold + + * makefile.vms: Add verilog.obj to object list OBJS. + +2009-05-24 Alan Modra + + * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory + for BFD_IN_MEMORY is cleared. + (bfd_bwrite): Zero excess memory allocated. + +2009-05-22 Julian Brown + + * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New + macros. + (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b) + (elf32_arm_stub_a8_veneer_blx): New stub sequences. + (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond, + arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx. + (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields. + (a8_erratum_fix, a8_erratum_reloc): New structs. + (elf32_arm_link_hash_table): Add a8_erratum_fixes, + num_a8_erratum_fixes, fix_cortex_a8 fields. + (elf32_arm_link_hash_table_create): Zero fix_cortex_a8. + (elf32_arm_add_stub): Split into two parts, creating... + (elf32_arm_create_or_find_stub_sec): New function. + (elf32_arm_final_link_relocate): Add forward declaration. + (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2 + relocations, multiple relocations per stub. + (find_stub_size_and_template): New (using parts of arm_size_one_stub). + (arm_size_one_stub): Use find_stub_size_and_template. + (a8_reloc_compare): New. + (find_thumb_glue): Add forward declaration. + (cortex_a8_erratum_scan): New. + (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support. + (bfd_elf32_arm_set_cortex_a8_fix): New. + (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument. + (arm_map_one_stub): Add THUMB32_TYPE support. + (a8_branch_to_stub_data): New. + (make_branch_to_a8_stub): New. + (elf32_arm_write_section): Add Cortex-A8 erratum workaround support. + * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New. + (bfd_elf32_arm_set_target_relocs): Add argument for controlling + Cortex-A8 erratum workaround. + * bfd-in2.h: Regenerate. + +2009-05-22 Alan Modra + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + * po/SRC-POTFILES.in: Regenerate. + +2009-05-21 Alan Modra + + * elflink.c (elf_link_input_bfd): Correct *pindex change in last + commit. + +2009-05-21 Alan Modra + + * elf-bfd.h (struct elf_backend_data + ): Return an int. + * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop + symbols on deleted .opd entries. + * elflink.c (elf_link_output_sym): Return without outputting sym + if output_symbol_hook returns 2. + (elf_link_output_extsym): Don't assign h->indx when symbol discarded. + Abort if we must not discard sym. + (elf_link_input_bfd): Similarly, don't set finfo->indices for + local syms. + (bfd_elf_final_link): Adjust elf_link_output_sym calls. + * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for + elf_backend_link_output_symbol_hook return type change. + * elf32-arm.c (output_arch_syminfo): Likewise. + (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise. + (elf32_arm_output_arch_local_syms): Likewise. + * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise. + * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise. + (bfd_score_elf_link_output_symbol_hook): Likewise. + * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise. + * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise. + * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise. + * elf32-spu.c (spu_elf_output_symbol_hook): Likewise. + * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise. + * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise. + * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise. + * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise. + * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise. + * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise. + * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise. + +2009-05-21 Alan Modra + + * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on + out of range .opd symbols. + +2009-05-21 Dave Korn + + * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not + fprintf_vma directly. + * peXXigen.c (pe_print_edata): Likewise. + (pe_print_pdata): Likewise. + (_bfd_XX_print_ce_compressed_pdata): Likewise. + (_bfd_XX_print_private_bfd_data_common): Likewise. + +2009-05-19 Dave Korn + + * cofflink.c (process_embedded_commands): Ignore "-aligncomm". + +2009-05-15 Andrew Stubbs + Paul Brook + + * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to + fix discarded sections. + +2009-05-14 Ulrich Weigand + + * elf32-spu.c (mark_overlay_section): Move .init and .fini + sections into the software icache. + +2009-05-14 Ulrich Weigand + + * elf32-spu.c (build_stub): Always build "compact" sofware + i-cache stubs. + +2009-05-14 Ulrich Weigand + + * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2. + (spu_elf_setup): Initialize it. + (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache. + Update to new-sytle cache manager data structures. + (spu_elf_build_stubs): Generate new-style cache manager data + structures and symbols. + (spu_elf_auto_overlay): Update size computation. + +2009-05-14 Ulrich Weigand + + * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY + segments first amongst the program headers. + +2009-05-14 Ulrich Weigand + + * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index + into addresses for relocation types that look at high bits. Remove + special handling of relocation overflow warnings. + +2009-05-14 Ulrich Weigand + + * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the + control flow graph between fragments of a function. + +2009-05-14 Ulrich Weigand + + * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode, + generate only a 16-byte .toe section. + (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise. + +2009-05-14 Alan Modra + + * elf32-spu.c (spu_elf_size_stubs): Split out section placement to.. + (spu_elf_place_overlay_data): ..here. New function. + * elf32-spu.h (spu_elf_place_overlay_data): Declare. + +2009-05-13 Andrew Jenner + + * elf32-arm.c: Move sysdep.h to start of file. + +2009-05-11 Ulrich Weigand + + * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as + start of overlays. + (spu_elf_build_stubs): Don't define __icache_tagbase. Define + __icache_tag_array and __icache_tag_array_size. + +2009-05-11 Masaki Muranaka + + * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary + ATTRIBUTE_UNUSED. + (bfinfdpic_link_omit_section_dynsym): Likewise. + (elf32_bfinfdpic_finish_dynamic_sections): Likewise. + +2009-05-05 Paul Brook + + * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype. + * bfd-in2.h: Regenerate. + * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define. + (_arm_elf_section_data): Add text and exidx fields. + (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size, + insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31, + copy_exidx_entry): New functions. + (elf32_arm_write_section): Fixup .ARM.exidx contents. + +2009-05-05 Christophe lyon + + * elf32-arm.c (DEF_STUBS): New helper define. + (DEF_STUB): Likewise. + (stub_def): New type. + (stub_definitions): New array, containing stub template pointers + and sizes. + (arm_size_one_stub): Make use of stub_definitions. + +2009-05-04 Dave Korn + + * elflink.c (find_version_for_sym): Remove from here, ... + * linker.c (bfd_find_version_for_sym): ... rename, replace + here, make public and update all callers. + * bfd-in2.h: Regenerate. + +2009-04-30 Nick Clifton + + * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs + section pointer. + (struct elf_obj_data): Add has_ifunc_symbols boolean. + * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags + into a STT_GNU_IFUNC symbol type. + (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function + type. + (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if + the binary contains ifunc symbols. + * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC + symbol type into a BSF_GNU_INDIRECT_FUNCTION flag. + * elf32-i386.c (is_indirect_function): New function. + (elf_i386_check_relocs): Create an ifunc output section. + (allocate_dynrelocs): Create dynamic relocs in the ifunc output + section if necessary. + (elf_i386_relocate_section): Emit a reloc against an ifunc symbol + if necessary. + (elf_i386_add_symbol_hook): New function. Set the + has_ifunc_symbols field of the elf_obj_data structure if an ifunc + symbol is encountered. + (elf_backend_post_process_headers): Define. + (elf_backend_add_symbol_hook): Define. + (elf_i386_post_process_headers): Rename to + elf_i388_fbsd_post_process_headers. + * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro. + (is_indirect_function): New function. + (elf64_x86_64_check_relocs): Create an ifunc output section. + (allocate_dynrelocs): Create dynamic relocs in the ifunc output + section if necessary. + (elf64_x86_64_relocate_section): Emit a reloc against an ifunc + symbol if necessary. + (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the + elf_obj_data structure if an ifunc symbol is encountered. + (elf_backend_post_process_headers): Define. + * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT + if we have ifunc symbols to handle. + (get_ifunc_reloc_section_name): New function. Computes the name + for an ifunc section. + (_bfd_elf_make_ifunc_reloc_section): New function. Creates a + section to hold ifunc relocs. + * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define. + (bfd_print_symbol_vandf): Handle ifunc symbols. + (bfd_decode_symclass): Likewise. + * bfd-in2.h: Regenerate. + +2009-04-30 Joseph Myers + + * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute + MOVW and MOVT relocations in a shared library link. + +2009-04-27 Anthony Green + + * verilog.c: New file. + * Makefile.am (BFD32_LIBS): Add verilog.c. + (BFD32_LIBS_CFILES): Add verilog.c. + (verilog.lo): New build rule. + * Makefile.in: Rebuilt. + * targets.c: Add verilog support. + * bfd.c (tdata union): Add Verilog private data field. + * bfd-in2.h: Regenerate. + +2009-04-27 H.J. Lu + + * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't + copy pe_opthdr. + +2009-04-23 Matthias Klose + + * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'. + +2009-04-22 Christophe Lyon + + PR9743 + * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24, + R_ARM_JUMP24 and R_ARM_PLT32 relocations. + (elf32_arm_size_stubs): Likewise. + (record_thumb_to_arm_glue): Deleted unused function. + (bfd_elf32_arm_process_before_allocation): No longer handle + R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here. + (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24, + R_ARM_JUMP24 and R_ARM_PLT32 relocations. + +2009-04-21 Daniel Jacobowitz + + * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED. + (elf32_arm_write_section): Declare early. + (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD. + (arm_allocate_glue_section_space): Exclude empty sections. + (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED. + (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub + BFD. + (elf32_arm_output_glue_section, elf32_arm_final_link): New. + (elf32_arm_merge_eabi_attributes): Skip the stub BFD. + (elf32_arm_size_dynamic_sections): Allocate interworking + sections here. + (bfd_elf32_bfd_final_link): Define. + +2009-04-21 H.J. Lu + + * 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-21 Kai Tietz + + * coff-x86_64.c (PEI_HEADERS): Protect includes. + (bfd_pe_print_pdata): Remove #ifdef PE variation. + * pei-x86_64.c (PEI_HEADERS): Define to prevent double + include in coff-x86_64.c of headers. + (PDATA_ROW_SIZE): New define. + (pex_regs[]): New static array. + (pex64_get_runtime_function): New static function. + (pex64_get_unwind_info): Likewise. + (pex64_get_scope_entry): Likewise. + (pex64_xdata_print_uwd_codes): Likewise. + (pex64_get_section_by_rva): Likewise. + (pex64_dump_xdata): Likewise. + (pex64_bfd_print_pdata): Likewise. + (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata. + * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation. + * libpei.h (_bfd_pex64_print_pdata): Removed declaration. + +2009-04-19 Peter O'Gorman + Alan Modra + Dave Korn + + * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t + long names and non-NUL-terminated strings. + +2009-04-17 H.J. Lu + + * bfd-in2.h: Regenerated. + +2009-04-17 H.J. Lu + + * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace + IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER. + +2009-04-17 H.J. Lu + + 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. + +2009-04-17 Christophe Lyon + + * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through + PLT entries to an undefined symbol when generating a shared + library. + +2009-04-17 Nick Clifton + + PR 9909 + * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols. + +2009-04-16 Richard Sandiford + + * aout-adobe.c (aout_32_bfd_define_common_symbol): Define. + * aout-target.h (MY_bfd_define_common_symbol): Likewise. + * aout-tic30.c (MY_bfd_define_common_symbol): Likewise. + * binary.c (binary_bfd_define_common_symbol): Likewise. + * bout.c (b_out_bfd_define_common_symbol): Likewise. + * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise. + * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise. + * coffcode.h (coff_bfd_define_common_symbol): Likewise. + * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise. + * i386msdos.c (msdos_bfd_define_common_symbol): Likewise. + * i386os9k.c (os9k_bfd_define_common_symbol): Likewise. + * ieee.c (ieee_bfd_define_common_symbol): Likewise. + * ihex.c (ihex_bfd_define_common_symbol): Likewise. + * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise. + * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise. + * mmo.c (mmo_bfd_define_common_symbol): Likewise. + * nlm-target.h (nlm_bfd_define_common_symbol): Likewise. + * oasys.c (oasys_bfd_define_common_symbol): Likewise. + * pef.c (bfd_pef_bfd_define_common_symbol): Likewise. + * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise. + * som.c (som_bfd_define_common_symbol): Likewise. + * srec.c (srec_bfd_define_common_symbol): Likewise. + * tekhex.c (tekhex_bfd_define_common_symbol): Likewise. + * versados.c (versados_bfd_define_common_symbol): Likewise. + * vms.c (vms_bfd_define_common_symbol): Likewise. + * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise. + * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise. + * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol. + (pmac_xcoff_vec): Likewise. + * coff64-rs6000.c (rs6000coff64_vec): Likewise. + (aix5coff64_vec): Likewise. + * linker.c (bfd_generic_define_common_symbol): New function. + * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol. + (_bfd_define_common_symbol): New field. + * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare. + * xcofflink.c (_bfd_xcoff_define_common_symbol): New function. + (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common + symbols here. + * bfd-in2.h: Regenerate. + * libbfd.h: Likewise. + * libcoff.h: Likewise. + +2009-04-15 Anthony Green + + * targets.c: Add moxie support. + * Makefile.am: Ditto. + * Makefile.in: Rebuilt. + * cpu-moxie.c, elf32-moxie.c: New files. + * archures.c: Add moxie support. + * configure.in: Add moxie support. + * configure: Rebuilt. + * config.bfd, archures.c: Add moxie support. + * bfd-in2.h: Rebuilt. + +2009-04-15 Christophe Lyon + + * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM + branch to an undef weak symbol into a jump to next instruction if + a PLT entry will be created. + +2009-04-14 Dave Korn + + * coffgen.c (make_a_section_from_file): Set the backend long + section names enable if long section names found on input. + * coffcode.h: Extend long section names documentation to match. + +2009-04-08 H.J. Lu + + * elflink.c (elf_link_add_object_symbols): Warn alternate ELF + machine code. + +2009-04-07 DJ Delorie + + * archures.c: Add bfd_mach_mep_c5. + * bfd-in2.h: Likewise. + * cpu-mep.c: Add bfd_c5_arch. + * elf32-mep.c: Support it. + +2009-04-07 H.J. Lu + + * elflink.c (_bfd_elf_section_already_linked): Add `\n' for + info->callbacks->einfo. + * linker.c (_bfd_generic_section_already_linked): Likewise. + +2009-04-06 DJ Delorie + + * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes. + +2009-04-06 H.J. Lu + + * coff-x86_64.c (bfd_pe_print_pdata): Defined to + _bfd_pex64_print_pdata only if PE is defined. + + * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ... + (_bfd_pex64_print_pdata): This. + + * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ... + (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64 + is defined. + +2009-04-05 Kai Tietz + + * coff-x86_64.c (bfd_pe_print_pdata): Define as + _bfd_pep_print_x64_pdata. + * libpei.h (_bfd_pep_print_x64_pdata): Add prototype. + * peXXigen.c (_bfd_pep_print_x64_pdata): New. + +2009-04-02 Sterling Augustine + + * elf32-xtensa.c (relax_property_section): Always set r_offset + to zero. + +2009-04-02 Christophe Lyon + + * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb, + elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long + branch stubs. + (elf32_arm_stub_type): New enum values for the two new stubs. + (arm_type_of_stub): Make use of the two new stubs. + (arm_size_one_stub): Handle the two new stubs. + +2009-04-01 Matt Thomas + + * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against + hidden symbols into the GOT or PLT.GOT. + (elf_vax_relocate_section): Do not emit a PCREL reloc + into a shared object if it is against a hidden symbol. + +2009-04-01 Richard Sandiford + + * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p + and know_contains_shared_object_p. + (xcoff_archive_contains_shared_object_p): Add an "info" parameter. + Cache the result in the archive_info table. + (xcoff_auto_export_p): Add an "info" parameter and update the + call to xcoff_archive_contains_shared_object_p. + (xcoff_mark_auto_exports): Update accordingly. + (xcoff_post_gc_symbol): Likewise. + +2009-04-01 Richard Sandiford + + * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT + rather than C_EXT. + +2009-04-01 Richard Sandiford + + * coff-rs6000.c (member_layout): New structure. + (archive_iterator): Likewise. + (member_layout_init): New function. + (archive_iterator_begin): Likewise. + (archive_iterator_next): Likewise. + (xcoff_write_armap_old): Use the new iterator functions. + (do_shared_object_padding): Delete. + (xcoff_write_armap_big): Use the new iterator functions. Simplify + handling of arch_info. + (xcoff_write_archive_contents_old): Allocate arelt_data in the + first loop rather than the second. Allocate a member header if + there isn't one, then work out the stat information and length + in the first loop too. Use the new iterators for the second loop. + (xcoff_write_archive_contents_big): Likewise. + +2009-04-01 Richard Sandiford + + * bfd-in.h (bfd_xcoff_split_import_path): Declare. + (bfd_xcoff_set_archive_import_path): Likewise. + * bfd-in2.h: Regenerate. + * xcofflink.c: Include libiberty.h. + (xcoff_archive_info): New structure. + (xcoff_archive_info_hash): New function. + (xcoff_archive_info_eq): Likewise. + (xcoff_get_archive_info): Likewise. + (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info. + (bfd_xcoff_split_import_path): New function. + (bfd_xcoff_set_archive_import_path): Likewise. + (xcoff_set_import_path): Move earlier in file. + (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive + object to the the directory part of the bfd's filename. Get the + import path and filename of an archive object from the archive's + xcoff_tdata, initializing it if necessary. Update use of + import_file_id. + (bfd_link_input_bfd): Update use of import_file_id. + (xcoff_write_global_symbol): Likewise. + +2009-04-01 Richard Sandiford + + * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h. + +2009-04-01 Richard Sandiford + + * xcofflink.c (xcoff_link_create_extra_sections): Don't create + a .loader section for relocatable links. + (xcoff_need_ldrel_p): New function. + (xcoff_mark): Use it. + (bfd_xcoff_link_count_reloc): Only count loader relocs if there's + a loader section. + (xcoff_build_ldsym): New function, split out from... + (xcoff_build_ldsyms): ...here. Rename to... + (xcoff_post_gc_symbol): ...this. Only export symbols, and only + call xcoff_build_ldsym, if there's a loader section. + (xcoff_build_loader_section): New function, extracted verbatim from... + (bfd_xcoff_size_dynamic_sections): ...here. Only call it if + there's a loader section. Only add an __rtinit loader symbol + if there's a loader section. Update after above name change. + (xcoff_symbol_section, xcoff_create_ldrel): New functions. + (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section + and xcoff_create_ldrel. + (xcoff_write_global_symbol): Use xcoff_create_ldrel. + (xcoff_reloc_link_order): Likewise, but only call it if there's + a loader section. Use xcoff_symbol_section. + (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym + if there's a loader section. + +2009-04-01 Richard Sandiford + + * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun. + +2009-04-01 Christophe Lyon + + * elf32-arm.c (group_sections): Rewrite loops for better + readability. + +2009-03-30 DJ Delorie + + * elflink.c (elf_link_input_bfd): Don't try to resolve complex + relocs when doing a relocatable link. + +2009-03-28 Mark Mitchell + + * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not + "ERROR:", in error messages. + * cpu-arm.c (bfd_arm_merge_machines): Likewise. + * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise. + * elf32-arm.c (tag_cpu_arch_combine): Likewise. + (elf32_arm_merge_eabi_attributes): Likewise. + (elf32_arm_merge_private_bfd_data): Likewise. + +2009-03-27 Nick Clifton + + * section.c (bfd_get_section_contents): Detect and handle the case + where a section has the SEC_IN_MEMORY flag set but no actual + contents allocated. + +2009-03-26 Alan Modra + + PR 6494 + * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO + p_filesz and p_memsz are equal. Use p_memsz as the segment size. + (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO + if we don't find matching PT_LOAD when copying. + +2009-03-25 M R Swami Reddy + + * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of + the reloc descriptions. + +2009-03-25 Hans-Peter Nilsson + + * elf32-cris.c (cris_elf_relocate_section) + : Handle COMMON symbols. + : Ditto. + +2009-03-24 H.J. Lu + + * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static. + (bfd_i386_arch_intel_syntax): Likewise. + (i8086_arch): Likewise. + (bfd_x86_64_arch): Likewise. + +2009-03-24 Hans-Peter Nilsson + + * elf32-cris.c (cris_elf_relocate_section): : Allow use of non-local + symbols for non-allocated sections. Don't check whether to + generate R_CRIS_DTPMOD for non-allocated sections. + (cris_elf_gc_sweep_hook) : Don't + handle relocation GC:ing if applied to non-allocated section. + (cris_elf_check_relocs): Similar. + + * elf32-cris.c (cris_elf_relocate_section) + : Don't include the TLS size + when emitting a known TP offset in the GOT. + +2009-03-23 Alan Modra + + * elf64-ppc.c (synthetic_opd): Delete. + (compare_symbols): Look for .opd name rather than section match. + (ppc64_elf_get_synthetic_symtab): Likewise. + +2009-03-21 Alan Modra + + * elf32-ppc.c (is_pic_glink_stub): Delete. + (is_nonpic_glink_stub): New function. + (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather + than first pic one. + (struct ppc_elf_link_hash_table ): Comment fix. + +2009-03-20 Martin Schwidefsky + Andreas Krebbel + + * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_* + macros for visibilty and locality checks. + (elf_s390_adjust_dynamic_symbol): Likewise. + (allocate_dynrelocs): Likewise. + (elf_s390_relocate_section): Likewise. + (elf_s390_finish_dynamic_symbol): Likewise. + * elf64-s390.c (elf_s390_check_relocs): Likewise. + (elf_s390_adjust_dynamic_symbol): Likewise. + (allocate_dynrelocs): Likewise. + (elf_s390_relocate_section): Likewise. + (elf_s390_finish_dynamic_symbol): Likewise. + +2009-03-19 Kai Tietz + + * bfd-in2.h: Regenerated. + * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY + for debugging sections and map memory read/write dependent on + SEC_COFF_NOREAD. + (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections + without memory read flags set. + * section.c: Add SEC_COFF_NOREAD to section flags. + +2009-03-19 Andreas Schwab + + * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long + for format string. + +2009-03-19 Alan Modra + + * elf32-spu.c (spu_elf_find_overlays): Separate error return from + "no overlays" return. If there are overlays, create overlay + manager entry symbols here, so that.. + (spu_elf_build_stubs): ..we don't need to set them up here. + Simplify entry symbol tests. + * elf32-spu.h (spu_elf_find_overlays): Update prototype. + +2009-03-18 Mark Kettenis + + * elf.c (elfcore_grok_openbsd_procinfo) + (elfcore_grok_openbsd_note): New functions. + (elf_parse_notes): Handle notes from OpenBSD ELF core files. + +2009-03-18 Alan Modra + + * vms-hdr.c: Don't include alloca.h. + * elf32-m68hc1x.c: Include alloca-conf.h. + * xsym.c: Likewise. + * elf64-hppa.c: Likewise. Remove existing #if's handling alloca. + * som.c: Likewise. + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + +2009-03-17 Daniel Jacobowitz + + * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test. + +2009-03-17 Alan Modra + + * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit. + Add compact_stub. + (emum _ovly_flavour): Delete ovly_compact, ovly_none. + * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and + ovly_return fields with ovly_entry[2]. Adjust all users. + (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler + when soft-icache. + (spu_elf_build_stubs): Likewise. + (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for + ovly_flavour changes. Update all callers. + (ovl_stub_size_log2): New function. + (build_stub): Handle compact icache stubs. Use different manager + entry point for stubs in non-icache area. + (spu_elf_size_stubs): Don't allocate space for indirect branch + descriptors. + (spu_elf_build_stubs): And don't built them. + +2009-03-16 Andrew Stubbs + + * dwarf2.c (read_section): Always use rawsize, if available. + +2009-03-16 Alan Modra + + * simple.c (bfd_simple_get_relocated_section_contents): Use larger + of rawsize and size for buffer. + +2009-03-15 Ulrich Weigand + + * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay + parameter just because fixed sections fit into local store. + (spu_elf_auto_overlay): Do not declare as "noreturn". Skip + generating overlays if fixed sections plus reserved stack + and heap space fit into local store. + +2009-03-15 Alan Modra + + * elf32-spu.c (build_stub): Correct icache set_id. + (spu_elf_relocate_section): Likewise. + +2009-03-14 Richard Sandiford + + * xcofflink.c (xcoff_link_check_archive_element): Only free the + symbol table if it was created by the current call. + +2009-03-14 Richard Sandiford + + * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors + class XMC_DS rather than XMC_UA. + +2009-03-14 Richard Sandiford + + * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the + bfd_boolean export_defineds parameter with an unsigned int + auto_export_flags parameter. + * bfd-in2.h: Regenerate. + * xcofflink.c (xcoff_archive_contains_shared_object_p): New function, + split out from xcoff_build_ldsyms. + (xcoff_covered_by_expall_p): New function. + (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms + but with extra code to handle -bexpfull and -bexpall. + (xcoff_mark_auto_exports): New function. + (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether + a function should be automatically exported. + (bfd_xcoff_size_dynamic_sections): Replace the export_defineds + parameter with an auto_export_flags parameter. Update ldinfo + accordingly. Use xcoff_mark_auto_exports to mark all automatically- + exported symbols. + +2009-03-14 Richard Sandiford + + * xcofflink.c (xcoff_mark_symbol_by_name): New function. + (bfd_xcoff_size_dynamic_sections): Use it to mark the entry, + init and fini functions. Do garbage collection for objects + without an entry point too. + +2009-03-14 Richard Sandiford + + * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to + check whether a symbol has csect information. + (coff_print_aux): Likewise. + * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect + information for C_AIX_WEAKEXT too. + (_bfd_xcoff_swap_aux_out): Likewise. + (xcoff_reloc_type_br): Handle defweak symbols too. + * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect + information for C_AIX_WEAKEXT too. + (_bfd_xcoff64_swap_aux_out): Likewise. + (xcoff64_reloc_type_br): Handle defweak symbols too. + * coffgen.c (coff_print_symbol): Handle auxillary function + information for C_AIX_WEAKEXT too. + * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK + instead of BSF_GLOBAL if the L_WEAK flag is set. + (xcoff_dynamic_definition_p): New function. + (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym + defines h. Don't change h if ldsym isn't the definition. Otherwise, + always take the symbol class from the ldsym. Use weak bfd symbol + types for weak ldsyms. + (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P. + Fix the check for whether a definition is from a shared object. + Allow redefinitions of weak symbols. + (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P. + (xcoff_keep_symbol_p): Likewise. + (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P. + (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P. + Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols, + but mark them as L_WEAK. + (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT + instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT. + +2009-03-14 Richard Sandiford + + * xcofflink.c (xcoff_mark): When walking the relocations, + only mark the target symbol or the target section, not both. + (xcoff_final_definition_p): New function. + (xcoff_keep_symbol_p): Use it to check whether an external XCOFF + symbol is a valid definition of the associated output symbol. + Use XCOFF_ALLOCATED to stop the same hash table entry having + two output symbols. + (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when + keeping a symbol. + (xcoff_link_input_bfd): Use xcoff_final_definition_p. + +2009-03-14 Richard Sandiford + + * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute + symbols as XMC_XO. + +2009-03-14 Richard Sandiford + + * libcoff-in.h (xcoff_tdata): Add a lineno_counts field. + * libcoff.h: Regenerate. + * xcofflink.c (xcoff_link_add_symbols): Record per-symbol + line-number counts in the bfd's lineno_counts field. + Don't keep per-csect line-number counts. + (xcoff_sweep): Don't update per-csect line-number counts. + (bfd_xcoff_size_dynamic_sections): Count the number of line-number + entries in each output section. + (xcoff_link_input_bfd): Get the number of line numbers from + the bfd's lineno_counts field, rather than recalculating it + from scratch. Fix the range check when updating C_BINCL and + C_EINCL symbols. + (_bfd_xcoff_bfd_final_link): Don't count the output line numbers + here. Don't expect csects to have line-number counts. + +2009-03-14 Richard Sandiford + + * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long. + * libcoff.h: Regenerate. + * xcofflink.c (xcoff_keep_symbol_p): New function, using the + "skip" logic from xcoff_link_input_bfd. + (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic + objects in a dynamic link, rather than checking whether csectpp + is null. Always allocate debug_index for other objects, + and always go through the loop. Update the type of debug_index + after the change above. Read the auxillary csect information + and use xcoff_keep_symbol_p to decide whether a symbol should + be kept. Set its debug_index to -2 if not. + (xcoff_link_input_bfd): Update the type of debug_index after + the change above and always expect it to be nonnull. Use it to + test whether a symbol should be stripped, rather than making the + decision here. Postpone all symbol creation to the second pass. + +2009-03-14 Richard Sandiford + + * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when + creating a descriptor. + (xcoff_sweep): Don't mark toc_section unless it's needed. + (bfd_xcoff_size_dynamic_sections): Skip the toc_section + when marking every bfd. + (xcoff_link_input_bfd): Skip all TOC anchors. + (xcoff_toc_section_p, xcoff_find_tc0): New functions. + (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor + to -1; call xcoff_find_tc0 instead. + +2009-03-14 Richard Sandiford + + * libcoff-in.h (xcoff_section_tdata): Update commentary. + * libcoff.h: Regenerate. + * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER + symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than + the previous symbol's csect. Treat last_symndx as an inclusive value + and simplify its handling. + (xcoff_mark): Treat last_symndx as an inclusive value. Only mark + symbols with the right csect. Don't mark rsec when processing + relocations against undefined or absolute sections. + (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag + of bfd_und_section_ptr. + (xcoff_link_input_bfd): Likewise. + +2009-03-14 Richard Sandiford + + * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations + against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED + flag is set. Assert that all undefined symbols are either + imported or defined by a dynamic object. + * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise. + * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol + handling to all relocations. Only set XCOFF_CALLED for function + symbols. + (xcoff_find_function): New function, split out from... + (bfd_xcoff_export_symbol) ...here. + (xcoff_set_import_path): New function, split out from... + (bfd_xcoff_import_symbol): ...here. Remove assertion for old + meaning of XCOFF_CALLED. + (xcoff_mark_symbol): If we mark an undefined and unimported + symbol, find some way of defining it. If the symbol is a function + descriptor, fill in its definition automatically. If the symbol + is a function, mark its descriptor and allocate room for global + linkage code. Otherwise mark the symbol as implicitly imported. + Move the code for creating function descriptors from... + (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to + check for symbols that were implicitly defined. + (xcoff_mark): Don't count any dynamic relocations against + function symbols. + (bfd_xcoff_size_dynamic_sections): Save the rtld parameter + in the xcoff link info. + (xcoff_link_input_bfd): Remove handling of undefined and + unexported symbols. + +2009-03-14 Richard Sandiford + + * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute + if the target is absolute. Fix comment typo. + (xcoff_ppc_relocate_section): Remove FIXME. + * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute + if the target is absolute. + +2009-03-14 Richard Sandiford + + * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy + R_POS and R_NEG relocations against absolute symbols to the + .loader section. + +2009-03-14 Richard Sandiford + + * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype + to 2 for bfd_mach_ppc_620. + +2009-03-14 Richard Sandiford + + * config.bfd: Treat AIX 6+ in the same way as AIX 5. + * configure.in: Likewise. + * configure: Regenerate. + +2009-03-13 H.J. Lu + + PR binutils/9945 + * elf.c (assign_section_numbers): Generate symbol table if there + is any relocation in output. + (_bfd_elf_compute_section_file_positions): Likewise. + +2009-03-13 Nick Clifton + + PR 9934 + * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section. + * elflink.c (elf_link_read_relocs_from_section): Use + NUM_SHDR_ENTRIES. Gracefully handle the case where there are + relocs but no symbol table. + * elf32-arm.c (elf32_arm_check_relocs): Likewise. + +2009-03-12 H.J. Lu + + PR ld/9938 + * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp + to check ___tls_get_addr. + + * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use + strncmp to check __tls_get_addr. + +2009-03-12 Andrew Stubbs + + * dwarf2.c (read_section): Always check the offset, even when the + section has been read before. + +2009-03-11 H.J. Lu + + * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in + comments. + +2009-03-11 Chris Demetriou + + * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag. + * bfd-in2.h: Regenerate. + * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT + flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file + mode. + (bsd_write_armap): Likewise. + (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT + flag is set, do nothing. + (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0 + for timestamp. + +2009-03-11 Ulrich Weigand + + * elf32-spu.c (find_function_stack_adjust): Handle sf instruction + used to update stack pointer. + +2009-03-07 John David Anglin + + PR binutils/9921 + * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE + for unknown symbols in absolute section. + +2009-03-06 Nick Clifton + + * po/es.po: Updated Spanish translation. + +2009-03-05 Christophe Lyon + + * elf32-arm.c (group_sections): Take next section size into + account before accepting to group it. + +2009-03-05 Christophe Lyon + + * elf32-arm.c (arm_type_of_stub): Handle long branches targetting + PLT entries. + (elf32_arm_final_link_relocate): Likewise. + +2009-03-05 Moritz Kroll + + PR 9923 + * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type. + +2009-03-04 Alan Modra + + * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New. + * section.c (struct bfd_section): Add has_tls_get_addr_call. + (BFD_FAKE_SECTION): Init new flag. + * ecoff.c (bfd_debug_section): Likewise. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD. + (ppc_elf_reloc_type_lookup): Handle new relocs. + (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such + without marker relocs. + (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs + if section has no old-style calls. + (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too. + Don't try to optimize new-style __tls_get_addr call when handling + arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD + relocs. + * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD. + (ppc64_elf_reloc_type_lookup): Handle new relocs. + (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such + without marker relocs. + (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs + if section has no old-style calls. Set toc_ref for new relocs as + appropriate. + (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too. + Don't try to optimize new-style __tls_get_addr call when handling + arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD + relocs. + +2009-03-04 Alan Modra + + PR 6768 + * configure.in: Test for ld --as-needed support. Link shared + libbfd against libm. + * configure: Regenerate. + +2009-03-03 Alan Modra + + * Makefile.am: Run "make dep-am". + * Makefile.in: Regenerate. + +2009-03-02 Qinwei + + * elf32-score7.c: New file. + * elf32-score.h: New file. + * elf32-score.c: Add code to support score 7. Set score7 as the + default. + * cpu-score.c: Add score7 architecure. + (compatibile): New function. + * Makefile.am: Add rules for building elf32-score7 object. + * Makefile.in: Regenerate. + * configure.in: Add elf32-score7 object to score vectors. + * configure: Regenerate. + * reloc.c: Add score7 relocs. + * archures.c: Add score3 and score7 machine numbers. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + +2009-03-01 Ralf Wildenhues + + * configure: Regenerate. + +2009-03-01 John David Anglin + + * elf32-hppa.c (hppa32_elf_local_refcounts): New function. + (elf32_hppa_check_relocs): Use it. + + * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to + elf64-hppa.c. + (elf_hppa_unmark_useless_dynamic_symbols): Likewise. + (elf_hppa_remark_useless_dynamic_symbols): Likewise. + (elf_hppa_is_dynamic_loader_symbol): Likewise. + (elf_hppa_record_segment_addrs): Likewise. + (elf_hppa_final_link): Likewise. + (elf_hppa_relocate_insn): Likewise. + (elf_hppa_final_link_relocate): Likewise. + (elf64_hppa_relocate_section): Likewise. + * elf64-hppa.c: Insert above. + +2009-02-28 John David Anglin + + * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link. + (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table. + (elf_hppa_relocate_section): Likewise. + * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive + from struct elf_link_hash_entry. Add count field. + (struct elf64_hppa_dyn_hash_table): Delete. + (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field. + (elf64_hppa_hash_table): Rename to hppa_link_hash_table. + (hppa_elf_hash_entry, eh_name): Define. + (elf64_hppa_new_dyn_hash_entry): Delete. + (elf64_hppa_dyn_hash_lookup): Delete. + (elf64_hppa_dyn_hash_traverse): Delete. + (get_dyn_name): Delete. + (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead + of struct elf64_hppa_dyn_hash_entry *. + (elf64_hppa_finalize_dlt, llocate_global_data_dlt, + allocate_global_data_plt, allocate_global_data_stub, + allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries): + Likewise. + (hppa64_link_hash_newfunc): New. + (elf64_hppa_hash_table_create): Rework. + (count_dyn_reloc): Likewise. + (hppa64_elf_local_refcounts): New. + (elf64_hppa_check_relocs): Rework using standard technique for recording + local DLT, PLT and OPD reference counts. + (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct + elf_link_hash_entry *. + (elf64_hppa_mark_exported_functions, allocate_global_data_dlt, + allocate_global_data_plt, allocate_global_data_stub, + allocate_global_data_opd, allocate_dynrel_entries, + elf64_hppa_adjust_dynamic_symbol, + elf64_hppa_mark_milli_and_exported_functions): Likewise. + (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections): + Use hppa_link_hash_table. Rework. + (elf64_hppa_link_output_symbol_hook): Rework. + (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd, + elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc, + elf64_hppa_finish_dynamic_sections): Likewise. + +2009-02-26 Christophe Lyon + + * elf32-arm.c (stub_reloc_type): Removed. + (insn_sequence): Renamed reloc_type field to r_type. + (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub. + (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise. + (elf32_arm_stub_long_branch_thumb_only_pic): Likewise. + (elf32_arm_stub_type): Add new enum entries for the new stubs. + (arm_stub_is_thumb): Catch new stubs. + (arm_type_of_stub): Handle new stubs. + (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs. + (bfd_elf32_arm_process_before_allocation): Remove useless + condition. + +2009-02-25 H.J. Lu + + * elf.c (elf_find_function): Use is_function_type to check + function symbol. + +2009-02-24 Sterling Augustine + + * xtensa-modules.c: Revert to previous version 1.11 due + to inadvertant commit. + +2009-02-24 Sterling Augustine + + * elf32-xtensa.c (text_action_add): Separate test for action + type. Break if saved action is ta_widen_insn at same offset. + +2009-02-24 Daniel Jacobowitz + + * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename + to elf32_arm_stub_long_branch_any_arm_pic. + (elf32_arm_stub_long_branch_any_thumb_pic): New. + (enum elf32_arm_stub_type, arm_type_of_stub) + (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC + separately. + +2009-02-24 Joseph Myers + + * elf32-arm.c (PREV_SEC): Update comment. + (group_sections): Rename argument to stubs_always_after_branch. + Reverse the list and place stubs at the end of input sections. + Undefine NEXT_SEC. + (elf32_arm_size_stubs): Update to use stubs_always_after_branch. + +2009-02-23 Daniel Jacobowitz + + * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset. + Fix formatting. + (arm_size_one_stub): Remove unnecessary break. + (arm_map_one_stub): Fix formatting. Return after BFD_FAIL. + +2009-02-23 Christophe Lyon + + * elf32-arm.c (stub_insn_type): New type. + (stub_reloc_type): Likewise. + (insn_sequence): Likewise. + (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence. + (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise. + (elf32_arm_stub_long_branch_thumb_only): Likewise. + (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise. + (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise. + (elf32_arm_stub_long_branch_any_any_pic): Likewise. + (elf32_arm_stub_hash_entry): Add new helper fields. + (stub_hash_newfunc): Initialize these new fields. + (arm_build_one_stub): Encode Arm and Thumb instructions separately + to take endianness into account. + (arm_size_one_stub): Compute size of stubs using insn_sequence. + (arm_map_one_stub): Code is now more generic, thanks to + insn_sequence. + +2009-02-23 Christophe Lyon + + * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub + code. + (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise. + (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when + BLX is not available. Fix typo in warning message. Add comments + and improve formatting. + (arm_build_one_stub): Adjust to new + elf32_arm_stub_long_branch_v4t_thumb_arm stub. + (arm_map_one_stub): Likewise. + +2009-02-23 Tristan Gingold + Eric Botcazou + Douglas B Rupp + + * vms.h: Update copyright year, fix comments, reorder declarations. + (_bfd_save_vms_section): Remove the prototype. + (EGPS_S_V_NO_SHIFT): New constant. + (bfd_vms_set_section_flags): New prototype. + (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New + constants. + (EGSY_S_W_FLAGS): Ditto. + (EGSY_S_V_QUAD_VAL): Ditto. + (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto. + (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX, + EGST_S_B_NAMLNG): Ditto. + (ESRF_S_B_NAMLNG): Ditto. + (ETIR_S_C_HEADER_SIZE): Ditto. + (EGPS_S_V_ALLOC_64BIT): Ditto. + (DST_S_C_EPILOG): Ditto. + (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto. + (DST_S_C_SRC_INCRLNUM_B): Ditto. + (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto. + (DST_S_L_PCLINE_UNSLONG): Ditto. + (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto + (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto + (DST_S_C_SOURCE_HEADER_SIZE): Ditto. + (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto. + (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto. + (DST_S_B_SRC_UNSBYTE): Ditto. + (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto. + Add prototypes. + (vms_section, vms_reloc): Remove types. + (hdr_struc): Replaced by ... + (hdr_struct): ... new type. + (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants. + (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto. + (EMH_DATE_LENGTH): Ditto. + (eom_struc): Replaced by ... + (eom_struct): ... new type. + (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants. + (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto. + (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto. + (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto. + (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto. + (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto. + (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto. + (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto. + (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto. + (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto. + (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto. + (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto. + (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto. + (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto. + (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto. + (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto. + (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto. + (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH) + (DBG_S_C_DMT_PSECT_SIZE): Ditto. + (enum file_type_enum): New type. + (struct location_struct): Removed. + (struct fileinfo, struct srecinfo, struct lineinfo): New types. + (struct funcinfo, struct module): Ditto. + (struct vms_private_data_struct): Update fields. + (struct vms_section_data_struct): New type. + + * vms.c: Update copyright year, fix comments, + Fix includes for DECC, add prototypes. + (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove + some initializers. + Use flavour to set is_vax, location_stack is removed. + (struct pair): Declare. + (fill_section_ptr): Initialize variables at declaration. + Add guard to set SECTION_SYM flag, handlde und section. + (vms_fixup_sections): Use struct pair for fill_section_ptr argument. + (_bfd_vms_slurp_object_records): New function, replaces previous + vms_object_p. + (vms_slurp_module): New function. + (vms_slurp_image): Ditto. + (vms_object_p): Complete rewrite. + (vms_mkobject): Use is_vax field to slect architecture. + (free_reloc_stream): New function. + (vms_convert_to_var): Ditto. + (vms_convert_to_var_1): Ditto. + (vms_convert_to_var_unix_filename): Ditto. + (vms_close_and_cleanup): Call free_reloc_stream, convert file to + VAR format on VMS. + (vms_new_section_hook): Set alignment to 0, allocate private data. + (vms_get_section_contents): Load content. + (vms_get_symbol_info): Handle undefined section. + (vms_find_nearest_line): Handle. + (alloc_reloc_stream): New function. + (vms_slurp_reloc_table): Ditto. + (vms_get_reloc_upper_bound): Make it real. + (vms_canonicalize_reloc): Do the real work. + (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA, + ALPHA_R_BOH. + (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH. + (vms_set_arch_mach): Check arch. + (vms_set_section_contents): Copy the content after allocation. + (vms_alpha_vec): Update object flags. + + * vms-tir.c: Update copyright year, fix comments, + add prototypes for new functions. + (dst_define_location): New function. + (dst_restore_location): New function. + (dst_retrieve_location): New function. + (dst_check_allocation): New function. + (image_dump): Call dst_check_allocation. + (image_write_b): Ditto. + (image_write_w): Ditto. + (image_write_l): Ditto. + (image_write_q): Ditto. + (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW, + STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC, + CTL_STKDL. + Call error handler instead of abort if name is not known. + (etir_sta): Add quarter_relocs argument and set it. + Fix cast. + (etir_sto): Ditto. + (etir_opr): Ditto, return FALSE in case of error. + (etir_ctl): Add quarter_relocs argument and set it, fix cast. + Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL. + (etir_stc): Add quarter_relocs argument and set it, fix cast. + Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA. + Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL. + Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS. + Return FALSE in case of error. + (tir_sta): Change sign of psect. + (tir_ctl): Ditto. + (tir_cmd): Fix cast. Makes tir_table static const. + (etir_cmd): Add quarter_relocs argument, makes etir_table const, + add argument to explain. + (analyze_etir): Initialize maxptr, add quarter_relocs + declaration, move some declarations into inner scopes. + Handle quarter_relocs and STO_IMM. + (_bfd_vms_slurp_tir): Use constant instead of hard-coded values. + (_bfd_vms_slurp_relocs): New function. + (_bfd_vms_decode_relocs): New function. + (sto_imm): Rewritten. + (start_first_etbt_record): New function. + (start_another_etbt_record): Ditto. + (etir_output_check): Ditto. + (defer_reloc_p): Ditto. + (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to + a for-loop. Correctly deals with contents, deals with .vmsdebug, + rewritte relocations handling. + (_bfd_vms_write_tbt): Removed. + (_bfd_vms_write_dbg): Ditto. + + * vms-misc.c: Update copyright year, Fix comments. + (_bfd_vms_get_header_values): Use 'size' instead of 'length'. + (maybe_adjust_record_pointer_for_object): New function. + (_bfd_vms_get_first_record): New function, replaces ... + (_bfd_vms_get_record): .. removed. + (_bfd_vms_get_object_record): New function. + (_bfd_vms_get_object_record): New function. + (vms_get_remaining_object_record): New function, replaces ... + (_bfd_vms_get_next_record): ... removed. + (add_new_contents): Removed. + (_bfd_save_vms_section): Removed. + (_bfd_get_vms_section): Removed. + (_bfd_vms_output_flush): Write in VAR format. + (new_symbol): Don't make UND section. + + * vms-hdr.c: Update copyright year, update list of record handled. + (_bfd_vms_slurp_hdr): rec_length renamed to rec_size. + (_bfd_vms_write_hdr): Strip vms and unix patches, + add comments, truncate module name at 31 characters, + use constants instead of hard-coded value, + write BFD version instead of a fixed string. + (_bfd_vms_slurp_ihd): New function. + (_bfd_vms_slurp_isd): Ditto. + (_bfd_vms_slurp_ihs): Ditto. + (new_module): Ditto. + (parse_module): Ditto + (build_module_list): Ditto. + (module_find_nearest_line): Ditto. + (_bfd_vms_find_nearest_dst_line): Ditto. + (vms_slurp_debug): Ditto. + (_bfd_vms_slurp_dbg): Ditto. + (_bfd_vms_slurp_tbt): Ditto. + (_bfd_vms_write_dbg): Ditto. + (_bfd_vms_write_tbt): Ditto. + + * vms-gsd.c: Update copyright year, update list of records handled. + (EVAX_LITERALS_NAME): New macro. + (evax_section_flags): Add an entry for EVAX_LITERALS_NAME. + (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd. + (register_universal_symbol): New function and prototype. + (_bfd_vms_slurp_gsd): Fix indentations and casts, + improve debug messages, + use constants instead of hard-coded value, + fix missing endianness conversion, + handle global symbol (SYMG). + (bfd_vms_set_section_flags): New function. + (_bfd_vms_write_gsd): Don't write .vmsdebug section, + handle section literals, + fix indentation, + handle section bfd and vms flags, + don't output LIB$INITIALIZE symbol, + fix handling of weak symbols, + fix evax vs vax procedure descriptor, + handle absolute symbols. + + * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR, + BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations. + + * makefile.vms (DEFS): Fix flags for VMS. + + * bfdio.c (real_fopen): Handle multiple VMS fopen attributes. + + * bfd-in2.h: Regenerated. + * libbfd.h: Regenerated. + +2009-02-20 Cary Coutant + + * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime + in struct stat. + +2009-18-02 Dave Korn + + PR gas/7059 + * coffcode.h (coff_write_object_contents): Don't let the string + table offset overflow the s_name field when using long section names. + +2009-18-02 Dave Korn + + * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which + control long section name handling with ECOFF_NO_LONG_SECTION_NAMES. + * coff-mips.c (mips_ecoff_backend_data): Likewise. + * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which + control long section name handling with XCOFF_NO_LONG_SECTION_NAMES. + (bfd_pmac_xcoff_backend_data): Likewise. + * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise. + (bfd_xcoff_aix5_backend_data): Likewise. + (xcoff64_write_object_contents): Delete unused long_section_names + local variable. + * coff-sh.c (bfd_coff_small_swap_table): Initialise long section + name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire + struct non-const. + * coffcode.h (documentation): Update to describe long section names. + (COFFLONGSECTIONCATHELPER): New helper macro. + (BLANKOR1TOODD): Likewise. + (COFF_ENABLE_LONG_SECTION_NAMES): Likewise. + (COFF_LONG_SECTION_NAMES_SETTER): Likewise. + (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise. + (bfd_coff_set_long_section_names_allowed): New function. + (bfd_coff_set_long_section_names_disallowed): Likewise. + (struct bfd_coff_backend_data): Add new backend hook function + pointer _bfd_coff_set_long_section_names. + (bfd_coff_set_long_section_names): New backend hook. + (coff_write_object_contents): Only generate long section names if + bfd_coff_long_section_names() indicates they are currently enabled. + (bfd_coff_std_swap_table): Make non-const, and initialise long + section name fields using COFF_DEFAULT_LONG_SECTION_NAMES. + (ticoff0_swap_table): Likewise to both. + (ticoff1_swap_table): Again, likewise to both. + * coffgen.c (make_a_section_from_file): Allow long section names + as inputs even if not currently allowed for outputs. + * ecoff.c (_bfd_ecoff_no_long_sections): New function. + * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank. + * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise. + * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise. + * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise. + * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise. + * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise. + * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise. + * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise. + * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise. + * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise. + * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise. + * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise. + * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise. + * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise. + * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise. + * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise. + * libcoff-in.h: Update copyright year to cause updated copyright + year in generated libcoff.h, and fix typo. + * libcoff.h: Regenerated. + * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro. + (_bfd_ecoff_no_long_sections): Add prototype. + * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro. + * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already + defined by an including .c file. + * ticoff.h (ticoff0_swap_table): Make non-const, and initialise + long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES. + (ticoff1_swap_table): Likewise to both. + +2009-02-18 Christophe Lyon + + * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic + stub. Catch default case error. + (arm_map_one_stub): Add missing Thumb mapping symbol. + +2009-02-18 Bjoern Haase + + PR 9841 + * elf32-avr.c: Handle case where no local symbos exist correctly. + +2009-02-16 Christophe Lyon + + bfd/ + * elf32-arm.c (arm_long_branch_stub, + arm_thumb_v4t_long_branch_stub, + arm_thumb_thumb_long_branch_stub, + arm_thumb_arm_v4t_long_branch_stub, + arm_thumb_arm_v4t_short_branch_stub, + arm_pic_long_branch_stub): + Renamed to elf32_arm_stub_long_branch_any_any, + elf32_arm_stub_long_branch_v4t_arm_thumb, + elf32_arm_stub_long_branch_thumb_only, + elf32_arm_stub_long_branch_v4t_thumb_arm, + elf32_arm_stub_short_branch_v4t_thumb_arm, + elf32_arm_stub_long_branch_any_any_pic. + (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch, + arm_thumb_thumb_stub_long_branch, + arm_thumb_arm_v4t_stub_long_branch, + arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch): + Renamed to arm_stub_long_branch_any_any, + arm_stub_long_branch_v4t_arm_thumb, + arm_stub_long_branch_thumb_only, + arm_stub_long_branch_v4t_thumb_arm, + arm_stub_short_branch_v4t_thumb_arm, + arm_stub_long_branch_any_any_pic. + +2009-02-15 John David Anglin + + * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used + in branch offset check. + +2009-02-15 Alan Modra + + * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx, + add toc.symndx and toc.add. + (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here. + Set up toc.add. + (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all + callers. + (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd. + (branch_reloc_hash_match): New function, extracted from.. + (ppc64_elf_tls_optimize): ..here. + (ppc64_elf_relocate_section): Properly set addends when optimizing + tls sequences. Avoid unnecessary reading and writing of insns. + Only redo reloc when symbol changed. Bypass symbol checks when + using tlsld_got. + * elf32-ppc.c (ppc_elf_tls_setup): Correct comment. + (branch_reloc_hash_match): New function, extracted from.. + (ppc_elf_tls_optimize): ..here. + (ppc_elf_relocate_section): Avoid unnecessary reading of insns. + Don't clear addend on zapped __tls_get_addr reloc. + +2009-02-12 Nick Clifton + + PR 9827 + * elflink.c (bfd_elf_final_link): When counting the relocations, + if the header size has not been set yet then assume that it will + match the output section's reloc type. + +2009-02-12 Nathan Sidwell + + * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for + relocatable link. + +2009-02-09 Alan Modra + + * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors. + (find_function): Likewise. + (pasted_function): Don't error if no prior function found. + (discover_functions): Revert 2008-12-10 change. Extend first + function range to start of section. + +2009-02-08 John David Anglin + + * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert + functions to C90. + * elf64-hppa.h: Likewise. + +2009-02-06 Joseph Myers + + * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special + .sbss handling. + 2009-02-04 Alan Modra * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize. @@ -21,11 +4299,11 @@ 2009-02-03 Carlos O'Donell * configure.in: AC_SUBST pdfdir. - * Makefile.am: Add install-pdf, install-pdf-am + * Makefile.am: Add install-pdf, install-pdf-am and install-pdf-recursive targets. Define pdfdir. * doc/Makefile.am: Define pdf__strip_dir. Add install-pdf and install-pdf-am targets. - * po/Make-in: Add install-pdf target. + * po/Make-in: Add install-pdf target. * configure: Regenerate. * Makefile.in: Regenerate * doc/Makefile.in: Regenerate. @@ -68,7 +4346,7 @@ update. (elf_m68k_remove_got_entry_type): Update. (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions. - (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary + (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary update of sgot->size and srelgot->size. (elf_m68k_gc_sweep_hook): Update. (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions. @@ -112,8 +4390,8 @@ high_pc in order to properly sign-extend VMAs. 2009-01-29 Daniel Jacobowitz - Mark Shinwell - Catherine Moore + Mark Shinwell + Catherine Moore * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments. diff --git a/cegcc/src/binutils/bfd/Makefile.am b/cegcc/src/binutils/bfd/Makefile.am dissimilarity index 76% index 8d67cb8ef..b569f84d8 100644 --- a/cegcc/src/binutils/bfd/Makefile.am +++ b/cegcc/src/binutils/bfd/Makefile.am @@ -1,2039 +1,962 @@ -## Process this file with automake to generate Makefile.in - -AUTOMAKE_OPTIONS = 1.9 cygnus -ACLOCAL_AMFLAGS = -I . -I .. -I ../config - -# Uncomment the following line when doing a release. -# RELEASE=y - -INCDIR = $(srcdir)/../include -CSEARCH = -I. -I$(srcdir) -I$(INCDIR) -MKDEP = gcc -MM - -SUBDIRS = doc po - -bfddocdir = doc -bfdlibdir = @bfdlibdir@ -bfdincludedir = @bfdincludedir@ - -datarootdir = @datarootdir@ -docdir = @docdir@ -htmldir = @htmldir@ -pdfdir = @pdfdir@ - -bfdlib_LTLIBRARIES = libbfd.la - -WARN_CFLAGS = @WARN_CFLAGS@ -NO_WERROR = @NO_WERROR@ -AM_CFLAGS = $(WARN_CFLAGS) - -# bfd.h goes here, for now -BFD_H = bfd.h - -# Jim Kingdon notes: -# Writing S-records should be included in all (or at least most) -# *-*-coff, *-*-aout, etc., configurations, because people will want to -# be able to use objcopy to create S-records. (S-records are not useful -# for the debugger, so if you are downloading things as S-records you -# need two copies of the executable, one to download and one for the -# debugger). -BFD32_LIBS = \ - archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \ - cache.lo coffgen.lo corefile.lo \ - format.lo init.lo libbfd.lo opncls.lo reloc.lo \ - section.lo syms.lo targets.lo hash.lo linker.lo \ - srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \ - merge.lo dwarf2.lo simple.lo compress.lo - -BFD64_LIBS = archive64.lo - -BFD32_LIBS_CFILES = \ - archive.c archures.c bfd.c bfdio.c bfdwin.c \ - cache.c coffgen.c corefile.c \ - format.c init.c libbfd.c opncls.c reloc.c \ - section.c syms.c targets.c hash.c linker.c \ - srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \ - merge.c dwarf2.c simple.c compress.c - -BFD64_LIBS_CFILES = archive64.c - -# This list is alphabetized to make it easier to keep in sync -# with the decls and initializer in archures.c. -ALL_MACHINES = \ - cpu-alpha.lo \ - cpu-arc.lo \ - cpu-arm.lo \ - cpu-avr.lo \ - cpu-bfin.lo \ - cpu-cr16.lo \ - cpu-cr16c.lo \ - cpu-cris.lo \ - cpu-crx.lo \ - cpu-d10v.lo \ - cpu-d30v.lo \ - cpu-dlx.lo \ - cpu-fr30.lo \ - cpu-frv.lo \ - cpu-h8300.lo \ - cpu-h8500.lo \ - cpu-hppa.lo \ - cpu-ia64.lo \ - cpu-i370.lo \ - cpu-i386.lo \ - cpu-i860.lo \ - cpu-i960.lo \ - cpu-ip2k.lo \ - cpu-iq2000.lo \ - cpu-lm32.lo \ - cpu-m32c.lo \ - cpu-m32r.lo \ - cpu-m68hc11.lo \ - cpu-m68hc12.lo \ - cpu-m68k.lo \ - cpu-m88k.lo \ - cpu-m10200.lo \ - cpu-m10300.lo \ - cpu-maxq.lo \ - cpu-mcore.lo \ - cpu-mep.lo \ - cpu-mips.lo \ - cpu-mmix.lo \ - cpu-mt.lo \ - cpu-msp430.lo \ - cpu-or32.lo \ - cpu-ns32k.lo \ - cpu-openrisc.lo \ - cpu-pdp11.lo \ - cpu-pj.lo \ - cpu-powerpc.lo \ - cpu-rs6000.lo \ - cpu-s390.lo \ - cpu-score.lo \ - cpu-sh.lo \ - cpu-sparc.lo \ - cpu-spu.lo \ - cpu-tic30.lo \ - cpu-tic4x.lo \ - cpu-tic54x.lo \ - cpu-tic80.lo \ - cpu-v850.lo \ - cpu-vax.lo \ - cpu-we32k.lo \ - cpu-w65.lo \ - cpu-xstormy16.lo \ - cpu-xtensa.lo \ - cpu-xc16x.lo \ - cpu-z80.lo \ - cpu-z8k.lo - -ALL_MACHINES_CFILES = \ - cpu-alpha.c \ - cpu-arc.c \ - cpu-arm.c \ - cpu-avr.c \ - cpu-bfin.c \ - cpu-cr16.c \ - cpu-cris.c \ - cpu-cr16c.c \ - cpu-crx.c \ - cpu-d10v.c \ - cpu-d30v.c \ - cpu-dlx.c \ - cpu-fr30.c \ - cpu-frv.c \ - cpu-h8300.c \ - cpu-h8500.c \ - cpu-hppa.c \ - cpu-ia64.c \ - cpu-i370.c \ - cpu-i386.c \ - cpu-i860.c \ - cpu-i960.c \ - cpu-ip2k.c \ - cpu-iq2000.c \ - cpu-lm32.c \ - cpu-m32c.c \ - cpu-m32r.c \ - cpu-m68hc11.c \ - cpu-m68hc12.c \ - cpu-m68k.c \ - cpu-m88k.c \ - cpu-m10200.c \ - cpu-m10300.c \ - cpu-maxq.c \ - cpu-mcore.c \ - cpu-mep.c \ - cpu-mips.c \ - cpu-mmix.c \ - cpu-mt.c \ - cpu-msp430.c \ - cpu-or32.c \ - cpu-ns32k.c \ - cpu-openrisc.c \ - cpu-pdp11.c \ - cpu-pj.c \ - cpu-powerpc.c \ - cpu-rs6000.c \ - cpu-s390.c \ - cpu-score.c \ - cpu-sh.c \ - cpu-sparc.c \ - cpu-spu.c \ - cpu-tic30.c \ - cpu-tic4x.c \ - cpu-tic54x.c \ - cpu-tic80.c \ - cpu-v850.c \ - cpu-vax.c \ - cpu-we32k.c \ - cpu-w65.c \ - cpu-xstormy16.c \ - cpu-xtensa.c \ - cpu-xc16x.c \ - cpu-z80.c \ - cpu-z8k.c - -# The .o files needed by all of the 32 bit vectors that are configured into -# target_vector in targets.c if configured with --enable-targets=all. -BFD32_BACKENDS = \ - aout-adobe.lo \ - aout-arm.lo \ - aout-cris.lo \ - aout-ns32k.lo \ - aout-sparcle.lo \ - aout-tic30.lo \ - aout0.lo \ - aout32.lo \ - armnetbsd.lo \ - bout.lo \ - cf-i386lynx.lo \ - cf-sparclynx.lo \ - coff-apollo.lo \ - coff-arm.lo \ - coff-aux.lo \ - coff-h8300.lo \ - coff-h8500.lo \ - coff-i386.lo \ - coff-go32.lo \ - coff-i860.lo \ - coff-i960.lo \ - coff-m68k.lo \ - coff-m88k.lo \ - coff-maxq.lo \ - coff-mips.lo \ - coff-or32.lo \ - coff-rs6000.lo \ - coff-sh.lo \ - coff-sparc.lo \ - coff-stgo32.lo \ - coff-svm68k.lo \ - coff-tic30.lo \ - coff-tic4x.lo \ - coff-tic54x.lo \ - coff-tic80.lo \ - coff-u68k.lo \ - coff-we32k.lo \ - coff-w65.lo \ - coff-z80.lo \ - coff-z8k.lo \ - cofflink.lo \ - dwarf1.lo \ - ecoff.lo \ - ecofflink.lo \ - efi-app-ia32.lo \ - efi-bsdrv-ia32.lo \ - efi-rtdrv-ia32.lo \ - elf.lo \ - elf32-am33lin.lo \ - elf32-arc.lo \ - elf32-arm.lo \ - elf32-avr.lo \ - elf32-bfin.lo \ - elf32-cr16.lo \ - elf32-cr16c.lo \ - elf32-cris.lo \ - elf32-crx.lo \ - elf32-d10v.lo \ - elf32-d30v.lo \ - elf32-dlx.lo \ - elf32-fr30.lo \ - elf32-frv.lo \ - elf32-gen.lo \ - elf32-h8300.lo \ - elf32-hppa.lo \ - elf32-i370.lo \ - elf32-i386.lo \ - elf32-i860.lo \ - elf32-i960.lo \ - elf32-ip2k.lo \ - elf32-iq2000.lo \ - elf32-lm32.lo \ - elf32-m32c.lo \ - elf32-m32r.lo \ - elf32-m68hc11.lo \ - elf32-m68hc12.lo \ - elf32-m68hc1x.lo \ - elf32-m68k.lo \ - elf32-m88k.lo \ - elf-m10200.lo \ - elf-m10300.lo \ - elf32-mcore.lo \ - elf32-mep.lo \ - elfxx-mips.lo \ - elf32-mips.lo \ - elf32-mt.lo \ - elf32-msp430.lo \ - elf32-openrisc.lo \ - elf32-or32.lo \ - elf32-pj.lo \ - elf32-ppc.lo \ - elf32-s390.lo \ - elf32-score.lo \ - elf32-sh.lo \ - elf32-sh-symbian.lo \ - elf32-sh64.lo \ - elf32-sh64-com.lo \ - elfxx-sparc.lo \ - elf32-sparc.lo \ - elf32-spu.lo \ - elf32-v850.lo \ - elf32-vax.lo \ - elf32-xstormy16.lo \ - elf32-xtensa.lo \ - elf32-xc16x.lo \ - elf32.lo \ - elflink.lo \ - elf-attrs.lo \ - elf-strtab.lo \ - elf-eh-frame.lo \ - elf-vxworks.lo \ - epoc-pe-arm.lo \ - epoc-pei-arm.lo \ - hp300bsd.lo \ - hp300hpux.lo \ - som.lo \ - i386aout.lo \ - i386bsd.lo \ - i386dynix.lo \ - i386freebsd.lo \ - i386linux.lo \ - i386lynx.lo \ - i386msdos.lo \ - i386netbsd.lo \ - i386mach3.lo \ - i386os9k.lo \ - ieee.lo \ - m68k4knetbsd.lo \ - m68klinux.lo \ - m68knetbsd.lo \ - m88kmach3.lo \ - m88kopenbsd.lo \ - mach-o.lo \ - mipsbsd.lo \ - newsos3.lo \ - nlm.lo \ - nlm32-i386.lo \ - nlm32-sparc.lo \ - nlm32-ppc.lo \ - nlm32.lo \ - ns32knetbsd.lo \ - oasys.lo \ - pc532-mach.lo \ - pdp11.lo \ - pef.lo \ - pe-arm.lo \ - pei-arm.lo \ - pe-arm-wince.lo \ - pei-arm-wince.lo \ - pe-i386.lo \ - pei-i386.lo \ - pe-mcore.lo \ - pei-mcore.lo \ - pe-ppc.lo \ - pei-ppc.lo \ - pe-sh.lo \ - pei-sh.lo \ - pe-mips.lo \ - pei-mips.lo \ - peigen.lo \ - ppcboot.lo \ - reloc16.lo \ - riscix.lo \ - sparclinux.lo \ - sparclynx.lo \ - sparcnetbsd.lo \ - sunos.lo \ - vaxnetbsd.lo \ - vax1knetbsd.lo \ - vaxbsd.lo \ - versados.lo \ - vms.lo \ - vms-gsd.lo \ - vms-hdr.lo \ - vms-misc.lo \ - vms-tir.lo \ - vmsutil.lo \ - xcofflink.lo \ - xsym.lo \ - xtensa-isa.lo \ - xtensa-modules.lo - -BFD32_BACKENDS_CFILES = \ - aout-adobe.c \ - aout-arm.c \ - aout-cris.c \ - aout-ns32k.c \ - aout-sparcle.c \ - aout-tic30.c \ - aout0.c \ - aout32.c \ - armnetbsd.c \ - bout.c \ - cf-i386lynx.c \ - cf-sparclynx.c \ - coff-apollo.c \ - coff-arm.c \ - coff-aux.c \ - coff-h8300.c \ - coff-h8500.c \ - coff-i386.c \ - coff-i860.c \ - coff-go32.c \ - coff-i960.c \ - coff-m68k.c \ - coff-m88k.c \ - coff-maxq.c \ - coff-mips.c \ - coff-or32.c \ - coff-rs6000.c \ - coff-sh.c \ - coff-sparc.c \ - coff-stgo32.c \ - coff-svm68k.c \ - coff-tic30.c \ - coff-tic4x.c \ - coff-tic54x.c \ - coff-tic80.c \ - coff-u68k.c \ - coff-we32k.c \ - coff-w65.c \ - coff-z80.c \ - coff-z8k.c \ - cofflink.c \ - dwarf1.c \ - ecoff.c \ - ecofflink.c \ - efi-app-ia32.c \ - efi-bsdrv-ia32.c \ - efi-rtdrv-ia32.c \ - elf.c \ - elf32-am33lin.c \ - elf32-arc.c \ - elf32-arm.c \ - elf32-avr.c \ - 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-fr30.c \ - elf32-frv.c \ - elf32-gen.c \ - elf32-h8300.c \ - elf32-hppa.c \ - elf32-i370.c \ - elf32-i386.c \ - elf32-i860.c \ - elf32-i960.c \ - elf32-ip2k.c \ - elf32-iq2000.c \ - elf32-lm32.c \ - elf32-m32c.c \ - elf32-m32r.c \ - elf32-m68k.c \ - elf32-m68hc11.c \ - elf32-m68hc12.c \ - elf32-m68hc1x.c \ - elf32-m88k.c \ - elf-m10200.c \ - elf-m10300.c \ - elf32-mcore.c \ - elf32-mep.c \ - elfxx-mips.c \ - elf32-mips.c \ - elf32-mt.c \ - elf32-msp430.c \ - elf32-openrisc.c \ - elf32-or32.c \ - elf32-pj.c \ - elf32-ppc.c \ - elf32-sh64.c \ - elf32-sh64-com.c \ - elf32-s390.c \ - elf32-score.c \ - elf32-sh.c \ - elf32-sh-symbian.c \ - elfxx-sparc.c \ - elf32-sparc.c \ - elf32-spu.c \ - elf32-v850.c \ - elf32-vax.c \ - elf32-xstormy16.c \ - elf32-xtensa.c \ - elf32-xc16x.c \ - elf32.c \ - elflink.c \ - elf-attrs.c \ - elf-strtab.c \ - elf-eh-frame.c \ - elf-vxworks.c \ - epoc-pe-arm.c \ - epoc-pei-arm.c \ - hp300bsd.c \ - hp300hpux.c \ - som.c \ - i386aout.c \ - i386bsd.c \ - i386dynix.c \ - i386freebsd.c \ - i386linux.c \ - i386lynx.c \ - i386msdos.c \ - i386netbsd.c \ - i386mach3.c \ - i386os9k.c \ - ieee.c \ - m68k4knetbsd.c \ - m68klinux.c \ - m68knetbsd.c \ - m88kmach3.c \ - m88kopenbsd.c \ - mach-o.c \ - mipsbsd.c \ - newsos3.c \ - nlm.c \ - nlm32-i386.c \ - nlm32-sparc.c \ - nlm32-ppc.c \ - nlm32.c \ - ns32knetbsd.c \ - oasys.c \ - pc532-mach.c \ - pdp11.c \ - pef.c \ - pe-arm.c \ - pei-arm.c \ - pe-arm-wince.c \ - pei-arm-wince.c \ - pe-i386.c \ - pei-i386.c \ - pe-mcore.c \ - pei-mcore.c \ - pe-ppc.c \ - pei-ppc.c \ - pe-sh.c \ - pei-sh.c \ - pe-mips.c \ - pei-mips.c \ - ppcboot.c \ - reloc16.c \ - riscix.c \ - sparclinux.c \ - sparclynx.c \ - sparcnetbsd.c \ - sunos.c \ - vaxnetbsd.c \ - vax1knetbsd.c \ - vaxbsd.c \ - versados.c \ - vms.c \ - vms-gsd.c \ - vms-hdr.c \ - vms-misc.c \ - vms-tir.c \ - vmsutil.c \ - xcofflink.c \ - xsym.c \ - xtensa-isa.c \ - xtensa-modules.c - -# The .o files needed by all of the 64 bit vectors that are configured into -# target_vector in targets.c if configured with --enable-targets=all -# and --enable-64-bit-bfd. -# elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in -# BFD32_BACKENDS. -BFD64_BACKENDS = \ - aix5ppc-core.lo \ - aout64.lo \ - coff-alpha.lo \ - coff64-rs6000.lo \ - demo64.lo \ - efi-app-ia64.lo \ - efi-bsdrv-ia64.lo \ - efi-rtdrv-ia64.lo \ - efi-app-x86_64.lo \ - efi-bsdrv-x86_64.lo \ - efi-rtdrv-x86_64.lo \ - elf64-x86-64.lo \ - elf64-alpha.lo \ - elf64-hppa.lo \ - elf32-ia64.lo \ - elf64-ia64.lo \ - elf64-gen.lo \ - elfn32-mips.lo \ - elf64-mips.lo \ - elf64-mmix.lo \ - elf64-sh64.lo \ - elf64-ppc.lo \ - elf64-s390.lo \ - elf64-sparc.lo \ - elf64.lo \ - mmo.lo \ - nlm32-alpha.lo \ - nlm64.lo \ - coff-x86_64.lo \ - pe-x86_64.lo \ - pei-x86_64.lo \ - pepigen.lo \ - pex64igen.lo - -BFD64_BACKENDS_CFILES = \ - aix5ppc-core.c \ - aout64.c \ - coff-alpha.c \ - coff64-rs6000.c \ - demo64.c \ - efi-app-ia64.c \ - efi-bsdrv-ia64.c \ - efi-rtdrv-ia64.c \ - efi-app-x86_64.c \ - efi-bsdrv-x86_64.c \ - efi-rtdrv-x86_64.c \ - elf64-x86-64.c \ - elf64-alpha.c \ - elf64-hppa.c \ - elf64-gen.c \ - elfn32-mips.c \ - elf64-mips.c \ - elf64-mmix.c \ - elf64-ppc.c \ - elf64-s390.c \ - elf64-sh64.c \ - elf64-sparc.c \ - elf64.c \ - mmo.c \ - nlm32-alpha.c \ - nlm64.c \ - coff-x86_64.c \ - pe-x86_64.c \ - pei-x86_64.c - -OPTIONAL_BACKENDS = \ - aix386-core.lo \ - hpux-core.lo \ - irix-core.lo \ - lynx-core.lo \ - osf-core.lo \ - sco5-core.lo \ - trad-core.lo \ - cisco-core.lo - -OPTIONAL_BACKENDS_CFILES = \ - aix386-core.c \ - hpux-core.c \ - irix-core.c \ - lynx-core.c \ - osf-core.c \ - sco5-core.c \ - trad-core.c \ - cisco-core.c - -# We want to rerun configure if configure.in, config.bfd or -# configure.host change. configure.in is needed since the version -# number in Makefile comes from configure.in. -CONFIG_STATUS_DEPENDENCIES = \ - $(srcdir)/configure.in \ - $(srcdir)/config.bfd \ - $(srcdir)/configure.host - -# These are defined by configure.in: -WORDSIZE = @wordsize@ -ALL_BACKENDS = @all_backends@ -BFD_BACKENDS = @bfd_backends@ -BFD_MACHINES = @bfd_machines@ -TDEFAULTS = @tdefaults@ - -INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) @INCINTL@ - -# C source files that correspond to .o's. -SOURCE_CFILES = \ - $(BFD32_LIBS_CFILES) \ - $(BFD64_LIBS_CFILES) \ - $(ALL_MACHINES_CFILES) \ - $(BFD32_BACKENDS_CFILES) \ - $(BFD64_BACKENDS_CFILES) \ - $(OPTIONAL_BACKENDS_CFILES) - -BUILD_CFILES = \ - elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c - -CFILES = $(SOURCE_CFILES) $(BUILD_CFILES) - -## This is a list of all .h files which are in the source tree. -SOURCE_HFILES = \ - aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \ - elf-bfd.h elf-hppa.h elf32-hppa.h \ - elf64-hppa.h elfcode.h elfcore.h \ - freebsd.h genlink.h go32stub.h \ - libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \ - libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \ - netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \ - pef.h pef-traceback.h peicode.h som.h version.h \ - vms.h xcoff-target.h xsym.h - -## ... and all .h files which are in the build tree. -BUILD_HFILES = \ - bfdver.h elf32-target.h elf64-target.h targmatch.h bfd_stdint.h - -HFILES = $(SOURCE_HFILES) $(BUILD_HFILES) - -SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES) -BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES) - -po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES) - for file in $(SRC_POTFILES); do echo $$file; done \ - | LC_ALL=C sort > tmp.src \ - && mv tmp.src $(srcdir)/po/SRC-POTFILES.in - -po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES) - for file in $(BLD_POTFILES); do echo $$file; done \ - | LC_ALL=C sort > tmp.bld \ - && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in - -all diststuff: info - -.PHONY: install-pdf install-pdf-am install-pdf-recursive - -install-pdf: install-pdf-recursive - -install-pdf-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -.PHONY: install-html install-html-am install-html-recursive - -install-html: install-html-recursive - -install-html-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -# Various kinds of .o files to put in libbfd.a: -# BFD_BACKENDS Routines the configured targets need. -# BFD_MACHINES Architecture-specific routines the configured targets need. -# COREFILE Core file routines for a native configuration -# bfd64_libs Routines for 64bit support -OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ @bfd64_libs@ - -stamp-ofiles: Makefile - rm -f tofiles - f=""; \ - for i in $(OFILES) ; do \ - case " $$f " in \ - *" $$i "*) ;; \ - *) f="$$f $$i" ;; \ - esac ; \ - done ; \ - echo $$f > tofiles - $(SHELL) $(srcdir)/../move-if-change tofiles ofiles - touch stamp-ofiles - -ofiles: stamp-ofiles ; @true - -# Since BFD64_LIBS is optional and we can't have substitution in -# libbfd_la_SOURCES, we put BFD64_LIBS in OFILES instead. -libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) -libbfd_la_DEPENDENCIES = $(OFILES) ofiles -libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ -libbfd_la_LDFLAGS = -release `cat libtool-soversion` @SHARED_LDFLAGS@ - -# libtool will build .libs/libbfd.a. We create libbfd.a in the build -# directory so that we don't have to convert all the programs that use -# libbfd.a simultaneously. This is a hack which should be removed if -# everything else starts using libtool. FIXME. - -noinst_LIBRARIES = libbfd.a -libbfd_a_SOURCES = - -stamp-lib: libbfd.la - libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \ - if [ -f $$libtooldir/libbfd.a ]; then \ - cp $$libtooldir/libbfd.a libbfd.tmp; \ - $(RANLIB) libbfd.tmp; \ - $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \ - else true; fi - touch stamp-lib - -libbfd.a: stamp-lib ; @true - -# This file holds an array associating configuration triplets and -# vector names. It is built from config.bfd. It is not compiled by -# itself, but is included by targets.c. -targmatch.h: config.bfd targmatch.sed - rm -f targmatch.h - sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new - mv -f targmatch.new targmatch.h - -# When compiling archures.c and targets.c, supply the default target -# info from configure. - -targets.lo: targets.c Makefile - $(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/targets.c - -archures.lo: archures.c Makefile - $(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/archures.c - -dwarf2.lo: dwarf2.c Makefile - $(LIBTOOL) --mode=compile $(COMPILE) -c -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c - -elf32-target.h : elfxx-target.h - rm -f elf32-target.h - sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new - mv -f elf32-target.new elf32-target.h - -elf64-target.h : elfxx-target.h - rm -f elf64-target.h - sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new - mv -f elf64-target.new elf64-target.h - -elf32-ia64.c : elfxx-ia64.c - rm -f elf32-ia64.c - sed -e s/NN/32/g < $(srcdir)/elfxx-ia64.c > elf32-ia64.new - mv -f elf32-ia64.new elf32-ia64.c - -elf64-ia64.c : elfxx-ia64.c - rm -f elf64-ia64.c - sed -e s/NN/64/g < $(srcdir)/elfxx-ia64.c > elf64-ia64.new - mv -f elf64-ia64.new elf64-ia64.c - -peigen.c : peXXigen.c - rm -f peigen.c - sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new - mv -f peigen.new peigen.c - -pepigen.c : peXXigen.c - rm -f pepigen.c - sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new - mv -f pepigen.new pepigen.c - -pex64igen.c: peXXigen.c - rm -f pex64igen.c - sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new - mv -f pex64igen.new pex64igen.c - -BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h -LOCAL_H_DEPS= libbfd.h sysdep.h config.h -$(BFD32_LIBS) \ - $(BFD64_LIBS) \ - $(ALL_MACHINES) \ - $(BFD32_BACKENDS) \ - $(BFD64_BACKENDS) \ - $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) - -install-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@install_libbfd - @$(NORMAL_INSTALL) - -uninstall-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@uninstall_libbfd - @$(NORMAL_UNINSTALL) - -.PHONY: install_libbfd uninstall_libbfd -install_libbfd: $(bfdlib_LTLIBRARIES) $(BFD_H) - $(mkinstalldirs) $(DESTDIR)$(bfdlibdir) - $(mkinstalldirs) $(DESTDIR)$(bfdincludedir) - @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \ - $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \ - else :; fi; \ - done - $(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(bfdincludedir)/bfd.h - $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(bfdincludedir)/ansidecl.h - $(INSTALL_DATA) $(INCDIR)/symcat.h $(DESTDIR)$(bfdincludedir)/symcat.h - $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(bfdincludedir)/bfdlink.h - -uninstall_libbfd: - list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bfdlibdir)/$$p; \ - done - rm -f $(DESTDIR)$(bfdincludedir)/bfd.h - rm -f $(DESTDIR)$(bfdincludedir)/ansidecl.h - rm -f $(DESTDIR)$(bfdincludedir)/symcat.h - rm -f $(DESTDIR)$(bfdincludedir)/bfdlink.h - -# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES). -DEP: dep.sed $(CFILES) $(HFILES) bfd.h - rm -f DEP1 - $(MAKE) MKDEP="$(MKDEP)" DEP1 - sed -f dep.sed < DEP1 > DEPA - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA - if grep ' /' DEPA > /dev/null 2> /dev/null; then \ - echo 'make DEP failed!'; exit 1; \ - else \ - mv -f DEPA $@; \ - fi - -DEP1: $(CFILES) - echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2 - echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2 - $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2 - mv -f DEP2 $@ - -dep.sed: dep-in.sed config.status - sed <$(srcdir)/dep-in.sed >dep.sed \ - -e 's!@BFD_H@!$(BFD_H)!' \ - -e 's!@SRCDIR@!$(srcdir)!' \ - -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/bfd$$,,`'!' - -dep: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile - cat DEP >> tmp-Makefile - $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile - -dep-in: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in - cat DEP >> tmp-Makefile.in - $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in - -dep-am: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am - cat DEP >> tmp-Makefile.am - $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am - -host-aout.lo: Makefile - -# The following program can be used to generate a simple config file -# which can be folded into an h-XXX file for a new host, with some editing. -aout-params.h: gen-aout - ./gen-aout host > aout-params.h -gen-aout: $(srcdir)/gen-aout.c Makefile - $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c - -$(BFD_H): stmp-bfd-h ; @true - -stmp-bfd-h: bfd-in3.h - rm -f bfd-tmp.h - cp bfd-in3.h bfd-tmp.h - $(SHELL) $(srcdir)/../move-if-change bfd-tmp.h $(BFD_H) - rm -f bfd-tmp.h - touch stmp-bfd-h - -BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \ - reloc.c syms.c bfd.c bfdio.c bfdwin.c \ - archive.c corefile.c targets.c format.c compress.c -BFD64_H_FILES = archive64.c -LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \ - cache.c reloc.c archures.c elf.c -LIBCOFF_H_FILES = libcoff-in.h coffcode.h - -# Could really use a "copy-if-change"... -headers: - (cd $(bfddocdir); $(MAKE) protos $(FLAGS_TO_PASS)) - cp $(bfddocdir)/bfd.h bfd-in2.h-new - $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h - cp $(bfddocdir)/libbfd.h libbfd.h-new - $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h - cp $(bfddocdir)/libcoff.h libcoff.h-new - $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h - -# We only rebuild the header files automatically if we have been -# configured with --enable-maintainer-mode. - -$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true -stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES) - (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h) - cp $(bfddocdir)/bfd.h bfd-in2.h-new - $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h - touch stmp-bin2-h - -$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true -stmp-lbfd-h: $(LIBBFD_H_FILES) - (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h) - cp $(bfddocdir)/libbfd.h libbfd.h-new - $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h - touch stmp-lbfd-h - -$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true -stmp-lcoff-h: $(LIBCOFF_H_FILES) - (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h) - cp $(bfddocdir)/libcoff.h libcoff.h-new - $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h - touch stmp-lcoff-h - -MOSTLYCLEANFILES = ofiles stamp-ofiles - -CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \ - stmp-bin2-h stmp-lbfd-h stmp-lcoff-h - -DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion - -bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in - @echo "creating $@" - @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ - bfd_version_string="\"$(VERSION)\"" ;\ - bfd_soversion="$(VERSION)" ;\ - bfd_version_package="\"$(PKGVERSION)\"" ;\ - report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ - if test "x$(RELEASE)" = x ; then \ - bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\ - bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\ - bfd_soversion="$(VERSION).$${bfd_version_date}" ;\ - fi ;\ - sed -e "s,@bfd_version@,$$bfd_version," \ - -e "s,@bfd_version_string@,$$bfd_version_string," \ - -e "s,@bfd_version_package@,$$bfd_version_package," \ - -e "s,@report_bugs_to@,$$report_bugs_to," \ - < $(srcdir)/version.h > $@; \ - echo "$${bfd_soversion}" > libtool-soversion - -# What appears below is generated by a hacked mkdep using gcc -MM. - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. -archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h \ - $(INCDIR)/safe-ctype.h -archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/safe-ctype.h -bfd.lo: bfd.c $(INCDIR)/filenames.h bfdver.h $(INCDIR)/libiberty.h \ - $(INCDIR)/demangle.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h -bfdio.lo: bfdio.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -bfdwin.lo: bfdwin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cache.lo: cache.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h -coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h -corefile.lo: corefile.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -format.lo: format.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -init.lo: init.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -libbfd.lo: libbfd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h \ - $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h -reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h -section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h -syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def -targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/fnmatch.h targmatch.h -hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/objalloc.h $(INCDIR)/libiberty.h -linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h -srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h -binary.lo: binary.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/hashtab.h -tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h -ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h -stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h -stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def -merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h -dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/dwarf2.h -simple.lo: simple.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h -compress.lo: compress.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/ar.h -cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h -cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-bfin.lo: cpu-bfin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-cr16.lo: cpu-cr16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-cr16c.lo: cpu-cr16c.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-crx.lo: cpu-crx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-ia64.lo: cpu-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - cpu-ia64-opc.c $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h -cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-iq2000.lo: cpu-iq2000.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-lm32.lo: cpu-lm32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-m32c.lo: cpu-m32c.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h -cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h -cpu-m68k.lo: cpu-m68k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/opcode/m68k.h -cpu-m88k.lo: cpu-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-maxq.lo: cpu-maxq.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-mep.lo: cpu-mep.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-mt.lo: cpu-mt.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - ns32k.h -cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h -cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h -cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-score.lo: cpu-score.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(srcdir)/../opcodes/sh-opc.h -cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-spu.lo: cpu-spu.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/safe-ctype.h -cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h -cpu-xtensa.lo: cpu-xtensa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-xc16x.lo: cpu-xc16x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-z80.lo: cpu-z80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/adobe.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - libaout.h $(INCDIR)/bfdlink.h -aout-arm.lo: aout-arm.c $(INCDIR)/filenames.h libaout.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aoutx.h \ - $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -aout-cris.lo: aout-cris.c aout32.c aoutx.h $(INCDIR)/filenames.h \ - $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h libaout.h \ - $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \ - ns32k.h libaout.h $(INCDIR)/bfdlink.h aoutx.h $(INCDIR)/filenames.h \ - $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \ - libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -aout-tic30.lo: aout-tic30.c $(INCDIR)/filenames.h libaout.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h \ - $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h -aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h aout-target.h -aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -armnetbsd.lo: armnetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h $(INCDIR)/libiberty.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h -cf-i386lynx.lo: cf-i386lynx.c $(INCDIR)/filenames.h \ - coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-apollo.lo: coff-apollo.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/apollo.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \ - coff-m68k.c $(INCDIR)/hashtab.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/h8300.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/libiberty.h coffcode.h coffswap.h -coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/i860.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-maxq.lo: coff-maxq.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/maxq.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \ - coffcode.h coffswap.h -coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \ - $(INCDIR)/coff/external.h libcoff.h libecoff.h coffswap.h \ - ecoffswap.h -coff-or32.lo: coff-or32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/or32.h $(INCDIR)/coff/internal.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/xcoff.h $(INCDIR)/coff/rs6000.h libcoff.h \ - libxcoff.h coffcode.h coffswap.h -coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h coffcode.h coffswap.h -coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \ - go32stub.h -coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-tic4x.lo: coff-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h \ - $(INCDIR)/coff/ti.h $(INCDIR)/coff/internal.h libcoff.h \ - coffcode.h coffswap.h -coff-tic80.lo: coff-tic80.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/we32k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-z80.lo: coff-z80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h libcoff.h \ - $(INCDIR)/safe-ctype.h -dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/dwarf.h -ecoff.lo: ecoff.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h libcoff.h \ - libecoff.h $(INCDIR)/libiberty.h -ecofflink.lo: ecofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/objalloc.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h libcoff.h \ - libecoff.h -efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \ - coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -efi-bsdrv-ia32.lo: efi-bsdrv-ia32.c $(INCDIR)/filenames.h \ - coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -efi-rtdrv-ia32.lo: efi-rtdrv-ia32.c $(INCDIR)/filenames.h \ - coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/libiberty.h \ - $(INCDIR)/safe-ctype.h -elf32-am33lin.lo: elf32-am33lin.c $(INCDIR)/filenames.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h \ - $(INCDIR)/elf/reloc-macros.h elf-m10300.c $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h elf32-target.h -elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elf32-arm.lo: elf32-arm.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - elf-vxworks.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h \ - $(INCDIR)/elf/reloc-macros.h elf32-avr.h elf32-target.h -elf32-bfin.lo: elf32-bfin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/bfin.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \ - elf32-target.h -elf32-cr16.lo: elf32-cr16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/cr16.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-cr16c.lo: elf32-cr16c.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/cr16c.h \ - $(INCDIR)/elf/reloc-macros.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-target.h -elf32-cris.lo: elf32-cris.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/cris.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-crx.lo: elf32-crx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/crx.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-d10v.lo: elf32-d10v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/d10v.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-d30v.lo: elf32-d30v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/d30v.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-dlx.lo: elf32-dlx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dlx.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \ - elf32-target.h -elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf32-target.h -elf32-h8300.lo: elf32-h8300.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h \ - $(INCDIR)/elf/reloc-macros.h libhppa.h elf32-hppa.h \ - elf-hppa.h elf32-target.h -elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/i370.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf-vxworks.h \ - bfd_stdint.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-i960.lo: elf32-i960.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/i960.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-ip2k.lo: elf32-ip2k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/ip2k.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-iq2000.lo: elf32-iq2000.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/iq2000.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-m32c.lo: elf32-m32c.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32c.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elf32-lm32.lo: elf32-lm32.c $(INCDIR)/filenames.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/lm32.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/m68k.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68k.h \ - elf32-target.h -elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-m68hc1x.h \ - $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/m68hc11.h elf32-target.h -elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-m68hc1x.h \ - $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/m68hc11.h elf32-target.h -elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-m68hc1x.h \ - $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/m68hc11.h -elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf32-target.h -elf-m10200.lo: elf-m10200.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf32-target.h -elf-m10300.lo: elf-m10300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/mcore.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-mep.lo: elf32-mep.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mep.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elfxx-mips.lo: elfxx-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - elfxx-mips.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - elf-vxworks.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h -elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elfxx-mips.h \ - $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h elf-vxworks.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \ - ecoffswap.h elf32-target.h -elf32-mt.lo: elf32-mt.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mt.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-msp430.lo: elf32-msp430.c $(INCDIR)/filenames.h \ - $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/openrisc.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/libiberty.h elf32-target.h -elf32-or32.lo: elf32-or32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/or32.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/pj.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/ppc.h \ - $(INCDIR)/elf/reloc-macros.h elf32-ppc.h elf-vxworks.h \ - elf32-target.h -elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \ - elf32-sh64.h elf32-sh.c $(INCDIR)/hashtab.h elf-vxworks.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h -elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf32-sh64.h \ - $(srcdir)/../opcodes/sh64-opc.h -elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/s390.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-score.lo: elf32-score.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf-vxworks.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h -elf32-sh-symbian.lo: elf32-sh-symbian.c elf32-sh.c \ - $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h elf-vxworks.h $(INCDIR)/elf/sh.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h -elfxx-sparc.lo: elfxx-sparc.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/sparc.h elfxx-sparc.h elf-vxworks.h -elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/sparc.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \ - elfxx-sparc.h elf-vxworks.h elf32-target.h -elf32-spu.lo: elf32-spu.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/spu.h \ - $(INCDIR)/elf/reloc-macros.h elf32-spu.h elf32-target.h -elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/v850.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elf32-vax.lo: elf32-vax.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/vax.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/libiberty.h elf32-target.h -elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/xtensa.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/xtensa-isa.h \ - $(INCDIR)/xtensa-config.h elf32-target.h -elf32-xc16x.lo: elf32-xc16x.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/xc16x.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/elf/dwarf2.h $(INCDIR)/libiberty.h elf32-target.h -elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elfcore.h -elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/libiberty.h $(INCDIR)/objalloc.h -elf-attrs.lo: elf-attrs.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h -elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h -elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/dwarf2.h -elf-vxworks.lo: elf-vxworks.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - elf-vxworks.h $(INCDIR)/elf/vxworks.h -epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \ - coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c $(INCDIR)/filenames.h \ - coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -hp300bsd.lo: hp300bsd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \ - aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -som.lo: som.c $(INCDIR)/filenames.h -i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \ - $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \ - libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -i386freebsd.lo: i386freebsd.c freebsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -i386linux.lo: i386linux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h -i386lynx.lo: i386lynx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ - aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -i386msdos.lo: i386msdos.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h -i386netbsd.lo: i386netbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h -i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/os9k.h -ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/ieee.h libieee.h $(INCDIR)/safe-ctype.h -m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -m68klinux.lo: m68klinux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h -m68knetbsd.lo: m68knetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -m88kmach3.lo: m88kmach3.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -m88kopenbsd.lo: m88kopenbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -mach-o.lo: mach-o.c $(INCDIR)/filenames.h mach-o.h \ - $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h mach-o-target.c -mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -newsos3.lo: newsos3.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h -nlm.lo: nlm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ - $(INCDIR)/nlm/external.h -nlm32-i386.lo: nlm32-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/nlm/i386-ext.h libnlm.h $(INCDIR)/nlm/common.h \ - $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \ - nlm-target.h -nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/nlm/sparc32-ext.h libnlm.h \ - $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \ - nlmswap.h nlm-target.h -nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/nlm/ppc-ext.h libnlm.h $(INCDIR)/nlm/common.h \ - $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \ - nlm-target.h -nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ - $(INCDIR)/nlm/external.h -ns32knetbsd.lo: ns32knetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/hashtab.h $(INCDIR)/oasys.h liboasys.h -pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ - aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -pdp11.lo: pdp11.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - $(INCDIR)/safe-ctype.h -pef.lo: pef.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - pef.h pef-traceback.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h -pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-arm.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-arm-wince.lo: pe-arm-wince.c $(INCDIR)/filenames.h \ - pe-arm.c coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -pei-arm-wince.lo: pei-arm-wince.c pei-arm.c $(INCDIR)/filenames.h \ - coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -pe-i386.lo: pe-i386.c $(INCDIR)/filenames.h coff-i386.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-i386.lo: pei-i386.c $(INCDIR)/filenames.h coff-i386.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-mcore.lo: pe-mcore.c $(INCDIR)/filenames.h coff-mcore.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \ - libpei.h -pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \ - $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \ - libpei.h -pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/hashtab.h -reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/internal.h \ - libcoff.h -riscix.lo: riscix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ - aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -sparclinux.lo: sparclinux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h -sparclynx.lo: sparclynx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h aout-target.h -sparcnetbsd.lo: sparcnetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \ - $(INCDIR)/filenames.h $(INCDIR)/hashtab.h $(INCDIR)/aout/sun4.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h aout-target.h -vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -vax1knetbsd.lo: vax1knetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -vaxbsd.lo: vaxbsd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h -vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h vms.h -vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h vms.h -vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h bfdver.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h \ - vms.h -vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h vms.h -vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h vms.h -vmsutil.lo: vmsutil.c vmsutil.h $(INCDIR)/ansidecl.h -xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \ - libcoff.h libxcoff.h -xsym.lo: xsym.c $(INCDIR)/filenames.h xsym.h $(INCDIR)/hashtab.h -xtensa-isa.lo: xtensa-isa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-isa-internal.h -xtensa-modules.lo: xtensa-modules.c $(INCDIR)/xtensa-isa.h \ - $(INCDIR)/xtensa-isa-internal.h -aix5ppc-core.lo: aix5ppc-core.c $(INCDIR)/filenames.h -aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -coff-alpha.lo: coff-alpha.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \ - $(INCDIR)/aout/ar.h libcoff.h libecoff.h coffswap.h \ - ecoffswap.h -coff64-rs6000.lo: coff64-rs6000.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/xcoff.h $(INCDIR)/coff/rs6k64.h libcoff.h \ - libxcoff.h coffcode.h coffswap.h -demo64.lo: demo64.c aoutf1.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/aout/sun4.h libaout.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \ - coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -efi-bsdrv-ia64.lo: efi-bsdrv-ia64.c $(INCDIR)/filenames.h \ - coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -efi-rtdrv-ia64.lo: efi-rtdrv-ia64.c $(INCDIR)/filenames.h \ - coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -efi-app-x86_64.lo: efi-app-x86_64.c $(INCDIR)/filenames.h \ - coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \ - coffcode.h peicode.h libpei.h -efi-bsdrv-x86_64.lo: efi-bsdrv-x86_64.c $(INCDIR)/filenames.h \ - coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \ - coffcode.h peicode.h libpei.h -efi-rtdrv-x86_64.lo: efi-rtdrv-x86_64.c $(INCDIR)/filenames.h \ - coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \ - coffcode.h peicode.h libpei.h -elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h bfd_stdint.h \ - $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.h \ - elf64-target.h -elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \ - libcoff.h libecoff.h ecoffswap.h elf64-target.h -elf64-hppa.lo: elf64-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h \ - $(INCDIR)/elf/reloc-macros.h libhppa.h elf64-hppa.h \ - elf-hppa.h elf64-target.h -elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf64-target.h -elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h genlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - elfxx-mips.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \ - ecoffswap.h elf32-target.h -elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h genlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - elfxx-mips.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \ - elf64-target.h -elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \ - elf64-target.h -elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/ppc64.h \ - $(INCDIR)/elf/reloc-macros.h elf64-ppc.h elf64-target.h -elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/s390.h \ - $(INCDIR)/elf/reloc-macros.h elf64-target.h -elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/sh.h \ - $(INCDIR)/elf/reloc-macros.h elf64-target.h -elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/sparc.h elfxx-sparc.h elf64-target.h -elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elfcore.h -mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/mmix.h -nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/nlm/alpha-ext.h libnlm.h \ - $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \ - nlmswap.h nlm-target.h -nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ - $(INCDIR)/nlm/external.h -coff-x86_64.lo: coff-x86_64.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \ - coffswap.h -pe-x86_64.lo: pe-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \ - peicode.h libpei.h -pei-x86_64.lo: pei-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \ - peicode.h libpei.h -aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h -hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -irix-core.lo: irix-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -osf-core.lo: osf-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h -trad-core.lo: trad-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h -cisco-core.lo: cisco-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \ - $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \ - elf32-target.h -elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \ - $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \ - elf64-target.h -peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h -pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h -pex64igen.lo: pex64igen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY +## Process this file with automake to generate Makefile.in + +AUTOMAKE_OPTIONS = 1.11 no-dist foreign +ACLOCAL_AMFLAGS = -I . -I .. -I ../config + +# Uncomment the following line when doing a release. +# RELEASE=y + +INCDIR = $(srcdir)/../include +CSEARCH = -I. -I$(srcdir) -I$(INCDIR) + +SUBDIRS = doc po + +bfddocdir = doc + +libbfd_la_LDFLAGS = +if INSTALL_LIBBFD +bfdlibdir = @bfdlibdir@ +bfdincludedir = @bfdincludedir@ +bfdlib_LTLIBRARIES = libbfd.la +bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h +else !INSTALL_LIBBFD +# Empty these so that the respective installation directories will not be created. +bfdlibdir = +bfdincludedir = +rpath_bfdlibdir = @bfdlibdir@ +noinst_LTLIBRARIES = libbfd.la +libbfd_la_LDFLAGS += -rpath $(rpath_bfdlibdir) +endif + +WARN_CFLAGS = @WARN_CFLAGS@ +NO_WERROR = @NO_WERROR@ +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = -DBINDIR='"$(bindir)"' +if PLUGINS +LIBDL = -ldl +endif + +# bfd.h goes here, for now +BFD_H = bfd.h + +# Jim Kingdon notes: +# Writing S-records should be included in all (or at least most) +# *-*-coff, *-*-aout, etc., configurations, because people will want to +# be able to use objcopy to create S-records. (S-records are not useful +# for the debugger, so if you are downloading things as S-records you +# need two copies of the executable, one to download and one for the +# debugger). +BFD32_LIBS = \ + archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \ + cache.lo coffgen.lo corefile.lo \ + format.lo init.lo libbfd.lo opncls.lo reloc.lo \ + section.lo syms.lo targets.lo hash.lo linker.lo \ + srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \ + merge.lo dwarf2.lo simple.lo compress.lo verilog.lo + +BFD64_LIBS = archive64.lo + +BFD32_LIBS_CFILES = \ + archive.c archures.c bfd.c bfdio.c bfdwin.c \ + cache.c coffgen.c corefile.c \ + format.c init.c libbfd.c opncls.c reloc.c \ + section.c syms.c targets.c hash.c linker.c \ + srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \ + merge.c dwarf2.c simple.c compress.c verilog.c + +BFD64_LIBS_CFILES = archive64.c + +# This list is alphabetized to make it easier to keep in sync +# with the decls and initializer in archures.c. +ALL_MACHINES = \ + cpu-alpha.lo \ + cpu-arc.lo \ + cpu-arm.lo \ + cpu-avr.lo \ + cpu-bfin.lo \ + cpu-cr16.lo \ + cpu-cr16c.lo \ + cpu-cris.lo \ + cpu-crx.lo \ + cpu-d10v.lo \ + cpu-d30v.lo \ + cpu-dlx.lo \ + cpu-fr30.lo \ + cpu-frv.lo \ + cpu-h8300.lo \ + cpu-h8500.lo \ + cpu-hppa.lo \ + cpu-i370.lo \ + cpu-i386.lo \ + cpu-l1om.lo \ + cpu-i860.lo \ + cpu-i960.lo \ + cpu-ia64.lo \ + cpu-ip2k.lo \ + cpu-iq2000.lo \ + cpu-lm32.lo \ + cpu-m10200.lo \ + cpu-m10300.lo \ + cpu-m32c.lo \ + cpu-m32r.lo \ + cpu-m68hc11.lo \ + cpu-m68hc12.lo \ + cpu-m68k.lo \ + cpu-m88k.lo \ + cpu-maxq.lo \ + cpu-mcore.lo \ + cpu-mep.lo \ + cpu-microblaze.lo \ + cpu-mips.lo \ + cpu-mmix.lo \ + cpu-moxie.lo \ + cpu-msp430.lo \ + cpu-mt.lo \ + cpu-ns32k.lo \ + cpu-openrisc.lo \ + cpu-or32.lo \ + cpu-pdp11.lo \ + cpu-pj.lo \ + cpu-plugin.lo \ + cpu-powerpc.lo \ + cpu-rs6000.lo \ + cpu-rx.lo \ + cpu-s390.lo \ + cpu-score.lo \ + cpu-sh.lo \ + cpu-sparc.lo \ + cpu-spu.lo \ + cpu-tic30.lo \ + cpu-tic4x.lo \ + cpu-tic54x.lo \ + cpu-tic80.lo \ + cpu-v850.lo \ + cpu-vax.lo \ + cpu-w65.lo \ + cpu-we32k.lo \ + cpu-xc16x.lo \ + cpu-xstormy16.lo \ + cpu-xtensa.lo \ + cpu-z80.lo \ + cpu-z8k.lo + +ALL_MACHINES_CFILES = \ + cpu-alpha.c \ + cpu-arc.c \ + cpu-arm.c \ + cpu-avr.c \ + cpu-bfin.c \ + cpu-cr16.c \ + cpu-cr16c.c \ + cpu-cris.c \ + cpu-crx.c \ + cpu-d10v.c \ + cpu-d30v.c \ + cpu-dlx.c \ + cpu-fr30.c \ + cpu-frv.c \ + cpu-h8300.c \ + cpu-h8500.c \ + cpu-hppa.c \ + cpu-i370.c \ + cpu-i386.c \ + cpu-l1om.c \ + cpu-i860.c \ + cpu-i960.c \ + cpu-ia64.c \ + cpu-ip2k.c \ + cpu-iq2000.c \ + cpu-lm32.c \ + cpu-m10200.c \ + cpu-m10300.c \ + cpu-m32c.c \ + cpu-m32r.c \ + cpu-m68hc11.c \ + cpu-m68hc12.c \ + cpu-m68k.c \ + cpu-m88k.c \ + cpu-maxq.c \ + cpu-mcore.c \ + cpu-mep.c \ + cpu-microblaze.c \ + cpu-mips.c \ + cpu-mmix.c \ + cpu-moxie.c \ + cpu-msp430.c \ + cpu-mt.c \ + cpu-ns32k.c \ + cpu-openrisc.c \ + cpu-or32.c \ + cpu-pdp11.c \ + cpu-pj.c \ + cpu-plugin.c \ + cpu-powerpc.c \ + cpu-rs6000.c \ + cpu-rx.c \ + cpu-s390.c \ + cpu-score.c \ + cpu-sh.c \ + cpu-sparc.c \ + cpu-spu.c \ + cpu-tic30.c \ + cpu-tic4x.c \ + cpu-tic54x.c \ + cpu-tic80.c \ + cpu-v850.c \ + cpu-vax.c \ + cpu-w65.c \ + cpu-we32k.c \ + cpu-xc16x.c \ + cpu-xstormy16.c \ + cpu-xtensa.c \ + cpu-z80.c \ + cpu-z8k.c + +# The .o files needed by all of the 32 bit vectors that are configured into +# target_vector in targets.c if configured with --enable-targets=all. +BFD32_BACKENDS = \ + aout-adobe.lo \ + aout-arm.lo \ + aout-cris.lo \ + aout-ns32k.lo \ + aout-sparcle.lo \ + aout-tic30.lo \ + aout0.lo \ + aout32.lo \ + armnetbsd.lo \ + bout.lo \ + cf-i386lynx.lo \ + cf-sparclynx.lo \ + coff-apollo.lo \ + coff-arm.lo \ + coff-aux.lo \ + coff-go32.lo \ + coff-h8300.lo \ + coff-h8500.lo \ + coff-i386.lo \ + coff-i860.lo \ + coff-i960.lo \ + coff-m68k.lo \ + coff-m88k.lo \ + coff-maxq.lo \ + coff-mips.lo \ + coff-or32.lo \ + coff-rs6000.lo \ + coff-sh.lo \ + coff-sparc.lo \ + coff-stgo32.lo \ + coff-svm68k.lo \ + coff-tic30.lo \ + coff-tic4x.lo \ + coff-tic54x.lo \ + coff-tic80.lo \ + coff-u68k.lo \ + coff-w65.lo \ + coff-we32k.lo \ + coff-z80.lo \ + coff-z8k.lo \ + cofflink.lo \ + dwarf1.lo \ + ecoff.lo \ + ecofflink.lo \ + elf-attrs.lo \ + elf-eh-frame.lo \ + elf-ifunc.lo \ + elf-m10200.lo \ + elf-m10300.lo \ + elf-strtab.lo \ + elf-vxworks.lo \ + elf.lo \ + elf32-am33lin.lo \ + elf32-arc.lo \ + elf32-arm.lo \ + elf32-avr.lo \ + elf32-bfin.lo \ + elf32-cr16.lo \ + elf32-cr16c.lo \ + elf32-cris.lo \ + elf32-crx.lo \ + elf32-d10v.lo \ + elf32-d30v.lo \ + elf32-dlx.lo \ + elf32-fr30.lo \ + elf32-frv.lo \ + elf32-gen.lo \ + elf32-h8300.lo \ + elf32-hppa.lo \ + elf32-i370.lo \ + elf32-i386.lo \ + elf32-i860.lo \ + elf32-i960.lo \ + elf32-ip2k.lo \ + elf32-iq2000.lo \ + elf32-lm32.lo \ + elf32-m32c.lo \ + elf32-m32r.lo \ + elf32-m68hc11.lo \ + elf32-m68hc12.lo \ + elf32-m68hc1x.lo \ + elf32-m68k.lo \ + elf32-m88k.lo \ + elf32-mcore.lo \ + elf32-mep.lo \ + elf32-microblaze.lo \ + elf32-mips.lo \ + elf32-moxie.lo \ + elf32-msp430.lo \ + elf32-mt.lo \ + elf32-openrisc.lo \ + elf32-or32.lo \ + elf32-pj.lo \ + elf32-ppc.lo \ + elf32-rx.lo \ + elf32-s390.lo \ + elf32-sh-symbian.lo \ + elf32-sh.lo \ + elf32-sh64-com.lo \ + elf32-sh64.lo \ + elf32-sparc.lo \ + elf32-spu.lo \ + elf32-v850.lo \ + elf32-vax.lo \ + elf32-xc16x.lo \ + elf32-xstormy16.lo \ + elf32-xtensa.lo \ + elf32.lo \ + elflink.lo \ + elfxx-mips.lo \ + elfxx-sparc.lo \ + epoc-pe-arm.lo \ + epoc-pei-arm.lo \ + hp300bsd.lo \ + hp300hpux.lo \ + i386aout.lo \ + i386bsd.lo \ + i386dynix.lo \ + i386freebsd.lo \ + i386linux.lo \ + i386lynx.lo \ + i386mach3.lo \ + i386msdos.lo \ + i386netbsd.lo \ + i386os9k.lo \ + ieee.lo \ + m68k4knetbsd.lo \ + m68klinux.lo \ + m68knetbsd.lo \ + m88kmach3.lo \ + m88kopenbsd.lo \ + mach-o.lo \ + mach-o-i386.lo \ + mipsbsd.lo \ + newsos3.lo \ + nlm.lo \ + nlm32-i386.lo \ + nlm32-ppc.lo \ + nlm32-sparc.lo \ + nlm32.lo \ + ns32knetbsd.lo \ + oasys.lo \ + pc532-mach.lo \ + pdp11.lo \ + pe-arm-wince.lo \ + pe-arm.lo \ + pe-i386.lo \ + pe-mcore.lo \ + pe-mips.lo \ + pe-ppc.lo \ + pe-sh.lo \ + pef.lo \ + pei-arm-wince.lo \ + pei-arm.lo \ + pei-i386.lo \ + pei-mcore.lo \ + pei-mips.lo \ + pei-ppc.lo \ + pei-sh.lo \ + peigen.lo \ + plugin.lo \ + ppcboot.lo \ + reloc16.lo \ + riscix.lo \ + som.lo \ + sparclinux.lo \ + sparclynx.lo \ + sparcnetbsd.lo \ + sunos.lo \ + vax1knetbsd.lo \ + vaxbsd.lo \ + vaxnetbsd.lo \ + versados.lo \ + vms-gsd.lo \ + vms-hdr.lo \ + vms-misc.lo \ + vms-tir.lo \ + vms.lo \ + xcofflink.lo \ + xsym.lo \ + xtensa-isa.lo \ + xtensa-modules.lo + +BFD32_BACKENDS_CFILES = \ + aout-adobe.c \ + aout-arm.c \ + aout-cris.c \ + aout-ns32k.c \ + aout-sparcle.c \ + aout-tic30.c \ + aout0.c \ + aout32.c \ + armnetbsd.c \ + bout.c \ + cf-i386lynx.c \ + cf-sparclynx.c \ + coff-apollo.c \ + coff-arm.c \ + coff-aux.c \ + coff-go32.c \ + coff-h8300.c \ + coff-h8500.c \ + coff-i386.c \ + coff-i860.c \ + coff-i960.c \ + coff-m68k.c \ + coff-m88k.c \ + coff-maxq.c \ + coff-mips.c \ + coff-or32.c \ + coff-rs6000.c \ + coff-sh.c \ + coff-sparc.c \ + coff-stgo32.c \ + coff-svm68k.c \ + coff-tic30.c \ + coff-tic4x.c \ + coff-tic54x.c \ + coff-tic80.c \ + coff-u68k.c \ + coff-w65.c \ + coff-we32k.c \ + coff-z80.c \ + coff-z8k.c \ + cofflink.c \ + dwarf1.c \ + ecoff.c \ + ecofflink.c \ + elf-attrs.c \ + elf-eh-frame.c \ + elf-ifunc.c \ + elf-m10200.c \ + elf-m10300.c \ + elf-strtab.c \ + elf-vxworks.c \ + elf.c \ + elf32-am33lin.c \ + elf32-arc.c \ + elf32-arm.c \ + elf32-avr.c \ + 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-fr30.c \ + elf32-frv.c \ + elf32-gen.c \ + elf32-h8300.c \ + elf32-hppa.c \ + elf32-i370.c \ + elf32-i386.c \ + elf32-i860.c \ + elf32-i960.c \ + elf32-ip2k.c \ + elf32-iq2000.c \ + elf32-lm32.c \ + elf32-m32c.c \ + elf32-m32r.c \ + elf32-m68hc11.c \ + elf32-m68hc12.c \ + elf32-m68hc1x.c \ + elf32-m68k.c \ + elf32-m88k.c \ + elf32-mcore.c \ + elf32-mep.c \ + elf32-microblaze.c \ + elf32-mips.c \ + elf32-moxie.c \ + elf32-msp430.c \ + elf32-mt.c \ + elf32-openrisc.c \ + elf32-or32.c \ + elf32-pj.c \ + elf32-ppc.c \ + elf32-rx.c \ + elf32-s390.c \ + elf32-sh-symbian.c \ + elf32-sh.c \ + elf32-sh64-com.c \ + elf32-sh64.c \ + elf32-sparc.c \ + elf32-spu.c \ + elf32-v850.c \ + elf32-vax.c \ + elf32-xc16x.c \ + elf32-xstormy16.c \ + elf32-xtensa.c \ + elf32.c \ + elflink.c \ + elfxx-mips.c \ + elfxx-sparc.c \ + epoc-pe-arm.c \ + epoc-pei-arm.c \ + hp300bsd.c \ + hp300hpux.c \ + i386aout.c \ + i386bsd.c \ + i386dynix.c \ + i386freebsd.c \ + i386linux.c \ + i386lynx.c \ + i386mach3.c \ + i386msdos.c \ + i386netbsd.c \ + i386os9k.c \ + ieee.c \ + m68k4knetbsd.c \ + m68klinux.c \ + m68knetbsd.c \ + m88kmach3.c \ + m88kopenbsd.c \ + mach-o.c \ + mach-o-i386.c \ + mipsbsd.c \ + newsos3.c \ + nlm.c \ + nlm32-i386.c \ + nlm32-ppc.c \ + nlm32-sparc.c \ + nlm32.c \ + ns32knetbsd.c \ + oasys.c \ + pc532-mach.c \ + pdp11.c \ + pe-arm-wince.c \ + pe-arm.c \ + pe-i386.c \ + pe-mcore.c \ + pe-mips.c \ + pe-ppc.c \ + pe-sh.c \ + pef.c \ + pei-arm-wince.c \ + pei-arm.c \ + pei-i386.c \ + pei-mcore.c \ + pei-mips.c \ + pei-ppc.c \ + pei-sh.c \ + plugin.c \ + ppcboot.c \ + reloc16.c \ + riscix.c \ + som.c \ + sparclinux.c \ + sparclynx.c \ + sparcnetbsd.c \ + sunos.c \ + vax1knetbsd.c \ + vaxbsd.c \ + vaxnetbsd.c \ + versados.c \ + vms-gsd.c \ + vms-hdr.c \ + vms-misc.c \ + vms-tir.c \ + vms.c \ + xcofflink.c \ + xsym.c \ + xtensa-isa.c \ + xtensa-modules.c + +# The .o files needed by all of the 64 bit vectors that are configured into +# target_vector in targets.c if configured with --enable-targets=all +# and --enable-64-bit-bfd. +# elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in +# BFD32_BACKENDS. +BFD64_BACKENDS = \ + aix5ppc-core.lo \ + aout64.lo \ + coff-alpha.lo \ + coff-x86_64.lo \ + coff64-rs6000.lo \ + demo64.lo \ + elf32-ia64.lo \ + elf32-score.lo \ + elf32-score7.lo \ + elf64-alpha.lo \ + elf64-gen.lo \ + elf64-hppa.lo \ + elf64-ia64.lo \ + elf64-mips.lo \ + elf64-mmix.lo \ + elf64-ppc.lo \ + elf64-s390.lo \ + elf64-sh64.lo \ + elf64-sparc.lo \ + elf64-x86-64.lo \ + elf64.lo \ + elfn32-mips.lo \ + mmo.lo \ + nlm32-alpha.lo \ + nlm64.lo \ + pe-x86_64.lo \ + pei-ia64.lo \ + pei-x86_64.lo \ + pepigen.lo \ + pex64igen.lo + +BFD64_BACKENDS_CFILES = \ + aix5ppc-core.c \ + aout64.c \ + coff-alpha.c \ + coff-x86_64.c \ + coff64-rs6000.c \ + demo64.c \ + elf32-score.c \ + elf32-score7.c \ + elf64-alpha.c \ + elf64-gen.c \ + elf64-hppa.c \ + elf64-mips.c \ + elf64-mmix.c \ + elf64-ppc.c \ + elf64-s390.c \ + elf64-sh64.c \ + elf64-sparc.c \ + elf64-x86-64.c \ + elf64.c \ + elfn32-mips.c \ + mmo.c \ + nlm32-alpha.c \ + nlm64.c \ + pe-x86_64.c \ + pei-ia64.c \ + pei-x86_64.c + +OPTIONAL_BACKENDS = \ + aix386-core.lo \ + cisco-core.lo \ + hpux-core.lo \ + irix-core.lo \ + lynx-core.lo \ + osf-core.lo \ + sco5-core.lo \ + trad-core.lo + +OPTIONAL_BACKENDS_CFILES = \ + aix386-core.c \ + cisco-core.c \ + hpux-core.c \ + irix-core.c \ + lynx-core.c \ + osf-core.c \ + sco5-core.c \ + trad-core.c + +# We want to rerun configure if configure.in, config.bfd or +# configure.host change. configure.in is needed since the version +# number in Makefile comes from configure.in. +CONFIG_STATUS_DEPENDENCIES = \ + $(srcdir)/configure.in \ + $(srcdir)/config.bfd \ + $(srcdir)/configure.host + +# These are defined by configure.in: +WORDSIZE = @wordsize@ +ALL_BACKENDS = @all_backends@ +BFD_BACKENDS = @bfd_backends@ +BFD_MACHINES = @bfd_machines@ +TDEFAULTS = @tdefaults@ + +INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) @INCINTL@ + +# C source files that correspond to .o's. +SOURCE_CFILES = \ + $(BFD32_LIBS_CFILES) \ + $(BFD64_LIBS_CFILES) \ + $(ALL_MACHINES_CFILES) \ + $(BFD32_BACKENDS_CFILES) \ + $(BFD64_BACKENDS_CFILES) \ + $(OPTIONAL_BACKENDS_CFILES) + +BUILD_CFILES = \ + elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c + +CFILES = $(SOURCE_CFILES) $(BUILD_CFILES) + +## This is a list of all .h files which are in the source tree. +SOURCE_HFILES = \ + aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \ + elf-bfd.h elf-hppa.h elf32-hppa.h \ + elf64-hppa.h elfcode.h elfcore.h \ + freebsd.h genlink.h go32stub.h \ + libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \ + libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \ + netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \ + pef.h pef-traceback.h peicode.h som.h version.h \ + vms.h xcoff-target.h xsym.h + +## ... and all .h files which are in the build tree. +BUILD_HFILES = \ + bfdver.h elf32-target.h elf64-target.h targmatch.h bfd_stdint.h + +# Ensure they are built early: +BUILT_SOURCES = $(BUILD_HFILES) + +HFILES = $(SOURCE_HFILES) $(BUILD_HFILES) + +SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES) +BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES) + +po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES) + for file in $(SRC_POTFILES); do echo $$file; done \ + | LC_ALL=C sort > tmp.src \ + && mv tmp.src $(srcdir)/po/SRC-POTFILES.in + +po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES) + for file in $(BLD_POTFILES); do echo $$file; done \ + | LC_ALL=C sort > tmp.bld \ + && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in + +all diststuff: info + +# Various kinds of .o files to put in libbfd.a: +# BFD_BACKENDS Routines the configured targets need. +# BFD_MACHINES Architecture-specific routines the configured targets need. +# COREFILE Core file routines for a native configuration +# bfd64_libs Routines for 64bit support +OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ @bfd64_libs@ + +stamp-ofiles: Makefile + rm -f tofiles + f=""; \ + for i in $(OFILES) ; do \ + case " $$f " in \ + *" $$i "*) ;; \ + *) f="$$f $$i" ;; \ + esac ; \ + done ; \ + echo $$f > tofiles + $(SHELL) $(srcdir)/../move-if-change tofiles ofiles + touch stamp-ofiles + +ofiles: stamp-ofiles ; @true + +# Since BFD64_LIBS is optional and we can't have substitution in +# libbfd_la_SOURCES, we put BFD64_LIBS in OFILES instead. +# However, list all sources in EXTRA_libbfd_la_SOURCES so the +# dependency tracking fragments are picked up in the Makefile. +libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) +EXTRA_libbfd_la_SOURCES = $(CFILES) +libbfd_la_DEPENDENCIES = $(OFILES) ofiles +libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) +libbfd_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@ + +# libtool will build .libs/libbfd.a. We create libbfd.a in the build +# directory so that we don't have to convert all the programs that use +# libbfd.a simultaneously. This is a hack which should be removed if +# everything else starts using libtool. FIXME. + +noinst_LIBRARIES = libbfd.a +libbfd_a_SOURCES = + +stamp-lib: libbfd.la + libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \ + if [ -f $$libtooldir/libbfd.a ]; then \ + cp $$libtooldir/libbfd.a libbfd.tmp; \ + $(RANLIB) libbfd.tmp; \ + $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \ + else true; fi + touch stamp-lib + +libbfd.a: stamp-lib ; @true + +# This file holds an array associating configuration triplets and +# vector names. It is built from config.bfd. It is not compiled by +# itself, but is included by targets.c. +targmatch.h: config.bfd targmatch.sed + rm -f targmatch.h + sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new + mv -f targmatch.new targmatch.h + +# When compiling archures.c and targets.c, supply the default target +# info from configure. + +targets.lo: targets.c Makefile +if am__fastdepCC + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(TDEFAULTS) $(srcdir)/targets.c + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +else +if AMDEP + source='targets.c' object='$@' libtool=yes @AMDEPBACKSLASH@ + DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +endif + $(LTCOMPILE) -c -o $@ $(TDEFAULTS) $(srcdir)/targets.c +endif + +archures.lo: archures.c Makefile +if am__fastdepCC + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(TDEFAULTS) $(srcdir)/archures.c + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +else +if AMDEP + source='archures.c' object='$@' libtool=yes @AMDEPBACKSLASH@ + DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +endif + $(LTCOMPILE) -c -o $@ $(TDEFAULTS) $(srcdir)/archures.c +endif + +dwarf2.lo: dwarf2.c Makefile +if am__fastdepCC + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +else +if AMDEP + source='dwarf2.c' object='$@' libtool=yes @AMDEPBACKSLASH@ + DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +endif + $(LTCOMPILE) -c -o $@ -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c +endif + +elf32-target.h : elfxx-target.h + rm -f elf32-target.h + sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new + mv -f elf32-target.new elf32-target.h + +elf64-target.h : elfxx-target.h + rm -f elf64-target.h + sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new + mv -f elf64-target.new elf64-target.h + +elf32-ia64.c : elfxx-ia64.c + rm -f elf32-ia64.c + sed -e s/NN/32/g < $(srcdir)/elfxx-ia64.c > elf32-ia64.new + mv -f elf32-ia64.new elf32-ia64.c + +elf64-ia64.c : elfxx-ia64.c + rm -f elf64-ia64.c + sed -e s/NN/64/g < $(srcdir)/elfxx-ia64.c > elf64-ia64.new + mv -f elf64-ia64.new elf64-ia64.c + +peigen.c : peXXigen.c + rm -f peigen.c + sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new + mv -f peigen.new peigen.c + +pepigen.c : peXXigen.c + rm -f pepigen.c + sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new + mv -f pepigen.new pepigen.c + +pex64igen.c: peXXigen.c + rm -f pex64igen.c + sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new + mv -f pex64igen.new pex64igen.c + +BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h +LOCAL_H_DEPS= libbfd.h sysdep.h config.h +$(BFD32_LIBS) \ + $(BFD64_LIBS) \ + $(ALL_MACHINES) \ + $(BFD32_BACKENDS) \ + $(BFD64_BACKENDS) \ + $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) + +host-aout.lo: Makefile + +# The following program can be used to generate a simple config file +# which can be folded into an h-XXX file for a new host, with some editing. +aout-params.h: gen-aout + ./gen-aout host > aout-params.h +gen-aout: $(srcdir)/gen-aout.c Makefile + $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c + +$(BFD_H): stmp-bfd-h ; @true + +stmp-bfd-h: bfd-in3.h + rm -f bfd-tmp.h + cp bfd-in3.h bfd-tmp.h + $(SHELL) $(srcdir)/../move-if-change bfd-tmp.h $(BFD_H) + rm -f bfd-tmp.h + touch stmp-bfd-h + +BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \ + reloc.c syms.c bfd.c bfdio.c bfdwin.c \ + archive.c corefile.c targets.c format.c compress.c +BFD64_H_FILES = archive64.c +LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \ + cache.c reloc.c archures.c elf.c +LIBCOFF_H_FILES = libcoff-in.h coffcode.h + +# Could really use a "copy-if-change"... +headers: + (cd $(bfddocdir); $(MAKE) protos $(FLAGS_TO_PASS)) + cp $(bfddocdir)/bfd.h bfd-in2.h-new + $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h + cp $(bfddocdir)/libbfd.h libbfd.h-new + $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h + cp $(bfddocdir)/libcoff.h libcoff.h-new + $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h + +# We only rebuild the header files automatically if we have been +# configured with --enable-maintainer-mode. + +$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true +stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES) + (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h) + cp $(bfddocdir)/bfd.h bfd-in2.h-new + $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h + touch stmp-bin2-h + +$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true +stmp-lbfd-h: $(LIBBFD_H_FILES) + (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h) + cp $(bfddocdir)/libbfd.h libbfd.h-new + $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h + touch stmp-lbfd-h + +$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true +stmp-lcoff-h: $(LIBCOFF_H_FILES) + (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h) + cp $(bfddocdir)/libcoff.h libcoff.h-new + $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h + touch stmp-lcoff-h + +MOSTLYCLEANFILES = ofiles stamp-ofiles + +CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \ + stmp-bin2-h stmp-lbfd-h stmp-lcoff-h + +DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion + +bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in + @echo "creating $@" + @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ + bfd_version_string="\"$(VERSION)\"" ;\ + bfd_soversion="$(VERSION)" ;\ + bfd_version_package="\"$(PKGVERSION)\"" ;\ + report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ + if test "x$(RELEASE)" = x ; then \ + bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\ + bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\ + bfd_soversion="$(VERSION).$${bfd_version_date}" ;\ + fi ;\ + sed -e "s,@bfd_version@,$$bfd_version," \ + -e "s,@bfd_version_string@,$$bfd_version_string," \ + -e "s,@bfd_version_package@,$$bfd_version_package," \ + -e "s,@report_bugs_to@,$$report_bugs_to," \ + < $(srcdir)/version.h > $@; \ + echo "$${bfd_soversion}" > libtool-soversion diff --git a/cegcc/src/binutils/bfd/Makefile.in b/cegcc/src/binutils/bfd/Makefile.in dissimilarity index 67% index 9932dea13..5700ed3b1 100644 --- a/cegcc/src/binutils/bfd/Makefile.in +++ b/cegcc/src/binutils/bfd/Makefile.in @@ -1,2638 +1,1993 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub README \ - ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.in $(srcdir)/../mkinstalldirs \ - $(srcdir)/bfd-in2.h $(top_srcdir)/po/Make-in \ - $(srcdir)/../ltmain.sh $(srcdir)/../config.guess \ - $(srcdir)/../config.sub -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ - $(top_srcdir)/../config/depstand.m4 \ - $(top_srcdir)/../config/extensions.m4 \ - $(top_srcdir)/../config/gettext-sister.m4 \ - $(top_srcdir)/../config/lead-dot.m4 \ - $(top_srcdir)/../config/nls.m4 \ - $(top_srcdir)/../config/override.m4 \ - $(top_srcdir)/../config/po.m4 \ - $(top_srcdir)/../config/proginstall.m4 \ - $(top_srcdir)/../config/progtest.m4 \ - $(top_srcdir)/../config/stdint.m4 $(top_srcdir)/../libtool.m4 \ - $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ - $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ - $(top_srcdir)/bfd.m4 $(top_srcdir)/warning.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = bfd-in3.h po/Makefile.in -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libbfd_a_AR = $(AR) $(ARFLAGS) -libbfd_a_LIBADD = -am_libbfd_a_OBJECTS = -libbfd_a_OBJECTS = $(am_libbfd_a_OBJECTS) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(bfdlibdir)" -bfdlibLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(bfdlib_LTLIBRARIES) -am__objects_1 = archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \ - cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo \ - opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo \ - linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo \ - stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo -am_libbfd_la_OBJECTS = $(am__objects_1) -libbfd_la_OBJECTS = $(am_libbfd_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I. -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BFD_HOSTPTR_T = @BFD_HOSTPTR_T@ -BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@ -BFD_HOST_64BIT_LONG_LONG = @BFD_HOST_64BIT_LONG_LONG@ -BFD_HOST_64_BIT = @BFD_HOST_64_BIT@ -BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@ -BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CC_FOR_BUILD = @CC_FOR_BUILD@ -CFLAGS = @CFLAGS@ -COREFILE = @COREFILE@ -COREFLAG = @COREFLAG@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ -DEBUGDIR = @DEBUGDIR@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -FGREP = @FGREP@ -GENCAT = @GENCAT@ -GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@ -GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -HDEFINES = @HDEFINES@ -INCINTL = @INCINTL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@ -INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBINTL = @LIBINTL@ -LIBINTL_DEP = @LIBINTL_DEP@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_WERROR = @NO_WERROR@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKGVERSION = @PKGVERSION@ -POSUB = @POSUB@ -RANLIB = @RANLIB@ -REPORT_BUGS_TEXI = @REPORT_BUGS_TEXI@ -REPORT_BUGS_TO = @REPORT_BUGS_TO@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHARED_LDFLAGS = @SHARED_LDFLAGS@ -SHARED_LIBADD = @SHARED_LIBADD@ -SHELL = @SHELL@ -STRIP = @STRIP@ -TDEFINES = @TDEFINES@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WARN_CFLAGS = @WARN_CFLAGS@ -XGETTEXT = @XGETTEXT@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_LIPO = @ac_ct_LIPO@ -ac_ct_NMEDIT = @ac_ct_NMEDIT@ -ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ -ac_ct_OTOOL = @ac_ct_OTOOL@ -ac_ct_OTOOL64 = @ac_ct_OTOOL64@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -all_backends = @all_backends@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bfd64_libs = @bfd64_libs@ -bfd_backends = @bfd_backends@ -bfd_default_target_size = @bfd_default_target_size@ -bfd_file_ptr = @bfd_file_ptr@ -bfd_machines = @bfd_machines@ -bfd_ufile_ptr = @bfd_ufile_ptr@ -bfdincludedir = @bfdincludedir@ -bfdlibdir = @bfdlibdir@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_noncanonical = @host_noncanonical@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_noncanonical = @target_noncanonical@ -target_os = @target_os@ -target_vendor = @target_vendor@ -tdefaults = @tdefaults@ -wordsize = @wordsize@ -AUTOMAKE_OPTIONS = 1.9 cygnus -ACLOCAL_AMFLAGS = -I . -I .. -I ../config - -# Uncomment the following line when doing a release. -# RELEASE=y -INCDIR = $(srcdir)/../include -CSEARCH = -I. -I$(srcdir) -I$(INCDIR) -MKDEP = gcc -MM -SUBDIRS = doc po -bfddocdir = doc -bfdlib_LTLIBRARIES = libbfd.la -AM_CFLAGS = $(WARN_CFLAGS) - -# bfd.h goes here, for now -BFD_H = bfd.h - -# Jim Kingdon notes: -# Writing S-records should be included in all (or at least most) -# *-*-coff, *-*-aout, etc., configurations, because people will want to -# be able to use objcopy to create S-records. (S-records are not useful -# for the debugger, so if you are downloading things as S-records you -# need two copies of the executable, one to download and one for the -# debugger). -BFD32_LIBS = \ - archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \ - cache.lo coffgen.lo corefile.lo \ - format.lo init.lo libbfd.lo opncls.lo reloc.lo \ - section.lo syms.lo targets.lo hash.lo linker.lo \ - srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \ - merge.lo dwarf2.lo simple.lo compress.lo - -BFD64_LIBS = archive64.lo -BFD32_LIBS_CFILES = \ - archive.c archures.c bfd.c bfdio.c bfdwin.c \ - cache.c coffgen.c corefile.c \ - format.c init.c libbfd.c opncls.c reloc.c \ - section.c syms.c targets.c hash.c linker.c \ - srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \ - merge.c dwarf2.c simple.c compress.c - -BFD64_LIBS_CFILES = archive64.c - -# This list is alphabetized to make it easier to keep in sync -# with the decls and initializer in archures.c. -ALL_MACHINES = \ - cpu-alpha.lo \ - cpu-arc.lo \ - cpu-arm.lo \ - cpu-avr.lo \ - cpu-bfin.lo \ - cpu-cr16.lo \ - cpu-cr16c.lo \ - cpu-cris.lo \ - cpu-crx.lo \ - cpu-d10v.lo \ - cpu-d30v.lo \ - cpu-dlx.lo \ - cpu-fr30.lo \ - cpu-frv.lo \ - cpu-h8300.lo \ - cpu-h8500.lo \ - cpu-hppa.lo \ - cpu-ia64.lo \ - cpu-i370.lo \ - cpu-i386.lo \ - cpu-i860.lo \ - cpu-i960.lo \ - cpu-ip2k.lo \ - cpu-iq2000.lo \ - cpu-lm32.lo \ - cpu-m32c.lo \ - cpu-m32r.lo \ - cpu-m68hc11.lo \ - cpu-m68hc12.lo \ - cpu-m68k.lo \ - cpu-m88k.lo \ - cpu-m10200.lo \ - cpu-m10300.lo \ - cpu-maxq.lo \ - cpu-mcore.lo \ - cpu-mep.lo \ - cpu-mips.lo \ - cpu-mmix.lo \ - cpu-mt.lo \ - cpu-msp430.lo \ - cpu-or32.lo \ - cpu-ns32k.lo \ - cpu-openrisc.lo \ - cpu-pdp11.lo \ - cpu-pj.lo \ - cpu-powerpc.lo \ - cpu-rs6000.lo \ - cpu-s390.lo \ - cpu-score.lo \ - cpu-sh.lo \ - cpu-sparc.lo \ - cpu-spu.lo \ - cpu-tic30.lo \ - cpu-tic4x.lo \ - cpu-tic54x.lo \ - cpu-tic80.lo \ - cpu-v850.lo \ - cpu-vax.lo \ - cpu-we32k.lo \ - cpu-w65.lo \ - cpu-xstormy16.lo \ - cpu-xtensa.lo \ - cpu-xc16x.lo \ - cpu-z80.lo \ - cpu-z8k.lo - -ALL_MACHINES_CFILES = \ - cpu-alpha.c \ - cpu-arc.c \ - cpu-arm.c \ - cpu-avr.c \ - cpu-bfin.c \ - cpu-cr16.c \ - cpu-cris.c \ - cpu-cr16c.c \ - cpu-crx.c \ - cpu-d10v.c \ - cpu-d30v.c \ - cpu-dlx.c \ - cpu-fr30.c \ - cpu-frv.c \ - cpu-h8300.c \ - cpu-h8500.c \ - cpu-hppa.c \ - cpu-ia64.c \ - cpu-i370.c \ - cpu-i386.c \ - cpu-i860.c \ - cpu-i960.c \ - cpu-ip2k.c \ - cpu-iq2000.c \ - cpu-lm32.c \ - cpu-m32c.c \ - cpu-m32r.c \ - cpu-m68hc11.c \ - cpu-m68hc12.c \ - cpu-m68k.c \ - cpu-m88k.c \ - cpu-m10200.c \ - cpu-m10300.c \ - cpu-maxq.c \ - cpu-mcore.c \ - cpu-mep.c \ - cpu-mips.c \ - cpu-mmix.c \ - cpu-mt.c \ - cpu-msp430.c \ - cpu-or32.c \ - cpu-ns32k.c \ - cpu-openrisc.c \ - cpu-pdp11.c \ - cpu-pj.c \ - cpu-powerpc.c \ - cpu-rs6000.c \ - cpu-s390.c \ - cpu-score.c \ - cpu-sh.c \ - cpu-sparc.c \ - cpu-spu.c \ - cpu-tic30.c \ - cpu-tic4x.c \ - cpu-tic54x.c \ - cpu-tic80.c \ - cpu-v850.c \ - cpu-vax.c \ - cpu-we32k.c \ - cpu-w65.c \ - cpu-xstormy16.c \ - cpu-xtensa.c \ - cpu-xc16x.c \ - cpu-z80.c \ - cpu-z8k.c - - -# The .o files needed by all of the 32 bit vectors that are configured into -# target_vector in targets.c if configured with --enable-targets=all. -BFD32_BACKENDS = \ - aout-adobe.lo \ - aout-arm.lo \ - aout-cris.lo \ - aout-ns32k.lo \ - aout-sparcle.lo \ - aout-tic30.lo \ - aout0.lo \ - aout32.lo \ - armnetbsd.lo \ - bout.lo \ - cf-i386lynx.lo \ - cf-sparclynx.lo \ - coff-apollo.lo \ - coff-arm.lo \ - coff-aux.lo \ - coff-h8300.lo \ - coff-h8500.lo \ - coff-i386.lo \ - coff-go32.lo \ - coff-i860.lo \ - coff-i960.lo \ - coff-m68k.lo \ - coff-m88k.lo \ - coff-maxq.lo \ - coff-mips.lo \ - coff-or32.lo \ - coff-rs6000.lo \ - coff-sh.lo \ - coff-sparc.lo \ - coff-stgo32.lo \ - coff-svm68k.lo \ - coff-tic30.lo \ - coff-tic4x.lo \ - coff-tic54x.lo \ - coff-tic80.lo \ - coff-u68k.lo \ - coff-we32k.lo \ - coff-w65.lo \ - coff-z80.lo \ - coff-z8k.lo \ - cofflink.lo \ - dwarf1.lo \ - ecoff.lo \ - ecofflink.lo \ - efi-app-ia32.lo \ - efi-bsdrv-ia32.lo \ - efi-rtdrv-ia32.lo \ - elf.lo \ - elf32-am33lin.lo \ - elf32-arc.lo \ - elf32-arm.lo \ - elf32-avr.lo \ - elf32-bfin.lo \ - elf32-cr16.lo \ - elf32-cr16c.lo \ - elf32-cris.lo \ - elf32-crx.lo \ - elf32-d10v.lo \ - elf32-d30v.lo \ - elf32-dlx.lo \ - elf32-fr30.lo \ - elf32-frv.lo \ - elf32-gen.lo \ - elf32-h8300.lo \ - elf32-hppa.lo \ - elf32-i370.lo \ - elf32-i386.lo \ - elf32-i860.lo \ - elf32-i960.lo \ - elf32-ip2k.lo \ - elf32-iq2000.lo \ - elf32-lm32.lo \ - elf32-m32c.lo \ - elf32-m32r.lo \ - elf32-m68hc11.lo \ - elf32-m68hc12.lo \ - elf32-m68hc1x.lo \ - elf32-m68k.lo \ - elf32-m88k.lo \ - elf-m10200.lo \ - elf-m10300.lo \ - elf32-mcore.lo \ - elf32-mep.lo \ - elfxx-mips.lo \ - elf32-mips.lo \ - elf32-mt.lo \ - elf32-msp430.lo \ - elf32-openrisc.lo \ - elf32-or32.lo \ - elf32-pj.lo \ - elf32-ppc.lo \ - elf32-s390.lo \ - elf32-score.lo \ - elf32-sh.lo \ - elf32-sh-symbian.lo \ - elf32-sh64.lo \ - elf32-sh64-com.lo \ - elfxx-sparc.lo \ - elf32-sparc.lo \ - elf32-spu.lo \ - elf32-v850.lo \ - elf32-vax.lo \ - elf32-xstormy16.lo \ - elf32-xtensa.lo \ - elf32-xc16x.lo \ - elf32.lo \ - elflink.lo \ - elf-attrs.lo \ - elf-strtab.lo \ - elf-eh-frame.lo \ - elf-vxworks.lo \ - epoc-pe-arm.lo \ - epoc-pei-arm.lo \ - hp300bsd.lo \ - hp300hpux.lo \ - som.lo \ - i386aout.lo \ - i386bsd.lo \ - i386dynix.lo \ - i386freebsd.lo \ - i386linux.lo \ - i386lynx.lo \ - i386msdos.lo \ - i386netbsd.lo \ - i386mach3.lo \ - i386os9k.lo \ - ieee.lo \ - m68k4knetbsd.lo \ - m68klinux.lo \ - m68knetbsd.lo \ - m88kmach3.lo \ - m88kopenbsd.lo \ - mach-o.lo \ - mipsbsd.lo \ - newsos3.lo \ - nlm.lo \ - nlm32-i386.lo \ - nlm32-sparc.lo \ - nlm32-ppc.lo \ - nlm32.lo \ - ns32knetbsd.lo \ - oasys.lo \ - pc532-mach.lo \ - pdp11.lo \ - pef.lo \ - pe-arm.lo \ - pei-arm.lo \ - pe-arm-wince.lo \ - pei-arm-wince.lo \ - pe-i386.lo \ - pei-i386.lo \ - pe-mcore.lo \ - pei-mcore.lo \ - pe-ppc.lo \ - pei-ppc.lo \ - pe-sh.lo \ - pei-sh.lo \ - pe-mips.lo \ - pei-mips.lo \ - peigen.lo \ - ppcboot.lo \ - reloc16.lo \ - riscix.lo \ - sparclinux.lo \ - sparclynx.lo \ - sparcnetbsd.lo \ - sunos.lo \ - vaxnetbsd.lo \ - vax1knetbsd.lo \ - vaxbsd.lo \ - versados.lo \ - vms.lo \ - vms-gsd.lo \ - vms-hdr.lo \ - vms-misc.lo \ - vms-tir.lo \ - vmsutil.lo \ - xcofflink.lo \ - xsym.lo \ - xtensa-isa.lo \ - xtensa-modules.lo - -BFD32_BACKENDS_CFILES = \ - aout-adobe.c \ - aout-arm.c \ - aout-cris.c \ - aout-ns32k.c \ - aout-sparcle.c \ - aout-tic30.c \ - aout0.c \ - aout32.c \ - armnetbsd.c \ - bout.c \ - cf-i386lynx.c \ - cf-sparclynx.c \ - coff-apollo.c \ - coff-arm.c \ - coff-aux.c \ - coff-h8300.c \ - coff-h8500.c \ - coff-i386.c \ - coff-i860.c \ - coff-go32.c \ - coff-i960.c \ - coff-m68k.c \ - coff-m88k.c \ - coff-maxq.c \ - coff-mips.c \ - coff-or32.c \ - coff-rs6000.c \ - coff-sh.c \ - coff-sparc.c \ - coff-stgo32.c \ - coff-svm68k.c \ - coff-tic30.c \ - coff-tic4x.c \ - coff-tic54x.c \ - coff-tic80.c \ - coff-u68k.c \ - coff-we32k.c \ - coff-w65.c \ - coff-z80.c \ - coff-z8k.c \ - cofflink.c \ - dwarf1.c \ - ecoff.c \ - ecofflink.c \ - efi-app-ia32.c \ - efi-bsdrv-ia32.c \ - efi-rtdrv-ia32.c \ - elf.c \ - elf32-am33lin.c \ - elf32-arc.c \ - elf32-arm.c \ - elf32-avr.c \ - 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-fr30.c \ - elf32-frv.c \ - elf32-gen.c \ - elf32-h8300.c \ - elf32-hppa.c \ - elf32-i370.c \ - elf32-i386.c \ - elf32-i860.c \ - elf32-i960.c \ - elf32-ip2k.c \ - elf32-iq2000.c \ - elf32-lm32.c \ - elf32-m32c.c \ - elf32-m32r.c \ - elf32-m68k.c \ - elf32-m68hc11.c \ - elf32-m68hc12.c \ - elf32-m68hc1x.c \ - elf32-m88k.c \ - elf-m10200.c \ - elf-m10300.c \ - elf32-mcore.c \ - elf32-mep.c \ - elfxx-mips.c \ - elf32-mips.c \ - elf32-mt.c \ - elf32-msp430.c \ - elf32-openrisc.c \ - elf32-or32.c \ - elf32-pj.c \ - elf32-ppc.c \ - elf32-sh64.c \ - elf32-sh64-com.c \ - elf32-s390.c \ - elf32-score.c \ - elf32-sh.c \ - elf32-sh-symbian.c \ - elfxx-sparc.c \ - elf32-sparc.c \ - elf32-spu.c \ - elf32-v850.c \ - elf32-vax.c \ - elf32-xstormy16.c \ - elf32-xtensa.c \ - elf32-xc16x.c \ - elf32.c \ - elflink.c \ - elf-attrs.c \ - elf-strtab.c \ - elf-eh-frame.c \ - elf-vxworks.c \ - epoc-pe-arm.c \ - epoc-pei-arm.c \ - hp300bsd.c \ - hp300hpux.c \ - som.c \ - i386aout.c \ - i386bsd.c \ - i386dynix.c \ - i386freebsd.c \ - i386linux.c \ - i386lynx.c \ - i386msdos.c \ - i386netbsd.c \ - i386mach3.c \ - i386os9k.c \ - ieee.c \ - m68k4knetbsd.c \ - m68klinux.c \ - m68knetbsd.c \ - m88kmach3.c \ - m88kopenbsd.c \ - mach-o.c \ - mipsbsd.c \ - newsos3.c \ - nlm.c \ - nlm32-i386.c \ - nlm32-sparc.c \ - nlm32-ppc.c \ - nlm32.c \ - ns32knetbsd.c \ - oasys.c \ - pc532-mach.c \ - pdp11.c \ - pef.c \ - pe-arm.c \ - pei-arm.c \ - pe-arm-wince.c \ - pei-arm-wince.c \ - pe-i386.c \ - pei-i386.c \ - pe-mcore.c \ - pei-mcore.c \ - pe-ppc.c \ - pei-ppc.c \ - pe-sh.c \ - pei-sh.c \ - pe-mips.c \ - pei-mips.c \ - ppcboot.c \ - reloc16.c \ - riscix.c \ - sparclinux.c \ - sparclynx.c \ - sparcnetbsd.c \ - sunos.c \ - vaxnetbsd.c \ - vax1knetbsd.c \ - vaxbsd.c \ - versados.c \ - vms.c \ - vms-gsd.c \ - vms-hdr.c \ - vms-misc.c \ - vms-tir.c \ - vmsutil.c \ - xcofflink.c \ - xsym.c \ - xtensa-isa.c \ - xtensa-modules.c - - -# The .o files needed by all of the 64 bit vectors that are configured into -# target_vector in targets.c if configured with --enable-targets=all -# and --enable-64-bit-bfd. -# elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in -# BFD32_BACKENDS. -BFD64_BACKENDS = \ - aix5ppc-core.lo \ - aout64.lo \ - coff-alpha.lo \ - coff64-rs6000.lo \ - demo64.lo \ - efi-app-ia64.lo \ - efi-bsdrv-ia64.lo \ - efi-rtdrv-ia64.lo \ - efi-app-x86_64.lo \ - efi-bsdrv-x86_64.lo \ - efi-rtdrv-x86_64.lo \ - elf64-x86-64.lo \ - elf64-alpha.lo \ - elf64-hppa.lo \ - elf32-ia64.lo \ - elf64-ia64.lo \ - elf64-gen.lo \ - elfn32-mips.lo \ - elf64-mips.lo \ - elf64-mmix.lo \ - elf64-sh64.lo \ - elf64-ppc.lo \ - elf64-s390.lo \ - elf64-sparc.lo \ - elf64.lo \ - mmo.lo \ - nlm32-alpha.lo \ - nlm64.lo \ - coff-x86_64.lo \ - pe-x86_64.lo \ - pei-x86_64.lo \ - pepigen.lo \ - pex64igen.lo - -BFD64_BACKENDS_CFILES = \ - aix5ppc-core.c \ - aout64.c \ - coff-alpha.c \ - coff64-rs6000.c \ - demo64.c \ - efi-app-ia64.c \ - efi-bsdrv-ia64.c \ - efi-rtdrv-ia64.c \ - efi-app-x86_64.c \ - efi-bsdrv-x86_64.c \ - efi-rtdrv-x86_64.c \ - elf64-x86-64.c \ - elf64-alpha.c \ - elf64-hppa.c \ - elf64-gen.c \ - elfn32-mips.c \ - elf64-mips.c \ - elf64-mmix.c \ - elf64-ppc.c \ - elf64-s390.c \ - elf64-sh64.c \ - elf64-sparc.c \ - elf64.c \ - mmo.c \ - nlm32-alpha.c \ - nlm64.c \ - coff-x86_64.c \ - pe-x86_64.c \ - pei-x86_64.c - -OPTIONAL_BACKENDS = \ - aix386-core.lo \ - hpux-core.lo \ - irix-core.lo \ - lynx-core.lo \ - osf-core.lo \ - sco5-core.lo \ - trad-core.lo \ - cisco-core.lo - -OPTIONAL_BACKENDS_CFILES = \ - aix386-core.c \ - hpux-core.c \ - irix-core.c \ - lynx-core.c \ - osf-core.c \ - sco5-core.c \ - trad-core.c \ - cisco-core.c - - -# We want to rerun configure if configure.in, config.bfd or -# configure.host change. configure.in is needed since the version -# number in Makefile comes from configure.in. -CONFIG_STATUS_DEPENDENCIES = \ - $(srcdir)/configure.in \ - $(srcdir)/config.bfd \ - $(srcdir)/configure.host - - -# These are defined by configure.in: -WORDSIZE = @wordsize@ -ALL_BACKENDS = @all_backends@ -BFD_BACKENDS = @bfd_backends@ -BFD_MACHINES = @bfd_machines@ -TDEFAULTS = @tdefaults@ -INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) @INCINTL@ - -# C source files that correspond to .o's. -SOURCE_CFILES = \ - $(BFD32_LIBS_CFILES) \ - $(BFD64_LIBS_CFILES) \ - $(ALL_MACHINES_CFILES) \ - $(BFD32_BACKENDS_CFILES) \ - $(BFD64_BACKENDS_CFILES) \ - $(OPTIONAL_BACKENDS_CFILES) - -BUILD_CFILES = \ - elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c - -CFILES = $(SOURCE_CFILES) $(BUILD_CFILES) -SOURCE_HFILES = \ - aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \ - elf-bfd.h elf-hppa.h elf32-hppa.h \ - elf64-hppa.h elfcode.h elfcore.h \ - freebsd.h genlink.h go32stub.h \ - libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \ - libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \ - netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \ - pef.h pef-traceback.h peicode.h som.h version.h \ - vms.h xcoff-target.h xsym.h - -BUILD_HFILES = \ - bfdver.h elf32-target.h elf64-target.h targmatch.h bfd_stdint.h - -HFILES = $(SOURCE_HFILES) $(BUILD_HFILES) -SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES) -BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES) - -# Various kinds of .o files to put in libbfd.a: -# BFD_BACKENDS Routines the configured targets need. -# BFD_MACHINES Architecture-specific routines the configured targets need. -# COREFILE Core file routines for a native configuration -# bfd64_libs Routines for 64bit support -OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ @bfd64_libs@ - -# Since BFD64_LIBS is optional and we can't have substitution in -# libbfd_la_SOURCES, we put BFD64_LIBS in OFILES instead. -libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) -libbfd_la_DEPENDENCIES = $(OFILES) ofiles -libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ -libbfd_la_LDFLAGS = -release `cat libtool-soversion` @SHARED_LDFLAGS@ - -# libtool will build .libs/libbfd.a. We create libbfd.a in the build -# directory so that we don't have to convert all the programs that use -# libbfd.a simultaneously. This is a hack which should be removed if -# everything else starts using libtool. FIXME. -noinst_LIBRARIES = libbfd.a -libbfd_a_SOURCES = -BFD_H_DEPS = $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h -LOCAL_H_DEPS = libbfd.h sysdep.h config.h -BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \ - reloc.c syms.c bfd.c bfdio.c bfdwin.c \ - archive.c corefile.c targets.c format.c compress.c - -BFD64_H_FILES = archive64.c -LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \ - cache.c reloc.c archures.c elf.c - -LIBCOFF_H_FILES = libcoff-in.h coffcode.h -MOSTLYCLEANFILES = ofiles stamp-ofiles -CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \ - stmp-bin2-h stmp-lbfd-h stmp-lcoff-h - -DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -bfd-in3.h: $(top_builddir)/config.status $(srcdir)/bfd-in2.h - cd $(top_builddir) && $(SHELL) ./config.status $@ -po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) - -clean-bfdlibLTLIBRARIES: - -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES) - @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES) - $(LINK) -rpath $(bfdlibdir) $(libbfd_la_LDFLAGS) $(libbfd_la_OBJECTS) $(libbfd_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(COMPILE) -c $< - -.c.obj: - $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: - $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-am: -check: check-recursive -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) config.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(bfdlibdir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-bfdlibLTLIBRARIES clean-generic clean-libtool \ - clean-noinstLIBRARIES mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: install-bfdlibLTLIBRARIES - -install-exec-am: - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-bfdlibLTLIBRARIES - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-bfdlibLTLIBRARIES clean-generic \ - clean-libtool clean-noinstLIBRARIES clean-recursive ctags \ - ctags-recursive distclean distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-recursive \ - distclean-tags dvi dvi-am html html-am info info-am install \ - install-am install-bfdlibLTLIBRARIES install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ - uninstall-bfdlibLTLIBRARIES uninstall-info-am - - -po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES) - for file in $(SRC_POTFILES); do echo $$file; done \ - | LC_ALL=C sort > tmp.src \ - && mv tmp.src $(srcdir)/po/SRC-POTFILES.in - -po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES) - for file in $(BLD_POTFILES); do echo $$file; done \ - | LC_ALL=C sort > tmp.bld \ - && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in - -all diststuff: info - -.PHONY: install-pdf install-pdf-am install-pdf-recursive - -install-pdf: install-pdf-recursive - -install-pdf-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -.PHONY: install-html install-html-am install-html-recursive - -install-html: install-html-recursive - -install-html-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -stamp-ofiles: Makefile - rm -f tofiles - f=""; \ - for i in $(OFILES) ; do \ - case " $$f " in \ - *" $$i "*) ;; \ - *) f="$$f $$i" ;; \ - esac ; \ - done ; \ - echo $$f > tofiles - $(SHELL) $(srcdir)/../move-if-change tofiles ofiles - touch stamp-ofiles - -ofiles: stamp-ofiles ; @true - -stamp-lib: libbfd.la - libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \ - if [ -f $$libtooldir/libbfd.a ]; then \ - cp $$libtooldir/libbfd.a libbfd.tmp; \ - $(RANLIB) libbfd.tmp; \ - $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \ - else true; fi - touch stamp-lib - -libbfd.a: stamp-lib ; @true - -# This file holds an array associating configuration triplets and -# vector names. It is built from config.bfd. It is not compiled by -# itself, but is included by targets.c. -targmatch.h: config.bfd targmatch.sed - rm -f targmatch.h - sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new - mv -f targmatch.new targmatch.h - -# When compiling archures.c and targets.c, supply the default target -# info from configure. - -targets.lo: targets.c Makefile - $(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/targets.c - -archures.lo: archures.c Makefile - $(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/archures.c - -dwarf2.lo: dwarf2.c Makefile - $(LIBTOOL) --mode=compile $(COMPILE) -c -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c - -elf32-target.h : elfxx-target.h - rm -f elf32-target.h - sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new - mv -f elf32-target.new elf32-target.h - -elf64-target.h : elfxx-target.h - rm -f elf64-target.h - sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new - mv -f elf64-target.new elf64-target.h - -elf32-ia64.c : elfxx-ia64.c - rm -f elf32-ia64.c - sed -e s/NN/32/g < $(srcdir)/elfxx-ia64.c > elf32-ia64.new - mv -f elf32-ia64.new elf32-ia64.c - -elf64-ia64.c : elfxx-ia64.c - rm -f elf64-ia64.c - sed -e s/NN/64/g < $(srcdir)/elfxx-ia64.c > elf64-ia64.new - mv -f elf64-ia64.new elf64-ia64.c - -peigen.c : peXXigen.c - rm -f peigen.c - sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new - mv -f peigen.new peigen.c - -pepigen.c : peXXigen.c - rm -f pepigen.c - sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new - mv -f pepigen.new pepigen.c - -pex64igen.c: peXXigen.c - rm -f pex64igen.c - sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new - mv -f pex64igen.new pex64igen.c -$(BFD32_LIBS) \ - $(BFD64_LIBS) \ - $(ALL_MACHINES) \ - $(BFD32_BACKENDS) \ - $(BFD64_BACKENDS) \ - $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) - -install-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@install_libbfd - @$(NORMAL_INSTALL) - -uninstall-bfdlibLTLIBRARIES: @INSTALL_LIBBFD_TRUE@uninstall_libbfd - @$(NORMAL_UNINSTALL) - -.PHONY: install_libbfd uninstall_libbfd -install_libbfd: $(bfdlib_LTLIBRARIES) $(BFD_H) - $(mkinstalldirs) $(DESTDIR)$(bfdlibdir) - $(mkinstalldirs) $(DESTDIR)$(bfdincludedir) - @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \ - $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \ - else :; fi; \ - done - $(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(bfdincludedir)/bfd.h - $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(bfdincludedir)/ansidecl.h - $(INSTALL_DATA) $(INCDIR)/symcat.h $(DESTDIR)$(bfdincludedir)/symcat.h - $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(bfdincludedir)/bfdlink.h - -uninstall_libbfd: - list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ - $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bfdlibdir)/$$p; \ - done - rm -f $(DESTDIR)$(bfdincludedir)/bfd.h - rm -f $(DESTDIR)$(bfdincludedir)/ansidecl.h - rm -f $(DESTDIR)$(bfdincludedir)/symcat.h - rm -f $(DESTDIR)$(bfdincludedir)/bfdlink.h - -# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES). -DEP: dep.sed $(CFILES) $(HFILES) bfd.h - rm -f DEP1 - $(MAKE) MKDEP="$(MKDEP)" DEP1 - sed -f dep.sed < DEP1 > DEPA - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA - if grep ' /' DEPA > /dev/null 2> /dev/null; then \ - echo 'make DEP failed!'; exit 1; \ - else \ - mv -f DEPA $@; \ - fi - -DEP1: $(CFILES) - echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2 - echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2 - $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2 - mv -f DEP2 $@ - -dep.sed: dep-in.sed config.status - sed <$(srcdir)/dep-in.sed >dep.sed \ - -e 's!@BFD_H@!$(BFD_H)!' \ - -e 's!@SRCDIR@!$(srcdir)!' \ - -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/bfd$$,,`'!' - -dep: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile - cat DEP >> tmp-Makefile - $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile - -dep-in: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in - cat DEP >> tmp-Makefile.in - $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in - -dep-am: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am - cat DEP >> tmp-Makefile.am - $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am - -host-aout.lo: Makefile - -# The following program can be used to generate a simple config file -# which can be folded into an h-XXX file for a new host, with some editing. -aout-params.h: gen-aout - ./gen-aout host > aout-params.h -gen-aout: $(srcdir)/gen-aout.c Makefile - $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c - -$(BFD_H): stmp-bfd-h ; @true - -stmp-bfd-h: bfd-in3.h - rm -f bfd-tmp.h - cp bfd-in3.h bfd-tmp.h - $(SHELL) $(srcdir)/../move-if-change bfd-tmp.h $(BFD_H) - rm -f bfd-tmp.h - touch stmp-bfd-h - -# Could really use a "copy-if-change"... -headers: - (cd $(bfddocdir); $(MAKE) protos $(FLAGS_TO_PASS)) - cp $(bfddocdir)/bfd.h bfd-in2.h-new - $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h - cp $(bfddocdir)/libbfd.h libbfd.h-new - $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h - cp $(bfddocdir)/libcoff.h libcoff.h-new - $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h - -# We only rebuild the header files automatically if we have been -# configured with --enable-maintainer-mode. - -$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true -stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES) - (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h) - cp $(bfddocdir)/bfd.h bfd-in2.h-new - $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h - touch stmp-bin2-h - -$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true -stmp-lbfd-h: $(LIBBFD_H_FILES) - (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h) - cp $(bfddocdir)/libbfd.h libbfd.h-new - $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h - touch stmp-lbfd-h - -$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true -stmp-lcoff-h: $(LIBCOFF_H_FILES) - (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h) - cp $(bfddocdir)/libcoff.h libcoff.h-new - $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h - touch stmp-lcoff-h - -bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in - @echo "creating $@" - @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ - bfd_version_string="\"$(VERSION)\"" ;\ - bfd_soversion="$(VERSION)" ;\ - bfd_version_package="\"$(PKGVERSION)\"" ;\ - report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ - if test "x$(RELEASE)" = x ; then \ - bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\ - bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\ - bfd_soversion="$(VERSION).$${bfd_version_date}" ;\ - fi ;\ - sed -e "s,@bfd_version@,$$bfd_version," \ - -e "s,@bfd_version_string@,$$bfd_version_string," \ - -e "s,@bfd_version_package@,$$bfd_version_package," \ - -e "s,@report_bugs_to@,$$report_bugs_to," \ - < $(srcdir)/version.h > $@; \ - echo "$${bfd_soversion}" > libtool-soversion - -# What appears below is generated by a hacked mkdep using gcc -MM. - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. -archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h \ - $(INCDIR)/safe-ctype.h -archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/safe-ctype.h -bfd.lo: bfd.c $(INCDIR)/filenames.h bfdver.h $(INCDIR)/libiberty.h \ - $(INCDIR)/demangle.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h -bfdio.lo: bfdio.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -bfdwin.lo: bfdwin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cache.lo: cache.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h -coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h -corefile.lo: corefile.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -format.lo: format.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -init.lo: init.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -libbfd.lo: libbfd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h \ - $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h -reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h -section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h -syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def -targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/fnmatch.h targmatch.h -hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/objalloc.h $(INCDIR)/libiberty.h -linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h -srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h -binary.lo: binary.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/hashtab.h -tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h -ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h -stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h -stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def -merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h -dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/dwarf2.h -simple.lo: simple.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h -compress.lo: compress.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/ar.h -cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h -cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-bfin.lo: cpu-bfin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-cr16.lo: cpu-cr16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-cr16c.lo: cpu-cr16c.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-crx.lo: cpu-crx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-dlx.lo: cpu-dlx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-frv.lo: cpu-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-ia64.lo: cpu-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - cpu-ia64-opc.c $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h -cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-ip2k.lo: cpu-ip2k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-iq2000.lo: cpu-iq2000.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-lm32.lo: cpu-lm32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-m32c.lo: cpu-m32c.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h -cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h -cpu-m68k.lo: cpu-m68k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/opcode/m68k.h -cpu-m88k.lo: cpu-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-maxq.lo: cpu-maxq.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-mep.lo: cpu-mep.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-mt.lo: cpu-mt.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-msp430.lo: cpu-msp430.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-or32.lo: cpu-or32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - ns32k.h -cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h -cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h -cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-score.lo: cpu-score.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(srcdir)/../opcodes/sh-opc.h -cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-spu.lo: cpu-spu.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/safe-ctype.h -cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h -cpu-xtensa.lo: cpu-xtensa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-xc16x.lo: cpu-xc16x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-z80.lo: cpu-z80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/adobe.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - libaout.h $(INCDIR)/bfdlink.h -aout-arm.lo: aout-arm.c $(INCDIR)/filenames.h libaout.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aoutx.h \ - $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -aout-cris.lo: aout-cris.c aout32.c aoutx.h $(INCDIR)/filenames.h \ - $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h libaout.h \ - $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \ - ns32k.h libaout.h $(INCDIR)/bfdlink.h aoutx.h $(INCDIR)/filenames.h \ - $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \ - libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -aout-tic30.lo: aout-tic30.c $(INCDIR)/filenames.h libaout.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h \ - $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h -aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h aout-target.h -aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -armnetbsd.lo: armnetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h $(INCDIR)/libiberty.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h -cf-i386lynx.lo: cf-i386lynx.c $(INCDIR)/filenames.h \ - coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-apollo.lo: coff-apollo.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/apollo.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \ - coff-m68k.c $(INCDIR)/hashtab.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/h8300.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/libiberty.h coffcode.h coffswap.h -coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/i860.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-maxq.lo: coff-maxq.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/maxq.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \ - coffcode.h coffswap.h -coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h \ - $(INCDIR)/coff/external.h libcoff.h libecoff.h coffswap.h \ - ecoffswap.h -coff-or32.lo: coff-or32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/or32.h $(INCDIR)/coff/internal.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/xcoff.h $(INCDIR)/coff/rs6000.h libcoff.h \ - libxcoff.h coffcode.h coffswap.h -coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h coffcode.h coffswap.h -coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \ - go32stub.h -coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-tic4x.lo: coff-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h \ - $(INCDIR)/coff/ti.h $(INCDIR)/coff/internal.h libcoff.h \ - coffcode.h coffswap.h -coff-tic80.lo: coff-tic80.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/we32k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-z80.lo: coff-z80.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h libcoff.h \ - $(INCDIR)/safe-ctype.h -dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/dwarf.h -ecoff.lo: ecoff.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h libcoff.h \ - libecoff.h $(INCDIR)/libiberty.h -ecofflink.lo: ecofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/objalloc.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h libcoff.h \ - libecoff.h -efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \ - coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -efi-bsdrv-ia32.lo: efi-bsdrv-ia32.c $(INCDIR)/filenames.h \ - coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -efi-rtdrv-ia32.lo: efi-rtdrv-ia32.c $(INCDIR)/filenames.h \ - coff-i386.c $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/libiberty.h \ - $(INCDIR)/safe-ctype.h -elf32-am33lin.lo: elf32-am33lin.c $(INCDIR)/filenames.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h \ - $(INCDIR)/elf/reloc-macros.h elf-m10300.c $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h elf32-target.h -elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elf32-arm.lo: elf32-arm.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - elf-vxworks.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h \ - $(INCDIR)/elf/reloc-macros.h elf32-avr.h elf32-target.h -elf32-bfin.lo: elf32-bfin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/bfin.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \ - elf32-target.h -elf32-cr16.lo: elf32-cr16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/cr16.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-cr16c.lo: elf32-cr16c.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/cr16c.h \ - $(INCDIR)/elf/reloc-macros.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-target.h -elf32-cris.lo: elf32-cris.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/cris.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-crx.lo: elf32-crx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/crx.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-d10v.lo: elf32-d10v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/d10v.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-d30v.lo: elf32-d30v.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/d30v.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-dlx.lo: elf32-dlx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dlx.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-frv.lo: elf32-frv.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/frv.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \ - elf32-target.h -elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf32-target.h -elf32-h8300.lo: elf32-h8300.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h \ - $(INCDIR)/elf/reloc-macros.h libhppa.h elf32-hppa.h \ - elf-hppa.h elf32-target.h -elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/i370.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf-vxworks.h \ - bfd_stdint.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-i960.lo: elf32-i960.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/i960.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-ip2k.lo: elf32-ip2k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/ip2k.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-iq2000.lo: elf32-iq2000.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/iq2000.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-m32c.lo: elf32-m32c.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32c.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elf32-lm32.lo: elf32-lm32.c $(INCDIR)/filenames.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/lm32.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/m68k.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/m68k.h \ - elf32-target.h -elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-m68hc1x.h \ - $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/m68hc11.h elf32-target.h -elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-m68hc1x.h \ - $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/m68hc11.h elf32-target.h -elf32-m68hc1x.lo: elf32-m68hc1x.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf32-m68hc1x.h \ - $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/m68hc11.h -elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf32-target.h -elf-m10200.lo: elf-m10200.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf32-target.h -elf-m10300.lo: elf-m10300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/mcore.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-mep.lo: elf32-mep.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mep.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elfxx-mips.lo: elfxx-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - elfxx-mips.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - elf-vxworks.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h -elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elfxx-mips.h \ - $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h elf-vxworks.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \ - ecoffswap.h elf32-target.h -elf32-mt.lo: elf32-mt.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mt.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-msp430.lo: elf32-msp430.c $(INCDIR)/filenames.h \ - $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/openrisc.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/libiberty.h elf32-target.h -elf32-or32.lo: elf32-or32.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/or32.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/pj.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/ppc.h \ - $(INCDIR)/elf/reloc-macros.h elf32-ppc.h elf-vxworks.h \ - elf32-target.h -elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \ - elf32-sh64.h elf32-sh.c $(INCDIR)/hashtab.h elf-vxworks.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h -elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf32-sh64.h \ - $(srcdir)/../opcodes/sh64-opc.h -elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/s390.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-score.lo: elf32-score.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \ - elf32-target.h -elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elf-vxworks.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h -elf32-sh-symbian.lo: elf32-sh-symbian.c elf32-sh.c \ - $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h elf-vxworks.h $(INCDIR)/elf/sh.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h -elfxx-sparc.lo: elfxx-sparc.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/sparc.h elfxx-sparc.h elf-vxworks.h -elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/sparc.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \ - elfxx-sparc.h elf-vxworks.h elf32-target.h -elf32-spu.lo: elf32-spu.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/spu.h \ - $(INCDIR)/elf/reloc-macros.h elf32-spu.h elf32-target.h -elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/v850.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \ - elf32-target.h -elf32-vax.lo: elf32-vax.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/vax.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/libiberty.h elf32-target.h -elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/xtensa.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/xtensa-isa.h \ - $(INCDIR)/xtensa-config.h elf32-target.h -elf32-xc16x.lo: elf32-xc16x.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/xc16x.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/elf/dwarf2.h $(INCDIR)/libiberty.h elf32-target.h -elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elfcore.h -elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/libiberty.h $(INCDIR)/objalloc.h -elf-attrs.lo: elf-attrs.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h -elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h -elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/dwarf2.h -elf-vxworks.lo: elf-vxworks.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - elf-vxworks.h $(INCDIR)/elf/vxworks.h -epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \ - coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c $(INCDIR)/filenames.h \ - coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -hp300bsd.lo: hp300bsd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \ - aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -som.lo: som.c $(INCDIR)/filenames.h -i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \ - $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \ - libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -i386freebsd.lo: i386freebsd.c freebsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -i386linux.lo: i386linux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h -i386lynx.lo: i386lynx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ - aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -i386msdos.lo: i386msdos.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h -i386netbsd.lo: i386netbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h -i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/os9k.h -ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/ieee.h libieee.h $(INCDIR)/safe-ctype.h -m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -m68klinux.lo: m68klinux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h -m68knetbsd.lo: m68knetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -m88kmach3.lo: m88kmach3.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -m88kopenbsd.lo: m88kopenbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -mach-o.lo: mach-o.c $(INCDIR)/filenames.h mach-o.h \ - $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h mach-o-target.c -mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -newsos3.lo: newsos3.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h -nlm.lo: nlm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ - $(INCDIR)/nlm/external.h -nlm32-i386.lo: nlm32-i386.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/nlm/i386-ext.h libnlm.h $(INCDIR)/nlm/common.h \ - $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \ - nlm-target.h -nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/nlm/sparc32-ext.h libnlm.h \ - $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \ - nlmswap.h nlm-target.h -nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/nlm/ppc-ext.h libnlm.h $(INCDIR)/nlm/common.h \ - $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \ - nlm-target.h -nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ - $(INCDIR)/nlm/external.h -ns32knetbsd.lo: ns32knetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/hashtab.h $(INCDIR)/oasys.h liboasys.h -pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ - aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -pdp11.lo: pdp11.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - $(INCDIR)/safe-ctype.h -pef.lo: pef.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - pef.h pef-traceback.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h -pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-arm.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-arm-wince.lo: pe-arm-wince.c $(INCDIR)/filenames.h \ - pe-arm.c coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -pei-arm-wince.lo: pei-arm-wince.c pei-arm.c $(INCDIR)/filenames.h \ - coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -pe-i386.lo: pe-i386.c $(INCDIR)/filenames.h coff-i386.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-i386.lo: pei-i386.c $(INCDIR)/filenames.h coff-i386.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-mcore.lo: pe-mcore.c $(INCDIR)/filenames.h coff-mcore.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/libiberty.h \ - $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \ - libpei.h -pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \ - $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \ - libpei.h -pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/hashtab.h -reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/internal.h \ - libcoff.h -riscix.lo: riscix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ - aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -sparclinux.lo: sparclinux.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h libaout.h $(INCDIR)/bfdlink.h aout-target.h -sparclynx.lo: sparclynx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h aout-target.h -sparcnetbsd.lo: sparcnetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \ - $(INCDIR)/filenames.h $(INCDIR)/hashtab.h $(INCDIR)/aout/sun4.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h aout-target.h -vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -vax1knetbsd.lo: vax1knetbsd.c netbsd.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -vaxbsd.lo: vaxbsd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h -vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h vms.h -vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h vms.h -vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h bfdver.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h \ - vms.h -vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h vms.h -vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h vms.h -vmsutil.lo: vmsutil.c vmsutil.h $(INCDIR)/ansidecl.h -xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \ - libcoff.h libxcoff.h -xsym.lo: xsym.c $(INCDIR)/filenames.h xsym.h $(INCDIR)/hashtab.h -xtensa-isa.lo: xtensa-isa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-isa-internal.h -xtensa-modules.lo: xtensa-modules.c $(INCDIR)/xtensa-isa.h \ - $(INCDIR)/xtensa-isa-internal.h -aix5ppc-core.lo: aix5ppc-core.c $(INCDIR)/filenames.h -aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -coff-alpha.lo: coff-alpha.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \ - $(INCDIR)/aout/ar.h libcoff.h libecoff.h coffswap.h \ - ecoffswap.h -coff64-rs6000.lo: coff64-rs6000.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/xcoff.h $(INCDIR)/coff/rs6k64.h libcoff.h \ - libxcoff.h coffcode.h coffswap.h -demo64.lo: demo64.c aoutf1.h $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/aout/sun4.h libaout.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \ - coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -efi-bsdrv-ia64.lo: efi-bsdrv-ia64.c $(INCDIR)/filenames.h \ - coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -efi-rtdrv-ia64.lo: efi-rtdrv-ia64.c $(INCDIR)/filenames.h \ - coff-ia64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/ia64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ - peicode.h libpei.h -efi-app-x86_64.lo: efi-app-x86_64.c $(INCDIR)/filenames.h \ - coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \ - coffcode.h peicode.h libpei.h -efi-bsdrv-x86_64.lo: efi-bsdrv-x86_64.c $(INCDIR)/filenames.h \ - coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \ - coffcode.h peicode.h libpei.h -efi-rtdrv-x86_64.lo: efi-rtdrv-x86_64.c $(INCDIR)/filenames.h \ - coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \ - $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \ - coffcode.h peicode.h libpei.h -elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h bfd_stdint.h \ - $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.h \ - elf64-target.h -elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \ - libcoff.h libecoff.h ecoffswap.h elf64-target.h -elf64-hppa.lo: elf64-hppa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h \ - $(INCDIR)/elf/reloc-macros.h libhppa.h elf64-hppa.h \ - elf-hppa.h elf64-target.h -elf64-gen.lo: elf64-gen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h elf64-target.h -elfn32-mips.lo: elfn32-mips.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h genlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - elfxx-mips.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \ - ecoffswap.h elf32-target.h -elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h genlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \ - elfxx-mips.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \ - elf64-target.h -elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \ - elf64-target.h -elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/ppc64.h \ - $(INCDIR)/elf/reloc-macros.h elf64-ppc.h elf64-target.h -elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/s390.h \ - $(INCDIR)/elf/reloc-macros.h elf64-target.h -elf64-sh64.lo: elf64-sh64.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/sh.h \ - $(INCDIR)/elf/reloc-macros.h elf64-target.h -elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/sparc.h elfxx-sparc.h elf64-target.h -elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h elfcore.h -mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/libiberty.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/opcode/mmix.h -nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/nlm/alpha-ext.h libnlm.h \ - $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \ - nlmswap.h nlm-target.h -nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ - $(INCDIR)/nlm/external.h -coff-x86_64.lo: coff-x86_64.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \ - coffswap.h -pe-x86_64.lo: pe-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \ - peicode.h libpei.h -pei-x86_64.lo: pei-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \ - peicode.h libpei.h -aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \ - $(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h -hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -irix-core.lo: irix-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -osf-core.lo: osf-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h -trad-core.lo: trad-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - libaout.h $(INCDIR)/bfdlink.h -cisco-core.lo: cisco-core.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h -elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \ - $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \ - elf32-target.h -elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \ - $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \ - elf64-target.h -peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h -pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h -pex64igen.lo: pex64igen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@INSTALL_LIBBFD_FALSE@am__append_1 = -rpath $(rpath_bfdlibdir) +subdir = . +DIST_COMMON = README ChangeLog $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/config.in \ + $(srcdir)/../mkinstalldirs $(srcdir)/bfd-in2.h \ + $(top_srcdir)/po/Make-in $(srcdir)/../depcomp \ + $(am__bfdinclude_HEADERS_DIST) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ + $(top_srcdir)/../config/gettext-sister.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/nls.m4 \ + $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/plugins.m4 \ + $(top_srcdir)/../config/po.m4 \ + $(top_srcdir)/../config/progtest.m4 \ + $(top_srcdir)/../config/stdint.m4 $(top_srcdir)/../libtool.m4 \ + $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ + $(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \ + $(top_srcdir)/bfd.m4 $(top_srcdir)/warning.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = bfd-in3.h po/Makefile.in +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libbfd_a_AR = $(AR) $(ARFLAGS) +libbfd_a_LIBADD = +am_libbfd_a_OBJECTS = +libbfd_a_OBJECTS = $(am_libbfd_a_OBJECTS) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(bfdlibdir)" \ + "$(DESTDIR)$(bfdincludedir)" +LTLIBRARIES = $(bfdlib_LTLIBRARIES) $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +am__objects_1 = archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \ + cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo \ + opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo \ + linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo \ + stab-syms.lo merge.lo dwarf2.lo simple.lo compress.lo \ + verilog.lo +am_libbfd_la_OBJECTS = $(am__objects_1) +libbfd_la_OBJECTS = $(am_libbfd_la_OBJECTS) +libbfd_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libbfd_la_LDFLAGS) $(LDFLAGS) -o $@ +@INSTALL_LIBBFD_FALSE@am_libbfd_la_rpath = +@INSTALL_LIBBFD_TRUE@am_libbfd_la_rpath = -rpath $(bfdlibdir) +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/../depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES) \ + $(EXTRA_libbfd_la_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__bfdinclude_HEADERS_DIST = bfd.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h +HEADERS = $(bfdinclude_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BFD_HOSTPTR_T = @BFD_HOSTPTR_T@ +BFD_HOST_64BIT_LONG = @BFD_HOST_64BIT_LONG@ +BFD_HOST_64BIT_LONG_LONG = @BFD_HOST_64BIT_LONG_LONG@ +BFD_HOST_64_BIT = @BFD_HOST_64_BIT@ +BFD_HOST_64_BIT_DEFINED = @BFD_HOST_64_BIT_DEFINED@ +BFD_HOST_U_64_BIT = @BFD_HOST_U_64_BIT@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +COREFILE = @COREFILE@ +COREFLAG = @COREFLAG@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DEBUGDIR = @DEBUGDIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ +FGREP = @FGREP@ +GENCAT = @GENCAT@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +HDEFINES = @HDEFINES@ +INCINTL = @INCINTL@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBINTL = @LIBINTL@ +LIBINTL_DEP = @LIBINTL_DEP@ +LIBM = @LIBM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NO_WERROR = @NO_WERROR@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKGVERSION = @PKGVERSION@ +POSUB = @POSUB@ +RANLIB = @RANLIB@ +REPORT_BUGS_TEXI = @REPORT_BUGS_TEXI@ +REPORT_BUGS_TO = @REPORT_BUGS_TO@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHARED_LDFLAGS = @SHARED_LDFLAGS@ +SHARED_LIBADD = @SHARED_LIBADD@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TDEFINES = @TDEFINES@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +XGETTEXT = @XGETTEXT@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +all_backends = @all_backends@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bfd64_libs = @bfd64_libs@ +bfd_backends = @bfd_backends@ +bfd_default_target_size = @bfd_default_target_size@ +bfd_file_ptr = @bfd_file_ptr@ +bfd_machines = @bfd_machines@ +bfd_ufile_ptr = @bfd_ufile_ptr@ +@INSTALL_LIBBFD_FALSE@bfdincludedir = +@INSTALL_LIBBFD_TRUE@bfdincludedir = @bfdincludedir@ +# Empty these so that the respective installation directories will not be created. +@INSTALL_LIBBFD_FALSE@bfdlibdir = +@INSTALL_LIBBFD_TRUE@bfdlibdir = @bfdlibdir@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_noncanonical = @host_noncanonical@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +supports_plugins = @supports_plugins@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_noncanonical = @target_noncanonical@ +target_os = @target_os@ +target_vendor = @target_vendor@ +tdefaults = @tdefaults@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +wordsize = @wordsize@ +AUTOMAKE_OPTIONS = 1.11 no-dist foreign +ACLOCAL_AMFLAGS = -I . -I .. -I ../config + +# Uncomment the following line when doing a release. +# RELEASE=y +INCDIR = $(srcdir)/../include +CSEARCH = -I. -I$(srcdir) -I$(INCDIR) +SUBDIRS = doc po +bfddocdir = doc +libbfd_la_LDFLAGS = $(am__append_1) -release `cat libtool-soversion` \ + @SHARED_LDFLAGS@ $(am__empty) +@INSTALL_LIBBFD_TRUE@bfdlib_LTLIBRARIES = libbfd.la +@INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h +@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@ +@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la +AM_CFLAGS = $(WARN_CFLAGS) +AM_CPPFLAGS = -DBINDIR='"$(bindir)"' +@PLUGINS_TRUE@LIBDL = -ldl + +# bfd.h goes here, for now +BFD_H = bfd.h + +# Jim Kingdon notes: +# Writing S-records should be included in all (or at least most) +# *-*-coff, *-*-aout, etc., configurations, because people will want to +# be able to use objcopy to create S-records. (S-records are not useful +# for the debugger, so if you are downloading things as S-records you +# need two copies of the executable, one to download and one for the +# debugger). +BFD32_LIBS = \ + archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \ + cache.lo coffgen.lo corefile.lo \ + format.lo init.lo libbfd.lo opncls.lo reloc.lo \ + section.lo syms.lo targets.lo hash.lo linker.lo \ + srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \ + merge.lo dwarf2.lo simple.lo compress.lo verilog.lo + +BFD64_LIBS = archive64.lo +BFD32_LIBS_CFILES = \ + archive.c archures.c bfd.c bfdio.c bfdwin.c \ + cache.c coffgen.c corefile.c \ + format.c init.c libbfd.c opncls.c reloc.c \ + section.c syms.c targets.c hash.c linker.c \ + srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \ + merge.c dwarf2.c simple.c compress.c verilog.c + +BFD64_LIBS_CFILES = archive64.c + +# This list is alphabetized to make it easier to keep in sync +# with the decls and initializer in archures.c. +ALL_MACHINES = \ + cpu-alpha.lo \ + cpu-arc.lo \ + cpu-arm.lo \ + cpu-avr.lo \ + cpu-bfin.lo \ + cpu-cr16.lo \ + cpu-cr16c.lo \ + cpu-cris.lo \ + cpu-crx.lo \ + cpu-d10v.lo \ + cpu-d30v.lo \ + cpu-dlx.lo \ + cpu-fr30.lo \ + cpu-frv.lo \ + cpu-h8300.lo \ + cpu-h8500.lo \ + cpu-hppa.lo \ + cpu-i370.lo \ + cpu-i386.lo \ + cpu-l1om.lo \ + cpu-i860.lo \ + cpu-i960.lo \ + cpu-ia64.lo \ + cpu-ip2k.lo \ + cpu-iq2000.lo \ + cpu-lm32.lo \ + cpu-m10200.lo \ + cpu-m10300.lo \ + cpu-m32c.lo \ + cpu-m32r.lo \ + cpu-m68hc11.lo \ + cpu-m68hc12.lo \ + cpu-m68k.lo \ + cpu-m88k.lo \ + cpu-maxq.lo \ + cpu-mcore.lo \ + cpu-mep.lo \ + cpu-microblaze.lo \ + cpu-mips.lo \ + cpu-mmix.lo \ + cpu-moxie.lo \ + cpu-msp430.lo \ + cpu-mt.lo \ + cpu-ns32k.lo \ + cpu-openrisc.lo \ + cpu-or32.lo \ + cpu-pdp11.lo \ + cpu-pj.lo \ + cpu-plugin.lo \ + cpu-powerpc.lo \ + cpu-rs6000.lo \ + cpu-rx.lo \ + cpu-s390.lo \ + cpu-score.lo \ + cpu-sh.lo \ + cpu-sparc.lo \ + cpu-spu.lo \ + cpu-tic30.lo \ + cpu-tic4x.lo \ + cpu-tic54x.lo \ + cpu-tic80.lo \ + cpu-v850.lo \ + cpu-vax.lo \ + cpu-w65.lo \ + cpu-we32k.lo \ + cpu-xc16x.lo \ + cpu-xstormy16.lo \ + cpu-xtensa.lo \ + cpu-z80.lo \ + cpu-z8k.lo + +ALL_MACHINES_CFILES = \ + cpu-alpha.c \ + cpu-arc.c \ + cpu-arm.c \ + cpu-avr.c \ + cpu-bfin.c \ + cpu-cr16.c \ + cpu-cr16c.c \ + cpu-cris.c \ + cpu-crx.c \ + cpu-d10v.c \ + cpu-d30v.c \ + cpu-dlx.c \ + cpu-fr30.c \ + cpu-frv.c \ + cpu-h8300.c \ + cpu-h8500.c \ + cpu-hppa.c \ + cpu-i370.c \ + cpu-i386.c \ + cpu-l1om.c \ + cpu-i860.c \ + cpu-i960.c \ + cpu-ia64.c \ + cpu-ip2k.c \ + cpu-iq2000.c \ + cpu-lm32.c \ + cpu-m10200.c \ + cpu-m10300.c \ + cpu-m32c.c \ + cpu-m32r.c \ + cpu-m68hc11.c \ + cpu-m68hc12.c \ + cpu-m68k.c \ + cpu-m88k.c \ + cpu-maxq.c \ + cpu-mcore.c \ + cpu-mep.c \ + cpu-microblaze.c \ + cpu-mips.c \ + cpu-mmix.c \ + cpu-moxie.c \ + cpu-msp430.c \ + cpu-mt.c \ + cpu-ns32k.c \ + cpu-openrisc.c \ + cpu-or32.c \ + cpu-pdp11.c \ + cpu-pj.c \ + cpu-plugin.c \ + cpu-powerpc.c \ + cpu-rs6000.c \ + cpu-rx.c \ + cpu-s390.c \ + cpu-score.c \ + cpu-sh.c \ + cpu-sparc.c \ + cpu-spu.c \ + cpu-tic30.c \ + cpu-tic4x.c \ + cpu-tic54x.c \ + cpu-tic80.c \ + cpu-v850.c \ + cpu-vax.c \ + cpu-w65.c \ + cpu-we32k.c \ + cpu-xc16x.c \ + cpu-xstormy16.c \ + cpu-xtensa.c \ + cpu-z80.c \ + cpu-z8k.c + + +# The .o files needed by all of the 32 bit vectors that are configured into +# target_vector in targets.c if configured with --enable-targets=all. +BFD32_BACKENDS = \ + aout-adobe.lo \ + aout-arm.lo \ + aout-cris.lo \ + aout-ns32k.lo \ + aout-sparcle.lo \ + aout-tic30.lo \ + aout0.lo \ + aout32.lo \ + armnetbsd.lo \ + bout.lo \ + cf-i386lynx.lo \ + cf-sparclynx.lo \ + coff-apollo.lo \ + coff-arm.lo \ + coff-aux.lo \ + coff-go32.lo \ + coff-h8300.lo \ + coff-h8500.lo \ + coff-i386.lo \ + coff-i860.lo \ + coff-i960.lo \ + coff-m68k.lo \ + coff-m88k.lo \ + coff-maxq.lo \ + coff-mips.lo \ + coff-or32.lo \ + coff-rs6000.lo \ + coff-sh.lo \ + coff-sparc.lo \ + coff-stgo32.lo \ + coff-svm68k.lo \ + coff-tic30.lo \ + coff-tic4x.lo \ + coff-tic54x.lo \ + coff-tic80.lo \ + coff-u68k.lo \ + coff-w65.lo \ + coff-we32k.lo \ + coff-z80.lo \ + coff-z8k.lo \ + cofflink.lo \ + dwarf1.lo \ + ecoff.lo \ + ecofflink.lo \ + elf-attrs.lo \ + elf-eh-frame.lo \ + elf-ifunc.lo \ + elf-m10200.lo \ + elf-m10300.lo \ + elf-strtab.lo \ + elf-vxworks.lo \ + elf.lo \ + elf32-am33lin.lo \ + elf32-arc.lo \ + elf32-arm.lo \ + elf32-avr.lo \ + elf32-bfin.lo \ + elf32-cr16.lo \ + elf32-cr16c.lo \ + elf32-cris.lo \ + elf32-crx.lo \ + elf32-d10v.lo \ + elf32-d30v.lo \ + elf32-dlx.lo \ + elf32-fr30.lo \ + elf32-frv.lo \ + elf32-gen.lo \ + elf32-h8300.lo \ + elf32-hppa.lo \ + elf32-i370.lo \ + elf32-i386.lo \ + elf32-i860.lo \ + elf32-i960.lo \ + elf32-ip2k.lo \ + elf32-iq2000.lo \ + elf32-lm32.lo \ + elf32-m32c.lo \ + elf32-m32r.lo \ + elf32-m68hc11.lo \ + elf32-m68hc12.lo \ + elf32-m68hc1x.lo \ + elf32-m68k.lo \ + elf32-m88k.lo \ + elf32-mcore.lo \ + elf32-mep.lo \ + elf32-microblaze.lo \ + elf32-mips.lo \ + elf32-moxie.lo \ + elf32-msp430.lo \ + elf32-mt.lo \ + elf32-openrisc.lo \ + elf32-or32.lo \ + elf32-pj.lo \ + elf32-ppc.lo \ + elf32-rx.lo \ + elf32-s390.lo \ + elf32-sh-symbian.lo \ + elf32-sh.lo \ + elf32-sh64-com.lo \ + elf32-sh64.lo \ + elf32-sparc.lo \ + elf32-spu.lo \ + elf32-v850.lo \ + elf32-vax.lo \ + elf32-xc16x.lo \ + elf32-xstormy16.lo \ + elf32-xtensa.lo \ + elf32.lo \ + elflink.lo \ + elfxx-mips.lo \ + elfxx-sparc.lo \ + epoc-pe-arm.lo \ + epoc-pei-arm.lo \ + hp300bsd.lo \ + hp300hpux.lo \ + i386aout.lo \ + i386bsd.lo \ + i386dynix.lo \ + i386freebsd.lo \ + i386linux.lo \ + i386lynx.lo \ + i386mach3.lo \ + i386msdos.lo \ + i386netbsd.lo \ + i386os9k.lo \ + ieee.lo \ + m68k4knetbsd.lo \ + m68klinux.lo \ + m68knetbsd.lo \ + m88kmach3.lo \ + m88kopenbsd.lo \ + mach-o.lo \ + mach-o-i386.lo \ + mipsbsd.lo \ + newsos3.lo \ + nlm.lo \ + nlm32-i386.lo \ + nlm32-ppc.lo \ + nlm32-sparc.lo \ + nlm32.lo \ + ns32knetbsd.lo \ + oasys.lo \ + pc532-mach.lo \ + pdp11.lo \ + pe-arm-wince.lo \ + pe-arm.lo \ + pe-i386.lo \ + pe-mcore.lo \ + pe-mips.lo \ + pe-ppc.lo \ + pe-sh.lo \ + pef.lo \ + pei-arm-wince.lo \ + pei-arm.lo \ + pei-i386.lo \ + pei-mcore.lo \ + pei-mips.lo \ + pei-ppc.lo \ + pei-sh.lo \ + peigen.lo \ + plugin.lo \ + ppcboot.lo \ + reloc16.lo \ + riscix.lo \ + som.lo \ + sparclinux.lo \ + sparclynx.lo \ + sparcnetbsd.lo \ + sunos.lo \ + vax1knetbsd.lo \ + vaxbsd.lo \ + vaxnetbsd.lo \ + versados.lo \ + vms-gsd.lo \ + vms-hdr.lo \ + vms-misc.lo \ + vms-tir.lo \ + vms.lo \ + xcofflink.lo \ + xsym.lo \ + xtensa-isa.lo \ + xtensa-modules.lo + +BFD32_BACKENDS_CFILES = \ + aout-adobe.c \ + aout-arm.c \ + aout-cris.c \ + aout-ns32k.c \ + aout-sparcle.c \ + aout-tic30.c \ + aout0.c \ + aout32.c \ + armnetbsd.c \ + bout.c \ + cf-i386lynx.c \ + cf-sparclynx.c \ + coff-apollo.c \ + coff-arm.c \ + coff-aux.c \ + coff-go32.c \ + coff-h8300.c \ + coff-h8500.c \ + coff-i386.c \ + coff-i860.c \ + coff-i960.c \ + coff-m68k.c \ + coff-m88k.c \ + coff-maxq.c \ + coff-mips.c \ + coff-or32.c \ + coff-rs6000.c \ + coff-sh.c \ + coff-sparc.c \ + coff-stgo32.c \ + coff-svm68k.c \ + coff-tic30.c \ + coff-tic4x.c \ + coff-tic54x.c \ + coff-tic80.c \ + coff-u68k.c \ + coff-w65.c \ + coff-we32k.c \ + coff-z80.c \ + coff-z8k.c \ + cofflink.c \ + dwarf1.c \ + ecoff.c \ + ecofflink.c \ + elf-attrs.c \ + elf-eh-frame.c \ + elf-ifunc.c \ + elf-m10200.c \ + elf-m10300.c \ + elf-strtab.c \ + elf-vxworks.c \ + elf.c \ + elf32-am33lin.c \ + elf32-arc.c \ + elf32-arm.c \ + elf32-avr.c \ + 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-fr30.c \ + elf32-frv.c \ + elf32-gen.c \ + elf32-h8300.c \ + elf32-hppa.c \ + elf32-i370.c \ + elf32-i386.c \ + elf32-i860.c \ + elf32-i960.c \ + elf32-ip2k.c \ + elf32-iq2000.c \ + elf32-lm32.c \ + elf32-m32c.c \ + elf32-m32r.c \ + elf32-m68hc11.c \ + elf32-m68hc12.c \ + elf32-m68hc1x.c \ + elf32-m68k.c \ + elf32-m88k.c \ + elf32-mcore.c \ + elf32-mep.c \ + elf32-microblaze.c \ + elf32-mips.c \ + elf32-moxie.c \ + elf32-msp430.c \ + elf32-mt.c \ + elf32-openrisc.c \ + elf32-or32.c \ + elf32-pj.c \ + elf32-ppc.c \ + elf32-rx.c \ + elf32-s390.c \ + elf32-sh-symbian.c \ + elf32-sh.c \ + elf32-sh64-com.c \ + elf32-sh64.c \ + elf32-sparc.c \ + elf32-spu.c \ + elf32-v850.c \ + elf32-vax.c \ + elf32-xc16x.c \ + elf32-xstormy16.c \ + elf32-xtensa.c \ + elf32.c \ + elflink.c \ + elfxx-mips.c \ + elfxx-sparc.c \ + epoc-pe-arm.c \ + epoc-pei-arm.c \ + hp300bsd.c \ + hp300hpux.c \ + i386aout.c \ + i386bsd.c \ + i386dynix.c \ + i386freebsd.c \ + i386linux.c \ + i386lynx.c \ + i386mach3.c \ + i386msdos.c \ + i386netbsd.c \ + i386os9k.c \ + ieee.c \ + m68k4knetbsd.c \ + m68klinux.c \ + m68knetbsd.c \ + m88kmach3.c \ + m88kopenbsd.c \ + mach-o.c \ + mach-o-i386.c \ + mipsbsd.c \ + newsos3.c \ + nlm.c \ + nlm32-i386.c \ + nlm32-ppc.c \ + nlm32-sparc.c \ + nlm32.c \ + ns32knetbsd.c \ + oasys.c \ + pc532-mach.c \ + pdp11.c \ + pe-arm-wince.c \ + pe-arm.c \ + pe-i386.c \ + pe-mcore.c \ + pe-mips.c \ + pe-ppc.c \ + pe-sh.c \ + pef.c \ + pei-arm-wince.c \ + pei-arm.c \ + pei-i386.c \ + pei-mcore.c \ + pei-mips.c \ + pei-ppc.c \ + pei-sh.c \ + plugin.c \ + ppcboot.c \ + reloc16.c \ + riscix.c \ + som.c \ + sparclinux.c \ + sparclynx.c \ + sparcnetbsd.c \ + sunos.c \ + vax1knetbsd.c \ + vaxbsd.c \ + vaxnetbsd.c \ + versados.c \ + vms-gsd.c \ + vms-hdr.c \ + vms-misc.c \ + vms-tir.c \ + vms.c \ + xcofflink.c \ + xsym.c \ + xtensa-isa.c \ + xtensa-modules.c + + +# The .o files needed by all of the 64 bit vectors that are configured into +# target_vector in targets.c if configured with --enable-targets=all +# and --enable-64-bit-bfd. +# elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in +# BFD32_BACKENDS. +BFD64_BACKENDS = \ + aix5ppc-core.lo \ + aout64.lo \ + coff-alpha.lo \ + coff-x86_64.lo \ + coff64-rs6000.lo \ + demo64.lo \ + elf32-ia64.lo \ + elf32-score.lo \ + elf32-score7.lo \ + elf64-alpha.lo \ + elf64-gen.lo \ + elf64-hppa.lo \ + elf64-ia64.lo \ + elf64-mips.lo \ + elf64-mmix.lo \ + elf64-ppc.lo \ + elf64-s390.lo \ + elf64-sh64.lo \ + elf64-sparc.lo \ + elf64-x86-64.lo \ + elf64.lo \ + elfn32-mips.lo \ + mmo.lo \ + nlm32-alpha.lo \ + nlm64.lo \ + pe-x86_64.lo \ + pei-ia64.lo \ + pei-x86_64.lo \ + pepigen.lo \ + pex64igen.lo + +BFD64_BACKENDS_CFILES = \ + aix5ppc-core.c \ + aout64.c \ + coff-alpha.c \ + coff-x86_64.c \ + coff64-rs6000.c \ + demo64.c \ + elf32-score.c \ + elf32-score7.c \ + elf64-alpha.c \ + elf64-gen.c \ + elf64-hppa.c \ + elf64-mips.c \ + elf64-mmix.c \ + elf64-ppc.c \ + elf64-s390.c \ + elf64-sh64.c \ + elf64-sparc.c \ + elf64-x86-64.c \ + elf64.c \ + elfn32-mips.c \ + mmo.c \ + nlm32-alpha.c \ + nlm64.c \ + pe-x86_64.c \ + pei-ia64.c \ + pei-x86_64.c + +OPTIONAL_BACKENDS = \ + aix386-core.lo \ + cisco-core.lo \ + hpux-core.lo \ + irix-core.lo \ + lynx-core.lo \ + osf-core.lo \ + sco5-core.lo \ + trad-core.lo + +OPTIONAL_BACKENDS_CFILES = \ + aix386-core.c \ + cisco-core.c \ + hpux-core.c \ + irix-core.c \ + lynx-core.c \ + osf-core.c \ + sco5-core.c \ + trad-core.c + + +# We want to rerun configure if configure.in, config.bfd or +# configure.host change. configure.in is needed since the version +# number in Makefile comes from configure.in. +CONFIG_STATUS_DEPENDENCIES = \ + $(srcdir)/configure.in \ + $(srcdir)/config.bfd \ + $(srcdir)/configure.host + + +# These are defined by configure.in: +WORDSIZE = @wordsize@ +ALL_BACKENDS = @all_backends@ +BFD_BACKENDS = @bfd_backends@ +BFD_MACHINES = @bfd_machines@ +TDEFAULTS = @tdefaults@ +INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) @INCINTL@ + +# C source files that correspond to .o's. +SOURCE_CFILES = \ + $(BFD32_LIBS_CFILES) \ + $(BFD64_LIBS_CFILES) \ + $(ALL_MACHINES_CFILES) \ + $(BFD32_BACKENDS_CFILES) \ + $(BFD64_BACKENDS_CFILES) \ + $(OPTIONAL_BACKENDS_CFILES) + +BUILD_CFILES = \ + elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c + +CFILES = $(SOURCE_CFILES) $(BUILD_CFILES) +SOURCE_HFILES = \ + aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \ + elf-bfd.h elf-hppa.h elf32-hppa.h \ + elf64-hppa.h elfcode.h elfcore.h \ + freebsd.h genlink.h go32stub.h \ + libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \ + libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \ + netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \ + pef.h pef-traceback.h peicode.h som.h version.h \ + vms.h xcoff-target.h xsym.h + +BUILD_HFILES = \ + bfdver.h elf32-target.h elf64-target.h targmatch.h bfd_stdint.h + + +# Ensure they are built early: +BUILT_SOURCES = $(BUILD_HFILES) +HFILES = $(SOURCE_HFILES) $(BUILD_HFILES) +SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES) +BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES) + +# Various kinds of .o files to put in libbfd.a: +# BFD_BACKENDS Routines the configured targets need. +# BFD_MACHINES Architecture-specific routines the configured targets need. +# COREFILE Core file routines for a native configuration +# bfd64_libs Routines for 64bit support +OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ @bfd64_libs@ + +# Since BFD64_LIBS is optional and we can't have substitution in +# libbfd_la_SOURCES, we put BFD64_LIBS in OFILES instead. +# However, list all sources in EXTRA_libbfd_la_SOURCES so the +# dependency tracking fragments are picked up in the Makefile. +libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) +EXTRA_libbfd_la_SOURCES = $(CFILES) +libbfd_la_DEPENDENCIES = $(OFILES) ofiles +libbfd_la_LIBADD = `cat ofiles` @SHARED_LIBADD@ $(LIBDL) + +# libtool will build .libs/libbfd.a. We create libbfd.a in the build +# directory so that we don't have to convert all the programs that use +# libbfd.a simultaneously. This is a hack which should be removed if +# everything else starts using libtool. FIXME. +noinst_LIBRARIES = libbfd.a +libbfd_a_SOURCES = +BFD_H_DEPS = $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h +LOCAL_H_DEPS = libbfd.h sysdep.h config.h +BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \ + reloc.c syms.c bfd.c bfdio.c bfdwin.c \ + archive.c corefile.c targets.c format.c compress.c + +BFD64_H_FILES = archive64.c +LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c bfdio.c bfdwin.c \ + cache.c reloc.c archures.c elf.c + +LIBCOFF_H_FILES = libcoff-in.h coffcode.h +MOSTLYCLEANFILES = ofiles stamp-ofiles +CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \ + stmp-bin2-h stmp-lbfd-h stmp-lcoff-h + +DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion +all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +bfd-in3.h: $(top_builddir)/config.status $(srcdir)/bfd-in2.h + cd $(top_builddir) && $(SHELL) ./config.status $@ +po/Makefile.in: $(top_builddir)/config.status $(top_srcdir)/po/Make-in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +install-bfdlibLTLIBRARIES: $(bfdlib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(bfdlibdir)" || $(MKDIR_P) "$(DESTDIR)$(bfdlibdir)" + @list='$(bfdlib_LTLIBRARIES)'; test -n "$(bfdlibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(bfdlibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(bfdlibdir)"; \ + } + +uninstall-bfdlibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(bfdlib_LTLIBRARIES)'; test -n "$(bfdlibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(bfdlibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(bfdlibdir)/$$f"; \ + done + +clean-bfdlibLTLIBRARIES: + -test -z "$(bfdlib_LTLIBRARIES)" || rm -f $(bfdlib_LTLIBRARIES) + @list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES) + $(libbfd_la_LINK) $(am_libbfd_la_rpath) $(libbfd_la_OBJECTS) $(libbfd_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aix386-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aix5ppc-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-adobe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-cris.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-ns32k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-sparcle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout-tic30.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout0.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aout64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/archive.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/archive64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/archures.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/armnetbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bfd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bfdio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bfdwin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bout.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf-i386lynx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf-sparclynx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cisco-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-alpha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-apollo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-aux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-go32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-h8300.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-h8500.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-i386.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-i860.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-i960.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-m68k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-m88k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-maxq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-mips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-or32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-rs6000.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-sh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-sparc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-stgo32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-svm68k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-tic30.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-tic4x.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-tic54x.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-tic80.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-u68k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-w65.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-we32k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-z80.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff-z8k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coff64-rs6000.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coffgen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cofflink.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/corefile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-alpha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-arc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-avr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-bfin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-cr16.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-cr16c.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-cris.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-crx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-d10v.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-d30v.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-dlx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-fr30.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-frv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-h8300.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-h8500.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-hppa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-i370.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-i386.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-i860.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-i960.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ia64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ip2k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-iq2000.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-l1om.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-lm32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m10200.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m10300.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m32c.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m32r.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m68hc11.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m68hc12.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m68k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-m88k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-maxq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mcore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mep.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-microblaze.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mmix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-moxie.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-msp430.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ns32k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-openrisc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-or32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-pdp11.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-pj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-powerpc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-rs6000.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-rx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-s390.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-score.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-sh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-sparc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-spu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-tic30.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-tic4x.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-tic54x.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-tic80.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-v850.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-vax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-w65.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-we32k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-xc16x.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-xstormy16.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-xtensa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-z80.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-z8k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demo64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwarf2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecoff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecofflink.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-attrs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-eh-frame.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-ifunc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-m10200.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-m10300.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-strtab.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-vxworks.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-am33lin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-arc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-avr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-bfin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-cr16.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-cr16c.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-cris.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-crx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-d10v.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-d30v.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-dlx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-fr30.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-frv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-gen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-h8300.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-hppa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-i370.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-i386.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-i860.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-i960.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-ia64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-ip2k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-iq2000.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-lm32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-m32c.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-m32r.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-m68hc11.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-m68hc12.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-m68hc1x.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-m68k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-m88k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mcore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mep.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-microblaze.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-moxie.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-msp430.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-openrisc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-or32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-pj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-ppc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-rx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-s390.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-score.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-score7.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-sh-symbian.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-sh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-sh64-com.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-sh64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-sparc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-spu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-v850.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-vax.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-xc16x.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-xstormy16.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-xtensa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-alpha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-gen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-hppa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ia64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-mips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-mmix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ppc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-s390.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sh64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sparc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-x86-64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elflink.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfn32-mips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-mips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elfxx-sparc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoc-pe-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epoc-pei-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hp300bsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hp300hpux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hpux-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386aout.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386bsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386dynix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386freebsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386linux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386lynx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386mach3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386msdos.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386netbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386os9k.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ieee.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ihex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/irix-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linker.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lynx-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68k4knetbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68klinux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m68knetbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m88kmach3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/m88kopenbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach-o-i386.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach-o.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/merge.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipsbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newsos3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32-alpha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32-i386.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32-ppc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32-sparc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ns32knetbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oasys.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opncls.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osf-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pc532-mach.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdp11.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-arm-wince.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-i386.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-mcore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-mips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-ppc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-sh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pef.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-arm-wince.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-arm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-i386.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-ia64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-mcore.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-mips.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-ppc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-sh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pei-x86_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/peigen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pepigen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pex64igen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppcboot.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reloc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reloc16.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sco5-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/section.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/som.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparclinux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparclynx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparcnetbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stab-syms.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stabs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sunos.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syms.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/targets.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tekhex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trad-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vax1knetbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vaxbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vaxnetbsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verilog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versados.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vms-gsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vms-hdr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vms-misc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vms-tir.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vms.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xcofflink.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsym.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtensa-isa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtensa-modules.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool config.lt +install-bfdincludeHEADERS: $(bfdinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(bfdincludedir)" || $(MKDIR_P) "$(DESTDIR)$(bfdincludedir)" + @list='$(bfdinclude_HEADERS)'; test -n "$(bfdincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(bfdincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(bfdincludedir)" || exit $$?; \ + done + +uninstall-bfdincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(bfdinclude_HEADERS)'; test -n "$(bfdincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bfdincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bfdincludedir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bfdlibdir)" "$(DESTDIR)$(bfdincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-recursive + +clean-am: clean-bfdlibLTLIBRARIES clean-generic clean-libtool \ + clean-noinstLIBRARIES clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-bfdincludeHEADERS install-bfdlibLTLIBRARIES + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-bfdincludeHEADERS uninstall-bfdlibLTLIBRARIES + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ + ctags-recursive install install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean \ + clean-bfdlibLTLIBRARIES clean-generic clean-libtool \ + clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags dvi dvi-am html \ + html-am info info-am install install-am \ + install-bfdincludeHEADERS install-bfdlibLTLIBRARIES \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-bfdincludeHEADERS uninstall-bfdlibLTLIBRARIES + + +po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES) + for file in $(SRC_POTFILES); do echo $$file; done \ + | LC_ALL=C sort > tmp.src \ + && mv tmp.src $(srcdir)/po/SRC-POTFILES.in + +po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES) + for file in $(BLD_POTFILES); do echo $$file; done \ + | LC_ALL=C sort > tmp.bld \ + && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in + +all diststuff: info + +stamp-ofiles: Makefile + rm -f tofiles + f=""; \ + for i in $(OFILES) ; do \ + case " $$f " in \ + *" $$i "*) ;; \ + *) f="$$f $$i" ;; \ + esac ; \ + done ; \ + echo $$f > tofiles + $(SHELL) $(srcdir)/../move-if-change tofiles ofiles + touch stamp-ofiles + +ofiles: stamp-ofiles ; @true + +stamp-lib: libbfd.la + libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \ + if [ -f $$libtooldir/libbfd.a ]; then \ + cp $$libtooldir/libbfd.a libbfd.tmp; \ + $(RANLIB) libbfd.tmp; \ + $(SHELL) $(srcdir)/../move-if-change libbfd.tmp libbfd.a; \ + else true; fi + touch stamp-lib + +libbfd.a: stamp-lib ; @true + +# This file holds an array associating configuration triplets and +# vector names. It is built from config.bfd. It is not compiled by +# itself, but is included by targets.c. +targmatch.h: config.bfd targmatch.sed + rm -f targmatch.h + sed -f $(srcdir)/targmatch.sed < $(srcdir)/config.bfd > targmatch.new + mv -f targmatch.new targmatch.h + +# When compiling archures.c and targets.c, supply the default target +# info from configure. + +targets.lo: targets.c Makefile +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(TDEFAULTS) $(srcdir)/targets.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='targets.c' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $(TDEFAULTS) $(srcdir)/targets.c + +archures.lo: archures.c Makefile +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(TDEFAULTS) $(srcdir)/archures.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='archures.c' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $(TDEFAULTS) $(srcdir)/archures.c + +dwarf2.lo: dwarf2.c Makefile +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dwarf2.c' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c + +elf32-target.h : elfxx-target.h + rm -f elf32-target.h + sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new + mv -f elf32-target.new elf32-target.h + +elf64-target.h : elfxx-target.h + rm -f elf64-target.h + sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new + mv -f elf64-target.new elf64-target.h + +elf32-ia64.c : elfxx-ia64.c + rm -f elf32-ia64.c + sed -e s/NN/32/g < $(srcdir)/elfxx-ia64.c > elf32-ia64.new + mv -f elf32-ia64.new elf32-ia64.c + +elf64-ia64.c : elfxx-ia64.c + rm -f elf64-ia64.c + sed -e s/NN/64/g < $(srcdir)/elfxx-ia64.c > elf64-ia64.new + mv -f elf64-ia64.new elf64-ia64.c + +peigen.c : peXXigen.c + rm -f peigen.c + sed -e s/XX/pe/g < $(srcdir)/peXXigen.c > peigen.new + mv -f peigen.new peigen.c + +pepigen.c : peXXigen.c + rm -f pepigen.c + sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new + mv -f pepigen.new pepigen.c + +pex64igen.c: peXXigen.c + rm -f pex64igen.c + sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new + mv -f pex64igen.new pex64igen.c +$(BFD32_LIBS) \ + $(BFD64_LIBS) \ + $(ALL_MACHINES) \ + $(BFD32_BACKENDS) \ + $(BFD64_BACKENDS) \ + $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) + +host-aout.lo: Makefile + +# The following program can be used to generate a simple config file +# which can be folded into an h-XXX file for a new host, with some editing. +aout-params.h: gen-aout + ./gen-aout host > aout-params.h +gen-aout: $(srcdir)/gen-aout.c Makefile + $(CC) -o gen-aout $(CFLAGS) $(LFLAGS) $(srcdir)/gen-aout.c + +$(BFD_H): stmp-bfd-h ; @true + +stmp-bfd-h: bfd-in3.h + rm -f bfd-tmp.h + cp bfd-in3.h bfd-tmp.h + $(SHELL) $(srcdir)/../move-if-change bfd-tmp.h $(BFD_H) + rm -f bfd-tmp.h + touch stmp-bfd-h + +# Could really use a "copy-if-change"... +headers: + (cd $(bfddocdir); $(MAKE) protos $(FLAGS_TO_PASS)) + cp $(bfddocdir)/bfd.h bfd-in2.h-new + $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h + cp $(bfddocdir)/libbfd.h libbfd.h-new + $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h + cp $(bfddocdir)/libcoff.h libcoff.h-new + $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h + +# We only rebuild the header files automatically if we have been +# configured with --enable-maintainer-mode. + +$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true +stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES) + (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h) + cp $(bfddocdir)/bfd.h bfd-in2.h-new + $(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h + touch stmp-bin2-h + +$(srcdir)/libbfd.h: @MAINT@ stmp-lbfd-h ; @true +stmp-lbfd-h: $(LIBBFD_H_FILES) + (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libbfd.h) + cp $(bfddocdir)/libbfd.h libbfd.h-new + $(SHELL) $(srcdir)/../move-if-change libbfd.h-new $(srcdir)/libbfd.h + touch stmp-lbfd-h + +$(srcdir)/libcoff.h: @MAINT@ stmp-lcoff-h ; @true +stmp-lcoff-h: $(LIBCOFF_H_FILES) + (cd $(bfddocdir); $(MAKE) $(FLAGS_TO_PASS) libcoff.h) + cp $(bfddocdir)/libcoff.h libcoff.h-new + $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h + touch stmp-lcoff-h + +bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in + @echo "creating $@" + @bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ + bfd_version_string="\"$(VERSION)\"" ;\ + bfd_soversion="$(VERSION)" ;\ + bfd_version_package="\"$(PKGVERSION)\"" ;\ + report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ + if test "x$(RELEASE)" = x ; then \ + bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\ + bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\ + bfd_soversion="$(VERSION).$${bfd_version_date}" ;\ + fi ;\ + sed -e "s,@bfd_version@,$$bfd_version," \ + -e "s,@bfd_version_string@,$$bfd_version_string," \ + -e "s,@bfd_version_package@,$$bfd_version_package," \ + -e "s,@report_bugs_to@,$$report_bugs_to," \ + < $(srcdir)/version.h > $@; \ + echo "$${bfd_soversion}" > libtool-soversion + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cegcc/src/binutils/bfd/acinclude.m4 b/cegcc/src/binutils/bfd/acinclude.m4 index cd4fd55be..aaa147ece 100644 --- a/cegcc/src/binutils/bfd/acinclude.m4 +++ b/cegcc/src/binutils/bfd/acinclude.m4 @@ -64,6 +64,8 @@ AC_DEFUN([AM_INSTALL_LIBBFD], bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include' fi AC_SUBST(bfdlibdir) + AM_SUBST_NOTMAKE(bfdlibdir) AC_SUBST(bfdincludedir) + AM_SUBST_NOTMAKE(bfdincludedir) ] ) diff --git a/cegcc/src/binutils/bfd/aclocal.m4 b/cegcc/src/binutils/bfd/aclocal.m4 index 208fad97a..77edbce37 100644 --- a/cegcc/src/binutils/bfd/aclocal.m4 +++ b/cegcc/src/binutils/bfd/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,7 +11,15 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, +[m4_warning([this file was generated for autoconf 2.64. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,14 +29,31 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) +[AM_AUTOMAKE_VERSION([1.11])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -85,14 +110,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 +# serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -101,8 +126,11 @@ AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -116,15 +144,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -152,6 +179,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -180,6 +208,16 @@ AC_CACHE_CHECK([dependency style of $depcc], if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -197,7 +235,17 @@ AC_CACHE_CHECK([dependency style of $depcc], done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -207,18 +255,23 @@ AC_CACHE_CHECK([dependency style of $depcc], break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -269,61 +322,74 @@ if test "x$enable_dependency_tracking" != xno; then AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 3 +#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -342,14 +408,14 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 +# serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -366,16 +432,20 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -395,6 +465,9 @@ m4_ifval([$2], AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -410,8 +483,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -419,20 +492,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header @@ -443,18 +533,19 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -465,33 +556,51 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi AC_SUBST(install_sh)]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], - USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST(MAINT)dnl + AC_SUBST([MAINT])dnl ] ) @@ -499,13 +608,13 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_MAKE_INCLUDE() # ----------------- @@ -514,7 +623,7 @@ AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -524,24 +633,24 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -551,14 +660,14 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -574,7 +683,15 @@ AC_SUBST($1)]) # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " @@ -584,7 +701,7 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -592,70 +709,33 @@ fi # AM_PROG_MKDIR_P # --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) +# Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -672,7 +752,7 @@ AC_DEFUN([_AM_SET_OPTION], # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -682,14 +762,14 @@ AC_DEFUN([_AM_IF_OPTION], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # AM_SANITY_CHECK # --------------- @@ -698,16 +778,29 @@ AC_DEFUN([AM_SANITY_CHECK], # Just in case sleep 1 echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ @@ -757,9 +850,28 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. @@ -858,13 +970,12 @@ AC_SUBST([am__untar]) m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) -m4_include([../config/extensions.m4]) m4_include([../config/gettext-sister.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/nls.m4]) m4_include([../config/override.m4]) +m4_include([../config/plugins.m4]) m4_include([../config/po.m4]) -m4_include([../config/proginstall.m4]) m4_include([../config/progtest.m4]) m4_include([../config/stdint.m4]) m4_include([../libtool.m4]) diff --git a/cegcc/src/binutils/bfd/aix386-core.c b/cegcc/src/binutils/bfd/aix386-core.c index fb81f81ab..4438e2801 100644 --- a/cegcc/src/binutils/bfd/aix386-core.c +++ b/cegcc/src/binutils/bfd/aix386-core.c @@ -2,7 +2,7 @@ This was based on trad-core.c, which was written by John Gilmore of Cygnus Support. Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2000, - 2001, 2002, 2004, 2006, 2007 + 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Written by Minh Tran-Le . Converted to back end form by Ian Lance Taylor . diff --git a/cegcc/src/binutils/bfd/aout-adobe.c b/cegcc/src/binutils/bfd/aout-adobe.c index 8ccaf429f..02f6ccbb3 100644 --- a/cegcc/src/binutils/bfd/aout-adobe.c +++ b/cegcc/src/binutils/bfd/aout-adobe.c @@ -1,6 +1,6 @@ /* BFD back-end for a.out.adobe binaries. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Written by Cygnus Support. Based on bout.c. @@ -463,6 +463,7 @@ aout_adobe_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED, #define aout_32_bfd_is_group_section bfd_generic_is_group_section #define aout_32_bfd_discard_group bfd_generic_discard_group #define aout_32_section_already_linked _bfd_generic_section_already_linked +#define aout_32_bfd_define_common_symbol bfd_generic_define_common_symbol #define aout_32_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define aout_32_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define aout_32_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/aout-cris.c b/cegcc/src/binutils/bfd/aout-cris.c index c5f71b0ce..f1f30601f 100644 --- a/cegcc/src/binutils/bfd/aout-cris.c +++ b/cegcc/src/binutils/bfd/aout-cris.c @@ -1,5 +1,5 @@ /* BFD backend for CRIS a.out binaries. - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007 + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. Contributed by Axis Communications AB. Written by Hans-Peter Nilsson. @@ -57,11 +57,6 @@ #define TARGET_PAGE_SIZE SEGMENT_SIZE #define TARGETNAME "a.out-cris" -/* N_SHARED_LIB gets this reasonable default as of 1999-07-12, but we - have to work with 2.9.1. Note that N_SHARED_LIB is used in a - SUN-specific context, not applicable to CRIS. */ -#define N_SHARED_LIB(x) 0 - /* The definition here seems not used; just provided as a convention. */ #define DEFAULT_ARCH bfd_arch_cris diff --git a/cegcc/src/binutils/bfd/aout-ns32k.c b/cegcc/src/binutils/bfd/aout-ns32k.c index d1ebbc563..ea7d8f4fd 100644 --- a/cegcc/src/binutils/bfd/aout-ns32k.c +++ b/cegcc/src/binutils/bfd/aout-ns32k.c @@ -1,6 +1,6 @@ /* BFD back-end for ns32k a.out-ish binaries. Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 1999, 2000, 2001, - 2002, 2003, 2005, 2007 Free Software Foundation, Inc. + 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. Contributed by Ian Dall (idall@eleceng.adelaide.edu.au). This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/aout-sparcle.c b/cegcc/src/binutils/bfd/aout-sparcle.c index a8baec583..afcc34211 100644 --- a/cegcc/src/binutils/bfd/aout-sparcle.c +++ b/cegcc/src/binutils/bfd/aout-sparcle.c @@ -1,5 +1,5 @@ /* BFD backend for sparc little-endian aout binaries. - Copyright 1996, 2001, 2007 Free Software Foundation, Inc. + Copyright 1996, 2001, 2005, 2007 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/aout-target.h b/cegcc/src/binutils/bfd/aout-target.h index c063d0395..96d7f9715 100644 --- a/cegcc/src/binutils/bfd/aout-target.h +++ b/cegcc/src/binutils/bfd/aout-target.h @@ -1,6 +1,6 @@ /* Define a target vector and some small routines for a variant of a.out. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2007 + 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -493,6 +493,9 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info) #define MY_section_already_linked \ _bfd_generic_section_already_linked #endif +#ifndef MY_bfd_define_common_symbol +#define MY_bfd_define_common_symbol bfd_generic_define_common_symbol +#endif #ifndef MY_bfd_reloc_type_lookup #define MY_bfd_reloc_type_lookup NAME (aout, reloc_type_lookup) #endif diff --git a/cegcc/src/binutils/bfd/aout-tic30.c b/cegcc/src/binutils/bfd/aout-tic30.c index 49815c4fd..ef74fa6d9 100644 --- a/cegcc/src/binutils/bfd/aout-tic30.c +++ b/cegcc/src/binutils/bfd/aout-tic30.c @@ -1,5 +1,5 @@ /* BFD back-end for TMS320C30 a.out binaries. - Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) @@ -950,6 +950,9 @@ tic30_aout_set_arch_mach (bfd *abfd, #define MY_section_already_linked \ _bfd_generic_section_already_linked #endif +#ifndef MY_bfd_define_common_symbol +#define MY_bfd_define_common_symbol bfd_generic_define_common_symbol +#endif #ifndef MY_bfd_reloc_type_lookup #define MY_bfd_reloc_type_lookup tic30_aout_reloc_type_lookup #endif diff --git a/cegcc/src/binutils/bfd/aout0.c b/cegcc/src/binutils/bfd/aout0.c index 0f6f01e62..e87af0071 100644 --- a/cegcc/src/binutils/bfd/aout0.c +++ b/cegcc/src/binutils/bfd/aout0.c @@ -1,5 +1,5 @@ /* BFD backend for SunOS style a.out with flags set to 0 - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001, 2007 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001, 2005, 2007 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/cegcc/src/binutils/bfd/aout32.c b/cegcc/src/binutils/bfd/aout32.c index 8ca1820ed..3ad1bd51c 100644 --- a/cegcc/src/binutils/bfd/aout32.c +++ b/cegcc/src/binutils/bfd/aout32.c @@ -1,5 +1,6 @@ /* BFD back-end for 32-bit a.out files. - Copyright 1990, 1991, 1992, 1993, 1994, 2007 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994, 2005, 2007 + Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/aout64.c b/cegcc/src/binutils/bfd/aout64.c index bd5e5127a..20687061a 100644 --- a/cegcc/src/binutils/bfd/aout64.c +++ b/cegcc/src/binutils/bfd/aout64.c @@ -1,5 +1,6 @@ /* BFD back-end for 64-bit a.out files. - Copyright 1990, 1991, 1992, 1994, 2007 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1994, 2005, 2007 + Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/aoutx.h b/cegcc/src/binutils/bfd/aoutx.h index fccfdeb0d..9521d0a8f 100644 --- a/cegcc/src/binutils/bfd/aoutx.h +++ b/cegcc/src/binutils/bfd/aoutx.h @@ -1,6 +1,6 @@ /* BFD semi-generic back-end for a.out binaries. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -464,7 +464,7 @@ NAME (aout, some_aout_object_p) (bfd *abfd, const bfd_target *result; bfd_size_type amt = sizeof (* rawptr); - rawptr = bfd_zalloc (abfd, amt); + rawptr = (struct aout_data_struct *) bfd_zalloc (abfd, amt); if (rawptr == NULL) return NULL; @@ -679,7 +679,7 @@ NAME (aout, mkobject) (bfd *abfd) bfd_set_error (bfd_error_system_call); - rawptr = bfd_zalloc (abfd, amt); + rawptr = (struct aout_data_struct *) bfd_zalloc (abfd, amt); if (rawptr == NULL) return FALSE; @@ -1294,7 +1294,6 @@ aout_get_external_symbols (bfd *abfd) { bfd_size_type count; struct external_nlist *syms; - bfd_size_type amt; count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE; if (count == 0) @@ -1310,17 +1309,20 @@ aout_get_external_symbols (bfd *abfd) /* We allocate using malloc to make the values easy to free later on. If we put them on the objalloc it might not be possible to free them. */ - syms = bfd_malloc (count * EXTERNAL_NLIST_SIZE); + syms = (struct external_nlist *) bfd_malloc (count * EXTERNAL_NLIST_SIZE); if (syms == NULL) return FALSE; - amt = exec_hdr (abfd)->a_syms; - if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0 - || bfd_bread (syms, amt, abfd) != amt) - { - free (syms); - return FALSE; - } + { + bfd_size_type amt; + amt = exec_hdr (abfd)->a_syms; + if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0 + || bfd_bread (syms, amt, abfd) != amt) + { + free (syms); + return FALSE; + } + } #endif obj_aout_external_syms (abfd) = syms; @@ -1347,7 +1349,7 @@ aout_get_external_symbols (bfd *abfd) return FALSE; strings = (char *) obj_aout_string_window (abfd).data; #else - strings = bfd_malloc (stringsize + 1); + strings = (char *) bfd_malloc (stringsize + 1); if (strings == NULL) return FALSE; @@ -1666,12 +1668,12 @@ NAME (aout, make_empty_symbol) (bfd *abfd) { bfd_size_type amt = sizeof (aout_symbol_type); - aout_symbol_type *new = bfd_zalloc (abfd, amt); - if (!new) + aout_symbol_type *new_symbol = (aout_symbol_type *) bfd_zalloc (abfd, amt); + if (!new_symbol) return NULL; - new->symbol.the_bfd = abfd; + new_symbol->symbol.the_bfd = abfd; - return &new->symbol; + return &new_symbol->symbol; } /* Translate a set of internal symbols into external symbols. */ @@ -1748,7 +1750,7 @@ NAME (aout, slurp_symbol_table) (bfd *abfd) return TRUE; /* Nothing to do. */ cached_size *= sizeof (aout_symbol_type); - cached = bfd_zmalloc (cached_size); + cached = (aout_symbol_type *) bfd_zmalloc (cached_size); if (cached == NULL) return FALSE; @@ -2309,7 +2311,7 @@ NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) return TRUE; /* Nothing to be done. */ amt = count * sizeof (arelent); - reloc_cache = bfd_zmalloc (amt); + reloc_cache = (arelent *) bfd_zmalloc (amt); if (reloc_cache == NULL) return FALSE; @@ -2370,7 +2372,7 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) each_size = obj_reloc_entry_size (abfd); natsize = (bfd_size_type) each_size * count; - native = bfd_zalloc (abfd, natsize); + native = (unsigned char *) bfd_zalloc (abfd, natsize); if (!native) return FALSE; @@ -2784,7 +2786,7 @@ NAME (aout, find_nearest_line) (bfd *abfd, adata (abfd).line_buf = buf = NULL; else { - buf = bfd_malloc (filelen + funclen + 3); + buf = (char *) bfd_malloc (filelen + funclen + 3); adata (abfd).line_buf = buf; if (buf == NULL) return FALSE; @@ -2878,7 +2880,8 @@ NAME (aout, link_hash_newfunc) (struct bfd_hash_entry *entry, /* Allocate the structure if it has not already been allocated by a subclass. */ if (ret == NULL) - ret = bfd_hash_allocate (table, sizeof (* ret)); + ret = (struct aout_link_hash_entry *) bfd_hash_allocate (table, + sizeof (* ret)); if (ret == NULL) return NULL; @@ -2917,7 +2920,7 @@ NAME (aout, link_hash_table_create) (bfd *abfd) struct aout_link_hash_table *ret; bfd_size_type amt = sizeof (* ret); - ret = bfd_malloc (amt); + ret = (struct aout_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; @@ -2972,7 +2975,7 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) table, but keeping the list is more efficient. Perhaps this should be conditional on info->keep_memory. */ amt = sym_count * sizeof (struct aout_link_hash_entry *); - sym_hash = bfd_alloc (abfd, amt); + sym_hash = (struct aout_link_hash_entry **) bfd_alloc (abfd, amt); if (sym_hash == NULL) return FALSE; obj_aout_sym_hashes (abfd) = sym_hash; @@ -3281,7 +3284,7 @@ aout_link_check_ar_symbols (bfd *abfd, { int skip = 0; - switch (info->common_skip_ar_aymbols) + switch (info->common_skip_ar_symbols) { case bfd_link_common_skip_text: skip = (type == (N_TEXT | N_EXT)); @@ -3336,8 +3339,9 @@ aout_link_check_ar_symbols (bfd *abfd, /* Turn the current link symbol into a common symbol. It is already on the undefs list. */ h->type = bfd_link_hash_common; - h->u.c.p = bfd_hash_allocate (&info->hash->table, - sizeof (struct bfd_link_hash_common_entry)); + h->u.c.p = (struct bfd_link_hash_common_entry *) + bfd_hash_allocate (&info->hash->table, + sizeof (struct bfd_link_hash_common_entry)); if (h->u.c.p == NULL) return FALSE; @@ -3507,7 +3511,8 @@ aout_link_includes_newfunc (struct bfd_hash_entry *entry, /* Allocate the structure if it has not already been allocated by a subclass. */ if (ret == NULL) - ret = bfd_hash_allocate (table, sizeof (* ret)); + ret = (struct aout_link_includes_entry *) + bfd_hash_allocate (table, sizeof (* ret)); if (ret == NULL) return NULL; @@ -3784,7 +3789,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *finfo, bfd_boolean ok; size = bfd_get_reloc_size (howto); - buf = bfd_zmalloc (size); + buf = (bfd_byte *) bfd_zmalloc (size); if (buf == NULL) return FALSE; r = MY_relocate_contents (howto, finfo->output_bfd, @@ -5134,7 +5139,8 @@ aout_link_write_symbols (struct aout_final_link_info *finfo, bfd *input_bfd) { /* This is the first time we have seen this header file with this set of stabs strings. */ - t = bfd_hash_allocate (&finfo->includes.root, + t = (struct aout_link_includes_totals *) + bfd_hash_allocate (&finfo->includes.root, sizeof *t); if (t == NULL) return FALSE; @@ -5425,11 +5431,11 @@ NAME (aout, final_link) (bfd *abfd, goto error_return; /* Allocate buffers to hold section contents and relocs. */ - aout_info.contents = bfd_malloc (max_contents_size); + aout_info.contents = (bfd_byte *) bfd_malloc (max_contents_size); aout_info.relocs = bfd_malloc (max_relocs_size); - aout_info.symbol_map = bfd_malloc (max_sym_count * sizeof (int *)); - aout_info.output_syms = bfd_malloc ((max_sym_count + 1) - * sizeof (struct external_nlist)); + aout_info.symbol_map = (int *) bfd_malloc (max_sym_count * sizeof (int *)); + aout_info.output_syms = (struct external_nlist *) + bfd_malloc ((max_sym_count + 1) * sizeof (struct external_nlist)); if ((aout_info.contents == NULL && max_contents_size != 0) || (aout_info.relocs == NULL && max_relocs_size != 0) || (aout_info.symbol_map == NULL && max_sym_count != 0) diff --git a/cegcc/src/binutils/bfd/archive.c b/cegcc/src/binutils/bfd/archive.c index 437a0859e..36252d579 100644 --- a/cegcc/src/binutils/bfd/archive.c +++ b/cegcc/src/binutils/bfd/archive.c @@ -1,6 +1,6 @@ /* BFD back-end for archive files (libraries). Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault. @@ -181,7 +181,7 @@ _bfd_generic_mkarchive (bfd *abfd) { bfd_size_type amt = sizeof (struct artdata); - abfd->tdata.aout_ar_data = bfd_zalloc (abfd, amt); + abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt); if (bfd_ardata (abfd) == NULL) return FALSE; @@ -319,7 +319,7 @@ _bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt) } /* Insert new_elt into the hash table by filepos. */ - cache = bfd_zalloc (arch_bfd, sizeof (struct ar_cache)); + cache = (struct ar_cache *) bfd_zalloc (arch_bfd, sizeof (struct ar_cache)); cache->ptr = filepos; cache->arbfd = new_elt; *htab_find_slot (hash_table, (const void *) cache, INSERT) = cache; @@ -373,7 +373,7 @@ get_extended_arelt_filename (bfd *arch, const char *name, file_ptr *originp) { file_ptr origin = strtol (endp + 1, NULL, 10); - if (errno != 0 || index >= bfd_ardata (arch)->extended_names_size) + if (errno != 0) { bfd_set_error (bfd_error_malformed_archive); return NULL; @@ -462,7 +462,7 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag) allocsize += namelen + 1; parsed_size -= namelen; - allocptr = bfd_zalloc (abfd, allocsize); + allocptr = (char *) bfd_zalloc (abfd, allocsize); if (allocptr == NULL) return NULL; filename = (allocptr @@ -483,12 +483,12 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag) spaces, so only look for ' ' if we don't find '/'. */ char *e; - e = memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd)); + e = (char *) memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd)); if (e == NULL) { - e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd)); + e = (char *) memchr (hdr.ar_name, '/', ar_maxnamelen (abfd)); if (e == NULL) - e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd)); + e = (char *) memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd)); } if (e != NULL) @@ -505,7 +505,7 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag) if (!allocptr) { - allocptr = bfd_zalloc (abfd, allocsize); + allocptr = (char *) bfd_zalloc (abfd, allocsize); if (allocptr == NULL) return NULL; } @@ -546,7 +546,7 @@ append_relative_path (bfd *arch, char *elt_name) return elt_name; prefix_len = base_name - arch_name; - filename = bfd_alloc (arch, prefix_len + strlen (elt_name) + 1); + filename = (char *) bfd_alloc (arch, prefix_len + strlen (elt_name) + 1); if (filename == NULL) return NULL; @@ -579,7 +579,7 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos) if (0 > bfd_seek (archive, filepos, SEEK_SET)) return NULL; - if ((new_areldata = _bfd_read_ar_hdr (archive)) == NULL) + if ((new_areldata = (struct areltdata *) _bfd_read_ar_hdr (archive)) == NULL) return NULL; filename = new_areldata->filename; @@ -745,7 +745,7 @@ bfd_generic_archive_p (bfd *abfd) tdata_hold = bfd_ardata (abfd); amt = sizeof (struct artdata); - bfd_ardata (abfd) = bfd_zalloc (abfd, amt); + bfd_ardata (abfd) = (struct artdata *) bfd_zalloc (abfd, amt); if (bfd_ardata (abfd) == NULL) { bfd_ardata (abfd) = tdata_hold; @@ -835,13 +835,13 @@ do_slurp_bsd_armap (bfd *abfd) bfd_size_type parsed_size, amt; carsym *set; - mapdata = _bfd_read_ar_hdr (abfd); + mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd); if (mapdata == NULL) return FALSE; parsed_size = mapdata->parsed_size; bfd_release (abfd, mapdata); /* Don't need it any more. */ - raw_armap = bfd_zalloc (abfd, parsed_size); + raw_armap = (bfd_byte *) bfd_zalloc (abfd, parsed_size); if (raw_armap == NULL) return FALSE; @@ -870,7 +870,7 @@ do_slurp_bsd_armap (bfd *abfd) + ardata->symdef_count * BSD_SYMDEF_SIZE + BSD_STRING_COUNT_SIZE); amt = ardata->symdef_count * sizeof (carsym); - ardata->symdefs = bfd_alloc (abfd, amt); + ardata->symdefs = (struct carsym *) bfd_alloc (abfd, amt); if (!ardata->symdefs) return FALSE; @@ -911,7 +911,7 @@ do_slurp_coff_armap (bfd *abfd) bfd_size_type carsym_size, ptrsize; unsigned int i; - mapdata = _bfd_read_ar_hdr (abfd); + mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd); if (mapdata == NULL) return FALSE; parsed_size = mapdata->parsed_size; @@ -956,14 +956,15 @@ do_slurp_coff_armap (bfd *abfd) if (carsym_size + stringsize + 1 <= carsym_size) return FALSE; - ardata->symdefs = bfd_zalloc (abfd, carsym_size + stringsize + 1); + ardata->symdefs = (struct carsym *) bfd_zalloc (abfd, + carsym_size + stringsize + 1); if (ardata->symdefs == NULL) return FALSE; carsyms = ardata->symdefs; stringbase = ((char *) ardata->symdefs) + carsym_size; /* Allocate and read in the raw offsets. */ - raw_armap = bfd_alloc (abfd, ptrsize); + raw_armap = (int *) bfd_alloc (abfd, ptrsize); if (raw_armap == NULL) goto release_symdefs; if (bfd_bread (raw_armap, ptrsize, abfd) != ptrsize @@ -998,7 +999,7 @@ do_slurp_coff_armap (bfd *abfd) struct areltdata *tmp; bfd_seek (abfd, ardata->first_file_filepos, SEEK_SET); - tmp = _bfd_read_ar_hdr (abfd); + tmp = (struct areltdata *) _bfd_read_ar_hdr (abfd); if (tmp != NULL) { if (tmp->arch_header[0] == '/' @@ -1098,12 +1099,12 @@ bfd_slurp_bsd_armap_f2 (bfd *abfd) return TRUE; } - mapdata = _bfd_read_ar_hdr (abfd); + mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd); if (mapdata == NULL) return FALSE; amt = mapdata->parsed_size; - raw_armap = bfd_zalloc (abfd, amt); + raw_armap = (bfd_byte *) bfd_zalloc (abfd, amt); if (raw_armap == NULL) { byebye: @@ -1139,7 +1140,7 @@ bfd_slurp_bsd_armap_f2 (bfd *abfd) + BSD_STRING_COUNT_SIZE); rbase = (bfd_byte *) stringbase + stringsize; amt = ardata->symdef_count * BSD_SYMDEF_SIZE; - ardata->symdefs = bfd_alloc (abfd, amt); + ardata->symdefs = (struct carsym *) bfd_alloc (abfd, amt); if (!ardata->symdefs) return FALSE; @@ -1196,7 +1197,7 @@ _bfd_slurp_extended_name_table (bfd *abfd) return TRUE; } - namedata = _bfd_read_ar_hdr (abfd); + namedata = (struct areltdata *) _bfd_read_ar_hdr (abfd); if (namedata == NULL) return FALSE; @@ -1205,7 +1206,7 @@ _bfd_slurp_extended_name_table (bfd *abfd) goto byebye; bfd_ardata (abfd)->extended_names_size = amt; - bfd_ardata (abfd)->extended_names = bfd_zalloc (abfd, amt + 1); + bfd_ardata (abfd)->extended_names = (char *) bfd_zalloc (abfd, amt + 1); if (bfd_ardata (abfd)->extended_names == NULL) { byebye: @@ -1355,7 +1356,7 @@ adjust_relative_path (const char * path, const char * ref_path) if (pathbuf != NULL) free (pathbuf); pathbuf_len = 0; - pathbuf = bfd_malloc (len); + pathbuf = (char *) bfd_malloc (len); if (pathbuf == NULL) return path; pathbuf_len = len; @@ -1505,7 +1506,7 @@ _bfd_construct_extended_name_table (bfd *abfd, if (total_namelen == 0) return TRUE; - *tabloc = bfd_zalloc (abfd, total_namelen); + *tabloc = (char *) bfd_zalloc (abfd, total_namelen); if (*tabloc == NULL) return FALSE; @@ -1639,7 +1640,7 @@ bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member) if (member && (member->flags & BFD_IN_MEMORY) != 0) { /* Assume we just "made" the member, and fake it. */ - struct bfd_in_memory *bim = member->iostream; + struct bfd_in_memory *bim = (struct bfd_in_memory *) member->iostream; time (&status.st_mtime); status.st_uid = getuid (); status.st_gid = getgid (); @@ -1652,8 +1653,18 @@ bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member) return NULL; } + /* If the caller requested that the BFD generate deterministic output, + fake values for modification time, UID, GID, and file mode. */ + if ((abfd->flags & BFD_DETERMINISTIC_OUTPUT) != 0) + { + status.st_mtime = 0; + status.st_uid = 0; + status.st_gid = 0; + status.st_mode = 0644; + } + amt = sizeof (struct ar_hdr) + sizeof (struct areltdata); - ared = bfd_zalloc (abfd, amt); + ared = (struct areltdata *) bfd_zalloc (abfd, amt); if (ared == NULL) return NULL; hdr = (struct ar_hdr *) (((char *) ared) + sizeof (struct areltdata)); @@ -2078,13 +2089,13 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength) elength += elength % 2; amt = orl_max * sizeof (struct orl); - map = bfd_malloc (amt); + map = (struct orl *) bfd_malloc (amt); if (map == NULL) goto error_return; /* We put the symbol names on the arch objalloc, and then discard them when done. */ - first_name = bfd_alloc (arch, 1); + first_name = (char *) bfd_alloc (arch, 1); if (first_name == NULL) goto error_return; @@ -2116,7 +2127,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength) if (syms_max > 0) free (syms); syms_max = storage; - syms = bfd_malloc (syms_max); + syms = (asymbol **) bfd_malloc (syms_max); if (syms == NULL) goto error_return; } @@ -2145,7 +2156,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength) { orl_max *= 2; amt = orl_max * sizeof (struct orl); - new_map = bfd_realloc (map, amt); + new_map = (struct orl *) bfd_realloc (map, amt); if (new_map == NULL) goto error_return; @@ -2154,10 +2165,11 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength) namelen = strlen (syms[src_count]->name); amt = sizeof (char *); - map[orl_count].name = bfd_alloc (arch, amt); + map[orl_count].name = (char **) bfd_alloc (arch, amt); if (map[orl_count].name == NULL) goto error_return; - *(map[orl_count].name) = bfd_alloc (arch, namelen + 1); + *(map[orl_count].name) = (char *) bfd_alloc (arch, + namelen + 1); if (*(map[orl_count].name) == NULL) goto error_return; strcpy (*(map[orl_count].name), syms[src_count]->name); @@ -2220,20 +2232,39 @@ bsd_write_armap (bfd *arch, unsigned int count; struct ar_hdr hdr; struct stat statbuf; + long uid, gid; firstreal = mapsize + elength + sizeof (struct ar_hdr) + SARMAG; stat (arch->filename, &statbuf); + if ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0) + { + /* Remember the timestamp, to keep it holy. But fudge it a little. */ + bfd_ardata (arch)->armap_timestamp = (statbuf.st_mtime + + ARMAP_TIME_OFFSET); + uid = getuid(); + gid = getgid(); + } + else + { + /* If deterministic, we use 0 as the timestamp in the map. + Some linkers may require that the archive filesystem modification + time is less than (or near to) the archive map timestamp. Those + linkers should not be used with deterministic mode. (GNU ld and + Gold do not have this restriction.) */ + bfd_ardata (arch)->armap_timestamp = 0; + uid = 0; + gid = 0; + } + memset (&hdr, ' ', sizeof (struct ar_hdr)); memcpy (hdr.ar_name, RANLIBMAG, strlen (RANLIBMAG)); - /* Remember the timestamp, to keep it holy. But fudge it a little. */ - bfd_ardata (arch)->armap_timestamp = statbuf.st_mtime + ARMAP_TIME_OFFSET; bfd_ardata (arch)->armap_datepos = (SARMAG + offsetof (struct ar_hdr, ar_date[0])); _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", bfd_ardata (arch)->armap_timestamp); - _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", getuid ()); - _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", getgid ()); + _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", uid); + _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", gid); _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", mapsize); memcpy (hdr.ar_fmag, ARFMAG, 2); if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) @@ -2301,6 +2332,10 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch) struct stat archstat; struct ar_hdr hdr; + /* If creating deterministic archives, just leave the timestamp as-is. */ + if ((arch->flags & BFD_DETERMINISTIC_OUTPUT) != 0) + return TRUE; + /* Flush writes, get last-write timestamp from file, and compare it to the timestamp IN the file. */ bfd_flush (arch); @@ -2385,7 +2420,8 @@ coff_write_armap (bfd *arch, _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", mapsize); _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", - time (NULL)); + ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0 + ? time (NULL) : 0)); /* This, at least, is what Intel coff sets the values to. */ _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", 0); _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", 0); diff --git a/cegcc/src/binutils/bfd/archive64.c b/cegcc/src/binutils/bfd/archive64.c index 24ba42467..0a1f6edf4 100644 --- a/cegcc/src/binutils/bfd/archive64.c +++ b/cegcc/src/binutils/bfd/archive64.c @@ -1,5 +1,5 @@ /* MIPS-specific support for 64-bit ELF - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2007 + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. Ian Lance Taylor, Cygnus Support Linker support added by Mark Mitchell, CodeSourcery, LLC. @@ -95,13 +95,13 @@ bfd_elf64_archive_slurp_armap (bfd *abfd) ptrsize = 8 * nsymz; amt = carsym_size + stringsize + 1; - ardata->symdefs = bfd_zalloc (abfd, amt); + ardata->symdefs = (struct carsym *) bfd_zalloc (abfd, amt); if (ardata->symdefs == NULL) return FALSE; carsyms = ardata->symdefs; stringbase = ((char *) ardata->symdefs) + carsym_size; - raw_armap = bfd_alloc (abfd, ptrsize); + raw_armap = (bfd_byte *) bfd_alloc (abfd, ptrsize); if (raw_armap == NULL) goto release_symdefs; diff --git a/cegcc/src/binutils/bfd/archures.c b/cegcc/src/binutils/bfd/archures.c index f548ea21d..8df2ce1c9 100644 --- a/cegcc/src/binutils/bfd/archures.c +++ b/cegcc/src/binutils/bfd/archures.c @@ -1,6 +1,6 @@ /* BFD library support routines for architectures. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Hacked by John Gilmore and Steve Chamberlain of Cygnus Support. @@ -186,6 +186,9 @@ DESCRIPTION .#define bfd_mach_i386_i386_intel_syntax 3 .#define bfd_mach_x86_64 64 .#define bfd_mach_x86_64_intel_syntax 65 +. bfd_arch_l1om, {* Intel L1OM *} +.#define bfd_mach_l1om 66 +.#define bfd_mach_l1om_intel_syntax 67 . bfd_arch_we32k, {* AT&T WE32xxx *} . bfd_arch_tahoe, {* CCI/Harris Tahoe *} . bfd_arch_i860, {* Intel 860 *} @@ -204,11 +207,13 @@ DESCRIPTION .#define bfd_mach_h8300sx 6 .#define bfd_mach_h8300sxn 7 . bfd_arch_pdp11, {* DEC PDP-11 *} +. bfd_arch_plugin, . bfd_arch_powerpc, {* PowerPC *} .#define bfd_mach_ppc 32 .#define bfd_mach_ppc64 64 .#define bfd_mach_ppc_403 403 .#define bfd_mach_ppc_403gc 4030 +.#define bfd_mach_ppc_405 405 .#define bfd_mach_ppc_505 505 .#define bfd_mach_ppc_601 601 .#define bfd_mach_ppc_602 602 @@ -331,10 +336,13 @@ DESCRIPTION .#define bfd_mach_frvtomcat 499 {* fr500 prototype *} .#define bfd_mach_fr500 500 .#define bfd_mach_fr550 550 +. bfd_arch_moxie, {* The moxie processor *} +.#define bfd_mach_moxie 1 . bfd_arch_mcore, . bfd_arch_mep, .#define bfd_mach_mep 1 .#define bfd_mach_mep_h1 0x6831 +.#define bfd_mach_mep_c5 0x6335 . bfd_arch_ia64, {* HP/Intel ia64 *} .#define bfd_mach_ia64_elf64 64 .#define bfd_mach_ia64_elf32 32 @@ -372,10 +380,14 @@ DESCRIPTION .#define bfd_mach_cris_v0_v10 255 .#define bfd_mach_cris_v32 32 .#define bfd_mach_cris_v10_v32 1032 +. bfd_arch_rx, {* Renesas RX. *} +.#define bfd_mach_rx 0x75 . bfd_arch_s390, {* IBM s390 *} .#define bfd_mach_s390_31 31 .#define bfd_mach_s390_64 64 . bfd_arch_score, {* Sunplus score *} +.#define bfd_mach_score3 3 +.#define bfd_mach_score7 7 . bfd_arch_openrisc, {* OpenRISC *} . bfd_arch_mmix, {* Donald Knuth's educational processor. *} . bfd_arch_xstormy16, @@ -412,6 +424,7 @@ DESCRIPTION .#define bfd_mach_r800 11 {* R800: successor with multiplication. *} . bfd_arch_lm32, {* Lattice Mico32 *} .#define bfd_mach_lm32 1 +. bfd_arch_microblaze,{* Xilinx MicroBlaze. *} . bfd_arch_last . }; */ @@ -474,6 +487,7 @@ extern const bfd_arch_info_type bfd_i960_arch; extern const bfd_arch_info_type bfd_ia64_arch; extern const bfd_arch_info_type bfd_ip2k_arch; extern const bfd_arch_info_type bfd_iq2000_arch; +extern const bfd_arch_info_type bfd_l1om_arch; extern const bfd_arch_info_type bfd_lm32_arch; extern const bfd_arch_info_type bfd_m32c_arch; extern const bfd_arch_info_type bfd_m32r_arch; @@ -485,9 +499,11 @@ extern const bfd_arch_info_type bfd_maxq_arch; extern const bfd_arch_info_type bfd_mcore_arch; extern const bfd_arch_info_type bfd_mep_arch; extern const bfd_arch_info_type bfd_mips_arch; +extern const bfd_arch_info_type bfd_microblaze_arch; extern const bfd_arch_info_type bfd_mmix_arch; extern const bfd_arch_info_type bfd_mn10200_arch; extern const bfd_arch_info_type bfd_mn10300_arch; +extern const bfd_arch_info_type bfd_moxie_arch; extern const bfd_arch_info_type bfd_msp430_arch; extern const bfd_arch_info_type bfd_mt_arch; extern const bfd_arch_info_type bfd_ns32k_arch; @@ -495,9 +511,11 @@ extern const bfd_arch_info_type bfd_openrisc_arch; extern const bfd_arch_info_type bfd_or32_arch; extern const bfd_arch_info_type bfd_pdp11_arch; extern const bfd_arch_info_type bfd_pj_arch; +extern const bfd_arch_info_type bfd_plugin_arch; extern const bfd_arch_info_type bfd_powerpc_archs[]; #define bfd_powerpc_arch bfd_powerpc_archs[0] extern const bfd_arch_info_type bfd_rs6000_arch; +extern const bfd_arch_info_type bfd_rx_arch; extern const bfd_arch_info_type bfd_s390_arch; extern const bfd_arch_info_type bfd_score_arch; extern const bfd_arch_info_type bfd_sh_arch; @@ -509,8 +527,8 @@ extern const bfd_arch_info_type bfd_tic54x_arch; extern const bfd_arch_info_type bfd_tic80_arch; extern const bfd_arch_info_type bfd_v850_arch; extern const bfd_arch_info_type bfd_vax_arch; -extern const bfd_arch_info_type bfd_we32k_arch; extern const bfd_arch_info_type bfd_w65_arch; +extern const bfd_arch_info_type bfd_we32k_arch; extern const bfd_arch_info_type bfd_xstormy16_arch; extern const bfd_arch_info_type bfd_xtensa_arch; extern const bfd_arch_info_type bfd_xc16x_arch; @@ -546,6 +564,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_ia64_arch, &bfd_ip2k_arch, &bfd_iq2000_arch, + &bfd_l1om_arch, &bfd_lm32_arch, &bfd_m32c_arch, &bfd_m32r_arch, @@ -556,18 +575,21 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_maxq_arch, &bfd_mcore_arch, &bfd_mep_arch, + &bfd_microblaze_arch, &bfd_mips_arch, &bfd_mmix_arch, &bfd_mn10200_arch, &bfd_mn10300_arch, - &bfd_mt_arch, + &bfd_moxie_arch, &bfd_msp430_arch, + &bfd_mt_arch, &bfd_ns32k_arch, &bfd_openrisc_arch, &bfd_or32_arch, &bfd_pdp11_arch, &bfd_powerpc_arch, &bfd_rs6000_arch, + &bfd_rx_arch, &bfd_s390_arch, &bfd_score_arch, &bfd_sh_arch, @@ -673,7 +695,7 @@ bfd_arch_list (void) } amt = (vec_length + 1) * sizeof (char **); - name_list = bfd_malloc (amt); + name_list = (const char **) bfd_malloc (amt); if (name_list == NULL) return NULL; diff --git a/cegcc/src/binutils/bfd/bfd-in.h b/cegcc/src/binutils/bfd/bfd-in.h index 6b4901330..c3d2d9780 100644 --- a/cegcc/src/binutils/bfd/bfd-in.h +++ b/cegcc/src/binutils/bfd/bfd-in.h @@ -1,7 +1,7 @@ /* Main header file for the bfd library -- portable access to object files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -66,6 +66,8 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) +#define BFD_SUPPORTS_PLUGINS @supports_plugins@ + /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have been selected with --enable-targets, or if --enable-64-bit-bfd. */ @@ -633,8 +635,8 @@ extern struct bfd_link_needed_list *bfd_elf_get_needed_list extern bfd_boolean bfd_elf_get_bfd_needed_list (bfd *, struct bfd_link_needed_list **); extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char * const *, - struct bfd_link_info *, struct bfd_section **, + (bfd *, const char *, const char *, const char *, const char *, const char *, + const char * const *, struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *); extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr (bfd *, struct bfd_link_info *); @@ -765,6 +767,10 @@ extern bfd_boolean bfd_get_file_window /* XCOFF support routines for the linker. */ +extern bfd_boolean bfd_xcoff_split_import_path + (bfd *, const char *, const char **, const char **); +extern bfd_boolean bfd_xcoff_set_archive_import_path + (struct bfd_link_info *, bfd *, const char *); extern bfd_boolean bfd_xcoff_link_record_set (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); extern bfd_boolean bfd_xcoff_import_symbol @@ -779,7 +785,7 @@ extern bfd_boolean bfd_xcoff_record_link_assignment extern bfd_boolean bfd_xcoff_size_dynamic_sections (bfd *, struct bfd_link_info *, const char *, const char *, unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, bfd_boolean, struct bfd_section **, bfd_boolean); + int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); extern bfd_boolean bfd_xcoff_link_generate_rtinit (bfd *, const char *, const char *, bfd_boolean); @@ -821,6 +827,9 @@ extern void bfd_elf32_arm_init_maps extern void bfd_elf32_arm_set_vfp11_fix (bfd *, struct bfd_link_info *); +extern void bfd_elf32_arm_set_cortex_a8_fix + (bfd *, struct bfd_link_info *); + extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan (bfd *, struct bfd_link_info *); @@ -856,7 +865,7 @@ extern bfd_boolean bfd_elf32_arm_process_before_allocation void bfd_elf32_arm_set_target_relocs (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int); + int, int, int, int); extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking (bfd *, struct bfd_link_info *); @@ -894,7 +903,11 @@ extern bfd_boolean elf32_arm_size_stubs struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); extern bfd_boolean elf32_arm_build_stubs (struct bfd_link_info *); - + +/* ARM unwind section editing support. */ +extern bfd_boolean elf32_arm_fix_exidx_coverage + (struct bfd_section **, unsigned int, struct bfd_link_info *); + /* TI COFF load page support. */ extern void bfd_ticoff_set_section_load_page (struct bfd_section *, int); diff --git a/cegcc/src/binutils/bfd/bfd-in2.h b/cegcc/src/binutils/bfd/bfd-in2.h index 994759d9b..c9aa23884 100644 --- a/cegcc/src/binutils/bfd/bfd-in2.h +++ b/cegcc/src/binutils/bfd/bfd-in2.h @@ -8,7 +8,7 @@ /* Main header file for the bfd library -- portable access to object files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -73,6 +73,8 @@ extern "C" { #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2)) +#define BFD_SUPPORTS_PLUGINS @supports_plugins@ + /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have been selected with --enable-targets, or if --enable-64-bit-bfd. */ @@ -640,8 +642,8 @@ extern struct bfd_link_needed_list *bfd_elf_get_needed_list extern bfd_boolean bfd_elf_get_bfd_needed_list (bfd *, struct bfd_link_needed_list **); extern bfd_boolean bfd_elf_size_dynamic_sections - (bfd *, const char *, const char *, const char *, const char * const *, - struct bfd_link_info *, struct bfd_section **, + (bfd *, const char *, const char *, const char *, const char *, const char *, + const char * const *, struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *); extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr (bfd *, struct bfd_link_info *); @@ -772,6 +774,10 @@ extern bfd_boolean bfd_get_file_window /* XCOFF support routines for the linker. */ +extern bfd_boolean bfd_xcoff_split_import_path + (bfd *, const char *, const char **, const char **); +extern bfd_boolean bfd_xcoff_set_archive_import_path + (struct bfd_link_info *, bfd *, const char *); extern bfd_boolean bfd_xcoff_link_record_set (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); extern bfd_boolean bfd_xcoff_import_symbol @@ -786,7 +792,7 @@ extern bfd_boolean bfd_xcoff_record_link_assignment extern bfd_boolean bfd_xcoff_size_dynamic_sections (bfd *, struct bfd_link_info *, const char *, const char *, unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, bfd_boolean, struct bfd_section **, bfd_boolean); + int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); extern bfd_boolean bfd_xcoff_link_generate_rtinit (bfd *, const char *, const char *, bfd_boolean); @@ -828,6 +834,9 @@ extern void bfd_elf32_arm_init_maps extern void bfd_elf32_arm_set_vfp11_fix (bfd *, struct bfd_link_info *); +extern void bfd_elf32_arm_set_cortex_a8_fix + (bfd *, struct bfd_link_info *); + extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan (bfd *, struct bfd_link_info *); @@ -863,7 +872,7 @@ extern bfd_boolean bfd_elf32_arm_process_before_allocation void bfd_elf32_arm_set_target_relocs (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix, - int, int, int); + int, int, int, int); extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking (bfd *, struct bfd_link_info *); @@ -901,7 +910,11 @@ extern bfd_boolean elf32_arm_size_stubs struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); extern bfd_boolean elf32_arm_build_stubs (struct bfd_link_info *); - + +/* ARM unwind section editing support. */ +extern bfd_boolean elf32_arm_fix_exidx_coverage + (struct bfd_section **, unsigned int, struct bfd_link_info *); + /* TI COFF load page support. */ extern void bfd_ticoff_set_section_load_page (struct bfd_section *, int); @@ -1109,6 +1122,9 @@ long bfd_get_mtime (bfd *abfd); file_ptr bfd_get_size (bfd *abfd); +void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, + int prot, int flags, file_ptr offset); + /* Extracted from bfdwin.c. */ /* Extracted from section.c. */ typedef struct bfd_section @@ -1304,6 +1320,10 @@ typedef struct bfd_section TMS320C54X only. */ #define SEC_TIC54X_CLINK 0x20000000 + /* Indicate that section has the no read flag set. This happens + when memory read flag isn't set. */ +#define SEC_COFF_NOREAD 0x40000000 + /* End of section flags. */ /* Some internal packed boolean fields. */ @@ -1343,6 +1363,9 @@ typedef struct bfd_section /* Nonzero if this section has TLS related relocations. */ unsigned int has_tls_reloc:1; + /* Nonzero if this section has a call to __tls_get_addr. */ + unsigned int has_tls_get_addr_call:1; + /* Nonzero if this section has a gp reloc. */ unsigned int has_gp_reloc:1; @@ -1382,6 +1405,13 @@ typedef struct bfd_section section size calculated on a previous linker relaxation pass. */ bfd_size_type rawsize; + /* Relaxation table. */ + struct relax_table *relax; + + /* Count of used relaxation table entries. */ + int relax_count; + + /* If this section is going to be output, then this value is the offset in *bytes* into the output section of the first byte in the input section (byte ==> smallest addressable unit on the @@ -1471,6 +1501,17 @@ typedef struct bfd_section } map_head, map_tail; } asection; +/* Relax table contains information about instructions which can + be removed by relaxation -- replacing a long address with a + short address. */ +struct relax_table { + /* Address where bytes may be deleted. */ + bfd_vma addr; + + /* Number of bytes to be deleted. */ + int size; +}; + /* These sections are global, and are managed by BFD. The application and target back end are not permitted to change the values in these sections. New code should use the section_ptr macros rather @@ -1603,11 +1644,11 @@ extern asection bfd_ind_section; /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ \ 0, 0, 0, 0, \ \ - /* has_gp_reloc, need_finalize_relax, reloc_done, */ \ - 0, 0, 0, \ + /* has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, */ \ + 0, 0, 0, \ \ - /* vma, lma, size, rawsize */ \ - 0, 0, 0, 0, \ + /* reloc_done, vma, lma, size, rawsize, relax, relax_count, */ \ + 0, 0, 0, 0, 0, 0, 0, \ \ /* output_offset, output_section, alignment_power, */ \ 0, (struct bfd_section *) &SEC, 0, \ @@ -1812,6 +1853,9 @@ enum bfd_architecture #define bfd_mach_i386_i386_intel_syntax 3 #define bfd_mach_x86_64 64 #define bfd_mach_x86_64_intel_syntax 65 + bfd_arch_l1om, /* Intel L1OM */ +#define bfd_mach_l1om 66 +#define bfd_mach_l1om_intel_syntax 67 bfd_arch_we32k, /* AT&T WE32xxx */ bfd_arch_tahoe, /* CCI/Harris Tahoe */ bfd_arch_i860, /* Intel 860 */ @@ -1830,11 +1874,13 @@ enum bfd_architecture #define bfd_mach_h8300sx 6 #define bfd_mach_h8300sxn 7 bfd_arch_pdp11, /* DEC PDP-11 */ + bfd_arch_plugin, bfd_arch_powerpc, /* PowerPC */ #define bfd_mach_ppc 32 #define bfd_mach_ppc64 64 #define bfd_mach_ppc_403 403 #define bfd_mach_ppc_403gc 4030 +#define bfd_mach_ppc_405 405 #define bfd_mach_ppc_505 505 #define bfd_mach_ppc_601 601 #define bfd_mach_ppc_602 602 @@ -1957,10 +2003,13 @@ enum bfd_architecture #define bfd_mach_frvtomcat 499 /* fr500 prototype */ #define bfd_mach_fr500 500 #define bfd_mach_fr550 550 + bfd_arch_moxie, /* The moxie processor */ +#define bfd_mach_moxie 1 bfd_arch_mcore, bfd_arch_mep, #define bfd_mach_mep 1 #define bfd_mach_mep_h1 0x6831 +#define bfd_mach_mep_c5 0x6335 bfd_arch_ia64, /* HP/Intel ia64 */ #define bfd_mach_ia64_elf64 64 #define bfd_mach_ia64_elf32 32 @@ -1998,10 +2047,14 @@ enum bfd_architecture #define bfd_mach_cris_v0_v10 255 #define bfd_mach_cris_v32 32 #define bfd_mach_cris_v10_v32 1032 + bfd_arch_rx, /* Renesas RX. */ +#define bfd_mach_rx 0x75 bfd_arch_s390, /* IBM s390 */ #define bfd_mach_s390_31 31 #define bfd_mach_s390_64 64 bfd_arch_score, /* Sunplus score */ +#define bfd_mach_score3 3 +#define bfd_mach_score7 7 bfd_arch_openrisc, /* OpenRISC */ bfd_arch_mmix, /* Donald Knuth's educational processor. */ bfd_arch_xstormy16, @@ -2038,6 +2091,7 @@ enum bfd_architecture #define bfd_mach_r800 11 /* R800: successor with multiplication. */ bfd_arch_lm32, /* Lattice Mico32 */ #define bfd_mach_lm32 1 + bfd_arch_microblaze,/* Xilinx MicroBlaze. */ bfd_arch_last }; @@ -2516,6 +2570,7 @@ relocation types already defined. */ BFD_RELOC_SPU_HI16, BFD_RELOC_SPU_PPU32, BFD_RELOC_SPU_PPU64, + BFD_RELOC_SPU_ADD_PIC, /* Alpha ECOFF and ELF relocations. Some of these treat the symbol or "addend" in some special way. @@ -2586,6 +2641,22 @@ share a common GP, and the target address is adjusted for STO_ALPHA_STD_GPLOAD. */ BFD_RELOC_ALPHA_BRSGP, +/* The NOP relocation outputs a NOP if the longword displacement +between two procedure entry points is < 2^21. */ + BFD_RELOC_ALPHA_NOP, + +/* The BSR relocation outputs a BSR if the longword displacement +between two procedure entry points is < 2^21. */ + BFD_RELOC_ALPHA_BSR, + +/* The LDA relocation outputs a LDA if the longword displacement +between two procedure entry points is < 2^16. */ + BFD_RELOC_ALPHA_LDA, + +/* The BOH relocation outputs a BSR if the longword displacement +between two procedure entry points is < 2^21, or else a hint. */ + BFD_RELOC_ALPHA_BOH, + /* Alpha thread-local storage relocations. */ BFD_RELOC_ALPHA_TLSGD, BFD_RELOC_ALPHA_TLSLDM, @@ -2694,6 +2765,10 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MIPS_JUMP_SLOT, +/* Moxie ELF relocations. */ + BFD_RELOC_MOXIE_10_PCREL, + + /* Fujitsu Frv Relocations. */ BFD_RELOC_FRV_LABEL16, BFD_RELOC_FRV_LABEL24, @@ -2798,6 +2873,7 @@ relaxation. */ BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_386_TLS_DESC, + BFD_RELOC_386_IRELATIVE, /* x86-64/elf relocations */ BFD_RELOC_X86_64_GOT32, @@ -2826,6 +2902,7 @@ relaxation. */ BFD_RELOC_X86_64_GOTPC32_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL, BFD_RELOC_X86_64_TLSDESC, + BFD_RELOC_X86_64_IRELATIVE, /* ns32k relocations */ BFD_RELOC_NS32K_IMM_8, @@ -2910,6 +2987,8 @@ relaxation. */ /* PowerPC and PowerPC64 thread-local storage relocations. */ BFD_RELOC_PPC_TLS, + BFD_RELOC_PPC_TLSGD, + BFD_RELOC_PPC_TLSLD, BFD_RELOC_PPC_DTPMOD, BFD_RELOC_PPC_TPREL16, BFD_RELOC_PPC_TPREL16_LO, @@ -3767,6 +3846,32 @@ instructions */ instructions */ BFD_RELOC_AVR_6_ADIW, +/* Renesas RX Relocations. */ + BFD_RELOC_RX_NEG8, + BFD_RELOC_RX_NEG16, + BFD_RELOC_RX_NEG24, + BFD_RELOC_RX_NEG32, + BFD_RELOC_RX_16_OP, + BFD_RELOC_RX_24_OP, + BFD_RELOC_RX_32_OP, + BFD_RELOC_RX_8U, + BFD_RELOC_RX_16U, + BFD_RELOC_RX_24U, + BFD_RELOC_RX_DIR3U_PCREL, + BFD_RELOC_RX_DIFF, + BFD_RELOC_RX_GPRELB, + BFD_RELOC_RX_GPRELW, + BFD_RELOC_RX_GPRELL, + BFD_RELOC_RX_SYM, + BFD_RELOC_RX_OP_SUBTRACT, + BFD_RELOC_RX_ABS8, + BFD_RELOC_RX_ABS16, + BFD_RELOC_RX_ABS32, + BFD_RELOC_RX_ABS16U, + BFD_RELOC_RX_ABS16UW, + BFD_RELOC_RX_ABS16UL, + BFD_RELOC_RX_RELAX, + /* Direct 12 bit. */ BFD_RELOC_390_12, @@ -3873,10 +3978,8 @@ instructions */ BFD_RELOC_390_GOTPLT20, BFD_RELOC_390_TLS_GOTIE20, -/* Score relocations */ - BFD_RELOC_SCORE_DUMMY1, - -/* Low 16 bit for load/store */ +/* Score relocations +Low 16 bit for load/store */ BFD_RELOC_SCORE_GPREL15, /* This is a 24-bit reloc with the right 1 bit assumed to be 0 */ @@ -3886,12 +3989,21 @@ instructions */ /* This is a 19-bit reloc with the right 1 bit assumed to be 0 */ BFD_RELOC_SCORE_BRANCH, +/* This is a 32-bit reloc for 48-bit instructions. */ + BFD_RELOC_SCORE_IMM30, + +/* This is a 32-bit reloc for 48-bit instructions. */ + BFD_RELOC_SCORE_IMM32, + /* This is a 11-bit reloc with the right 1 bit assumed to be 0 */ BFD_RELOC_SCORE16_JMP, /* This is a 8-bit reloc with the right 1 bit assumed to be 0 */ BFD_RELOC_SCORE16_BRANCH, +/* This is a 9-bit reloc with the right 1 bit assumed to be 0 */ + BFD_RELOC_SCORE_BCMP, + /* Undocumented Score relocs */ BFD_RELOC_SCORE_GOT15, BFD_RELOC_SCORE_GOT_LO16, @@ -4441,6 +4553,66 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ BFD_RELOC_LM32_GLOB_DAT, BFD_RELOC_LM32_JMP_SLOT, BFD_RELOC_LM32_RELATIVE, + +/* Difference between two section addreses. Must be followed by a +BFD_RELOC_MACH_O_PAIR. */ + BFD_RELOC_MACH_O_SECTDIFF, + +/* Mach-O generic relocations. */ + BFD_RELOC_MACH_O_PAIR, + +/* This is a 32 bit reloc for the microblaze that stores the +low 16 bits of a value */ + BFD_RELOC_MICROBLAZE_32_LO, + +/* This is a 32 bit pc-relative reloc for the microblaze that +stores the low 16 bits of a value */ + BFD_RELOC_MICROBLAZE_32_LO_PCREL, + +/* This is a 32 bit reloc for the microblaze that stores a +value relative to the read-only small data area anchor */ + BFD_RELOC_MICROBLAZE_32_ROSDA, + +/* This is a 32 bit reloc for the microblaze that stores a +value relative to the read-write small data area anchor */ + BFD_RELOC_MICROBLAZE_32_RWSDA, + +/* This is a 32 bit reloc for the microblaze to handle +expressions of the form "Symbol Op Symbol" */ + BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM, + +/* This is a 64 bit reloc that stores the 32 bit pc relative +value in two words (with an imm instruction). No relocation is +done here - only used for relaxing */ + BFD_RELOC_MICROBLAZE_64_NONE, + +/* This is a 64 bit reloc that stores the 32 bit pc relative +value in two words (with an imm instruction). The relocation is +PC-relative GOT offset */ + BFD_RELOC_MICROBLAZE_64_GOTPC, + +/* This is a 64 bit reloc that stores the 32 bit pc relative +value in two words (with an imm instruction). The relocation is +GOT offset */ + BFD_RELOC_MICROBLAZE_64_GOT, + +/* This is a 64 bit reloc that stores the 32 bit pc relative +value in two words (with an imm instruction). The relocation is +PC-relative offset into PLT */ + BFD_RELOC_MICROBLAZE_64_PLT, + +/* This is a 64 bit reloc that stores the 32 bit GOT relative +value in two words (with an imm instruction). The relocation is +relative offset from _GLOBAL_OFFSET_TABLE_ */ + BFD_RELOC_MICROBLAZE_64_GOTOFF, + +/* This is a 32 bit reloc that stores the 32 bit GOT relative +value in a word. The relocation is relative offset from */ + BFD_RELOC_MICROBLAZE_32_GOTOFF, + +/* This is used to tell the dynamic linker to copy the value out of +the dynamic object into the runtime process image. */ + BFD_RELOC_MICROBLAZE_COPY, BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; reloc_howto_type *bfd_reloc_type_lookup @@ -4567,6 +4739,16 @@ typedef struct bfd_symbol /* This symbol was created by bfd_get_synthetic_symtab. */ #define BSF_SYNTHETIC (1 << 21) + /* This symbol is an indirect code object. Unrelated to BSF_INDIRECT. + The dynamic linker will compute the value of this symbol by + calling the function that it points to. BSF_FUNCTION must + also be also set. */ +#define BSF_GNU_INDIRECT_FUNCTION (1 << 22) + /* This symbol is a globally unique data object. The dynamic linker + will make sure that in the entire process there is just one symbol + with this name and type in use. BSF_OBJECT must also be set. */ +#define BSF_GNU_UNIQUE (1 << 23) + flagword flags; /* A pointer to the section to which this symbol is @@ -4629,6 +4811,14 @@ bfd_boolean bfd_copy_private_symbol_data (ibfd, isymbol, obfd, osymbol)) /* Extracted from bfd.c. */ +enum bfd_direction + { + no_direction = 0, + read_direction = 1, + write_direction = 2, + both_direction = 3 + }; + struct bfd { /* A unique identifier of the BFD */ @@ -4663,14 +4853,7 @@ struct bfd bfd_format format; /* The direction with which the BFD was opened. */ - enum bfd_direction - { - no_direction = 0, - read_direction = 1, - write_direction = 2, - both_direction = 3 - } - direction; + enum bfd_direction direction; /* Format_specific flags. */ flagword flags; @@ -4739,6 +4922,11 @@ struct bfd to any input file. */ #define BFD_LINKER_CREATED 0x2000 + /* This may be set before writing out a BFD to request that it + be written using values for UIDs, GIDs, timestamps, etc. that + will be consistent from run to run. */ +#define BFD_DETERMINISTIC_OUTPUT 0x4000 + /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of origin, with origin set to 0 for non archive files. */ @@ -4809,6 +4997,7 @@ struct bfd struct ieee_data_struct *ieee_data; struct ieee_ar_data_struct *ieee_ar_data; struct srec_data_struct *srec_data; + struct verilog_data_struct *verilog_data; struct ihex_data_struct *ihex_data; struct tekhex_data_struct *tekhex_data; struct elf_obj_tdata *elf_obj_data; @@ -4829,6 +5018,7 @@ struct bfd struct netbsd_core_struct *netbsd_core_data; struct mach_o_data_struct *mach_o_data; struct mach_o_fat_data_struct *mach_o_fat_data; + struct plugin_data_struct *plugin_data; struct bfd_pef_data_struct *pef_data; struct bfd_pef_xlib_data_struct *pef_xlib_data; struct bfd_sym_data_struct *sym_data; @@ -5130,6 +5320,7 @@ enum bfd_flavour bfd_target_oasys_flavour, bfd_target_tekhex_flavour, bfd_target_srec_flavour, + bfd_target_verilog_flavour, bfd_target_ihex_flavour, bfd_target_som_flavour, bfd_target_os9k_flavour, @@ -5412,7 +5603,8 @@ typedef struct bfd_target NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ NAME##_bfd_discard_group, \ - NAME##_section_already_linked \ + NAME##_section_already_linked, \ + NAME##_bfd_define_common_symbol int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); bfd_byte * (*_bfd_get_relocated_section_contents) @@ -5460,6 +5652,10 @@ typedef struct bfd_target void (*_section_already_linked) (bfd *, struct bfd_section *, struct bfd_link_info *); + /* Define a common symbol. */ + bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, + struct bfd_link_hash_entry *); + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ NAME##_get_dynamic_symtab_upper_bound, \ @@ -5524,6 +5720,17 @@ void bfd_section_already_linked (bfd *abfd, asection *sec, #define bfd_section_already_linked(abfd, sec, info) \ BFD_SEND (abfd, _section_already_linked, (abfd, sec, info)) +bfd_boolean bfd_generic_define_common_symbol + (bfd *output_bfd, struct bfd_link_info *info, + struct bfd_link_hash_entry *h); + +#define bfd_define_common_symbol(output_bfd, info, h) \ + BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h)) + +struct bfd_elf_version_tree * bfd_find_version_for_sym + (struct bfd_elf_version_tree *verdefs, + const char *sym_name, bfd_boolean *hide); + /* Extracted from simple.c. */ bfd_byte *bfd_simple_get_relocated_section_contents (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); diff --git a/cegcc/src/binutils/bfd/bfd.c b/cegcc/src/binutils/bfd/bfd.c index 847da522a..eef9f3615 100644 --- a/cegcc/src/binutils/bfd/bfd.c +++ b/cegcc/src/binutils/bfd/bfd.c @@ -1,6 +1,6 @@ /* Generic BFD library interface and support routines. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -35,6 +35,14 @@ SECTION CODE_FRAGMENT . +.enum bfd_direction +. { +. no_direction = 0, +. read_direction = 1, +. write_direction = 2, +. both_direction = 3 +. }; +. .struct bfd .{ . {* A unique identifier of the BFD *} @@ -69,14 +77,7 @@ CODE_FRAGMENT . bfd_format format; . . {* The direction with which the BFD was opened. *} -. enum bfd_direction -. { -. no_direction = 0, -. read_direction = 1, -. write_direction = 2, -. both_direction = 3 -. } -. direction; +. enum bfd_direction direction; . . {* Format_specific flags. *} . flagword flags; @@ -145,6 +146,11 @@ CODE_FRAGMENT . to any input file. *} .#define BFD_LINKER_CREATED 0x2000 . +. {* This may be set before writing out a BFD to request that it +. be written using values for UIDs, GIDs, timestamps, etc. that +. will be consistent from run to run. *} +.#define BFD_DETERMINISTIC_OUTPUT 0x4000 +. . {* Currently my_archive is tested before adding origin to . anything. I believe that this can become always an add of . origin, with origin set to 0 for non archive files. *} @@ -215,6 +221,7 @@ CODE_FRAGMENT . struct ieee_data_struct *ieee_data; . struct ieee_ar_data_struct *ieee_ar_data; . struct srec_data_struct *srec_data; +. struct verilog_data_struct *verilog_data; . struct ihex_data_struct *ihex_data; . struct tekhex_data_struct *tekhex_data; . struct elf_obj_tdata *elf_obj_data; @@ -235,6 +242,7 @@ CODE_FRAGMENT . struct netbsd_core_struct *netbsd_core_data; . struct mach_o_data_struct *mach_o_data; . struct mach_o_fat_data_struct *mach_o_fat_data; +. struct plugin_data_struct *plugin_data; . struct bfd_pef_data_struct *pef_data; . struct bfd_pef_xlib_data_struct *pef_xlib_data; . struct bfd_sym_data_struct *sym_data; @@ -431,7 +439,7 @@ bfd_set_error (bfd_error_type error_tag, ...) va_start (ap, error_tag); input_bfd = va_arg (ap, bfd *); - input_error = va_arg (ap, int); + input_error = (bfd_error_type) va_arg (ap, int); if (input_error >= bfd_error_on_input) abort (); va_end (ap); @@ -1441,7 +1449,7 @@ bfd_record_phdr (bfd *abfd, amt = sizeof (struct elf_segment_map); amt += ((bfd_size_type) count - 1) * sizeof (asection *); - m = bfd_zalloc (abfd, amt); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) return FALSE; @@ -1696,8 +1704,7 @@ DESCRIPTION emulation. RETURNS - Returns the maximum page size in bytes for ELF, abort - otherwise. + Returns the maximum page size in bytes for ELF, 0 otherwise. */ bfd_vma @@ -1710,7 +1717,6 @@ bfd_emul_get_maxpagesize (const char *emul) && target->flavour == bfd_target_elf_flavour) return xvec_get_elf_backend_data (target)->maxpagesize; - abort (); return 0; } @@ -1769,7 +1775,7 @@ DESCRIPTION emulation. RETURNS - Returns the common page size in bytes for ELF, abort otherwise. + Returns the common page size in bytes for ELF, 0 otherwise. */ bfd_vma @@ -1782,7 +1788,6 @@ bfd_emul_get_commonpagesize (const char *emul) && target->flavour == bfd_target_elf_flavour) return xvec_get_elf_backend_data (target)->commonpagesize; - abort (); return 0; } @@ -1854,7 +1859,7 @@ bfd_demangle (bfd *abfd, const char *name, int options) suf = strchr (name, '@'); if (suf != NULL) { - alloc = bfd_malloc (suf - name + 1); + alloc = (char *) bfd_malloc (suf - name + 1); if (alloc == NULL) return NULL; memcpy (alloc, name, suf - name); @@ -1872,7 +1877,7 @@ bfd_demangle (bfd *abfd, const char *name, int options) if (skip_lead) { size_t len = strlen (pre) + 1; - alloc = bfd_malloc (len); + alloc = (char *) bfd_malloc (len); if (alloc == NULL) return NULL; memcpy (alloc, pre, len); @@ -1892,7 +1897,7 @@ bfd_demangle (bfd *abfd, const char *name, int options) if (suf == NULL) suf = res + len; suf_len = strlen (suf) + 1; - final = bfd_malloc (pre_len + len + suf_len); + final = (char *) bfd_malloc (pre_len + len + suf_len); if (final != NULL) { memcpy (final, pre, pre_len); diff --git a/cegcc/src/binutils/bfd/bfd.m4 b/cegcc/src/binutils/bfd/bfd.m4 index 1d7d53a1f..55cc2bebb 100644 --- a/cegcc/src/binutils/bfd/bfd.m4 +++ b/cegcc/src/binutils/bfd/bfd.m4 @@ -20,7 +20,6 @@ AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE], AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1) ]) - dnl Check for existence of member $2 in type $1 in sys/procfs.h AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE_MEMBER], diff --git a/cegcc/src/binutils/bfd/bfdio.c b/cegcc/src/binutils/bfd/bfdio.c index 7cba51ff8..e428b165b 100644 --- a/cegcc/src/binutils/bfd/bfdio.c +++ b/cegcc/src/binutils/bfd/bfdio.c @@ -1,7 +1,7 @@ /* Low-level I/O routines for BFDs. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -102,13 +102,21 @@ real_fopen (const char *filename, const char *modes) } else { - /* Attribute found - rebuild modes. */ - size_t modes_len = vms_attr - modes; - - BFD_ASSERT (modes_len < sizeof (vms_modes)); - memcpy (vms_modes, modes, modes_len); - vms_modes[modes_len] = 0; - return close_on_exec (fopen (filename, vms_modes, vms_attr + 1)); + /* Attributes found. Split. */ + size_t modes_len = strlen (modes) + 1; + char attrs[modes_len + 1]; + char *at[3]; + int i; + + memcpy (attrs, modes, modes_len); + at[0] = attrs; + for (i = 0; i < 2; i++) + { + at[i + 1] = strchr (at[i], ','); + BFD_ASSERT (at[i + 1] != NULL); + *(at[i + 1]++) = 0; /* Replace ',' with a nul, and skip it. */ + } + return close_on_exec (fopen (filename, at[0], at[1], at[2])); } #else /* !VMS */ #if defined (HAVE_FOPEN64) @@ -150,6 +158,9 @@ DESCRIPTION . int (*bclose) (struct bfd *abfd); . int (*bflush) (struct bfd *abfd); . int (*bstat) (struct bfd *abfd, struct stat *sb); +. {* Just like mmap: (void*)-1 on failure, mmapped address on success. *} +. void *(*bmmap) (struct bfd *abfd, void *addr, bfd_size_type len, +. int prot, int flags, file_ptr offset); .}; */ @@ -176,7 +187,7 @@ bfd_bread (void *ptr, bfd_size_type size, bfd *abfd) struct bfd_in_memory *bim; bfd_size_type get; - bim = abfd->iostream; + bim = (struct bfd_in_memory *) abfd->iostream; get = size; if (abfd->where + get > bim->size) { @@ -208,7 +219,7 @@ bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd) if ((abfd->flags & BFD_IN_MEMORY) != 0) { - struct bfd_in_memory *bim = abfd->iostream; + struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream; size = (size_t) size; if (abfd->where + size > bim->size) @@ -221,12 +232,15 @@ bfd_bwrite (const void *ptr, bfd_size_type size, bfd *abfd) newsize = (bim->size + 127) & ~(bfd_size_type) 127; if (newsize > oldsize) { - bim->buffer = bfd_realloc_or_free (bim->buffer, newsize); + bim->buffer = (bfd_byte *) bfd_realloc_or_free (bim->buffer, + newsize); if (bim->buffer == NULL) { bim->size = 0; return 0; } + if (newsize > bim->size) + memset (bim->buffer + bim->size, 0, newsize - bim->size); } } memcpy (bim->buffer + abfd->where, ptr, (size_t) size); @@ -325,7 +339,7 @@ bfd_seek (bfd *abfd, file_ptr position, int direction) { struct bfd_in_memory *bim; - bim = abfd->iostream; + bim = (struct bfd_in_memory *) abfd->iostream; if (direction == SEEK_SET) abfd->where = position; @@ -334,8 +348,8 @@ bfd_seek (bfd *abfd, file_ptr position, int direction) if (abfd->where > bim->size) { - if ((abfd->direction == write_direction) || - (abfd->direction == both_direction)) + if (abfd->direction == write_direction + || abfd->direction == both_direction) { bfd_size_type newsize, oldsize; @@ -345,12 +359,14 @@ bfd_seek (bfd *abfd, file_ptr position, int direction) newsize = (bim->size + 127) & ~(bfd_size_type) 127; if (newsize > oldsize) { - bim->buffer = bfd_realloc_or_free (bim->buffer, newsize); + bim->buffer = (bfd_byte *) bfd_realloc_or_free (bim->buffer, + newsize); if (bim->buffer == NULL) { bim->size = 0; return -1; } + memset (bim->buffer + oldsize, 0, newsize - oldsize); } } else @@ -500,3 +516,31 @@ bfd_get_size (bfd *abfd) return buf.st_size; } + + +/* +FUNCTION + bfd_mmap + +SYNOPSIS + void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, + int prot, int flags, file_ptr offset); + +DESCRIPTION + Return mmap()ed region of the file, if possible and implemented. + +*/ + +void * +bfd_mmap (bfd *abfd, void *addr, bfd_size_type len, + int prot, int flags, file_ptr offset) +{ + void *ret = (void *)-1; + if ((abfd->flags & BFD_IN_MEMORY) != 0) + return ret; + + if (abfd->iovec == NULL) + return ret; + + return abfd->iovec->bmmap (abfd, addr, len, prot, flags, offset); +} diff --git a/cegcc/src/binutils/bfd/bfdwin.c b/cegcc/src/binutils/bfd/bfdwin.c index 3a35fc91c..63ad5ed3f 100644 --- a/cegcc/src/binutils/bfd/bfdwin.c +++ b/cegcc/src/binutils/bfd/bfdwin.c @@ -1,5 +1,5 @@ /* Support for memory-mapped windows into a BFD. - Copyright 1995, 1996, 2001, 2002, 2003, 2005, 2007, 2008 + Copyright 1995, 1996, 2001, 2002, 2003, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -78,7 +78,7 @@ bfd_free_window (bfd_window *windowp) i->refcount--; if (debug_windows) fprintf (stderr, "freeing window @%p<%p,%lx,%p>\n", - windowp, windowp->data, windowp->size, windowp->i); + windowp, windowp->data, (unsigned long) windowp->size, windowp->i); if (i->refcount != 0) return; diff --git a/cegcc/src/binutils/bfd/binary.c b/cegcc/src/binutils/bfd/binary.c index c4aec2ba6..d264a0920 100644 --- a/cegcc/src/binutils/bfd/binary.c +++ b/cegcc/src/binutils/bfd/binary.c @@ -1,6 +1,6 @@ /* BFD back-end for binary objects. Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support, This file is part of BFD, the Binary File Descriptor library. @@ -42,11 +42,6 @@ a start symbol, an end symbol, and an absolute length symbol. */ #define BIN_SYMS 3 -/* Set by external programs - specifies the BFD architecture and - machine number to be uses when creating binary BFDs. */ -enum bfd_architecture bfd_external_binary_architecture = bfd_arch_unknown; -unsigned long bfd_external_machine = 0; - /* Create a binary object. Invoked via bfd_set_format. */ static bfd_boolean @@ -92,14 +87,6 @@ binary_object_p (bfd *abfd) abfd->tdata.any = (void *) sec; - if (bfd_get_arch_info (abfd) != NULL) - { - if ((bfd_get_arch_info (abfd)->arch == bfd_arch_unknown) - && (bfd_external_binary_architecture != bfd_arch_unknown)) - bfd_set_arch_info (abfd, bfd_lookup_arch - (bfd_external_binary_architecture, bfd_external_machine)); - } - return abfd->xvec; } @@ -143,7 +130,7 @@ mangle_name (bfd *abfd, char *suffix) + strlen (suffix) + sizeof "_binary__"); - buf = bfd_alloc (abfd, size); + buf = (char *) bfd_alloc (abfd, size); if (buf == NULL) return ""; @@ -167,7 +154,7 @@ binary_canonicalize_symtab (bfd *abfd, asymbol **alocation) unsigned int i; bfd_size_type amt = BIN_SYMS * sizeof (asymbol); - syms = bfd_alloc (abfd, amt); + syms = (asymbol *) bfd_alloc (abfd, amt); if (syms == NULL) return -1; @@ -316,6 +303,7 @@ binary_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, #define binary_bfd_is_group_section bfd_generic_is_group_section #define binary_bfd_discard_group bfd_generic_discard_group #define binary_section_already_linked _bfd_generic_section_already_linked +#define binary_bfd_define_common_symbol bfd_generic_define_common_symbol #define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define binary_bfd_link_just_syms _bfd_generic_link_just_syms diff --git a/cegcc/src/binutils/bfd/bout.c b/cegcc/src/binutils/bfd/bout.c index b6c710631..f2721e87e 100644 --- a/cegcc/src/binutils/bfd/bout.c +++ b/cegcc/src/binutils/bfd/bout.c @@ -1,6 +1,6 @@ /* BFD back-end for Intel 960 b.out binaries. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -1145,6 +1145,10 @@ b_out_bfd_relax_section (bfd *abfd, arelent **reloc_vector = NULL; long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section); + if (link_info->relocatable) + (*link_info->callbacks->einfo) + (_("%P%F: --relax and -r may not be used together\n")); + if (reloc_size < 0) return FALSE; @@ -1389,6 +1393,7 @@ b_out_bfd_get_relocated_section_contents (bfd *output_bfd, #define b_out_bfd_is_group_section bfd_generic_is_group_section #define b_out_bfd_discard_group bfd_generic_discard_group #define b_out_section_already_linked _bfd_generic_section_already_linked +#define b_out_bfd_define_common_symbol bfd_generic_define_common_symbol #define aout_32_get_section_contents_in_window _bfd_generic_get_section_contents_in_window extern const bfd_target b_out_vec_little_host; diff --git a/cegcc/src/binutils/bfd/cache.c b/cegcc/src/binutils/bfd/cache.c index 50674e88b..cf1869d0e 100644 --- a/cegcc/src/binutils/bfd/cache.c +++ b/cegcc/src/binutils/bfd/cache.c @@ -1,7 +1,7 @@ /* BFD library -- caching of file descriptors. Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002, - 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com). @@ -46,6 +46,10 @@ SUBSECTION #include "libbfd.h" #include "libiberty.h" +#ifdef HAVE_MMAP +#include +#endif + /* In some cases we can optimize cache operation when reopening files. For instance, a flush is entirely unnecessary if the file is already closed, so a flush would use CACHE_NO_OPEN. Similarly, a seek using @@ -236,7 +240,7 @@ cache_btell (struct bfd *abfd) static int cache_bseek (struct bfd *abfd, file_ptr offset, int whence) { - FILE *f = bfd_cache_lookup (abfd, whence != SEEK_CUR ? CACHE_NO_SEEK : 0); + FILE *f = bfd_cache_lookup (abfd, whence != SEEK_CUR ? CACHE_NO_SEEK : CACHE_NORMAL); if (f == NULL) return -1; return real_fseek (f, offset, whence); @@ -266,7 +270,7 @@ cache_bread_1 (struct bfd *abfd, void *buf, file_ptr nbytes) if (nbytes == 0) return 0; - f = bfd_cache_lookup (abfd, 0); + f = bfd_cache_lookup (abfd, CACHE_NORMAL); if (f == NULL) return 0; @@ -341,7 +345,7 @@ static file_ptr cache_bwrite (struct bfd *abfd, const void *where, file_ptr nbytes) { file_ptr nwrite; - FILE *f = bfd_cache_lookup (abfd, 0); + FILE *f = bfd_cache_lookup (abfd, CACHE_NORMAL); if (f == NULL) return 0; @@ -388,10 +392,38 @@ cache_bstat (struct bfd *abfd, struct stat *sb) return sts; } +static void * +cache_bmmap (struct bfd *abfd ATTRIBUTE_UNUSED, + void *addr ATTRIBUTE_UNUSED, + bfd_size_type len ATTRIBUTE_UNUSED, + int prot ATTRIBUTE_UNUSED, + int flags ATTRIBUTE_UNUSED, + file_ptr offset ATTRIBUTE_UNUSED) +{ + void *ret = (void *) -1; + + if ((abfd->flags & BFD_IN_MEMORY) != 0) + abort (); +#ifdef HAVE_MMAP + else + { + FILE *f = bfd_cache_lookup (abfd, CACHE_NO_SEEK_ERROR); + if (f == NULL) + return ret; + + ret = mmap (addr, len, prot, flags, fileno (f), offset); + if (ret == (void *) -1) + bfd_set_error (bfd_error_system_call); + } +#endif + + return ret; +} + static const struct bfd_iovec cache_iovec = { &cache_bread, &cache_bwrite, &cache_btell, &cache_bseek, - &cache_bclose, &cache_bflush, &cache_bstat + &cache_bclose, &cache_bflush, &cache_bstat, &cache_bmmap }; /* diff --git a/cegcc/src/binutils/bfd/cf-i386lynx.c b/cegcc/src/binutils/bfd/cf-i386lynx.c index 46951ab39..5fc268949 100644 --- a/cegcc/src/binutils/bfd/cf-i386lynx.c +++ b/cegcc/src/binutils/bfd/cf-i386lynx.c @@ -1,5 +1,6 @@ /* BFD back-end for Intel 386 COFF LynxOS files. - Copyright 1993, 1994, 1995, 2007, 2008 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 2005, 2007, 2008 + Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cf-sparclynx.c b/cegcc/src/binutils/bfd/cf-sparclynx.c index a7ac6e563..a97916012 100644 --- a/cegcc/src/binutils/bfd/cf-sparclynx.c +++ b/cegcc/src/binutils/bfd/cf-sparclynx.c @@ -1,5 +1,5 @@ /* BFD back-end for Sparc COFF LynxOS files. - Copyright 1993, 1994, 2007 Free Software Foundation, Inc. + Copyright 1993, 1994, 2005, 2007 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cisco-core.c b/cegcc/src/binutils/bfd/cisco-core.c index 65c6da48c..9169ed51f 100644 --- a/cegcc/src/binutils/bfd/cisco-core.c +++ b/cegcc/src/binutils/bfd/cisco-core.c @@ -1,5 +1,5 @@ /* BFD back-end for CISCO crash dumps. - Copyright 1994, 1997, 1999, 2000, 2001, 2002, 2004, 2006, 2007 + Copyright 1994, 1997, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/coff-alpha.c b/cegcc/src/binutils/bfd/coff-alpha.c index 98bed8437..0d67264cf 100644 --- a/cegcc/src/binutils/bfd/coff-alpha.c +++ b/cegcc/src/binutils/bfd/coff-alpha.c @@ -1,6 +1,6 @@ /* BFD back-end for ALPHA Extended-Coff files. Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. + 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Modified from coff-mips.c by Steve Chamberlain and Ian Lance Taylor . @@ -2120,6 +2120,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos) bfd_byte *buf, *p; struct bfd_in_memory *bim; + buf = NULL; nbfd = _bfd_get_elt_at_filepos (archive, filepos); if (nbfd == NULL) goto error_return; @@ -2151,16 +2152,14 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos) goto error_return; size = H_GET_64 (nbfd, ab); - if (size == 0) - buf = NULL; - else + if (size != 0) { bfd_size_type left; bfd_byte dict[4096]; unsigned int h; bfd_byte b; - buf = (bfd_byte *) bfd_alloc (nbfd, size); + buf = (bfd_byte *) bfd_malloc (size); if (buf == NULL) goto error_return; p = buf; @@ -2214,7 +2213,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos) /* Now the uncompressed file contents are in buf. */ bim = ((struct bfd_in_memory *) - bfd_alloc (nbfd, (bfd_size_type) sizeof (struct bfd_in_memory))); + bfd_malloc ((bfd_size_type) sizeof (struct bfd_in_memory))); if (bim == NULL) goto error_return; bim->size = size; @@ -2230,6 +2229,8 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos) return nbfd; error_return: + if (buf != NULL) + free (buf); if (nbfd != NULL) bfd_close (nbfd); return NULL; @@ -2297,7 +2298,8 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data = (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */ alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out, alpha_ecoff_swap_scnhdr_out, - FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, FALSE, 4, FALSE, 2, + FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, + ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in, alpha_ecoff_swap_scnhdr_in, NULL, alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, @@ -2397,6 +2399,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data = #define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group #define _bfd_ecoff_section_already_linked \ _bfd_generic_section_already_linked +#define _bfd_ecoff_bfd_define_common_symbol bfd_generic_define_common_symbol const bfd_target ecoffalpha_little_vec = { diff --git a/cegcc/src/binutils/bfd/coff-apollo.c b/cegcc/src/binutils/bfd/coff-apollo.c index 4272ba663..e17709929 100644 --- a/cegcc/src/binutils/bfd/coff-apollo.c +++ b/cegcc/src/binutils/bfd/coff-apollo.c @@ -1,6 +1,6 @@ /* BFD back-end for Apollo 68000 COFF binaries. Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001, 2002, 2003, - 2007, 2008 Free Software Foundation, Inc. + 2005, 2007, 2008 Free Software Foundation, Inc. By Troy Rollo (troy@cbme.unsw.edu.au) Based on m68k standard COFF version Written by Cygnus Support. diff --git a/cegcc/src/binutils/bfd/coff-arm.c b/cegcc/src/binutils/bfd/coff-arm.c index d2c27c43a..422c53ea0 100644 --- a/cegcc/src/binutils/bfd/coff-arm.c +++ b/cegcc/src/binutils/bfd/coff-arm.c @@ -1,6 +1,6 @@ /* BFD back-end for ARM COFF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -1332,8 +1332,8 @@ coff_arm_relocate_section (bfd *output_bfd, if (howto->type == ARM_26) { - if ( h->class == C_THUMBSTATFUNC - || h->class == C_THUMBEXTFUNC) + if ( h->symbol_class == C_THUMBSTATFUNC + || h->symbol_class == C_THUMBEXTFUNC) { /* Arm code calling a Thumb function. */ unsigned long int tmp; @@ -1419,9 +1419,9 @@ coff_arm_relocate_section (bfd *output_bfd, /* Note: We used to check for ARM_THUMB9 and ARM_THUMB12. */ else if (howto->type == ARM_THUMB23) { - if ( h->class == C_EXT - || h->class == C_STAT - || h->class == C_LABEL) + if ( h->symbol_class == C_EXT + || h->symbol_class == C_STAT + || h->symbol_class == C_LABEL) { /* Thumb code calling an ARM function. */ asection * s = 0; @@ -1721,8 +1721,8 @@ coff_arm_relocate_section (bfd *output_bfd, int patchit = FALSE; if (h != NULL - && ( h->class == C_THUMBSTATFUNC - || h->class == C_THUMBEXTFUNC)) + && ( h->symbol_class == C_THUMBSTATFUNC + || h->symbol_class == C_THUMBEXTFUNC)) { patchit = TRUE; } @@ -1932,7 +1932,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info, /* If we mark it 'thumb', the disassembler will do a better job. */ myh = (struct coff_link_hash_entry *) bh; - myh->class = C_THUMBEXTFUNC; + myh->symbol_class = C_THUMBEXTFUNC; free (tmp_name); @@ -2096,7 +2096,7 @@ bfd_arm_process_before_allocation (bfd * abfd, the target of the call. If it is a thumb target, we insert glue. */ - if (h->class == C_THUMBEXTFUNC) + if (h->symbol_class == C_THUMBEXTFUNC) record_arm_to_thumb_glue (info, h); break; @@ -2110,7 +2110,7 @@ bfd_arm_process_before_allocation (bfd * abfd, for it. This is not really a problem, since the link is doomed anyway. */ - switch (h->class) + switch (h->symbol_class) { case C_EXT: case C_STAT: @@ -2208,7 +2208,7 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd) { _bfd_error_handler /* xgettext: c-format */ - (_("ERROR: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"), + (_("error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"), ibfd, obfd, APCS_26_FLAG (ibfd) ? 26 : 32, APCS_26_FLAG (obfd) ? 26 : 32 @@ -2224,10 +2224,10 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd) if (APCS_FLOAT_FLAG (ibfd)) /* xgettext: c-format */ - msg = _("ERROR: %B passes floats in float registers, whereas %B passes them in integer registers"); + msg = _("error: %B passes floats in float registers, whereas %B passes them in integer registers"); else /* xgettext: c-format */ - msg = _("ERROR: %B passes floats in integer registers, whereas %B passes them in float registers"); + msg = _("error: %B passes floats in integer registers, whereas %B passes them in float registers"); _bfd_error_handler (msg, ibfd, obfd); @@ -2241,10 +2241,10 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd) if (PIC_FLAG (ibfd)) /* xgettext: c-format */ - msg = _("ERROR: %B is compiled as position independent code, whereas target %B is absolute position"); + msg = _("error: %B is compiled as position independent code, whereas target %B is absolute position"); else /* xgettext: c-format */ - msg = _("ERROR: %B is compiled as absolute position code, whereas target %B is position independent"); + msg = _("error: %B is compiled as absolute position code, whereas target %B is position independent"); _bfd_error_handler (msg, ibfd, obfd); bfd_set_error (bfd_error_wrong_format); diff --git a/cegcc/src/binutils/bfd/coff-aux.c b/cegcc/src/binutils/bfd/coff-aux.c index 2101dd348..af1db0383 100644 --- a/cegcc/src/binutils/bfd/coff-aux.c +++ b/cegcc/src/binutils/bfd/coff-aux.c @@ -1,5 +1,5 @@ /* BFD back-end for Apple M68K COFF A/UX 3.x files. - Copyright 1996, 1997, 2000, 2002, 2007, 2008 + Copyright 1996, 1997, 2000, 2002, 2005, 2007, 2008 Free Software Foundation, Inc. Written by Richard Henderson . diff --git a/cegcc/src/binutils/bfd/coff-go32.c b/cegcc/src/binutils/bfd/coff-go32.c index 5ea78eb65..7c09b3a8f 100644 --- a/cegcc/src/binutils/bfd/coff-go32.c +++ b/cegcc/src/binutils/bfd/coff-go32.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 COFF files (DJGPP variant). - Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001, 2007 + Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001, 2005, 2007 Free Software Foundation, Inc. Written by DJ Delorie. diff --git a/cegcc/src/binutils/bfd/coff-i386.c b/cegcc/src/binutils/bfd/coff-i386.c index 30c81885d..9a763d5d5 100644 --- a/cegcc/src/binutils/bfd/coff-i386.c +++ b/cegcc/src/binutils/bfd/coff-i386.c @@ -1,6 +1,6 @@ /* BFD back-end for Intel 386 COFF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/cegcc/src/binutils/bfd/coff-i960.c b/cegcc/src/binutils/bfd/coff-i960.c index dc74a390c..d0374d278 100644 --- a/cegcc/src/binutils/bfd/coff-i960.c +++ b/cegcc/src/binutils/bfd/coff-i960.c @@ -1,6 +1,6 @@ /* BFD back-end for Intel 960 COFF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, - 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -488,14 +488,14 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section, if (howto->type == R_OPTCALL && ! info->relocatable && symndx != -1) { - int class; + int class_val; if (h != NULL) - class = h->class; + class_val = h->symbol_class; else - class = sym->n_sclass; + class_val = sym->n_sclass; - switch (class) + switch (class_val) { case C_NULL: /* This symbol is apparently not from a COFF input file. diff --git a/cegcc/src/binutils/bfd/coff-ia64.c b/cegcc/src/binutils/bfd/coff-ia64.c index 0037c2f69..38d9ac640 100644 --- a/cegcc/src/binutils/bfd/coff-ia64.c +++ b/cegcc/src/binutils/bfd/coff-ia64.c @@ -1,5 +1,5 @@ /* BFD back-end for HP/Intel IA-64 COFF files. - Copyright 1999, 2000, 2001, 2002, 2007, 2008 + Copyright 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by David Mosberger @@ -29,9 +29,9 @@ #include "libcoff.h" #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2) -/* The page size is a guess based on ELF. */ -#define COFF_PAGE_SIZE 0x1000 +/* Windows ia64 uses 8K page size. */ +#define COFF_PAGE_SIZE 0x2000 static reloc_howto_type howto_table[] = { diff --git a/cegcc/src/binutils/bfd/coff-m88k.c b/cegcc/src/binutils/bfd/coff-m88k.c index dd7704d6b..3855b5297 100644 --- a/cegcc/src/binutils/bfd/coff-m88k.c +++ b/cegcc/src/binutils/bfd/coff-m88k.c @@ -1,6 +1,6 @@ /* BFD back-end for Motorola 88000 COFF "Binary Compatibility Standard" files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2007, 2008 Free Software Foundation, Inc. + 2001, 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/coff-maxq.c b/cegcc/src/binutils/bfd/coff-maxq.c index 165d7c86a..94d5237d4 100644 --- a/cegcc/src/binutils/bfd/coff-maxq.c +++ b/cegcc/src/binutils/bfd/coff-maxq.c @@ -1,5 +1,5 @@ /* BFD back-end for MAXQ COFF binaries. - Copyright 2004, 2007, 2008 Free Software Foundation, Inc. + Copyright 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Vineet Sharma (vineets@noida.hcltech.com) Inderpreet S. (inderpreetb@noida.hcltech.com) diff --git a/cegcc/src/binutils/bfd/coff-mips.c b/cegcc/src/binutils/bfd/coff-mips.c index 929b3c169..34fda3ae3 100644 --- a/cegcc/src/binutils/bfd/coff-mips.c +++ b/cegcc/src/binutils/bfd/coff-mips.c @@ -1,6 +1,6 @@ /* BFD back-end for MIPS Extended-Coff files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Original version by Per Bothner. Full support added by Ian Lance Taylor, ian@cygnus.com. @@ -1312,7 +1312,8 @@ static const struct ecoff_backend_data mips_ecoff_backend_data = (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */ mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out, mips_ecoff_swap_scnhdr_out, - FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, FALSE, 4, FALSE, 2, + FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, + ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in, mips_ecoff_swap_scnhdr_in, NULL, mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, @@ -1416,6 +1417,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data = #define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group #define _bfd_ecoff_section_already_linked \ _bfd_generic_section_already_linked +#define _bfd_ecoff_bfd_define_common_symbol bfd_generic_define_common_symbol extern const bfd_target ecoff_big_vec; diff --git a/cegcc/src/binutils/bfd/coff-or32.c b/cegcc/src/binutils/bfd/coff-or32.c index 9f57eb06e..30801fba6 100644 --- a/cegcc/src/binutils/bfd/coff-or32.c +++ b/cegcc/src/binutils/bfd/coff-or32.c @@ -1,5 +1,5 @@ /* BFD back-end for OpenRISC 1000 COFF binaries. - Copyright 2002, 2003, 2004, 2005, 2007, 2008 + Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Ivan Guzvinec diff --git a/cegcc/src/binutils/bfd/coff-pmac.c b/cegcc/src/binutils/bfd/coff-pmac.c index ea0fbe5d0..2c548b503 100644 --- a/cegcc/src/binutils/bfd/coff-pmac.c +++ b/cegcc/src/binutils/bfd/coff-pmac.c @@ -1,5 +1,5 @@ /* BFD back-end for Apple et al PowerPC Mac "XCOFF" files. - Copyright 1995, 2000, 2001, 2007 Free Software Foundation, Inc. + Copyright 1995, 2000, 2001, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/coff-rs6000.c b/cegcc/src/binutils/bfd/coff-rs6000.c index 17c6907a3..e8d54841a 100644 --- a/cegcc/src/binutils/bfd/coff-rs6000.c +++ b/cegcc/src/binutils/bfd/coff-rs6000.c @@ -1,6 +1,6 @@ /* BFD back-end for IBM RS/6000 "XCOFF" files. Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008 Free Software Foundation, Inc. + 2008, 2009 Free Software Foundation, Inc. Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore. Archive support from Damon A. Permezel. Contributed by IBM Corporation and Cygnus Support. @@ -180,8 +180,6 @@ static bfd_boolean do_pad PARAMS ((bfd *, unsigned int)); static bfd_boolean do_copy PARAMS ((bfd *, bfd *)); -static bfd_boolean do_shared_object_padding - PARAMS ((bfd *, bfd *, file_ptr *, int)); /* Relocation functions */ static bfd_boolean xcoff_reloc_type_br @@ -238,6 +236,119 @@ bfd_boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW]) xcoff_complain_overflow_unsigned_func, }; +/* Information about one member of an archive. */ +struct member_layout { + /* The archive member that this structure describes. */ + bfd *member; + + /* The number of bytes of padding that must be inserted before the + start of the member in order to ensure that the section contents + are correctly aligned. */ + unsigned int leading_padding; + + /* The offset of MEMBER from the start of the archive (i.e. the end + of the leading padding). */ + file_ptr offset; + + /* The normalized name of MEMBER. */ + const char *name; + + /* The length of NAME, without padding. */ + bfd_size_type namlen; + + /* The length of NAME, with padding. */ + bfd_size_type padded_namlen; + + /* The size of MEMBER's header, including the name and magic sequence. */ + bfd_size_type header_size; + + /* The size of the MEMBER's contents. */ + bfd_size_type contents_size; + + /* The number of bytes of padding that must be inserted after MEMBER + in order to preserve even alignment. */ + bfd_size_type trailing_padding; +}; + +/* A structure used for iterating over the members of an archive. */ +struct archive_iterator { + /* The archive itself. */ + bfd *archive; + + /* Information about the current archive member. */ + struct member_layout current; + + /* Information about the next archive member. MEMBER is null if there + are no more archive members, in which case OFFSET is the offset of + the first unused byte. */ + struct member_layout next; +}; + +/* Initialize INFO so that it describes member MEMBER of archive ARCHIVE. + OFFSET is the even-padded offset of MEMBER, not including any leading + padding needed for section alignment. */ + +static void +member_layout_init (struct member_layout *info, bfd *archive, + bfd *member, file_ptr offset) +{ + info->member = member; + info->leading_padding = 0; + if (member) + { + info->name = normalize_filename (member); + info->namlen = strlen (info->name); + info->padded_namlen = info->namlen + (info->namlen & 1); + if (xcoff_big_format_p (archive)) + info->header_size = SIZEOF_AR_HDR_BIG; + else + info->header_size = SIZEOF_AR_HDR; + info->header_size += info->padded_namlen + SXCOFFARFMAG; + info->contents_size = arelt_size (member); + info->trailing_padding = info->contents_size & 1; + + if (bfd_check_format (member, bfd_object) + && bfd_get_flavour (member) == bfd_target_xcoff_flavour + && (member->flags & DYNAMIC) != 0) + info->leading_padding + = (-(offset + info->header_size) + & ((1 << bfd_xcoff_text_align_power (member)) - 1)); + } + info->offset = offset + info->leading_padding; +} + +/* Set up ITERATOR to iterate through archive ARCHIVE. */ + +static void +archive_iterator_begin (struct archive_iterator *iterator, + bfd *archive) +{ + iterator->archive = archive; + member_layout_init (&iterator->next, archive, archive->archive_head, + xcoff_big_format_p (archive) + ? SIZEOF_AR_FILE_HDR_BIG + : SIZEOF_AR_FILE_HDR); +} + +/* Make ITERATOR visit the first unvisited archive member. Return true + on success; return false if all members have been visited. */ + +static bfd_boolean +archive_iterator_next (struct archive_iterator *iterator) +{ + if (!iterator->next.member) + return FALSE; + + iterator->current = iterator->next; + member_layout_init (&iterator->next, iterator->archive, + iterator->current.member->archive_next, + iterator->current.offset + + iterator->current.header_size + + iterator->current.contents_size + + iterator->current.trailing_padding); + return TRUE; +} + /* We use our own tdata type. Its first field is the COFF tdata type, so the COFF routines are compatible. */ @@ -384,11 +495,11 @@ _bfd_xcoff_swap_sym_out (abfd, inp, extp) } void -_bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) +_bfd_xcoff_swap_aux_in (abfd, ext1, type, in_class, indx, numaux, in1) bfd *abfd; PTR ext1; int type; - int class; + int in_class; int indx; int numaux; PTR in1; @@ -396,7 +507,7 @@ _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) AUXENT * ext = (AUXENT *)ext1; union internal_auxent *in = (union internal_auxent *)in1; - switch (class) + switch (in_class) { case C_FILE: if (ext->x_file.x_fname[0] == 0) @@ -422,6 +533,7 @@ _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) /* RS/6000 "csect" auxents */ case C_EXT: + case C_AIX_WEAKEXT: case C_HIDEXT: if (indx + 1 == numaux) { @@ -461,7 +573,8 @@ _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx); in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { in->x_sym.x_fcnary.x_fcn.x_lnnoptr = H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); @@ -502,11 +615,11 @@ unsigned int _bfd_xcoff_swap_aux_out PARAMS ((bfd *, PTR, int, int, int, int, PTR)); unsigned int -_bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) +_bfd_xcoff_swap_aux_out (abfd, inp, type, in_class, indx, numaux, extp) bfd * abfd; PTR inp; int type; - int class; + int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp; @@ -515,7 +628,7 @@ _bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) AUXENT *ext = (AUXENT *)extp; memset ((PTR)ext, 0, bfd_coff_auxesz (abfd)); - switch (class) + switch (in_class) { case C_FILE: if (in->x_file.x_fname[0] == 0) @@ -531,6 +644,7 @@ _bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) /* RS/6000 "csect" auxents */ case C_EXT: + case C_AIX_WEAKEXT: case C_HIDEXT: if (indx + 1 == numaux) { @@ -564,7 +678,8 @@ _bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx); H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); @@ -1601,11 +1716,10 @@ xcoff_write_armap_old (abfd, elength, map, orl_count, stridx) unsigned int orl_count; int stridx; { + struct archive_iterator iterator; struct xcoff_ar_hdr hdr; char *p; unsigned char buf[4]; - bfd *sub; - file_ptr fileoff; unsigned int i; memset (&hdr, 0, sizeof hdr); @@ -1633,29 +1747,16 @@ xcoff_write_armap_old (abfd, elength, map, orl_count, stridx) if (bfd_bwrite (buf, (bfd_size_type) 4, abfd) != 4) return FALSE; - sub = abfd->archive_head; - fileoff = SIZEOF_AR_FILE_HDR; i = 0; - while (sub != NULL && i < orl_count) - { - size_t namlen; - - while (map[i].u.abfd == sub) - { - H_PUT_32 (abfd, fileoff, buf); - if (bfd_bwrite (buf, (bfd_size_type) 4, abfd) != 4) - return FALSE; - ++i; - } - namlen = strlen (normalize_filename (sub)); - namlen = (namlen + 1) &~ (size_t) 1; - fileoff += (SIZEOF_AR_HDR - + namlen - + SXCOFFARFMAG - + arelt_size (sub)); - fileoff = (fileoff + 1) &~ 1; - sub = sub->archive_next; - } + archive_iterator_begin (&iterator, abfd); + while (i < orl_count && archive_iterator_next (&iterator)) + while (map[i].u.abfd == iterator.current.member) + { + H_PUT_32 (abfd, iterator.current.offset, buf); + if (bfd_bwrite (buf, (bfd_size_type) 4, abfd) != 4) + return FALSE; + ++i; + } for (i = 0; i < orl_count; i++) { @@ -1757,34 +1858,6 @@ do_copy (out_bfd, in_bfd) } static bfd_boolean -do_shared_object_padding (out_bfd, in_bfd, offset, ar_header_size) - bfd *out_bfd; - bfd *in_bfd; - file_ptr *offset; - int ar_header_size; -{ - if (bfd_check_format (in_bfd, bfd_object) - && bfd_get_flavour (in_bfd) == bfd_target_xcoff_flavour - && (in_bfd->flags & DYNAMIC) != 0) - { - bfd_size_type pad = 0; - int text_align_power; - - text_align_power = bfd_xcoff_text_align_power (in_bfd); - - pad = 1 << text_align_power; - pad -= (*offset + ar_header_size) & (pad - 1); - - if (! do_pad (out_bfd, pad)) - return FALSE; - - *offset += pad; - } - - return TRUE; -} - -static bfd_boolean xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) bfd *abfd; unsigned int elength ATTRIBUTE_UNUSED; @@ -1792,9 +1865,10 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) unsigned int orl_count; int stridx; { + struct archive_iterator iterator; struct xcoff_ar_file_hdr_big *fhdr; bfd_vma i, sym_32, sym_64, str_32, str_64; - const bfd_arch_info_type *arch_info = NULL; + const bfd_arch_info_type *arch_info; bfd *current_bfd; size_t string_length; file_ptr nextoff, prevoff; @@ -1803,16 +1877,15 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) from 32-bit objects and which from 64-bit ones. */ sym_32 = sym_64 = str_32 = str_64 = 0; - current_bfd = abfd->archive_head; - if (current_bfd != NULL) - arch_info = bfd_get_arch_info (current_bfd); - i = 0; - while (current_bfd != NULL && i < orl_count) + i = 0; + for (current_bfd = abfd->archive_head; + current_bfd != NULL && i < orl_count; + current_bfd = current_bfd->archive_next) { + arch_info = bfd_get_arch_info (current_bfd); while (map[i].u.abfd == current_bfd) { string_length = strlen (*map[i].name) + 1; - if (arch_info->bits_per_address == 64) { sym_64++; @@ -1825,9 +1898,6 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) } i++; } - current_bfd = current_bfd->archive_next; - if (current_bfd != NULL) - arch_info = bfd_get_arch_info (current_bfd); } /* A quick sanity check... */ @@ -1869,7 +1939,6 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) struct xcoff_ar_hdr_big *hdr; char *symbol_table; char *st; - file_ptr fileoff; bfd_vma symbol_table_size = SIZEOF_AR_HDR_BIG @@ -1906,41 +1975,29 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) st += 8; /* loop over the 32 bit offsets */ - current_bfd = abfd->archive_head; - if (current_bfd != NULL) - arch_info = bfd_get_arch_info (current_bfd); - fileoff = SIZEOF_AR_FILE_HDR_BIG; i = 0; - while (current_bfd != NULL && i < orl_count) + archive_iterator_begin (&iterator, abfd); + while (i < orl_count && archive_iterator_next (&iterator)) { - while (map[i].u.abfd == current_bfd) + arch_info = bfd_get_arch_info (iterator.current.member); + while (map[i].u.abfd == iterator.current.member) { if (arch_info->bits_per_address == 32) { - bfd_h_put_64 (abfd, fileoff, st); + bfd_h_put_64 (abfd, iterator.current.offset, st); st += 8; } i++; } - string_length = strlen (normalize_filename (current_bfd)); - string_length += string_length & 1; - fileoff += (SIZEOF_AR_HDR_BIG - + string_length - + SXCOFFARFMAG - + arelt_size (current_bfd)); - fileoff += fileoff & 1; - current_bfd = current_bfd->archive_next; - if (current_bfd != NULL) - arch_info = bfd_get_arch_info (current_bfd); } /* loop over the 32 bit symbol names */ - current_bfd = abfd->archive_head; - if (current_bfd != NULL) - arch_info = bfd_get_arch_info (current_bfd); i = 0; - while (current_bfd != NULL && i < orl_count) + for (current_bfd = abfd->archive_head; + current_bfd != NULL && i < orl_count; + current_bfd = current_bfd->archive_next) { + arch_info = bfd_get_arch_info (current_bfd); while (map[i].u.abfd == current_bfd) { if (arch_info->bits_per_address == 32) @@ -1950,9 +2007,6 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) } i++; } - current_bfd = current_bfd->archive_next; - if (current_bfd != NULL) - arch_info = bfd_get_arch_info (current_bfd); } bfd_bwrite (symbol_table, symbol_table_size, abfd); @@ -1970,7 +2024,6 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) struct xcoff_ar_hdr_big *hdr; char *symbol_table; char *st; - file_ptr fileoff; bfd_vma symbol_table_size = SIZEOF_AR_HDR_BIG @@ -2002,41 +2055,29 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) st += 8; /* loop over the 64 bit offsets */ - current_bfd = abfd->archive_head; - if (current_bfd != NULL) - arch_info = bfd_get_arch_info (current_bfd); - fileoff = SIZEOF_AR_FILE_HDR_BIG; i = 0; - while (current_bfd != NULL && i < orl_count) + archive_iterator_begin (&iterator, abfd); + while (i < orl_count && archive_iterator_next (&iterator)) { - while (map[i].u.abfd == current_bfd) + arch_info = bfd_get_arch_info (iterator.current.member); + while (map[i].u.abfd == iterator.current.member) { if (arch_info->bits_per_address == 64) { - bfd_h_put_64 (abfd, fileoff, st); + bfd_h_put_64 (abfd, iterator.current.offset, st); st += 8; } i++; } - string_length = strlen (normalize_filename (current_bfd)); - string_length += string_length & 1; - fileoff += (SIZEOF_AR_HDR_BIG - + string_length - + SXCOFFARFMAG - + arelt_size (current_bfd)); - fileoff += fileoff & 1; - current_bfd = current_bfd->archive_next; - if (current_bfd != NULL) - arch_info = bfd_get_arch_info (current_bfd); } /* loop over the 64 bit symbol names */ - current_bfd = abfd->archive_head; - if (current_bfd != NULL) - arch_info = bfd_get_arch_info (current_bfd); i = 0; - while (current_bfd != NULL && i < orl_count) + for (current_bfd = abfd->archive_head; + current_bfd != NULL && i < orl_count; + current_bfd = current_bfd->archive_next) { + arch_info = bfd_get_arch_info (current_bfd); while (map[i].u.abfd == current_bfd) { if (arch_info->bits_per_address == 64) @@ -2046,9 +2087,6 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx) } i++; } - current_bfd = current_bfd->archive_next; - if (current_bfd != NULL) - arch_info = bfd_get_arch_info (current_bfd); } bfd_bwrite (symbol_table, symbol_table_size, abfd); @@ -2084,6 +2122,7 @@ static bfd_boolean xcoff_write_archive_contents_old (abfd) bfd *abfd; { + struct archive_iterator iterator; struct xcoff_ar_file_hdr fhdr; bfd_size_type count; bfd_size_type total_namlen; @@ -2109,118 +2148,92 @@ xcoff_write_archive_contents_old (abfd) { ++count; total_namlen += strlen (normalize_filename (sub)) + 1; - } - offsets = (file_ptr *) bfd_alloc (abfd, count * sizeof (file_ptr)); - if (offsets == NULL) - return FALSE; - - if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR, SEEK_SET) != 0) - return FALSE; - - makemap = bfd_has_map (abfd); - hasobjects = FALSE; - prevoff = 0; - nextoff = SIZEOF_AR_FILE_HDR; - for (sub = abfd->archive_head, i = 0; - sub != NULL; - sub = sub->archive_next, i++) - { - const char *name; - bfd_size_type namlen; - struct xcoff_ar_hdr *ahdrp; - bfd_size_type remaining; - - if (makemap && ! hasobjects) + if (sub->arelt_data == NULL) { - if (bfd_check_format (sub, bfd_object)) - hasobjects = TRUE; + sub->arelt_data = bfd_zalloc (sub, sizeof (struct areltdata)); + if (sub->arelt_data == NULL) + return FALSE; } - - name = normalize_filename (sub); - namlen = strlen (name); - - if (sub->arelt_data != NULL) - ahdrp = arch_xhdr (sub); - else - ahdrp = NULL; - - if (ahdrp == NULL) + if (arch_xhdr (sub) == NULL) { + struct xcoff_ar_hdr *ahdrp; struct stat s; - memset (&ahdr, 0, sizeof ahdr); - ahdrp = &ahdr; if (stat (bfd_get_filename (sub), &s) != 0) { bfd_set_error (bfd_error_system_call); return FALSE; } + ahdrp = bfd_zalloc (sub, sizeof (*ahdrp)); + if (ahdrp == NULL) + return FALSE; + sprintf (ahdrp->size, "%ld", (long) s.st_size); sprintf (ahdrp->date, "%ld", (long) s.st_mtime); sprintf (ahdrp->uid, "%ld", (long) s.st_uid); sprintf (ahdrp->gid, "%ld", (long) s.st_gid); sprintf (ahdrp->mode, "%o", (unsigned int) s.st_mode); - if (sub->arelt_data == NULL) - { - size = sizeof (struct areltdata); - sub->arelt_data = bfd_alloc (sub, size); - if (sub->arelt_data == NULL) - return FALSE; - } - + arch_eltdata (sub)->arch_header = (char *) ahdrp; arch_eltdata (sub)->parsed_size = s.st_size; } + } + offsets = (file_ptr *) bfd_alloc (abfd, count * sizeof (file_ptr)); + if (offsets == NULL) + return FALSE; - sprintf (ahdrp->prevoff, "%ld", (long) prevoff); - sprintf (ahdrp->namlen, "%ld", (long) namlen); - - /* If the length of the name is odd, we write out the null byte - after the name as well. */ - namlen = (namlen + 1) &~ (bfd_size_type) 1; - - remaining = arelt_size (sub); - size = (SIZEOF_AR_HDR - + namlen - + SXCOFFARFMAG - + remaining); - - BFD_ASSERT (nextoff == bfd_tell (abfd)); + if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR, SEEK_SET) != 0) + return FALSE; - offsets[i] = nextoff; + makemap = bfd_has_map (abfd); + hasobjects = FALSE; + prevoff = 0; + for (archive_iterator_begin (&iterator, abfd), i = 0; + archive_iterator_next (&iterator); + i++) + { + bfd_size_type namlen; + struct xcoff_ar_hdr *ahdrp; - prevoff = nextoff; - nextoff += size + (size & 1); + if (makemap && ! hasobjects) + { + if (bfd_check_format (iterator.current.member, bfd_object)) + hasobjects = TRUE; + } - sprintf (ahdrp->nextoff, "%ld", (long) nextoff); + ahdrp = arch_xhdr (iterator.current.member); + sprintf (ahdrp->prevoff, "%ld", (long) prevoff); + sprintf (ahdrp->namlen, "%ld", (long) iterator.current.namlen); + sprintf (ahdrp->nextoff, "%ld", (long) iterator.next.offset); /* We need spaces, not null bytes, in the header. */ for (p = (char *) ahdrp; p < (char *) ahdrp + SIZEOF_AR_HDR; p++) if (*p == '\0') *p = ' '; - if ((bfd_bwrite ((PTR) ahdrp, (bfd_size_type) SIZEOF_AR_HDR, abfd) - != SIZEOF_AR_HDR) - || bfd_bwrite ((PTR) name, namlen, abfd) != namlen - || bfd_bwrite ((PTR) XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, - abfd) != SXCOFFARFMAG) + if (!do_pad (abfd, iterator.current.leading_padding)) return FALSE; - if (bfd_seek (sub, (file_ptr) 0, SEEK_SET) != 0) + BFD_ASSERT (iterator.current.offset == bfd_tell (abfd)); + namlen = iterator.current.padded_namlen; + if (bfd_bwrite (ahdrp, SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR + || bfd_bwrite (iterator.current.name, namlen, abfd) != namlen + || bfd_bwrite (XCOFFARFMAG, SXCOFFARFMAG, abfd) != SXCOFFARFMAG + || bfd_seek (iterator.current.member, 0, SEEK_SET) != 0 + || !do_copy (abfd, iterator.current.member) + || !do_pad (abfd, iterator.current.trailing_padding)) return FALSE; - if (! do_copy (abfd, sub)) - return FALSE; - - if (! do_pad (abfd, size & 1)) - return FALSE; + offsets[i] = iterator.current.offset; + prevoff = iterator.current.offset; } sprintf (fhdr.lastmemoff, "%ld", (long) prevoff); /* Write out the member table. */ + nextoff = iterator.next.offset; BFD_ASSERT (nextoff == bfd_tell (abfd)); sprintf (fhdr.memoff, "%ld", (long) nextoff); @@ -2325,10 +2338,11 @@ xcoff_write_archive_contents_big (abfd) file_ptr prevoff, nextoff; bfd *current_bfd; size_t i; - struct xcoff_ar_hdr_big *hdr, ahdr; + struct xcoff_ar_hdr_big *hdr; bfd_size_type size; char *member_table, *mt; bfd_vma member_table_size; + struct archive_iterator iterator; memset (&fhdr, 0, SIZEOF_AR_FILE_HDR_BIG); memcpy (fhdr.magic, XCOFFARMAGBIG, SXCOFFARMAG); @@ -2349,40 +2363,20 @@ xcoff_write_archive_contents_big (abfd) && ! hasobjects && bfd_check_format (current_bfd, bfd_object)) hasobjects = TRUE; - } - offsets = NULL; - if (count) - { - offsets = (file_ptr *) bfd_malloc (count * sizeof (file_ptr)); - if (offsets == NULL) - return FALSE; - } - - prevoff = 0; - nextoff = SIZEOF_AR_FILE_HDR_BIG; - for (current_bfd = abfd->archive_head, i = 0; - current_bfd != NULL; - current_bfd = current_bfd->archive_next, i++) - { - const char *name; - bfd_size_type namlen; - struct xcoff_ar_hdr_big *ahdrp; - bfd_size_type remaining; - - name = normalize_filename (current_bfd); - namlen = strlen (name); - - if (current_bfd->arelt_data != NULL) - ahdrp = arch_xhdr_big (current_bfd); - else - ahdrp = NULL; + if (current_bfd->arelt_data == NULL) + { + size = sizeof (struct areltdata); + current_bfd->arelt_data = bfd_zalloc (current_bfd, size); + if (current_bfd->arelt_data == NULL) + return FALSE; + } - if (ahdrp == NULL) + if (arch_xhdr_big (current_bfd) == NULL) { + struct xcoff_ar_hdr_big *ahdrp; struct stat s; - ahdrp = &ahdr; /* XXX This should actually be a call to stat64 (at least on 32-bit machines). XXX This call will fail if the original object is not found. */ @@ -2392,68 +2386,57 @@ xcoff_write_archive_contents_big (abfd) return FALSE; } + ahdrp = bfd_zalloc (current_bfd, sizeof (*ahdrp)); + if (ahdrp == NULL) + return FALSE; + PRINT20 (ahdrp->size, s.st_size); PRINT12 (ahdrp->date, s.st_mtime); PRINT12 (ahdrp->uid, s.st_uid); PRINT12 (ahdrp->gid, s.st_gid); PRINT12_OCTAL (ahdrp->mode, s.st_mode); - if (current_bfd->arelt_data == NULL) - { - size = sizeof (struct areltdata); - current_bfd->arelt_data = bfd_alloc (current_bfd, size); - if (current_bfd->arelt_data == NULL) - return FALSE; - } - + arch_eltdata (current_bfd)->arch_header = (char *) ahdrp; arch_eltdata (current_bfd)->parsed_size = s.st_size; } + } - PRINT20 (ahdrp->prevoff, prevoff); - PRINT4 (ahdrp->namlen, namlen); - - /* If the length of the name is odd, we write out the null byte - after the name as well. */ - namlen = (namlen + 1) &~ (bfd_size_type) 1; - - remaining = arelt_size (current_bfd); - size = (SIZEOF_AR_HDR_BIG - + namlen - + SXCOFFARFMAG - + remaining); - - BFD_ASSERT (nextoff == bfd_tell (abfd)); - - /* Check for xcoff shared objects. - Their text section needs to be aligned wrt the archive file position. - This requires extra padding before the archive header. */ - if (! do_shared_object_padding (abfd, current_bfd, & nextoff, - SIZEOF_AR_HDR_BIG + namlen - + SXCOFFARFMAG)) + offsets = NULL; + if (count) + { + offsets = (file_ptr *) bfd_malloc (count * sizeof (file_ptr)); + if (offsets == NULL) return FALSE; + } - offsets[i] = nextoff; - - prevoff = nextoff; - nextoff += size + (size & 1); - - PRINT20 (ahdrp->nextoff, nextoff); + prevoff = 0; + for (archive_iterator_begin (&iterator, abfd), i = 0; + archive_iterator_next (&iterator); + i++) + { + bfd_size_type namlen; + struct xcoff_ar_hdr_big *ahdrp; - if ((bfd_bwrite ((PTR) ahdrp, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd) - != SIZEOF_AR_HDR_BIG) - || bfd_bwrite ((PTR) name, (bfd_size_type) namlen, abfd) != namlen - || (bfd_bwrite ((PTR) XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, - abfd) != SXCOFFARFMAG)) - return FALSE; + ahdrp = arch_xhdr_big (iterator.current.member); + PRINT20 (ahdrp->prevoff, prevoff); + PRINT4 (ahdrp->namlen, iterator.current.namlen); + PRINT20 (ahdrp->nextoff, iterator.next.offset); - if (bfd_seek (current_bfd, (file_ptr) 0, SEEK_SET) != 0) + if (!do_pad (abfd, iterator.current.leading_padding)) return FALSE; - if (! do_copy (abfd, current_bfd)) + BFD_ASSERT (iterator.current.offset == bfd_tell (abfd)); + namlen = iterator.current.padded_namlen; + if (bfd_bwrite (ahdrp, SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG + || bfd_bwrite (iterator.current.name, namlen, abfd) != namlen + || bfd_bwrite (XCOFFARFMAG, SXCOFFARFMAG, abfd) != SXCOFFARFMAG + || bfd_seek (iterator.current.member, 0, SEEK_SET) != 0 + || !do_copy (abfd, iterator.current.member) + || !do_pad (abfd, iterator.current.trailing_padding)) return FALSE; - if (! do_pad (abfd, size & 1)) - return FALSE; + offsets[i] = iterator.current.offset; + prevoff = iterator.current.offset; } if (count) @@ -2483,6 +2466,7 @@ xcoff_write_archive_contents_big (abfd) ?? pad to even bytes. */ + nextoff = iterator.next.offset; BFD_ASSERT (nextoff == bfd_tell (abfd)); member_table_size = (SIZEOF_AR_HDR_BIG @@ -2947,11 +2931,13 @@ xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, bfd_byte *contents; { struct xcoff_link_hash_entry *h; + bfd_vma section_offset; if (0 > rel->r_symndx) return FALSE; h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx]; + section_offset = rel->r_vaddr - input_section->vma; /* If we see an R_BR or R_RBR reloc which is jumping to global linkage code, and it is followed by an appropriate cror nop @@ -2961,13 +2947,14 @@ xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, going to global linkage code, we can replace the load with a cror. */ if (NULL != h - && bfd_link_hash_defined == h->root.type - && rel->r_vaddr - input_section->vma + 8 <= input_section->size) + && (bfd_link_hash_defined == h->root.type + || bfd_link_hash_defweak == h->root.type) + && section_offset + 8 <= input_section->size) { bfd_byte *pnext; unsigned long next; - pnext = contents + (rel->r_vaddr - input_section->vma) + 4; + pnext = contents + section_offset + 4; next = bfd_get_32 (input_bfd, pnext); /* The _ptrgl function is magic. It is used by the AIX @@ -2977,12 +2964,12 @@ xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, if (next == 0x4def7b82 /* cror 15,15,15 */ || next == 0x4ffffb82 /* cror 31,31,31 */ || next == 0x60000000) /* ori r0,r0,0 */ - bfd_put_32 (input_bfd, 0x80410014, pnext); /* lwz r1,20(r1) */ + bfd_put_32 (input_bfd, 0x80410014, pnext); /* lwz r2,20(r1) */ } else { - if (next == 0x80410014) /* lwz r1,20(r1) */ + if (next == 0x80410014) /* lwz r2,20(r1) */ bfd_put_32 (input_bfd, 0x60000000, pnext); /* ori r0,r0,0 */ } } @@ -2998,16 +2985,42 @@ xcoff_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, howto->complain_on_overflow = complain_overflow_dont; } - howto->pc_relative = TRUE; + /* The original PC-relative relocation is biased by -r_vaddr, so adding + the value below will give the absolute target address. */ + *relocation = val + addend + rel->r_vaddr; + howto->src_mask &= ~3; howto->dst_mask = howto->src_mask; - /* A PC relative reloc includes the section address. */ - addend += input_section->vma; - - *relocation = val + addend; - *relocation -= (input_section->output_section->vma - + input_section->output_offset); + if (h != NULL + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + && bfd_is_abs_section (h->root.u.def.section) + && section_offset + 4 <= input_section->size) + { + bfd_byte *ptr; + bfd_vma insn; + + /* Turn the relative branch into an absolute one by setting the + AA bit. */ + ptr = contents + section_offset; + insn = bfd_get_32 (input_bfd, ptr); + insn |= 2; + bfd_put_32 (input_bfd, insn, ptr); + + /* Make the howto absolute too. */ + howto->pc_relative = FALSE; + howto->complain_on_overflow = complain_overflow_bitfield; + } + else + { + /* Use a PC-relative howto and subtract the instruction's address + from the target address we calculated above. */ + howto->pc_relative = TRUE; + *relocation -= (input_section->output_section->vma + + input_section->output_offset + + section_offset); + } return TRUE; } @@ -3323,9 +3336,7 @@ xcoff_complain_overflow_unsigned_func (input_bfd, val, relocation, howto) R_RBR: A relative branch which may be modified to become an - absolute branch. FIXME: We don't implement this, - although we should for symbols of storage mapping class - XMC_XO. + absolute branch. R_RL: The PowerPC AIX ABI describes this as a load which may be @@ -3422,6 +3433,17 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd, } else { + if (info->unresolved_syms_in_objects != RM_IGNORE + && (h->flags & XCOFF_WAS_UNDEFINED) != 0) + { + if (! ((*info->callbacks->undefined_symbol) + (info, h->root.root.string, + input_bfd, input_section, + rel->r_vaddr - input_section->vma, + (info->unresolved_syms_in_objects + == RM_GENERATE_ERROR)))) + return FALSE; + } if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { @@ -3437,17 +3459,13 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd, + sec->output_offset); } - else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT))) - && ! info->relocatable) + else { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, input_section, - rel->r_vaddr - input_section->vma, TRUE))) - return FALSE; - - /* Don't try to process the reloc. It can't help, and - it may generate another error. */ - continue; + BFD_ASSERT (info->relocatable + || (info->static_link + && (h->flags & XCOFF_WAS_UNDEFINED) != 0) + || (h->flags & XCOFF_DEF_DYNAMIC) != 0 + || (h->flags & XCOFF_IMPORT) != 0); } } } @@ -4011,7 +4029,7 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = LINESZ, FILNMLEN, TRUE, /* _bfd_coff_long_filenames */ - FALSE, /* _bfd_coff_long_section_names */ + XCOFF_NO_LONG_SECTION_NAMES, /* _bfd_coff_long_section_names */ 3, /* _bfd_coff_default_section_alignment_power */ FALSE, /* _bfd_coff_force_symnames_in_strings */ 2, /* _bfd_coff_debug_string_prefix_length */ @@ -4219,6 +4237,7 @@ const bfd_target rs6000coff_vec = bfd_generic_is_group_section, bfd_generic_discard_group, _bfd_generic_section_already_linked, + _bfd_xcoff_define_common_symbol, /* Dynamic */ _bfd_xcoff_get_dynamic_symtab_upper_bound, @@ -4263,7 +4282,7 @@ static const struct xcoff_backend_data_rec bfd_pmac_xcoff_backend_data = LINESZ, FILNMLEN, TRUE, /* _bfd_coff_long_filenames */ - FALSE, /* _bfd_coff_long_section_names */ + XCOFF_NO_LONG_SECTION_NAMES, /* _bfd_coff_long_section_names */ 3, /* _bfd_coff_default_section_alignment_power */ FALSE, /* _bfd_coff_force_symnames_in_strings */ 2, /* _bfd_coff_debug_string_prefix_length */ @@ -4471,6 +4490,7 @@ const bfd_target pmac_xcoff_vec = bfd_generic_is_group_section, bfd_generic_discard_group, _bfd_generic_section_already_linked, + _bfd_xcoff_define_common_symbol, /* Dynamic */ _bfd_xcoff_get_dynamic_symtab_upper_bound, diff --git a/cegcc/src/binutils/bfd/coff-sh.c b/cegcc/src/binutils/bfd/coff-sh.c index 1a5d63dab..28ac0aba4 100644 --- a/cegcc/src/binutils/bfd/coff-sh.c +++ b/cegcc/src/binutils/bfd/coff-sh.c @@ -1,6 +1,6 @@ /* BFD back-end for Renesas Super-H COFF binaries. Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Steve Chamberlain, . Relaxing code written by Ian Lance Taylor, . @@ -3121,7 +3121,7 @@ coff_small_new_section_hook (abfd, section) /* This is copied from bfd_coff_std_swap_table so that we can change the default section alignment power. */ -static const bfd_coff_backend_data bfd_coff_small_swap_table = +static bfd_coff_backend_data bfd_coff_small_swap_table = { coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in, coff_swap_aux_out, coff_swap_sym_out, @@ -3134,11 +3134,7 @@ static const bfd_coff_backend_data bfd_coff_small_swap_table = #else FALSE, #endif -#ifdef COFF_LONG_SECTION_NAMES - TRUE, -#else - FALSE, -#endif + COFF_DEFAULT_LONG_SECTION_NAMES, 2, #ifdef COFF_FORCE_SYMBOLS_IN_STRINGS TRUE, diff --git a/cegcc/src/binutils/bfd/coff-stgo32.c b/cegcc/src/binutils/bfd/coff-stgo32.c index b8928befa..78a493672 100644 --- a/cegcc/src/binutils/bfd/coff-stgo32.c +++ b/cegcc/src/binutils/bfd/coff-stgo32.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 COFF files (DJGPP variant with a stub). - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2006, 2007 + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Written by Robert Hoehne. @@ -102,9 +102,6 @@ static bfd_boolean #include "coff-i386.c" -/* I hold in the usrdata the stub. */ -#define bfd_coff_go32stub bfd_usrdata - /* This macro is used, because I cannot assume the endianess of the host system. */ #define _H(index) (H_GET_16 (abfd, (header+index*2))) @@ -112,7 +109,7 @@ static bfd_boolean /* These bytes are a 2048-byte DOS executable, which loads the COFF image into memory and then runs it. It is called 'stub'. */ -static const unsigned char stub_bytes[STUBSIZE] = +static const unsigned char stub_bytes[GO32_STUBSIZE] = { #include "go32stub.h" }; @@ -120,7 +117,7 @@ static const unsigned char stub_bytes[STUBSIZE] = /* I have not commented each swap function below, because the technique is in any function the same. For the ...in function, - all the pointers are adjusted by adding STUBSIZE and for the + all the pointers are adjusted by adding GO32_STUBSIZE and for the ...out function, it is subtracted first and after calling the standard swap function it is reset to the old value. */ @@ -132,25 +129,20 @@ static const unsigned char stub_bytes[STUBSIZE] = static void adjust_filehdr_in_post (abfd, src, dst) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; PTR src; PTR dst; { FILHDR *filehdr_src = (FILHDR *) src; struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; - ADJUST_VAL (filehdr_dst->f_symptr, STUBSIZE); + ADJUST_VAL (filehdr_dst->f_symptr, GO32_STUBSIZE); - /* Save now the stub to be used later. */ - bfd_coff_go32stub (abfd) = (PTR) bfd_alloc (abfd, (bfd_size_type) STUBSIZE); - - /* Since this function returns no status, I do not set here - any bfd_error_... - That means, before the use of bfd_coff_go32stub (), this value - should be checked if it is != NULL. */ - if (bfd_coff_go32stub (abfd) == NULL) - return; - memcpy (bfd_coff_go32stub (abfd), filehdr_src->stub, STUBSIZE); + /* Save now the stub to be used later. Put the stub data to FILEHDR_DST + first as coff_data (abfd) still does not exist. It may not even be ever + created as we are just checking the file format of ABFD. */ + memcpy (filehdr_dst->go32stub, filehdr_src->stub, GO32_STUBSIZE); + filehdr_dst->f_flags |= F_GO32STUB; } static void @@ -166,13 +158,13 @@ adjust_filehdr_out_pre (abfd, in, out) create_go32_stub (abfd); /* Copy the stub to the file header. */ - if (bfd_coff_go32stub (abfd) != NULL) - memcpy (filehdr_out->stub, bfd_coff_go32stub (abfd), STUBSIZE); + if (coff_data (abfd)->go32stub != NULL) + memcpy (filehdr_out->stub, coff_data (abfd)->go32stub, GO32_STUBSIZE); else /* Use the default. */ - memcpy (filehdr_out->stub, stub_bytes, STUBSIZE); + memcpy (filehdr_out->stub, stub_bytes, GO32_STUBSIZE); - ADJUST_VAL (filehdr_in->f_symptr, -STUBSIZE); + ADJUST_VAL (filehdr_in->f_symptr, -GO32_STUBSIZE); } static void @@ -183,7 +175,7 @@ adjust_filehdr_out_post (abfd, in, out) { struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; /* Undo the above change. */ - ADJUST_VAL (filehdr_in->f_symptr, STUBSIZE); + ADJUST_VAL (filehdr_in->f_symptr, GO32_STUBSIZE); } static void @@ -194,9 +186,9 @@ adjust_scnhdr_in_post (abfd, ext, in) { struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; - ADJUST_VAL (scnhdr_int->s_scnptr, STUBSIZE); - ADJUST_VAL (scnhdr_int->s_relptr, STUBSIZE); - ADJUST_VAL (scnhdr_int->s_lnnoptr, STUBSIZE); + ADJUST_VAL (scnhdr_int->s_scnptr, GO32_STUBSIZE); + ADJUST_VAL (scnhdr_int->s_relptr, GO32_STUBSIZE); + ADJUST_VAL (scnhdr_int->s_lnnoptr, GO32_STUBSIZE); } static void @@ -207,9 +199,9 @@ adjust_scnhdr_out_pre (abfd, in, out) { struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; - ADJUST_VAL (scnhdr_int->s_scnptr, -STUBSIZE); - ADJUST_VAL (scnhdr_int->s_relptr, -STUBSIZE); - ADJUST_VAL (scnhdr_int->s_lnnoptr, -STUBSIZE); + ADJUST_VAL (scnhdr_int->s_scnptr, -GO32_STUBSIZE); + ADJUST_VAL (scnhdr_int->s_relptr, -GO32_STUBSIZE); + ADJUST_VAL (scnhdr_int->s_lnnoptr, -GO32_STUBSIZE); } static void @@ -220,62 +212,65 @@ adjust_scnhdr_out_post (abfd, in, out) { struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; - ADJUST_VAL (scnhdr_int->s_scnptr, STUBSIZE); - ADJUST_VAL (scnhdr_int->s_relptr, STUBSIZE); - ADJUST_VAL (scnhdr_int->s_lnnoptr, STUBSIZE); + ADJUST_VAL (scnhdr_int->s_scnptr, GO32_STUBSIZE); + ADJUST_VAL (scnhdr_int->s_relptr, GO32_STUBSIZE); + ADJUST_VAL (scnhdr_int->s_lnnoptr, GO32_STUBSIZE); } static void -adjust_aux_in_post (abfd, ext1, type, class, indx, numaux, in1) +adjust_aux_in_post (abfd, ext1, type, in_class, indx, numaux, in1) bfd *abfd ATTRIBUTE_UNUSED; PTR ext1 ATTRIBUTE_UNUSED; int type; - int class; + int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR in1; { union internal_auxent *in = (union internal_auxent *) in1; - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { - ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, STUBSIZE); + ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, GO32_STUBSIZE); } } static void -adjust_aux_out_pre (abfd, inp, type, class, indx, numaux, extp) +adjust_aux_out_pre (abfd, inp, type, in_class, indx, numaux, extp) bfd *abfd ATTRIBUTE_UNUSED; PTR inp; int type; - int class; + int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp ATTRIBUTE_UNUSED; { union internal_auxent *in = (union internal_auxent *) inp; - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { - ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, -STUBSIZE); + ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, -GO32_STUBSIZE); } } static void -adjust_aux_out_post (abfd, inp, type, class, indx, numaux, extp) +adjust_aux_out_post (abfd, inp, type, in_class, indx, numaux, extp) bfd *abfd ATTRIBUTE_UNUSED; PTR inp; int type; - int class; + int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp ATTRIBUTE_UNUSED; { union internal_auxent *in = (union internal_auxent *) inp; - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { - ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, STUBSIZE); + ADJUST_VAL (in->x_sym.x_fcnary.x_fcn.x_lnnoptr, GO32_STUBSIZE); } } @@ -296,7 +291,7 @@ create_go32_stub (abfd) bfd *abfd; { /* Do it only once. */ - if (bfd_coff_go32stub (abfd) == NULL) + if (coff_data (abfd)->go32stub == NULL) { char *stub; struct stat st; @@ -362,32 +357,31 @@ create_go32_stub (abfd) goto stub_end; } /* Now we found a correct stub (hopefully). */ - bfd_coff_go32stub (abfd) - = (PTR) bfd_alloc (abfd, (bfd_size_type) coff_start); - if (bfd_coff_go32stub (abfd) == NULL) + coff_data (abfd)->go32stub = bfd_alloc (abfd, (bfd_size_type) coff_start); + if (coff_data (abfd)->go32stub == NULL) { close (f); return; } lseek (f, 0L, SEEK_SET); - if ((unsigned long) read (f, bfd_coff_go32stub (abfd), coff_start) + if ((unsigned long) read (f, coff_data (abfd)->go32stub, coff_start) != coff_start) { - bfd_release (abfd, bfd_coff_go32stub (abfd)); - bfd_coff_go32stub (abfd) = NULL; + bfd_release (abfd, coff_data (abfd)->go32stub); + coff_data (abfd)->go32stub = NULL; } close (f); } stub_end: /* There was something wrong above, so use now the standard builtin stub. */ - if (bfd_coff_go32stub (abfd) == NULL) + if (coff_data (abfd)->go32stub == NULL) { - bfd_coff_go32stub (abfd) - = (PTR) bfd_alloc (abfd, (bfd_size_type) STUBSIZE); - if (bfd_coff_go32stub (abfd) == NULL) + coff_data (abfd)->go32stub + = bfd_alloc (abfd, (bfd_size_type) GO32_STUBSIZE); + if (coff_data (abfd)->go32stub == NULL) return; - memcpy (bfd_coff_go32stub (abfd), stub_bytes, STUBSIZE); + memcpy (coff_data (abfd)->go32stub, stub_bytes, GO32_STUBSIZE); } } @@ -403,13 +397,20 @@ go32_stubbed_coff_bfd_copy_private_bfd_data (ibfd, obfd) if (ibfd->xvec != obfd->xvec) return TRUE; - /* Check if both have a valid stub. */ - if (bfd_coff_go32stub (ibfd) == NULL - || bfd_coff_go32stub (obfd) == NULL) + /* Check if we have a source stub. */ + if (coff_data (ibfd)->go32stub == NULL) return TRUE; + /* As adjust_filehdr_out_pre may get called only after this function, + optionally allocate the output stub. */ + if (coff_data (obfd)->go32stub == NULL) + coff_data (obfd)->go32stub = bfd_alloc (obfd, + (bfd_size_type) GO32_STUBSIZE); + /* Now copy the stub. */ - memcpy (bfd_coff_go32stub (obfd), bfd_coff_go32stub (ibfd), STUBSIZE); + if (coff_data (obfd)->go32stub != NULL) + memcpy (coff_data (obfd)->go32stub, coff_data (ibfd)->go32stub, + GO32_STUBSIZE); return TRUE; } diff --git a/cegcc/src/binutils/bfd/coff-svm68k.c b/cegcc/src/binutils/bfd/coff-svm68k.c index 379e61c44..dee4df4a0 100644 --- a/cegcc/src/binutils/bfd/coff-svm68k.c +++ b/cegcc/src/binutils/bfd/coff-svm68k.c @@ -1,5 +1,5 @@ /* BFD back-end for Motorola sysv68 - Copyright 1997, 2007 Free Software Foundation, Inc. + Copyright 1997, 2005, 2007 Free Software Foundation, Inc. Written by Philippe De Muyter . This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/coff-tic30.c b/cegcc/src/binutils/bfd/coff-tic30.c index 033f79db0..7670afe22 100644 --- a/cegcc/src/binutils/bfd/coff-tic30.c +++ b/cegcc/src/binutils/bfd/coff-tic30.c @@ -1,5 +1,5 @@ /* BFD back-end for TMS320C30 coff binaries. - Copyright 1998, 1999, 2000, 2001, 2002, 2007, 2008 + Copyright 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2008 Free Software Foundation, Inc. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) diff --git a/cegcc/src/binutils/bfd/coff-u68k.c b/cegcc/src/binutils/bfd/coff-u68k.c index b0377c47b..e061905e1 100644 --- a/cegcc/src/binutils/bfd/coff-u68k.c +++ b/cegcc/src/binutils/bfd/coff-u68k.c @@ -1,5 +1,5 @@ /* BFD back-end for Motorola 68000 COFF binaries having underscore with name. - Copyright 1990, 1991, 1992, 2007 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 2005, 2007 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/coff-we32k.c b/cegcc/src/binutils/bfd/coff-we32k.c index 1ba62007c..49845fc30 100644 --- a/cegcc/src/binutils/bfd/coff-we32k.c +++ b/cegcc/src/binutils/bfd/coff-we32k.c @@ -1,5 +1,5 @@ /* BFD back-end for we32k COFF files. - Copyright 1992, 1993, 1994, 1999, 2000, 2002, 2003, 2007, 2008 + Copyright 1992, 1993, 1994, 1999, 2000, 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@cs.widener.edu). diff --git a/cegcc/src/binutils/bfd/coff-x86_64.c b/cegcc/src/binutils/bfd/coff-x86_64.c index 78a788670..ecce9f40c 100644 --- a/cegcc/src/binutils/bfd/coff-x86_64.c +++ b/cegcc/src/binutils/bfd/coff-x86_64.c @@ -1,5 +1,5 @@ /* BFD back-end for AMD 64 COFF files. - Copyright 2006, 2007, 2008 Free Software Foundation, Inc. + Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -24,6 +24,10 @@ #define COFF_WITH_pex64 #endif +/* Note we have to make sure not to include headers twice. + Not all headers are wrapped in #ifdef guards, so we define + PEI_HEADERS to prevent double including here. */ +#ifndef PEI_HEADERS #include "sysdep.h" #include "bfd.h" #include "libbfd.h" @@ -32,6 +36,7 @@ #include "coff/pe.h" #include "libcoff.h" #include "libiberty.h" +#endif #define BADMAG(x) AMD64BADMAG(x) @@ -712,7 +717,7 @@ coff_amd64_is_local_label_name (bfd *abfd, const char *name) #endif /* TARGET_UNDERSCORE */ #ifndef bfd_pe_print_pdata -#define bfd_pe_print_pdata NULL +#define bfd_pe_print_pdata NULL #endif #include "coffcode.h" diff --git a/cegcc/src/binutils/bfd/coff-z80.c b/cegcc/src/binutils/bfd/coff-z80.c index c14c664b7..62bb90bb8 100644 --- a/cegcc/src/binutils/bfd/coff-z80.c +++ b/cegcc/src/binutils/bfd/coff-z80.c @@ -1,5 +1,5 @@ /* BFD back-end for Zilog Z80 COFF binaries. - Copyright 2005, 2007, 2008 Free Software Foundation, Inc. + Copyright 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Arnold Metselaar This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/coff64-rs6000.c b/cegcc/src/binutils/bfd/coff64-rs6000.c index ee797ed4a..e20207072 100644 --- a/cegcc/src/binutils/bfd/coff64-rs6000.c +++ b/cegcc/src/binutils/bfd/coff64-rs6000.c @@ -1,5 +1,5 @@ /* BFD back-end for IBM RS/6000 "XCOFF64" files. - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written Clinton Popetz. Contributed by Cygnus Support. @@ -353,11 +353,11 @@ _bfd_xcoff64_swap_sym_out (abfd, inp, extp) } static void -_bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) +_bfd_xcoff64_swap_aux_in (abfd, ext1, type, in_class, indx, numaux, in1) bfd *abfd; PTR ext1; int type; - int class; + int in_class; int indx; int numaux; PTR in1; @@ -365,7 +365,7 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) union external_auxent *ext = (union external_auxent *) ext1; union internal_auxent *in = (union internal_auxent *) in1; - switch (class) + switch (in_class) { case C_FILE: if (ext->x_file.x_n.x_zeroes[0] == 0) @@ -381,6 +381,7 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) /* RS/6000 "csect" auxents */ case C_EXT: + case C_AIX_WEAKEXT: case C_HIDEXT: if (indx + 1 == numaux) { @@ -419,7 +420,8 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) break; } - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { in->x_sym.x_fcnary.x_fcn.x_lnnoptr = H_GET_64 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); @@ -443,11 +445,11 @@ _bfd_xcoff64_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) } static unsigned int -_bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) +_bfd_xcoff64_swap_aux_out (abfd, inp, type, in_class, indx, numaux, extp) bfd *abfd; PTR inp; int type; - int class; + int in_class; int indx ATTRIBUTE_UNUSED; int numaux ATTRIBUTE_UNUSED; PTR extp; @@ -456,7 +458,7 @@ _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) union external_auxent *ext = (union external_auxent *) extp; memset ((PTR) ext, 0, bfd_coff_auxesz (abfd)); - switch (class) + switch (in_class) { case C_FILE: if (in->x_file.x_n.x_zeroes == 0) @@ -473,6 +475,7 @@ _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) /* RS/6000 "csect" auxents */ case C_EXT: + case C_AIX_WEAKEXT: case C_HIDEXT: if (indx + 1 == numaux) { @@ -504,7 +507,8 @@ _bfd_xcoff64_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) break; } - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { H_PUT_64 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr); @@ -767,7 +771,6 @@ xcoff64_write_object_contents (abfd) file_ptr sym_base; unsigned long reloc_size = 0; unsigned long lnno_size = 0; - bfd_boolean long_section_names; asection *text_sec = ((void *) 0); asection *data_sec = ((void *) 0); asection *bss_sec = ((void *) 0); @@ -837,7 +840,6 @@ xcoff64_write_object_contents (abfd) if (bfd_seek (abfd, scn_base, SEEK_SET) != 0) return FALSE; - long_section_names = FALSE; for (current = abfd->sections; current != NULL; current = current->next) { struct internal_scnhdr section; @@ -1050,6 +1052,8 @@ xcoff64_write_object_contents (abfd) case bfd_arch_powerpc: if (bfd_get_mach (abfd) == bfd_mach_ppc) internal_a.o_cputype = 3; + else if (bfd_get_mach (abfd) == bfd_mach_ppc_620) + internal_a.o_cputype = 2; else internal_a.o_cputype = 1; break; @@ -1117,11 +1121,13 @@ xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, bfd_byte *contents; { struct xcoff_link_hash_entry *h; + bfd_vma section_offset; if (0 > rel->r_symndx) return FALSE; h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx]; + section_offset = rel->r_vaddr - input_section->vma; /* If we see an R_BR or R_RBR reloc which is jumping to global linkage code, and it is followed by an appropriate cror nop @@ -1131,13 +1137,14 @@ xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, going to global linkage code, we can replace the load with a cror. */ if (NULL != h - && bfd_link_hash_defined == h->root.type - && rel->r_vaddr - input_section->vma + 8 <= input_section->size) + && (bfd_link_hash_defined == h->root.type + || bfd_link_hash_defweak == h->root.type) + && section_offset + 8 <= input_section->size) { bfd_byte *pnext; unsigned long next; - pnext = contents + (rel->r_vaddr - input_section->vma) + 4; + pnext = contents + section_offset + 4; next = bfd_get_32 (input_bfd, pnext); /* The _ptrgl function is magic. It is used by the AIX compiler to call @@ -1166,16 +1173,42 @@ xcoff64_reloc_type_br (input_bfd, input_section, output_bfd, rel, sym, howto, howto->complain_on_overflow = complain_overflow_dont; } - howto->pc_relative = TRUE; + /* The original PC-relative relocation is biased by -r_vaddr, so adding + the value below will give the absolute target address. */ + *relocation = val + addend + rel->r_vaddr; + howto->src_mask &= ~3; howto->dst_mask = howto->src_mask; - /* A PC relative reloc includes the section address. */ - addend += input_section->vma; - - *relocation = val + addend; - *relocation -= (input_section->output_section->vma - + input_section->output_offset); + if (h != NULL + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + && bfd_is_abs_section (h->root.u.def.section) + && section_offset + 4 <= input_section->size) + { + bfd_byte *ptr; + bfd_vma insn; + + /* Turn the relative branch into an absolute one by setting the + AA bit. */ + ptr = contents + section_offset; + insn = bfd_get_32 (input_bfd, ptr); + insn |= 2; + bfd_put_32 (input_bfd, insn, ptr); + + /* Make the howto absolute too. */ + howto->pc_relative = FALSE; + howto->complain_on_overflow = complain_overflow_bitfield; + } + else + { + /* Use a PC-relative howto and subtract the instruction's address + from the target address we calculated above. */ + howto->pc_relative = TRUE; + *relocation -= (input_section->output_section->vma + + input_section->output_offset + + section_offset); + } return TRUE; } @@ -1266,6 +1299,17 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd, } else { + if (info->unresolved_syms_in_objects != RM_IGNORE + && (h->flags & XCOFF_WAS_UNDEFINED) != 0) + { + if (! ((*info->callbacks->undefined_symbol) + (info, h->root.root.string, + input_bfd, input_section, + rel->r_vaddr - input_section->vma, + (info->unresolved_syms_in_objects + == RM_GENERATE_ERROR)))) + return FALSE; + } if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { @@ -1280,17 +1324,11 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd, val = (sec->output_section->vma + sec->output_offset); } - else if ((0 == (h->flags & (XCOFF_DEF_DYNAMIC | XCOFF_IMPORT))) - && ! info->relocatable) + else { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, input_section, - rel->r_vaddr - input_section->vma, TRUE))) - return FALSE; - - /* Don't try to process the reloc. It can't help, and - it may generate another error. */ - continue; + BFD_ASSERT (info->relocatable + || (h->flags & XCOFF_DEF_DYNAMIC) != 0 + || (h->flags & XCOFF_IMPORT) != 0); } } } @@ -2561,7 +2599,7 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = LINESZ, FILNMLEN, TRUE, /* _bfd_coff_long_filenames */ - FALSE, /* _bfd_coff_long_section_names */ + XCOFF_NO_LONG_SECTION_NAMES, /* _bfd_coff_long_section_names */ 3, /* _bfd_coff_default_section_alignment_power */ TRUE, /* _bfd_coff_force_symnames_in_strings */ 4, /* _bfd_coff_debug_string_prefix_length */ @@ -2769,6 +2807,7 @@ const bfd_target rs6000coff64_vec = bfd_generic_is_group_section, bfd_generic_discard_group, _bfd_generic_section_already_linked, + _bfd_xcoff_define_common_symbol, /* Dynamic */ _bfd_xcoff_get_dynamic_symtab_upper_bound, @@ -2815,7 +2854,7 @@ static const struct xcoff_backend_data_rec bfd_xcoff_aix5_backend_data = LINESZ, FILNMLEN, TRUE, /* _bfd_coff_long_filenames */ - FALSE, /* _bfd_coff_long_section_names */ + XCOFF_NO_LONG_SECTION_NAMES, /* _bfd_coff_long_section_names */ 3, /* _bfd_coff_default_section_alignment_power */ TRUE, /* _bfd_coff_force_symnames_in_strings */ 4, /* _bfd_coff_debug_string_prefix_length */ @@ -3022,6 +3061,7 @@ const bfd_target aix5coff64_vec = bfd_generic_is_group_section, bfd_generic_discard_group, _bfd_generic_section_already_linked, + _bfd_xcoff_define_common_symbol, /* Dynamic */ _bfd_xcoff_get_dynamic_symtab_upper_bound, diff --git a/cegcc/src/binutils/bfd/coffcode.h b/cegcc/src/binutils/bfd/coffcode.h index db0b2e900..19f4159ac 100644 --- a/cegcc/src/binutils/bfd/coffcode.h +++ b/cegcc/src/binutils/bfd/coffcode.h @@ -1,6 +1,6 @@ /* Support for the generic parts of most COFF variants, for BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -109,6 +109,68 @@ SUBSUBSECTION target. SUBSUBSECTION + Coff long section names + + In the standard Coff object format, section names are limited to + the eight bytes available in the @code{s_name} field of the + @code{SCNHDR} section header structure. The format requires the + field to be NUL-padded, but not necessarily NUL-terminated, so + the longest section names permitted are a full eight characters. + + The Microsoft PE variants of the Coff object file format add + an extension to support the use of long section names. This + extension is defined in section 4 of the Microsoft PE/COFF + specification (rev 8.1). If a section name is too long to fit + into the section header's @code{s_name} field, it is instead + placed into the string table, and the @code{s_name} field is + filled with a slash ("/") followed by the ASCII decimal + representation of the offset of the full name relative to the + string table base. + + Note that this implies that the extension can only be used in object + files, as executables do not contain a string table. The standard + specifies that long section names from objects emitted into executable + images are to be truncated. + + However, as a GNU extension, BFD can generate executable images + that contain a string table and long section names. This + would appear to be technically valid, as the standard only says + that Coff debugging information is deprecated, not forbidden, + and in practice it works, although some tools that parse PE files + expecting the MS standard format may become confused; @file{PEview} is + one known example. + + The functionality is supported in BFD by code implemented under + the control of the macro @code{COFF_LONG_SECTION_NAMES}. If not + defined, the format does not support long section names in any way. + If defined, it is used to initialise a flag, + @code{_bfd_coff_long_section_names}, and a hook function pointer, + @code{_bfd_coff_set_long_section_names}, in the Coff backend data + structure. The flag controls the generation of long section names + in output BFDs at runtime; if it is false, as it will be by default + when generating an executable image, long section names are truncated; + if true, the long section names extension is employed. The hook + points to a function that allows the value of the flag to be altered + at runtime, on formats that support long section names at all; on + other formats it points to a stub that returns an error indication. + + With input BFDs, the flag is set according to whether any long section + names are detected while reading the section headers. For a completely + new BFD, the flag is set to the default for the target format. This + information can be used by a client of the BFD library when deciding + what output format to generate, and means that a BFD that is opened + for read and subsequently converted to a writeable BFD and modified + in-place will retain whatever format it had on input. + + If @code{COFF_LONG_SECTION_NAMES} is simply defined (blank), or is + defined to the value "1", then long section names are enabled by + default; if it is defined to the value zero, they are disabled by + default (but still accepted in input BFDs). The header @file{coffcode.h} + defines a macro, @code{COFF_DEFAULT_LONG_SECTION_NAMES}, which is + used in the backends to initialise the backend data structure fields + appropriately; see the comments for further detail. + +SUBSUBSECTION Bit twiddling Each flavour of coff supported in BFD has its own header file @@ -299,6 +361,8 @@ CODE_FRAGMENT */ +#include "libiberty.h" + #ifdef COFF_WITH_PE #include "peicode.h" #else @@ -309,7 +373,42 @@ CODE_FRAGMENT #define DOT_DEBUG ".debug" #define GNU_LINKONCE_WI ".gnu.linkonce.wi." - +#define DOT_RELOC ".reloc" + +#if defined (COFF_LONG_SECTION_NAMES) +/* Needed to expand the inputs to BLANKOR1TOODD. */ +#define COFFLONGSECTIONCATHELPER(x,y) x ## y +/* If the input macro Y is blank or '1', return an odd number; if it is + '0', return an even number. Result undefined in all other cases. */ +#define BLANKOR1TOODD(y) COFFLONGSECTIONCATHELPER(1,y) +/* Defined to numerical 0 or 1 according to whether generation of long + section names is disabled or enabled by default. */ +#define COFF_ENABLE_LONG_SECTION_NAMES (BLANKOR1TOODD(COFF_LONG_SECTION_NAMES) & 1) +/* Where long section names are supported, we allow them to be enabled + and disabled at runtime, so select an appropriate hook function for + _bfd_coff_set_long_section_names. */ +#define COFF_LONG_SECTION_NAMES_SETTER bfd_coff_set_long_section_names_allowed +#else /* !defined (COFF_LONG_SECTION_NAMES) */ +/* If long section names are not supported, this stub disallows any + attempt to enable them at run-time. */ +#define COFF_LONG_SECTION_NAMES_SETTER bfd_coff_set_long_section_names_disallowed +#endif /* defined (COFF_LONG_SECTION_NAMES) */ + +/* Define a macro that can be used to initialise both the fields relating + to long section names in the backend data struct simultaneously. */ +#if COFF_ENABLE_LONG_SECTION_NAMES +#define COFF_DEFAULT_LONG_SECTION_NAMES (TRUE), COFF_LONG_SECTION_NAMES_SETTER +#else /* !COFF_ENABLE_LONG_SECTION_NAMES */ +#define COFF_DEFAULT_LONG_SECTION_NAMES (FALSE), COFF_LONG_SECTION_NAMES_SETTER +#endif /* COFF_ENABLE_LONG_SECTION_NAMES */ + +#if defined (COFF_LONG_SECTION_NAMES) +static bfd_boolean bfd_coff_set_long_section_names_allowed + (bfd *, int); +#else /* !defined (COFF_LONG_SECTION_NAMES) */ +static bfd_boolean bfd_coff_set_long_section_names_disallowed + (bfd *, int); +#endif /* defined (COFF_LONG_SECTION_NAMES) */ static long sec_to_styp_flags (const char *, flagword); static bfd_boolean styp_to_sec_flags @@ -372,6 +471,23 @@ static bfd_boolean ticoff1_bad_format_hook /* void warning(); */ +#if defined (COFF_LONG_SECTION_NAMES) +static bfd_boolean +bfd_coff_set_long_section_names_allowed (bfd *abfd, int enable) +{ + coff_backend_info (abfd)->_bfd_coff_long_section_names = enable; + return TRUE; +} +#else /* !defined (COFF_LONG_SECTION_NAMES) */ +static bfd_boolean +bfd_coff_set_long_section_names_disallowed (bfd *abfd, int enable) +{ + (void) abfd; + (void) enable; + return FALSE; +} +#endif /* defined (COFF_LONG_SECTION_NAMES) */ + /* Return a word with STYP_* (scnhdr.s_flags) flags set to represent the incoming SEC_* flags. The inverse of this function is styp_to_sec_flags(). NOTE: If you add to/change this routine, you @@ -532,7 +648,7 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags) /* FIXME: There is no gas syntax to specify the debug section flag. */ if (CONST_STRNEQ (sec_name, DOT_DEBUG) || CONST_STRNEQ (sec_name, GNU_LINKONCE_WI)) - sec_flags = SEC_DEBUGGING; + sec_flags = SEC_DEBUGGING | SEC_READONLY; /* skip LOAD */ /* READONLY later */ @@ -561,19 +677,14 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags) /* skip LINK_DUPLICATES */ /* skip LINKER_CREATED */ - if (sec_flags & (SEC_ALLOC | SEC_LOAD)) - { - /* For now, the read/write bits are mapped onto SEC_READONLY, even - though the semantics don't quite match. The bits from the input - are retained in pei_section_data(abfd, section)->pe_flags. */ - styp_flags |= IMAGE_SCN_MEM_READ; /* Always readable. */ - if ((sec_flags & SEC_READONLY) == 0) - styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write. */ - if (sec_flags & SEC_CODE) - styp_flags |= IMAGE_SCN_MEM_EXECUTE; /* CODE->EXECUTE. */ - if (sec_flags & SEC_COFF_SHARED) - styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful. */ - } + if ((sec_flags & SEC_COFF_NOREAD) == 0) + styp_flags |= IMAGE_SCN_MEM_READ; /* Invert NOREAD for read. */ + if ((sec_flags & SEC_READONLY) == 0) + styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write. */ + if (sec_flags & SEC_CODE) + styp_flags |= IMAGE_SCN_MEM_EXECUTE; /* CODE->EXECUTE. */ + if (sec_flags & SEC_COFF_SHARED) + styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful. */ return styp_flags; } @@ -836,7 +947,8 @@ handle_COMDAT (bfd * abfd, but there's some checking we can do to be sure. */ - if (! (isym.n_sclass == C_STAT + if (! ((isym.n_sclass == C_STAT + || isym.n_sclass == C_EXT) && isym.n_type == T_NULL && isym.n_value == 0)) abort (); @@ -846,7 +958,7 @@ handle_COMDAT (bfd * abfd, names like .text$foo__Fv (in the case of a function). See comment above for more. */ - if (strcmp (name, symname) != 0) + if (isym.n_sclass == C_STAT && strcmp (name, symname) != 0) _bfd_error_handler (_("%B: warning: COMDAT symbol '%s' does not match section name '%s'"), abfd, symname, name); @@ -959,7 +1071,7 @@ handle_COMDAT (bfd * abfd, amt = sizeof (struct coff_comdat_info); coff_section_data (abfd, section)->comdat - = bfd_alloc (abfd, amt); + = (struct coff_comdat_info *) bfd_alloc (abfd, amt); if (coff_section_data (abfd, section)->comdat == NULL) abort (); @@ -967,7 +1079,7 @@ handle_COMDAT (bfd * abfd, (esym - esymstart) / bfd_coff_symesz (abfd); amt = strlen (symname) + 1; - newname = bfd_alloc (abfd, amt); + newname = (char *) bfd_alloc (abfd, amt); if (newname == NULL) abort (); @@ -1012,6 +1124,10 @@ styp_to_sec_flags (bfd *abfd, /* Assume read only unless IMAGE_SCN_MEM_WRITE is specified. */ sec_flags = SEC_READONLY; + /* If section disallows read, then set the NOREAD flag. */ + if ((styp_flags & IMAGE_SCN_MEM_READ) == 0) + sec_flags |= SEC_COFF_NOREAD; + /* Process each flag bit in styp_flags in turn. */ while (styp_flags) { @@ -1044,7 +1160,7 @@ styp_to_sec_flags (bfd *abfd, break; #endif case IMAGE_SCN_MEM_READ: - /* Ignored, assume it always to be true. */ + sec_flags &= ~SEC_COFF_NOREAD; break; case IMAGE_SCN_TYPE_NO_PAD: /* Skip. */ @@ -1214,7 +1330,11 @@ Special entry points for gdb to swap in coff symbol table parts: . unsigned int _bfd_linesz; . unsigned int _bfd_filnmlen; . bfd_boolean _bfd_coff_long_filenames; +. . bfd_boolean _bfd_coff_long_section_names; +. bfd_boolean (*_bfd_coff_set_long_section_names) +. (bfd *, int); +. . unsigned int _bfd_coff_default_section_alignment_power; . bfd_boolean _bfd_coff_force_symnames_in_strings; . unsigned int _bfd_coff_debug_string_prefix_length; @@ -1351,6 +1471,8 @@ Special entry points for gdb to swap in coff symbol table parts: . (coff_backend_info (abfd)->_bfd_coff_long_filenames) .#define bfd_coff_long_section_names(abfd) \ . (coff_backend_info (abfd)->_bfd_coff_long_section_names) +.#define bfd_coff_set_long_section_names(abfd, enable) \ +. ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable)) .#define bfd_coff_default_section_alignment_power(abfd) \ . (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power) .#define bfd_coff_swap_filehdr_in(abfd, i,o) \ @@ -1441,6 +1563,10 @@ Special entry points for gdb to swap in coff symbol table parts: .#define bfd_coff_print_pdata(a,p) \ . ((coff_backend_info (a)->_bfd_coff_print_pdata) (a, p)) . +.{* Macro: Returns true if the bfd is a PE executable as opposed to a +. PE object file. *} +.#define bfd_pei_p(abfd) \ +. (CONST_STRNEQ ((abfd)->xvec->name, "pei-")) */ /* See whether the magic number matches. */ @@ -1588,7 +1714,7 @@ coff_new_section_hook (bfd * abfd, asection * section) @@ The 10 is a guess at a plausible maximum number of aux entries (but shouldn't be a constant). */ amt = sizeof (combined_entry_type) * 10; - native = bfd_zalloc (abfd, amt); + native = (combined_entry_type *) bfd_zalloc (abfd, amt); if (native == NULL) return FALSE; @@ -1868,6 +1994,11 @@ coff_mkobject_hook (bfd * abfd, abfd->flags |= HAS_DEBUG; #endif + if ((internal_f->f_flags & F_GO32STUB) != 0) + coff->go32stub = (char *) bfd_alloc (abfd, (bfd_size_type) GO32_STUBSIZE); + if (coff->go32stub != NULL) + memcpy (coff->go32stub, internal_f->go32stub, GO32_STUBSIZE); + return coff; } #endif @@ -2305,7 +2436,7 @@ symname_in_debug_hook (bfd * abfd ATTRIBUTE_UNUSED, struct internal_syment *sym) #define FORCE_SYMNAMES_IN_STRINGS #endif -/* Handle the csect auxent of a C_EXT or C_HIDEXT symbol. */ +/* Handle the csect auxent of a C_EXT, C_AIX_WEAKEXT or C_HIDEXT symbol. */ static bfd_boolean coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED, @@ -2314,9 +2445,9 @@ coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED, unsigned int indaux, combined_entry_type *aux) { - int class = symbol->u.syment.n_sclass; + int n_sclass = symbol->u.syment.n_sclass; - if ((class == C_EXT || class == C_HIDEXT) + if (CSECT_SYM_P (n_sclass) && indaux + 1 == symbol->u.syment.n_numaux) { if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD) @@ -2374,8 +2505,7 @@ coff_print_aux (bfd *abfd ATTRIBUTE_UNUSED, unsigned int indaux ATTRIBUTE_UNUSED) { #ifdef RS6000COFF_C - if ((symbol->u.syment.n_sclass == C_EXT - || symbol->u.syment.n_sclass == C_HIDEXT) + if (CSECT_SYM_P (symbol->u.syment.n_sclass) && indaux + 1 == symbol->u.syment.n_numaux) { /* This is a csect entry. */ @@ -3064,13 +3194,20 @@ coff_compute_section_file_positions (bfd * abfd) int target_index; bfd_size_type amt; +#ifdef COFF_PAGE_SIZE + /* Clear D_PAGED if section alignment is smaller than + COFF_PAGE_SIZE. */ + if (pe_data (abfd)->pe_opthdr.SectionAlignment < COFF_PAGE_SIZE) + abfd->flags &= ~D_PAGED; +#endif + count = 0; for (current = abfd->sections; current != NULL; current = current->next) ++count; /* We allocate an extra cell to simplify the final loop. */ amt = sizeof (struct asection *) * (count + 1); - section_list = bfd_malloc (amt); + section_list = (asection **) bfd_malloc (amt); if (section_list == NULL) return FALSE; @@ -3496,7 +3633,7 @@ coff_write_object_contents (bfd * abfd) bfd_boolean is_reloc_section = FALSE; #ifdef COFF_IMAGE_WITH_PE - if (strcmp (current->name, ".reloc") == 0) + if (strcmp (current->name, DOT_RELOC) == 0) { is_reloc_section = TRUE; hasrelocs = TRUE; @@ -3511,18 +3648,40 @@ coff_write_object_contents (bfd * abfd) #ifdef COFF_LONG_SECTION_NAMES /* Handle long section names as in PE. This must be compatible with the code in coff_write_symbols and _bfd_coff_final_link. */ - { - size_t len; + if (bfd_coff_long_section_names (abfd)) + { + size_t len; - len = strlen (current->name); - if (len > SCNNMLEN) - { - memset (section.s_name, 0, SCNNMLEN); - sprintf (section.s_name, "/%lu", (unsigned long) string_size); - string_size += len + 1; - long_section_names = TRUE; - } - } + len = strlen (current->name); + if (len > SCNNMLEN) + { + /* The s_name field is defined to be NUL-padded but need not be + NUL-terminated. We use a temporary buffer so that we can still + sprintf all eight chars without splatting a terminating NUL + over the first byte of the following member (s_paddr). */ + char s_name_buf[SCNNMLEN + 1]; + + /* An inherent limitation of the /nnnnnnn notation used to indicate + the offset of the long name in the string table is that we + cannot address entries beyone the ten million byte boundary. */ + if (string_size >= 10000000) + { + bfd_set_error (bfd_error_file_too_big); + (*_bfd_error_handler) + (_("%B: section %s: string table overflow at offset %ld"), + abfd, current->name, string_size); + return FALSE; + } + + /* snprintf not strictly necessary now we've verified the value + has less than eight ASCII digits, but never mind. */ + snprintf (s_name_buf, SCNNMLEN + 1, "/%lu", (unsigned long) string_size); + /* Then strncpy takes care of any padding for us. */ + strncpy (section.s_name, s_name_buf, SCNNMLEN); + string_size += len + 1; + long_section_names = TRUE; + } + } #endif #ifdef _LIB @@ -4119,7 +4278,7 @@ coff_write_object_contents (bfd * abfd) char * buff; bfd_size_type amount = bfd_coff_filhsz (abfd); - buff = bfd_malloc (amount); + buff = (char *) bfd_malloc (amount); if (buff == NULL) return FALSE; @@ -4139,7 +4298,7 @@ coff_write_object_contents (bfd * abfd) char * buff; bfd_size_type amount = bfd_coff_aoutsz (abfd); - buff = bfd_malloc (amount); + buff = (char *) bfd_malloc (amount); if (buff == NULL) return FALSE; @@ -4308,7 +4467,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect) BFD_ASSERT (asect->lineno == NULL); amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent); - lineno_cache = bfd_alloc (abfd, amt); + lineno_cache = (alent *) bfd_alloc (abfd, amt); if (lineno_cache == NULL) return FALSE; @@ -4387,7 +4546,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect) alent *n_lineno_cache; /* Create a table of functions. */ - func_table = bfd_alloc (abfd, nbr_func * sizeof (alent *)); + func_table = (alent **) bfd_alloc (abfd, nbr_func * sizeof (alent *)); if (func_table != NULL) { alent **p = func_table; @@ -4402,7 +4561,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect) /* Create the new sorted table. */ amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent); - n_lineno_cache = bfd_alloc (abfd, amt); + n_lineno_cache = (alent *) bfd_alloc (abfd, amt); if (n_lineno_cache != NULL) { alent *n_cache_ptr = n_lineno_cache; @@ -4456,13 +4615,13 @@ coff_slurp_symbol_table (bfd * abfd) /* Allocate enough room for all the symbols in cached form. */ amt = obj_raw_syment_count (abfd); amt *= sizeof (coff_symbol_type); - cached_area = bfd_alloc (abfd, amt); + cached_area = (coff_symbol_type *) bfd_alloc (abfd, amt); if (cached_area == NULL) return FALSE; amt = obj_raw_syment_count (abfd); amt *= sizeof (unsigned int); - table_ptr = bfd_alloc (abfd, amt); + table_ptr = (unsigned int *) bfd_alloc (abfd, amt); if (table_ptr == NULL) return FALSE; @@ -4954,7 +5113,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols) amt = (bfd_size_type) bfd_coff_relsz (abfd) * asect->reloc_count; native_relocs = (RELOC *) buy_and_read (abfd, asect->rel_filepos, amt); amt = (bfd_size_type) asect->reloc_count * sizeof (arelent); - reloc_cache = bfd_alloc (abfd, amt); + reloc_cache = (arelent *) bfd_alloc (abfd, amt); if (reloc_cache == NULL || native_relocs == NULL) return FALSE; @@ -5246,7 +5405,7 @@ coff_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED, #define coff_SWAP_scnhdr_in coff_swap_scnhdr_in #endif -static const bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = +static bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = { coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in, coff_SWAP_aux_out, coff_SWAP_sym_out, @@ -5259,11 +5418,7 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = #else FALSE, #endif -#ifdef COFF_LONG_SECTION_NAMES - TRUE, -#else - FALSE, -#endif + COFF_DEFAULT_LONG_SECTION_NAMES, COFF_DEFAULT_SECTION_ALIGNMENT_POWER, #ifdef COFF_FORCE_SYMBOLS_IN_STRINGS TRUE, @@ -5290,7 +5445,7 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = #ifdef TICOFF /* COFF0 differs in file/section header size and relocation entry size. */ -static const bfd_coff_backend_data ticoff0_swap_table = +static bfd_coff_backend_data ticoff0_swap_table = { coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in, coff_SWAP_aux_out, coff_SWAP_sym_out, @@ -5303,11 +5458,7 @@ static const bfd_coff_backend_data ticoff0_swap_table = #else FALSE, #endif -#ifdef COFF_LONG_SECTION_NAMES - TRUE, -#else - FALSE, -#endif + COFF_DEFAULT_LONG_SECTION_NAMES, COFF_DEFAULT_SECTION_ALIGNMENT_POWER, #ifdef COFF_FORCE_SYMBOLS_IN_STRINGS TRUE, @@ -5335,7 +5486,7 @@ static const bfd_coff_backend_data ticoff0_swap_table = #ifdef TICOFF /* COFF1 differs in section header size. */ -static const bfd_coff_backend_data ticoff1_swap_table = +static bfd_coff_backend_data ticoff1_swap_table = { coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in, coff_SWAP_aux_out, coff_SWAP_sym_out, @@ -5348,11 +5499,7 @@ static const bfd_coff_backend_data ticoff1_swap_table = #else FALSE, #endif -#ifdef COFF_LONG_SECTION_NAMES - TRUE, -#else - FALSE, -#endif + COFF_DEFAULT_LONG_SECTION_NAMES, COFF_DEFAULT_SECTION_ALIGNMENT_POWER, #ifdef COFF_FORCE_SYMBOLS_IN_STRINGS TRUE, @@ -5472,6 +5619,10 @@ static const bfd_coff_backend_data ticoff1_swap_table = _bfd_generic_section_already_linked #endif +#ifndef coff_bfd_define_common_symbol +#define coff_bfd_define_common_symbol bfd_generic_define_common_symbol +#endif + #define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE, SWAP_TABLE) \ const bfd_target VAR = \ { \ diff --git a/cegcc/src/binutils/bfd/coffgen.c b/cegcc/src/binutils/bfd/coffgen.c index 469cdfa49..5f6921d9d 100644 --- a/cegcc/src/binutils/bfd/coffgen.c +++ b/cegcc/src/binutils/bfd/coffgen.c @@ -1,6 +1,6 @@ /* Support for the generic parts of COFF, for BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -59,8 +59,13 @@ make_a_section_from_file (bfd *abfd, name = NULL; - /* Handle long section names as in PE. */ - if (bfd_coff_long_section_names (abfd) + /* Handle long section names as in PE. On reading, we want to + accept long names if the format permits them at all, regardless + of the current state of the flag that dictates if we would generate + them in outputs; this construct checks if that is the case by + attempting to set the flag, without changing its state; the call + will fail for formats that do not support long names at all. */ + if (bfd_coff_set_long_section_names (abfd, bfd_coff_long_section_names (abfd)) && hdr->s_name[0] == '/') { char buf[SCNNMLEN]; @@ -68,6 +73,11 @@ make_a_section_from_file (bfd *abfd, char *p; const char *strings; + /* Flag that this BFD uses long names, even though the format might + expect them to be off by default. This won't directly affect the + format of any output BFD created from this one, but the information + can be used to decide what to do. */ + bfd_coff_set_long_section_names (abfd, TRUE); memcpy (buf, hdr->s_name + 1, SCNNMLEN - 1); buf[SCNNMLEN - 1] = '\0'; strindex = strtol (buf, &p, 10); @@ -80,7 +90,8 @@ make_a_section_from_file (bfd *abfd, strindex does not run us past the end, but right now we don't know the length of the string table. */ strings += strindex; - name = bfd_alloc (abfd, (bfd_size_type) strlen (strings) + 1); + name = (char *) bfd_alloc (abfd, + (bfd_size_type) strlen (strings) + 1); if (name == NULL) return FALSE; strcpy (name, strings); @@ -90,7 +101,8 @@ make_a_section_from_file (bfd *abfd, if (name == NULL) { /* Assorted wastage to null-terminate the name, thanks AT&T! */ - name = bfd_alloc (abfd, (bfd_size_type) sizeof (hdr->s_name) + 1); + name = (char *) bfd_alloc (abfd, + (bfd_size_type) sizeof (hdr->s_name) + 1); if (name == NULL) return FALSE; strncpy (name, (char *) &hdr->s_name[0], sizeof (hdr->s_name)); @@ -185,7 +197,7 @@ coff_real_object_p (bfd *abfd, scnhsz = bfd_coff_scnhsz (abfd); readsize = (bfd_size_type) nscns * scnhsz; - external_sections = bfd_alloc (abfd, readsize); + external_sections = (char *) bfd_alloc (abfd, readsize); if (!external_sections) goto fail; @@ -427,7 +439,7 @@ _bfd_coff_read_internal_relocs (bfd *abfd, amt = sec->reloc_count * relsz; if (external_relocs == NULL) { - free_external = bfd_malloc (amt); + free_external = (bfd_byte *) bfd_malloc (amt); if (free_external == NULL) goto error_return; external_relocs = free_external; @@ -441,7 +453,7 @@ _bfd_coff_read_internal_relocs (bfd *abfd, { amt = sec->reloc_count; amt *= sizeof (struct internal_reloc); - free_internal = bfd_malloc (amt); + free_internal = (struct internal_reloc *) bfd_malloc (amt); if (free_internal == NULL) goto error_return; internal_relocs = free_internal; @@ -641,7 +653,7 @@ coff_renumber_symbols (bfd *bfd_ptr, int *first_undef) bfd_size_type amt; amt = sizeof (asymbol *) * ((bfd_size_type) symbol_count + 1); - newsyms = bfd_alloc (bfd_ptr, amt); + newsyms = (asymbol **) bfd_alloc (bfd_ptr, amt); if (!newsyms) return FALSE; bfd_ptr->outsymbols = newsyms; @@ -902,7 +914,7 @@ coff_write_symbol (bfd *abfd, { unsigned int numaux = native->u.syment.n_numaux; int type = native->u.syment.n_type; - int class = native->u.syment.n_sclass; + int n_sclass = (int) native->u.syment.n_sclass; void * buf; bfd_size_type symesz; @@ -948,7 +960,7 @@ coff_write_symbol (bfd *abfd, { bfd_coff_swap_aux_out (abfd, &((native + j + 1)->u.auxent), - type, class, (int) j, + type, n_sclass, (int) j, native->u.syment.n_numaux, buf); if (bfd_bwrite (buf, auxesz, abfd) != auxesz) @@ -1146,7 +1158,7 @@ coff_write_symbols (bfd *abfd) if (coff_backend_info (abfd)->_bfd_coff_classify_symbol != NULL) { bfd_error_handler_type current_error_handler; - enum coff_symbol_classification class; + enum coff_symbol_classification sym_class; unsigned char *n_sclass; /* Suppress error reporting by bfd_coff_classify_symbol. @@ -1154,9 +1166,10 @@ coff_write_symbols (bfd *abfd) symbol which has no associated section and we do not have to worry about this, all we need to know is that it is local. */ current_error_handler = bfd_set_error_handler (null_error_handler); - class = bfd_coff_classify_symbol (abfd, &c_symbol->native->u.syment); + sym_class = bfd_coff_classify_symbol (abfd, + &c_symbol->native->u.syment); (void) bfd_set_error_handler (current_error_handler); - + n_sclass = &c_symbol->native->u.syment.n_sclass; /* If the symbol class has been changed (eg objcopy/ld script/etc) @@ -1168,10 +1181,10 @@ coff_write_symbols (bfd *abfd) if (symbol->flags & BSF_WEAK) *n_sclass = obj_pe (abfd) ? C_NT_WEAK : C_WEAKEXT; - else if (symbol->flags & BSF_LOCAL && class != COFF_SYMBOL_LOCAL) + else if (symbol->flags & BSF_LOCAL && sym_class != COFF_SYMBOL_LOCAL) *n_sclass = C_STAT; else if (symbol->flags & BSF_GLOBAL - && (class != COFF_SYMBOL_GLOBAL + && (sym_class != COFF_SYMBOL_GLOBAL #ifdef COFF_WITH_PE || *n_sclass == C_NT_WEAK #endif @@ -1380,7 +1393,7 @@ coff_pointerize_aux (bfd *abfd, combined_entry_type *auxent) { unsigned int type = symbol->u.syment.n_type; - unsigned int class = symbol->u.syment.n_sclass; + unsigned int n_sclass = symbol->u.syment.n_sclass; if (coff_backend_info (abfd)->_bfd_coff_pointerize_aux_hook) { @@ -1390,16 +1403,17 @@ coff_pointerize_aux (bfd *abfd, } /* Don't bother if this is a file or a section. */ - if (class == C_STAT && type == T_NULL) + if (n_sclass == C_STAT && type == T_NULL) return; - if (class == C_FILE) + if (n_sclass == C_FILE) return; /* Otherwise patch up. */ #define N_TMASK coff_data (abfd)->local_n_tmask #define N_BTSHFT coff_data (abfd)->local_n_btshft - if ((ISFCN (type) || ISTAG (class) || class == C_BLOCK || class == C_FCN) + if ((ISFCN (type) || ISTAG (n_sclass) || n_sclass == C_BLOCK + || n_sclass == C_FCN) && auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l > 0) { auxent->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p = @@ -1436,7 +1450,7 @@ build_debug_section (bfd *abfd) } sec_size = sect->size; - debug_section = bfd_alloc (abfd, sec_size); + debug_section = (char *) bfd_alloc (abfd, sec_size); if (debug_section == NULL) return NULL; @@ -1466,7 +1480,7 @@ copy_name (bfd *abfd, char *name, size_t maxlen) if (name[len] == '\0') break; - if ((newname = bfd_alloc (abfd, (bfd_size_type) len + 1)) == NULL) + if ((newname = (char *) bfd_alloc (abfd, (bfd_size_type) len + 1)) == NULL) return NULL; strncpy (newname, name, len); @@ -1561,7 +1575,7 @@ _bfd_coff_read_string_table (bfd *abfd) return NULL; } - strings = bfd_malloc (strsize); + strings = (char *) bfd_malloc (strsize); if (strings == NULL) return NULL; @@ -1620,7 +1634,7 @@ coff_get_normalized_symtab (bfd *abfd) return obj_raw_syments (abfd); size = obj_raw_syment_count (abfd) * sizeof (combined_entry_type); - internal = bfd_zalloc (abfd, size); + internal = (combined_entry_type *) bfd_zalloc (abfd, size); if (internal == NULL && size != 0) return NULL; internal_end = internal + obj_raw_syment_count (abfd); @@ -1726,7 +1740,7 @@ coff_get_normalized_symtab (bfd *abfd) if (internal_ptr->u.syment._n._n_name[i] == '\0') break; - newstring = bfd_zalloc (abfd, (bfd_size_type) (i + 1)); + newstring = (char *) bfd_zalloc (abfd, (bfd_size_type) (i + 1)); if (newstring == NULL) return NULL; strncpy (newstring, internal_ptr->u.syment._n._n_name, i); @@ -1784,17 +1798,17 @@ asymbol * coff_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (coff_symbol_type); - coff_symbol_type *new = bfd_zalloc (abfd, amt); + coff_symbol_type *new_symbol = (coff_symbol_type *) bfd_zalloc (abfd, amt); - if (new == NULL) + if (new_symbol == NULL) return NULL; - new->symbol.section = 0; - new->native = 0; - new->lineno = NULL; - new->done_lineno = FALSE; - new->symbol.the_bfd = abfd; + new_symbol->symbol.section = 0; + new_symbol->native = 0; + new_symbol->lineno = NULL; + new_symbol->done_lineno = FALSE; + new_symbol->symbol.the_bfd = abfd; - return & new->symbol; + return & new_symbol->symbol; } /* Make a debugging symbol. */ @@ -1805,23 +1819,23 @@ coff_bfd_make_debug_symbol (bfd *abfd, unsigned long sz ATTRIBUTE_UNUSED) { bfd_size_type amt = sizeof (coff_symbol_type); - coff_symbol_type *new = bfd_alloc (abfd, amt); + coff_symbol_type *new_symbol = (coff_symbol_type *) bfd_alloc (abfd, amt); - if (new == NULL) + if (new_symbol == NULL) return NULL; /* @@ The 10 is a guess at a plausible maximum number of aux entries (but shouldn't be a constant). */ amt = sizeof (combined_entry_type) * 10; - new->native = bfd_zalloc (abfd, amt); - if (!new->native) + new_symbol->native = (combined_entry_type *) bfd_zalloc (abfd, amt); + if (!new_symbol->native) return NULL; - new->symbol.section = bfd_abs_section_ptr; - new->symbol.flags = BSF_DEBUGGING; - new->lineno = NULL; - new->done_lineno = FALSE; - new->symbol.the_bfd = abfd; + new_symbol->symbol.section = bfd_abs_section_ptr; + new_symbol->symbol.flags = BSF_DEBUGGING; + new_symbol->lineno = NULL; + new_symbol->done_lineno = FALSE; + new_symbol->symbol.the_bfd = abfd; - return & new->symbol; + return & new_symbol->symbol; } void @@ -1949,16 +1963,7 @@ coff_print_symbol (bfd *abfd, combined->u.syment.n_type, combined->u.syment.n_sclass, combined->u.syment.n_numaux); -#ifdef BFD64 - /* fprintf_vma() on a 64-bit enabled host will always print a 64-bit - value, but really we want to display the address in the target's - address size. Since we do not have a field in the bfd structure - to tell us this, we take a guess, based on the target's name. */ - if (strstr (bfd_get_target (abfd), "64") == NULL) - fprintf (file, "%08lx", (unsigned long) (val & 0xffffffff)); - else -#endif - fprintf_vma (file, val); + bfd_fprintf_vma (abfd, file, val); fprintf (file, " %s", symbol->name); for (aux = 0; aux < combined->u.syment.n_numaux; aux++) @@ -2001,6 +2006,7 @@ coff_print_symbol (bfd *abfd, } /* Otherwise fall through. */ case C_EXT: + case C_AIX_WEAKEXT: if (ISFCN (combined->u.syment.n_type)) { long next, llnos; @@ -2040,7 +2046,7 @@ coff_print_symbol (bfd *abfd, while (l->line_number) { fprintf (file, "\n%4d : ", l->line_number); - fprintf_vma (file, l->u.offset + symbol->section->vma); + bfd_fprintf_vma (abfd, file, l->u.offset + symbol->section->vma); l++; } } @@ -2314,7 +2320,7 @@ coff_sizeof_headers (bfd *abfd, struct bfd_link_info *info) bfd_boolean bfd_coff_set_symbol_class (bfd * abfd, asymbol * symbol, - unsigned int class) + unsigned int symbol_class) { coff_symbol_type * csym; @@ -2334,12 +2340,12 @@ bfd_coff_set_symbol_class (bfd * abfd, combined_entry_type * native; bfd_size_type amt = sizeof (* native); - native = bfd_zalloc (abfd, amt); + native = (combined_entry_type *) bfd_zalloc (abfd, amt); if (native == NULL) return FALSE; native->u.syment.n_type = T_NULL; - native->u.syment.n_sclass = class; + native->u.syment.n_sclass = symbol_class; if (bfd_is_und_section (symbol->section)) { @@ -2368,7 +2374,7 @@ bfd_coff_set_symbol_class (bfd * abfd, csym->native = native; } else - csym->native->u.syment.n_sclass = class; + csym->native->u.syment.n_sclass = symbol_class; return TRUE; } diff --git a/cegcc/src/binutils/bfd/cofflink.c b/cegcc/src/binutils/bfd/cofflink.c index d77116826..a29b68795 100644 --- a/cegcc/src/binutils/bfd/cofflink.c +++ b/cegcc/src/binutils/bfd/cofflink.c @@ -1,6 +1,6 @@ /* COFF specific linker code. Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -79,7 +79,7 @@ _bfd_coff_link_hash_newfunc (struct bfd_hash_entry *entry, /* Set local fields. */ ret->indx = -1; ret->type = T_NULL; - ret->class = C_NULL; + ret->symbol_class = C_NULL; ret->numaux = 0; ret->auxbfd = NULL; ret->aux = NULL; @@ -110,7 +110,7 @@ _bfd_coff_link_hash_table_create (bfd *abfd) struct coff_link_hash_table *ret; bfd_size_type amt = sizeof (struct coff_link_hash_table); - ret = bfd_malloc (amt); + ret = (struct coff_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; @@ -320,7 +320,7 @@ coff_link_add_symbols (bfd *abfd, /* We keep a list of the linker hash table entries that correspond to particular symbols. */ amt = symcount * sizeof (struct coff_link_hash_entry *); - sym_hash = bfd_zalloc (abfd, amt); + sym_hash = (struct coff_link_hash_entry **) bfd_zalloc (abfd, amt); if (sym_hash == NULL) goto error_return; obj_coff_sym_hashes (abfd) = sym_hash; @@ -488,14 +488,14 @@ coff_link_add_symbols (bfd *abfd, the hash table, or if we are looking at a symbol definition, then update the symbol class and type in the hash table. */ - if (((*sym_hash)->class == C_NULL + if (((*sym_hash)->symbol_class == C_NULL && (*sym_hash)->type == T_NULL) || sym.n_scnum != 0 || (sym.n_value != 0 && (*sym_hash)->root.type != bfd_link_hash_defined && (*sym_hash)->root.type != bfd_link_hash_defweak)) { - (*sym_hash)->class = sym.n_sclass; + (*sym_hash)->symbol_class = sym.n_sclass; if (sym.n_type != T_NULL) { /* We want to warn if the type changed, but not @@ -772,7 +772,7 @@ _bfd_coff_final_link (bfd *abfd, the target_index fields are 1 based. */ amt = abfd->section_count + 1; amt *= sizeof (struct coff_link_section_info); - finfo.section_info = bfd_malloc (amt); + finfo.section_info = (struct coff_link_section_info *) bfd_malloc (amt); if (finfo.section_info == NULL) goto error_return; for (i = 0; i <= abfd->section_count; i++) @@ -815,10 +815,12 @@ _bfd_coff_final_link (bfd *abfd, BFD_ASSERT (info->relocatable); amt = o->reloc_count; amt *= sizeof (struct internal_reloc); - finfo.section_info[o->target_index].relocs = bfd_malloc (amt); + finfo.section_info[o->target_index].relocs = + (struct internal_reloc *) bfd_malloc (amt); amt = o->reloc_count; amt *= sizeof (struct coff_link_hash_entry *); - finfo.section_info[o->target_index].rel_hashes = bfd_malloc (amt); + finfo.section_info[o->target_index].rel_hashes = + (struct coff_link_hash_entry **) bfd_malloc (amt); if (finfo.section_info[o->target_index].relocs == NULL || finfo.section_info[o->target_index].rel_hashes == NULL) goto error_return; @@ -851,21 +853,21 @@ _bfd_coff_final_link (bfd *abfd, /* Allocate some buffers used while linking. */ amt = max_sym_count * sizeof (struct internal_syment); - finfo.internal_syms = bfd_malloc (amt); + finfo.internal_syms = (struct internal_syment *) bfd_malloc (amt); amt = max_sym_count * sizeof (asection *); - finfo.sec_ptrs = bfd_malloc (amt); + finfo.sec_ptrs = (asection **) bfd_malloc (amt); amt = max_sym_count * sizeof (long); - finfo.sym_indices = bfd_malloc (amt); - finfo.outsyms = bfd_malloc ((max_sym_count + 1) * symesz); + finfo.sym_indices = (long int *) bfd_malloc (amt); + finfo.outsyms = (bfd_byte *) bfd_malloc ((max_sym_count + 1) * symesz); amt = max_lineno_count * bfd_coff_linesz (abfd); - finfo.linenos = bfd_malloc (amt); - finfo.contents = bfd_malloc (max_contents_size); + finfo.linenos = (bfd_byte *) bfd_malloc (amt); + finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size); amt = max_reloc_count * relsz; - finfo.external_relocs = bfd_malloc (amt); + finfo.external_relocs = (bfd_byte *) bfd_malloc (amt); if (! info->relocatable) { amt = max_reloc_count * sizeof (struct internal_reloc); - finfo.internal_relocs = bfd_malloc (amt); + finfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt); } if ((finfo.internal_syms == NULL && max_sym_count > 0) || (finfo.sec_ptrs == NULL && max_sym_count > 0) @@ -1015,7 +1017,7 @@ _bfd_coff_final_link (bfd *abfd, the symbol indices to use for relocs against them, and we can finally write out the relocs. */ amt = max_output_reloc_count * relsz; - external_relocs = bfd_malloc (amt); + external_relocs = (bfd_byte *) bfd_malloc (amt); if (external_relocs == NULL) goto error_return; @@ -1282,6 +1284,15 @@ process_embedded_commands (bfd *output_bfd, else if (CONST_STRNEQ (s, "-stack")) s = dores_com (s + 6, output_bfd, 0); + /* GNU extension for aligned commons. */ + else if (CONST_STRNEQ (s, "-aligncomm:")) + { + /* Common symbols must be aligned on reading, as it + is too late to do anything here, after they have + already been allocated, so just skip the directive. */ + s += 11; + } + else s++; } @@ -1503,11 +1514,13 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd) /* Skip section symbols for sections which are not going to be emitted. */ if (!skip - && dont_skip_symbol == 0 + && !dont_skip_symbol && isym.n_sclass == C_STAT && isym.n_type == T_NULL - && isym.n_numaux > 0 - && (*secpp)->output_section == bfd_abs_section_ptr) + && isym.n_numaux > 0 + && ((*secpp)->output_section == bfd_abs_section_ptr + || bfd_section_removed_from_list (output_bfd, + (*secpp)->output_section))) skip = TRUE; #endif @@ -1593,10 +1606,10 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd) out to be a duplicate, we pass this address to bfd_release. */ amt = sizeof (struct coff_debug_merge_type); - mt = bfd_alloc (input_bfd, amt); + mt = (struct coff_debug_merge_type *) bfd_alloc (input_bfd, amt); if (mt == NULL) return FALSE; - mt->class = isym.n_sclass; + mt->type_class = isym.n_sclass; /* Pick up the aux entry, which points to the end of the tag entries. */ @@ -1620,7 +1633,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd) bfd_coff_swap_sym_in (input_bfd, esl, islp); amt = sizeof (struct coff_debug_merge_element); - *epp = bfd_alloc (input_bfd, amt); + *epp = (struct coff_debug_merge_element *) + bfd_alloc (input_bfd, amt); if (*epp == NULL) return FALSE; @@ -1630,7 +1644,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd) return FALSE; amt = strlen (elename) + 1; - name_copy = bfd_alloc (input_bfd, amt); + name_copy = (char *) bfd_alloc (input_bfd, amt); if (name_copy == NULL) return FALSE; strcpy (name_copy, elename); @@ -1685,7 +1699,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd) { struct coff_debug_merge_element *me, *mel; - if (mtl->class != mt->class) + if (mtl->type_class != mt->type_class) continue; for (me = mt->elements, mel = mtl->elements; @@ -2547,7 +2561,7 @@ _bfd_coff_write_global_sym (struct coff_link_hash_entry *h, void *data) isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx; } - isym.n_sclass = h->class; + isym.n_sclass = h->symbol_class; isym.n_type = h->type; if (isym.n_sclass == C_NULL) @@ -2720,7 +2734,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd, file_ptr loc; size = bfd_get_reloc_size (howto); - buf = bfd_zmalloc (size); + buf = (bfd_byte *) bfd_zmalloc (size); if (buf == NULL) return FALSE; @@ -2933,7 +2947,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, else if (h->root.type == bfd_link_hash_undefweak) { - if (h->class == C_NT_WEAK && h->numaux == 1) + if (h->symbol_class == C_NT_WEAK && h->numaux == 1) { /* See _Microsoft Portable Executable and Common Object File Format Specification_, section 5.5.3. @@ -2947,7 +2961,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, See also linker.c: generic_link_check_archive_element. */ asection *sec; struct coff_link_hash_entry *h2 = - input_bfd->tdata.coff_obj_data->sym_hashes[ + h->auxbfd->tdata.coff_obj_data->sym_hashes[ h->aux->x_sym.x_tagndx.l]; if (!h2 || h2->root.type == bfd_link_hash_undefined) diff --git a/cegcc/src/binutils/bfd/coffswap.h b/cegcc/src/binutils/bfd/coffswap.h index 8e1911f54..674fdc779 100644 --- a/cegcc/src/binutils/bfd/coffswap.h +++ b/cegcc/src/binutils/bfd/coffswap.h @@ -1,6 +1,6 @@ /* Generic COFF swapping routines, for BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, - 2001, 2002, 2005, 2007 + 2001, 2002, 2004, 2005, 2007 Free Software Foundation, Inc. Written by Cygnus Support. @@ -382,7 +382,7 @@ static void coff_swap_aux_in (bfd *abfd, void * ext1, int type, - int class, + int in_class, int indx, int numaux, void * in1) @@ -391,10 +391,10 @@ coff_swap_aux_in (bfd *abfd, union internal_auxent *in = (union internal_auxent *) in1; #ifdef COFF_ADJUST_AUX_IN_PRE - COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, class, indx, numaux, in1); + COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1); #endif - switch (class) + switch (in_class) { case C_FILE: if (ext->x_file.x_fname[0] == 0) @@ -446,7 +446,8 @@ coff_swap_aux_in (bfd *abfd, in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); #endif - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext); @@ -477,7 +478,7 @@ coff_swap_aux_in (bfd *abfd, end: ; #ifdef COFF_ADJUST_AUX_IN_POST - COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, class, indx, numaux, in1); + COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1); #endif } @@ -485,7 +486,7 @@ static unsigned int coff_swap_aux_out (bfd * abfd, void * inp, int type, - int class, + int in_class, int indx ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED, void * extp) @@ -494,12 +495,12 @@ coff_swap_aux_out (bfd * abfd, AUXENT *ext = (AUXENT *) extp; #ifdef COFF_ADJUST_AUX_OUT_PRE - COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, class, indx, numaux, extp); + COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp); #endif memset (ext, 0, AUXESZ); - switch (class) + switch (in_class) { case C_FILE: if (in->x_file.x_fname[0] == 0) @@ -537,7 +538,8 @@ coff_swap_aux_out (bfd * abfd, H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); #endif - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext); @@ -567,7 +569,7 @@ coff_swap_aux_out (bfd * abfd, end: #ifdef COFF_ADJUST_AUX_OUT_POST - COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, class, indx, numaux, extp); + COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp); #endif return AUXESZ; } diff --git a/cegcc/src/binutils/bfd/compress.c b/cegcc/src/binutils/bfd/compress.c index a2fcff7d3..5b6ee0e6c 100644 --- a/cegcc/src/binutils/bfd/compress.c +++ b/cegcc/src/binutils/bfd/compress.c @@ -89,7 +89,7 @@ bfd_uncompress_section_contents (bfd_byte **buffer, bfd_size_type *size) strm.avail_in = compressed_size - header_size; strm.next_in = (Bytef*) compressed_buffer + header_size; strm.avail_out = uncompressed_size; - uncompressed_buffer = bfd_malloc (uncompressed_size); + uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size); if (! uncompressed_buffer) return FALSE; diff --git a/cegcc/src/binutils/bfd/config.bfd b/cegcc/src/binutils/bfd/config.bfd index 11b7e8de9..551d44c05 100644 --- a/cegcc/src/binutils/bfd/config.bfd +++ b/cegcc/src/binutils/bfd/config.bfd @@ -91,6 +91,7 @@ m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;; m68*) targ_archs=bfd_m68k_arch ;; m88*) targ_archs=bfd_m88k_arch ;; maxq*) targ_archs=bfd_maxq_arch ;; +microblaze*) targ_archs=bfd_microblaze_arch ;; mips*) targ_archs=bfd_mips_arch ;; or32*) targ_archs=bfd_or32_arch ;; pdp11*) targ_archs=bfd_pdp11_arch ;; @@ -137,6 +138,11 @@ case "${targ}" in exit 1 ;; + plugin) + targ_defvec=plugin_vec + targ_selvecs="plugin_vec" + ;; + # START OF targmatch.h #ifdef BFD64 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) @@ -179,7 +185,7 @@ case "${targ}" in ;; ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu) targ_defvec=bfd_elf64_ia64_little_vec - targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec bfd_efi_bsdrv_ia64_vec bfd_efi_rtdrv_ia64_vec" + targ_selvecs="bfd_elf64_ia64_big_vec bfd_pei_ia64_vec" want64=true ;; ia64*-*-hpux*) @@ -413,6 +419,10 @@ case "${targ}" in targ_selvecs=bfd_elf32_frv_vec ;; + moxie-*-elf | moxie-*-uclinux) + targ_defvec=bfd_elf32_moxie_vec + ;; + h8300*-*-rtemscoff*) targ_defvec=h8300coff_vec targ_underscore=yes @@ -491,13 +501,13 @@ case "${targ}" in i[3-7]86-*-solaris2*) targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386coff_vec - targ64_selvecs=bfd_elf64_x86_64_vec + targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec" want64=true ;; #ifdef BFD64 x86_64-*-solaris2*) targ_defvec=bfd_elf32_i386_vec - targ_selvecs="bfd_elf64_x86_64_vec i386coff_vec" + targ_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec i386coff_vec" want64=true ;; #endif @@ -517,7 +527,7 @@ case "${targ}" in ;; i[3-7]86-*-dicos*) targ_defvec=bfd_elf32_i386_vec - targ64_selvecs=bfd_elf64_x86_64_vec + targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec" ;; *-*-msdosdjgpp* | *-*-go32* ) targ_defvec=go32coff_vec @@ -532,8 +542,8 @@ case "${targ}" in targ_selvecs="i386coff_vec i386aout_vec" ;; i[3-7]86-*-darwin* | i[3-7]86-*-macos10* | i[3-7]86-*-rhapsody*) - targ_defvec=mach_o_le_vec - targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" + targ_defvec=mach_o_i386_vec + targ_selvecs="mach_o_i386_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" targ_archs="bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch" ;; i[3-7]86-sequent-bsd*) @@ -552,8 +562,8 @@ case "${targ}" in ;; i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu | i[3-7]86-*-dragonfly*) targ_defvec=bfd_elf32_i386_freebsd_vec - targ_selvecs="bfd_elf32_i386_vec bfd_efi_app_ia32_vec bfd_efi_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec i386coff_vec" - targ64_selvecs="bfd_elf64_x86_64_freebsd_vec bfd_elf64_x86_64_vec bfd_efi_app_x86_64_vec bfd_efi_bsdrv_x86_64_vec bfd_efi_rtdrv_x86_64_vec" + targ_selvecs="bfd_elf32_i386_vec i386pei_vec i386coff_vec" + targ64_selvecs="bfd_elf64_x86_64_freebsd_vec bfd_elf64_x86_64_vec x86_64pei_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec" # FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling. case "${targ}" in i[3-7]86-*-freebsd3* | i[3-7]86-*-freebsd4 | i[3-7]86-*-freebsd4.0*) @@ -563,7 +573,7 @@ case "${targ}" in i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu) targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386netbsd_vec - targ64_selvecs=bfd_elf64_x86_64_vec + targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec" ;; i[3-7]86-*-netbsdpe*) targ_defvec=i386pe_vec @@ -590,44 +600,44 @@ case "${targ}" in ;; i[3-7]86-*-linux-*) targ_defvec=bfd_elf32_i386_vec - targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec bfd_efi_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec" - targ64_selvecs=bfd_elf64_x86_64_vec + targ_selvecs="i386linux_vec i386pei_vec" + targ64_selvecs="bfd_elf64_x86_64_vec bfd_elf64_l1om_vec" ;; #ifdef BFD64 x86_64-*-darwin*) targ_defvec=mach_o_le_vec - targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" + targ_selvecs="mach_o_i386_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" targ_archs="bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch" want64=true ;; x86_64-*-dicos*) targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec" + targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec" want64=true ;; x86_64-*-elf*) targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386coff_vec" + targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec i386coff_vec" want64=true ;; x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) targ_defvec=bfd_elf64_x86_64_freebsd_vec - targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec bfd_efi_app_ia32_vec bfd_efi_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec bfd_efi_app_x86_64_vec bfd_efi_bsdrv_x86_64_vec bfd_efi_rtdrv_x86_64_vec bfd_elf32_i386_vec bfd_elf64_x86_64_vec" + targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec i386pei_vec x86_64pei_vec bfd_elf32_i386_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_l1om_freebsd_vec" want64=true ;; x86_64-*-netbsd* | x86_64-*-openbsd*) targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec bfd_efi_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec bfd_efi_app_x86_64_vec bfd_efi_bsdrv_x86_64_vec bfd_efi_rtdrv_x86_64_vec" + targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec" want64=true ;; x86_64-*-linux-*) targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec bfd_efi_bsdrv_ia32_vec bfd_efi_rtdrv_ia32_vec bfd_efi_app_x86_64_vec bfd_efi_bsdrv_x86_64_vec bfd_efi_rtdrv_x86_64_vec" + targ_selvecs="bfd_elf32_i386_vec i386linux_vec i386pei_vec x86_64pei_vec bfd_elf64_l1om_vec" want64=true ;; x86_64-*-mingw*) targ_defvec=x86_64pe_vec - targ_selvecs="x86_64pe_vec x86_64pei_vec bfd_elf64_x86_64_vec" + targ_selvecs="x86_64pe_vec x86_64pei_vec bfd_elf64_x86_64_vec bfd_elf64_l1om_vec" want64=true targ_underscore=yes ;; @@ -890,6 +900,10 @@ case "${targ}" in targ_selvecs=bfd_elf32_mep_little_vec ;; + microblaze*-*) + targ_defvec=bfd_elf32_microblaze_vec + ;; + mips*-big-*) targ_defvec=ecoff_big_vec targ_selvecs=ecoff_little_vec @@ -1081,14 +1095,14 @@ case "${targ}" in want64=true ;; #endif - powerpc-*-aix5*) + powerpc-*-aix[5-9]*) targ_cflags=-DAIX_WEAK_SUPPORT targ_defvec=rs6000coff_vec targ_selvecs="aix5coff64_vec" want64=true ;; #ifdef BFD64 - powerpc64-*-aix5*) + powerpc64-*-aix[5-9]*) targ_cflags=-DAIX_WEAK_SUPPORT targ_defvec=aix5coff64_vec targ_selvecs="rs6000coff_vec" @@ -1177,6 +1191,11 @@ case "${targ}" in targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec" ;; + rx-*-elf) + targ_defvec=bfd_elf32_rx_le_vec + targ_selvecs="bfd_elf32_rx_be_vec bfd_elf32_rx_le_vec" + ;; + s390-*-linux*) targ_defvec=bfd_elf32_s390_vec targ64_selvecs=bfd_elf64_s390_vec @@ -1192,14 +1211,12 @@ case "${targ}" in targ_defvec=bfd_elf64_s390_vec want64=true ;; -#endif score*-*-elf*) targ_defvec=bfd_elf32_bigscore_vec targ_selvecs=bfd_elf32_littlescore_vec ;; -#ifdef BFD64 sh64l*-*-elf*) targ_defvec=bfd_elf32_sh64l_vec targ_selvecs="bfd_elf32_sh64_vec bfd_elf64_sh64l_vec bfd_elf64_sh64_vec bfd_elf32_shl_vec bfd_elf32_sh_vec" @@ -1566,3 +1583,10 @@ case "${targ_defvec} ${targ_selvecs}" in targ_selvecs="${targ_selvecs} bfd_elf32_little_generic_vec bfd_elf32_big_generic_vec" ;; esac + +# If we support Intel L1OM target, then add support for bfd_l1om_arch. +case "${targ_defvec} ${targ_selvecs}" in + *bfd_elf64_l1om_vec*) + targ_archs="$targ_archs bfd_l1om_arch" + ;; +esac diff --git a/cegcc/src/binutils/bfd/config.in b/cegcc/src/binutils/bfd/config.in index d1797aedf..3cb2bfc67 100644 --- a/cegcc/src/binutils/bfd/config.in +++ b/cegcc/src/binutils/bfd/config.in @@ -249,28 +249,31 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* The size of a `char', as computed by sizeof. */ +/* The size of `char', as computed by sizeof. */ #undef SIZEOF_CHAR -/* The size of a `int', as computed by sizeof. */ +/* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT -/* The size of a `long', as computed by sizeof. */ +/* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG -/* The size of a `long long', as computed by sizeof. */ +/* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The size of a `off_t', as computed by sizeof. */ +/* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T -/* The size of a `short', as computed by sizeof. */ +/* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT -/* The size of a `void *', as computed by sizeof. */ +/* The size of `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P /* Define to 1 if you have the ANSI C header files. */ @@ -297,30 +300,6 @@ /* Define if we may generate symbols with ELF's STT_COMMON type */ #undef USE_STT_COMMON -/* Version number of package */ -#undef VERSION - -/* Number of bits in a file offset, on hosts where this is settable. */ -#undef _FILE_OFFSET_BITS - -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif - -/* Define for large files, on AIX-style hosts. */ -#undef _LARGE_FILES - -/* Define to 1 if on MINIX. */ -#undef _MINIX - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE @@ -342,3 +321,22 @@ # undef __EXTENSIONS__ #endif + +/* Version number of package */ +#undef VERSION + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE diff --git a/cegcc/src/binutils/bfd/configure b/cegcc/src/binutils/bfd/configure index 80e5eaf6a..d5aec7417 100755 --- a/cegcc/src/binutils/bfd/configure +++ b/cegcc/src/binutils/bfd/configure @@ -1,81 +1,413 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.64. +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. # -# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi -DUALCASE=1; export DUALCASE # for MKS sh -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_unset $as_var + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." fi -done + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -83,146 +415,107 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - as_expr=false + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,16 +524,6 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} @@ -390,28 +673,24 @@ fi +exec 7<&0 &1 + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= @@ -419,52 +698,259 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="libbfd.c" # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S OBJDUMP ac_ct_OBJDUMP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 DEBUGDIR PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI WARN_CFLAGS NO_WERROR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GENINSRC_NEVER_TRUE GENINSRC_NEVER_FALSE INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE HDEFINES BFD_HOST_64BIT_LONG BFD_HOST_64BIT_LONG_LONG BFD_HOST_64_BIT_DEFINED BFD_HOST_64_BIT BFD_HOST_U_64_BIT BFD_HOSTPTR_T CC_FOR_BUILD EXEEXT_FOR_BUILD COREFILE COREFLAG SHARED_LDFLAGS SHARED_LIBADD TDEFINES wordsize bfd64_libs all_backends bfd_backends bfd_machines bfd_default_target_size bfd_file_ptr bfd_ufile_ptr tdefaults datarootdir docdir htmldir pdfdir LIBOBJS LTLIBOBJS' +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +tdefaults +bfd_ufile_ptr +bfd_file_ptr +supports_plugins +bfd_default_target_size +bfd_machines +bfd_backends +all_backends +bfd64_libs +wordsize +TDEFINES +SHARED_LIBADD +SHARED_LDFLAGS +LIBM +COREFLAG +COREFILE +EXEEXT_FOR_BUILD +CC_FOR_BUILD +BFD_HOSTPTR_T +BFD_HOST_U_64_BIT +BFD_HOST_64_BIT +BFD_HOST_64_BIT_DEFINED +BFD_HOST_64BIT_LONG_LONG +BFD_HOST_64BIT_LONG +HDEFINES +MSGMERGE +MSGFMT +MKINSTALLDIRS +CATOBJEXT +GENCAT +INSTOBJEXT +DATADIRNAME +CATALOGS +POSUB +GMSGFMT +XGETTEXT +INCINTL +LIBINTL_DEP +LIBINTL +USE_NLS +bfdincludedir +bfdlibdir +target_noncanonical +host_noncanonical +INSTALL_LIBBFD_FALSE +INSTALL_LIBBFD_TRUE +GENINSRC_NEVER_FALSE +GENINSRC_NEVER_TRUE +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +NO_WERROR +WARN_CFLAGS +REPORT_BUGS_TEXI +REPORT_BUGS_TO +PKGVERSION +DEBUGDIR +PLUGINS_FALSE +PLUGINS_TRUE +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +lt_ECHO +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +SED +LIBTOOL +EGREP +GREP +CPP +RANLIB +AR +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' -ac_pwd=`pwd` +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +enable_libtool_lock +enable_plugins +enable_largefile +enable_64_bit_bfd +enable_targets +with_mmap +enable_secureplt +with_separate_debug_dir +enable_elf_stt_common +with_pkgversion +with_bugurl +enable_werror +enable_build_warnings +enable_maintainer_mode +enable_install_libbfd +enable_nls +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -487,34 +973,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -536,33 +1036,59 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -589,6 +1115,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -613,13 +1145,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -684,6 +1219,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -734,26 +1279,36 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -773,26 +1328,25 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -801,31 +1355,36 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac -done +fi -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var + # Remove trailing slashes. case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -839,7 +1398,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -852,74 +1411,72 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error "pwd does not report name of working directory" + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -948,14 +1505,11 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -965,18 +1519,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -998,18 +1559,18 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] - build shared libraries [default=no] - --disable-largefile omit support for large files - --enable-static[=PKGS] - build static libraries [default=yes] + --enable-shared[=PKGS] build shared libraries [default=no] + --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-plugins Enable support for plugins (defaults no) + --disable-largefile omit support for large files --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) --enable-targets alternative target configurations --enable-secureplt Default to creating read-only plt entries @@ -1040,743 +1601,1343 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.64 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - $ $0 $@ +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## -_ACEOF +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +} # ac_fn_c_try_compile -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -} >&5 +} # ac_fn_c_try_link -cat >&5 <<_ACEOF +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -## ----------- ## -## Core tests. ## -## ----------- ## +} # ac_fn_c_try_cpp +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo +} # ac_fn_c_check_header_mongrel - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () { - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi +} # ac_fn_c_try_run - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +} # ac_fn_c_check_header_compile -# Predefined preprocessor variables. +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +#undef $2 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" +int +main () +{ +return $2 (); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_func -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0 -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; - esac - fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0 -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -echo "$as_me: former value: \`$ac_old_val'" >&2;} - { echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_type +# ac_fn_c_check_decl LINENO SYMBOL VAR +# ------------------------------------ +# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 +$as_echo_n "checking whether $2 is declared... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $2 + (void) $2; +#endif -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +} # ac_fn_c_check_decl +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +It was created by $as_me, which was +generated by GNU Autoconf 2.64. Invocation command line was -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } + $ $0 $@ -fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` -echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6 -if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_target_alias=$target_alias -test "x$ac_cv_target_alias" = "x" && - ac_cv_target_alias=$ac_cv_host_alias -ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} - { (exit 1); exit 1; }; } +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` -fi -echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6 -target=$ac_cv_target -target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +_ASUNAME -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +} >&5 -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +cat >&5 <<_ACEOF -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi +## ----------- ## +## Core tests. ## +## ----------- ## -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac fi done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi + fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if test "${ac_cv_target+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1787,18 +2948,19 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1816,24 +2978,25 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1843,39 +3006,41 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1885,68 +3050,78 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -1958,116 +3133,142 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else - echo "$as_me: failed program was:" >&5 + ac_file='' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then : + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } fi - ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2075,40 +3276,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2120,47 +3312,46 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2174,55 +3365,34 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2233,39 +3403,49 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ -ac_cv_prog_cc_g=no + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2281,18 +3461,14 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -2320,12 +3496,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2340,205 +3521,37 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi -rm -f conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2546,134 +3559,65 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for library containing strerror" >&5 -echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 -if test "${ac_cv_search_strerror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 +$as_echo_n "checking for library containing strerror... " >&6; } +if test "${ac_cv_search_strerror+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_strerror=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char strerror (); int main () { -strerror (); +return strerror (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_strerror="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_strerror" = no; then - for ac_lib in cposix; do +for ac_lib in '' cposix; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_strerror=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_strerror+set}" = set; then : + break +fi +done +if test "${ac_cv_search_strerror+set}" = set; then : -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strerror (); -int -main () -{ -strerror (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_strerror="-l$ac_lib" -break else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done + ac_cv_search_strerror=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 -echo "${ECHO_T}$ac_cv_search_strerror" >&6 -if test "$ac_cv_search_strerror" != no; then - test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 +$as_echo "$ac_cv_search_strerror" >&6; } +ac_res=$ac_cv_search_strerror +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -am__api_version="1.9" +am__api_version='1.11' + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -2688,22 +3632,22 @@ am__api_version="1.9" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -2711,7 +3655,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2739,9 +3683,11 @@ case $as_dir/ in done ;; esac -done -rm -rf conftest.one conftest.two conftest.dir + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -2754,8 +3700,8 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2765,21 +3711,34 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ @@ -2789,11 +3748,8 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file @@ -2802,81 +3758,206 @@ then # Ok. : else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && - program_transform_name="s,^,$program_prefix,;$program_transform_name" + program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$,$program_suffix,;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm conftest.sed +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" else - mkdir_p='$(install_sh) -d' + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -2886,55 +3967,59 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$AWK" && break done -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2949,60 +4034,58 @@ rmdir .tst 2>/dev/null DEPDIR="${am__leading_dot}deps" - ac_config_commands="$ac_config_commands depfiles" +ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi -echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } rm -f confinc confmf -# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval="$enable_dependency_tracking" +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi -fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -3011,13 +4094,14 @@ else fi - -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi fi # test whether we have cygpath @@ -3032,7 +4116,7 @@ fi # Define the identity of the package. PACKAGE=bfd - VERSION=2.19.51 + VERSION=2.20.51 cat >>confdefs.h <<_ACEOF @@ -3060,96 +4144,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - STRIP=$ac_ct_STRIP -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" - # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. @@ -3163,10 +4157,10 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' depcc="$CC" am_compiler_list= -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -3191,6 +4185,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -3208,7 +4207,17 @@ else done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -3218,18 +4227,23 @@ else break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -3253,13 +4267,11 @@ else fi fi -echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -3275,10 +4287,10 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. @@ -3288,35 +4300,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. @@ -3326,27 +4340,38 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - AR=$ac_ct_AR + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi else AR="$ac_cv_prog_AR" fi @@ -3354,10 +4379,10 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3367,35 +4392,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -3405,37 +4432,46 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - p=${PACKAGE-default} +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; @@ -3454,7 +4490,8 @@ if test "${enable_shared+set}" = set; then esac else enable_shared=no -fi; +fi + @@ -3472,10 +4509,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3485,35 +4522,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3523,39 +4562,50 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3565,99 +4615,60 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + + fi fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC +if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else + ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -3675,24 +4686,25 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -3702,39 +4714,41 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -3744,73 +4758,83 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3824,55 +4848,34 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3883,39 +4886,49 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ -ac_cv_prog_cc_g=no + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3931,18 +4944,14 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3970,12 +4979,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -3990,231 +5004,57 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi -rm -f conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - -cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 -_ACEOF - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -4228,11 +5068,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -4241,68 +5077,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break @@ -4312,7 +5104,7 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -4324,8 +5116,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -4335,11 +5127,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -4348,68 +5136,24 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break @@ -4419,16 +5163,13 @@ rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -4438,31 +5179,142 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4477,51 +5329,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4531,18 +5355,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4552,16 +5372,13 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -4581,109 +5398,40 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -4692,144 +5440,8 @@ done - if test "${ac_cv_header_minix_config_h+set}" = set; then - echo "$as_me:$LINENO: checking for minix/config.h" >&5 -echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 -if test "${ac_cv_header_minix_config_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking minix/config.h usability" >&5 -echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking minix/config.h presence" >&5 -echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for minix/config.h" >&5 -echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 -if test "${ac_cv_header_minix_config_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_minix_config_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 - -fi -if test $ac_cv_header_minix_config_h = yes; then + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = x""yes; then : MINIX=yes else MINIX= @@ -4838,34 +5450,23 @@ fi if test "$MINIX" = yes; then -cat >>confdefs.h <<\_ACEOF -#define _POSIX_SOURCE 1 -_ACEOF +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define _POSIX_1_SOURCE 2 -_ACEOF +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define _MINIX 1 -_ACEOF +$as_echo "#define _MINIX 1" >>confdefs.h fi - - echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 -echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6 -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 @@ -4878,451 +5479,40 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_safe_to_define___extensions__=no + ac_cv_safe_to_define___extensions__=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 -echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && - cat >>confdefs.h <<\_ACEOF -#define __EXTENSIONS__ 1 -_ACEOF + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define _ALL_SOURCE 1 -_ACEOF + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 -_ACEOF + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define _POSIX_PTHREAD_SEMANTICS 1 -_ACEOF + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define _TANDEM_SOURCE 1 -_ACEOF + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h -case "${target}" in - sparc-*-solaris*|i[3-7]86-*-solaris*) - # On native 32bit sparc and ia32 solaris, large-file and procfs support - # are mutually exclusive; and without procfs support, the elf module - # cannot provide certain routines such as elfcore_write_prpsinfo - # or elfcore_write_prstatus. So unless the user explicitly requested - # large-file support through the --enable-largefile switch, disable - # large-file support in favor of procfs support. - if test "${target}" = "${host}" -a "$enable_largefile" != 'yes'; then - enable_largefile="no" - fi - ;; + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac -# Check whether --enable-largefile or --disable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval="$enable_largefile" -fi; -if test "$enable_largefile" != no; then - echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 -echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_largefile_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext - CC="$CC -n32" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_largefile_CC=' -n32'; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_file_offset_bits+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - while :; do - ac_cv_sys_file_offset_bits=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_file_offset_bits=64; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - break -done -fi -echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 -if test "$ac_cv_sys_file_offset_bits" != no; then - -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF - -fi -rm -f conftest* - echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 -echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 -if test "${ac_cv_sys_large_files+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - while :; do - ac_cv_sys_large_files=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_large_files=1; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - break -done -fi -echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 -echo "${ECHO_T}$ac_cv_sys_large_files" >&6 -if test "$ac_cv_sys_large_files" != no; then - -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF - -fi -rm -f conftest* -fi - - -case `pwd` in - *\ * | *\ *) - { echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.2.6' -macro_revision='1.3012' +macro_version='2.2.6' +macro_revision='1.3012' @@ -5338,64 +5528,74 @@ macro_revision='1.3012' ltmain="$ac_aux_dir/ltmain.sh" -echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 -echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 -if test "${lt_cv_path_SED+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if test "${ac_cv_path_SED+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 done done -done + done IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break + if test -z "$ac_cv_path_SED"; then + as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done - +else + ac_cv_path_SED=$SED fi -SED=$lt_cv_path_SED - -echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" @@ -5410,19 +5610,71 @@ Xsed="$SED -e 1s/^X//" -echo "$as_me:$LINENO: checking for fgrep" >&5 -echo $ECHO_N "checking for fgrep... $ECHO_C" >&6 -if test "${ac_cv_prog_fgrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +$as_echo_n "checking for fgrep... " >&6; } +if test "${ac_cv_path_FGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1 - then ac_cv_prog_fgrep='grep -F' - else ac_cv_prog_fgrep='fgrep' + if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 + then ac_cv_path_FGREP="$GREP -F" + else + if test -z "$FGREP"; then + ac_path_FGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in fgrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue +# Check for GNU ac_path_FGREP and select it if it is found. + # Check for GNU $ac_path_FGREP +case `"$ac_path_FGREP" --version 2>&1` in +*GNU*) + ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'FGREP' >> "conftest.nl" + "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_FGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_FGREP="$ac_path_FGREP" + ac_path_FGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_FGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then + as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_FGREP=$FGREP +fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5 -echo "${ECHO_T}$ac_cv_prog_fgrep" >&6 - FGREP=$ac_cv_prog_fgrep +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +$as_echo "$ac_cv_path_FGREP" >&6; } + FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep @@ -5445,18 +5697,18 @@ test -z "$GREP" && GREP=grep -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no -fi; +fi + ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - echo "$as_me:$LINENO: checking for ld used by $CC" >&5 -echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +$as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -5485,14 +5737,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 ;; esac elif test "$with_gnu_ld" = yes; then - echo "$as_me:$LINENO: checking for GNU ld" >&5 -echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } else - echo "$as_me:$LINENO: checking for non-GNU ld" >&5 -echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +$as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${lt_cv_path_LD+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR @@ -5522,19 +5774,17 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - echo "$as_me:$LINENO: result: $LD" >&5 -echo "${ECHO_T}$LD" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 -echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 -if test "${lt_cv_prog_gnu_ld+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${lt_cv_prog_gnu_ld+set}" = set; then : + $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &1 &5 -echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +$as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5558,10 +5808,10 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 -echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6 -if test "${lt_cv_path_NM+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test "${lt_cv_path_NM+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. @@ -5607,8 +5857,8 @@ else : ${lt_cv_path_NM=no} fi fi -echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 -echo "${ECHO_T}$lt_cv_path_NM" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +$as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else @@ -5618,10 +5868,10 @@ else do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_DUMPBIN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DUMPBIN+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. @@ -5631,26 +5881,28 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - echo "$as_me:$LINENO: result: $DUMPBIN" >&5 -echo "${ECHO_T}$DUMPBIN" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +$as_echo "$DUMPBIN" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$DUMPBIN" && break done fi @@ -5660,10 +5912,10 @@ if test -z "$DUMPBIN"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. @@ -5673,31 +5925,42 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 -echo "${ECHO_T}$ac_ct_DUMPBIN" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +$as_echo "$ac_ct_DUMPBIN" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_DUMPBIN" && break done -test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":" - DUMPBIN=$ac_ct_DUMPBIN + if test "x$ac_ct_DUMPBIN" = x; then + DUMPBIN=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DUMPBIN=$ac_ct_DUMPBIN + fi fi @@ -5712,45 +5975,45 @@ test -z "$NM" && NM=nm -echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 -echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6 -if test "${lt_cv_nm_interface+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +$as_echo_n "checking the name lister ($NM) interface... " >&6; } +if test "${lt_cv_nm_interface+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5722: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5985: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5725: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5988: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5728: output\"" >&5) + (eval echo "\"\$as_me:5991: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 -echo "${ECHO_T}$lt_cv_nm_interface" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +$as_echo "$lt_cv_nm_interface" >&6; } -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 -echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 -if test "${lt_cv_sys_max_cmd_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +$as_echo_n "checking the maximum length of command line arguments... " >&6; } +if test "${lt_cv_sys_max_cmd_len+set}" = set; then : + $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" @@ -5867,11 +6130,11 @@ else fi if test -n $lt_cv_sys_max_cmd_len ; then - echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 -echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +$as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - echo "$as_me:$LINENO: result: none" >&5 -echo "${ECHO_T}none" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -5884,8 +6147,8 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 -echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" @@ -5894,18 +6157,18 @@ xsi_shell=no && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes -echo "$as_me:$LINENO: result: $xsi_shell" >&5 -echo "${ECHO_T}$xsi_shell" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } -echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 -echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes -echo "$as_me:$LINENO: result: $lt_shell_append" >&5 -echo "${ECHO_T}$lt_shell_append" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -5939,15 +6202,15 @@ esac -echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 -echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 -if test "${lt_cv_ld_reload_flag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if test "${lt_cv_ld_reload_flag+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi -echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 -echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -5975,10 +6238,10 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. @@ -5988,35 +6251,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - echo "$as_me:$LINENO: result: $OBJDUMP" >&5 -echo "${ECHO_T}$OBJDUMP" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. @@ -6026,28 +6291,38 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false" fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 -echo "${ECHO_T}$ac_ct_OBJDUMP" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - OBJDUMP=$ac_ct_OBJDUMP + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi @@ -6062,10 +6337,10 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 -echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6 -if test "${lt_cv_deplibs_check_method+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +$as_echo_n "checking how to recognize dependent libraries... " >&6; } +if test "${lt_cv_deplibs_check_method+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= @@ -6179,7 +6454,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -6258,8 +6533,8 @@ tpf*) esac fi -echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 -echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -6278,10 +6553,10 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. @@ -6291,35 +6566,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. @@ -6329,28 +6606,38 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - AR=$ac_ct_AR + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi else AR="$ac_cv_prog_AR" fi @@ -6371,10 +6658,10 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. @@ -6384,35 +6671,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. @@ -6422,28 +6711,38 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - STRIP=$ac_ct_STRIP + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi else STRIP="$ac_cv_prog_STRIP" fi @@ -6458,10 +6757,10 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -6471,35 +6770,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -6509,28 +6810,38 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - RANLIB=$ac_ct_RANLIB + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi else RANLIB="$ac_cv_prog_RANLIB" fi @@ -6603,10 +6914,10 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 -echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : + $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. @@ -6721,18 +7032,18 @@ void nm_test_func(void){} int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -6785,11 +7096,11 @@ _LT_EOF lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" @@ -6823,11 +7134,11 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +$as_echo "failed" >&6; } else - echo "$as_me:$LINENO: result: ok" >&5 -echo "${ECHO_T}ok" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } fi @@ -6851,11 +7162,11 @@ fi -# Check whether --enable-libtool-lock or --disable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then - enableval="$enable_libtool_lock" +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi -fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good @@ -6864,11 +7175,11 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" @@ -6882,12 +7193,12 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6885 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + echo '#line 7196 "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) @@ -6921,11 +7232,11 @@ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in @@ -6974,10 +7285,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 -echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 -if test "${lt_cv_cc_needs_belf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +$as_echo_n "checking whether the C compiler needs -belf... " >&6; } +if test "${lt_cv_cc_needs_belf+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6985,11 +7296,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7000,37 +7307,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7038,8 +7321,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 -echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" @@ -7048,11 +7331,11 @@ echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in @@ -7078,10 +7361,10 @@ need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. @@ -7091,35 +7374,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 -echo "${ECHO_T}$DSYMUTIL" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +$as_echo "$DSYMUTIL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. @@ -7129,28 +7414,38 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_DSYMUTIL" && ac_cv_prog_ac_ct_DSYMUTIL=":" fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 -echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +$as_echo "$ac_ct_DSYMUTIL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - DSYMUTIL=$ac_ct_DSYMUTIL + if test "x$ac_ct_DSYMUTIL" = x; then + DSYMUTIL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DSYMUTIL=$ac_ct_DSYMUTIL + fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi @@ -7158,10 +7453,10 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_NMEDIT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_NMEDIT+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. @@ -7171,35 +7466,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - echo "$as_me:$LINENO: result: $NMEDIT" >&5 -echo "${ECHO_T}$NMEDIT" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +$as_echo "$NMEDIT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. @@ -7209,28 +7506,38 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_NMEDIT" && ac_cv_prog_ac_ct_NMEDIT=":" fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 -echo "${ECHO_T}$ac_ct_NMEDIT" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +$as_echo "$ac_ct_NMEDIT" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - NMEDIT=$ac_ct_NMEDIT + if test "x$ac_ct_NMEDIT" = x; then + NMEDIT=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NMEDIT=$ac_ct_NMEDIT + fi else NMEDIT="$ac_cv_prog_NMEDIT" fi @@ -7238,10 +7545,10 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_LIPO+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_LIPO+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. @@ -7251,35 +7558,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - echo "$as_me:$LINENO: result: $LIPO" >&5 -echo "${ECHO_T}$LIPO" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. @@ -7289,28 +7598,38 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_LIPO" && ac_cv_prog_ac_ct_LIPO=":" fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 -echo "${ECHO_T}$ac_ct_LIPO" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +$as_echo "$ac_ct_LIPO" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - LIPO=$ac_ct_LIPO + if test "x$ac_ct_LIPO" = x; then + LIPO=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LIPO=$ac_ct_LIPO + fi else LIPO="$ac_cv_prog_LIPO" fi @@ -7318,10 +7637,10 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_OTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. @@ -7331,35 +7650,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - echo "$as_me:$LINENO: result: $OTOOL" >&5 -echo "${ECHO_T}$OTOOL" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +$as_echo "$OTOOL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. @@ -7369,28 +7690,38 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_OTOOL" && ac_cv_prog_ac_ct_OTOOL=":" fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 -echo "${ECHO_T}$ac_ct_OTOOL" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +$as_echo "$ac_ct_OTOOL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - OTOOL=$ac_ct_OTOOL + if test "x$ac_ct_OTOOL" = x; then + OTOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL=$ac_ct_OTOOL + fi else OTOOL="$ac_cv_prog_OTOOL" fi @@ -7398,10 +7729,10 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_OTOOL64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OTOOL64+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. @@ -7411,35 +7742,37 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - echo "$as_me:$LINENO: result: $OTOOL64" >&5 -echo "${ECHO_T}$OTOOL64" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +$as_echo "$OTOOL64" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. @@ -7449,28 +7782,38 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_OTOOL64" && ac_cv_prog_ac_ct_OTOOL64=":" fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 -echo "${ECHO_T}$ac_ct_OTOOL64" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +$as_echo "$ac_ct_OTOOL64" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - OTOOL64=$ac_ct_OTOOL64 + if test "x$ac_ct_OTOOL64" = x; then + OTOOL64=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OTOOL64=$ac_ct_OTOOL64 + fi else OTOOL64="$ac_cv_prog_OTOOL64" fi @@ -7501,10 +7844,10 @@ fi - echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 -echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6 -if test "${lt_cv_apple_cc_single_mod+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if test "${lt_cv_apple_cc_single_mod+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then @@ -7528,22 +7871,18 @@ else rm -f conftest.* fi fi -echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 -echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6 - echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 -echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6 -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7554,42 +7893,18 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -lt_cv_ld_exported_symbols_list=no + lt_cv_ld_exported_symbols_list=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi -echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 -echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; @@ -7625,61 +7940,13 @@ echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6 ;; esac - for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 _ACEOF fi @@ -7689,20 +7956,18 @@ done # Set options +enable_dlopen=yes - enable_dlopen=no - enable_win32_dll=no - # Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} + # Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; @@ -7721,7 +7986,7 @@ if test "${enable_static+set}" = set; then esac else enable_static=yes -fi; +fi @@ -7731,13 +7996,14 @@ fi; -# Check whether --with-pic or --without-pic was given. -if test "${with_pic+set}" = set; then - withval="$with_pic" - pic_mode="$withval" + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; pic_mode="$withval" else pic_mode=default -fi; +fi + test -z "$pic_mode" && pic_mode=default @@ -7747,10 +8013,9 @@ test -z "$pic_mode" && pic_mode=default - # Check whether --enable-fast-install or --disable-fast-install was given. -if test "${enable_fast_install+set}" = set; then - enableval="$enable_fast_install" - p=${PACKAGE-default} + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; @@ -7769,7 +8034,8 @@ if test "${enable_fast_install+set}" = set; then esac else enable_fast_install=yes -fi; +fi + @@ -7829,10 +8095,10 @@ if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi -echo "$as_me:$LINENO: checking for objdir" >&5 -echo $ECHO_N "checking for objdir... $ECHO_C" >&6 -if test "${lt_cv_objdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +$as_echo_n "checking for objdir... " >&6; } +if test "${lt_cv_objdir+set}" = set; then : + $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null @@ -7844,8 +8110,8 @@ else fi rmdir .libs 2>/dev/null fi -echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 -echo "${ECHO_T}$lt_cv_objdir" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +$as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir @@ -7937,10 +8203,10 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 -echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : + $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) @@ -7990,11 +8256,11 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8003,10 +8269,10 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - echo "$as_me:$LINENO: checking for file" >&5 -echo $ECHO_N "checking for file... $ECHO_C" >&6 -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +$as_echo_n "checking for file... " >&6; } +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : + $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) @@ -8056,11 +8322,11 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 -echo "${ECHO_T}$MAGIC_CMD" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +$as_echo "$MAGIC_CMD" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8140,10 +8406,10 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' - echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext @@ -8158,11 +8424,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8161: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8427: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8165: \$? = $ac_status" >&5 + echo "$as_me:8431: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8175,8 +8441,8 @@ else $RM conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -8195,8 +8461,8 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 -echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -8327,7 +8593,7 @@ echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -8467,8 +8733,8 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 -echo "${ECHO_T}$lt_prog_compiler_pic" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 +$as_echo "$lt_prog_compiler_pic" >&6; } @@ -8479,10 +8745,10 @@ echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext @@ -8497,11 +8763,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8500: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8766: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8504: \$? = $ac_status" >&5 + echo "$as_me:8770: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8514,8 +8780,8 @@ else $RM conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in @@ -8538,10 +8804,10 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_static_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test "${lt_cv_prog_compiler_static_works+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" @@ -8566,8 +8832,8 @@ else LDFLAGS="$save_LDFLAGS" fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +$as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : @@ -8581,10 +8847,10 @@ fi - echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null @@ -8602,11 +8868,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8605: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8871: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8609: \$? = $ac_status" >&5 + echo "$as_me:8875: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8628,18 +8894,18 @@ else $RM conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 -echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 -if test "${lt_cv_prog_compiler_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null @@ -8657,11 +8923,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8660: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8926: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8664: \$? = $ac_status" >&5 + echo "$as_me:8930: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8683,8 +8949,8 @@ else $RM conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 -echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +$as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -8692,19 +8958,19 @@ echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 -echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +$as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - echo "$as_me:$LINENO: result: $hard_links" >&5 -echo "${ECHO_T}$hard_links" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +$as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -8716,8 +8982,8 @@ fi - echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -8888,7 +9154,7 @@ _LT_EOF archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in @@ -9158,11 +9424,7 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9173,28 +9435,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -9208,13 +9449,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -9227,11 +9464,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9242,28 +9475,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -9277,13 +9489,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -9495,40 +9703,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int foo(void) {} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' @@ -9784,8 +9968,8 @@ rm -f conftest.err conftest.$ac_objext \ fi fi -echo "$as_me:$LINENO: result: $ld_shlibs" >&5 -echo "${ECHO_T}$ld_shlibs" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +$as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -9821,19 +10005,19 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 -echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 -if test "${lt_cv_archive_cmds_need_lc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } +if test "${lt_cv_archive_cmds_need_lc+set}" = set; then : + $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext @@ -9847,11 +10031,11 @@ else libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else @@ -9864,8 +10048,8 @@ else $RM conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 -echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -10029,8 +10213,8 @@ esac - echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 -echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +$as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in @@ -10437,7 +10621,7 @@ linux*oldld* | linux*aout* | linux*coff*) ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -10448,19 +10632,15 @@ linux* | k*bsd*-gnu) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : + $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10471,39 +10651,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -10719,8 +10873,8 @@ uts4*) dynamic_linker=no ;; esac -echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -echo "${ECHO_T}$dynamic_linker" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -10821,8 +10975,8 @@ fi - echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -10846,8 +11000,8 @@ else # directories. hardcode_action=unsupported fi -echo "$as_me:$LINENO: result: $hardcode_action" >&5 -echo "${ECHO_T}$hardcode_action" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then @@ -10891,71 +11045,43 @@ else darwin*) # if libdl is installed we need to link against it - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -10968,458 +11094,168 @@ fi ;; *) - echo "$as_me:$LINENO: checking for shl_load" >&5 -echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 -if test "${ac_cv_func_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_shl_load) || defined (__stub___shl_load) -choke me -#else -char (*f) () = shl_load; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != shl_load; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shl_load=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_shl_load=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -echo "${ECHO_T}$ac_cv_func_shl_load" >&6 -if test $ac_cv_func_shl_load = yes; then + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else - echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char shl_load (); int main () { -shl_load (); +return shl_load (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 -if test $ac_cv_lib_dld_shl_load = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else - echo "$as_me:$LINENO: checking for dlopen" >&5 -echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 -if test "${ac_cv_func_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -char (*f) () = dlopen; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != dlopen; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_dlopen=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_func_dlopen=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -echo "${ECHO_T}$ac_cv_func_dlopen" >&6 -if test $ac_cv_func_dlopen = yes; then + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 -if test $ac_cv_lib_dl_dlopen = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dlopen (); int main () { -dlopen (); +return dlopen (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_svld_dlopen=no + ac_cv_lib_svld_dlopen=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 -if test $ac_cv_lib_svld_dlopen = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else - echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char dld_link (); int main () { -dld_link (); +return dld_link (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_dld_dld_link=no + ac_cv_lib_dld_dld_link=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 -if test $ac_cv_lib_dld_dld_link = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -11458,10 +11294,10 @@ fi save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" - echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross @@ -11469,7 +11305,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11472 "configure" +#line 11308 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11528,11 +11364,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -11549,15 +11385,15 @@ rm -fr conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 -if test "${lt_cv_dlopen_self_static+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross @@ -11565,7 +11401,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11568 "configure" +#line 11404 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11624,11 +11460,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -11645,8 +11481,8 @@ rm -fr conftest* fi -echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" @@ -11684,13 +11520,13 @@ fi striplib= old_striplib= -echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in @@ -11698,16 +11534,16 @@ else if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi ;; *) - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; esac fi @@ -11724,13 +11560,13 @@ fi # Report which library types will actually be built - echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $can_build_shared" >&5 -echo "${ECHO_T}$can_build_shared" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } - echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -11750,15 +11586,15 @@ echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 fi ;; esac - echo "$as_me:$LINENO: result: $enable_shared" >&5 -echo "${ECHO_T}$enable_shared" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } - echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes - echo "$as_me:$LINENO: result: $enable_static" >&5 -echo "${ECHO_T}$enable_static" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } @@ -11784,7 +11620,7 @@ CC="$lt_save_CC" - ac_config_commands="$ac_config_commands libtool" + ac_config_commands="$ac_config_commands libtool" @@ -11793,128 +11629,355 @@ CC="$lt_save_CC" -# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given. -if test "${enable_64_bit_bfd+set}" = set; then - enableval="$enable_64_bit_bfd" - case "${enableval}" in - yes) want64=true ;; - no) want64=false ;; - *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5 -echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;} - { (exit 1); exit 1; }; } ;; -esac -else - want64=false -fi; -# Check whether --enable-targets or --disable-targets was given. -if test "${enable_targets+set}" = set; then - enableval="$enable_targets" - case "${enableval}" in - yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5 -echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;} - { (exit 1); exit 1; }; } - ;; - no) enable_targets= ;; - *) enable_targets=$enableval ;; -esac -fi; -# Check whether --with-mmap or --without-mmap was given. -if test "${with_mmap+set}" = set; then - withval="$with_mmap" - case "${withval}" in - yes) want_mmap=true ;; - no) want_mmap=false ;; - *) { { echo "$as_me:$LINENO: error: bad value ${withval} for BFD with-mmap option" >&5 -echo "$as_me: error: bad value ${withval} for BFD with-mmap option" >&2;} - { (exit 1); exit 1; }; } ;; -esac -else - want_mmap=false -fi; -# Check whether --enable-secureplt or --disable-secureplt was given. -if test "${enable_secureplt+set}" = set; then - enableval="$enable_secureplt" - case "${enableval}" in - yes) use_secureplt=true ;; - no) use_secureplt=false ;; - *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for secureplt option" >&5 -echo "$as_me: error: bad value ${enableval} for secureplt option" >&2;} - { (exit 1); exit 1; }; } ;; -esac +# Check whether --enable-plugins was given. +if test "${enable_plugins+set}" = set; then : + enableval=$enable_plugins; case "${enableval}" in + yes | "") plugins=yes ;; + no) plugins=no ;; + *) plugins=yes ;; + esac else - use_secureplt=false -fi; if test $use_secureplt = true; then - -cat >>confdefs.h <<\_ACEOF -#define USE_SECUREPLT 1 -_ACEOF - + plugins=no fi -DEBUGDIR=${libdir}/debug - -# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given. -if test "${with_separate_debug_dir+set}" = set; then - withval="$with_separate_debug_dir" - DEBUGDIR="${withval}" -fi; -# Check to see if we should allow the generation of -# symbols with the ELF standard's STT_COMMON type. -# Check whether --enable-elf-stt-common or --disable-elf-stt-common was given. -if test "${enable_elf_stt_common+set}" = set; then - enableval="$enable_elf_stt_common" - case "${enableval}" in - yes) want_elf_stt_common=true ;; - no) want_elf_stt_common=false ;; - *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for ELF STT_COMMON option" >&5 -echo "$as_me: error: bad value ${enableval} for ELF STT_COMMON option" >&2;} - { (exit 1); exit 1; }; } ;; - esac + if test "$plugins" = "yes"; then + PLUGINS_TRUE= + PLUGINS_FALSE='#' else - # We have to choose a default behaviour. For native builds we could -# test whether the loader supports the STT_COMMON type, but that would -# mean that built binaries could not be exported to older systems where -# the loader does not support it. So by default we always choose to -# disable this feature. - want_elf_stt_common=false -fi; if test $want_elf_stt_common = true; then - -cat >>confdefs.h <<\_ACEOF -#define USE_STT_COMMON 1 -_ACEOF - + PLUGINS_TRUE='#' + PLUGINS_FALSE= fi +if test "$plugins" = "yes"; then + if test "$enable_dlopen" != "yes" ; then + as_fn_error " + Building BFD with plugin support requires a host that supports -ldl." "$LINENO" 5 + fi + enable_targets="$enable_targets plugin" +fi -# Check whether --with-pkgversion or --without-pkgversion was given. -if test "${with_pkgversion+set}" = set; then - withval="$with_pkgversion" - case "$withval" in - yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5 -echo "$as_me: error: package version not specified" >&2;} - { (exit 1); exit 1; }; } ;; - no) PKGVERSION= ;; - *) PKGVERSION="($withval) " ;; - esac -else - PKGVERSION="(GNU Binutils) " - -fi; +case "${target}" in + sparc-*-solaris*|i[3-7]86-*-solaris*) + # On native 32bit sparc and ia32 solaris, large-file and procfs support + # are mutually exclusive; and without procfs support, the elf module + # cannot provide certain routines such as elfcore_write_prpsinfo + # or elfcore_write_prstatus. So unless the user explicitly requested + # large-file support through the --enable-largefile switch, disable + # large-file support in favor of procfs support. + if test "${target}" = "${host}" -a "$enable_largefile" != 'yes'; then + if test "$plugins" = "no"; then + enable_largefile="no" + fi + fi + ;; +esac +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi +fi + + +# Check whether --enable-64-bit-bfd was given. +if test "${enable_64_bit_bfd+set}" = set; then : + enableval=$enable_64_bit_bfd; case "${enableval}" in + yes) want64=true ;; + no) want64=false ;; + *) as_fn_error "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; +esac +else + want64=false +fi + +# Check whether --enable-targets was given. +if test "${enable_targets+set}" = set; then : + enableval=$enable_targets; case "${enableval}" in + yes | "") as_fn_error "enable-targets option must specify target names or 'all'" "$LINENO" 5 + ;; + no) enable_targets= ;; + *) enable_targets=$enableval ;; +esac +fi + + +# Check whether --with-mmap was given. +if test "${with_mmap+set}" = set; then : + withval=$with_mmap; case "${withval}" in + yes) want_mmap=true ;; + no) want_mmap=false ;; + *) as_fn_error "bad value ${withval} for BFD with-mmap option" "$LINENO" 5 ;; +esac +else + want_mmap=false +fi + +# Check whether --enable-secureplt was given. +if test "${enable_secureplt+set}" = set; then : + enableval=$enable_secureplt; case "${enableval}" in + yes) use_secureplt=true ;; + no) use_secureplt=false ;; + *) as_fn_error "bad value ${enableval} for secureplt option" "$LINENO" 5 ;; +esac +else + use_secureplt=false +fi +if test $use_secureplt = true; then + +$as_echo "#define USE_SECUREPLT 1" >>confdefs.h + +fi + +DEBUGDIR=${libdir}/debug + +# Check whether --with-separate-debug-dir was given. +if test "${with_separate_debug_dir+set}" = set; then : + withval=$with_separate_debug_dir; DEBUGDIR="${withval}" +fi + + + +# Check to see if we should allow the generation of +# symbols with the ELF standard's STT_COMMON type. +# Check whether --enable-elf-stt-common was given. +if test "${enable_elf_stt_common+set}" = set; then : + enableval=$enable_elf_stt_common; case "${enableval}" in + yes) want_elf_stt_common=true ;; + no) want_elf_stt_common=false ;; + *) as_fn_error "bad value ${enableval} for ELF STT_COMMON option" "$LINENO" 5 ;; + esac +else + # We have to choose a default behaviour. For native builds we could +# test whether the loader supports the STT_COMMON type, but that would +# mean that built binaries could not be exported to older systems where +# the loader does not support it. So by default we always choose to +# disable this feature. + want_elf_stt_common=false +fi +if test $want_elf_stt_common = true; then + +$as_echo "#define USE_STT_COMMON 1" >>confdefs.h + +fi + + + +# Check whether --with-pkgversion was given. +if test "${with_pkgversion+set}" = set; then : + withval=$with_pkgversion; case "$withval" in + yes) as_fn_error "package version not specified" "$LINENO" 5 ;; + no) PKGVERSION= ;; + *) PKGVERSION="($withval) " ;; + esac +else + PKGVERSION="(GNU Binutils) " + +fi -# Check whether --with-bugurl or --without-bugurl was given. -if test "${with_bugurl+set}" = set; then - withval="$with_bugurl" - case "$withval" in - yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5 -echo "$as_me: error: bug URL not specified" >&2;} - { (exit 1); exit 1; }; } ;; + + +# Check whether --with-bugurl was given. +if test "${with_bugurl+set}" = set; then : + withval=$with_bugurl; case "$withval" in + yes) as_fn_error "bug URL not specified" "$LINENO" 5 ;; no) BUGURL= ;; *) BUGURL="$withval" @@ -11923,7 +11986,8 @@ echo "$as_me: error: bug URL not specified" >&2;} else BUGURL="http://www.sourceware.org/bugzilla/" -fi; +fi + case ${BUGURL} in "") REPORT_BUGS_TO= @@ -11941,17 +12005,15 @@ fi; GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" -# Check whether --enable-werror or --disable-werror was given. -if test "${enable_werror+set}" = set; then - enableval="$enable_werror" - case "${enableval}" in +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; case "${enableval}" in yes | y) ERROR_ON_WARNING="yes" ;; no | n) ERROR_ON_WARNING="no" ;; - *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5 -echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;} - { (exit 1); exit 1; }; } ;; + *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; esac -fi; +fi + # Enable -Wno-format by default when using gcc on mingw case "${host}" in @@ -11978,10 +12040,9 @@ if test "${GCC}" = yes ; then WARN_CFLAGS="${GCC_WARN_CFLAGS}" fi -# Check whether --enable-build-warnings or --disable-build-warnings was given. -if test "${enable_build_warnings+set}" = set; then - enableval="$enable_build_warnings" - case "${enableval}" in +# Check whether --enable-build-warnings was given. +if test "${enable_build_warnings+set}" = set; then : + enableval=$enable_build_warnings; case "${enableval}" in yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";; no) if test "${GCC}" = yes ; then WARN_CFLAGS="-w" @@ -11992,7 +12053,8 @@ if test "${enable_build_warnings+set}" = set; then WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";; *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; esac -fi; +fi + if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then echo "Setting warning flags = $WARN_CFLAGS" 6>&1 @@ -12002,29 +12064,26 @@ fi - ac_config_headers="$ac_config_headers config.h:config.in" +ac_config_headers="$ac_config_headers config.h:config.in" if test -z "$target" ; then - { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5 -echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Unrecognized target system type; please check config.sub." "$LINENO" 5 fi -echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" - USE_MAINTAINER_MODE=$enableval + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no -fi; - echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 - +fi -if test $USE_MAINTAINER_MODE = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else @@ -12035,9 +12094,7 @@ fi MAINT=$MAINTAINER_MODE_TRUE - - -if false; then + if false; then GENINSRC_NEVER_TRUE= GENINSRC_NEVER_FALSE='#' else @@ -12060,24 +12117,22 @@ esac *) target_noncanonical=${target_alias} ;; esac -echo "$as_me:$LINENO: checking whether to install libbfd" >&5 -echo $ECHO_N "checking whether to install libbfd... $ECHO_C" >&6 - # Check whether --enable-install-libbfd or --disable-install-libbfd was given. -if test "${enable_install_libbfd+set}" = set; then - enableval="$enable_install_libbfd" - install_libbfd_p=$enableval +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libbfd" >&5 +$as_echo_n "checking whether to install libbfd... " >&6; } + # Check whether --enable-install-libbfd was given. +if test "${enable_install_libbfd+set}" = set; then : + enableval=$enable_install_libbfd; install_libbfd_p=$enableval else if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then install_libbfd_p=yes else install_libbfd_p=no fi -fi; - echo "$as_me:$LINENO: result: $install_libbfd_p" >&5 -echo "${ECHO_T}$install_libbfd_p" >&6 - +fi -if test $install_libbfd_p = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $install_libbfd_p" >&5 +$as_echo "$install_libbfd_p" >&6; } + if test $install_libbfd_p = yes; then INSTALL_LIBBFD_TRUE= INSTALL_LIBBFD_FALSE='#' else @@ -12103,13 +12158,15 @@ fi + + host64=false target64=false bfd_default_target_size=32 # host stuff: -ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id" +ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru" # If we haven't got the data from the intl directory, # assume NLS is disabled. USE_NLS=no @@ -12123,22 +12180,20 @@ POSUB= if test -f ../intl/config.intl; then . ../intl/config.intl fi -echo "$as_me:$LINENO: checking whether NLS is requested" >&5 -echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } if test x"$USE_NLS" != xyes; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -cat >>confdefs.h <<\_ACEOF -#define ENABLE_NLS 1 -_ACEOF +$as_echo "#define ENABLE_NLS 1" >>confdefs.h - echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 -echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 +$as_echo_n "checking for catalogs to be installed... " >&6; } # Look for .po and .gmo files in the source directory. CATALOGS= XLINGUAS= @@ -12169,8 +12224,8 @@ echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 fi done LINGUAS="$XLINGUAS" - echo "$as_me:$LINENO: result: $LINGUAS" >&5 -echo "${ECHO_T}$LINGUAS" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 +$as_echo "$LINGUAS" >&6; } DATADIRNAME=share @@ -12196,17 +12251,17 @@ fi - echo "$as_me:$LINENO: checking whether NLS is requested" >&5 -echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 - # Check whether --enable-nls or --disable-nls was given. -if test "${enable_nls+set}" = set; then - enableval="$enable_nls" - USE_NLS=$enableval + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +$as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes -fi; - echo "$as_me:$LINENO: result: $USE_NLS" >&5 -echo "${ECHO_T}$USE_NLS" >&6 +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +$as_echo "$USE_NLS" >&6; } @@ -12243,10 +12298,10 @@ rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSGFMT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) @@ -12270,6801 +12325,1325 @@ else IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; -esac -fi -MSGFMT="$ac_cv_path_MSGFMT" -if test "$MSGFMT" != ":"; then - echo "$as_me:$LINENO: result: $MSGFMT" >&5 -echo "${ECHO_T}$MSGFMT" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - # Extract the first word of "gmsgfmt", so it can be a program name with args. -set dummy gmsgfmt; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_GMSGFMT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $GMSGFMT in - [\\/]* | ?:[\\/]*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" - ;; -esac -fi -GMSGFMT=$ac_cv_path_GMSGFMT - -if test -n "$GMSGFMT"; then - echo "$as_me:$LINENO: result: $GMSGFMT" >&5 -echo "${ECHO_T}$GMSGFMT" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - - -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Find out how to test for executable files. Don't use a zero-byte file, -# as systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - ac_executable_p="test -x" -else - ac_executable_p="test -f" -fi -rm -f conf$$.file - -# Extract the first word of "xgettext", so it can be a program name with args. -set dummy xgettext; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_XGETTEXT+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case "$XGETTEXT" in - [\\/]* | ?:[\\/]*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. - ;; - *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$ac_save_IFS" - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then - if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi - fi - done - done - IFS="$ac_save_IFS" - test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" - ;; -esac -fi -XGETTEXT="$ac_cv_path_XGETTEXT" -if test "$XGETTEXT" != ":"; then - echo "$as_me:$LINENO: result: $XGETTEXT" >&5 -echo "${ECHO_T}$XGETTEXT" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - rm -f messages.po - - -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Find out how to test for executable files. Don't use a zero-byte file, -# as systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - ac_executable_p="test -x" -else - ac_executable_p="test -f" -fi -rm -f conf$$.file - -# Extract the first word of "msgmerge", so it can be a program name with args. -set dummy msgmerge; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_MSGMERGE+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case "$MSGMERGE" in - [\\/]* | ?:[\\/]*) - ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. - ;; - *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$ac_save_IFS" - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then - if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then - ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi - fi - done - done - IFS="$ac_save_IFS" - test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" - ;; -esac -fi -MSGMERGE="$ac_cv_path_MSGMERGE" -if test "$MSGMERGE" != ":"; then - echo "$as_me:$LINENO: result: $MSGMERGE" >&5 -echo "${ECHO_T}$MSGMERGE" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - - if test "$GMSGFMT" != ":"; then - if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && - (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` - echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 -echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 - GMSGFMT=":" - fi - fi - - if test "$XGETTEXT" != ":"; then - if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && - (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then - : ; - else - echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 -echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 - XGETTEXT=":" - fi - rm -f messages.po - fi - - ac_config_commands="$ac_config_commands default-1" - - - -# Permit host specific settings. -. ${srcdir}/configure.host - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac -done - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -BFD_HOST_64BIT_LONG=0 -BFD_HOST_64BIT_LONG_LONG=0 -BFD_HOST_64_BIT_DEFINED=0 -BFD_HOST_64_BIT= -BFD_HOST_U_64_BIT= -BFD_HOSTPTR_T="unsigned long" - -echo "$as_me:$LINENO: checking for long long" >&5 -echo $ECHO_N "checking for long long... $ECHO_C" >&6 -if test "${ac_cv_type_long_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((long long *) 0) - return 0; -if (sizeof (long long)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_long_long=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_long_long" >&6 - -echo "$as_me:$LINENO: checking size of long long" >&5 -echo $ECHO_N "checking size of long long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_long_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (long long)); } -unsigned long ulongval () { return (long) (sizeof (long long)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (long long))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (long long)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long long)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long_long=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_long_long=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF - - -echo "$as_me:$LINENO: checking for void *" >&5 -echo $ECHO_N "checking for void *... $ECHO_C" >&6 -if test "${ac_cv_type_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((void * *) 0) - return 0; -if (sizeof (void *)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_void_p=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_void_p=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 -echo "${ECHO_T}$ac_cv_type_void_p" >&6 - -echo "$as_me:$LINENO: checking size of void *" >&5 -echo $ECHO_N "checking size of void *... $ECHO_C" >&6 -if test "${ac_cv_sizeof_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_void_p" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_void_p=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (void *)); } -unsigned long ulongval () { return (long) (sizeof (void *)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (void *))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (void *)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (void *)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_void_p=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_void_p=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF - - -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 -if test "${ac_cv_type_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((long *) 0) - return 0; -if (sizeof (long)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_long=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 - -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (long))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (long)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_long=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - - -if test "x${ac_cv_sizeof_void_p}" = "x8"; then - host64=true -fi - -if test "x${ac_cv_sizeof_long}" = "x8"; then - BFD_HOST_64BIT_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" -elif test "x${ac_cv_sizeof_long_long}" = "x8"; then - BFD_HOST_64BIT_LONG_LONG=1 - test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" - test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" - if test "x${ac_cv_sizeof_void_p}" = "x8"; then - BFD_HOSTPTR_T="unsigned long long" - fi -fi - -if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then - BFD_HOST_64_BIT_DEFINED=1 - BFD_HOST_64_BIT="${HOST_64BIT_TYPE}" - BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}" -fi - - - - - - - - -# Put a plausible default for CC_FOR_BUILD in Makefile. -if test -z "$CC_FOR_BUILD"; then - if test "x$cross_compiling" = "xno"; then - CC_FOR_BUILD='$(CC)' - else - CC_FOR_BUILD=gcc - fi -fi - -# Also set EXEEXT_FOR_BUILD. -if test "x$cross_compiling" = "xno"; then - EXEEXT_FOR_BUILD='$(EXEEXT)' -else - echo "$as_me:$LINENO: checking for build system executable suffix" >&5 -echo $ECHO_N "checking for build system executable suffix... $ECHO_C" >&6 -if test "${bfd_cv_build_exeext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - rm -f conftest* - echo 'int main () { return 0; }' > conftest.c - bfd_cv_build_exeext= - ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 - for file in conftest.*; do - case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; - *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; - esac - done - rm -f conftest* - test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no -fi -echo "$as_me:$LINENO: result: $bfd_cv_build_exeext" >&5 -echo "${ECHO_T}$bfd_cv_build_exeext" >&6 - EXEEXT_FOR_BUILD="" - test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} -fi - - - - - - - - - -for ac_header in alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - -for ac_header in fcntl.h sys/file.h sys/time.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'` - -acx_cv_header_stdint=stddef.h -acx_cv_header_stdint_kind="(already complete)" -for i in stdint.h $inttype_headers; do - unset ac_cv_type_uintptr_t - unset ac_cv_type_uintmax_t - unset ac_cv_type_int_least32_t - unset ac_cv_type_int_fast32_t - unset ac_cv_type_uint64_t - echo $ECHO_N "looking for a compliant stdint.h in $i, $ECHO_C" >&6 - echo "$as_me:$LINENO: checking for uintmax_t" >&5 -echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6 -if test "${ac_cv_type_uintmax_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$i> - -int -main () -{ -if ((uintmax_t *) 0) - return 0; -if (sizeof (uintmax_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_uintmax_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_uintmax_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6 -if test $ac_cv_type_uintmax_t = yes; then - acx_cv_header_stdint=$i -else - continue -fi - - echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 -if test "${ac_cv_type_uintptr_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$i> - -int -main () -{ -if ((uintptr_t *) 0) - return 0; -if (sizeof (uintptr_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_uintptr_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_uintptr_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 -if test $ac_cv_type_uintptr_t = yes; then - : -else - acx_cv_header_stdint_kind="(mostly complete)" -fi - - echo "$as_me:$LINENO: checking for int_least32_t" >&5 -echo $ECHO_N "checking for int_least32_t... $ECHO_C" >&6 -if test "${ac_cv_type_int_least32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$i> - -int -main () -{ -if ((int_least32_t *) 0) - return 0; -if (sizeof (int_least32_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_int_least32_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_int_least32_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_int_least32_t" >&5 -echo "${ECHO_T}$ac_cv_type_int_least32_t" >&6 -if test $ac_cv_type_int_least32_t = yes; then - : -else - acx_cv_header_stdint_kind="(mostly complete)" -fi - - echo "$as_me:$LINENO: checking for int_fast32_t" >&5 -echo $ECHO_N "checking for int_fast32_t... $ECHO_C" >&6 -if test "${ac_cv_type_int_fast32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$i> - -int -main () -{ -if ((int_fast32_t *) 0) - return 0; -if (sizeof (int_fast32_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_int_fast32_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_int_fast32_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_int_fast32_t" >&5 -echo "${ECHO_T}$ac_cv_type_int_fast32_t" >&6 -if test $ac_cv_type_int_fast32_t = yes; then - : -else - acx_cv_header_stdint_kind="(mostly complete)" -fi - - echo "$as_me:$LINENO: checking for uint64_t" >&5 -echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6 -if test "${ac_cv_type_uint64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$i> - -int -main () -{ -if ((uint64_t *) 0) - return 0; -if (sizeof (uint64_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_uint64_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_uint64_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 -echo "${ECHO_T}$ac_cv_type_uint64_t" >&6 -if test $ac_cv_type_uint64_t = yes; then - : -else - acx_cv_header_stdint_kind="(lacks uint64_t)" -fi - - break -done -if test "$acx_cv_header_stdint" = stddef.h; then - acx_cv_header_stdint_kind="(lacks uintmax_t)" - for i in stdint.h $inttype_headers; do - unset ac_cv_type_uintptr_t - unset ac_cv_type_uint32_t - unset ac_cv_type_uint64_t - echo $ECHO_N "looking for an incomplete stdint.h in $i, $ECHO_C" >&6 - echo "$as_me:$LINENO: checking for uint32_t" >&5 -echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6 -if test "${ac_cv_type_uint32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$i> - -int -main () -{ -if ((uint32_t *) 0) - return 0; -if (sizeof (uint32_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_uint32_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_uint32_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 -echo "${ECHO_T}$ac_cv_type_uint32_t" >&6 -if test $ac_cv_type_uint32_t = yes; then - acx_cv_header_stdint=$i -else - continue -fi - - echo "$as_me:$LINENO: checking for uint64_t" >&5 -echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6 -if test "${ac_cv_type_uint64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$i> - -int -main () -{ -if ((uint64_t *) 0) - return 0; -if (sizeof (uint64_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_uint64_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_uint64_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 -echo "${ECHO_T}$ac_cv_type_uint64_t" >&6 - - echo "$as_me:$LINENO: checking for uintptr_t" >&5 -echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 -if test "${ac_cv_type_uintptr_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$i> - -int -main () -{ -if ((uintptr_t *) 0) - return 0; -if (sizeof (uintptr_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_uintptr_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_uintptr_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 -echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 - - break - done -fi -if test "$acx_cv_header_stdint" = stddef.h; then - acx_cv_header_stdint_kind="(u_intXX_t style)" - for i in sys/types.h $inttype_headers; do - unset ac_cv_type_u_int32_t - unset ac_cv_type_u_int64_t - echo $ECHO_N "looking for u_intXX_t types in $i, $ECHO_C" >&6 - echo "$as_me:$LINENO: checking for u_int32_t" >&5 -echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6 -if test "${ac_cv_type_u_int32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$i> - -int -main () -{ -if ((u_int32_t *) 0) - return 0; -if (sizeof (u_int32_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_u_int32_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_u_int32_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5 -echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6 -if test $ac_cv_type_u_int32_t = yes; then - acx_cv_header_stdint=$i -else - continue -fi - - echo "$as_me:$LINENO: checking for u_int64_t" >&5 -echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6 -if test "${ac_cv_type_u_int64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$i> - -int -main () -{ -if ((u_int64_t *) 0) - return 0; -if (sizeof (u_int64_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_u_int64_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_u_int64_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5 -echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6 - - break - done -fi -if test "$acx_cv_header_stdint" = stddef.h; then - acx_cv_header_stdint_kind="(using manual detection)" -fi - -test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no -test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no -test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no -test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no -test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no - -# ----------------- Summarize what we found so far - -echo "$as_me:$LINENO: checking what to include in bfd_stdint.h" >&5 -echo $ECHO_N "checking what to include in bfd_stdint.h... $ECHO_C" >&6 - -case `$as_basename bfd_stdint.h || -$as_expr X/bfd_stdint.h : '.*/\([^/][^/]*\)/*$' \| \ - Xbfd_stdint.h : 'X\(//\)$' \| \ - Xbfd_stdint.h : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/bfd_stdint.h | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` in - stdint.h) { echo "$as_me:$LINENO: WARNING: are you sure you want it there?" >&5 -echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;; - inttypes.h) { echo "$as_me:$LINENO: WARNING: are you sure you want it there?" >&5 -echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;; - *) ;; -esac - -echo "$as_me:$LINENO: result: $acx_cv_header_stdint $acx_cv_header_stdint_kind" >&5 -echo "${ECHO_T}$acx_cv_header_stdint $acx_cv_header_stdint_kind" >&6 - -# ----------------- done included file, check C basic types -------- - -# Lacking an uintptr_t? Test size of void * -case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in - stddef.h:* | *:no) echo "$as_me:$LINENO: checking for void *" >&5 -echo $ECHO_N "checking for void *... $ECHO_C" >&6 -if test "${ac_cv_type_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((void * *) 0) - return 0; -if (sizeof (void *)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_void_p=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_void_p=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 -echo "${ECHO_T}$ac_cv_type_void_p" >&6 - -echo "$as_me:$LINENO: checking size of void *" >&5 -echo $ECHO_N "checking size of void *... $ECHO_C" >&6 -if test "${ac_cv_sizeof_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_void_p" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_void_p=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (void *)); } -unsigned long ulongval () { return (long) (sizeof (void *)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (void *))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (void *)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (void *)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_void_p=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_void_p=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF - - ;; -esac - -# Lacking an uint64_t? Test size of long -case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in - stddef.h:*:* | *:no:no) echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 -if test "${ac_cv_type_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((long *) 0) - return 0; -if (sizeof (long)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_long=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 - -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_long" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (long))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (long)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_long=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_ACEOF - - ;; -esac - -if test $acx_cv_header_stdint = stddef.h; then - # Lacking a good header? Test size of everything and deduce all types. - echo "$as_me:$LINENO: checking for int" >&5 -echo $ECHO_N "checking for int... $ECHO_C" >&6 -if test "${ac_cv_type_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((int *) 0) - return 0; -if (sizeof (int)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_int=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_int=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6 - -echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6 -if test "${ac_cv_sizeof_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_int" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (int)); } -unsigned long ulongval () { return (long) (sizeof (int)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (int))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (int)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (int)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_int=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - - echo "$as_me:$LINENO: checking for short" >&5 -echo $ECHO_N "checking for short... $ECHO_C" >&6 -if test "${ac_cv_type_short+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((short *) 0) - return 0; -if (sizeof (short)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_short=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_short=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 -echo "${ECHO_T}$ac_cv_type_short" >&6 - -echo "$as_me:$LINENO: checking size of short" >&5 -echo $ECHO_N "checking size of short... $ECHO_C" >&6 -if test "${ac_cv_sizeof_short+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_short" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_short=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (short)); } -unsigned long ulongval () { return (long) (sizeof (short)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (short))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (short)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (short)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_short=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_short=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -echo "${ECHO_T}$ac_cv_sizeof_short" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short -_ACEOF - - - echo "$as_me:$LINENO: checking for char" >&5 -echo $ECHO_N "checking for char... $ECHO_C" >&6 -if test "${ac_cv_type_char+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((char *) 0) - return 0; -if (sizeof (char)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_char=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_char=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5 -echo "${ECHO_T}$ac_cv_type_char" >&6 - -echo "$as_me:$LINENO: checking size of char" >&5 -echo $ECHO_N "checking size of char... $ECHO_C" >&6 -if test "${ac_cv_sizeof_char+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_char" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_lo=`expr '(' $ac_mid ')' + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_char=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (char), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (char)); } -unsigned long ulongval () { return (long) (sizeof (char)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (char))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (char)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (char)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_char=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (char), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi +esac fi -rm -f conftest.val +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } else - ac_cv_sizeof_char=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 -echo "${ECHO_T}$ac_cv_sizeof_char" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_CHAR $ac_cv_sizeof_char -_ACEOF + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GMSGFMT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - - echo "$as_me:$LINENO: checking for type equivalent to int8_t" >&5 -echo $ECHO_N "checking for type equivalent to int8_t... $ECHO_C" >&6 - case "$ac_cv_sizeof_char" in - 1) acx_cv_type_int8_t=char ;; - *) { { echo "$as_me:$LINENO: error: no 8-bit type" >&5 -echo "$as_me: error: no 8-bit type" >&2;} - { (exit please report a bug); exit please report a bug; }; } - esac - echo "$as_me:$LINENO: result: $acx_cv_type_int8_t" >&5 -echo "${ECHO_T}$acx_cv_type_int8_t" >&6 - - echo "$as_me:$LINENO: checking for type equivalent to int16_t" >&5 -echo $ECHO_N "checking for type equivalent to int16_t... $ECHO_C" >&6 - case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in - 2:*) acx_cv_type_int16_t=int ;; - *:2) acx_cv_type_int16_t=short ;; - *) { { echo "$as_me:$LINENO: error: no 16-bit type" >&5 -echo "$as_me: error: no 16-bit type" >&2;} - { (exit please report a bug); exit please report a bug; }; } - esac - echo "$as_me:$LINENO: result: $acx_cv_type_int16_t" >&5 -echo "${ECHO_T}$acx_cv_type_int16_t" >&6 - - echo "$as_me:$LINENO: checking for type equivalent to int32_t" >&5 -echo $ECHO_N "checking for type equivalent to int32_t... $ECHO_C" >&6 - case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in - 4:*) acx_cv_type_int32_t=int ;; - *:4) acx_cv_type_int32_t=long ;; - *) { { echo "$as_me:$LINENO: error: no 32-bit type" >&5 -echo "$as_me: error: no 32-bit type" >&2;} - { (exit please report a bug); exit please report a bug; }; } - esac - echo "$as_me:$LINENO: result: $acx_cv_type_int32_t" >&5 -echo "${ECHO_T}$acx_cv_type_int32_t" >&6 + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac fi - -# These tests are here to make the output prettier - -if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then - case "$ac_cv_sizeof_long" in - 8) acx_cv_type_int64_t=long ;; - esac - echo "$as_me:$LINENO: checking for type equivalent to int64_t" >&5 -echo $ECHO_N "checking for type equivalent to int64_t... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: ${acx_cv_type_int64_t-'using preprocessor symbols'}" >&5 -echo "${ECHO_T}${acx_cv_type_int64_t-'using preprocessor symbols'}" >&6 +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +$as_echo "$GMSGFMT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -# Now we can use the above types - -if test "$ac_cv_type_uintptr_t" != yes; then - echo "$as_me:$LINENO: checking for type equivalent to intptr_t" >&5 -echo $ECHO_N "checking for type equivalent to intptr_t... $ECHO_C" >&6 - case $ac_cv_sizeof_void_p in - 2) acx_cv_type_intptr_t=int16_t ;; - 4) acx_cv_type_intptr_t=int32_t ;; - 8) acx_cv_type_intptr_t=int64_t ;; - *) { { echo "$as_me:$LINENO: error: no equivalent for intptr_t" >&5 -echo "$as_me: error: no equivalent for intptr_t" >&2;} - { (exit please report a bug); exit please report a bug; }; } - esac - echo "$as_me:$LINENO: result: $acx_cv_type_intptr_t" >&5 -echo "${ECHO_T}$acx_cv_type_intptr_t" >&6 -fi -# ----------------- done all checks, emit header ------------- - ac_config_commands="$ac_config_commands bfd_stdint.h" +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi -echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 -if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include + ac_executable_p="test -f" +fi +rm -f conf$$.file -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_time=yes +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XGETTEXT+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_time=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac fi -echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6 -if test $ac_cv_header_time = yes; then - -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF - +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +$as_echo "$XGETTEXT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + rm -f messages.po +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi - - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 -echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_executable_p="test -f" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF +rm -f conf$$.file -ac_header_dirent=$ac_hdr; break +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_MSGMERGE+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 -if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +$as_echo "$MSGMERGE" >&6; } else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_opendir=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_opendir" = no; then - for ac_lib in dir; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + if test "$GMSGFMT" != ":"; then + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 +$as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; } + GMSGFMT=":" + fi + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 +$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } + XGETTEXT=":" + fi + rm -f messages.po + fi -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_config_commands="$ac_config_commands default-1" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6 -if test "$ac_cv_search_opendir" != no; then - test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" -fi -else - echo "$as_me:$LINENO: checking for library containing opendir" >&5 -echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 -if test "${ac_cv_search_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -ac_cv_search_opendir=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Permit host specific settings. +. ${srcdir}/configure.host -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_opendir" = no; then - for ac_lib in x; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="-l$ac_lib" -break + +BFD_HOST_64BIT_LONG=0 +BFD_HOST_64BIT_LONG_LONG=0 +BFD_HOST_64_BIT_DEFINED=0 +BFD_HOST_64_BIT= +BFD_HOST_U_64_BIT= +BFD_HOSTPTR_T="unsigned long" + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if test "${ac_cv_sizeof_long_long+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : +else + if test "$ac_cv_type_long_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long_long=0 + fi fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -echo "${ECHO_T}$ac_cv_search_opendir" >&6 -if test "$ac_cv_search_opendir" != no; then - test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } -fi -echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 -echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 -if test "${gcc_cv_header_string+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - gcc_cv_header_string=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -gcc_cv_header_string=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 -echo "${ECHO_T}$gcc_cv_header_string" >&6 -if test $gcc_cv_header_string = yes; then -cat >>confdefs.h <<\_ACEOF -#define STRING_WITH_STRINGS 1 -_ACEOF +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if test "${ac_cv_sizeof_void_p+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : +else + if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (void *) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_void_p=0 + fi fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long=0 + fi +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } -for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" +if test "x${ac_cv_sizeof_void_p}" = "x8"; then + host64=true fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +if test "x${ac_cv_sizeof_long}" = "x8"; then + BFD_HOST_64BIT_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" +elif test "x${ac_cv_sizeof_long_long}" = "x8"; then + BFD_HOST_64BIT_LONG_LONG=1 + test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" + test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" + if test "x${ac_cv_sizeof_void_p}" = "x8"; then + BFD_HOSTPTR_T="unsigned long long" + fi fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +if test -n "${HOST_64BIT_TYPE}" -a -n "${HOST_U_64BIT_TYPE}"; then + BFD_HOST_64_BIT_DEFINED=1 + BFD_HOST_64_BIT="${HOST_64BIT_TYPE}" + BFD_HOST_U_64_BIT="${HOST_U_64BIT_TYPE}" fi -done -for ac_func in strtoull -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif -int -main () -{ -return f != $ac_func; - ; - return 0; -} + +# Put a plausible default for CC_FOR_BUILD in Makefile. +if test -z "$CC_FOR_BUILD"; then + if test "x$cross_compiling" = "xno"; then + CC_FOR_BUILD='$(CC)' + else + CC_FOR_BUILD=gcc + fi +fi + +# Also set EXEEXT_FOR_BUILD. +if test "x$cross_compiling" = "xno"; then + EXEEXT_FOR_BUILD='$(EXEEXT)' +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5 +$as_echo_n "checking for build system executable suffix... " >&6; } +if test "${bfd_cv_build_exeext+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.c + bfd_cv_build_exeext= + ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + rm -f conftest* + test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_build_exeext" >&5 +$as_echo "$bfd_cv_build_exeext" >&6; } + EXEEXT_FOR_BUILD="" + test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} +fi + + +for ac_header in alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then + +done + +for ac_header in fcntl.h sys/file.h sys/time.h sys/stat.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi + done -echo "$as_me:$LINENO: checking whether basename is declared" >&5 -echo $ECHO_N "checking whether basename is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_basename+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'` + +acx_cv_header_stdint=stddef.h +acx_cv_header_stdint_kind="(already complete)" +for i in stdint.h $inttype_headers; do + unset ac_cv_type_uintptr_t + unset ac_cv_type_uintmax_t + unset ac_cv_type_int_least32_t + unset ac_cv_type_int_fast32_t + unset ac_cv_type_uint64_t + $as_echo_n "looking for a compliant stdint.h in $i, " >&6 + ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "#include +#include <$i> +" +if test "x$ac_cv_type_uintmax_t" = x""yes; then : + acx_cv_header_stdint=$i else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef basename - char *p = (char *) basename; -#endif + continue +fi + + ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include +#include <$i> +" +if test "x$ac_cv_type_uintptr_t" = x""yes; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_basename=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + acx_cv_header_stdint_kind="(mostly complete)" +fi + + ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include +#include <$i> +" +if test "x$ac_cv_type_int_least32_t" = x""yes; then : -ac_cv_have_decl_basename=no +else + acx_cv_header_stdint_kind="(mostly complete)" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include +#include <$i> +" +if test "x$ac_cv_type_int_fast32_t" = x""yes; then : + +else + acx_cv_header_stdint_kind="(mostly complete)" fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_basename" >&5 -echo "${ECHO_T}$ac_cv_have_decl_basename" >&6 -if test $ac_cv_have_decl_basename = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_BASENAME 1 -_ACEOF + ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include +#include <$i> +" +if test "x$ac_cv_type_uint64_t" = x""yes; then : +else + acx_cv_header_stdint_kind="(lacks uint64_t)" +fi + break +done +if test "$acx_cv_header_stdint" = stddef.h; then + acx_cv_header_stdint_kind="(lacks uintmax_t)" + for i in stdint.h $inttype_headers; do + unset ac_cv_type_uintptr_t + unset ac_cv_type_uint32_t + unset ac_cv_type_uint64_t + $as_echo_n "looking for an incomplete stdint.h in $i, " >&6 + ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include +#include <$i> +" +if test "x$ac_cv_type_uint32_t" = x""yes; then : + acx_cv_header_stdint=$i else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_BASENAME 0 -_ACEOF + continue +fi + ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include +#include <$i> +" +if test "x$ac_cv_type_uint64_t" = x""yes; then : fi + ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include +#include <$i> +" +if test "x$ac_cv_type_uintptr_t" = x""yes; then : -echo "$as_me:$LINENO: checking whether ftello is declared" >&5 -echo $ECHO_N "checking whether ftello is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_ftello+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef ftello - char *p = (char *) ftello; -#endif +fi - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_ftello=yes + break + done +fi +if test "$acx_cv_header_stdint" = stddef.h; then + acx_cv_header_stdint_kind="(u_intXX_t style)" + for i in sys/types.h $inttype_headers; do + unset ac_cv_type_u_int32_t + unset ac_cv_type_u_int64_t + $as_echo_n "looking for u_intXX_t types in $i, " >&6 + ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include +#include <$i> +" +if test "x$ac_cv_type_u_int32_t" = x""yes; then : + acx_cv_header_stdint=$i else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + continue +fi -ac_cv_have_decl_ftello=no + ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include +#include <$i> +" +if test "x$ac_cv_type_u_int64_t" = x""yes; then : + +fi + + break + done fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +if test "$acx_cv_header_stdint" = stddef.h; then + acx_cv_header_stdint_kind="(using manual detection)" fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_ftello" >&5 -echo "${ECHO_T}$ac_cv_have_decl_ftello" >&6 -if test $ac_cv_have_decl_ftello = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FTELLO 1 -_ACEOF +test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no +test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no +test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no +test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no +test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no +# ----------------- Summarize what we found so far -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FTELLO 0 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what to include in bfd_stdint.h" >&5 +$as_echo_n "checking what to include in bfd_stdint.h... " >&6; } +case `$as_basename -- bfd_stdint.h || +$as_expr X/bfd_stdint.h : '.*/\([^/][^/]*\)/*$' \| \ + Xbfd_stdint.h : 'X\(//\)$' \| \ + Xbfd_stdint.h : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/bfd_stdint.h | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` in + stdint.h) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: are you sure you want it there?" >&5 +$as_echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;; + inttypes.h) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: are you sure you want it there?" >&5 +$as_echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;; + *) ;; +esac -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_header_stdint $acx_cv_header_stdint_kind" >&5 +$as_echo "$acx_cv_header_stdint $acx_cv_header_stdint_kind" >&6; } +# ----------------- done included file, check C basic types -------- -echo "$as_me:$LINENO: checking whether ftello64 is declared" >&5 -echo $ECHO_N "checking whether ftello64 is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_ftello64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Lacking an uintptr_t? Test size of void * +case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in + stddef.h:* | *:no) # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if test "${ac_cv_sizeof_void_p+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef ftello64 - char *p = (char *) ftello64; -#endif + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_ftello64=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_ftello64=no + if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (void *) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_void_p=0 + fi fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_ftello64" >&5 -echo "${ECHO_T}$ac_cv_have_decl_ftello64" >&6 -if test $ac_cv_have_decl_ftello64 = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } + + cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FTELLO64 1 +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF + ;; +esac +# Lacking an uint64_t? Test size of long +case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in + stddef.h:*:* | *:no:no) # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FTELLO64 0 -_ACEOF + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_long=0 + fi +fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } -echo "$as_me:$LINENO: checking whether fseeko is declared" >&5 -echo $ECHO_N "checking whether fseeko is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_fseeko+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef fseeko - char *p = (char *) fseeko; -#endif - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_fseeko=yes + + ;; +esac + +if test $acx_cv_header_stdint = stddef.h; then + # Lacking a good header? Test size of everything and deduce all types. + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if test "${ac_cv_sizeof_int+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : -ac_cv_have_decl_fseeko=no +else + if test "$ac_cv_type_int" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (int) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_int=0 + fi fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fseeko" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fseeko" >&6 -if test $ac_cv_have_decl_fseeko = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } + + cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FSEEKO 1 +#define SIZEOF_INT $ac_cv_sizeof_int _ACEOF + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if test "${ac_cv_sizeof_short+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FSEEKO 0 -_ACEOF + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : +else + if test "$ac_cv_type_short" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (short) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_short=0 + fi +fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } -echo "$as_me:$LINENO: checking whether fseeko64 is declared" >&5 -echo $ECHO_N "checking whether fseeko64 is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_fseeko64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef fseeko64 - char *p = (char *) fseeko64; -#endif - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_fseeko64=yes + + + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 +$as_echo_n "checking size of char... " >&6; } +if test "${ac_cv_sizeof_char+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : -ac_cv_have_decl_fseeko64=no +else + if test "$ac_cv_type_char" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (char) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_char=0 + fi fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_fseeko64" >&5 -echo "${ECHO_T}$ac_cv_have_decl_fseeko64" >&6 -if test $ac_cv_have_decl_fseeko64 = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 +$as_echo "$ac_cv_sizeof_char" >&6; } + + cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FSEEKO64 1 +#define SIZEOF_CHAR $ac_cv_sizeof_char _ACEOF -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FSEEKO64 0 -_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int8_t" >&5 +$as_echo_n "checking for type equivalent to int8_t... " >&6; } + case "$ac_cv_sizeof_char" in + 1) acx_cv_type_int8_t=char ;; + *) { as_fn_set_status please report a bug +as_fn_error "no 8-bit type" "$LINENO" 5; } + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int8_t" >&5 +$as_echo "$acx_cv_type_int8_t" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int16_t" >&5 +$as_echo_n "checking for type equivalent to int16_t... " >&6; } + case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in + 2:*) acx_cv_type_int16_t=int ;; + *:2) acx_cv_type_int16_t=short ;; + *) { as_fn_set_status please report a bug +as_fn_error "no 16-bit type" "$LINENO" 5; } + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int16_t" >&5 +$as_echo "$acx_cv_type_int16_t" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int32_t" >&5 +$as_echo_n "checking for type equivalent to int32_t... " >&6; } + case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in + 4:*) acx_cv_type_int32_t=int ;; + *:4) acx_cv_type_int32_t=long ;; + *) { as_fn_set_status please report a bug +as_fn_error "no 32-bit type" "$LINENO" 5; } + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_int32_t" >&5 +$as_echo "$acx_cv_type_int32_t" >&6; } +fi + +# These tests are here to make the output prettier +if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then + case "$ac_cv_sizeof_long" in + 8) acx_cv_type_int64_t=long ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to int64_t" >&5 +$as_echo_n "checking for type equivalent to int64_t... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${acx_cv_type_int64_t-'using preprocessor symbols'}" >&5 +$as_echo "${acx_cv_type_int64_t-'using preprocessor symbols'}" >&6; } fi +# Now we can use the above types +if test "$ac_cv_type_uintptr_t" != yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type equivalent to intptr_t" >&5 +$as_echo_n "checking for type equivalent to intptr_t... " >&6; } + case $ac_cv_sizeof_void_p in + 2) acx_cv_type_intptr_t=int16_t ;; + 4) acx_cv_type_intptr_t=int32_t ;; + 8) acx_cv_type_intptr_t=int64_t ;; + *) { as_fn_set_status please report a bug +as_fn_error "no equivalent for intptr_t" "$LINENO" 5; } + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_type_intptr_t" >&5 +$as_echo "$acx_cv_type_intptr_t" >&6; } +fi +# ----------------- done all checks, emit header ------------- +ac_config_commands="$ac_config_commands bfd_stdint.h" -case "${host}" in -*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) -cat >>confdefs.h <<\_ACEOF -#define USE_BINARY_FOPEN 1 -_ACEOF - ;; -esac -echo "$as_me:$LINENO: checking whether ffs is declared" >&5 -echo $ECHO_N "checking whether ffs is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_ffs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if test "${ac_cv_header_time+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include +#include +#include + int main () { -#ifndef ffs - char *p = (char *) ffs; -#endif - +if ((struct tm *) 0) +return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_ffs=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_ffs=no + ac_cv_header_time=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_ffs" >&5 -echo "${ECHO_T}$ac_cv_have_decl_ffs" >&6 -if test $ac_cv_have_decl_ffs = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FFS 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FFS 0 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi - -echo "$as_me:$LINENO: checking whether free is declared" >&5 -echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_free+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include +#include <$ac_hdr> + int main () { -#ifndef free - char *p = (char *) free; -#endif - +if ((DIR *) 0) +return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_free=yes +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_free=no + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5 -echo "${ECHO_T}$ac_cv_have_decl_free" >&6 -if test $ac_cv_have_decl_free = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FREE 1 -_ACEOF - - -else +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FREE 0 +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF - +ac_header_dirent=$ac_hdr; break fi - -echo "$as_me:$LINENO: checking whether getenv is declared" >&5 -echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_getenv+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); int main () { -#ifndef getenv - char *p = (char *) getenv; -#endif - +return opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_getenv=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_getenv=no +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then : + break fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5 -echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6 -if test $ac_cv_have_decl_getenv = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETENV 1 -_ACEOF - +done +if test "${ac_cv_search_opendir+set}" = set; then : else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETENV 0 -_ACEOF - - + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +fi -echo "$as_me:$LINENO: checking whether malloc is declared" >&5 -echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_malloc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); int main () { -#ifndef malloc - char *p = (char *) malloc; -#endif - +return opendir (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_malloc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_malloc=no +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then : + break fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5 -echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6 -if test $ac_cv_have_decl_malloc = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MALLOC 1 -_ACEOF - +done +if test "${ac_cv_search_opendir+set}" = set; then : else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MALLOC 0 -_ACEOF - + ac_cv_search_opendir=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi +fi -echo "$as_me:$LINENO: checking whether realloc is declared" >&5 -echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_realloc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5 +$as_echo_n "checking whether string.h and strings.h may both be included... " >&6; } +if test "${gcc_cv_header_string+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include +#include int main () { -#ifndef realloc - char *p = (char *) realloc; -#endif ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_realloc=yes +if ac_fn_c_try_compile "$LINENO"; then : + gcc_cv_header_string=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_realloc=no + gcc_cv_header_string=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5 -echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6 -if test $ac_cv_have_decl_realloc = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_string" >&5 +$as_echo "$gcc_cv_header_string" >&6; } +if test $gcc_cv_header_string = yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_REALLOC 1 -_ACEOF +$as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h +fi -else +for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_REALLOC 0 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF +fi +done + +for ac_func in strtoull +do : + ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOULL 1 +_ACEOF fi +done -echo "$as_me:$LINENO: checking whether stpcpy is declared" >&5 -echo $ECHO_N "checking whether stpcpy is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_stpcpy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +ac_fn_c_check_decl "$LINENO" "basename" "ac_cv_have_decl_basename" "$ac_includes_default" +if test "x$ac_cv_have_decl_basename" = x""yes; then : + ac_have_decl=1 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef stpcpy - char *p = (char *) stpcpy; -#endif + ac_have_decl=0 +fi - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_BASENAME $ac_have_decl _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_stpcpy=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_stpcpy=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" +if test "x$ac_cv_have_decl_ftello" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_stpcpy" >&5 -echo "${ECHO_T}$ac_cv_have_decl_stpcpy" >&6 -if test $ac_cv_have_decl_stpcpy = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STPCPY 1 +#define HAVE_DECL_FTELLO $ac_have_decl _ACEOF - +ac_fn_c_check_decl "$LINENO" "ftello64" "ac_cv_have_decl_ftello64" "$ac_includes_default" +if test "x$ac_cv_have_decl_ftello64" = x""yes; then : + ac_have_decl=1 else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STPCPY 0 -_ACEOF - - + ac_have_decl=0 fi - -echo "$as_me:$LINENO: checking whether strstr is declared" >&5 -echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_strstr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FTELLO64 $ac_have_decl _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef strstr - char *p = (char *) strstr; -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_strstr=yes +ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" +if test "x$ac_cv_have_decl_fseeko" = x""yes; then : + ac_have_decl=1 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_strstr=no + ac_have_decl=0 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5 -echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6 -if test $ac_cv_have_decl_strstr = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRSTR 1 +#define HAVE_DECL_FSEEKO $ac_have_decl _ACEOF - +ac_fn_c_check_decl "$LINENO" "fseeko64" "ac_cv_have_decl_fseeko64" "$ac_includes_default" +if test "x$ac_cv_have_decl_fseeko64" = x""yes; then : + ac_have_decl=1 else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRSTR 0 -_ACEOF - - + ac_have_decl=0 fi - -echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 -echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_snprintf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FSEEKO64 $ac_have_decl _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef snprintf - char *p = (char *) snprintf; -#endif - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_snprintf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_snprintf=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +case "${host}" in +*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) + +$as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h + ;; +esac + +ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" +if test "x$ac_cv_have_decl_ffs" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 -echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6 -if test $ac_cv_have_decl_snprintf = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SNPRINTF 1 +#define HAVE_DECL_FFS $ac_have_decl _ACEOF - +ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default" +if test "x$ac_cv_have_decl_free" = x""yes; then : + ac_have_decl=1 else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SNPRINTF 0 -_ACEOF + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FREE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" +if test "x$ac_cv_have_decl_getenv" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETENV $ac_have_decl +_ACEOF -echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 -echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_vsnprintf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +ac_fn_c_check_decl "$LINENO" "malloc" "ac_cv_have_decl_malloc" "$ac_includes_default" +if test "x$ac_cv_have_decl_malloc" = x""yes; then : + ac_have_decl=1 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef vsnprintf - char *p = (char *) vsnprintf; -#endif + ac_have_decl=0 +fi - ; - return 0; -} +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MALLOC $ac_have_decl _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_have_decl_vsnprintf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_have_decl_vsnprintf=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_fn_c_check_decl "$LINENO" "realloc" "ac_cv_have_decl_realloc" "$ac_includes_default" +if test "x$ac_cv_have_decl_realloc" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5 -echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6 -if test $ac_cv_have_decl_vsnprintf = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_VSNPRINTF 1 +#define HAVE_DECL_REALLOC $ac_have_decl _ACEOF +ac_fn_c_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "$ac_includes_default" +if test "x$ac_cv_have_decl_stpcpy" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STPCPY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" +if test "x$ac_cv_have_decl_strstr" = x""yes; then : + ac_have_decl=1 else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_VSNPRINTF 0 + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRSTR $ac_have_decl _ACEOF +ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" +if test "x$ac_cv_have_decl_snprintf" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SNPRINTF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" +if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_VSNPRINTF $ac_have_decl +_ACEOF # Link in zlib if we can. This allows us to read compressed debug sections. # This is used only by compress.c. -echo "$as_me:$LINENO: checking for library containing zlibVersion" >&5 -echo $ECHO_N "checking for library containing zlibVersion... $ECHO_C" >&6 -if test "${ac_cv_search_zlibVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5 +$as_echo_n "checking for library containing zlibVersion... " >&6; } +if test "${ac_cv_search_zlibVersion+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_zlibVersion=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -char zlibVersion (); -int -main () -{ -zlibVersion (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_zlibVersion="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_zlibVersion" = no; then - for ac_lib in z; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char zlibVersion (); int main () { -zlibVersion (); +return zlibVersion (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_zlibVersion="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_zlibVersion" >&5 -echo "${ECHO_T}$ac_cv_search_zlibVersion" >&6 -if test "$ac_cv_search_zlibVersion" != no; then - test "$ac_cv_search_zlibVersion" = "none required" || LIBS="$ac_cv_search_zlibVersion $LIBS" - -for ac_header in zlib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag +for ac_lib in '' z; do + if test -z "$ac_lib"; then + ac_res="none required" else - ac_cpp_err= + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi -else - ac_cpp_err=yes + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_zlibVersion=$ac_res fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_zlibVersion+set}" = set; then : + break fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +done +if test "${ac_cv_search_zlibVersion+set}" = set; then : -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_search_zlibVersion=no fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5 +$as_echo "$ac_cv_search_zlibVersion" >&6; } +ac_res=$ac_cv_search_zlibVersion +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + for ac_header in zlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_ZLIB_H 1 _ACEOF fi @@ -19228,7 +13807,7 @@ if test "${target}" = "${host}"; then rs6000-*-lynx*) COREFILE=lynx-core.lo ;; - rs6000-*-aix5.* | powerpc-*-aix5.*) + rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].*) COREFILE=rs6000-core.lo COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE" ;; @@ -19237,13 +13816,9 @@ if test "${target}" = "${host}"; then COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" # Not all versions of AIX with -DAIX_CORE_DUMPX_CORE # have c_impl as a member of struct core_dumpx - echo "$as_me:$LINENO: checking for c_impl in struct core_dumpx" >&5 -echo $ECHO_N "checking for c_impl in struct core_dumpx... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c_impl in struct core_dumpx" >&5 +$as_echo_n "checking for c_impl in struct core_dumpx... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -19254,43 +13829,17 @@ struct core_dumpx c; c.c_impl = 0; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : -cat >>confdefs.h <<\_ACEOF -#define HAVE_ST_C_IMPL 1 -_ACEOF +$as_echo "#define HAVE_ST_C_IMPL 1" >>confdefs.h - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; rs6000-*-*) COREFILE=rs6000-core.lo ;; @@ -19352,150 +13901,12 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # ELF corefile support has several flavors, but all of # them use something called - -for ac_header in sys/procfs.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then + for ac_header in sys/procfs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_procfs_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_PROCFS_H 1 _ACEOF fi @@ -19503,16 +13914,12 @@ fi done if test "$ac_cv_header_sys_procfs_h" = yes; then - echo "$as_me:$LINENO: checking for prstatus_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for prstatus_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_prstatus_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus_t in sys/procfs.h" >&5 +$as_echo_n "checking for prstatus_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_prstatus_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -19525,59 +13932,29 @@ prstatus_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_prstatus_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_prstatus_t=no + bfd_cv_have_sys_procfs_type_prstatus_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PRSTATUS_T 1 -_ACEOF +$as_echo "#define HAVE_PRSTATUS_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prstatus_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prstatus_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prstatus_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_prstatus_t" >&6; } - echo "$as_me:$LINENO: checking for prstatus32_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for prstatus32_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_prstatus32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus32_t in sys/procfs.h" >&5 +$as_echo_n "checking for prstatus32_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_prstatus32_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -19590,59 +13967,29 @@ prstatus32_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_prstatus32_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_prstatus32_t=no + bfd_cv_have_sys_procfs_type_prstatus32_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PRSTATUS32_T 1 -_ACEOF +$as_echo "#define HAVE_PRSTATUS32_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prstatus32_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prstatus32_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prstatus32_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_prstatus32_t" >&6; } - echo "$as_me:$LINENO: checking for prstatus_t.pr_who in sys/procfs.h" >&5 -echo $ECHO_N "checking for prstatus_t.pr_who in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus_t.pr_who in sys/procfs.h" >&5 +$as_echo_n "checking for prstatus_t.pr_who in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -19655,59 +14002,29 @@ prstatus_t avar; void* aref = (void*) &avar.pr_who return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no + bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PRSTATUS_T_PR_WHO 1 -_ACEOF +$as_echo "#define HAVE_PRSTATUS_T_PR_WHO 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" >&6; } - echo "$as_me:$LINENO: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 -echo $ECHO_N "checking for prstatus32_t.pr_who in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 +$as_echo_n "checking for prstatus32_t.pr_who in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -19720,59 +14037,29 @@ prstatus32_t avar; void* aref = (void*) &avar.pr_who return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no + bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PRSTATUS32_T_PR_WHO 1 -_ACEOF +$as_echo "#define HAVE_PRSTATUS32_T_PR_WHO 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" >&6; } - echo "$as_me:$LINENO: checking for pstatus_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for pstatus_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus_t in sys/procfs.h" >&5 +$as_echo_n "checking for pstatus_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -19785,59 +14072,29 @@ pstatus_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_pstatus_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_pstatus_t=no + bfd_cv_have_sys_procfs_type_pstatus_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PSTATUS_T 1 -_ACEOF +$as_echo "#define HAVE_PSTATUS_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_pstatus_t" >&6; } - echo "$as_me:$LINENO: checking for pxstatus_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for pxstatus_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_pxstatus_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pxstatus_t in sys/procfs.h" >&5 +$as_echo_n "checking for pxstatus_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_pxstatus_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -19850,59 +14107,29 @@ pxstatus_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_pxstatus_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_pxstatus_t=no + bfd_cv_have_sys_procfs_type_pxstatus_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PXSTATUS_T 1 -_ACEOF +$as_echo "#define HAVE_PXSTATUS_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pxstatus_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pxstatus_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pxstatus_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_pxstatus_t" >&6; } - echo "$as_me:$LINENO: checking for pstatus32_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for pstatus32_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_pstatus32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pstatus32_t in sys/procfs.h" >&5 +$as_echo_n "checking for pstatus32_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_pstatus32_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -19915,59 +14142,29 @@ pstatus32_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_pstatus32_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_pstatus32_t=no + bfd_cv_have_sys_procfs_type_pstatus32_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PSTATUS32_T 1 -_ACEOF +$as_echo "#define HAVE_PSTATUS32_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_pstatus32_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_pstatus32_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_pstatus32_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_pstatus32_t" >&6; } - echo "$as_me:$LINENO: checking for prpsinfo_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for prpsinfo_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo_t in sys/procfs.h" >&5 +$as_echo_n "checking for prpsinfo_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -19979,60 +14176,30 @@ prpsinfo_t avar ; return 0; } -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_prpsinfo_t=no + bfd_cv_have_sys_procfs_type_prpsinfo_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PRPSINFO_T 1 -_ACEOF +$as_echo "#define HAVE_PRPSINFO_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prpsinfo_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prpsinfo_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prpsinfo_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_prpsinfo_t" >&6; } - echo "$as_me:$LINENO: checking for prpsinfo32_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for prpsinfo32_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_prpsinfo32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prpsinfo32_t in sys/procfs.h" >&5 +$as_echo_n "checking for prpsinfo32_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_prpsinfo32_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -20045,59 +14212,29 @@ prpsinfo32_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_prpsinfo32_t=no + bfd_cv_have_sys_procfs_type_prpsinfo32_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PRPSINFO32_T 1 -_ACEOF +$as_echo "#define HAVE_PRPSINFO32_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_prpsinfo32_t" >&6; } - echo "$as_me:$LINENO: checking for psinfo_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for psinfo_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_psinfo_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo_t in sys/procfs.h" >&5 +$as_echo_n "checking for psinfo_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_psinfo_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -20110,59 +14247,29 @@ psinfo_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_psinfo_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_psinfo_t=no + bfd_cv_have_sys_procfs_type_psinfo_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PSINFO_T 1 -_ACEOF +$as_echo "#define HAVE_PSINFO_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psinfo_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psinfo_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psinfo_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_psinfo_t" >&6; } - echo "$as_me:$LINENO: checking for psinfo32_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for psinfo32_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_psinfo32_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psinfo32_t in sys/procfs.h" >&5 +$as_echo_n "checking for psinfo32_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_psinfo32_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -20175,59 +14282,29 @@ psinfo32_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_psinfo32_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_psinfo32_t=no + bfd_cv_have_sys_procfs_type_psinfo32_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PSINFO32_T 1 -_ACEOF +$as_echo "#define HAVE_PSINFO32_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_psinfo32_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_psinfo32_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psinfo32_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_psinfo32_t" >&6; } - echo "$as_me:$LINENO: checking for lwpstatus_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for lwpstatus_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t in sys/procfs.h" >&5 +$as_echo_n "checking for lwpstatus_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -20240,59 +14317,29 @@ lwpstatus_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_lwpstatus_t=no + bfd_cv_have_sys_procfs_type_lwpstatus_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LWPSTATUS_T 1 -_ACEOF +$as_echo "#define HAVE_LWPSTATUS_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpstatus_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpstatus_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpstatus_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_lwpstatus_t" >&6; } - echo "$as_me:$LINENO: checking for lwpxstatus_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for lwpxstatus_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_lwpxstatus_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpxstatus_t in sys/procfs.h" >&5 +$as_echo_n "checking for lwpxstatus_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_lwpxstatus_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -20305,59 +14352,29 @@ lwpxstatus_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_lwpxstatus_t=no + bfd_cv_have_sys_procfs_type_lwpxstatus_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LWPXSTATUS_T 1 -_ACEOF +$as_echo "#define HAVE_LWPXSTATUS_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_lwpxstatus_t" >&6; } - echo "$as_me:$LINENO: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 -echo $ECHO_N "checking for lwpstatus_t.pr_context in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 +$as_echo_n "checking for lwpstatus_t.pr_context in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -20370,59 +14387,29 @@ lwpstatus_t avar; void* aref = (void*) &avar.pr_context return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no + bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LWPSTATUS_T_PR_CONTEXT 1 -_ACEOF +$as_echo "#define HAVE_LWPSTATUS_T_PR_CONTEXT 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" >&6; } - echo "$as_me:$LINENO: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 -echo $ECHO_N "checking for lwpstatus_t.pr_reg in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 +$as_echo_n "checking for lwpstatus_t.pr_reg in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -20435,59 +14422,29 @@ lwpstatus_t avar; void* aref = (void*) &avar.pr_reg return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no + bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LWPSTATUS_T_PR_REG 1 -_ACEOF +$as_echo "#define HAVE_LWPSTATUS_T_PR_REG 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&6; } - echo "$as_me:$LINENO: checking for win32_pstatus_t in sys/procfs.h" >&5 -echo $ECHO_N "checking for win32_pstatus_t in sys/procfs.h... $ECHO_C" >&6 - if test "${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for win32_pstatus_t in sys/procfs.h" >&5 +$as_echo_n "checking for win32_pstatus_t in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _SYSCALL32 @@ -20500,48 +14457,22 @@ win32_pstatus_t avar return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_compile "$LINENO"; then : bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -bfd_cv_have_sys_procfs_type_win32_pstatus_t=no + bfd_cv_have_sys_procfs_type_win32_pstatus_t=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_WIN32_PSTATUS_T 1 -_ACEOF +$as_echo "#define HAVE_WIN32_PSTATUS_T 1" >>confdefs.h fi - echo "$as_me:$LINENO: result: $bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&5 -echo "${ECHO_T}$bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_win32_pstatus_t" >&6; } fi fi @@ -20555,6 +14486,154 @@ _ACEOF fi +# Check if linker supports --as-needed and --no-as-needed options +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5 +$as_echo_n "checking linker --as-needed support... " >&6; } +if test "${bfd_cv_ld_as_needed+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + bfd_cv_ld_as_needed=no + if $LD --help 2>/dev/null | grep as-needed > /dev/null; then + bfd_cv_ld_as_needed=yes + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_ld_as_needed" >&5 +$as_echo "$bfd_cv_ld_as_needed" >&6; } + +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 +$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } +if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmw $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _mwvalidcheckl (); +int +main () +{ +return _mwvalidcheckl (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mw__mwvalidcheckl=yes +else + ac_cv_lib_mw__mwvalidcheckl=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 +$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } +if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then : + LIBM="-lmw" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if test "${ac_cv_lib_m_cos+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = x""yes; then : + LIBM="$LIBM -lm" +fi + + ;; +*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if test "${ac_cv_lib_m_cos+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = x""yes; then : + LIBM="-lm" +fi + + ;; +esac + + + # When building a shared libbfd, link against the pic version of libiberty # so that apps that use libbfd won't need libiberty just to satisfy any # libbfd references. @@ -20575,6 +14654,18 @@ if test "$enable_shared" = "yes"; then SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" ;; esac + + if test -n "$SHARED_LIBADD"; then + if test -n "$LIBM"; then + if test x"$bfd_cv_ld_as_needed" = xyes; then + # Link against libm only when needed. Put -lc, -lm inside -Wl + # to stop libtool reordering these options. + SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed" + else + SHARED_LIBADD="$SHARED_LIBADD $LIBM" + fi + fi + fi fi @@ -20660,7 +14751,8 @@ selarchs="$f" # Target backend .o files. tb= -elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo" +elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo + elf-eh-frame.lo dwarf1.lo" for vec in $selvecs do @@ -20692,15 +14784,7 @@ do armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;; b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; - bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;; - bfd_efi_bsdrv_ia32_vec) tb="$tb efi-bsdrv-ia32.lo peigen.lo cofflink.lo" ;; - bfd_efi_rtdrv_ia32_vec) tb="$tb efi-rtdrv-ia32.lo peigen.lo cofflink.lo" ;; - bfd_efi_app_x86_64_vec) tb="$tb efi-app-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;; - bfd_efi_bsdrv_x86_64_vec) tb="$tb efi-bsdrv-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;; - bfd_efi_rtdrv_x86_64_vec) tb="$tb efi-rtdrv-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;; - bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; - bfd_efi_bsdrv_ia64_vec) tb="$tb efi-bsdrv-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; - bfd_efi_rtdrv_ia64_vec) tb="$tb efi-rtdrv-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; + bfd_pei_ia64_vec) tb="$tb pei-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; bfd_elf32_am33lin_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;; bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; bfd_elf32_bfin_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;; @@ -20725,16 +14809,17 @@ do bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; + bfd_elf32_moxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;; bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_dragonfly_vec) - tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; + tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; @@ -20767,6 +14852,7 @@ do bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; bfd_elf32_mep_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;; bfd_elf32_mep_little_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;; + bfd_elf32_microblaze_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;; bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;; bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;; @@ -20782,9 +14868,11 @@ do bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_rx_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; + bfd_elf32_rx_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; - bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;; - bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;; + bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;; + bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;; # FIXME: We include cofflink.lo not because it's needed for # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec # which needs it but does not list it. Should be fixed in right place. @@ -20824,7 +14912,7 @@ do bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_ia64_vms_vec) tb="$tb elf64-ia64.lo elf64.lo $elf vmsutil.lo"; target_size=64 ;; + bfd_elf64_ia64_vms_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; @@ -20841,8 +14929,10 @@ do bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_l1om_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; @@ -20896,6 +14986,7 @@ do mach_o_be_vec) tb="$tb mach-o.lo" ;; mach_o_le_vec) tb="$tb mach-o.lo" ;; mach_o_fat_vec) tb="$tb mach-o.lo" ;; + mach_o_i386_vec) tb="$tb mach-o-i386.lo" ;; mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; @@ -20913,6 +15004,7 @@ do pef_vec) tb="$tb pef.lo" ;; pef_xlib_vec) tb="$tb pef.lo" ;; pdp11_aout_vec) tb="$tb pdp11.lo" ;; + plugin_vec) tb="$tb plugin.lo" ;; pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; ppcboot_vec) tb="$tb ppcboot.lo" ;; riscix_vec) tb="$tb aout32.lo riscix.lo" ;; @@ -20967,9 +15059,7 @@ do cisco_core_little_vec) tb="$tb cisco-core.lo" ;; "") ;; - *) { { echo "$as_me:$LINENO: error: *** unknown target vector $vec" >&5 -echo "$as_me: error: *** unknown target vector $vec" >&2;} - { (exit 1); exit 1; }; } ;; + *) as_fn_error "*** unknown target vector $vec" "$LINENO" 5 ;; esac if test ${target_size} = 64; then @@ -21033,590 +15123,112 @@ case ${host64}-${target64}-${want64} in bfd64_libs='$(BFD64_LIBS)' all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' if test $BFD_HOST_64_BIT_DEFINED = 0; then - { echo "$as_me:$LINENO: WARNING: You have requested a 64 bit BFD configuration, but" >&5 -echo "$as_me: WARNING: You have requested a 64 bit BFD configuration, but" >&2;} - { echo "$as_me:$LINENO: WARNING: your compiler may not have a 64 bit integral type" >&5 -echo "$as_me: WARNING: your compiler may not have a 64 bit integral type" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have requested a 64 bit BFD configuration, but" >&5 +$as_echo "$as_me: WARNING: You have requested a 64 bit BFD configuration, but" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your compiler may not have a 64 bit integral type" >&5 +$as_echo "$as_me: WARNING: your compiler may not have a 64 bit integral type" >&2;} fi if test -n "$GCC" ; then - bad_64bit_gcc=no; - echo "$as_me:$LINENO: checking for gcc version with buggy 64-bit support" >&5 -echo $ECHO_N "checking for gcc version with buggy 64-bit support... $ECHO_C" >&6 - # Add more tests for gcc versions with non-working 64-bit support here. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -:__GNUC__:__GNUC_MINOR__:__i386__: -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP ": 2 : 91 : 1 :" >/dev/null 2>&1; then - bad_64bit_gcc=yes; - echo "$as_me:$LINENO: result: yes: egcs-1.1.2 on ix86 spotted" >&5 -echo "${ECHO_T}yes: egcs-1.1.2 on ix86 spotted" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest* - - if test $bad_64bit_gcc = yes ; then - { { echo "$as_me:$LINENO: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" >&5 -echo "$as_me: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" >&2;} - { (exit 1); exit 1; }; } - fi - fi - ;; - false-false-false) - wordsize=32 - all_backends='$(BFD32_BACKENDS)' - ;; -esac - - - - - - - - -# Determine the host dependant file_ptr a.k.a. off_t type. In order -# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and -# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long. -# Hopefully a reasonable assumption since fseeko et.al. should be -# upward compatible. - - - - - -for ac_func in ftello ftello64 fseeko fseeko64 fopen64 -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then - echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 -if test "${ac_cv_type_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if ((off_t *) 0) - return 0; -if (sizeof (off_t)) - return 0; - ; - return 0; -} + bad_64bit_gcc=no; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc version with buggy 64-bit support" >&5 +$as_echo_n "checking for gcc version with buggy 64-bit support... " >&6; } + # Add more tests for gcc versions with non-working 64-bit support here. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +:__GNUC__:__GNUC_MINOR__:__i386__: _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_off_t=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP ": 2 : 91 : 1 :" >/dev/null 2>&1; then : + bad_64bit_gcc=yes; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: egcs-1.1.2 on ix86 spotted" >&5 +$as_echo "yes: egcs-1.1.2 on ix86 spotted" >&6; } else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_off_t=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 +rm -f conftest* -echo "$as_me:$LINENO: checking size of off_t" >&5 -echo $ECHO_N "checking size of off_t... $ECHO_C" >&6 -if test "${ac_cv_sizeof_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_off_t" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= 0)]; -test_array [0] = 0 + if test $bad_64bit_gcc = yes ; then + as_fn_error "A newer version of gcc is needed for the requested 64-bit BFD configuration" "$LINENO" 5 + fi + fi + ;; + false-false-false) + wordsize=32 + all_backends='$(BFD32_BACKENDS)' + ;; +esac - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)]; -test_array [0] = 0 - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (off_t))) < 0)]; -test_array [0] = 0 - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (off_t))) >= $ac_mid)]; -test_array [0] = 0 - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +if test "$plugins" = "yes"; then + supports_plugins=1 +else + supports_plugins=0 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (off_t))) <= $ac_mid)]; -test_array [0] = 0 - ; - return 0; -} + +# Determine the host dependant file_ptr a.k.a. off_t type. In order +# prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and +# fseeko, long. This assumes that sizeof off_t is .ge. sizeof long. +# Hopefully a reasonable assumption since fseeko et.al. should be +# upward compatible. +for ac_func in ftello ftello64 fseeko fseeko64 fopen64 +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done -case $ac_lo in -?*) ac_cv_sizeof_off_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off_t), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (off_t)); } -unsigned long ulongval () { return (long) (sizeof (off_t)); } -#include -#include -int -main () -{ - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (off_t))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (off_t)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (off_t)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_off_t=`cat conftest.val` +if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then + # The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 +$as_echo_n "checking size of off_t... " >&6; } +if test "${ac_cv_sizeof_off_t+set}" = set; then : + $as_echo_n "(cached) " >&6 else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off_t), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val else - ac_cv_sizeof_off_t=0 + if test "$ac_cv_type_off_t" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (off_t) +See \`config.log' for more details." "$LINENO" 5; }; } + else + ac_cv_sizeof_off_t=0 + fi fi + fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 +$as_echo "$ac_cv_sizeof_off_t" >&6; } + + + cat >>confdefs.h <<_ACEOF #define SIZEOF_OFF_T $ac_cv_sizeof_off_t _ACEOF fi -echo "$as_me:$LINENO: checking file_ptr type" >&5 -echo $ECHO_N "checking file_ptr type... $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking file_ptr type" >&5 +$as_echo_n "checking file_ptr type... " >&6; } bfd_file_ptr="long" bfd_ufile_ptr="unsigned long" if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \ @@ -21624,286 +15236,54 @@ if test x"$ac_cv_func_ftello64" = xyes -a x"$ac_cv_func_fseeko64" = xyes \ bfd_file_ptr=BFD_HOST_64_BIT bfd_ufile_ptr=BFD_HOST_U_64_BIT fi -echo "$as_me:$LINENO: result: $bfd_file_ptr" >&5 -echo "${ECHO_T}$bfd_file_ptr" >&6 - - - - -tdefaults="" -test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" -test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" -test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'" -test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" -test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" - - - - -for ac_header in stdlib.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_func in getpagesize -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_file_ptr" >&5 +$as_echo "$bfd_file_ptr" >&6; } -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif +tdefaults="" +test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}" +test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'" +test -n "${assocvecs}" && tdefaults="${tdefaults} -DASSOCIATED_VECS='${assocvecs}'" +test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'" +test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" -int -main () -{ -return f != $ac_func; - ; - return 0; -} + +for ac_header in stdlib.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then + +done + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_GETPAGESIZE 1 _ACEOF fi done -echo "$as_me:$LINENO: checking for working mmap" >&5 -echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ @@ -21934,21 +15314,21 @@ $ac_includes_default #include #include -#if !STDC_HEADERS && !HAVE_STDLIB_H +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ -#if !HAVE_GETPAGESIZE +#ifndef HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ -# if !HAVE_SYS_PARAM_H +# ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ -# if HAVE_SYS_PARAM_H +# ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE @@ -21987,15 +15367,15 @@ main () /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) - exit (1); + return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) - exit (1); + return 1; if (write (fd, data, pagesize) != pagesize) - exit (1); + return 1; close (fd); /* Next, try to mmap the file at a fixed address which already has @@ -22003,17 +15383,17 @@ main () we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) - exit (1); + return 1; data2 = (char *) malloc (2 * pagesize); if (!data2) - exit (1); - data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); + return 1; + data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit (1); + return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) - exit (1); + return 1; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on @@ -22022,148 +15402,43 @@ main () *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) - exit (1); + return 1; if (read (fd, data3, pagesize) != pagesize) - exit (1); + return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) - exit (1); + return 1; close (fd); - exit (0); + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_mmap_fixed_mapped=no + ac_cv_func_mmap_fixed_mapped=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + fi -echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 -echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_MMAP 1 -_ACEOF +$as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap - - for ac_func in madvise mprotect -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -22171,17 +15446,15 @@ done case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in true+yes ) -cat >>confdefs.h <<\_ACEOF -#define USE_MMAP 1 -_ACEOF +$as_echo "#define USE_MMAP 1" >>confdefs.h ;; esac rm -f doc/config.status - ac_config_files="$ac_config_files Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in" +ac_config_files="$ac_config_files Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in" - ac_config_commands="$ac_config_commands default" +ac_config_commands="$ac_config_commands default" @@ -22207,39 +15480,59 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -22248,32 +15541,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -22281,47 +15560,46 @@ LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${PLUGINS_TRUE}" && test -z "${PLUGINS_FALSE}"; then + as_fn_error "conditional \"PLUGINS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GENINSRC_NEVER_TRUE}" && test -z "${GENINSRC_NEVER_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"GENINSRC_NEVER\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"GENINSRC_NEVER\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"GENINSRC_NEVER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_LIBBFD_TRUE}" && test -z "${INSTALL_LIBBFD_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LIBBFD\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"INSTALL_LIBBFD\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"INSTALL_LIBBFD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -22331,81 +15609,252 @@ cat >$CONFIG_STATUS <<_ACEOF debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi -DUALCASE=1; export DUALCASE # for MKS sh -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi -done + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` - -# PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -22413,148 +15862,123 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - as_expr=false + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi - -as_executable_p="test -f" + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -22563,31 +15987,20 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -22595,45 +16008,46 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" -cat >>$CONFIG_STATUS <<\_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -22644,84 +16058,83 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." -_ACEOF +Report bugs to the package provider." -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.64, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; esac shift @@ -22735,19 +16148,32 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # -# INIT-COMMANDS section. +# INIT-COMMANDS # - AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" @@ -23033,29 +16459,28 @@ ac_cv_sizeof_void_p="$ac_cv_sizeof_void_p" _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "bfd-in3.h" ) CONFIG_FILES="$CONFIG_FILES bfd-in3.h:bfd-in2.h" ;; - "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;; - "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; - "bfd_stdint.h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS bfd_stdint.h" ;; - "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; + "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "bfd_stdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS bfd_stdint.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "bfd-in3.h") CONFIG_FILES="$CONFIG_FILES bfd-in3.h:bfd-in2.h" ;; + "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;; + "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -23067,896 +16492,669 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} { - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@target@,$target,;t t -s,@target_cpu@,$target_cpu,;t t -s,@target_vendor@,$target_vendor,;t t -s,@target_os@,$target_os,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CYGPATH_W@,$CYGPATH_W,;t t -s,@PACKAGE@,$PACKAGE,;t t -s,@VERSION@,$VERSION,;t t -s,@ACLOCAL@,$ACLOCAL,;t t -s,@AUTOCONF@,$AUTOCONF,;t t -s,@AUTOMAKE@,$AUTOMAKE,;t t -s,@AUTOHEADER@,$AUTOHEADER,;t t -s,@MAKEINFO@,$MAKEINFO,;t t -s,@install_sh@,$install_sh,;t t -s,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t -s,@mkdir_p@,$mkdir_p,;t t -s,@AWK@,$AWK,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@am__leading_dot@,$am__leading_dot,;t t -s,@AMTAR@,$AMTAR,;t t -s,@am__tar@,$am__tar,;t t -s,@am__untar@,$am__untar,;t t -s,@DEPDIR@,$DEPDIR,;t t -s,@am__include@,$am__include,;t t -s,@am__quote@,$am__quote,;t t -s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t -s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t -s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t -s,@CCDEPMODE@,$CCDEPMODE,;t t -s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t -s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t -s,@AR@,$AR,;t t -s,@ac_ct_AR@,$ac_ct_AR,;t t -s,@RANLIB@,$RANLIB,;t t -s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@LIBTOOL@,$LIBTOOL,;t t -s,@SED@,$SED,;t t -s,@FGREP@,$FGREP,;t t -s,@GREP@,$GREP,;t t -s,@LD@,$LD,;t t -s,@DUMPBIN@,$DUMPBIN,;t t -s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t -s,@NM@,$NM,;t t -s,@LN_S@,$LN_S,;t t -s,@OBJDUMP@,$OBJDUMP,;t t -s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t -s,@lt_ECHO@,$lt_ECHO,;t t -s,@DSYMUTIL@,$DSYMUTIL,;t t -s,@ac_ct_DSYMUTIL@,$ac_ct_DSYMUTIL,;t t -s,@NMEDIT@,$NMEDIT,;t t -s,@ac_ct_NMEDIT@,$ac_ct_NMEDIT,;t t -s,@LIPO@,$LIPO,;t t -s,@ac_ct_LIPO@,$ac_ct_LIPO,;t t -s,@OTOOL@,$OTOOL,;t t -s,@ac_ct_OTOOL@,$ac_ct_OTOOL,;t t -s,@OTOOL64@,$OTOOL64,;t t -s,@ac_ct_OTOOL64@,$ac_ct_OTOOL64,;t t -s,@DEBUGDIR@,$DEBUGDIR,;t t -s,@PKGVERSION@,$PKGVERSION,;t t -s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t -s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t -s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t -s,@NO_WERROR@,$NO_WERROR,;t t -s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t -s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t -s,@MAINT@,$MAINT,;t t -s,@GENINSRC_NEVER_TRUE@,$GENINSRC_NEVER_TRUE,;t t -s,@GENINSRC_NEVER_FALSE@,$GENINSRC_NEVER_FALSE,;t t -s,@INSTALL_LIBBFD_TRUE@,$INSTALL_LIBBFD_TRUE,;t t -s,@INSTALL_LIBBFD_FALSE@,$INSTALL_LIBBFD_FALSE,;t t -s,@host_noncanonical@,$host_noncanonical,;t t -s,@target_noncanonical@,$target_noncanonical,;t t -s,@bfdlibdir@,$bfdlibdir,;t t -s,@bfdincludedir@,$bfdincludedir,;t t -s,@USE_NLS@,$USE_NLS,;t t -s,@LIBINTL@,$LIBINTL,;t t -s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t -s,@INCINTL@,$INCINTL,;t t -s,@XGETTEXT@,$XGETTEXT,;t t -s,@GMSGFMT@,$GMSGFMT,;t t -s,@POSUB@,$POSUB,;t t -s,@CATALOGS@,$CATALOGS,;t t -s,@DATADIRNAME@,$DATADIRNAME,;t t -s,@INSTOBJEXT@,$INSTOBJEXT,;t t -s,@GENCAT@,$GENCAT,;t t -s,@CATOBJEXT@,$CATOBJEXT,;t t -s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t -s,@MSGFMT@,$MSGFMT,;t t -s,@MSGMERGE@,$MSGMERGE,;t t -s,@HDEFINES@,$HDEFINES,;t t -s,@BFD_HOST_64BIT_LONG@,$BFD_HOST_64BIT_LONG,;t t -s,@BFD_HOST_64BIT_LONG_LONG@,$BFD_HOST_64BIT_LONG_LONG,;t t -s,@BFD_HOST_64_BIT_DEFINED@,$BFD_HOST_64_BIT_DEFINED,;t t -s,@BFD_HOST_64_BIT@,$BFD_HOST_64_BIT,;t t -s,@BFD_HOST_U_64_BIT@,$BFD_HOST_U_64_BIT,;t t -s,@BFD_HOSTPTR_T@,$BFD_HOSTPTR_T,;t t -s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t -s,@EXEEXT_FOR_BUILD@,$EXEEXT_FOR_BUILD,;t t -s,@COREFILE@,$COREFILE,;t t -s,@COREFLAG@,$COREFLAG,;t t -s,@SHARED_LDFLAGS@,$SHARED_LDFLAGS,;t t -s,@SHARED_LIBADD@,$SHARED_LIBADD,;t t -s,@TDEFINES@,$TDEFINES,;t t -s,@wordsize@,$wordsize,;t t -s,@bfd64_libs@,$bfd64_libs,;t t -s,@all_backends@,$all_backends,;t t -s,@bfd_backends@,$bfd_backends,;t t -s,@bfd_machines@,$bfd_machines,;t t -s,@bfd_default_target_size@,$bfd_default_target_size,;t t -s,@bfd_file_ptr@,$bfd_file_ptr,;t t -s,@bfd_ufile_ptr@,$bfd_ufile_ptr,;t t -s,@tdefaults@,$tdefaults,;t t -s,@datarootdir@,$datarootdir,;t t -s,@docdir@,$docdir,;t t -s,@htmldir@,$htmldir,;t t -s,@pdfdir@,$pdfdir,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else - cat $tmp/config.h - rm -f $tmp/config.h + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error "could not create -" "$LINENO" 5 fi -# Compute $ac_file's index in $config_headers. +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $ac_file | $ac_file:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X$ac_file | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'`/stamp-h$_am_stamp_count -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`(dirname "$mf") 2>/dev/null || + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`(dirname "$file") 2>/dev/null || + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p $dirpart/$fdir - else - as_dir=$dirpart/$fdir - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 -echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} - { (exit 1); exit 1; }; }; } - - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" done -done +} ;; - libtool ) + "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. @@ -24591,7 +17789,7 @@ _LT_EOF chmod +x "$ofile" ;; - default-1 ) + "default-1":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in @@ -24692,7 +17890,7 @@ _LT_EOF ;; esac done ;; - bfd_stdint.h ) + "bfd_stdint.h":C) if test "$GCC" = yes; then echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h else @@ -25020,7 +18218,7 @@ else fi ;; - default ) + "default":C) case "$srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; @@ -25038,17 +18236,18 @@ sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \ -e "s,@POFILES@,$POFILES," \ -e "s,@GMOFILES@,$GMOFILES," \ po/Makefile.in > po/Makefile ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -25068,7 +18267,11 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/cegcc/src/binutils/bfd/configure.com b/cegcc/src/binutils/bfd/configure.com index de44dfc25..21024156e 100644 --- a/cegcc/src/binutils/bfd/configure.com +++ b/cegcc/src/binutils/bfd/configure.com @@ -1,18 +1,22 @@ $! -$! This file configures the bfd library for use with openVMS (Alpha and Vax) +$! This file configures the bfd library for use with openVMS. $! $! We do not use the configure script, since we do not have /bin/sh $! to execute it. $! $! Written by Klaus K"ampf (kkaempf@rmi.de) +$! Rewritten by Tristan Gingold (gingold@adacore.com) $! -$arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1) ! vax==1, alpha==2 -$arch = f$element(arch_indx,"|","|VAX|Alpha|") +$ arch=F$GETSYI("ARCH_NAME") +$ arch=F$EDIT(arch,"LOWERCASE") +$if arch .eqs. "alpha" then target = "alpha" +$if arch .eqs. "ia64" then target = "ia64" $! -$if arch .eqs. "Alpha" +$if (arch .eqs. "alpha") .or. (arch .eqs. "ia64") $then -$ write sys$output "Configuring for Alpha target" -$ target = "alpha" +$! +$ write sys$output "Configuring BFD for ''target' target" +$! $! $! copy bfd-in2.h to bfd.h, replacing @ macros $! @@ -23,6 +27,7 @@ $DECK ! Copy file, changing lines with macros (@@) ! ! + set (success,off); vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN"); rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile)); match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang); @@ -111,6 +116,12 @@ $DECK ERASE(match_pos); COPY_TEXT('bfd_vma ufile_ptr'); ENDIF; + match_pos := SEARCH_QUIETLY('@supports_plugins@', FORWARD, EXACT, rang); + IF match_pos <> 0 THEN; + POSITION(BEGINNING_OF(match_pos)); + ERASE(match_pos); + COPY_TEXT('0'); + ENDIF; WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file")); QUIT $ EOD @@ -122,6 +133,7 @@ $ target = "vax" $! $! copy bfd-in2.h to bfd.h, replacing @ macros $! +$ write sys$output "Generated `bfd.h' from `bfd-in2.h'." $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input - []bfd-in2.h /output=[]bfd.h $DECK @@ -129,6 +141,7 @@ $DECK ! Copy file, changing lines with macros (@@) ! ! + set (success,off); vfile := CREATE_BUFFER("vfile", "CONFIGURE.IN"); rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile)); match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang); @@ -186,10 +199,10 @@ $DECK $ EOD $endif $ -$ write sys$output "Generated `bfd.h' from `bfd-in2.h'." $! $! create bfdver.h $! +$ write sys$output "Generate `bfdver.h' from 'version.h' and `configure.in'." $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input - []version.h /output=[]bfdver.h $DECK @@ -197,6 +210,7 @@ $DECK ! Copy file, changing lines with macros (@@) ! ! + set (success,off); vfile := CREATE_BUFFER("vfile", "configure.in"); rang := CREATE_RANGE(BEGINNING_OF(vfile), END_OF(vfile)); match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, rang); @@ -241,11 +255,11 @@ $DECK WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file")); QUIT $ EOD -$ write sys$output "Generated `bfdver.h' from 'version.h' and `configure.in'." $! $! $! create targmatch.h $! +$ write sys$output "Generate `targmatch.h'" $ open/write tfile []targmatch.h $ write tfile "{ """ + target + "-*-*vms*""" + "," $ write tfile "#if defined (SELECT_VECS)" @@ -255,11 +269,11 @@ $ write tfile "UNSUPPORTED_TARGET" $ write tfile "#endif" $ write tfile "}," $ close tfile -$ write sys$output "Generated `targmatch.h'" $! $! $! create config.h $! +$ write sys$output "Generate `config.h'" $ create []config.h /* config.h-vms. Generated by hand by Klaus Kämpf, kkaempf@didymus.rmi.de. */ /* config.in. Generated automatically from configure.in by autoheader. */ @@ -304,5 +318,90 @@ $ create []config.h /* Disable NLS */ #undef ENABLE_NLS $! -$ write sys$output "Generated `config.h'" +$ write sys$output "Copy sysdep.h" +$ copy [.hosts]alphavms.h sysdep.h +$ +$ write sys$output "Generate build.com" +$! +$ if ARCH.eqs."alpha" +$ then +$ create build.com +$DECK +$ DEFS="""SELECT_VECS=&vms_alpha_vec"","+- + """SELECT_ARCHITECTURES=&bfd_alpha_arch""" +$ FILES="cpu-alpha,vms,vms-hdr,vms-gsd,vms-tir,vms-misc," +$EOD +$ endif +$ if ARCH.eqs."ia64" +$ then +$ create build.com +$DECK +$ DEFS="""SELECT_VECS=&bfd_elf64_ia64_vms_vec"","+- + """SELECT_ARCHITECTURES=&bfd_ia64_arch""" +$ FILES="cpu-ia64,elf64-ia64,elf-strtab,corefile,stabs,merge,elf-eh-frame,"+- + "elflink,elf-attrs,dwarf1,elf64," +$EOD +$ create substxx.tpu +$DECK + set (success,off); + file := CREATE_BUFFER("file", GET_INFO(COMMAND_LINE, "file_name")); + found_range := CREATE_RANGE(BEGINNING_OF(file), BEGINNING_OF(file)); + LOOP + rang := CREATE_RANGE (END_OF(found_range),END_OF(file)); + match_pos := SEARCH_QUIETLY('NN', FORWARD, EXACT, rang); + EXITIF match_pos = 0; + POSITION(BEGINNING_OF(match_pos)); + ERASE(match_pos); + COPY_TEXT('64'); + ENDLOOP; + WRITE_FILE(file, GET_INFO(COMMAND_LINE, "output_file")); + QUIT +$ EOD +$ write sys$output "Generate elf64-ia64.c from elfxx-ia64.c" +$ edit/tpu/nojournal/nosection/nodisplay/command=substxx.tpu - + []elfXX-ia64.c /output=[]elf64-ia64.c +$ write sys$output "Generate elf64-target.h from elfxx-target.h" +$ edit/tpu/nojournal/nosection/nodisplay/command=substxx.tpu - + []elfXX-target.h /output=[]elf64-target.h +$ del substxx.tpu;* +$ endif +$ append sys$input build.com +$DECK +$ DEFS=DEFS + ",""unlink=remove"",""DEBUGDIR=""""GNU$DEBUGDIR:""""""" +$ OPT="/noopt/debug" +$ CFLAGS="/name=(as_is,shortened)" + - + "/include=([],""../"",""../include"")" + - + "/define=(" + DEFS + ")" + OPT +$ FILES=FILES + "archive,archive64,archures,bfd,bfdio,binary,cache,coffgen,"+- + "compress,corefile,dwarf2,elf,format,hash,ihex,init,libbfd,linker,"+- + "opncls,reloc,section,simple,srec,stab-syms,syms,targets,tekhex,verilog" +$ write sys$output "CFLAGS=",CFLAGS +$ cflags_libbfd="/warning=(disable=missingreturn)" +$ cflags_nil="" +$ NUM = 0 +$ OBJS="" +$ LOOP: +$ F = F$ELEMENT(NUM,",",FILES) +$ IF F.EQS."," THEN GOTO END +$ eflags_name="cflags_''f'" +$ name_len=f$length(eflags_name) +$ dash_pos=f$locate("-",eflags_name) +$ if dash_pos.ne.name_len +$ then +$ eflags_name['dash_pos,1]:="_" +$ dash_pos=f$locate("-",eflags_name) +$ if dash_pos.ne.name_len then eflags_name['dash_pos,1]:="_" +$ endif +$ if f$type('eflags_name).eqs."" then eflags_name="cflags_nil" +$ eflags='eflags_name +$ write sys$output "Compiling ", F, ".c", eflags +$ cc 'CFLAGS 'eflags 'F.c +$ IF OBJS.NES."" THEN OBJS=OBJS + "," +$ OBJS=OBJS + F + ".obj" +$ NUM = NUM + 1 +$ GOTO LOOP +$ END: +$ purge +$ lib/create libbfd 'OBJS +$EOD diff --git a/cegcc/src/binutils/bfd/configure.in b/cegcc/src/binutils/bfd/configure.in index a4444185f..7ca59b028 100644 --- a/cegcc/src/binutils/bfd/configure.in +++ b/cegcc/src/binutils/bfd/configure.in @@ -8,7 +8,7 @@ AC_CONFIG_SRCDIR([libbfd.c]) AC_CANONICAL_TARGET AC_ISC_POSIX -AM_INIT_AUTOMAKE(bfd, 2.19.51) +AM_INIT_AUTOMAKE(bfd, 2.20.51) dnl These must be called before LT_INIT, because it may want dnl to call AC_CHECK_PROG. @@ -23,6 +23,20 @@ AC_PROG_CC AC_GNU_SOURCE AC_USE_SYSTEM_EXTENSIONS +LT_INIT([dlopen]) + +AC_PLUGINS + +AM_CONDITIONAL(PLUGINS, test "$plugins" = "yes") + +if test "$plugins" = "yes"; then + if test "$enable_dlopen" != "yes" ; then + AC_MSG_ERROR([ + Building BFD with plugin support requires a host that supports -ldl.]) + fi + enable_targets="$enable_targets plugin" +fi + case "${target}" in changequote(,)dnl sparc-*-solaris*|i[3-7]86-*-solaris*) @@ -34,15 +48,15 @@ changequote([,])dnl # large-file support through the --enable-largefile switch, disable # large-file support in favor of procfs support. if test "${target}" = "${host}" -a "$enable_largefile" != 'yes'; then - enable_largefile="no" + if test "$plugins" = "no"; then + enable_largefile="no" + fi fi ;; esac AC_SYS_LARGEFILE -LT_INIT - AC_ARG_ENABLE(64-bit-bfd, [ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)], [case "${enableval}" in @@ -129,7 +143,7 @@ bfd_default_target_size=32 # host stuff: -ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id" +ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi fi id ru" ZW_GNU_GETTEXT_SISTER_DIR AM_PO_SUBDIRS @@ -183,7 +197,7 @@ AC_SUBST(BFD_HOSTPTR_T) BFD_CC_FOR_BUILD AC_CHECK_HEADERS(alloca.h stddef.h string.h strings.h stdlib.h time.h unistd.h) -AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h) +AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h sys/stat.h) GCC_HEADER_STDINT(bfd_stdint.h) AC_HEADER_TIME AC_HEADER_DIRENT @@ -391,7 +405,9 @@ changequote([,])dnl rs6000-*-lynx*) COREFILE=lynx-core.lo ;; - rs6000-*-aix5.* | powerpc-*-aix5.*) +changequote(,)dnl + rs6000-*-aix[5-9].* | powerpc-*-aix[5-9].*) +changequote([,])dnl COREFILE=rs6000-core.lo COREFLAG="$COREFLAG -DAIX_5_CORE -DAIX_CORE_DUMPX_CORE" ;; @@ -494,6 +510,16 @@ if test -n "$TRAD_HEADER"; then [Name of host specific header file to include in trad-core.c.]) fi +# Check if linker supports --as-needed and --no-as-needed options +AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, + [bfd_cv_ld_as_needed=no + if $LD --help 2>/dev/null | grep as-needed > /dev/null; then + bfd_cv_ld_as_needed=yes + fi + ]) + +LT_LIB_M + # When building a shared libbfd, link against the pic version of libiberty # so that apps that use libbfd won't need libiberty just to satisfy any # libbfd references. @@ -516,6 +542,18 @@ changequote([,])dnl SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" ;; esac + + if test -n "$SHARED_LIBADD"; then + if test -n "$LIBM"; then + if test x"$bfd_cv_ld_as_needed" = xyes; then + # Link against libm only when needed. Put -lc, -lm inside -Wl + # to stop libtool reordering these options. + SHARED_LIBADD="$SHARED_LIBADD -Wl,-lc,--as-needed,`echo $LIBM | sed 's/ /,/g'`,--no-as-needed" + else + SHARED_LIBADD="$SHARED_LIBADD $LIBM" + fi + fi + fi fi AC_SUBST(SHARED_LDFLAGS) AC_SUBST(SHARED_LIBADD) @@ -601,7 +639,8 @@ selarchs="$f" # Target backend .o files. tb= -elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo" +elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo + elf-eh-frame.lo dwarf1.lo" for vec in $selvecs do @@ -633,15 +672,7 @@ do armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;; b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;; b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; - bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;; - bfd_efi_bsdrv_ia32_vec) tb="$tb efi-bsdrv-ia32.lo peigen.lo cofflink.lo" ;; - bfd_efi_rtdrv_ia32_vec) tb="$tb efi-rtdrv-ia32.lo peigen.lo cofflink.lo" ;; - bfd_efi_app_x86_64_vec) tb="$tb efi-app-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;; - bfd_efi_bsdrv_x86_64_vec) tb="$tb efi-bsdrv-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;; - bfd_efi_rtdrv_x86_64_vec) tb="$tb efi-rtdrv-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;; - bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; - bfd_efi_bsdrv_ia64_vec) tb="$tb efi-bsdrv-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; - bfd_efi_rtdrv_ia64_vec) tb="$tb efi-rtdrv-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; + bfd_pei_ia64_vec) tb="$tb pei-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;; bfd_elf32_am33lin_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;; bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; bfd_elf32_bfin_vec) tb="$tb elf32-bfin.lo elf32.lo $elf" ;; @@ -666,16 +697,17 @@ do bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; + bfd_elf32_moxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;; bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_dragonfly_vec) - tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; - bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-vxworks.lo elf32.lo $elf" ;; + tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; @@ -708,6 +740,7 @@ do bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; bfd_elf32_mep_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;; bfd_elf32_mep_little_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;; + bfd_elf32_microblaze_vec) tb="$tb elf32-microblaze.lo elf32.lo $elf" ;; bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;; bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;; @@ -723,9 +756,11 @@ do bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_rx_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; + bfd_elf32_rx_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; - bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;; - bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;; + bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;; + bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64;; # FIXME: We include cofflink.lo not because it's needed for # bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec # which needs it but does not list it. Should be fixed in right place. @@ -765,7 +800,7 @@ do bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_ia64_vms_vec) tb="$tb elf64-ia64.lo elf64.lo $elf vmsutil.lo"; target_size=64 ;; + bfd_elf64_ia64_vms_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; @@ -782,8 +817,10 @@ do bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;; - bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; - bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_l1om_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;; bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;; bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;; bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;; @@ -837,6 +874,7 @@ do mach_o_be_vec) tb="$tb mach-o.lo" ;; mach_o_le_vec) tb="$tb mach-o.lo" ;; mach_o_fat_vec) tb="$tb mach-o.lo" ;; + mach_o_i386_vec) tb="$tb mach-o-i386.lo" ;; mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; @@ -854,6 +892,7 @@ do pef_vec) tb="$tb pef.lo" ;; pef_xlib_vec) tb="$tb pef.lo" ;; pdp11_aout_vec) tb="$tb pdp11.lo" ;; + plugin_vec) tb="$tb plugin.lo" ;; pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;; ppcboot_vec) tb="$tb ppcboot.lo" ;; riscix_vec) tb="$tb aout32.lo riscix.lo" ;; @@ -1001,6 +1040,13 @@ AC_SUBST(bfd_backends) AC_SUBST(bfd_machines) AC_SUBST(bfd_default_target_size) +if test "$plugins" = "yes"; then + supports_plugins=1 +else + supports_plugins=0 +fi +AC_SUBST(supports_plugins) + # Determine the host dependant file_ptr a.k.a. off_t type. In order # prefer: off64_t - if ftello64 and fseeko64, off_t - if ftello and # fseeko, long. This assumes that sizeof off_t is .ge. sizeof long. diff --git a/cegcc/src/binutils/bfd/cpu-alpha.c b/cegcc/src/binutils/bfd/cpu-alpha.c index 7eaeb33a5..9456b6578 100644 --- a/cegcc/src/binutils/bfd/cpu-alpha.c +++ b/cegcc/src/binutils/bfd/cpu-alpha.c @@ -1,5 +1,5 @@ /* BFD support for the Alpha architecture. - Copyright 1992, 1993, 1998, 2000, 2002, 2003, 2007 + Copyright 1992, 1993, 1998, 2000, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-arc.c b/cegcc/src/binutils/bfd/cpu-arc.c index ca419980e..820c94891 100644 --- a/cegcc/src/binutils/bfd/cpu-arc.c +++ b/cegcc/src/binutils/bfd/cpu-arc.c @@ -1,5 +1,5 @@ /* BFD support for the ARC processor - Copyright 1994, 1995, 1997, 2001, 2002, 2007 + Copyright 1994, 1995, 1997, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. Contributed by Doug Evans (dje@cygnus.com). diff --git a/cegcc/src/binutils/bfd/cpu-arm.c b/cegcc/src/binutils/bfd/cpu-arm.c index ceb911112..61d4bbdb3 100644 --- a/cegcc/src/binutils/bfd/cpu-arm.c +++ b/cegcc/src/binutils/bfd/cpu-arm.c @@ -1,5 +1,5 @@ /* BFD support for the ARM processor - Copyright 1994, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2007 + Copyright 1994, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) @@ -187,7 +187,7 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd) || out == bfd_mach_arm_iWMMXt2)) { _bfd_error_handler (_("\ -ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"), +error: %B is compiled for the EP9312, whereas %B is compiled for XScale"), ibfd, obfd); bfd_set_error (bfd_error_wrong_format); return FALSE; @@ -198,7 +198,7 @@ ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"), || in == bfd_mach_arm_iWMMXt2)) { _bfd_error_handler (_("\ -ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"), +error: %B is compiled for the EP9312, whereas %B is compiled for XScale"), obfd, ibfd); bfd_set_error (bfd_error_wrong_format); return FALSE; diff --git a/cegcc/src/binutils/bfd/cpu-avr.c b/cegcc/src/binutils/bfd/cpu-avr.c index ddc410bee..9e62ab41f 100644 --- a/cegcc/src/binutils/bfd/cpu-avr.c +++ b/cegcc/src/binutils/bfd/cpu-avr.c @@ -1,5 +1,6 @@ /* BFD library support routines for the AVR architecture. - Copyright 1999, 2000, 2002, 2006, 2007 Free Software Foundation, Inc. + Copyright 1999, 2000, 2002, 2005, 2006, 2007, 2008 + Free Software Foundation, Inc. Contributed by Denis Chertykov This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-cr16c.c b/cegcc/src/binutils/bfd/cpu-cr16c.c index d6162f42d..e8ee1db1d 100644 --- a/cegcc/src/binutils/bfd/cpu-cr16c.c +++ b/cegcc/src/binutils/bfd/cpu-cr16c.c @@ -1,5 +1,5 @@ /* BFD support for the CR16C processor. - Copyright 2004, 2007 Free Software Foundation, Inc. + Copyright 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-crx.c b/cegcc/src/binutils/bfd/cpu-crx.c index 49b1cb290..3201c3cac 100644 --- a/cegcc/src/binutils/bfd/cpu-crx.c +++ b/cegcc/src/binutils/bfd/cpu-crx.c @@ -1,5 +1,5 @@ /* BFD support for the CRX processor. - Copyright 2004, 2007 Free Software Foundation, Inc. + Copyright 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-dlx.c b/cegcc/src/binutils/bfd/cpu-dlx.c index 8d6eee12e..fda48dccf 100644 --- a/cegcc/src/binutils/bfd/cpu-dlx.c +++ b/cegcc/src/binutils/bfd/cpu-dlx.c @@ -1,5 +1,5 @@ /* BFD support for the DLX Microprocessor architecture. - Copyright 2002, 2007 Free Software Foundation, Inc. + Copyright 2002, 2005, 2007 Free Software Foundation, Inc. Hacked by Kuang Hwa Lin This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-fr30.c b/cegcc/src/binutils/bfd/cpu-fr30.c index da3f97d96..b60e43e65 100644 --- a/cegcc/src/binutils/bfd/cpu-fr30.c +++ b/cegcc/src/binutils/bfd/cpu-fr30.c @@ -1,5 +1,5 @@ /* BFD support for the FR30 processor. - Copyright 1998, 2002, 2007 Free Software Foundation, Inc. + Copyright 1998, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-frv.c b/cegcc/src/binutils/bfd/cpu-frv.c index 41e70140f..fd2aedb82 100644 --- a/cegcc/src/binutils/bfd/cpu-frv.c +++ b/cegcc/src/binutils/bfd/cpu-frv.c @@ -1,5 +1,5 @@ /* BFD support for the FRV processor. - Copyright 2002, 2003, 2004, 2007 Free Software Foundation, Inc. + Copyright 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-h8300.c b/cegcc/src/binutils/bfd/cpu-h8300.c index 6b581a4f9..0fd77d64e 100644 --- a/cegcc/src/binutils/bfd/cpu-h8300.c +++ b/cegcc/src/binutils/bfd/cpu-h8300.c @@ -1,6 +1,6 @@ /* BFD library support routines for the Renesas H8/300 architecture. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002, - 2003, 2004, 2007 Free Software Foundation, Inc. + 2003, 2004, 2005, 2007 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-hppa.c b/cegcc/src/binutils/bfd/cpu-hppa.c index 3440310f1..034e32143 100644 --- a/cegcc/src/binutils/bfd/cpu-hppa.c +++ b/cegcc/src/binutils/bfd/cpu-hppa.c @@ -1,5 +1,5 @@ /* BFD support for the HP Precision Architecture architecture. - Copyright 1992, 1995, 1998, 1999, 2000, 2002, 2003, 2007 + Copyright 1992, 1995, 1998, 1999, 2000, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-i386.c b/cegcc/src/binutils/bfd/cpu-i386.c index 4001a05a4..44cca9da8 100644 --- a/cegcc/src/binutils/bfd/cpu-i386.c +++ b/cegcc/src/binutils/bfd/cpu-i386.c @@ -1,5 +1,6 @@ /* BFD support for the Intel 386 architecture. - Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2004, 2007 + Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2004, 2005, + 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -23,7 +24,7 @@ #include "bfd.h" #include "libbfd.h" -const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = +static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = { 64, /* 64 bits in a word */ 64, /* 64 bits in an address */ @@ -39,7 +40,7 @@ const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = 0 }; -const bfd_arch_info_type bfd_i386_arch_intel_syntax = +static const bfd_arch_info_type bfd_i386_arch_intel_syntax = { 32, /* 32 bits in a word */ 32, /* 32 bits in an address */ @@ -55,7 +56,7 @@ const bfd_arch_info_type bfd_i386_arch_intel_syntax = &bfd_x86_64_arch_intel_syntax }; -const bfd_arch_info_type i8086_arch = +static const bfd_arch_info_type i8086_arch = { 32, /* 32 bits in a word */ 32, /* 32 bits in an address (well, not really) */ @@ -71,10 +72,10 @@ const bfd_arch_info_type i8086_arch = &bfd_i386_arch_intel_syntax }; -const bfd_arch_info_type bfd_x86_64_arch = +static const bfd_arch_info_type bfd_x86_64_arch = { - 64, /* 32 bits in a word */ - 64, /* 32 bits in an address */ + 64, /* 64 bits in a word */ + 64, /* 64 bits in an address */ 8, /* 8 bits in a byte */ bfd_arch_i386, bfd_mach_x86_64, diff --git a/cegcc/src/binutils/bfd/cpu-i860.c b/cegcc/src/binutils/bfd/cpu-i860.c index 33258cf64..ae9ebcdb9 100644 --- a/cegcc/src/binutils/bfd/cpu-i860.c +++ b/cegcc/src/binutils/bfd/cpu-i860.c @@ -1,5 +1,5 @@ /* BFD support for the Intel 860 architecture. - Copyright 1992, 1995, 2000, 2002, 2007 + Copyright 1992, 1995, 2000, 2002, 2005, 2007 Free Software Foundation, Inc. Created mostly by substituting "860" for "386" in cpu-i386.c Harry Dolan , October 1995 diff --git a/cegcc/src/binutils/bfd/cpu-i960.c b/cegcc/src/binutils/bfd/cpu-i960.c index a6c8eb256..c7d9231b6 100644 --- a/cegcc/src/binutils/bfd/cpu-i960.c +++ b/cegcc/src/binutils/bfd/cpu-i960.c @@ -1,5 +1,5 @@ /* BFD library support routines for the i960 architecture. - Copyright 1990, 1991, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2006, + Copyright 1990, 1991, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2005, 2006, 2007 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. diff --git a/cegcc/src/binutils/bfd/cpu-ia64-opc.c b/cegcc/src/binutils/bfd/cpu-ia64-opc.c index 10dc2aaee..b797e4413 100644 --- a/cegcc/src/binutils/bfd/cpu-ia64-opc.c +++ b/cegcc/src/binutils/bfd/cpu-ia64-opc.c @@ -1,4 +1,4 @@ -/* Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 +/* Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Contributed by David Mosberger-Tang @@ -81,19 +81,19 @@ ext_reg (const struct ia64_operand *self, ia64_insn code, ia64_insn *valuep) static const char* ins_immu (const struct ia64_operand *self, ia64_insn value, ia64_insn *code) { - ia64_insn new = 0; + ia64_insn new_insn = 0; int i; for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i) { - new |= ((value & ((((ia64_insn) 1) << self->field[i].bits) - 1)) - << self->field[i].shift); + new_insn |= ((value & ((((ia64_insn) 1) << self->field[i].bits) - 1)) + << self->field[i].shift); value >>= self->field[i].bits; } if (value) return "integer operand out of range"; - *code |= new; + *code |= new_insn; return 0; } @@ -163,22 +163,22 @@ ins_imms_scaled (const struct ia64_operand *self, ia64_insn value, ia64_insn *code, int scale) { BFD_HOST_64_BIT svalue = value, sign_bit = 0; - ia64_insn new = 0; + ia64_insn new_insn = 0; int i; svalue >>= scale; for (i = 0; i < NELEMS (self->field) && self->field[i].bits; ++i) { - new |= ((svalue & ((((ia64_insn) 1) << self->field[i].bits) - 1)) - << self->field[i].shift); + new_insn |= ((svalue & ((((ia64_insn) 1) << self->field[i].bits) - 1)) + << self->field[i].shift); sign_bit = (svalue >> (self->field[i].bits - 1)) & 1; svalue >>= self->field[i].bits; } if ((!sign_bit && svalue != 0) || (sign_bit && svalue != -1)) return "integer operand out of range"; - *code |= new; + *code |= new_insn; return 0; } diff --git a/cegcc/src/binutils/bfd/cpu-ia64.c b/cegcc/src/binutils/bfd/cpu-ia64.c index c4793c911..c97de1a09 100644 --- a/cegcc/src/binutils/bfd/cpu-ia64.c +++ b/cegcc/src/binutils/bfd/cpu-ia64.c @@ -1,5 +1,5 @@ /* BFD support for the ia64 architecture. - Copyright 1998, 1999, 2000, 2002, 2007 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2002, 2005, 2007 Free Software Foundation, Inc. Contributed by David Mosberger-Tang This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-ip2k.c b/cegcc/src/binutils/bfd/cpu-ip2k.c index 266d53279..0b959bd8d 100644 --- a/cegcc/src/binutils/bfd/cpu-ip2k.c +++ b/cegcc/src/binutils/bfd/cpu-ip2k.c @@ -1,5 +1,5 @@ /* BFD support for the Scenix IP2xxx processor. - Copyright 2000, 2002, 2007 Free Software Foundation, Inc. + Copyright 2000, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-iq2000.c b/cegcc/src/binutils/bfd/cpu-iq2000.c index 837ffadcd..72d83639c 100644 --- a/cegcc/src/binutils/bfd/cpu-iq2000.c +++ b/cegcc/src/binutils/bfd/cpu-iq2000.c @@ -1,5 +1,5 @@ /* BFD support for the Vitesse IQ2000 processor. - Copyright (C) 2003, 2007 Free Software Foundation, Inc. + Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-m10200.c b/cegcc/src/binutils/bfd/cpu-m10200.c index 1f17b2342..218891df6 100644 --- a/cegcc/src/binutils/bfd/cpu-m10200.c +++ b/cegcc/src/binutils/bfd/cpu-m10200.c @@ -1,5 +1,5 @@ /* BFD support for the Matsushita 10200 processor - Copyright 1996, 1997, 2002, 2007 Free Software Foundation, Inc. + Copyright 1996, 1997, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-m10300.c b/cegcc/src/binutils/bfd/cpu-m10300.c index aee42b6cf..7f89665b0 100644 --- a/cegcc/src/binutils/bfd/cpu-m10300.c +++ b/cegcc/src/binutils/bfd/cpu-m10300.c @@ -1,5 +1,5 @@ /* BFD support for the Matsushita 10300 processor - Copyright 1996, 1997, 1999, 2000, 2002, 2003, 2007 + Copyright 1996, 1997, 1999, 2000, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-m32c.c b/cegcc/src/binutils/bfd/cpu-m32c.c index 729c32d7f..aa2e28d93 100644 --- a/cegcc/src/binutils/bfd/cpu-m32c.c +++ b/cegcc/src/binutils/bfd/cpu-m32c.c @@ -1,5 +1,5 @@ /* BFD support for the M16C/M32C processors. - Copyright (C) 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-m32r.c b/cegcc/src/binutils/bfd/cpu-m32r.c index e1409cd56..8180d6c0d 100644 --- a/cegcc/src/binutils/bfd/cpu-m32r.c +++ b/cegcc/src/binutils/bfd/cpu-m32r.c @@ -1,5 +1,5 @@ /* BFD support for the M32R processor. - Copyright 1996, 1999, 2000, 2002, 2003, 2007 + Copyright 1996, 1999, 2000, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-m68hc11.c b/cegcc/src/binutils/bfd/cpu-m68hc11.c index 3c283cf55..313d820cb 100644 --- a/cegcc/src/binutils/bfd/cpu-m68hc11.c +++ b/cegcc/src/binutils/bfd/cpu-m68hc11.c @@ -1,5 +1,5 @@ /* BFD support for the Motorola 68HC11 processor - Copyright 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-m68hc12.c b/cegcc/src/binutils/bfd/cpu-m68hc12.c index d40f6beb6..2a115b991 100644 --- a/cegcc/src/binutils/bfd/cpu-m68hc12.c +++ b/cegcc/src/binutils/bfd/cpu-m68hc12.c @@ -1,5 +1,5 @@ /* BFD support for the Motorola 68HC12 processor - Copyright 1999, 2000, 2002, 2003, 2007 Free Software Foundation, Inc. + Copyright 1999, 2000, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-m68k.c b/cegcc/src/binutils/bfd/cpu-m68k.c index a82c4ee4a..ec9bccd07 100644 --- a/cegcc/src/binutils/bfd/cpu-m68k.c +++ b/cegcc/src/binutils/bfd/cpu-m68k.c @@ -1,6 +1,6 @@ /* BFD library support routines for architectures. Copyright 1990, 1991, 1992, 1993, 1994, 1997, 1998, 2000, 2001, 2002, - 2003, 2004, 2006, 2007 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-m88k.c b/cegcc/src/binutils/bfd/cpu-m88k.c index caefe6ef4..7e7c18d39 100644 --- a/cegcc/src/binutils/bfd/cpu-m88k.c +++ b/cegcc/src/binutils/bfd/cpu-m88k.c @@ -1,5 +1,5 @@ /* bfd back-end for m88k support - Copyright 1990, 1991, 1994, 2000, 2002, 2007 + Copyright 1990, 1991, 1994, 2000, 2002, 2005, 2007 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. diff --git a/cegcc/src/binutils/bfd/cpu-mcore.c b/cegcc/src/binutils/bfd/cpu-mcore.c index fc41259c2..c01dd1020 100644 --- a/cegcc/src/binutils/bfd/cpu-mcore.c +++ b/cegcc/src/binutils/bfd/cpu-mcore.c @@ -1,5 +1,5 @@ /* BFD library support routines for Motorola's MCore architecture - Copyright 1993, 1999, 2000, 2002, 2007 Free Software Foundation, Inc. + Copyright 1993, 1999, 2000, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-mep.c b/cegcc/src/binutils/bfd/cpu-mep.c index a1617644e..7ac871f67 100644 --- a/cegcc/src/binutils/bfd/cpu-mep.c +++ b/cegcc/src/binutils/bfd/cpu-mep.c @@ -1,5 +1,5 @@ /* BFD support for the Toshiba Media Engine Processor. - Copyright (C) 2001, 2002, 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2004, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -24,5 +24,6 @@ #define MA(x, n, def, y) { 32, 32, 8, bfd_arch_mep, x, "mep", n, \ 2, def, bfd_default_compatible, bfd_default_scan, y } -static const bfd_arch_info_type bfd_h1_arch = MA (bfd_mach_mep_h1, "h1", FALSE, NULL); +static const bfd_arch_info_type bfd_c5_arch = MA (bfd_mach_mep_c5, "c5", FALSE, NULL); +static const bfd_arch_info_type bfd_h1_arch = MA (bfd_mach_mep_h1, "h1", FALSE, & bfd_c5_arch); const bfd_arch_info_type bfd_mep_arch = MA (bfd_mach_mep, "mep", TRUE, & bfd_h1_arch); diff --git a/cegcc/src/binutils/bfd/cpu-mips.c b/cegcc/src/binutils/bfd/cpu-mips.c index 4c9882182..c0f532f05 100644 --- a/cegcc/src/binutils/bfd/cpu-mips.c +++ b/cegcc/src/binutils/bfd/cpu-mips.c @@ -1,6 +1,6 @@ /* bfd back-end for mips support Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, - 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-mmix.c b/cegcc/src/binutils/bfd/cpu-mmix.c index 4296f9837..6cf875381 100644 --- a/cegcc/src/binutils/bfd/cpu-mmix.c +++ b/cegcc/src/binutils/bfd/cpu-mmix.c @@ -1,5 +1,5 @@ /* BFD library support routines for MMIX. - Copyright 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 2001, 2002, 2005, 2007 Free Software Foundation, Inc. Contributed by Hans-Peter Nilsson (hp@bitrange.com) This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-msp430.c b/cegcc/src/binutils/bfd/cpu-msp430.c index df83f71e3..63c301a7e 100644 --- a/cegcc/src/binutils/bfd/cpu-msp430.c +++ b/cegcc/src/binutils/bfd/cpu-msp430.c @@ -1,5 +1,5 @@ /* BFD library support routines for the MSP architecture. - Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc. Contributed by Dmitry Diky This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-openrisc.c b/cegcc/src/binutils/bfd/cpu-openrisc.c index fee0a0abe..a43034979 100644 --- a/cegcc/src/binutils/bfd/cpu-openrisc.c +++ b/cegcc/src/binutils/bfd/cpu-openrisc.c @@ -1,5 +1,5 @@ /* BFD support for the OpenRISC architecture. - Copyright 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 2001, 2002, 2005, 2007 Free Software Foundation, Inc. Contributed by Johan Rydberg, jrydberg@opencores.org This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-or32.c b/cegcc/src/binutils/bfd/cpu-or32.c index 33b68ce36..b9803ed31 100644 --- a/cegcc/src/binutils/bfd/cpu-or32.c +++ b/cegcc/src/binutils/bfd/cpu-or32.c @@ -1,5 +1,5 @@ /* BFD support for the OpenRISC 1000 architecture. - Copyright 2002, 2007 Free Software Foundation, Inc. + Copyright 2002, 2005, 2007 Free Software Foundation, Inc. Contributed by Ivan Guzvinec This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-pdp11.c b/cegcc/src/binutils/bfd/cpu-pdp11.c index 5172d17d2..3147f5604 100644 --- a/cegcc/src/binutils/bfd/cpu-pdp11.c +++ b/cegcc/src/binutils/bfd/cpu-pdp11.c @@ -1,5 +1,5 @@ /* BFD back-end for PDP-11 support. - Copyright 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 2001, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-pj.c b/cegcc/src/binutils/bfd/cpu-pj.c index a55367327..bb5c85b85 100644 --- a/cegcc/src/binutils/bfd/cpu-pj.c +++ b/cegcc/src/binutils/bfd/cpu-pj.c @@ -1,5 +1,6 @@ /* BFD library support routines for the Pico Java architecture. - Copyright 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2005, 2007 + Free Software Foundation, Inc. Hacked by Steve Chamberlain of Transmeta. sac@pobox.com This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-powerpc.c b/cegcc/src/binutils/bfd/cpu-powerpc.c index b8437bbc4..0b511f313 100644 --- a/cegcc/src/binutils/bfd/cpu-powerpc.c +++ b/cegcc/src/binutils/bfd/cpu-powerpc.c @@ -1,5 +1,5 @@ /* BFD PowerPC CPU definition - Copyright 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2007, 2008 + Copyright 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc. Contributed by Ian Lance Taylor, Cygnus Support. diff --git a/cegcc/src/binutils/bfd/cpu-rs6000.c b/cegcc/src/binutils/bfd/cpu-rs6000.c index 834f20d28..91d043198 100644 --- a/cegcc/src/binutils/bfd/cpu-rs6000.c +++ b/cegcc/src/binutils/bfd/cpu-rs6000.c @@ -1,5 +1,5 @@ /* BFD back-end for rs6000 support - Copyright 1990, 1991, 1993, 1995, 2000, 2002, 2003, 2007 + Copyright 1990, 1991, 1993, 1995, 2000, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. Written by Mimi Phuong-Thao Vo of IBM and John Gilmore of Cygnus Support. diff --git a/cegcc/src/binutils/bfd/cpu-s390.c b/cegcc/src/binutils/bfd/cpu-s390.c index b7fc669d2..805e82562 100644 --- a/cegcc/src/binutils/bfd/cpu-s390.c +++ b/cegcc/src/binutils/bfd/cpu-s390.c @@ -1,5 +1,5 @@ /* BFD support for the s390 processor. - Copyright 2000, 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. Contributed by Carl B. Pedersen and Martin Schwidefsky. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-score.c b/cegcc/src/binutils/bfd/cpu-score.c index 0ccc371ca..0ed4095c1 100644 --- a/cegcc/src/binutils/bfd/cpu-score.c +++ b/cegcc/src/binutils/bfd/cpu-score.c @@ -1,8 +1,9 @@ /* BFD support for the score processor - Copyright 2006, 2007 Free Software Foundation, Inc. + Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by + Brain.lin (brain.lin@sunplusct.com) Mei Ligang (ligang@sunnorth.com.cn) - Pei-Lin Tsai (pltsai@sunplus.com) + Pei-Lin Tsai (pltsai@sunplus.com) This file is part of BFD, the Binary File Descriptor library. @@ -21,32 +22,47 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "sysdep.h" #include "bfd.h" +#include "sysdep.h" #include "libbfd.h" -const bfd_arch_info_type -bfd_score_arch = +/* This routine is provided two arch_infos and works out which Score + machine which would be compatible with both and returns a pointer + to its info structure. */ + +static const bfd_arch_info_type * +compatible (const bfd_arch_info_type * a, const bfd_arch_info_type * b) { - 32, /* There's 32 bits_per_word. */ - 32, /* There's 32 bits_per_address. */ - 8, /* There's 8 bits_per_byte. */ - bfd_arch_score, /* One of enum bfd_architecture, defined - in archures.c and provided in - generated header files. */ - 0, /* Only 1 machine, but #255 for - historical reasons. */ - "score", /* The arch_name. */ - "score", /* The printable name is the same. */ - 4, /* Section alignment power; each section - is aligned to (only) 2^4 bytes. */ - TRUE, /* This is the default "machine", since - there's only one. */ - bfd_default_compatible, /* A default function for testing - "machine" compatibility of two - bfd_arch_info_type. */ - bfd_default_scan, /* Check if an bfd_arch_info_type is a - match. */ - NULL /* Pointer to next bfd_arch_info_type in - the same family. */ + /* If a & b are for different architectures we can do nothing. */ + if (a->arch != b->arch) + return NULL; + + if (a->mach != b->mach) + return NULL; + + return a; +} + +#define N(addr_bits, machine, print, default, next) \ +{ \ + 32, /* 16 bits in a word. */ \ + 32, /* Bits in an address. */ \ + 8, /* 8 bits in a byte. */ \ + bfd_arch_score, \ + machine, /* Machine number. */ \ + "score", /* Architecture name. */ \ + print, /* Printable name. */ \ + 4, /* Section align power. */ \ + default, /* The default machine. */ \ + compatible, \ + bfd_default_scan, \ + next \ +} + +static const bfd_arch_info_type arch_info_struct[] = +{ + N (16, bfd_mach_score3, "score3", FALSE, NULL), }; + +const bfd_arch_info_type bfd_score_arch = + N (16, bfd_mach_score7, "score7", TRUE, & arch_info_struct[0]); diff --git a/cegcc/src/binutils/bfd/cpu-sparc.c b/cegcc/src/binutils/bfd/cpu-sparc.c index a4144f862..f86ccc54d 100644 --- a/cegcc/src/binutils/bfd/cpu-sparc.c +++ b/cegcc/src/binutils/bfd/cpu-sparc.c @@ -1,5 +1,5 @@ /* BFD support for the SPARC architecture. - Copyright 1992, 1995, 1996, 1998, 2000, 2002, 2007 + Copyright 1992, 1995, 1996, 1998, 2000, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-tic30.c b/cegcc/src/binutils/bfd/cpu-tic30.c index 6587b14ab..e08cf47a7 100644 --- a/cegcc/src/binutils/bfd/cpu-tic30.c +++ b/cegcc/src/binutils/bfd/cpu-tic30.c @@ -1,5 +1,5 @@ /* BFD support for the Texas Instruments TMS320C30 architecture. - Copyright 1998, 2002, 2007 Free Software Foundation, Inc. + Copyright 1998, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-tic4x.c b/cegcc/src/binutils/bfd/cpu-tic4x.c index ecc094f24..bd8b8f407 100644 --- a/cegcc/src/binutils/bfd/cpu-tic4x.c +++ b/cegcc/src/binutils/bfd/cpu-tic4x.c @@ -1,5 +1,5 @@ /* bfd back-end for TMS320C[34]x support - Copyright 1996, 1997, 2002, 2003, 2007 Free Software Foundation, Inc. + Copyright 1996, 1997, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz) diff --git a/cegcc/src/binutils/bfd/cpu-tic54x.c b/cegcc/src/binutils/bfd/cpu-tic54x.c index 03192d24f..b7e316cac 100644 --- a/cegcc/src/binutils/bfd/cpu-tic54x.c +++ b/cegcc/src/binutils/bfd/cpu-tic54x.c @@ -1,5 +1,5 @@ /* BFD support for the Texas Instruments TMS320C54X architecture. - Copyright 1999, 2000, 2002, 2007 Free Software Foundation, Inc. + Copyright 1999, 2000, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-tic80.c b/cegcc/src/binutils/bfd/cpu-tic80.c index fdb5d7eb6..f030ce1b7 100644 --- a/cegcc/src/binutils/bfd/cpu-tic80.c +++ b/cegcc/src/binutils/bfd/cpu-tic80.c @@ -1,5 +1,5 @@ /* bfd back-end for TI TMS320C80 (MVP) support - Copyright 1996, 2002, 2007 Free Software Foundation, Inc. + Copyright 1996, 2002, 2005, 2007 Free Software Foundation, Inc. Written by Fred Fish at Cygnus support (fnf@cygnus.com) This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-v850.c b/cegcc/src/binutils/bfd/cpu-v850.c index 319cb0464..77ca519cc 100644 --- a/cegcc/src/binutils/bfd/cpu-v850.c +++ b/cegcc/src/binutils/bfd/cpu-v850.c @@ -1,5 +1,5 @@ /* BFD support for the NEC V850 processor - Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2007 + Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-vax.c b/cegcc/src/binutils/bfd/cpu-vax.c index 92449ea18..c9d9c8d7b 100644 --- a/cegcc/src/binutils/bfd/cpu-vax.c +++ b/cegcc/src/binutils/bfd/cpu-vax.c @@ -1,5 +1,5 @@ /* bfd back-end for vax support - Copyright 1990, 1991, 1994, 2000, 2002, 2007 + Copyright 1990, 1991, 1994, 2000, 2002, 2005, 2007 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. diff --git a/cegcc/src/binutils/bfd/cpu-w65.c b/cegcc/src/binutils/bfd/cpu-w65.c index b2cf9dcae..e5e78d9e9 100644 --- a/cegcc/src/binutils/bfd/cpu-w65.c +++ b/cegcc/src/binutils/bfd/cpu-w65.c @@ -1,5 +1,5 @@ /* BFD library support routines for the WDC 65816 architecture. - Copyright 1995, 1999, 2000, 2001, 2002, 2007 + Copyright 1995, 1999, 2000, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. diff --git a/cegcc/src/binutils/bfd/cpu-we32k.c b/cegcc/src/binutils/bfd/cpu-we32k.c index f2ceb2a29..d93d76a81 100644 --- a/cegcc/src/binutils/bfd/cpu-we32k.c +++ b/cegcc/src/binutils/bfd/cpu-we32k.c @@ -1,5 +1,5 @@ /* bfd back-end for we32k support - Copyright 1992, 2000, 2002, 2007 Free Software Foundation, Inc. + Copyright 1992, 2000, 2002, 2005, 2007 Free Software Foundation, Inc. Contributed by Brendan Kehoe (brendan@cs.widener.edu). This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-xstormy16.c b/cegcc/src/binutils/bfd/cpu-xstormy16.c index 78f185813..d1c7e5684 100644 --- a/cegcc/src/binutils/bfd/cpu-xstormy16.c +++ b/cegcc/src/binutils/bfd/cpu-xstormy16.c @@ -1,5 +1,5 @@ /* BFD support for the XSTORMY16 processor. - Copyright 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 2001, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-xtensa.c b/cegcc/src/binutils/bfd/cpu-xtensa.c index d639d8380..ee3767a89 100644 --- a/cegcc/src/binutils/bfd/cpu-xtensa.c +++ b/cegcc/src/binutils/bfd/cpu-xtensa.c @@ -1,5 +1,5 @@ /* BFD support for the Xtensa processor. - Copyright 2003, 2007 Free Software Foundation, Inc. + Copyright 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/cpu-z8k.c b/cegcc/src/binutils/bfd/cpu-z8k.c index 4d2cb399b..6e910e9af 100644 --- a/cegcc/src/binutils/bfd/cpu-z8k.c +++ b/cegcc/src/binutils/bfd/cpu-z8k.c @@ -1,5 +1,5 @@ /* BFD library support routines for the Z800n architecture. - Copyright 1992, 1993, 1994, 2000, 2001, 2002, 2003, 2007 + Copyright 1992, 1993, 1994, 2000, 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support. diff --git a/cegcc/src/binutils/bfd/demo64.c b/cegcc/src/binutils/bfd/demo64.c index a9fba1f01..36f44a63d 100644 --- a/cegcc/src/binutils/bfd/demo64.c +++ b/cegcc/src/binutils/bfd/demo64.c @@ -1,5 +1,5 @@ /* BFD backend for demonstration 64-bit a.out binaries. - Copyright 1990, 1991, 1992, 1993, 1994, 2001, 2007 + Copyright 1990, 1991, 1992, 1993, 1994, 2001, 2005, 2007 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/cegcc/src/binutils/bfd/dep-in.sed b/cegcc/src/binutils/bfd/dep-in.sed index 2732d6b42..2e0a4fb59 100644 --- a/cegcc/src/binutils/bfd/dep-in.sed +++ b/cegcc/src/binutils/bfd/dep-in.sed @@ -3,7 +3,6 @@ s/\\\n */ /g t loop -s!\.o:!.lo:! s! \./! !g s! @BFD_H@!!g s!@SRCDIR@/../include!$(INCDIR)!g @@ -11,7 +10,7 @@ s!@TOPDIR@/include!$(INCDIR)!g s!@SRCDIR@/../opcodes!$(srcdir)/../opcodes!g s!@TOPDIR@/opcodes!$(srcdir)/../opcodes!g s!@SRCDIR@/!!g -s! hosts/[^ ]*\.h! !g +s! hosts/[^ ]*\.h!!g s! sysdep.h!!g s! \.\./bfd/sysdep.h!!g s! libbfd.h!!g @@ -21,12 +20,9 @@ s! \$(INCDIR)/ansidecl\.h!!g s! \$(INCDIR)/symcat\.h!!g s! \.\./intl/libintl\.h!!g -s/\\\n */ /g - s/ *$// s/ */ /g -s/ *:/:/g -/:$/d - -s/\(.\{50\}[^ ]*\) /\1 \\\ - /g +s/^ */A/ +s/ / \\\ +B/g +$s/$/ \\/ diff --git a/cegcc/src/binutils/bfd/doc/CVS/Entries b/cegcc/src/binutils/bfd/doc/CVS/Entries dissimilarity index 99% index 4af48dc6e..0ddea57ef 100644 --- a/cegcc/src/binutils/bfd/doc/CVS/Entries +++ b/cegcc/src/binutils/bfd/doc/CVS/Entries @@ -1,14 +1,14 @@ -/ChangeLog/1.82/Wed Feb 4 22:28:33 2009// -/ChangeLog-9103/1.1/Fri Feb 8 14:22:56 2008// -/Makefile.am/1.26/Wed Feb 4 22:28:33 2009// -/Makefile.in/1.94/Wed Feb 4 22:28:33 2009// -/bfd.texinfo/1.16/Wed Feb 4 22:28:33 2009// -/bfdint.texi/1.21/Fri Feb 8 14:22:56 2008// -/bfdsumm.texi/1.2/Fri Feb 8 14:22:56 2008// -/chew.c/1.21/Fri Feb 8 14:22:56 2008// -/doc.str/1.1.1.1/Fri Feb 8 14:22:56 2008// -/fdl.texi/1.4/Wed Feb 4 22:28:33 2009// -/header.sed/1.2/Fri Feb 8 14:22:56 2008// -/makefile.vms/1.1.1.1/Fri Feb 8 14:22:56 2008// -/proto.str/1.2/Fri Feb 8 14:22:56 2008// -D +/ChangeLog/1.89/Fri Oct 16 21:49:23 2009// +/ChangeLog-9103/1.1/Fri Oct 16 21:38:22 2009// +/Makefile.am/1.28/Fri Oct 16 21:49:23 2009// +/Makefile.in/1.101/Fri Oct 16 21:49:23 2009// +/bfd.texinfo/1.17/Fri Oct 16 21:49:23 2009// +/bfdint.texi/1.22/Fri Oct 16 21:49:23 2009// +/bfdsumm.texi/1.2/Fri Oct 16 21:38:22 2009// +/chew.c/1.24/Fri Oct 16 21:49:23 2009// +/doc.str/1.1.1.1/Fri Oct 16 21:38:22 2009// +/fdl.texi/1.4/Fri Oct 16 21:38:22 2009// +/header.sed/1.2/Fri Oct 16 21:38:22 2009// +/makefile.vms/1.1.1.1/Fri Oct 16 21:38:22 2009// +/proto.str/1.2/Fri Oct 16 21:38:22 2009// +D diff --git a/cegcc/src/binutils/bfd/doc/ChangeLog b/cegcc/src/binutils/bfd/doc/ChangeLog index 8202a756c..b85e3a1a2 100644 --- a/cegcc/src/binutils/bfd/doc/ChangeLog +++ b/cegcc/src/binutils/bfd/doc/ChangeLog @@ -1,3 +1,35 @@ +2009-09-25 Martin Thuresson + + Update soruces to make alpha targets compile cleanly with + -Wc++-compat: + * chew.c: Add casts. + +2009-08-29 Martin Thuresson + + * chew.c (newentry, add_intrinsic): Rename variable new to + new_d. + +2009-08-27 Ralf Wildenhues + + * Makefile.in: Regenerate. + +2009-08-22 Ralf Wildenhues + + * Makefile.am (pdf__strip_dir, install-pdf, install-pdf-am) + (html__strip_dir, install-html, install-html-am): Remove. + * Makefile.in: Regenerate. + + * Makefile.in: Regenerate. + +2009-05-22 Alan Modra + + * Makefile.in: Regenerate. + +2009-04-22 Anthony Green + + * bfdint.texi (BFD target vector miscellaneous): Mention verilog + flavour. + 2008-11-19 Nick Clifton * fdl.texi: Update to v1.3 diff --git a/cegcc/src/binutils/bfd/doc/Makefile.am b/cegcc/src/binutils/bfd/doc/Makefile.am index d5b3fbaba..7476ee5ba 100644 --- a/cegcc/src/binutils/bfd/doc/Makefile.am +++ b/cegcc/src/binutils/bfd/doc/Makefile.am @@ -56,12 +56,12 @@ bfd_TEXINFOS = $(DOCFILES) bfdsumm.texi MKDOC = chew$(EXEEXT_FOR_BUILD) -INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \ +AM_CPPFLAGS = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \ -I$(srcdir)/../../intl -I../../intl $(MKDOC): $(srcdir)/chew.c $(CC_FOR_BUILD) -o chew.$$$$ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ - $(H_CFLAGS) $(INCLUDES) $(srcdir)/chew.c; \ + $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \ $(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC) protos: libbfd.h libcoff.h bfd.h @@ -296,41 +296,6 @@ MAINTAINERCLEANFILES = $(DOCFILES) # cygnus option. install: install-info -pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`; - -install-pdf: install-pdf-am - -install-pdf-am: $(PDFS) - @$(NORMAL_INSTALL) - test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)" - @list='$(PDFS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(pdf__strip_dir) \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ - done - -html__strip_dir = `echo $$p | sed -e 's|^.*/||'`; - -install-html: install-html-am - -install-html-am: $(HTMLS) - @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)" - @list='$(HTMLS)'; for p in $$list; do \ - if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \ - f=$(html__strip_dir) \ - if test -d "$$d$$p"; then \ - echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \ - $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ - echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ - else \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ - fi; \ - done - MAINTAINERCLEANFILES += bfd.info # Automake 1.9 will only build info files in the objdir if they are diff --git a/cegcc/src/binutils/bfd/doc/Makefile.in b/cegcc/src/binutils/bfd/doc/Makefile.in index 97700e591..370fcadb3 100644 --- a/cegcc/src/binutils/bfd/doc/Makefile.in +++ b/cegcc/src/binutils/bfd/doc/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,15 +14,12 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -47,13 +45,12 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ - $(top_srcdir)/../config/extensions.m4 \ $(top_srcdir)/../config/gettext-sister.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/nls.m4 \ $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/plugins.m4 \ $(top_srcdir)/../config/po.m4 \ - $(top_srcdir)/../config/proginstall.m4 \ $(top_srcdir)/../config/progtest.m4 \ $(top_srcdir)/../config/stdint.m4 $(top_srcdir)/../libtool.m4 \ $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \ @@ -65,6 +62,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = depcomp = am__depfiles_maybe = SOURCES = @@ -85,9 +83,28 @@ TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -125,15 +142,12 @@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ FGREP = @FGREP@ GENCAT = @GENCAT@ -GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@ -GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ HDEFINES = @HDEFINES@ INCINTL = @INCINTL@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ -INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@ -INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ @@ -142,6 +156,7 @@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBINTL = @LIBINTL@ LIBINTL_DEP = @LIBINTL_DEP@ +LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ @@ -149,9 +164,8 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ @@ -167,6 +181,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGVERSION = @PKGVERSION@ @@ -185,20 +200,13 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ -ac_ct_AR = @ac_ct_AR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_LIPO = @ac_ct_LIPO@ -ac_ct_NMEDIT = @ac_ct_NMEDIT@ -ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ -ac_ct_OTOOL = @ac_ct_OTOOL@ -ac_ct_OTOOL64 = @ac_ct_OTOOL64@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ all_backends = @all_backends@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -210,17 +218,17 @@ bfd_default_target_size = @bfd_default_target_size@ bfd_file_ptr = @bfd_file_ptr@ bfd_machines = @bfd_machines@ bfd_ufile_ptr = @bfd_ufile_ptr@ -bfdincludedir = @bfdincludedir@ -bfdlibdir = @bfdlibdir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ @@ -234,6 +242,7 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ @@ -242,8 +251,11 @@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +supports_plugins = @supports_plugins@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ @@ -252,6 +264,9 @@ target_noncanonical = @target_noncanonical@ target_os = @target_os@ target_vendor = @target_vendor@ tdefaults = @tdefaults@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ wordsize = @wordsize@ AUTOMAKE_OPTIONS = 1.9 cygnus DOCFILES = aoutx.texi archive.texi archures.texi \ @@ -305,7 +320,7 @@ TEXIDIR = $(srcdir)/../../texinfo/fsf info_TEXINFOS = bfd.texinfo bfd_TEXINFOS = $(DOCFILES) bfdsumm.texi MKDOC = chew$(EXEEXT_FOR_BUILD) -INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \ +AM_CPPFLAGS = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \ -I$(srcdir)/../../intl -I../../intl LIBBFD_H_DEP = \ @@ -359,8 +374,6 @@ CLEANFILES = *.p *.ip DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log \ $(am__append_1) MAINTAINERCLEANFILES = $(DOCFILES) bfd.info -pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -html__strip_dir = `echo $$p | sed -e 's|^.*/||'`; all: all-am .SUFFIXES: @@ -369,14 +382,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -394,6 +407,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo @@ -401,9 +415,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool - bfd.info: bfd.texinfo $(bfd_TEXINFOS) restore=: && backupdir="$(am__leading_dot)am$$$$" && \ rm -rf $$backupdir && mkdir $$backupdir && \ @@ -449,15 +460,35 @@ bfd.html: bfd.texinfo $(bfd_TEXINFOS) TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + uninstall-info-am: @$(PRE_UNINSTALL) - @if (install-info --version && \ + @if test -d '$(DESTDIR)$(infodir)' && \ + (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ - install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @@ -465,12 +496,30 @@ uninstall-info-am: for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if cd "$(DESTDIR)$(infodir)"; then \ + (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + done + dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ @@ -479,17 +528,23 @@ dist-info: $(INFO_DEPS) $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ - for file in $$d/$$base*; do \ - relfile=`expr "$$file" : "$$d/\(.*\)"`; \ - test -f $(distdir)/$$relfile || \ - cp -p $$file $(distdir)/$$relfile; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f "$(distdir)/$$relfile" || \ + cp -p $$file "$(distdir)/$$relfile"; \ + else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf bfd.aux bfd.cp bfd.cps bfd.fn bfd.ky bfd.kys bfd.log bfd.pg bfd.pgs \ - bfd.tmp bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs bfd.dvi \ - bfd.pdf bfd.ps bfd.html + bfd.tmp bfd.toc bfd.tp bfd.tps bfd.vr bfd.vrs + +clean-aminfo: + -test -z "bfd.dvi bfd.pdf bfd.ps bfd.html" \ + || rm -rf bfd.dvi bfd.pdf bfd.ps bfd.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ @@ -498,7 +553,7 @@ maintainer-clean-aminfo: rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done -clean-info: mostlyclean-aminfo +clean-info: mostlyclean-aminfo clean-aminfo tags: TAGS TAGS: @@ -530,6 +585,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @@ -538,11 +594,11 @@ maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am -clean-am: clean-generic clean-libtool mostlyclean-am +clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic dvi: dvi-am @@ -558,15 +614,52 @@ info-am: $(INFO_DEPS) install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ + done install-exec-am: +install-html: install-html-am + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__strip_dir) \ + if test -d "$$d$$p"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ + else \ + list2="$$list2 $$d$$p"; \ + fi; \ + done; \ + test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ + done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) - test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)" + test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - list='$(INFO_DEPS)'; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ @@ -574,18 +667,19 @@ install-info-am: $(INFO_DEPS) if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ - $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ - relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ - echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \ - $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \ + echo "$$ifile"; \ else : ; fi; \ done; \ - done + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ @@ -594,6 +688,32 @@ install-info-am: $(INFO_DEPS) else : ; fi install-man: +install-pdf: install-pdf-am + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done +install-ps: install-ps-am + +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am @@ -614,23 +734,29 @@ ps: ps-am ps-am: $(PSS) -uninstall-am: +uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-pdf-am uninstall-ps-am -.PHONY: all all-am check check-am clean clean-generic clean-info \ - clean-libtool dist-info distclean distclean-generic \ +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-aminfo clean-generic \ + clean-info clean-libtool dist-info distclean distclean-generic \ distclean-libtool dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-aminfo \ maintainer-clean-generic mostlyclean mostlyclean-aminfo \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-info-am + uninstall uninstall-am uninstall-dvi-am uninstall-html-am \ + uninstall-info-am uninstall-pdf-am uninstall-ps-am $(MKDOC): $(srcdir)/chew.c $(CC_FOR_BUILD) -o chew.$$$$ $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ - $(H_CFLAGS) $(INCLUDES) $(srcdir)/chew.c; \ + $(H_CFLAGS) $(AM_CPPFLAGS) $(srcdir)/chew.c; \ $(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC) protos: libbfd.h libcoff.h bfd.h @@ -810,36 +936,6 @@ bfdver.texi: $(srcdir)/Makefile.in # cygnus option. install: install-info -install-pdf: install-pdf-am - -install-pdf-am: $(PDFS) - @$(NORMAL_INSTALL) - test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)" - @list='$(PDFS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(pdf__strip_dir) \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ - done - -install-html: install-html-am - -install-html-am: $(HTMLS) - @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)" - @list='$(HTMLS)'; for p in $$list; do \ - if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \ - f=$(html__strip_dir) \ - if test -d "$$d$$p"; then \ - echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \ - $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ - echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ - else \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ - fi; \ - done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/cegcc/src/binutils/bfd/doc/bfd.texinfo b/cegcc/src/binutils/bfd/doc/bfd.texinfo index 7eeb91995..ce1c5afc8 100644 --- a/cegcc/src/binutils/bfd/doc/bfd.texinfo +++ b/cegcc/src/binutils/bfd/doc/bfd.texinfo @@ -1,7 +1,7 @@ \input texinfo.tex @setfilename bfd.info @c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000, -@c 2001, 2002, 2003, 2006, 2007, 2008 +@c 2001, 2002, 2003, 2006, 2007, 2008, 2009 @c Free Software Foundation, Inc. @c @synindex fn cp diff --git a/cegcc/src/binutils/bfd/doc/bfdint.texi b/cegcc/src/binutils/bfd/doc/bfdint.texi index b7e7c548e..1e03aeb84 100644 --- a/cegcc/src/binutils/bfd/doc/bfdint.texi +++ b/cegcc/src/binutils/bfd/doc/bfdint.texi @@ -1,6 +1,6 @@ \input texinfo @c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, -@c 2000, 2001, 2002, 2003, 2004, 2006, 2007 +@c 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2009 @c Free Software Foundation, Inc. @setfilename bfdint.info @@ -17,7 +17,7 @@ This file documents the internals of the BFD library. Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, -1996, 1998, 2000, 2001, 2002, 2003, 2004, 2006, 2007 +1996, 1998, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2009 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -354,6 +354,8 @@ Motorola S-record format. Intel hex format. @item bfd_target_som_flavour SOM (used on HP/UX). +@item bfd_target_verilog_flavour +Verilog memory hex dump format. @item bfd_target_os9k_flavour os9000. @item bfd_target_versados_flavour diff --git a/cegcc/src/binutils/bfd/doc/chew.c b/cegcc/src/binutils/bfd/doc/chew.c index 5622ff2c6..2276c8a6d 100644 --- a/cegcc/src/binutils/bfd/doc/chew.c +++ b/cegcc/src/binutils/bfd/doc/chew.c @@ -1,6 +1,6 @@ /* chew Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, - 2002, 2003, 2005, 2007 + 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc. Contributed by steve chamberlain @cygnus @@ -130,7 +130,7 @@ init_string_with_size (buffer, size) { buffer->write_idx = 0; buffer->size = size; - buffer->ptr = malloc (size); + buffer->ptr = (char *) malloc (size); } static void @@ -201,7 +201,7 @@ catchar (buffer, ch) if (buffer->write_idx == buffer->size) { buffer->size *= 2; - buffer->ptr = realloc (buffer->ptr, buffer->size); + buffer->ptr = (char *) realloc (buffer->ptr, buffer->size); } buffer->ptr[buffer->write_idx++] = ch; @@ -228,7 +228,7 @@ catbuf (buffer, buf, len) { while (buffer->write_idx + len >= buffer->size) buffer->size *= 2; - buffer->ptr = realloc (buffer->ptr, buffer->size); + buffer->ptr = (char *) realloc (buffer->ptr, buffer->size); } memcpy (buffer->ptr + buffer->write_idx, buf, len); buffer->write_idx += len; @@ -1177,7 +1177,7 @@ nextword (string, word) } } - *word = malloc (length + 1); + *word = (char *) malloc (length + 1); dst = *word; src = word_start; @@ -1267,14 +1267,14 @@ dict_type * newentry (word) char *word; { - dict_type *new = (dict_type *) malloc (sizeof (dict_type)); - new->word = word; - new->next = root; - root = new; - new->code = (stinst_type *) malloc (sizeof (stinst_type)); - new->code_length = 1; - new->code_end = 0; - return new; + dict_type *new_d = (dict_type *) malloc (sizeof (dict_type)); + new_d->word = word; + new_d->next = root; + root = new_d; + new_d->code = (stinst_type *) malloc (sizeof (stinst_type)); + new_d->code_length = 1; + new_d->code_end = 0; + return new_d; } unsigned int @@ -1299,19 +1299,19 @@ add_intrinsic (name, func) char *name; void (*func) (); { - dict_type *new = newentry (name); - add_to_definition (new, func); - add_to_definition (new, 0); + dict_type *new_d = newentry (name); + add_to_definition (new_d, func); + add_to_definition (new_d, 0); } void add_var (name) char *name; { - dict_type *new = newentry (name); - add_to_definition (new, push_number); - add_to_definition (new, (stinst_type) (&(new->var))); - add_to_definition (new, 0); + dict_type *new_d = newentry (name); + add_to_definition (new_d, push_number); + add_to_definition (new_d, (stinst_type) (&(new_d->var))); + add_to_definition (new_d, 0); } void diff --git a/cegcc/src/binutils/bfd/dwarf1.c b/cegcc/src/binutils/bfd/dwarf1.c index 3c2cf797e..26740448c 100644 --- a/cegcc/src/binutils/bfd/dwarf1.c +++ b/cegcc/src/binutils/bfd/dwarf1.c @@ -1,5 +1,5 @@ /* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line). - Copyright 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2007 + Copyright 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com). @@ -143,7 +143,7 @@ alloc_dwarf1_unit (struct dwarf1_debug* stash) { bfd_size_type amt = sizeof (struct dwarf1_unit); - struct dwarf1_unit* x = bfd_zalloc (stash->abfd, amt); + struct dwarf1_unit* x = (struct dwarf1_unit *) bfd_zalloc (stash->abfd, amt); if (x) { x->prev = stash->lastUnit; @@ -161,7 +161,7 @@ alloc_dwarf1_func (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) { bfd_size_type amt = sizeof (struct dwarf1_func); - struct dwarf1_func* x = bfd_zalloc (stash->abfd, amt); + struct dwarf1_func* x = (struct dwarf1_func *) bfd_zalloc (stash->abfd, amt); if (x) { x->prev = aUnit->func_list; @@ -312,7 +312,8 @@ parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) /* Allocate an array for the entries. */ amt = sizeof (struct linenumber) * aUnit->line_count; - aUnit->linenumber_table = bfd_alloc (stash->abfd, amt); + aUnit->linenumber_table = (struct linenumber *) bfd_alloc (stash->abfd, + amt); if (!aUnit->linenumber_table) return FALSE; @@ -473,7 +474,7 @@ _bfd_dwarf1_find_nearest_line (bfd *abfd, bfd_size_type size = sizeof (struct dwarf1_debug); stash = elf_tdata (abfd)->dwarf1_find_line_info - = bfd_zalloc (abfd, size); + = (struct dwarf1_debug *) bfd_zalloc (abfd, size); if (! stash) return FALSE; diff --git a/cegcc/src/binutils/bfd/dwarf2.c b/cegcc/src/binutils/bfd/dwarf2.c index 0c1825340..5d504c868 100644 --- a/cegcc/src/binutils/bfd/dwarf2.c +++ b/cegcc/src/binutils/bfd/dwarf2.c @@ -35,7 +35,7 @@ #include "libiberty.h" #include "libbfd.h" #include "elf-bfd.h" -#include "elf/dwarf2.h" +#include "dwarf2.h" /* The data in the .debug_line statement prologue looks like this. */ @@ -100,7 +100,7 @@ struct dwarf2_debug /* Pointer to the bfd, section and address of the beginning of the section. The bfd might be different than expected because of gnu_debuglink sections. */ - bfd * bfd; + bfd *bfd_ptr; asection *sec; bfd_byte *sec_info_ptr; @@ -316,7 +316,8 @@ info_hash_table_newfunc (struct bfd_hash_entry *entry, derived class. */ if (ret == NULL) { - ret = bfd_hash_allocate (table, sizeof (* ret)); + ret = (struct info_hash_entry *) bfd_hash_allocate (table, + sizeof (* ret)); if (ret == NULL) return NULL; } @@ -341,7 +342,8 @@ create_info_hash_table (bfd *abfd) { struct info_hash_table *hash_table; - hash_table = bfd_alloc (abfd, sizeof (struct info_hash_table)); + hash_table = (struct info_hash_table *) + bfd_alloc (abfd, sizeof (struct info_hash_table)); if (!hash_table) return hash_table; @@ -374,7 +376,8 @@ insert_info_hash_table (struct info_hash_table *hash_table, if (!entry) return FALSE; - node = bfd_hash_allocate (&hash_table->base, sizeof (*node)); + node = (struct info_list_node *) bfd_hash_allocate (&hash_table->base, + sizeof (*node)); if (!node) return FALSE; @@ -417,48 +420,47 @@ read_section (bfd * abfd, bfd_boolean section_is_compressed = FALSE; /* read_section is a noop if the section has already been read. */ - if (*section_buffer) - return TRUE; - - msec = bfd_get_section_by_name (abfd, section_name); - if (! msec && compressed_section_name) - { - msec = bfd_get_section_by_name (abfd, compressed_section_name); - section_is_compressed = TRUE; - } - if (! msec) + if (!*section_buffer) { - (*_bfd_error_handler) (_("Dwarf Error: Can't find %s section."), section_name); - bfd_set_error (bfd_error_bad_value); - return FALSE; - } + msec = bfd_get_section_by_name (abfd, section_name); + if (! msec && compressed_section_name) + { + msec = bfd_get_section_by_name (abfd, compressed_section_name); + section_is_compressed = TRUE; + } + if (! msec) + { + (*_bfd_error_handler) (_("Dwarf Error: Can't find %s section."), section_name); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } - if (syms) - { - *section_size = msec->size; - *section_buffer - = bfd_simple_get_relocated_section_contents (abfd, msec, NULL, syms); - if (! *section_buffer) - return FALSE; - } - else - { *section_size = msec->rawsize ? msec->rawsize : msec->size; - *section_buffer = bfd_malloc (*section_size); - if (! *section_buffer) - return FALSE; - if (! bfd_get_section_contents (abfd, msec, *section_buffer, - 0, *section_size)) - return FALSE; - } + if (syms) + { + *section_buffer + = bfd_simple_get_relocated_section_contents (abfd, msec, NULL, syms); + if (! *section_buffer) + return FALSE; + } + else + { + *section_buffer = (bfd_byte *) bfd_malloc (*section_size); + if (! *section_buffer) + return FALSE; + if (! bfd_get_section_contents (abfd, msec, *section_buffer, + 0, *section_size)) + return FALSE; + } - if (section_is_compressed) - { - if (! bfd_uncompress_section_contents (section_buffer, section_size)) + if (section_is_compressed) { - (*_bfd_error_handler) (_("Dwarf Error: unable to decompress %s section."), compressed_section_name); - bfd_set_error (bfd_error_bad_value); - return FALSE; + if (! bfd_uncompress_section_contents (section_buffer, section_size)) + { + (*_bfd_error_handler) (_("Dwarf Error: unable to decompress %s section."), compressed_section_name); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } } } @@ -644,7 +646,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash) return 0; amt = sizeof (struct abbrev_info*) * ABBREV_HASH_SIZE; - abbrevs = bfd_zalloc (abfd, amt); + abbrevs = (struct abbrev_info **) bfd_zalloc (abfd, amt); abbrev_ptr = stash->dwarf_abbrev_buffer + offset; abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); @@ -654,7 +656,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash) while (abbrev_number) { amt = sizeof (struct abbrev_info); - cur_abbrev = bfd_zalloc (abfd, amt); + cur_abbrev = (struct abbrev_info *) bfd_zalloc (abfd, amt); /* Read in abbrev header. */ cur_abbrev->number = abbrev_number; @@ -678,7 +680,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash) amt = cur_abbrev->num_attrs + ATTR_ALLOC_CHUNK; amt *= sizeof (struct attr_abbrev); - tmp = bfd_realloc (cur_abbrev->attrs, amt); + tmp = (struct attr_abbrev *) bfd_realloc (cur_abbrev->attrs, amt); if (tmp == NULL) { size_t i; @@ -767,7 +769,7 @@ read_attribute_value (struct attribute *attr, break; case DW_FORM_block2: amt = sizeof (struct dwarf_block); - blk = bfd_alloc (abfd, amt); + blk = (struct dwarf_block *) bfd_alloc (abfd, amt); blk->size = read_2_bytes (abfd, info_ptr); info_ptr += 2; blk->data = read_n_bytes (abfd, info_ptr, blk->size); @@ -776,7 +778,7 @@ read_attribute_value (struct attribute *attr, break; case DW_FORM_block4: amt = sizeof (struct dwarf_block); - blk = bfd_alloc (abfd, amt); + blk = (struct dwarf_block *) bfd_alloc (abfd, amt); blk->size = read_4_bytes (abfd, info_ptr); info_ptr += 4; blk->data = read_n_bytes (abfd, info_ptr, blk->size); @@ -805,7 +807,7 @@ read_attribute_value (struct attribute *attr, break; case DW_FORM_block: amt = sizeof (struct dwarf_block); - blk = bfd_alloc (abfd, amt); + blk = (struct dwarf_block *) bfd_alloc (abfd, amt); blk->size = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); info_ptr += bytes_read; blk->data = read_n_bytes (abfd, info_ptr, blk->size); @@ -814,7 +816,7 @@ read_attribute_value (struct attribute *attr, break; case DW_FORM_block1: amt = sizeof (struct dwarf_block); - blk = bfd_alloc (abfd, amt); + blk = (struct dwarf_block *) bfd_alloc (abfd, amt); blk->size = read_1_byte (abfd, info_ptr); info_ptr += 1; blk->data = read_n_bytes (abfd, info_ptr, blk->size); @@ -979,7 +981,7 @@ add_line_info (struct line_info_table *table, int end_sequence) { bfd_size_type amt = sizeof (struct line_info); - struct line_info* info = bfd_alloc (table->abfd, amt); + struct line_info* info = (struct line_info *) bfd_alloc (table->abfd, amt); /* Set member data of 'info'. */ info->address = address; @@ -989,7 +991,7 @@ add_line_info (struct line_info_table *table, if (filename && filename[0]) { - info->filename = bfd_alloc (table->abfd, strlen (filename) + 1); + info->filename = (char *) bfd_alloc (table->abfd, strlen (filename) + 1); if (info->filename) strcpy (info->filename, filename); } @@ -1110,13 +1112,13 @@ concat_filename (struct line_info_table *table, unsigned int file) if (subdirname) { len += strlen (subdirname) + 1; - name = bfd_malloc (len); + name = (char *) bfd_malloc (len); if (name) sprintf (name, "%s/%s/%s", dirname, subdirname, filename); } else { - name = bfd_malloc (len); + name = (char *) bfd_malloc (len); if (name) sprintf (name, "%s/%s", dirname, filename); } @@ -1160,7 +1162,7 @@ arange_add (bfd *abfd, struct arange *first_arange, bfd_vma low_pc, bfd_vma high /* Need to allocate a new arange and insert it into the arange list. Order isn't significant, so just insert after the first arange. */ - arange = bfd_zalloc (abfd, sizeof (*arange)); + arange = (struct arange *) bfd_zalloc (abfd, sizeof (*arange)); arange->low = low_pc; arange->high = high_pc; arange->next = first_arange->next; @@ -1188,7 +1190,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash) return 0; amt = sizeof (struct line_info_table); - table = bfd_alloc (abfd, amt); + table = (struct line_info_table *) bfd_alloc (abfd, amt); table->abfd = abfd; table->comp_dir = unit->comp_dir; @@ -1240,7 +1242,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash) lh.opcode_base = read_1_byte (abfd, line_ptr); line_ptr += 1; amt = lh.opcode_base * sizeof (unsigned char); - lh.standard_opcode_lengths = bfd_alloc (abfd, amt); + lh.standard_opcode_lengths = (unsigned char *) bfd_alloc (abfd, amt); lh.standard_opcode_lengths[0] = 1; @@ -1262,7 +1264,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash) amt = table->num_dirs + DIR_ALLOC_CHUNK; amt *= sizeof (char *); - tmp = bfd_realloc (table->dirs, amt); + tmp = (char **) bfd_realloc (table->dirs, amt); if (tmp == NULL) { free (table->dirs); @@ -1288,7 +1290,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash) amt = table->num_files + FILE_ALLOC_CHUNK; amt *= sizeof (struct fileinfo); - tmp = bfd_realloc (table->files, amt); + tmp = (struct fileinfo *) bfd_realloc (table->files, amt); if (tmp == NULL) { free (table->files); @@ -1384,7 +1386,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash) amt = table->num_files + FILE_ALLOC_CHUNK; amt *= sizeof (struct fileinfo); - tmp = bfd_realloc (table->files, amt); + tmp = (struct fileinfo *) bfd_realloc (table->files, amt); if (tmp == NULL) { free (table->files); @@ -1406,6 +1408,10 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash) line_ptr += bytes_read; table->num_files++; break; + case DW_LNE_set_discriminator: + (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; default: (*_bfd_error_handler) (_("Dwarf Error: mangled line number section.")); bfd_set_error (bfd_error_bad_value); @@ -1489,95 +1495,27 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash) static bfd_boolean lookup_address_in_line_info_table (struct line_info_table *table, bfd_vma addr, - struct funcinfo *function, const char **filename_ptr, unsigned int *linenumber_ptr) { /* Note: table->last_line should be a descendingly sorted list. */ - struct line_info* next_line = table->last_line; - struct line_info* each_line = NULL; - *filename_ptr = NULL; - - if (!next_line) - return FALSE; - - each_line = next_line->prev_line; - - /* Check for large addresses */ - if (addr > next_line->address) - each_line = NULL; /* ensure we skip over the normal case */ + struct line_info *each_line; - /* Normal case: search the list; save */ - while (each_line && next_line) - { - /* If we have an address match, save this info. This allows us - to return as good as results as possible for strange debugging - info. */ - bfd_boolean addr_match = FALSE; - if (each_line->address <= addr && addr < next_line->address) - { - addr_match = TRUE; - - /* If this line appears to span functions, and addr is in the - later function, return the first line of that function instead - of the last line of the earlier one. This check is for GCC - 2.95, which emits the first line number for a function late. */ - - if (function != NULL) - { - bfd_vma lowest_pc; - struct arange *arange; - - /* Find the lowest address in the function's range list */ - lowest_pc = function->arange.low; - for (arange = &function->arange; - arange; - arange = arange->next) - { - if (function->arange.low < lowest_pc) - lowest_pc = function->arange.low; - } - /* Check for spanning function and set outgoing line info */ - if (addr >= lowest_pc - && each_line->address < lowest_pc - && next_line->address > lowest_pc) - { - *filename_ptr = next_line->filename; - *linenumber_ptr = next_line->line; - } - else - { - *filename_ptr = each_line->filename; - *linenumber_ptr = each_line->line; - } - } - else - { - *filename_ptr = each_line->filename; - *linenumber_ptr = each_line->line; - } - } - - if (addr_match && !each_line->end_sequence) - return TRUE; /* we have definitely found what we want */ - - next_line = each_line; - each_line = each_line->prev_line; - } + for (each_line = table->last_line; + each_line; + each_line = each_line->prev_line) + if (addr >= each_line->address) + break; - /* At this point each_line is NULL but next_line is not. If we found - a candidate end-of-sequence point in the loop above, we can return - that (compatibility with a bug in the Intel compiler); otherwise, - assuming that we found the containing function for this address in - this compilation unit, return the first line we have a number for - (compatibility with GCC 2.95). */ - if (*filename_ptr == NULL && function != NULL) + if (each_line + && !(each_line->end_sequence || each_line == table->last_line)) { - *filename_ptr = next_line->filename; - *linenumber_ptr = next_line->line; + *filename_ptr = each_line->filename; + *linenumber_ptr = each_line->line; return TRUE; } + *filename_ptr = NULL; return FALSE; } @@ -1834,7 +1772,8 @@ scan_unit_for_symbols (struct comp_unit *unit) /* Maintain a stack of in-scope functions and inlined functions, which we can use to set the caller_func field. */ nested_funcs_size = 32; - nested_funcs = bfd_malloc (nested_funcs_size * sizeof (struct funcinfo *)); + nested_funcs = (struct funcinfo **) + bfd_malloc (nested_funcs_size * sizeof (struct funcinfo *)); if (nested_funcs == NULL) return FALSE; nested_funcs[nesting_level] = 0; @@ -1874,7 +1813,7 @@ scan_unit_for_symbols (struct comp_unit *unit) || abbrev->tag == DW_TAG_inlined_subroutine) { bfd_size_type amt = sizeof (struct funcinfo); - func = bfd_zalloc (abfd, amt); + func = (struct funcinfo *) bfd_zalloc (abfd, amt); func->tag = abbrev->tag; func->prev_func = unit->function_table; unit->function_table = func; @@ -1895,7 +1834,7 @@ scan_unit_for_symbols (struct comp_unit *unit) if (abbrev->tag == DW_TAG_variable) { bfd_size_type amt = sizeof (struct varinfo); - var = bfd_zalloc (abfd, amt); + var = (struct varinfo *) bfd_zalloc (abfd, amt); var->tag = abbrev->tag; var->stack = 1; var->prev_var = unit->variable_table; @@ -2033,9 +1972,9 @@ scan_unit_for_symbols (struct comp_unit *unit) struct funcinfo **tmp; nested_funcs_size *= 2; - tmp = bfd_realloc (nested_funcs, - (nested_funcs_size - * sizeof (struct funcinfo *))); + tmp = (struct funcinfo **) + bfd_realloc (nested_funcs, + (nested_funcs_size * sizeof (struct funcinfo *))); if (tmp == NULL) { free (nested_funcs); @@ -2079,7 +2018,7 @@ parse_comp_unit (struct dwarf2_debug *stash, bfd_size_type amt; bfd_vma low_pc = 0; bfd_vma high_pc = 0; - bfd *abfd = stash->bfd; + bfd *abfd = stash->bfd_ptr; version = read_2_bytes (abfd, info_ptr); info_ptr += 2; @@ -2140,7 +2079,7 @@ parse_comp_unit (struct dwarf2_debug *stash, } amt = sizeof (struct comp_unit); - unit = bfd_zalloc (abfd, amt); + unit = (struct comp_unit *) bfd_zalloc (abfd, amt); unit->abfd = abfd; unit->version = version; unit->addr_size = addr_size; @@ -2291,7 +2230,7 @@ comp_unit_find_nearest_line (struct comp_unit *unit, if (func_p && (function->tag == DW_TAG_inlined_subroutine)) stash->inliner_chain = function; line_p = lookup_address_in_line_info_table (unit->line_table, addr, - function, filename_ptr, + filename_ptr, linenumber_ptr); return line_p || func_p; } @@ -2647,7 +2586,7 @@ info_hash_lookup_funcinfo (struct info_hash_table *hash_table, node; node = node->next) { - each_func = node->info; + each_func = (struct funcinfo *) node->info; for (arange = &each_func->arange; arange; arange = arange->next) @@ -2695,7 +2634,7 @@ info_hash_lookup_varinfo (struct info_hash_table *hash_table, node; node = node->next) { - each = node->info; + each = (struct varinfo *) node->info; if (each->addr == addr && (!each->sec || each->sec == sec)) { @@ -2886,13 +2825,13 @@ find_line (bfd *abfd, bfd_vma found = FALSE; bfd_boolean do_line; - stash = *pinfo; + stash = (struct dwarf2_debug *) *pinfo; if (! stash) { bfd_size_type amt = sizeof (struct dwarf2_debug); - stash = bfd_zalloc (abfd, amt); + stash = (struct dwarf2_debug *) bfd_zalloc (abfd, amt); if (! stash) return FALSE; } @@ -2996,7 +2935,7 @@ find_line (bfd *abfd, if (all_uncompressed) { /* Case 2: multiple sections, but none is compressed. */ - stash->info_ptr_memory = bfd_malloc (total_size); + stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size); if (stash->info_ptr_memory == NULL) goto done; @@ -3047,8 +2986,8 @@ find_line (bfd *abfd, goto done; } } - stash->info_ptr_memory = bfd_realloc (stash->info_ptr_memory, - total_size + size); + stash->info_ptr_memory = (bfd_byte *) + bfd_realloc (stash->info_ptr_memory, total_size + size); memcpy (stash->info_ptr_memory + total_size, buffer, size); free (buffer); total_size += size; @@ -3061,7 +3000,7 @@ find_line (bfd *abfd, stash->sec = find_debug_info (debug_bfd, NULL); stash->sec_info_ptr = stash->info_ptr; stash->syms = symbols; - stash->bfd = debug_bfd; + stash->bfd_ptr = debug_bfd; } /* A null info_ptr indicates that there is no dwarf2 info @@ -3135,13 +3074,13 @@ find_line (bfd *abfd, unsigned int offset_size = addr_size; bfd_byte *info_ptr_unit = stash->info_ptr; - length = read_4_bytes (stash->bfd, stash->info_ptr); + length = read_4_bytes (stash->bfd_ptr, stash->info_ptr); /* A 0xffffff length is the DWARF3 way of indicating we use 64-bit offsets, instead of 32-bit offsets. */ if (length == 0xffffffff) { offset_size = 8; - length = read_8_bytes (stash->bfd, stash->info_ptr + 4); + length = read_8_bytes (stash->bfd_ptr, stash->info_ptr + 4); stash->info_ptr += 12; } /* A zero length is the IRIX way of indicating 64-bit offsets, @@ -3150,7 +3089,7 @@ find_line (bfd *abfd, else if (length == 0) { offset_size = 8; - length = read_4_bytes (stash->bfd, stash->info_ptr + 4); + length = read_4_bytes (stash->bfd_ptr, stash->info_ptr + 4); stash->info_ptr += 8; } /* In the absence of the hints above, we assume 32-bit DWARF2 @@ -3213,7 +3152,7 @@ find_line (bfd *abfd, if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr) == stash->sec->size) { - stash->sec = find_debug_info (stash->bfd, stash->sec); + stash->sec = find_debug_info (stash->bfd_ptr, stash->sec); stash->sec_info_ptr = stash->info_ptr; } @@ -3274,7 +3213,7 @@ _bfd_dwarf2_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED, { struct dwarf2_debug *stash; - stash = *pinfo; + stash = (struct dwarf2_debug *) *pinfo; if (stash) { struct funcinfo *func = stash->inliner_chain; @@ -3301,7 +3240,7 @@ _bfd_dwarf2_cleanup_debug_info (bfd *abfd) if (abfd == NULL || elf_tdata (abfd) == NULL) return; - stash = elf_tdata (abfd)->dwarf2_find_line_info; + stash = (struct dwarf2_debug *) elf_tdata (abfd)->dwarf2_find_line_info; if (stash == NULL) return; diff --git a/cegcc/src/binutils/bfd/ecoff.c b/cegcc/src/binutils/bfd/ecoff.c index a31bdb96b..48ce98cc7 100644 --- a/cegcc/src/binutils/bfd/ecoff.c +++ b/cegcc/src/binutils/bfd/ecoff.c @@ -1,6 +1,7 @@ /* Generic ECOFF (Extended-COFF) routines. Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + Free Software Foundation, Inc. Original version by Per Bothner. Full support added by Ian Lance Taylor, ian@cygnus.com. @@ -59,10 +60,10 @@ static asection bfd_debug_section = 0, 0, 1, /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ 0, 0, 0, 0, - /* has_gp_reloc, need_finalize_relax, reloc_done, */ - 0, 0, 0, - /* vma, lma, size, rawsize, */ - 0, 0, 0, 0, + /* has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, */ + 0, 0, 0, + /* reloc_done, vma, lma, size, rawsize, relax, relax_count, */ + 0, 0, 0, 0, 0, 0, 0, /* output_offset, output_section, alignment_power, */ 0, NULL, 0, /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ @@ -88,7 +89,7 @@ _bfd_ecoff_mkobject (bfd *abfd) { bfd_size_type amt = sizeof (ecoff_data_type); - abfd->tdata.ecoff_obj_data = bfd_zalloc (abfd, amt); + abfd->tdata.ecoff_obj_data = (struct ecoff_tdata *) bfd_zalloc (abfd, amt); if (abfd->tdata.ecoff_obj_data == NULL) return FALSE; @@ -192,7 +193,7 @@ _bfd_ecoff_new_section_hook (bfd *abfd, asection *section) bfd_boolean _bfd_ecoff_set_arch_mach_hook (bfd *abfd, void * filehdr) { - struct internal_filehdr *internal_f = filehdr; + struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; enum bfd_architecture arch; unsigned long mach; @@ -233,6 +234,16 @@ _bfd_ecoff_set_arch_mach_hook (bfd *abfd, void * filehdr) return bfd_default_set_arch_mach (abfd, arch, mach); } +bfd_boolean +_bfd_ecoff_no_long_sections (abfd, enable) + bfd *abfd; + int enable; +{ + (void) abfd; + (void) enable; + return FALSE; +} + /* Get the magic number to use based on the architecture and machine. This is the inverse of _bfd_ecoff_set_arch_mach_hook, above. */ @@ -355,7 +366,7 @@ _bfd_ecoff_styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED, asection *section ATTRIBUTE_UNUSED, flagword * flags_ptr) { - struct internal_scnhdr *internal_s = hdr; + struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr; long styp_flags = internal_s->s_flags; flagword sec_flags = 0; @@ -603,7 +614,7 @@ _bfd_ecoff_slurp_symbolic_info (bfd *abfd, the symbols, so we swap them here. */ amt = internal_symhdr->ifdMax; amt *= sizeof (struct fdr); - debug->fdr = bfd_alloc (abfd, amt); + debug->fdr = (FDR *) bfd_alloc (abfd, amt); if (debug->fdr == NULL) return FALSE; external_fdr_size = backend->debug_swap.external_fdr_size; @@ -633,18 +644,18 @@ static asymbol *ecoff_scom_symbol_ptr; asymbol * _bfd_ecoff_make_empty_symbol (bfd *abfd) { - ecoff_symbol_type *new; + ecoff_symbol_type *new_symbol; bfd_size_type amt = sizeof (ecoff_symbol_type); - new = bfd_zalloc (abfd, amt); - if (new == NULL) + new_symbol = (ecoff_symbol_type *) bfd_zalloc (abfd, amt); + if (new_symbol == NULL) return NULL; - new->symbol.section = NULL; - new->fdr = NULL; - new->local = FALSE; - new->native = NULL; - new->symbol.the_bfd = abfd; - return &new->symbol; + new_symbol->symbol.section = NULL; + new_symbol->fdr = NULL; + new_symbol->local = FALSE; + new_symbol->native = NULL; + new_symbol->symbol.the_bfd = abfd; + return &new_symbol->symbol; } /* Set the BFD flags and section for an ECOFF symbol. */ @@ -871,7 +882,7 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) internal_size = bfd_get_symcount (abfd); internal_size *= sizeof (ecoff_symbol_type); - internal = bfd_alloc (abfd, internal_size); + internal = (ecoff_symbol_type *) bfd_alloc (abfd, internal_size); if (internal == NULL) return FALSE; @@ -1569,11 +1580,11 @@ ecoff_slurp_reloc_table (bfd *abfd, amt = section->reloc_count; amt *= sizeof (arelent); - internal_relocs = bfd_alloc (abfd, amt); + internal_relocs = (arelent *) bfd_alloc (abfd, amt); external_reloc_size = backend->external_reloc_size; amt = external_reloc_size * section->reloc_count; - external_relocs = bfd_alloc (abfd, amt); + external_relocs = (char *) bfd_alloc (abfd, amt); if (internal_relocs == NULL || external_relocs == NULL) return FALSE; if (bfd_seek (abfd, section->rel_filepos, SEEK_SET) != 0) @@ -1719,7 +1730,8 @@ _bfd_ecoff_find_nearest_line (bfd *abfd, { bfd_size_type amt = sizeof (struct ecoff_find_line); - ecoff_data (abfd)->find_line_info = bfd_zalloc (abfd, amt); + ecoff_data (abfd)->find_line_info = + (struct ecoff_find_line *) bfd_zalloc (abfd, amt); if (ecoff_data (abfd)->find_line_info == NULL) return FALSE; } @@ -1944,7 +1956,7 @@ ecoff_compute_section_file_positions (bfd *abfd) /* Sort the sections by VMA. */ amt = abfd->section_count; amt *= sizeof (asection *); - sorted_hdrs = bfd_malloc (amt); + sorted_hdrs = (asection **) bfd_malloc (amt); if (sorted_hdrs == NULL) return FALSE; for (current = abfd->sections, i = 0; @@ -2897,7 +2909,7 @@ _bfd_ecoff_slurp_armap (bfd *abfd) parsed_size = mapdata->parsed_size; bfd_release (abfd, (void *) mapdata); - raw_armap = bfd_alloc (abfd, parsed_size); + raw_armap = (char *) bfd_alloc (abfd, parsed_size); if (raw_armap == NULL) return FALSE; @@ -2964,7 +2976,7 @@ _bfd_ecoff_slurp_armap (bfd *abfd) amt = ardata->symdef_count; amt *= sizeof (struct symdef); - symdef_ptr = bfd_alloc (abfd, amt); + symdef_ptr = (struct symdef *) bfd_alloc (abfd, amt); if (!symdef_ptr) return FALSE; @@ -3080,7 +3092,7 @@ _bfd_ecoff_write_armap (bfd *abfd, if (bfd_bwrite ((void *) temp, (bfd_size_type) 4, abfd) != 4) return FALSE; - hashtable = bfd_zalloc (abfd, symdefsize); + hashtable = (bfd_byte *) bfd_zalloc (abfd, symdefsize); if (!hashtable) return FALSE; @@ -3200,7 +3212,7 @@ _bfd_ecoff_bfd_link_hash_table_create (bfd *abfd) struct ecoff_link_hash_table *ret; bfd_size_type amt = sizeof (struct ecoff_link_hash_table); - ret = bfd_malloc (amt); + ret = (struct ecoff_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; if (!_bfd_link_hash_table_init (&ret->root, abfd, @@ -3258,7 +3270,7 @@ ecoff_link_add_externals (bfd *abfd, amt = ext_count; amt *= sizeof (struct bfd_link_hash_entry *); - sym_hash = bfd_alloc (abfd, amt); + sym_hash = (struct bfd_link_hash_entry **) bfd_alloc (abfd, amt); if (!sym_hash) return FALSE; ecoff_data (abfd)->sym_hashes = (struct ecoff_link_hash_entry **) sym_hash; @@ -3472,7 +3484,7 @@ ecoff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) || bfd_bread (external_ext, esize, abfd) != esize) goto error_return; - ssext = bfd_malloc ((bfd_size_type) symhdr->issExtMax); + ssext = (char *) bfd_malloc ((bfd_size_type) symhdr->issExtMax); if (ssext == NULL && symhdr->issExtMax != 0) goto error_return; @@ -3538,7 +3550,7 @@ ecoff_link_check_archive_element (bfd *abfd, || bfd_bread (external_ext, esize, abfd) != esize) goto error_return; - ssext = bfd_malloc ((bfd_size_type) symhdr->issExtMax); + ssext = (char *) bfd_malloc ((bfd_size_type) symhdr->issExtMax); if (ssext == NULL && symhdr->issExtMax != 0) goto error_return; @@ -3827,7 +3839,7 @@ ecoff_final_link_debug_accumulate (bfd *output_bfd, else \ { \ bfd_size_type amt = (bfd_size_type) size * symhdr->count; \ - debug->ptr = bfd_malloc (amt); \ + debug->ptr = (type) bfd_malloc (amt); \ if (debug->ptr == NULL) \ { \ ret = FALSE; \ @@ -4072,7 +4084,7 @@ ecoff_reloc_link_order (bfd *output_bfd, bfd_byte *buf; size = bfd_get_reloc_size (rel.howto); - buf = bfd_zmalloc (size); + buf = (bfd_byte *) bfd_zmalloc (size); if (buf == NULL) return FALSE; rstat = _bfd_relocate_contents (rel.howto, output_bfd, @@ -4181,7 +4193,7 @@ ecoff_reloc_link_order (bfd *output_bfd, /* Get some memory and swap out the reloc. */ external_reloc_size = ecoff_backend (output_bfd)->external_reloc_size; - rbuf = bfd_malloc (external_reloc_size); + rbuf = (bfd_byte *) bfd_malloc (external_reloc_size); if (rbuf == NULL) return FALSE; diff --git a/cegcc/src/binutils/bfd/ecofflink.c b/cegcc/src/binutils/bfd/ecofflink.c index 072c97a64..25b67fab2 100644 --- a/cegcc/src/binutils/bfd/ecofflink.c +++ b/cegcc/src/binutils/bfd/ecofflink.c @@ -1,6 +1,6 @@ /* Routines to link ECOFF debugging information. Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support, . This file is part of BFD, the Binary File Descriptor library. @@ -1084,8 +1084,8 @@ ecoff_add_string (ainfo, info, debug, fdr, string) len = strlen (string); if (info->relocatable) { - if (!add_memory_shuffle (ainfo, &ainfo->ss, &ainfo->ss_end, (PTR) string, - len + 1)) + if (!add_memory_shuffle (ainfo, &ainfo->ss, &ainfo->ss_end, + (bfd_byte *) string, len + 1)) return -1; ret = symhdr->issMax; symhdr->issMax += len + 1; @@ -1207,7 +1207,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug, } (*swap_sym_out) (output_bfd, &internal_sym, external_sym); add_memory_shuffle (ainfo, &ainfo->sym, &ainfo->sym_end, - external_sym, + (bfd_byte *) external_sym, (unsigned long) output_swap->external_sym_size); ++fdr.csym; ++output_symhdr->isymMax; @@ -1228,7 +1228,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug, } (*output_swap->swap_fdr_out) (output_bfd, &fdr, external_fdr); add_memory_shuffle (ainfo, &ainfo->fdr, &ainfo->fdr_end, - external_fdr, + (bfd_byte *) external_fdr, (unsigned long) output_swap->external_fdr_size); ++output_symhdr->ifdMax; @@ -1338,8 +1338,8 @@ bfd_ecoff_debug_one_external (abfd, debug, swap, name, esym) - (char *) debug->external_ext) < (symhdr->iextMax + 1) * external_ext_size) { - char *external_ext = debug->external_ext; - char *external_ext_end = debug->external_ext_end; + char *external_ext = (char *) debug->external_ext; + char *external_ext_end = (char *) debug->external_ext_end; if (! ecoff_add_bytes ((char **) &external_ext, (char **) &external_ext_end, (symhdr->iextMax + 1) * (size_t) external_ext_size)) @@ -1503,7 +1503,7 @@ ecoff_write_symhdr (abfd, debug, swap, where) SET (cbExtOffset, iextMax, swap->external_ext_size); #undef SET - buff = (PTR) bfd_malloc (swap->external_hdr_size); + buff = (char *) bfd_malloc (swap->external_hdr_size); if (buff == NULL && swap->external_hdr_size != 0) goto error_return; diff --git a/cegcc/src/binutils/bfd/elf-attrs.c b/cegcc/src/binutils/bfd/elf-attrs.c index 568bd7cb0..c34297ccd 100644 --- a/cegcc/src/binutils/bfd/elf-attrs.c +++ b/cegcc/src/binutils/bfd/elf-attrs.c @@ -1,5 +1,5 @@ /* ELF attributes support (based on ARM EABI attributes). - Copyright 2005, 2006, 2007 + Copyright 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -307,10 +307,10 @@ _bfd_elf_attr_strdup (bfd *abfd, const char * s) { char * p; int len; - + len = strlen (s) + 1; p = (char *) bfd_alloc (abfd, len); - return memcpy (p, s, len); + return (char *) memcpy (p, s, len); } /* Add a string object attribute. */ @@ -428,7 +428,7 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr) bfd_vma len; const char *std_section; - contents = bfd_malloc (hdr->sh_size); + contents = (bfd_byte *) bfd_malloc (hdr->sh_size); if (!contents) return; if (!bfd_get_section_contents (abfd, hdr->bfd_section, contents, 0, @@ -564,7 +564,7 @@ _bfd_elf_merge_object_attributes (bfd *ibfd, bfd *obfd) if (in_attr->i > 0 && strcmp (in_attr->s, "gnu") != 0) { _bfd_error_handler - (_("ERROR: %B: Must be processed by '%s' toolchain"), + (_("error: %B: Must be processed by '%s' toolchain"), ibfd, in_attr->s); return FALSE; } @@ -572,7 +572,7 @@ _bfd_elf_merge_object_attributes (bfd *ibfd, bfd *obfd) if (in_attr->i != out_attr->i || (in_attr->i != 0 && strcmp (in_attr->s, out_attr->s) != 0)) { - _bfd_error_handler (_("ERROR: %B: Object tag '%d, %s' is " + _bfd_error_handler (_("error: %B: Object tag '%d, %s' is " "incompatible with tag '%d, %s'"), ibfd, in_attr->i, in_attr->s ? in_attr->s : "", diff --git a/cegcc/src/binutils/bfd/elf-bfd.h b/cegcc/src/binutils/bfd/elf-bfd.h index 7b8fa69ce..7cc420c7a 100644 --- a/cegcc/src/binutils/bfd/elf-bfd.h +++ b/cegcc/src/binutils/bfd/elf-bfd.h @@ -31,8 +31,11 @@ /* The number of entries in a section is its size divided by the size of a single entry. This is normally only applicable to reloc and - symbol table sections. */ -#define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_size / (shdr)->sh_entsize) + symbol table sections. + PR 9934: It is possible to have relocations that do not refer to + symbols, thus it is also possible to have a relocation section in + an object file, but no symbol table. */ +#define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_entsize > 0 ? (shdr)->sh_size / (shdr)->sh_entsize : 0) /* If size isn't specified as 64 or 32, NAME macro should fail. */ #ifndef NAME @@ -82,6 +85,27 @@ struct elf_strtab_hash; struct got_entry; struct plt_entry; +union gotplt_union + { + bfd_signed_vma refcount; + bfd_vma offset; + struct got_entry *glist; + struct plt_entry *plist; + }; + +struct elf_link_virtual_table_entry + { + /* Virtual table entry use information. This array is nominally of size + size/sizeof(target_void_pointer), though we have to be able to assume + and track a size while the symbol is still undefined. It is indexed + via offset/sizeof(target_void_pointer). */ + size_t size; + bfd_boolean *used; + + /* Virtual table derivation info. */ + struct elf_link_hash_entry *parent; + }; + /* ELF linker hash table entries. */ struct elf_link_hash_entry @@ -115,13 +139,7 @@ struct elf_link_hash_entry require a global offset table entry. The second scheme allows multiple GOT entries per symbol, managed via a linked list pointed to by GLIST. */ - union gotplt_union - { - bfd_signed_vma refcount; - bfd_vma offset; - struct got_entry *glist; - struct plt_entry *plist; - } got; + union gotplt_union got; /* Same, but tracks a procedure linkage table entry. */ union gotplt_union plt; @@ -135,7 +153,8 @@ struct elf_link_hash_entry /* Symbol st_other value, symbol visibility. */ unsigned int other : 8; - /* Symbol is referenced by a non-shared object. */ + /* Symbol is referenced by a non-shared object (other than the object + in which it is defined). */ unsigned int ref_regular : 1; /* Symbol is defined by a non-shared object. */ unsigned int def_regular : 1; @@ -143,7 +162,8 @@ struct elf_link_hash_entry unsigned int ref_dynamic : 1; /* Symbol is defined by a shared object. */ unsigned int def_dynamic : 1; - /* Symbol has a non-weak reference from a non-shared object. */ + /* Symbol has a non-weak reference from a non-shared object (other than + the object in which it is defined). */ unsigned int ref_regular_nonweak : 1; /* Dynamic symbol has been adjustd. */ unsigned int dynamic_adjusted : 1; @@ -173,6 +193,8 @@ struct elf_link_hash_entry /* Symbol is referenced with a relocation where C/C++ pointer equality matters. */ unsigned int pointer_equality_needed : 1; + /* Symbol is a unique global symbol. */ + unsigned int unique_global : 1; /* String table index in .dynstr if this is a dynamic symbol. */ unsigned long dynstr_index; @@ -203,18 +225,7 @@ struct elf_link_hash_entry struct bfd_elf_version_tree *vertree; } verinfo; - struct - { - /* Virtual table entry use information. This array is nominally of size - size/sizeof(target_void_pointer), though we have to be able to assume - and track a size while the symbol is still undefined. It is indexed - via offset/sizeof(target_void_pointer). */ - size_t size; - bfd_boolean *used; - - /* Virtual table derivation info. */ - struct elf_link_hash_entry *parent; - } *vtable; + struct elf_link_virtual_table_entry *vtable; }; /* Will references to this symbol always reference the symbol @@ -294,6 +305,10 @@ struct eh_cie_fde asection *sec; } u; + /* The offset of the personality data from the start of the CIE, + or 0 if the CIE doesn't have any. */ + unsigned int personality_offset : 8; + /* True if we have marked relocations associated with this CIE. */ unsigned int gc_mark : 1; @@ -301,8 +316,13 @@ struct eh_cie_fde a PC-relative one. */ unsigned int make_lsda_relative : 1; - /* True if the CIE contains personality data and if that data - uses a PC-relative encoding. */ + /* True if we have decided to turn an absolute personality + encoding into a PC-relative one. */ + unsigned int make_per_encoding_relative : 1; + + /* True if the CIE contains personality data and if that + data uses a PC-relative encoding. Always true when + make_per_encoding_relative is. */ unsigned int per_encoding_relative : 1; /* True if we need to add an 'R' (FDE encoding) entry to the @@ -311,6 +331,9 @@ struct eh_cie_fde /* True if we have merged this CIE with another. */ unsigned int merged : 1; + + /* Unused bits. */ + unsigned int pad1 : 18; } cie; } u; unsigned int reloc_index; @@ -454,6 +477,17 @@ struct elf_link_hash_table /* A linked list of BFD's loaded in the link. */ struct elf_link_loaded_list *loaded; + + /* Short-cuts to get to dynamic linker sections. */ + asection *sgot; + asection *sgotplt; + asection *srelgot; + asection *splt; + asection *srelplt; + asection *igotplt; + asection *iplt; + asection *irelplt; + asection *irelifunc; }; /* Look up an entry in an ELF linker hash table. */ @@ -479,14 +513,14 @@ struct elf_link_hash_table #define is_elf_hash_table(htab) \ (((struct bfd_link_hash_table *) (htab))->type == bfd_link_elf_hash_table) -/* Used by bfd_section_from_r_symndx to cache a small number of local - symbol to section mappings. */ +/* Used by bfd_sym_from_r_symndx to cache a small number of local + symbols. */ #define LOCAL_SYM_CACHE_SIZE 32 -struct sym_sec_cache +struct sym_cache { bfd *abfd; unsigned long indx[LOCAL_SYM_CACHE_SIZE]; - unsigned int shndx[LOCAL_SYM_CACHE_SIZE]; + Elf_Internal_Sym sym[LOCAL_SYM_CACHE_SIZE]; }; /* Constant information held for an ELF backend. */ @@ -742,8 +776,10 @@ struct elf_backend_data const char **name, flagword *flags, asection **sec, bfd_vma *value); /* If this field is not NULL, it is called by the elf_link_output_sym - phase of a link for each symbol which will appear in the object file. */ - bfd_boolean (*elf_backend_link_output_symbol_hook) + phase of a link for each symbol which will appear in the object file. + On error, this function returns 0. 1 is returned when the symbol + should be output, 2 is returned when the symbol should be discarded. */ + int (*elf_backend_link_output_symbol_hook) (struct bfd_link_info *info, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *); @@ -1467,6 +1503,10 @@ struct elf_obj_tdata one. */ const char *dt_name; + /* The linker emulation needs to know what audit libs + are used by a dynamic object. */ + const char *dt_audit; + /* Records the result of `get_program_header_size'. */ bfd_size_type program_header_size; @@ -1556,6 +1596,11 @@ struct elf_obj_tdata bfd_size_type build_id_size; bfd_byte *build_id; + /* True if the bfd contains symbols that have the STT_GNU_IFUNC + symbol type. Used to set the osabi field in the ELF header + structure. */ + bfd_boolean has_ifunc_symbols; + /* An identifier used to distinguish different target specific extensions to this structure. */ enum elf_object_id object_id; @@ -1591,6 +1636,7 @@ struct elf_obj_tdata #define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got.offsets) #define elf_local_got_ents(bfd) (elf_tdata(bfd) -> local_got.ents) #define elf_dt_name(bfd) (elf_tdata(bfd) -> dt_name) +#define elf_dt_audit(bfd) (elf_tdata(bfd) -> dt_audit) #define elf_dyn_lib_class(bfd) (elf_tdata(bfd) -> dyn_lib_class) #define elf_bad_symtab(bfd) (elf_tdata(bfd) -> bad_symtab) #define elf_flags_init(bfd) (elf_tdata(bfd) -> flags_init) @@ -1786,8 +1832,8 @@ extern bfd_boolean bfd_section_from_phdr extern int _bfd_elf_symbol_from_bfd_symbol (bfd *, asymbol **); -extern asection *bfd_section_from_r_symndx - (bfd *, struct sym_sec_cache *, asection *, unsigned long); +extern Elf_Internal_Sym *bfd_sym_from_r_symndx + (struct sym_cache *, bfd *, unsigned long); extern asection *bfd_section_from_elf_index (bfd *, unsigned int); extern struct bfd_strtab_hash *_bfd_elf_stringtab_init @@ -2083,6 +2129,8 @@ extern bfd_boolean _bfd_elf_map_sections_to_segments extern bfd_boolean _bfd_elf_is_function_type (unsigned int); +extern int bfd_elf_get_default_section_type (flagword); + extern Elf_Internal_Phdr * _bfd_elf_find_segment_containing_section (bfd * abfd, asection * section); @@ -2136,9 +2184,44 @@ extern int _bfd_elf_obj_attrs_arg_type (bfd *, int, int); extern void _bfd_elf_parse_attributes (bfd *, Elf_Internal_Shdr *); extern bfd_boolean _bfd_elf_merge_object_attributes (bfd *, bfd *); +/* The linker may needs to keep track of the number of relocs that it + decides to copy as dynamic relocs in check_relocs for each symbol. + This is so that it can later discard them if they are found to be + unnecessary. We can store the information in a field extending the + regular ELF linker hash table. */ + +struct elf_dyn_relocs +{ + struct elf_dyn_relocs *next; + + /* The input section of the reloc. */ + asection *sec; + + /* Total number of relocs copied for the input section. */ + bfd_size_type count; + + /* Number of pc-relative relocs copied for the input section. */ + bfd_size_type pc_count; +}; + +extern bfd_boolean _bfd_elf_create_ifunc_sections + (bfd *, struct bfd_link_info *); +extern asection * _bfd_elf_create_ifunc_dyn_reloc + (bfd *, struct bfd_link_info *, asection *sec, asection *sreloc, + struct elf_dyn_relocs **); +extern bfd_boolean _bfd_elf_allocate_ifunc_dyn_relocs + (struct bfd_link_info *, struct elf_link_hash_entry *, + struct elf_dyn_relocs **, unsigned int, unsigned int); + /* Large common section. */ extern asection _bfd_elf_large_com_section; +/* Hash for local symbol with the first section id, ID, in the input + file and the local symbol index, SYM. */ +#define ELF_LOCAL_SYMBOL_HASH(ID, SYM) \ + (((((ID) & 0xff) << 24) | (((ID) & 0xff00) << 8)) \ + ^ (SYM) ^ ((ID) >> 16)) + /* This is the condition under which finish_dynamic_symbol will be called. If our finish_dynamic_symbol isn't called, we'll need to do something about initializing any .plt and .got entries in relocate_section. */ diff --git a/cegcc/src/binutils/bfd/elf-eh-frame.c b/cegcc/src/binutils/bfd/elf-eh-frame.c index 3567c2406..5d1def943 100644 --- a/cegcc/src/binutils/bfd/elf-eh-frame.c +++ b/cegcc/src/binutils/bfd/elf-eh-frame.c @@ -1,5 +1,5 @@ /* .eh_frame section optimization. - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Jakub Jelinek . @@ -24,7 +24,7 @@ #include "bfd.h" #include "libbfd.h" #include "elf-bfd.h" -#include "elf/dwarf2.h" +#include "dwarf2.h" #define EH_FRAME_HDR_SIZE 8 @@ -215,8 +215,8 @@ write_value (bfd *abfd, bfd_byte *buf, bfd_vma value, int width) static int cie_eq (const void *e1, const void *e2) { - const struct cie *c1 = e1; - const struct cie *c2 = e2; + const struct cie *c1 = (const struct cie *) e1; + const struct cie *c2 = (const struct cie *) e2; if (c1->hash == c2->hash && c1->length == c2->length @@ -246,7 +246,7 @@ cie_eq (const void *e1, const void *e2) static hashval_t cie_hash (const void *e) { - const struct cie *c = e; + const struct cie *c = (const struct cie *) e; return c->hash; } @@ -423,6 +423,28 @@ skip_non_nops (bfd_byte *buf, bfd_byte *end, unsigned int encoded_ptr_width, return last; } +/* Convert absolute encoding ENCODING into PC-relative form. + SIZE is the size of a pointer. */ + +static unsigned char +make_pc_relative (unsigned char encoding, unsigned int ptr_size) +{ + if ((encoding & 0x7f) == DW_EH_PE_absptr) + switch (ptr_size) + { + case 2: + encoding |= DW_EH_PE_sdata2; + break; + case 4: + encoding |= DW_EH_PE_sdata4; + break; + case 8: + encoding |= DW_EH_PE_sdata8; + break; + } + return encoding | DW_EH_PE_pcrel; +} + /* Called before calling _bfd_elf_parse_eh_frame on every input bfd's .eh_frame section. */ @@ -529,26 +551,30 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, REQUIRE (skip_bytes (&buf, end, hdr_length - 4)); } - sec_info = bfd_zmalloc (sizeof (struct eh_frame_sec_info) - + (num_entries - 1) * sizeof (struct eh_cie_fde)); + sec_info = (struct eh_frame_sec_info *) + bfd_zmalloc (sizeof (struct eh_frame_sec_info) + + (num_entries - 1) * sizeof (struct eh_cie_fde)); REQUIRE (sec_info); /* We need to have a "struct cie" for each CIE in this section. */ - local_cies = bfd_zmalloc (num_cies * sizeof (*local_cies)); + local_cies = (struct cie *) bfd_zmalloc (num_cies * sizeof (*local_cies)); REQUIRE (local_cies); + /* FIXME: octets_per_byte. */ #define ENSURE_NO_RELOCS(buf) \ REQUIRE (!(cookie->rel < cookie->relend \ && (cookie->rel->r_offset \ < (bfd_size_type) ((buf) - ehbuf)) \ && cookie->rel->r_info != 0)) + /* FIXME: octets_per_byte. */ #define SKIP_RELOCS(buf) \ while (cookie->rel < cookie->relend \ && (cookie->rel->r_offset \ < (bfd_size_type) ((buf) - ehbuf))) \ cookie->rel++ + /* FIXME: octets_per_byte. */ #define GET_RELOC(buf) \ ((cookie->rel < cookie->relend \ && (cookie->rel->r_offset \ @@ -671,11 +697,12 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, per_width = get_DW_EH_PE_width (cie->per_encoding, ptr_size); REQUIRE (per_width); - if ((cie->per_encoding & 0xf0) == DW_EH_PE_aligned) + if ((cie->per_encoding & 0x70) == DW_EH_PE_aligned) { length = -(buf - ehbuf) & (per_width - 1); REQUIRE (skip_bytes (&buf, end, length)); } + this_inf->u.cie.personality_offset = buf - start; ENSURE_NO_RELOCS (buf); /* Ensure we have a reloc here. */ REQUIRE (GET_RELOC (buf)); @@ -701,27 +728,23 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, ->elf_backend_can_make_relative_eh_frame (abfd, info, sec))) { - if ((cie->fde_encoding & 0xf0) == DW_EH_PE_absptr) + if ((cie->fde_encoding & 0x70) == DW_EH_PE_absptr) this_inf->make_relative = 1; /* If the CIE doesn't already have an 'R' entry, it's fairly easy to add one, provided that there's no aligned data after the augmentation string. */ else if (cie->fde_encoding == DW_EH_PE_omit - && (cie->per_encoding & 0xf0) != DW_EH_PE_aligned) + && (cie->per_encoding & 0x70) != DW_EH_PE_aligned) { if (*cie->augmentation == 0) this_inf->add_augmentation_size = 1; this_inf->u.cie.add_fde_encoding = 1; this_inf->make_relative = 1; } - } - if (info->shared - && (get_elf_backend_data (abfd) - ->elf_backend_can_make_lsda_relative_eh_frame - (abfd, info, sec)) - && (cie->lsda_encoding & 0xf0) == DW_EH_PE_absptr) - cie->can_make_lsda_relative = 1; + if ((cie->lsda_encoding & 0x70) == DW_EH_PE_absptr) + cie->can_make_lsda_relative = 1; + } /* If FDE encoding was not specified, it defaults to DW_EH_absptr. */ @@ -839,14 +862,14 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, cie->length -= end - insns_end; } if (set_loc_count - && ((cie->fde_encoding & 0xf0) == DW_EH_PE_pcrel + && ((cie->fde_encoding & 0x70) == DW_EH_PE_pcrel || this_inf->make_relative)) { unsigned int cnt; bfd_byte *p; - this_inf->set_loc = bfd_malloc ((set_loc_count + 1) - * sizeof (unsigned int)); + this_inf->set_loc = (unsigned int *) + bfd_malloc ((set_loc_count + 1) * sizeof (unsigned int)); REQUIRE (this_inf->set_loc); this_inf->set_loc[0] = set_loc_count; p = insns; @@ -911,6 +934,7 @@ mark_entry (struct bfd_link_info *info, asection *sec, struct eh_cie_fde *ent, elf_gc_mark_hook_fn gc_mark_hook, struct elf_reloc_cookie *cookie) { + /* FIXME: octets_per_byte. */ for (cookie->rel = cookie->rels + ent->reloc_index; cookie->rel < cookie->relend && cookie->rel->r_offset < ent->offset + ent->size; @@ -958,7 +982,7 @@ _bfd_elf_gc_mark_fdes (struct bfd_link_info *info, asection *sec, relocations in REL. */ static struct eh_cie_fde * -find_merged_cie (bfd *abfd, asection *sec, +find_merged_cie (bfd *abfd, struct bfd_link_info *info, asection *sec, struct eh_frame_hdr_info *hdr_info, struct elf_reloc_cookie *cookie, struct eh_cie_fde *cie_inf) @@ -988,6 +1012,8 @@ find_merged_cie (bfd *abfd, asection *sec, if (cie->per_encoding != DW_EH_PE_omit) { + bfd_boolean per_binds_local; + /* Work out the address of personality routine, either as an absolute value or as a symbol. */ rel = cookie->rels + cie->personality.reloc_index; @@ -1011,6 +1037,7 @@ find_merged_cie (bfd *abfd, asection *sec, h = (struct elf_link_hash_entry *) h->root.u.i.link; cie->personality.h = h; + per_binds_local = SYMBOL_REFERENCES_LOCAL (info, h); } else { @@ -1031,6 +1058,17 @@ find_merged_cie (bfd *abfd, asection *sec, cie->personality.val = (sym->st_value + sym_sec->output_offset + sym_sec->output_section->vma); + per_binds_local = TRUE; + } + + if (per_binds_local + && info->shared + && (cie->per_encoding & 0x70) == DW_EH_PE_absptr + && (get_elf_backend_data (abfd) + ->elf_backend_can_make_relative_eh_frame (abfd, info, sec))) + { + cie_inf->u.cie.make_per_encoding_relative = 1; + cie_inf->u.cie.per_encoding_relative = 1; } } @@ -1051,7 +1089,7 @@ find_merged_cie (bfd *abfd, asection *sec, if (new_cie == NULL) { /* Keep CIE_INF and record it in the hash table. */ - new_cie = malloc (sizeof (struct cie)); + new_cie = (struct cie *) malloc (sizeof (struct cie)); if (new_cie == NULL) return cie_inf; @@ -1099,14 +1137,15 @@ _bfd_elf_discard_section_eh_frame else if (!ent->cie) { cookie->rel = cookie->rels + ent->reloc_index; + /* FIXME: octets_per_byte. */ BFD_ASSERT (cookie->rel < cookie->relend && cookie->rel->r_offset == ent->offset + 8); if (!(*reloc_symbol_deleted_p) (ent->offset + 8, cookie)) { if (info->shared - && (((ent->fde_encoding & 0xf0) == DW_EH_PE_absptr + && (((ent->fde_encoding & 0x70) == DW_EH_PE_absptr && ent->make_relative == 0) - || (ent->fde_encoding & 0xf0) == DW_EH_PE_aligned)) + || (ent->fde_encoding & 0x70) == DW_EH_PE_aligned)) { /* If a shared library uses absolute pointers which we cannot turn into PC relative, @@ -1119,8 +1158,8 @@ _bfd_elf_discard_section_eh_frame } ent->removed = 0; hdr_info->fde_count++; - ent->u.fde.cie_inf = find_merged_cie (abfd, sec, hdr_info, cookie, - ent->u.fde.cie_inf); + ent->u.fde.cie_inf = find_merged_cie (abfd, info, sec, hdr_info, + cookie, ent->u.fde.cie_inf); } } @@ -1241,7 +1280,7 @@ _bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME) return offset; - sec_info = elf_section_data (sec)->sec_info; + sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info; if (offset >= sec->rawsize) return offset - sec->rawsize + sec->size; @@ -1270,6 +1309,14 @@ _bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, if (sec_info->entry[mid].removed) return (bfd_vma) -1; + /* If converting personality pointers to DW_EH_PE_pcrel, there will be + no need for run-time relocation against the personality field. */ + if (sec_info->entry[mid].cie + && sec_info->entry[mid].u.cie.make_per_encoding_relative + && offset == (sec_info->entry[mid].offset + 8 + + sec_info->entry[mid].u.cie.personality_offset)) + return (bfd_vma) -2; + /* If converting to DW_EH_PE_pcrel, there will be no need for run-time relocation against FDE's initial_location field. */ if (!sec_info->entry[mid].cie @@ -1323,6 +1370,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, struct eh_cie_fde *ent; if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME) + /* FIXME: octets_per_byte. */ return bfd_set_section_contents (abfd, sec->output_section, contents, sec->output_offset, sec->size); @@ -1330,13 +1378,13 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, ->elf_backend_eh_frame_address_size (abfd, sec)); BFD_ASSERT (ptr_size != 0); - sec_info = elf_section_data (sec)->sec_info; + sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info; htab = elf_hash_table (info); hdr_info = &htab->eh_info; if (hdr_info->table && hdr_info->array == NULL) - hdr_info->array - = bfd_malloc (hdr_info->fde_count * sizeof(*hdr_info->array)); + hdr_info->array = (struct eh_frame_array_ent *) + bfd_malloc (hdr_info->fde_count * sizeof(*hdr_info->array)); if (hdr_info->array == NULL) hdr_info = NULL; @@ -1428,7 +1476,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, { BFD_ASSERT (action & 1); *aug++ = 'R'; - *buf++ = DW_EH_PE_pcrel; + *buf++ = make_pc_relative (DW_EH_PE_absptr, ptr_size); action &= ~1; } @@ -1439,18 +1487,20 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, if (action & 2) { BFD_ASSERT (*buf == ent->lsda_encoding); - *buf |= DW_EH_PE_pcrel; + *buf = make_pc_relative (*buf, ptr_size); action &= ~2; } buf++; break; case 'P': + if (ent->u.cie.make_per_encoding_relative) + *buf = make_pc_relative (*buf, ptr_size); per_encoding = *buf++; per_width = get_DW_EH_PE_width (per_encoding, ptr_size); BFD_ASSERT (per_width != 0); BFD_ASSERT (((per_encoding & 0x70) == DW_EH_PE_pcrel) == ent->u.cie.per_encoding_relative); - if ((per_encoding & 0xf0) == DW_EH_PE_aligned) + if ((per_encoding & 0x70) == DW_EH_PE_aligned) buf = (contents + ((buf - contents + per_width - 1) & ~((bfd_size_type) per_width - 1))); @@ -1460,8 +1510,15 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, val = read_value (abfd, buf, per_width, get_DW_EH_PE_signed (per_encoding)); - val += (bfd_vma) ent->offset - ent->new_offset; - val -= extra_string + extra_data; + if (ent->u.cie.make_per_encoding_relative) + val -= (sec->output_section->vma + + sec->output_offset + + (buf - contents)); + else + { + val += (bfd_vma) ent->offset - ent->new_offset; + val -= extra_string + extra_data; + } write_value (abfd, buf, val, per_width); action &= ~4; } @@ -1471,7 +1528,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, if (action & 1) { BFD_ASSERT (*buf == ent->fde_encoding); - *buf |= DW_EH_PE_pcrel; + *buf = make_pc_relative (*buf, ptr_size); action &= ~1; } buf++; @@ -1504,9 +1561,8 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, address = value; if (value) { - switch (ent->fde_encoding & 0xf0) + switch (ent->fde_encoding & 0x70) { - case DW_EH_PE_indirect: case DW_EH_PE_textrel: BFD_ASSERT (hdr_info == NULL); break; @@ -1543,7 +1599,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, + ent->new_offset); } - if ((ent->lsda_encoding & 0xf0) == DW_EH_PE_pcrel + if ((ent->lsda_encoding & 0x70) == DW_EH_PE_pcrel || cie->u.cie.make_lsda_relative) { buf += ent->lsda_offset; @@ -1552,7 +1608,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, get_DW_EH_PE_signed (ent->lsda_encoding)); if (value) { - if ((ent->lsda_encoding & 0xf0) == DW_EH_PE_pcrel) + if ((ent->lsda_encoding & 0x70) == DW_EH_PE_pcrel) value += (bfd_vma) ent->offset - ent->new_offset; else if (cie->u.cie.make_lsda_relative) value -= (sec->output_section->vma @@ -1591,7 +1647,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, if (!value) continue; - if ((ent->fde_encoding & 0xf0) == DW_EH_PE_pcrel) + if ((ent->fde_encoding & 0x70) == DW_EH_PE_pcrel) value += (bfd_vma) ent->offset + 8 - new_offset; if (ent->make_relative) value -= (sec->output_section->vma @@ -1611,6 +1667,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, if ((sec->size % ptr_size) != 0) abort (); + /* FIXME: octets_per_byte. */ return bfd_set_section_contents (abfd, sec->output_section, contents, (file_ptr) sec->output_offset, sec->size); @@ -1622,8 +1679,8 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, static int vma_compare (const void *a, const void *b) { - const struct eh_frame_array_ent *p = a; - const struct eh_frame_array_ent *q = b; + const struct eh_frame_array_ent *p = (const struct eh_frame_array_ent *) a; + const struct eh_frame_array_ent *q = (const struct eh_frame_array_ent *) b; if (p->initial_loc > q->initial_loc) return 1; if (p->initial_loc < q->initial_loc) @@ -1674,7 +1731,7 @@ _bfd_elf_write_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) size = EH_FRAME_HDR_SIZE; if (hdr_info->array && hdr_info->array_count == hdr_info->fde_count) size += 4 + hdr_info->fde_count * 8; - contents = bfd_malloc (size); + contents = (bfd_byte *) bfd_malloc (size); if (contents == NULL) return FALSE; @@ -1722,6 +1779,7 @@ _bfd_elf_write_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) } } + /* FIXME: octets_per_byte. */ retval = bfd_set_section_contents (abfd, sec->output_section, contents, (file_ptr) sec->output_offset, sec->size); diff --git a/cegcc/src/binutils/bfd/elf-hppa.h b/cegcc/src/binutils/bfd/elf-hppa.h index b371c0e6a..51a9484e0 100644 --- a/cegcc/src/binutils/bfd/elf-hppa.h +++ b/cegcc/src/binutils/bfd/elf-hppa.h @@ -1,5 +1,5 @@ /* Common code for PA ELF implementations. - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1218,1160 +1218,3 @@ elf_hppa_action_discarded (asection *sec) return _bfd_elf_default_action_discarded (sec); } - -#if ARCH_SIZE == 64 -/* Hook called by the linker routine which adds symbols from an object - file. HP's libraries define symbols with HP specific section - indices, which we have to handle. */ - -static bfd_boolean -elf_hppa_add_symbol_hook (bfd *abfd, - struct bfd_link_info *info ATTRIBUTE_UNUSED, - Elf_Internal_Sym *sym, - const char **namep ATTRIBUTE_UNUSED, - flagword *flagsp ATTRIBUTE_UNUSED, - asection **secp, - bfd_vma *valp) -{ - unsigned int index = sym->st_shndx; - - switch (index) - { - case SHN_PARISC_ANSI_COMMON: - *secp = bfd_make_section_old_way (abfd, ".PARISC.ansi.common"); - (*secp)->flags |= SEC_IS_COMMON; - *valp = sym->st_size; - break; - - case SHN_PARISC_HUGE_COMMON: - *secp = bfd_make_section_old_way (abfd, ".PARISC.huge.common"); - (*secp)->flags |= SEC_IS_COMMON; - *valp = sym->st_size; - break; - } - - return TRUE; -} - -static bfd_boolean -elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h, - void *data) -{ - struct bfd_link_info *info = data; - - if (h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - - /* If we are not creating a shared library, and this symbol is - referenced by a shared library but is not defined anywhere, then - the generic code will warn that it is undefined. - - This behavior is undesirable on HPs since the standard shared - libraries contain references to undefined symbols. - - So we twiddle the flags associated with such symbols so that they - will not trigger the warning. ?!? FIXME. This is horribly fragile. - - Ultimately we should have better controls over the generic ELF BFD - linker code. */ - if (! info->relocatable - && info->unresolved_syms_in_shared_libs != RM_IGNORE - && h->root.type == bfd_link_hash_undefined - && h->ref_dynamic - && !h->ref_regular) - { - h->ref_dynamic = 0; - h->pointer_equality_needed = 1; - } - - return TRUE; -} - -static bfd_boolean -elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h, - void *data) -{ - struct bfd_link_info *info = data; - - if (h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - - /* If we are not creating a shared library, and this symbol is - referenced by a shared library but is not defined anywhere, then - the generic code will warn that it is undefined. - - This behavior is undesirable on HPs since the standard shared - libraries contain references to undefined symbols. - - So we twiddle the flags associated with such symbols so that they - will not trigger the warning. ?!? FIXME. This is horribly fragile. - - Ultimately we should have better controls over the generic ELF BFD - linker code. */ - if (! info->relocatable - && info->unresolved_syms_in_shared_libs != RM_IGNORE - && h->root.type == bfd_link_hash_undefined - && !h->ref_dynamic - && !h->ref_regular - && h->pointer_equality_needed) - { - h->ref_dynamic = 1; - h->pointer_equality_needed = 0; - } - - return TRUE; -} - -static bfd_boolean -elf_hppa_is_dynamic_loader_symbol (const char *name) -{ - return (! strcmp (name, "__CPU_REVISION") - || ! strcmp (name, "__CPU_KEYBITS_1") - || ! strcmp (name, "__SYSTEM_ID_D") - || ! strcmp (name, "__FPU_MODEL") - || ! strcmp (name, "__FPU_REVISION") - || ! strcmp (name, "__ARGC") - || ! strcmp (name, "__ARGV") - || ! strcmp (name, "__ENVP") - || ! strcmp (name, "__TLS_SIZE_D") - || ! strcmp (name, "__LOAD_INFO") - || ! strcmp (name, "__systab")); -} - -/* Record the lowest address for the data and text segments. */ -static void -elf_hppa_record_segment_addrs (bfd *abfd, - asection *section, - void *data) -{ - struct elf64_hppa_link_hash_table *hppa_info = data; - - if ((section->flags & (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD)) - { - bfd_vma value; - Elf_Internal_Phdr *p; - - p = _bfd_elf_find_segment_containing_section (abfd, section->output_section); - BFD_ASSERT (p != NULL); - value = p->p_vaddr; - - if (section->flags & SEC_READONLY) - { - if (value < hppa_info->text_segment_base) - hppa_info->text_segment_base = value; - } - else - { - if (value < hppa_info->data_segment_base) - hppa_info->data_segment_base = value; - } - } -} - -/* Called after we have seen all the input files/sections, but before - final symbol resolution and section placement has been determined. - - We use this hook to (possibly) provide a value for __gp, then we - fall back to the generic ELF final link routine. */ - -static bfd_boolean -elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info) -{ - bfd_boolean retval; - struct elf64_hppa_link_hash_table *hppa_info = elf64_hppa_hash_table (info); - - if (! info->relocatable) - { - struct elf_link_hash_entry *gp; - bfd_vma gp_val; - - /* The linker script defines a value for __gp iff it was referenced - by one of the objects being linked. First try to find the symbol - in the hash table. If that fails, just compute the value __gp - should have had. */ - gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", FALSE, - FALSE, FALSE); - - if (gp) - { - - /* Adjust the value of __gp as we may want to slide it into the - .plt section so that the stubs can access PLT entries without - using an addil sequence. */ - gp->root.u.def.value += hppa_info->gp_offset; - - gp_val = (gp->root.u.def.section->output_section->vma - + gp->root.u.def.section->output_offset - + gp->root.u.def.value); - } - else - { - asection *sec; - - /* First look for a .plt section. If found, then __gp is the - address of the .plt + gp_offset. - - If no .plt is found, then look for .dlt, .opd and .data (in - that order) and set __gp to the base address of whichever - section is found first. */ - - sec = hppa_info->plt_sec; - if (sec && ! (sec->flags & SEC_EXCLUDE)) - gp_val = (sec->output_offset - + sec->output_section->vma - + hppa_info->gp_offset); - else - { - sec = hppa_info->dlt_sec; - if (!sec || (sec->flags & SEC_EXCLUDE)) - sec = hppa_info->opd_sec; - if (!sec || (sec->flags & SEC_EXCLUDE)) - sec = bfd_get_section_by_name (abfd, ".data"); - if (!sec || (sec->flags & SEC_EXCLUDE)) - gp_val = 0; - else - gp_val = sec->output_offset + sec->output_section->vma; - } - } - - /* Install whatever value we found/computed for __gp. */ - _bfd_set_gp_value (abfd, gp_val); - } - - /* We need to know the base of the text and data segments so that we - can perform SEGREL relocations. We will record the base addresses - when we encounter the first SEGREL relocation. */ - hppa_info->text_segment_base = (bfd_vma)-1; - hppa_info->data_segment_base = (bfd_vma)-1; - - /* HP's shared libraries have references to symbols that are not - defined anywhere. The generic ELF BFD linker code will complain - about such symbols. - - So we detect the losing case and arrange for the flags on the symbol - to indicate that it was never referenced. This keeps the generic - ELF BFD link code happy and appears to not create any secondary - problems. Ultimately we need a way to control the behavior of the - generic ELF BFD link code better. */ - elf_link_hash_traverse (elf_hash_table (info), - elf_hppa_unmark_useless_dynamic_symbols, - info); - - /* Invoke the regular ELF backend linker to do all the work. */ - retval = bfd_elf_final_link (abfd, info); - - elf_link_hash_traverse (elf_hash_table (info), - elf_hppa_remark_useless_dynamic_symbols, - info); - - /* If we're producing a final executable, sort the contents of the - unwind section. */ - if (retval) - retval = elf_hppa_sort_unwind (abfd); - - return retval; -} - -/* Relocate the given INSN. VALUE should be the actual value we want - to insert into the instruction, ie by this point we should not be - concerned with computing an offset relative to the DLT, PC, etc. - Instead this routine is meant to handle the bit manipulations needed - to insert the relocation into the given instruction. */ - -static int -elf_hppa_relocate_insn (int insn, int sym_value, unsigned int r_type) -{ - switch (r_type) - { - /* This is any 22 bit branch. In PA2.0 syntax it corresponds to - the "B" instruction. */ - case R_PARISC_PCREL22F: - case R_PARISC_PCREL22C: - return (insn & ~0x3ff1ffd) | re_assemble_22 (sym_value); - - /* This is any 12 bit branch. */ - case R_PARISC_PCREL12F: - return (insn & ~0x1ffd) | re_assemble_12 (sym_value); - - /* This is any 17 bit branch. In PA2.0 syntax it also corresponds - to the "B" instruction as well as BE. */ - case R_PARISC_PCREL17F: - case R_PARISC_DIR17F: - case R_PARISC_DIR17R: - case R_PARISC_PCREL17C: - case R_PARISC_PCREL17R: - return (insn & ~0x1f1ffd) | re_assemble_17 (sym_value); - - /* ADDIL or LDIL instructions. */ - case R_PARISC_DLTREL21L: - case R_PARISC_DLTIND21L: - case R_PARISC_LTOFF_FPTR21L: - case R_PARISC_PCREL21L: - case R_PARISC_LTOFF_TP21L: - case R_PARISC_DPREL21L: - case R_PARISC_PLTOFF21L: - case R_PARISC_DIR21L: - return (insn & ~0x1fffff) | re_assemble_21 (sym_value); - - /* LDO and integer loads/stores with 14 bit displacements. */ - case R_PARISC_DLTREL14R: - case R_PARISC_DLTREL14F: - case R_PARISC_DLTIND14R: - case R_PARISC_DLTIND14F: - case R_PARISC_LTOFF_FPTR14R: - case R_PARISC_PCREL14R: - case R_PARISC_PCREL14F: - case R_PARISC_LTOFF_TP14R: - case R_PARISC_LTOFF_TP14F: - case R_PARISC_DPREL14R: - case R_PARISC_DPREL14F: - case R_PARISC_PLTOFF14R: - case R_PARISC_PLTOFF14F: - case R_PARISC_DIR14R: - case R_PARISC_DIR14F: - return (insn & ~0x3fff) | low_sign_unext (sym_value, 14); - - /* PA2.0W LDO and integer loads/stores with 16 bit displacements. */ - case R_PARISC_LTOFF_FPTR16F: - case R_PARISC_PCREL16F: - case R_PARISC_LTOFF_TP16F: - case R_PARISC_GPREL16F: - case R_PARISC_PLTOFF16F: - case R_PARISC_DIR16F: - case R_PARISC_LTOFF16F: - return (insn & ~0xffff) | re_assemble_16 (sym_value); - - /* Doubleword loads and stores with a 14 bit displacement. */ - case R_PARISC_DLTREL14DR: - case R_PARISC_DLTIND14DR: - case R_PARISC_LTOFF_FPTR14DR: - case R_PARISC_LTOFF_FPTR16DF: - case R_PARISC_PCREL14DR: - case R_PARISC_PCREL16DF: - case R_PARISC_LTOFF_TP14DR: - case R_PARISC_LTOFF_TP16DF: - case R_PARISC_DPREL14DR: - case R_PARISC_GPREL16DF: - case R_PARISC_PLTOFF14DR: - case R_PARISC_PLTOFF16DF: - case R_PARISC_DIR14DR: - case R_PARISC_DIR16DF: - case R_PARISC_LTOFF16DF: - return (insn & ~0x3ff1) | (((sym_value & 0x2000) >> 13) - | ((sym_value & 0x1ff8) << 1)); - - /* Floating point single word load/store instructions. */ - case R_PARISC_DLTREL14WR: - case R_PARISC_DLTIND14WR: - case R_PARISC_LTOFF_FPTR14WR: - case R_PARISC_LTOFF_FPTR16WF: - case R_PARISC_PCREL14WR: - case R_PARISC_PCREL16WF: - case R_PARISC_LTOFF_TP14WR: - case R_PARISC_LTOFF_TP16WF: - case R_PARISC_DPREL14WR: - case R_PARISC_GPREL16WF: - case R_PARISC_PLTOFF14WR: - case R_PARISC_PLTOFF16WF: - case R_PARISC_DIR16WF: - case R_PARISC_DIR14WR: - case R_PARISC_LTOFF16WF: - return (insn & ~0x3ff9) | (((sym_value & 0x2000) >> 13) - | ((sym_value & 0x1ffc) << 1)); - - default: - return insn; - } -} - -/* Compute the value for a relocation (REL) during a final link stage, - then insert the value into the proper location in CONTENTS. - - VALUE is a tentative value for the relocation and may be overridden - and modified here based on the specific relocation to be performed. - - For example we do conversions for PC-relative branches in this routine - or redirection of calls to external routines to stubs. - - The work of actually applying the relocation is left to a helper - routine in an attempt to reduce the complexity and size of this - function. */ - -static bfd_reloc_status_type -elf_hppa_final_link_relocate (Elf_Internal_Rela *rel, - bfd *input_bfd, - bfd *output_bfd, - asection *input_section, - bfd_byte *contents, - bfd_vma value, - struct bfd_link_info *info, - asection *sym_sec, - struct elf_link_hash_entry *h, - struct elf64_hppa_dyn_hash_entry *dyn_h) -{ - int insn; - bfd_vma max_branch_offset = 0; - bfd_vma offset = rel->r_offset; - bfd_signed_vma addend = rel->r_addend; - reloc_howto_type *howto = elf_hppa_howto_table + ELF_R_TYPE (rel->r_info); - unsigned int r_type = howto->type; - bfd_byte *hit_data = contents + offset; - struct elf64_hppa_link_hash_table *hppa_info = elf64_hppa_hash_table (info); - - insn = bfd_get_32 (input_bfd, hit_data); - - switch (r_type) - { - case R_PARISC_NONE: - break; - - /* Basic function call support. - - Note for a call to a function defined in another dynamic library - we want to redirect the call to a stub. */ - - /* PC relative relocs without an implicit offset. */ - case R_PARISC_PCREL21L: - case R_PARISC_PCREL14R: - case R_PARISC_PCREL14F: - case R_PARISC_PCREL14WR: - case R_PARISC_PCREL14DR: - case R_PARISC_PCREL16F: - case R_PARISC_PCREL16WF: - case R_PARISC_PCREL16DF: - { - /* If this is a call to a function defined in another dynamic - library, then redirect the call to the local stub for this - function. */ - if (sym_sec == NULL || sym_sec->output_section == NULL) - value = (dyn_h->stub_offset + hppa_info->stub_sec->output_offset - + hppa_info->stub_sec->output_section->vma); - - /* Turn VALUE into a proper PC relative address. */ - value -= (offset + input_section->output_offset - + input_section->output_section->vma); - - /* Adjust for any field selectors. */ - if (r_type == R_PARISC_PCREL21L) - value = hppa_field_adjust (value, -8 + addend, e_lsel); - else if (r_type == R_PARISC_PCREL14F - || r_type == R_PARISC_PCREL16F - || r_type == R_PARISC_PCREL16WF - || r_type == R_PARISC_PCREL16DF) - value = hppa_field_adjust (value, -8 + addend, e_fsel); - else - value = hppa_field_adjust (value, -8 + addend, e_rsel); - - /* Apply the relocation to the given instruction. */ - insn = elf_hppa_relocate_insn (insn, (int) value, r_type); - break; - } - - case R_PARISC_PCREL12F: - case R_PARISC_PCREL22F: - case R_PARISC_PCREL17F: - case R_PARISC_PCREL22C: - case R_PARISC_PCREL17C: - case R_PARISC_PCREL17R: - { - /* If this is a call to a function defined in another dynamic - library, then redirect the call to the local stub for this - function. */ - if (sym_sec == NULL || sym_sec->output_section == NULL) - value = (dyn_h->stub_offset + hppa_info->stub_sec->output_offset - + hppa_info->stub_sec->output_section->vma); - - /* Turn VALUE into a proper PC relative address. */ - value -= (offset + input_section->output_offset - + input_section->output_section->vma); - - if (r_type == (unsigned int) R_PARISC_PCREL22F) - max_branch_offset = (1 << (22-1)) << 2; - else if (r_type == (unsigned int) R_PARISC_PCREL17F) - max_branch_offset = (1 << (17-1)) << 2; - else if (r_type == (unsigned int) R_PARISC_PCREL12F) - max_branch_offset = (1 << (12-1)) << 2; - - /* Make sure we can reach the branch target. */ - if (max_branch_offset != 0 - && value + addend + max_branch_offset >= 2*max_branch_offset) - { - (*_bfd_error_handler) - (_("%B(%A+0x%lx): cannot reach %s"), - input_bfd, - input_section, - offset, - h->root.root.string); - bfd_set_error (bfd_error_bad_value); - return bfd_reloc_notsupported; - } - - /* Adjust for any field selectors. */ - if (r_type == R_PARISC_PCREL17R) - value = hppa_field_adjust (value, -8 + addend, e_rsel); - else - value = hppa_field_adjust (value, -8 + addend, e_fsel); - - /* All branches are implicitly shifted by 2 places. */ - value >>= 2; - - /* Apply the relocation to the given instruction. */ - insn = elf_hppa_relocate_insn (insn, (int) value, r_type); - break; - } - - /* Indirect references to data through the DLT. */ - case R_PARISC_DLTIND14R: - case R_PARISC_DLTIND14F: - case R_PARISC_DLTIND14DR: - case R_PARISC_DLTIND14WR: - case R_PARISC_DLTIND21L: - case R_PARISC_LTOFF_FPTR14R: - case R_PARISC_LTOFF_FPTR14DR: - case R_PARISC_LTOFF_FPTR14WR: - case R_PARISC_LTOFF_FPTR21L: - case R_PARISC_LTOFF_FPTR16F: - case R_PARISC_LTOFF_FPTR16WF: - case R_PARISC_LTOFF_FPTR16DF: - case R_PARISC_LTOFF_TP21L: - case R_PARISC_LTOFF_TP14R: - case R_PARISC_LTOFF_TP14F: - case R_PARISC_LTOFF_TP14WR: - case R_PARISC_LTOFF_TP14DR: - case R_PARISC_LTOFF_TP16F: - case R_PARISC_LTOFF_TP16WF: - case R_PARISC_LTOFF_TP16DF: - case R_PARISC_LTOFF16F: - case R_PARISC_LTOFF16WF: - case R_PARISC_LTOFF16DF: - { - /* If this relocation was against a local symbol, then we still - have not set up the DLT entry (it's not convenient to do so - in the "finalize_dlt" routine because it is difficult to get - to the local symbol's value). - - So, if this is a local symbol (h == NULL), then we need to - fill in its DLT entry. - - Similarly we may still need to set up an entry in .opd for - a local function which had its address taken. */ - if (dyn_h->h == NULL) - { - /* Now do .opd creation if needed. */ - if (r_type == R_PARISC_LTOFF_FPTR14R - || r_type == R_PARISC_LTOFF_FPTR14DR - || r_type == R_PARISC_LTOFF_FPTR14WR - || r_type == R_PARISC_LTOFF_FPTR21L - || r_type == R_PARISC_LTOFF_FPTR16F - || r_type == R_PARISC_LTOFF_FPTR16WF - || r_type == R_PARISC_LTOFF_FPTR16DF) - { - /* The first two words of an .opd entry are zero. */ - memset (hppa_info->opd_sec->contents + dyn_h->opd_offset, - 0, 16); - - /* The next word is the address of the function. */ - bfd_put_64 (hppa_info->opd_sec->owner, value + addend, - (hppa_info->opd_sec->contents - + dyn_h->opd_offset + 16)); - - /* The last word is our local __gp value. */ - value = _bfd_get_gp_value - (hppa_info->opd_sec->output_section->owner); - bfd_put_64 (hppa_info->opd_sec->owner, value, - (hppa_info->opd_sec->contents - + dyn_h->opd_offset + 24)); - - /* The DLT value is the address of the .opd entry. */ - value = (dyn_h->opd_offset - + hppa_info->opd_sec->output_offset - + hppa_info->opd_sec->output_section->vma); - addend = 0; - } - - bfd_put_64 (hppa_info->dlt_sec->owner, - value + addend, - hppa_info->dlt_sec->contents + dyn_h->dlt_offset); - } - - /* We want the value of the DLT offset for this symbol, not - the symbol's actual address. Note that __gp may not point - to the start of the DLT, so we have to compute the absolute - address, then subtract out the value of __gp. */ - value = (dyn_h->dlt_offset - + hppa_info->dlt_sec->output_offset - + hppa_info->dlt_sec->output_section->vma); - value -= _bfd_get_gp_value (output_bfd); - - /* All DLTIND relocations are basically the same at this point, - except that we need different field selectors for the 21bit - version vs the 14bit versions. */ - if (r_type == R_PARISC_DLTIND21L - || r_type == R_PARISC_LTOFF_FPTR21L - || r_type == R_PARISC_LTOFF_TP21L) - value = hppa_field_adjust (value, 0, e_lsel); - else if (r_type == R_PARISC_DLTIND14F - || r_type == R_PARISC_LTOFF_FPTR16F - || r_type == R_PARISC_LTOFF_FPTR16WF - || r_type == R_PARISC_LTOFF_FPTR16DF - || r_type == R_PARISC_LTOFF16F - || r_type == R_PARISC_LTOFF16DF - || r_type == R_PARISC_LTOFF16WF - || r_type == R_PARISC_LTOFF_TP16F - || r_type == R_PARISC_LTOFF_TP16WF - || r_type == R_PARISC_LTOFF_TP16DF) - value = hppa_field_adjust (value, 0, e_fsel); - else - value = hppa_field_adjust (value, 0, e_rsel); - - insn = elf_hppa_relocate_insn (insn, (int) value, r_type); - break; - } - - case R_PARISC_DLTREL14R: - case R_PARISC_DLTREL14F: - case R_PARISC_DLTREL14DR: - case R_PARISC_DLTREL14WR: - case R_PARISC_DLTREL21L: - case R_PARISC_DPREL21L: - case R_PARISC_DPREL14WR: - case R_PARISC_DPREL14DR: - case R_PARISC_DPREL14R: - case R_PARISC_DPREL14F: - case R_PARISC_GPREL16F: - case R_PARISC_GPREL16WF: - case R_PARISC_GPREL16DF: - { - /* Subtract out the global pointer value to make value a DLT - relative address. */ - value -= _bfd_get_gp_value (output_bfd); - - /* All DLTREL relocations are basically the same at this point, - except that we need different field selectors for the 21bit - version vs the 14bit versions. */ - if (r_type == R_PARISC_DLTREL21L - || r_type == R_PARISC_DPREL21L) - value = hppa_field_adjust (value, addend, e_lrsel); - else if (r_type == R_PARISC_DLTREL14F - || r_type == R_PARISC_DPREL14F - || r_type == R_PARISC_GPREL16F - || r_type == R_PARISC_GPREL16WF - || r_type == R_PARISC_GPREL16DF) - value = hppa_field_adjust (value, addend, e_fsel); - else - value = hppa_field_adjust (value, addend, e_rrsel); - - insn = elf_hppa_relocate_insn (insn, (int) value, r_type); - break; - } - - case R_PARISC_DIR21L: - case R_PARISC_DIR17R: - case R_PARISC_DIR17F: - case R_PARISC_DIR14R: - case R_PARISC_DIR14F: - case R_PARISC_DIR14WR: - case R_PARISC_DIR14DR: - case R_PARISC_DIR16F: - case R_PARISC_DIR16WF: - case R_PARISC_DIR16DF: - { - /* All DIR relocations are basically the same at this point, - except that branch offsets need to be divided by four, and - we need different field selectors. Note that we don't - redirect absolute calls to local stubs. */ - - if (r_type == R_PARISC_DIR21L) - value = hppa_field_adjust (value, addend, e_lrsel); - else if (r_type == R_PARISC_DIR17F - || r_type == R_PARISC_DIR16F - || r_type == R_PARISC_DIR16WF - || r_type == R_PARISC_DIR16DF - || r_type == R_PARISC_DIR14F) - value = hppa_field_adjust (value, addend, e_fsel); - else - value = hppa_field_adjust (value, addend, e_rrsel); - - if (r_type == R_PARISC_DIR17R || r_type == R_PARISC_DIR17F) - /* All branches are implicitly shifted by 2 places. */ - value >>= 2; - - insn = elf_hppa_relocate_insn (insn, (int) value, r_type); - break; - } - - case R_PARISC_PLTOFF21L: - case R_PARISC_PLTOFF14R: - case R_PARISC_PLTOFF14F: - case R_PARISC_PLTOFF14WR: - case R_PARISC_PLTOFF14DR: - case R_PARISC_PLTOFF16F: - case R_PARISC_PLTOFF16WF: - case R_PARISC_PLTOFF16DF: - { - /* We want the value of the PLT offset for this symbol, not - the symbol's actual address. Note that __gp may not point - to the start of the DLT, so we have to compute the absolute - address, then subtract out the value of __gp. */ - value = (dyn_h->plt_offset - + hppa_info->plt_sec->output_offset - + hppa_info->plt_sec->output_section->vma); - value -= _bfd_get_gp_value (output_bfd); - - /* All PLTOFF relocations are basically the same at this point, - except that we need different field selectors for the 21bit - version vs the 14bit versions. */ - if (r_type == R_PARISC_PLTOFF21L) - value = hppa_field_adjust (value, addend, e_lrsel); - else if (r_type == R_PARISC_PLTOFF14F - || r_type == R_PARISC_PLTOFF16F - || r_type == R_PARISC_PLTOFF16WF - || r_type == R_PARISC_PLTOFF16DF) - value = hppa_field_adjust (value, addend, e_fsel); - else - value = hppa_field_adjust (value, addend, e_rrsel); - - insn = elf_hppa_relocate_insn (insn, (int) value, r_type); - break; - } - - case R_PARISC_LTOFF_FPTR32: - { - /* We may still need to create the FPTR itself if it was for - a local symbol. */ - if (dyn_h->h == NULL) - { - /* The first two words of an .opd entry are zero. */ - memset (hppa_info->opd_sec->contents + dyn_h->opd_offset, 0, 16); - - /* The next word is the address of the function. */ - bfd_put_64 (hppa_info->opd_sec->owner, value + addend, - (hppa_info->opd_sec->contents - + dyn_h->opd_offset + 16)); - - /* The last word is our local __gp value. */ - value = _bfd_get_gp_value - (hppa_info->opd_sec->output_section->owner); - bfd_put_64 (hppa_info->opd_sec->owner, value, - hppa_info->opd_sec->contents + dyn_h->opd_offset + 24); - - /* The DLT value is the address of the .opd entry. */ - value = (dyn_h->opd_offset - + hppa_info->opd_sec->output_offset - + hppa_info->opd_sec->output_section->vma); - - bfd_put_64 (hppa_info->dlt_sec->owner, - value, - hppa_info->dlt_sec->contents + dyn_h->dlt_offset); - } - - /* We want the value of the DLT offset for this symbol, not - the symbol's actual address. Note that __gp may not point - to the start of the DLT, so we have to compute the absolute - address, then subtract out the value of __gp. */ - value = (dyn_h->dlt_offset - + hppa_info->dlt_sec->output_offset - + hppa_info->dlt_sec->output_section->vma); - value -= _bfd_get_gp_value (output_bfd); - bfd_put_32 (input_bfd, value, hit_data); - return bfd_reloc_ok; - } - - case R_PARISC_LTOFF_FPTR64: - case R_PARISC_LTOFF_TP64: - { - /* We may still need to create the FPTR itself if it was for - a local symbol. */ - if (dyn_h->h == NULL && r_type == R_PARISC_LTOFF_FPTR64) - { - /* The first two words of an .opd entry are zero. */ - memset (hppa_info->opd_sec->contents + dyn_h->opd_offset, 0, 16); - - /* The next word is the address of the function. */ - bfd_put_64 (hppa_info->opd_sec->owner, value + addend, - (hppa_info->opd_sec->contents - + dyn_h->opd_offset + 16)); - - /* The last word is our local __gp value. */ - value = _bfd_get_gp_value - (hppa_info->opd_sec->output_section->owner); - bfd_put_64 (hppa_info->opd_sec->owner, value, - hppa_info->opd_sec->contents + dyn_h->opd_offset + 24); - - /* The DLT value is the address of the .opd entry. */ - value = (dyn_h->opd_offset - + hppa_info->opd_sec->output_offset - + hppa_info->opd_sec->output_section->vma); - - bfd_put_64 (hppa_info->dlt_sec->owner, - value, - hppa_info->dlt_sec->contents + dyn_h->dlt_offset); - } - - /* We want the value of the DLT offset for this symbol, not - the symbol's actual address. Note that __gp may not point - to the start of the DLT, so we have to compute the absolute - address, then subtract out the value of __gp. */ - value = (dyn_h->dlt_offset - + hppa_info->dlt_sec->output_offset - + hppa_info->dlt_sec->output_section->vma); - value -= _bfd_get_gp_value (output_bfd); - bfd_put_64 (input_bfd, value, hit_data); - return bfd_reloc_ok; - } - - case R_PARISC_DIR32: - bfd_put_32 (input_bfd, value + addend, hit_data); - return bfd_reloc_ok; - - case R_PARISC_DIR64: - bfd_put_64 (input_bfd, value + addend, hit_data); - return bfd_reloc_ok; - - case R_PARISC_GPREL64: - /* Subtract out the global pointer value to make value a DLT - relative address. */ - value -= _bfd_get_gp_value (output_bfd); - - bfd_put_64 (input_bfd, value + addend, hit_data); - return bfd_reloc_ok; - - case R_PARISC_LTOFF64: - /* We want the value of the DLT offset for this symbol, not - the symbol's actual address. Note that __gp may not point - to the start of the DLT, so we have to compute the absolute - address, then subtract out the value of __gp. */ - value = (dyn_h->dlt_offset - + hppa_info->dlt_sec->output_offset - + hppa_info->dlt_sec->output_section->vma); - value -= _bfd_get_gp_value (output_bfd); - - bfd_put_64 (input_bfd, value + addend, hit_data); - return bfd_reloc_ok; - - case R_PARISC_PCREL32: - { - /* If this is a call to a function defined in another dynamic - library, then redirect the call to the local stub for this - function. */ - if (sym_sec == NULL || sym_sec->output_section == NULL) - value = (dyn_h->stub_offset + hppa_info->stub_sec->output_offset - + hppa_info->stub_sec->output_section->vma); - - /* Turn VALUE into a proper PC relative address. */ - value -= (offset + input_section->output_offset - + input_section->output_section->vma); - - value += addend; - value -= 8; - bfd_put_32 (input_bfd, value, hit_data); - return bfd_reloc_ok; - } - - case R_PARISC_PCREL64: - { - /* If this is a call to a function defined in another dynamic - library, then redirect the call to the local stub for this - function. */ - if (sym_sec == NULL || sym_sec->output_section == NULL) - value = (dyn_h->stub_offset + hppa_info->stub_sec->output_offset - + hppa_info->stub_sec->output_section->vma); - - /* Turn VALUE into a proper PC relative address. */ - value -= (offset + input_section->output_offset - + input_section->output_section->vma); - - value += addend; - value -= 8; - bfd_put_64 (input_bfd, value, hit_data); - return bfd_reloc_ok; - } - - case R_PARISC_FPTR64: - { - /* We may still need to create the FPTR itself if it was for - a local symbol. */ - if (dyn_h->h == NULL) - { - /* The first two words of an .opd entry are zero. */ - memset (hppa_info->opd_sec->contents + dyn_h->opd_offset, 0, 16); - - /* The next word is the address of the function. */ - bfd_put_64 (hppa_info->opd_sec->owner, value + addend, - (hppa_info->opd_sec->contents - + dyn_h->opd_offset + 16)); - - /* The last word is our local __gp value. */ - value = _bfd_get_gp_value - (hppa_info->opd_sec->output_section->owner); - bfd_put_64 (hppa_info->opd_sec->owner, value, - hppa_info->opd_sec->contents + dyn_h->opd_offset + 24); - } - - if (dyn_h->want_opd) - /* We want the value of the OPD offset for this symbol. */ - value = (dyn_h->opd_offset - + hppa_info->opd_sec->output_offset - + hppa_info->opd_sec->output_section->vma); - else - /* We want the address of the symbol. */ - value += addend; - - bfd_put_64 (input_bfd, value, hit_data); - return bfd_reloc_ok; - } - - case R_PARISC_SECREL32: - bfd_put_32 (input_bfd, - value + addend - sym_sec->output_section->vma, - hit_data); - return bfd_reloc_ok; - - case R_PARISC_SEGREL32: - case R_PARISC_SEGREL64: - { - /* If this is the first SEGREL relocation, then initialize - the segment base values. */ - if (hppa_info->text_segment_base == (bfd_vma) -1) - bfd_map_over_sections (output_bfd, elf_hppa_record_segment_addrs, - hppa_info); - - /* VALUE holds the absolute address. We want to include the - addend, then turn it into a segment relative address. - - The segment is derived from SYM_SEC. We assume that there are - only two segments of note in the resulting executable/shlib. - A readonly segment (.text) and a readwrite segment (.data). */ - value += addend; - - if (sym_sec->flags & SEC_CODE) - value -= hppa_info->text_segment_base; - else - value -= hppa_info->data_segment_base; - - if (r_type == R_PARISC_SEGREL32) - bfd_put_32 (input_bfd, value, hit_data); - else - bfd_put_64 (input_bfd, value, hit_data); - return bfd_reloc_ok; - } - - /* Something we don't know how to handle. */ - default: - return bfd_reloc_notsupported; - } - - /* Update the instruction word. */ - bfd_put_32 (input_bfd, (bfd_vma) insn, hit_data); - return bfd_reloc_ok; -} - -/* Relocate an HPPA ELF section. */ - -static bfd_boolean -elf_hppa_relocate_section (bfd *output_bfd, - struct bfd_link_info *info, - bfd *input_bfd, - asection *input_section, - bfd_byte *contents, - Elf_Internal_Rela *relocs, - Elf_Internal_Sym *local_syms, - asection **local_sections) -{ - Elf_Internal_Shdr *symtab_hdr; - Elf_Internal_Rela *rel; - Elf_Internal_Rela *relend; - struct elf64_hppa_link_hash_table *hppa_info; - - hppa_info = elf64_hppa_hash_table (info); - symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; - - rel = relocs; - relend = relocs + input_section->reloc_count; - for (; rel < relend; rel++) - { - int r_type; - reloc_howto_type *howto = elf_hppa_howto_table + ELF_R_TYPE (rel->r_info); - unsigned long r_symndx; - struct elf_link_hash_entry *h; - Elf_Internal_Sym *sym; - asection *sym_sec; - bfd_vma relocation; - bfd_reloc_status_type r; - const char *dyn_name; - char *dynh_buf = NULL; - size_t dynh_buflen = 0; - struct elf64_hppa_dyn_hash_entry *dyn_h = NULL; - - r_type = ELF_R_TYPE (rel->r_info); - if (r_type < 0 || r_type >= (int) R_PARISC_UNIMPLEMENTED) - { - bfd_set_error (bfd_error_bad_value); - return FALSE; - } - - /* This is a final link. */ - r_symndx = ELF_R_SYM (rel->r_info); - h = NULL; - sym = NULL; - sym_sec = NULL; - if (r_symndx < symtab_hdr->sh_info) - { - /* This is a local symbol. */ - sym = local_syms + r_symndx; - sym_sec = local_sections[r_symndx]; - relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel); - - /* If this symbol has an entry in the PA64 dynamic hash - table, then get it. */ - dyn_name = get_dyn_name (input_bfd, h, rel, - &dynh_buf, &dynh_buflen); - dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, - dyn_name, FALSE, FALSE); - - } - else - { - /* This is not a local symbol. */ - long indx; - - relocation = 0; - indx = r_symndx - symtab_hdr->sh_info; - h = elf_sym_hashes (input_bfd)[indx]; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - sym_sec = h->root.u.def.section; - - /* If this symbol has an entry in the PA64 dynamic hash - table, then get it. */ - dyn_name = get_dyn_name (input_bfd, h, rel, - &dynh_buf, &dynh_buflen); - dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, - dyn_name, FALSE, FALSE); - - /* If we have a relocation against a symbol defined in a - shared library and we have not created an entry in the - PA64 dynamic symbol hash table for it, then we lose. */ - if (!info->relocatable - && sym_sec->output_section == NULL && dyn_h == NULL) - { - (*_bfd_error_handler) - (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), - input_bfd, - input_section, - (long) rel->r_offset, - howto->name, - h->root.root.string); - } - else if (sym_sec->output_section) - relocation = (h->root.u.def.value - + sym_sec->output_offset - + sym_sec->output_section->vma); - } - else if (info->unresolved_syms_in_objects == RM_IGNORE - && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) - { - /* If this symbol has an entry in the PA64 dynamic hash - table, then get it. */ - dyn_name = get_dyn_name (input_bfd, h, rel, - &dynh_buf, &dynh_buflen); - dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, - dyn_name, FALSE, FALSE); - - if (!info->relocatable && dyn_h == NULL) - { - (*_bfd_error_handler) - (_("%B(%A): warning: unresolvable relocation against symbol `%s'"), - input_bfd, input_section, h->root.root.string); - } - } - else if (h->root.type == bfd_link_hash_undefweak) - { - dyn_name = get_dyn_name (input_bfd, h, rel, - &dynh_buf, &dynh_buflen); - dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, - dyn_name, FALSE, FALSE); - - if (!info->relocatable && dyn_h == NULL) - { - (*_bfd_error_handler) - (_("%B(%A): warning: unresolvable relocation against symbol `%s'"), - input_bfd, input_section, h->root.root.string); - } - } - else if (!info->relocatable) - { - /* Ignore dynamic loader defined symbols. */ - if (!elf_hppa_is_dynamic_loader_symbol (h->root.root.string)) - { - if (!((*info->callbacks->undefined_symbol) - (info, h->root.root.string, input_bfd, - input_section, rel->r_offset, - (info->unresolved_syms_in_objects == RM_GENERATE_ERROR - || ELF_ST_VISIBILITY (h->other))))) - return FALSE; - break; - } - } - } - - if (sym_sec != NULL && elf_discarded_section (sym_sec)) - { - /* For relocs against symbols from removed linkonce sections, - or sections discarded by a linker script, we just want the - section contents zeroed. Avoid any special processing. */ - _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset); - rel->r_info = 0; - rel->r_addend = 0; - continue; - } - - if (info->relocatable) - continue; - - r = elf_hppa_final_link_relocate (rel, input_bfd, output_bfd, - input_section, contents, - relocation, info, sym_sec, - h, dyn_h); - - if (r != bfd_reloc_ok) - { - switch (r) - { - default: - abort (); - case bfd_reloc_overflow: - { - const char *sym_name; - - if (h != NULL) - sym_name = NULL; - else - { - sym_name = bfd_elf_string_from_elf_section (input_bfd, - symtab_hdr->sh_link, - sym->st_name); - if (sym_name == NULL) - return FALSE; - if (*sym_name == '\0') - sym_name = bfd_section_name (input_bfd, sym_sec); - } - - if (!((*info->callbacks->reloc_overflow) - (info, (h ? &h->root : NULL), sym_name, - howto->name, (bfd_vma) 0, input_bfd, - input_section, rel->r_offset))) - return FALSE; - } - break; - } - } - } - return TRUE; -} - -#endif /* ARCH_SIZE == 64 */ diff --git a/cegcc/src/binutils/bfd/elf-m10200.c b/cegcc/src/binutils/bfd/elf-m10200.c index 099722e13..5a6ff5f74 100644 --- a/cegcc/src/binutils/bfd/elf-m10200.c +++ b/cegcc/src/binutils/bfd/elf-m10200.c @@ -1,5 +1,5 @@ /* Matsushita 10200 specific support for 32-bit ELF - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007 + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elf-m10300.c b/cegcc/src/binutils/bfd/elf-m10300.c index d41906ce1..794d329fe 100644 --- a/cegcc/src/binutils/bfd/elf-m10300.c +++ b/cegcc/src/binutils/bfd/elf-m10300.c @@ -1,6 +1,6 @@ /* Matsushita 10300 specific support for 32-bit ELF Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1493,7 +1493,7 @@ mn10300_elf_relocate_section (bfd *output_bfd, /* _32 relocs in executables force _COPY relocs, such that the address of the symbol ends up being local. */ - && !info->executable + && !info->executable && !SYMBOL_REFERENCES_LOCAL (info, hh) && ((input_section->flags & SEC_ALLOC) != 0 /* DWARF will emit R_MN10300_32 relocations @@ -2073,6 +2073,10 @@ mn10300_elf_relax_section (bfd *abfd, asection *section = sec; bfd_vma align_gap_adjustment; + if (link_info->relocatable) + (*link_info->callbacks->einfo) + (_("%P%F: --relax and -r may not be used together\n")); + /* Assume nothing changes. */ *again = FALSE; @@ -2777,14 +2781,32 @@ mn10300_elf_relax_section (bfd *abfd, isym->st_name); if ((sym_sec->flags & SEC_MERGE) - && ELF_ST_TYPE (isym->st_info) == STT_SECTION && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE) { - symval = isym->st_value + irel->r_addend; + symval = isym->st_value; + + /* GAS may reduce relocations against symbols in SEC_MERGE + sections to a relocation against the section symbol when + the original addend was zero. When the reloc is against + a section symbol we should include the addend in the + offset passed to _bfd_merged_section_offset, since the + location of interest is the original symbol. On the + other hand, an access to "sym+addend" where "sym" is not + a section symbol should not include the addend; Such an + access is presumed to be an offset from "sym"; The + location of interest is just "sym". */ + if (ELF_ST_TYPE (isym->st_info) == STT_SECTION) + symval += irel->r_addend; + symval = _bfd_merged_section_offset (abfd, & sym_sec, elf_section_data (sym_sec)->sec_info, symval); - symval += sym_sec->output_section->vma + sym_sec->output_offset - irel->r_addend; + + if (ELF_ST_TYPE (isym->st_info) != STT_SECTION) + symval += irel->r_addend; + + symval += sym_sec->output_section->vma + + sym_sec->output_offset - irel->r_addend; } else symval = (isym->st_value diff --git a/cegcc/src/binutils/bfd/elf-strtab.c b/cegcc/src/binutils/bfd/elf-strtab.c index f5013d15e..7d2fad4e5 100644 --- a/cegcc/src/binutils/bfd/elf-strtab.c +++ b/cegcc/src/binutils/bfd/elf-strtab.c @@ -68,7 +68,8 @@ elf_strtab_hash_newfunc (struct bfd_hash_entry *entry, /* Allocate the structure if it has not already been allocated by a subclass. */ if (entry == NULL) - entry = bfd_hash_allocate (table, sizeof (struct elf_strtab_hash_entry)); + entry = (struct bfd_hash_entry *) + bfd_hash_allocate (table, sizeof (struct elf_strtab_hash_entry)); if (entry == NULL) return NULL; @@ -97,7 +98,7 @@ _bfd_elf_strtab_init (void) struct elf_strtab_hash *table; bfd_size_type amt = sizeof (struct elf_strtab_hash); - table = bfd_malloc (amt); + table = (struct elf_strtab_hash *) bfd_malloc (amt); if (table == NULL) return NULL; @@ -112,7 +113,8 @@ _bfd_elf_strtab_init (void) table->size = 1; table->alloced = 64; amt = sizeof (struct elf_strtab_hasn_entry *); - table->array = bfd_malloc (table->alloced * amt); + table->array = (struct elf_strtab_hash_entry **) + bfd_malloc (table->alloced * amt); if (table->array == NULL) { free (table); @@ -166,7 +168,8 @@ _bfd_elf_strtab_add (struct elf_strtab_hash *tab, { bfd_size_type amt = sizeof (struct elf_strtab_hash_entry *); tab->alloced *= 2; - tab->array = bfd_realloc_or_free (tab->array, tab->alloced * amt); + tab->array = (struct elf_strtab_hash_entry **) + bfd_realloc_or_free (tab->array, tab->alloced * amt); if (tab->array == NULL) return (bfd_size_type) -1; } @@ -311,7 +314,7 @@ _bfd_elf_strtab_finalize (struct elf_strtab_hash *tab) /* Sort the strings by suffix and length. */ amt = tab->size * sizeof (struct elf_strtab_hash_entry *); - array = bfd_malloc (amt); + array = (struct elf_strtab_hash_entry **) bfd_malloc (amt); if (array == NULL) goto alloc_failure; diff --git a/cegcc/src/binutils/bfd/elf-vxworks.c b/cegcc/src/binutils/bfd/elf-vxworks.c index 2b0c725f3..06edf8dce 100644 --- a/cegcc/src/binutils/bfd/elf-vxworks.c +++ b/cegcc/src/binutils/bfd/elf-vxworks.c @@ -1,5 +1,5 @@ /* VxWorks support for ELF - Copyright 2005, 2007 Free Software Foundation, Inc. + Copyright 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -127,7 +127,7 @@ elf_vxworks_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info, } /* Tweak magic VxWorks symbols as they are written to the output file. */ -bfd_boolean +int elf_vxworks_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, const char *name, @@ -141,7 +141,7 @@ elf_vxworks_link_output_symbol_hook (struct bfd_link_info *info && elf_vxworks_gott_symbol_p (h->root.u.undef.abfd, name)) sym->st_info = ELF_ST_INFO (STB_GLOBAL, ELF_ST_TYPE (sym->st_info)); - return TRUE; + return 1; } /* Copy relocations into the output file. Fixes up relocations against PLT diff --git a/cegcc/src/binutils/bfd/elf-vxworks.h b/cegcc/src/binutils/bfd/elf-vxworks.h index 6850b3e30..4a9ed1d8e 100644 --- a/cegcc/src/binutils/bfd/elf-vxworks.h +++ b/cegcc/src/binutils/bfd/elf-vxworks.h @@ -1,5 +1,5 @@ /* VxWorks support for ELF - Copyright 2005, 2007 Free Software Foundation, Inc. + Copyright 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elf.c b/cegcc/src/binutils/bfd/elf.c index 44af469e1..4a329294c 100644 --- a/cegcc/src/binutils/bfd/elf.c +++ b/cegcc/src/binutils/bfd/elf.c @@ -283,7 +283,7 @@ bfd_elf_get_str_section (bfd *abfd, unsigned int shindex) /* Allocate and clear an extra byte at the end, to prevent crashes in case the string table is not terminated. */ if (shstrtabsize + 1 <= 1 - || (shstrtab = bfd_alloc (abfd, shstrtabsize + 1)) == NULL + || (shstrtab = (bfd_byte *) bfd_alloc (abfd, shstrtabsize + 1)) == NULL || bfd_seek (abfd, offset, SEEK_SET) != 0) shstrtab = NULL; else if (bfd_bread (shstrtab, shstrtabsize, abfd) != shstrtabsize) @@ -331,7 +331,7 @@ bfd_elf_string_from_elf_section (bfd *abfd, (shindex == shstrndx && strindex == hdr->sh_name ? ".shstrtab" : bfd_elf_string_from_elf_section (abfd, shstrndx, hdr->sh_name))); - return ""; + return NULL; } return ((char *) hdr->contents) + strindex; @@ -407,8 +407,8 @@ bfd_elf_get_elf_syms (bfd *ibfd, pos = shndx_hdr->sh_offset + symoffset * sizeof (Elf_External_Sym_Shndx); if (extshndx_buf == NULL) { - alloc_extshndx = bfd_malloc2 (symcount, - sizeof (Elf_External_Sym_Shndx)); + alloc_extshndx = (Elf_External_Sym_Shndx *) + bfd_malloc2 (symcount, sizeof (Elf_External_Sym_Shndx)); extshndx_buf = alloc_extshndx; } if (extshndx_buf == NULL @@ -422,7 +422,8 @@ bfd_elf_get_elf_syms (bfd *ibfd, if (intsym_buf == NULL) { - alloc_intsym = bfd_malloc2 (symcount, sizeof (Elf_Internal_Sym)); + alloc_intsym = (Elf_Internal_Sym *) + bfd_malloc2 (symcount, sizeof (Elf_Internal_Sym)); intsym_buf = alloc_intsym; if (intsym_buf == NULL) goto out; @@ -430,7 +431,8 @@ bfd_elf_get_elf_syms (bfd *ibfd, /* Convert the symbols to internal form. */ isymend = intsym_buf + symcount; - for (esym = extsym_buf, isym = intsym_buf, shndx = extshndx_buf; + for (esym = (const bfd_byte *) extsym_buf, isym = intsym_buf, + shndx = extshndx_buf; isym < isymend; esym += extsym_size, isym++, shndx = shndx != NULL ? shndx + 1 : NULL) if (!(*bed->s->swap_symbol_in) (ibfd, esym, shndx, isym)) @@ -564,8 +566,8 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) bfd_size_type amt; elf_tdata (abfd)->num_group = num_group; - elf_tdata (abfd)->group_sect_ptr - = bfd_alloc2 (abfd, num_group, sizeof (Elf_Internal_Shdr *)); + elf_tdata (abfd)->group_sect_ptr = (Elf_Internal_Shdr **) + bfd_alloc2 (abfd, num_group, sizeof (Elf_Internal_Shdr *)); if (elf_tdata (abfd)->group_sect_ptr == NULL) return FALSE; @@ -586,8 +588,8 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) /* Read the raw contents. */ BFD_ASSERT (sizeof (*dest) >= 4); amt = shdr->sh_size * sizeof (*dest) / 4; - shdr->contents = bfd_alloc2 (abfd, shdr->sh_size, - sizeof (*dest) / 4); + shdr->contents = (unsigned char *) + bfd_alloc2 (abfd, shdr->sh_size, sizeof (*dest) / 4); /* PR binutils/4110: Handle corrupt group headers. */ if (shdr->contents == NULL) { @@ -971,25 +973,8 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, phdr = elf_tdata (abfd)->phdr; for (i = 0; i < elf_elfheader (abfd)->e_phnum; i++, phdr++) { - /* This section is part of this segment if its file - offset plus size lies within the segment's memory - span and, if the section is loaded, the extent of the - loaded data lies within the extent of the segment. - - Note - we used to check the p_paddr field as well, and - refuse to set the LMA if it was 0. This is wrong - though, as a perfectly valid initialised segment can - have a p_paddr of zero. Some architectures, eg ARM, - place special significance on the address 0 and - executables need to be able to have a segment which - covers this address. */ if (phdr->p_type == PT_LOAD - && (bfd_vma) hdr->sh_offset >= phdr->p_offset - && (hdr->sh_offset + hdr->sh_size - <= phdr->p_offset + phdr->p_memsz) - && ((flags & SEC_LOAD) == 0 - || (hdr->sh_offset + hdr->sh_size - <= phdr->p_offset + phdr->p_filesz))) + && ELF_IS_SECTION_IN_SEGMENT (hdr, phdr)) { if ((flags & SEC_LOAD) == 0) newsect->lma = (phdr->p_paddr @@ -1108,7 +1093,7 @@ get_segment_type (unsigned int p_type) bfd_boolean _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) { - FILE *f = farg; + FILE *f = (FILE *) farg; Elf_Internal_Phdr *p; asection *s; bfd_byte *dynbuf = NULL; @@ -1351,7 +1336,7 @@ bfd_elf_print_symbol (bfd *abfd, asymbol *symbol, bfd_print_symbol_type how) { - FILE *file = filep; + FILE *file = (FILE *) filep; switch (how) { case bfd_print_symbol_name: @@ -1531,10 +1516,25 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) case SHT_DYNAMIC: /* Dynamic linking information. */ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) return FALSE; - if (hdr->sh_link > elf_numsections (abfd) - || elf_elfsections (abfd)[hdr->sh_link] == NULL) + if (hdr->sh_link > elf_numsections (abfd)) + { + /* PR 10478: Accept Solaris binaries with a sh_link + field set to SHN_BEFORE or SHN_AFTER. */ + switch (bfd_get_arch (abfd)) + { + case bfd_arch_i386: + case bfd_arch_sparc: + if (hdr->sh_link == (SHN_LORESERVE & 0xffff) /* SHN_BEFORE */ + || hdr->sh_link == ((SHN_LORESERVE + 1) & 0xffff) /* SHN_AFTER */) + break; + /* Otherwise fall through. */ + default: + return FALSE; + } + } + else if (elf_elfsections (abfd)[hdr->sh_link] == NULL) return FALSE; - if (elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_STRTAB) + else if (elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_STRTAB) { Elf_Internal_Shdr *dynsymhdr; @@ -1728,8 +1728,11 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) reject them, but, unfortunately, some people need to use them. We scan through the section headers; if we find only one suitable symbol table, we clobber the sh_link to point - to it. I hope this doesn't break anything. */ - if (elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_SYMTAB + to it. I hope this doesn't break anything. + + Don't do it on executable nor shared library. */ + if ((abfd->flags & (DYNAMIC | EXEC_P)) == 0 + && elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_SYMTAB && elf_elfsections (abfd)[hdr->sh_link]->sh_type != SHT_DYNSYM) { unsigned int scan; @@ -1764,8 +1767,10 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) represent such a section, so at least for now, we don't try. We just present it as a normal section. We also can't use it as a reloc section if it points to the null - section, an invalid section, or another reloc section. */ + section, an invalid section, another reloc section, or its + sh_link points to the null section. */ if (hdr->sh_link != elf_onesymtab (abfd) + || hdr->sh_link == SHN_UNDEF || hdr->sh_info == SHN_UNDEF || hdr->sh_info >= num_sec || elf_elfsections (abfd)[hdr->sh_info]->sh_type == SHT_REL @@ -1787,7 +1792,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) bfd_size_type amt; BFD_ASSERT (elf_section_data (target_sect)->rel_hdr2 == NULL); amt = sizeof (*hdr2); - hdr2 = bfd_alloc (abfd, amt); + hdr2 = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt); if (hdr2 == NULL) return FALSE; elf_section_data (target_sect)->rel_hdr2 = hdr2; @@ -1921,28 +1926,24 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) return TRUE; } -/* Return the section for the local symbol specified by ABFD, R_SYMNDX. - Return SEC for sections that have no elf section, and NULL on error. */ +/* Return the local symbol specified by ABFD, R_SYMNDX. */ -asection * -bfd_section_from_r_symndx (bfd *abfd, - struct sym_sec_cache *cache, - asection *sec, - unsigned long r_symndx) +Elf_Internal_Sym * +bfd_sym_from_r_symndx (struct sym_cache *cache, + bfd *abfd, + unsigned long r_symndx) { unsigned int ent = r_symndx % LOCAL_SYM_CACHE_SIZE; - asection *s; if (cache->abfd != abfd || cache->indx[ent] != r_symndx) { Elf_Internal_Shdr *symtab_hdr; unsigned char esym[sizeof (Elf64_External_Sym)]; Elf_External_Sym_Shndx eshndx; - Elf_Internal_Sym isym; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; if (bfd_elf_get_elf_syms (abfd, symtab_hdr, 1, r_symndx, - &isym, esym, &eshndx) == NULL) + &cache->sym[ent], esym, &eshndx) == NULL) return NULL; if (cache->abfd != abfd) @@ -1951,14 +1952,9 @@ bfd_section_from_r_symndx (bfd *abfd, cache->abfd = abfd; } cache->indx[ent] = r_symndx; - cache->shndx[ent] = isym.st_shndx; } - s = bfd_section_from_elf_index (abfd, cache->shndx[ent]); - if (s != NULL) - return s; - - return sec; + return &cache->sym[ent]; } /* Given an ELF section number, retrieve the corresponding BFD @@ -2214,7 +2210,8 @@ _bfd_elf_new_section_hook (bfd *abfd, asection *sec) sdata = (struct bfd_elf_section_data *) sec->used_by_bfd; if (sdata == NULL) { - sdata = bfd_zalloc (abfd, sizeof (*sdata)); + sdata = (struct bfd_elf_section_data *) bfd_zalloc (abfd, + sizeof (*sdata)); if (sdata == NULL) return FALSE; sec->used_by_bfd = sdata; @@ -2270,7 +2267,7 @@ bfd_boolean _bfd_elf_make_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index, - const char *typename) + const char *type_name) { asection *newsect; char *name; @@ -2284,9 +2281,9 @@ _bfd_elf_make_section_from_phdr (bfd *abfd, if (hdr->p_filesz > 0) { - sprintf (namebuf, "%s%d%s", typename, index, split ? "a" : ""); + sprintf (namebuf, "%s%d%s", type_name, index, split ? "a" : ""); len = strlen (namebuf) + 1; - name = bfd_alloc (abfd, len); + name = (char *) bfd_alloc (abfd, len); if (!name) return FALSE; memcpy (name, namebuf, len); @@ -2320,9 +2317,9 @@ _bfd_elf_make_section_from_phdr (bfd *abfd, { bfd_vma align; - sprintf (namebuf, "%s%d%s", typename, index, split ? "b" : ""); + sprintf (namebuf, "%s%d%s", type_name, index, split ? "b" : ""); len = strlen (namebuf) + 1; - name = bfd_alloc (abfd, len); + name = (char *) bfd_alloc (abfd, len); if (!name) return FALSE; memcpy (name, namebuf, len); @@ -2421,7 +2418,7 @@ _bfd_elf_init_reloc_shdr (bfd *abfd, const struct elf_backend_data *bed = get_elf_backend_data (abfd); bfd_size_type amt = sizeof ".rela" + strlen (asect->name); - name = bfd_alloc (abfd, amt); + name = (char *) bfd_alloc (abfd, amt); if (name == NULL) return FALSE; sprintf (name, "%s%s", use_rela_p ? ".rela" : ".rel", asect->name); @@ -2443,13 +2440,25 @@ _bfd_elf_init_reloc_shdr (bfd *abfd, return TRUE; } +/* Return the default section type based on the passed in section flags. */ + +int +bfd_elf_get_default_section_type (flagword flags) +{ + if ((flags & SEC_ALLOC) != 0 + && ((flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0 + || (flags & SEC_NEVER_LOAD) != 0)) + return SHT_NOBITS; + return SHT_PROGBITS; +} + /* Set up an ELF internal section header for a section. */ static void elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); - bfd_boolean *failedptr = failedptrarg; + bfd_boolean *failedptr = (bfd_boolean *) failedptrarg; Elf_Internal_Shdr *this_hdr; unsigned int sh_type; @@ -2492,12 +2501,8 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg) asect->flags. */ if ((asect->flags & SEC_GROUP) != 0) sh_type = SHT_GROUP; - else if ((asect->flags & SEC_ALLOC) != 0 - && (((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0) - || (asect->flags & SEC_NEVER_LOAD) != 0)) - sh_type = SHT_NOBITS; else - sh_type = SHT_PROGBITS; + sh_type = bfd_elf_get_default_section_type (asect->flags); if (this_hdr->sh_type == SHT_NULL) this_hdr->sh_type = sh_type; @@ -2653,7 +2658,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg) void bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg) { - bfd_boolean *failedptr = failedptrarg; + bfd_boolean *failedptr = (bfd_boolean *) failedptrarg; asection *elt, *first; unsigned char *loc; bfd_boolean gas; @@ -2713,7 +2718,7 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg) if (sec->contents == NULL) { gas = FALSE; - sec->contents = bfd_alloc (abfd, sec->size); + sec->contents = (unsigned char *) bfd_alloc (abfd, sec->size); /* Arrange for the section to be written out. */ elf_section_data (sec)->this_hdr.contents = sec->contents; @@ -2774,6 +2779,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) unsigned int section_number, secn; Elf_Internal_Shdr **i_shdrp; struct bfd_elf_section_data *d; + bfd_boolean need_symtab; section_number = 1; @@ -2829,7 +2835,11 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->shstrtab_hdr.sh_name); elf_elfheader (abfd)->e_shstrndx = t->shstrtab_section; - if (bfd_get_symcount (abfd) > 0) + need_symtab = (bfd_get_symcount (abfd) > 0 + || (link_info == NULL + && ((abfd->flags & (EXEC_P | DYNAMIC | HAS_RELOC)) + == HAS_RELOC))); + if (need_symtab) { t->symtab_section = section_number++; _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->symtab_hdr.sh_name); @@ -2854,11 +2864,13 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) /* Set up the list of section header pointers, in agreement with the indices. */ - i_shdrp = bfd_zalloc2 (abfd, section_number, sizeof (Elf_Internal_Shdr *)); + i_shdrp = (Elf_Internal_Shdr **) bfd_zalloc2 (abfd, section_number, + sizeof (Elf_Internal_Shdr *)); if (i_shdrp == NULL) return FALSE; - i_shdrp[0] = bfd_zalloc (abfd, sizeof (Elf_Internal_Shdr)); + i_shdrp[0] = (Elf_Internal_Shdr *) bfd_zalloc (abfd, + sizeof (Elf_Internal_Shdr)); if (i_shdrp[0] == NULL) { bfd_release (abfd, i_shdrp); @@ -2868,7 +2880,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) elf_elfsections (abfd) = i_shdrp; i_shdrp[t->shstrtab_section] = &t->shstrtab_hdr; - if (bfd_get_symcount (abfd) > 0) + if (need_symtab) { i_shdrp[t->symtab_section] = &t->symtab_hdr; if (elf_numsections (abfd) > (SHN_LORESERVE & 0xFFFF)) @@ -3007,7 +3019,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) char *alc; len = strlen (sec->name); - alc = bfd_malloc (len - 2); + alc = (char *) bfd_malloc (len - 2); if (alc == NULL) return FALSE; memcpy (alc, sec->name, len - 3); @@ -3083,7 +3095,7 @@ sym_is_global (bfd *abfd, asymbol *sym) if (bed->elf_backend_sym_is_global) return (*bed->elf_backend_sym_is_global) (abfd, sym); - return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0 + return ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0 || bfd_is_und_section (bfd_get_section (sym)) || bfd_is_com_section (bfd_get_section (sym))); } @@ -3127,7 +3139,7 @@ elf_map_symbols (bfd *abfd) } max_index++; - sect_syms = bfd_zalloc2 (abfd, max_index, sizeof (asymbol *)); + sect_syms = (asymbol **) bfd_zalloc2 (abfd, max_index, sizeof (asymbol *)); if (sect_syms == NULL) return FALSE; elf_section_syms (abfd) = sect_syms; @@ -3179,7 +3191,8 @@ elf_map_symbols (bfd *abfd) } /* Now sort the symbols so the local symbols are first. */ - new_syms = bfd_alloc2 (abfd, num_locals + num_globals, sizeof (asymbol *)); + new_syms = (asymbol **) bfd_alloc2 (abfd, num_locals + num_globals, + sizeof (asymbol *)); if (new_syms == NULL) return FALSE; @@ -3261,6 +3274,7 @@ _bfd_elf_compute_section_file_positions (bfd *abfd, bfd_boolean failed; struct bfd_strtab_hash *strtab = NULL; Elf_Internal_Shdr *shstrtab_hdr; + bfd_boolean need_symtab; if (abfd->output_has_begun) return TRUE; @@ -3285,7 +3299,11 @@ _bfd_elf_compute_section_file_positions (bfd *abfd, return FALSE; /* The backend linker builds symbol table information itself. */ - if (link_info == NULL && bfd_get_symcount (abfd) > 0) + need_symtab = (link_info == NULL + && (bfd_get_symcount (abfd) > 0 + || ((abfd->flags & (EXEC_P | DYNAMIC | HAS_RELOC)) + == HAS_RELOC))); + if (need_symtab) { /* Non-zero if doing a relocatable link. */ int relocatable_p = ! (abfd->flags & (EXEC_P | DYNAMIC)); @@ -3316,7 +3334,7 @@ _bfd_elf_compute_section_file_positions (bfd *abfd, if (!assign_file_positions_except_relocs (abfd, link_info)) return FALSE; - if (link_info == NULL && bfd_get_symcount (abfd) > 0) + if (need_symtab) { file_ptr off; Elf_Internal_Shdr *hdr; @@ -3483,7 +3501,7 @@ make_mapping (bfd *abfd, amt = sizeof (struct elf_segment_map); amt += (to - from - 1) * sizeof (asection *); - m = bfd_zalloc (abfd, amt); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) return NULL; m->next = NULL; @@ -3510,7 +3528,8 @@ _bfd_elf_make_dynamic_segment (bfd *abfd, asection *dynsec) { struct elf_segment_map *m; - m = bfd_zalloc (abfd, sizeof (struct elf_segment_map)); + m = (struct elf_segment_map *) bfd_zalloc (abfd, + sizeof (struct elf_segment_map)); if (m == NULL) return NULL; m->next = NULL; @@ -3601,7 +3620,8 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) /* Select the allocated sections, and sort them. */ - sections = bfd_malloc2 (bfd_count_sections (abfd), sizeof (asection *)); + sections = (asection **) bfd_malloc2 (bfd_count_sections (abfd), + sizeof (asection *)); if (sections == NULL) goto error_return; @@ -3631,7 +3651,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) if (s != NULL && (s->flags & SEC_LOAD) != 0) { amt = sizeof (struct elf_segment_map); - m = bfd_zalloc (abfd, amt); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) goto error_return; m->next = NULL; @@ -3645,7 +3665,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) pm = &m->next; amt = sizeof (struct elf_segment_map); - m = bfd_zalloc (abfd, amt); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) goto error_return; m->next = NULL; @@ -3855,7 +3875,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) break; } amt += (count - 1) * sizeof (asection *); - m = bfd_zalloc (abfd, amt); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) goto error_return; m->next = NULL; @@ -3887,7 +3907,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) amt = sizeof (struct elf_segment_map); amt += (tls_count - 1) * sizeof (asection *); - m = bfd_zalloc (abfd, amt); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) goto error_return; m->next = NULL; @@ -3914,7 +3934,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) && (eh_frame_hdr->output_section->flags & SEC_LOAD) != 0) { amt = sizeof (struct elf_segment_map); - m = bfd_zalloc (abfd, amt); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) goto error_return; m->next = NULL; @@ -3929,7 +3949,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) if (elf_tdata (abfd)->stack_flags) { amt = sizeof (struct elf_segment_map); - m = bfd_zalloc (abfd, amt); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) goto error_return; m->next = NULL; @@ -3962,7 +3982,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) if (m != NULL) { amt = sizeof (struct elf_segment_map); - m = bfd_zalloc (abfd, amt); + m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) goto error_return; m->next = NULL; @@ -4164,10 +4184,10 @@ assign_file_positions_for_load_sections (bfd *abfd, last iterations for the testcase ld-elf/header. */ BFD_ASSERT (elf_tdata (abfd)->program_header_size % bed->s->sizeof_phdr == 0); - phdrs = bfd_zalloc2 (abfd, - (elf_tdata (abfd)->program_header_size - / bed->s->sizeof_phdr), - sizeof (Elf_Internal_Phdr)); + phdrs = (Elf_Internal_Phdr *) + bfd_zalloc2 (abfd, + (elf_tdata (abfd)->program_header_size / bed->s->sizeof_phdr), + sizeof (Elf_Internal_Phdr)); elf_tdata (abfd)->phdr = phdrs; if (phdrs == NULL) return FALSE; @@ -4673,13 +4693,11 @@ assign_file_positions_for_non_load_sections (bfd *abfd, p->p_align = 1; p->p_flags = (lp->p_flags & ~PF_W); } - else if (link_info != NULL) + else { memset (p, 0, sizeof *p); p->p_type = PT_NULL; } - else - abort (); } else if (m->count != 0) { @@ -5361,7 +5379,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) all of the sections we have selected. */ amt = sizeof (struct elf_segment_map); amt += ((bfd_size_type) section_count - 1) * sizeof (asection *); - map = bfd_zalloc (obfd, amt); + map = (struct elf_segment_map *) bfd_zalloc (obfd, amt); if (map == NULL) return FALSE; @@ -5445,7 +5463,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) pointers that we are interested in. As these sections get assigned to a segment, they are removed from this array. */ - sections = bfd_malloc2 (section_count, sizeof (asection *)); + sections = (asection **) bfd_malloc2 (section_count, sizeof (asection *)); if (sections == NULL) return FALSE; @@ -5691,7 +5709,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) and carry on looping. */ amt = sizeof (struct elf_segment_map); amt += ((bfd_size_type) section_count - 1) * sizeof (asection *); - map = bfd_alloc (obfd, amt); + map = (struct elf_segment_map *) bfd_alloc (obfd, amt); if (map == NULL) { free (sections); @@ -5812,7 +5830,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) amt = sizeof (struct elf_segment_map); if (section_count != 0) amt += ((bfd_size_type) section_count - 1) * sizeof (asection *); - map = bfd_zalloc (obfd, amt); + map = (struct elf_segment_map *) bfd_zalloc (obfd, amt); if (map == NULL) return FALSE; @@ -5828,14 +5846,13 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) map->p_align_valid = 1; map->p_vaddr_offset = 0; - if (map->p_type == PT_GNU_RELRO - && segment->p_filesz == segment->p_memsz) + if (map->p_type == PT_GNU_RELRO) { /* The PT_GNU_RELRO segment may contain the first a few bytes in the .got.plt section even if the whole .got.plt section isn't in the PT_GNU_RELRO segment. We won't change the size of the PT_GNU_RELRO segment. */ - map->p_size = segment->p_filesz; + map->p_size = segment->p_memsz; map->p_size_valid = 1; } @@ -6217,7 +6234,8 @@ swap_out_syms (bfd *abfd, symstrtab_hdr = &elf_tdata (abfd)->strtab_hdr; symstrtab_hdr->sh_type = SHT_STRTAB; - outbound_syms = bfd_alloc2 (abfd, 1 + symcount, bed->s->sizeof_sym); + outbound_syms = (bfd_byte *) bfd_alloc2 (abfd, 1 + symcount, + bed->s->sizeof_sym); if (outbound_syms == NULL) { _bfd_stringtab_free (stt); @@ -6230,8 +6248,8 @@ swap_out_syms (bfd *abfd, if (symtab_shndx_hdr->sh_name != 0) { amt = (bfd_size_type) (1 + symcount) * sizeof (Elf_External_Sym_Shndx); - outbound_shndx = bfd_zalloc2 (abfd, 1 + symcount, - sizeof (Elf_External_Sym_Shndx)); + outbound_shndx = (bfd_byte *) + bfd_zalloc2 (abfd, 1 + symcount, sizeof (Elf_External_Sym_Shndx)); if (outbound_shndx == NULL) { _bfd_stringtab_free (stt); @@ -6392,6 +6410,8 @@ Unable to find equivalent output section for symbol '%s' from section '%s'"), if ((flags & BSF_THREAD_LOCAL) != 0) type = STT_TLS; + else if ((flags & BSF_GNU_INDIRECT_FUNCTION) != 0) + type = STT_GNU_IFUNC; else if ((flags & BSF_FUNCTION) != 0) type = STT_FUNC; else if ((flags & BSF_OBJECT) != 0) @@ -6441,6 +6461,8 @@ Unable to find equivalent output section for symbol '%s' from section '%s'"), if (flags & BSF_LOCAL) bind = STB_LOCAL; + else if (flags & BSF_GNU_UNIQUE) + bind = STB_GNU_UNIQUE; else if (flags & BSF_WEAK) bind = STB_WEAK; else if (flags & BSF_GLOBAL) @@ -6665,14 +6687,14 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bfd_boolean default_imported_symver) hdr = &elf_tdata (abfd)->dynverref_hdr; - elf_tdata (abfd)->verref = bfd_zalloc2 (abfd, hdr->sh_info, - sizeof (Elf_Internal_Verneed)); + elf_tdata (abfd)->verref = (Elf_Internal_Verneed *) + bfd_zalloc2 (abfd, hdr->sh_info, sizeof (Elf_Internal_Verneed)); if (elf_tdata (abfd)->verref == NULL) goto error_return; elf_tdata (abfd)->cverrefs = hdr->sh_info; - contents = bfd_malloc (hdr->sh_size); + contents = (bfd_byte *) bfd_malloc (hdr->sh_size); if (contents == NULL) { error_return_verref: @@ -6712,8 +6734,9 @@ error_return_verref: iverneed->vn_auxptr = NULL; else { - iverneed->vn_auxptr = bfd_alloc2 (abfd, iverneed->vn_cnt, - sizeof (Elf_Internal_Vernaux)); + iverneed->vn_auxptr = (struct elf_internal_vernaux *) + bfd_alloc2 (abfd, iverneed->vn_cnt, + sizeof (Elf_Internal_Vernaux)); if (iverneed->vn_auxptr == NULL) goto error_return_verref; } @@ -6781,7 +6804,7 @@ error_return_verref: hdr = &elf_tdata (abfd)->dynverdef_hdr; - contents = bfd_malloc (hdr->sh_size); + contents = (bfd_byte *) bfd_malloc (hdr->sh_size); if (contents == NULL) goto error_return; if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0 @@ -6825,8 +6848,8 @@ error_return_verref: else freeidx = ++maxidx; } - elf_tdata (abfd)->verdef = bfd_zalloc2 (abfd, maxidx, - sizeof (Elf_Internal_Verdef)); + elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) + bfd_zalloc2 (abfd, maxidx, sizeof (Elf_Internal_Verdef)); if (elf_tdata (abfd)->verdef == NULL) goto error_return; @@ -6859,8 +6882,9 @@ error_return_verdef: iverdef->vd_auxptr = NULL; else { - iverdef->vd_auxptr = bfd_alloc2 (abfd, iverdef->vd_cnt, - sizeof (Elf_Internal_Verdaux)); + iverdef->vd_auxptr = (struct elf_internal_verdaux *) + bfd_alloc2 (abfd, iverdef->vd_cnt, + sizeof (Elf_Internal_Verdaux)); if (iverdef->vd_auxptr == NULL) goto error_return_verdef; } @@ -6917,8 +6941,8 @@ error_return_verdef: else freeidx++; - elf_tdata (abfd)->verdef = bfd_zalloc2 (abfd, freeidx, - sizeof (Elf_Internal_Verdef)); + elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) + bfd_zalloc2 (abfd, freeidx, sizeof (Elf_Internal_Verdef)); if (elf_tdata (abfd)->verdef == NULL) goto error_return; @@ -6944,7 +6968,8 @@ error_return_verdef: if (iverdef->vd_nodename == NULL) goto error_return_verdef; iverdef->vd_nextdef = NULL; - iverdef->vd_auxptr = bfd_alloc (abfd, sizeof (Elf_Internal_Verdaux)); + iverdef->vd_auxptr = (struct elf_internal_verdaux *) + bfd_alloc (abfd, sizeof (Elf_Internal_Verdaux)); if (iverdef->vd_auxptr == NULL) goto error_return_verdef; @@ -6967,7 +6992,7 @@ _bfd_elf_make_empty_symbol (bfd *abfd) elf_symbol_type *newsym; bfd_size_type amt = sizeof (elf_symbol_type); - newsym = bfd_zalloc (abfd, amt); + newsym = (elf_symbol_type *) bfd_zalloc (abfd, amt); if (!newsym) return NULL; else @@ -7041,7 +7066,7 @@ _bfd_elf_set_arch_mach (bfd *abfd, for error reporting. */ static bfd_boolean -elf_find_function (bfd *abfd ATTRIBUTE_UNUSED, +elf_find_function (bfd *abfd, asection *section, asymbol **symbols, bfd_vma offset, @@ -7061,6 +7086,7 @@ elf_find_function (bfd *abfd ATTRIBUTE_UNUSED, make a better choice of file name for local symbols by ignoring file symbols appearing after a given local symbol. */ enum { nothing_seen, symbol_seen, file_after_symbol_seen } state; + const struct elf_backend_data *bed = get_elf_backend_data (abfd); filename = NULL; func = NULL; @@ -7071,20 +7097,22 @@ elf_find_function (bfd *abfd ATTRIBUTE_UNUSED, for (p = symbols; *p != NULL; p++) { elf_symbol_type *q; + unsigned int type; q = (elf_symbol_type *) *p; - switch (ELF_ST_TYPE (q->internal_elf_sym.st_info)) + type = ELF_ST_TYPE (q->internal_elf_sym.st_info); + switch (type) { - default: - break; case STT_FILE: file = &q->symbol; if (state == symbol_seen) state = file_after_symbol_seen; continue; + default: + if (!bed->is_function_type (type)) + break; case STT_NOTYPE: - case STT_FUNC: if (bfd_get_section (&q->symbol) == section && q->symbol.value >= low_func && q->symbol.value <= offset) @@ -7449,7 +7477,7 @@ _bfd_elfcore_make_pseudosection (bfd *abfd, sprintf (buf, "%s/%d", name, elfcore_make_pid (abfd)); len = strlen (buf) + 1; - threaded_name = bfd_alloc (abfd, len); + threaded_name = (char *) bfd_alloc (abfd, len); if (threaded_name == NULL) return FALSE; memcpy (threaded_name, buf, len); @@ -7607,7 +7635,7 @@ char * _bfd_elfcore_strndup (bfd *abfd, char *start, size_t max) { char *dups; - char *end = memchr (start, '\0', max); + char *end = (char *) memchr (start, '\0', max); size_t len; if (end == NULL) @@ -7615,7 +7643,7 @@ _bfd_elfcore_strndup (bfd *abfd, char *start, size_t max) else len = end - start; - dups = bfd_alloc (abfd, len + 1); + dups = (char *) bfd_alloc (abfd, len + 1); if (dups == NULL) return NULL; @@ -7835,7 +7863,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) sprintf (buf, ".reg/%ld", (long) bfd_get_32 (abfd, note->descdata + 8)); len = strlen (buf) + 1; - name = bfd_alloc (abfd, len); + name = (char *) bfd_alloc (abfd, len); if (name == NULL) return FALSE; @@ -7866,7 +7894,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) sprintf (buf, ".module/%08lx", (unsigned long) base_addr); len = strlen (buf) + 1; - name = bfd_alloc (abfd, len); + name = (char *) bfd_alloc (abfd, len); if (name == NULL) return FALSE; @@ -7977,7 +8005,7 @@ static bfd_boolean elfobj_grok_gnu_build_id (bfd *abfd, Elf_Internal_Note *note) { elf_tdata (abfd)->build_id_size = note->descsz; - elf_tdata (abfd)->build_id = bfd_alloc (abfd, note->descsz); + elf_tdata (abfd)->build_id = (bfd_byte *) bfd_alloc (abfd, note->descsz); if (elf_tdata (abfd)->build_id == NULL) return FALSE; @@ -8098,6 +8126,70 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note) } static bfd_boolean +elfcore_grok_openbsd_procinfo (bfd *abfd, Elf_Internal_Note *note) +{ + /* Signal number at offset 0x08. */ + elf_tdata (abfd)->core_signal + = bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x08); + + /* Process ID at offset 0x20. */ + elf_tdata (abfd)->core_pid + = bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x20); + + /* Command name at 0x48 (max 32 bytes, including nul). */ + elf_tdata (abfd)->core_command + = _bfd_elfcore_strndup (abfd, note->descdata + 0x48, 31); + + return TRUE; +} + +static bfd_boolean +elfcore_grok_openbsd_note (bfd *abfd, Elf_Internal_Note *note) +{ + if (note->type == NT_OPENBSD_PROCINFO) + return elfcore_grok_openbsd_procinfo (abfd, note); + + if (note->type == NT_OPENBSD_REGS) + return elfcore_make_note_pseudosection (abfd, ".reg", note); + + if (note->type == NT_OPENBSD_FPREGS) + return elfcore_make_note_pseudosection (abfd, ".reg2", note); + + if (note->type == NT_OPENBSD_XFPREGS) + return elfcore_make_note_pseudosection (abfd, ".reg-xfp", note); + + if (note->type == NT_OPENBSD_AUXV) + { + asection *sect = bfd_make_section_anyway_with_flags (abfd, ".auxv", + SEC_HAS_CONTENTS); + + if (sect == NULL) + return FALSE; + sect->size = note->descsz; + sect->filepos = note->descpos; + sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32; + + return TRUE; + } + + if (note->type == NT_OPENBSD_WCOOKIE) + { + asection *sect = bfd_make_section_anyway_with_flags (abfd, ".wcookie", + SEC_HAS_CONTENTS); + + if (sect == NULL) + return FALSE; + sect->size = note->descsz; + sect->filepos = note->descpos; + sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32; + + return TRUE; + } + + return TRUE; +} + +static bfd_boolean elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid) { void *ddata = note->descdata; @@ -8132,7 +8224,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid) /* Make a ".qnx_core_status/%d" section. */ sprintf (buf, ".qnx_core_status/%ld", *tid); - name = bfd_alloc (abfd, strlen (buf) + 1); + name = (char *) bfd_alloc (abfd, strlen (buf) + 1); if (name == NULL) return FALSE; strcpy (name, buf); @@ -8161,7 +8253,7 @@ elfcore_grok_nto_regs (bfd *abfd, /* Make a "(base)/%d" section. */ sprintf (buf, "%s/%ld", base, tid); - name = bfd_alloc (abfd, strlen (buf) + 1); + name = (char *) bfd_alloc (abfd, strlen (buf) + 1); if (name == NULL) return FALSE; strcpy (name, buf); @@ -8218,7 +8310,7 @@ elfcore_grok_spu_note (bfd *abfd, Elf_Internal_Note *note) /* Use note name as section name. */ len = note->namesz; - name = bfd_alloc (abfd, len); + name = (char *) bfd_alloc (abfd, len); if (name == NULL) return FALSE; memcpy (name, note->namedata, len); @@ -8272,7 +8364,7 @@ elfcore_write_note (bfd *abfd, newspace = 12 + ((namesz + 3) & -4) + ((size + 3) & -4); - buf = realloc (buf, *bufsiz + newspace); + buf = (char *) realloc (buf, *bufsiz + newspace); if (buf == NULL) return buf; dest = buf + *bufsiz; @@ -8584,6 +8676,11 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset) if (! elfcore_grok_netbsd_note (abfd, &in)) return FALSE; } + else if (CONST_STRNEQ (in.namedata, "OpenBSD")) + { + if (! elfcore_grok_openbsd_note (abfd, &in)) + return FALSE; + } else if (CONST_STRNEQ (in.namedata, "QNX")) { if (! elfcore_grok_nto_note (abfd, &in)) @@ -8627,7 +8724,7 @@ elf_read_notes (bfd *abfd, file_ptr offset, bfd_size_type size) if (bfd_seek (abfd, offset, SEEK_SET) != 0) return FALSE; - buf = bfd_malloc (size); + buf = (char *) bfd_malloc (size); if (buf == NULL) return FALSE; @@ -8845,9 +8942,19 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, size = count * sizeof (asymbol); p = relplt->relocation; for (i = 0; i < count; i++, p += bed->s->int_rels_per_ext_rel) - size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt"); + { + size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt"); + if (p->addend != 0) + { +#ifdef BFD64 + size += sizeof ("+0x") - 1 + 8 + 8 * (bed->s->elfclass == ELFCLASS64); +#else + size += sizeof ("+0x") - 1 + 8; +#endif + } + } - s = *ret = bfd_malloc (size); + s = *ret = (asymbol *) bfd_malloc (size); if (s == NULL) return -1; @@ -8876,6 +8983,19 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, len = strlen ((*p->sym_ptr_ptr)->name); memcpy (names, (*p->sym_ptr_ptr)->name, len); names += len; + if (p->addend != 0) + { + char buf[30], *a; + int len; + memcpy (names, "+0x", sizeof ("+0x") - 1); + names += sizeof ("+0x") - 1; + bfd_sprintf_vma (abfd, buf, p->addend); + for (a = buf; *a == '0'; ++a) + ; + len = strlen (a); + memcpy (names, a, len); + names += len; + } memcpy (names, "@plt", sizeof ("@plt")); names += sizeof ("@plt"); ++s, ++n; @@ -8898,15 +9018,23 @@ _bfd_elf_set_osabi (bfd * abfd, i_ehdrp = elf_elfheader (abfd); i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi; + + /* To make things simpler for the loader on Linux systems we set the + osabi field to ELFOSABI_LINUX if the binary contains symbols of + the STT_GNU_IFUNC type. */ + if (i_ehdrp->e_ident[EI_OSABI] == ELFOSABI_NONE + && elf_tdata (abfd)->has_ifunc_symbols) + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX; } /* Return TRUE for ELF symbol types that represent functions. This is the default version of this function, which is sufficient for - most targets. It returns true if TYPE is STT_FUNC. */ + most targets. It returns true if TYPE is STT_FUNC or STT_GNU_IFUNC. */ bfd_boolean _bfd_elf_is_function_type (unsigned int type) { - return (type == STT_FUNC); + return (type == STT_FUNC + || type == STT_GNU_IFUNC); } diff --git a/cegcc/src/binutils/bfd/elf32-arm.c b/cegcc/src/binutils/bfd/elf32-arm.c index de063e612..b449ee833 100644 --- a/cegcc/src/binutils/bfd/elf32-arm.c +++ b/cegcc/src/binutils/bfd/elf32-arm.c @@ -1,6 +1,6 @@ /* 32-bit ELF support for ARM Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008 Free Software Foundation, Inc. + 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -20,6 +20,8 @@ MA 02110-1301, USA. */ #include "sysdep.h" +#include + #include "bfd.h" #include "libiberty.h" #include "libbfd.h" @@ -59,7 +61,10 @@ #define ARM_ELF_ABI_VERSION 0 #define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM -static struct elf_backend_data elf32_arm_vxworks_bed; +static bfd_boolean elf32_arm_write_section (bfd *output_bfd, + struct bfd_link_info *link_info, + asection *sec, + bfd_byte *contents); /* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g. R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO @@ -1881,7 +1886,8 @@ typedef unsigned short int insn16; interworkable. */ #define INTERWORK_FLAG(abfd) \ (EF_ARM_EABI_VERSION (elf_elfheader (abfd)->e_flags) >= EF_ARM_EABI_VER4 \ - || (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK)) + || (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK) \ + || ((abfd)->flags & BFD_LINKER_CREATED)) /* The linker script knows the section names for placement. The entry_names are used to do simple name mangling on the stubs. @@ -2010,68 +2016,231 @@ static const bfd_vma elf32_arm_symbian_plt_entry [] = #define THM2_MAX_FWD_BRANCH_OFFSET (((1 << 24) - 2) + 4) #define THM2_MAX_BWD_BRANCH_OFFSET (-(1 << 24) + 4) -static const bfd_vma arm_long_branch_stub[] = +enum stub_insn_type { - 0xe51ff004, /* ldr pc, [pc, #-4] */ - 0x00000000, /* dcd R_ARM_ABS32(X) */ + THUMB16_TYPE = 1, + THUMB32_TYPE, + ARM_TYPE, + DATA_TYPE + }; + +#define THUMB16_INSN(X) {(X), THUMB16_TYPE, R_ARM_NONE, 0} +/* A bit of a hack. A Thumb conditional branch, in which the proper condition + is inserted in arm_build_one_stub(). */ +#define THUMB16_BCOND_INSN(X) {(X), THUMB16_TYPE, R_ARM_NONE, 1} +#define THUMB32_INSN(X) {(X), THUMB32_TYPE, R_ARM_NONE, 0} +#define THUMB32_B_INSN(X, Z) {(X), THUMB32_TYPE, R_ARM_THM_JUMP24, (Z)} +#define ARM_INSN(X) {(X), ARM_TYPE, R_ARM_NONE, 0} +#define ARM_REL_INSN(X, Z) {(X), ARM_TYPE, R_ARM_JUMP24, (Z)} +#define DATA_WORD(X,Y,Z) {(X), DATA_TYPE, (Y), (Z)} + +typedef struct +{ + bfd_vma data; + enum stub_insn_type type; + unsigned int r_type; + int reloc_addend; +} insn_sequence; + +/* Arm/Thumb -> Arm/Thumb long branch stub. On V5T and above, use blx + to reach the stub if necessary. */ +static const insn_sequence elf32_arm_stub_long_branch_any_any[] = + { + ARM_INSN(0xe51ff004), /* ldr pc, [pc, #-4] */ + DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */ + }; + +/* V4T Arm -> Thumb long branch stub. Used on V4T where blx is not + available. */ +static const insn_sequence elf32_arm_stub_long_branch_v4t_arm_thumb[] = + { + ARM_INSN(0xe59fc000), /* ldr ip, [pc, #0] */ + ARM_INSN(0xe12fff1c), /* bx ip */ + DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */ + }; + +/* Thumb -> Thumb long branch stub. Used on M-profile architectures. */ +static const insn_sequence elf32_arm_stub_long_branch_thumb_only[] = + { + THUMB16_INSN(0xb401), /* push {r0} */ + THUMB16_INSN(0x4802), /* ldr r0, [pc, #8] */ + THUMB16_INSN(0x4684), /* mov ip, r0 */ + THUMB16_INSN(0xbc01), /* pop {r0} */ + THUMB16_INSN(0x4760), /* bx ip */ + THUMB16_INSN(0xbf00), /* nop */ + DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */ + }; + +/* V4T Thumb -> Thumb long branch stub. Using the stack is not + allowed. */ +static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_thumb[] = + { + THUMB16_INSN(0x4778), /* bx pc */ + THUMB16_INSN(0x46c0), /* nop */ + ARM_INSN(0xe59fc000), /* ldr ip, [pc, #0] */ + ARM_INSN(0xe12fff1c), /* bx ip */ + DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */ + }; + +/* V4T Thumb -> ARM long branch stub. Used on V4T where blx is not + available. */ +static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_arm[] = + { + THUMB16_INSN(0x4778), /* bx pc */ + THUMB16_INSN(0x46c0), /* nop */ + ARM_INSN(0xe51ff004), /* ldr pc, [pc, #-4] */ + DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */ + }; + +/* V4T Thumb -> ARM short branch stub. Shorter variant of the above + one, when the destination is close enough. */ +static const insn_sequence elf32_arm_stub_short_branch_v4t_thumb_arm[] = + { + THUMB16_INSN(0x4778), /* bx pc */ + THUMB16_INSN(0x46c0), /* nop */ + ARM_REL_INSN(0xea000000, -8), /* b (X-8) */ + }; + +/* ARM/Thumb -> ARM long branch stub, PIC. On V5T and above, use + blx to reach the stub if necessary. */ +static const insn_sequence elf32_arm_stub_long_branch_any_arm_pic[] = + { + ARM_INSN(0xe59fc000), /* ldr r12, [pc] */ + ARM_INSN(0xe08ff00c), /* add pc, pc, ip */ + DATA_WORD(0, R_ARM_REL32, -4), /* dcd R_ARM_REL32(X-4) */ + }; + +/* ARM/Thumb -> Thumb long branch stub, PIC. On V5T and above, use + blx to reach the stub if necessary. We can not add into pc; + it is not guaranteed to mode switch (different in ARMv6 and + ARMv7). */ +static const insn_sequence elf32_arm_stub_long_branch_any_thumb_pic[] = + { + ARM_INSN(0xe59fc004), /* ldr r12, [pc, #4] */ + ARM_INSN(0xe08fc00c), /* add ip, pc, ip */ + ARM_INSN(0xe12fff1c), /* bx ip */ + DATA_WORD(0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */ + }; + +/* V4T ARM -> ARM long branch stub, PIC. */ +static const insn_sequence elf32_arm_stub_long_branch_v4t_arm_thumb_pic[] = + { + ARM_INSN(0xe59fc004), /* ldr ip, [pc, #4] */ + ARM_INSN(0xe08fc00c), /* add ip, pc, ip */ + ARM_INSN(0xe12fff1c), /* bx ip */ + DATA_WORD(0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */ + }; + +/* V4T Thumb -> ARM long branch stub, PIC. */ +static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_arm_pic[] = + { + THUMB16_INSN(0x4778), /* bx pc */ + THUMB16_INSN(0x46c0), /* nop */ + ARM_INSN(0xe59fc000), /* ldr ip, [pc, #0] */ + ARM_INSN(0xe08cf00f), /* add pc, ip, pc */ + DATA_WORD(0, R_ARM_REL32, -4), /* dcd R_ARM_REL32(X) */ + }; + +/* Thumb -> Thumb long branch stub, PIC. Used on M-profile + architectures. */ +static const insn_sequence elf32_arm_stub_long_branch_thumb_only_pic[] = + { + THUMB16_INSN(0xb401), /* push {r0} */ + THUMB16_INSN(0x4802), /* ldr r0, [pc, #8] */ + THUMB16_INSN(0x46fc), /* mov ip, pc */ + THUMB16_INSN(0x4484), /* add ip, r0 */ + THUMB16_INSN(0xbc01), /* pop {r0} */ + THUMB16_INSN(0x4760), /* bx ip */ + DATA_WORD(0, R_ARM_REL32, 4), /* dcd R_ARM_REL32(X) */ }; -static const bfd_vma arm_thumb_v4t_long_branch_stub[] = +/* V4T Thumb -> Thumb long branch stub, PIC. Using the stack is not + allowed. */ +static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_thumb_pic[] = { - 0xe59fc000, /* ldr ip, [pc, #0] */ - 0xe12fff1c, /* bx ip */ - 0x00000000, /* dcd R_ARM_ABS32(X) */ + THUMB16_INSN(0x4778), /* bx pc */ + THUMB16_INSN(0x46c0), /* nop */ + ARM_INSN(0xe59fc004), /* ldr ip, [pc, #4] */ + ARM_INSN(0xe08fc00c), /* add ip, pc, ip */ + ARM_INSN(0xe12fff1c), /* bx ip */ + DATA_WORD(0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */ }; -static const bfd_vma arm_thumb_thumb_long_branch_stub[] = +/* Cortex-A8 erratum-workaround stubs. */ + +/* Stub used for conditional branches (which may be beyond +/-1MB away, so we + can't use a conditional branch to reach this stub). */ + +static const insn_sequence elf32_arm_stub_a8_veneer_b_cond[] = { - 0x4e02b540, /* push {r6, lr} */ - /* ldr r6, [pc, #8] */ - 0x473046fe, /* mov lr, pc */ - /* bx r6 */ - 0xbf00bd40, /* pop {r6, pc} */ - /* nop */ - 0x00000000, /* dcd R_ARM_ABS32(X) */ + THUMB16_BCOND_INSN(0xd001), /* b.n true. */ + THUMB32_B_INSN(0xf000b800, -4), /* b.w insn_after_original_branch. */ + THUMB32_B_INSN(0xf000b800, -4) /* true: b.w original_branch_dest. */ }; -static const bfd_vma arm_thumb_arm_v4t_long_branch_stub[] = +/* Stub used for b.w and bl.w instructions. */ + +static const insn_sequence elf32_arm_stub_a8_veneer_b[] = { - 0x4e03b540, /* push {r6, lr} */ - /* ldr r6, [pc, #12] */ - 0x473046fe, /* mov lr, pc */ - /* bx r6 */ - 0xe8bd4040, /* pop {r6, pc} */ - 0xe12fff1e, /* bx lr */ - 0x00000000, /* dcd R_ARM_ABS32(X) */ + THUMB32_B_INSN(0xf000b800, -4) /* b.w original_branch_dest. */ }; -static const bfd_vma arm_thumb_arm_v4t_short_branch_stub[] = +static const insn_sequence elf32_arm_stub_a8_veneer_bl[] = { - 0x46c04778, /* bx pc */ - /* nop */ - 0xea000000, /* b (X) */ + THUMB32_B_INSN(0xf000b800, -4) /* b.w original_branch_dest. */ }; -static const bfd_vma arm_pic_long_branch_stub[] = +/* Stub used for Thumb-2 blx.w instructions. We modified the original blx.w + instruction (which switches to ARM mode) to point to this stub. Jump to the + real destination using an ARM-mode branch. */ + +static const insn_sequence elf32_arm_stub_a8_veneer_blx[] = { - 0xe59fc000, /* ldr r12, [pc] */ - 0xe08ff00c, /* add pc, pc, ip */ - 0x00000000, /* dcd R_ARM_REL32(X) */ + ARM_REL_INSN(0xea000000, -8) /* b original_branch_dest. */ }; /* Section name for stubs is the associated section name plus this string. */ #define STUB_SUFFIX ".stub" -enum elf32_arm_stub_type -{ +/* One entry per long/short branch stub defined above. */ +#define DEF_STUBS \ + DEF_STUB(long_branch_any_any) \ + DEF_STUB(long_branch_v4t_arm_thumb) \ + DEF_STUB(long_branch_thumb_only) \ + DEF_STUB(long_branch_v4t_thumb_thumb) \ + DEF_STUB(long_branch_v4t_thumb_arm) \ + DEF_STUB(short_branch_v4t_thumb_arm) \ + DEF_STUB(long_branch_any_arm_pic) \ + DEF_STUB(long_branch_any_thumb_pic) \ + DEF_STUB(long_branch_v4t_thumb_thumb_pic) \ + DEF_STUB(long_branch_v4t_arm_thumb_pic) \ + DEF_STUB(long_branch_v4t_thumb_arm_pic) \ + DEF_STUB(long_branch_thumb_only_pic) \ + DEF_STUB(a8_veneer_b_cond) \ + DEF_STUB(a8_veneer_b) \ + DEF_STUB(a8_veneer_bl) \ + DEF_STUB(a8_veneer_blx) + +#define DEF_STUB(x) arm_stub_##x, +enum elf32_arm_stub_type { arm_stub_none, - arm_stub_long_branch, - arm_thumb_v4t_stub_long_branch, - arm_thumb_thumb_stub_long_branch, - arm_thumb_arm_v4t_stub_long_branch, - arm_thumb_arm_v4t_stub_short_branch, - arm_stub_pic_long_branch, + DEF_STUBS + /* Note the first a8_veneer type */ + arm_stub_a8_veneer_lwm = arm_stub_a8_veneer_b_cond +}; +#undef DEF_STUB + +typedef struct +{ + const insn_sequence* template_sequence; + int template_size; +} stub_def; + +#define DEF_STUB(x) {elf32_arm_stub_##x, ARRAY_SIZE(elf32_arm_stub_##x)}, +static const stub_def stub_definitions[] = { + {NULL, 0}, + DEF_STUBS }; struct elf32_arm_stub_hash_entry @@ -2090,7 +2259,21 @@ struct elf32_arm_stub_hash_entry bfd_vma target_value; asection *target_section; + /* Offset to apply to relocation referencing target_value. */ + bfd_vma target_addend; + + /* The instruction which caused this stub to be generated (only valid for + Cortex-A8 erratum workaround stubs at present). */ + unsigned long orig_insn; + + /* The stub type. */ enum elf32_arm_stub_type stub_type; + /* Its encoding size in bytes. */ + int stub_size; + /* Its template. */ + const insn_sequence *stub_template; + /* The size of the template (number of entries). */ + int stub_template_size; /* The symbol table entry, if any, that this was derived from. */ struct elf32_arm_link_hash_entry *h; @@ -2150,20 +2333,86 @@ typedef struct elf32_vfp11_erratum_list } elf32_vfp11_erratum_list; +typedef enum +{ + DELETE_EXIDX_ENTRY, + INSERT_EXIDX_CANTUNWIND_AT_END +} +arm_unwind_edit_type; + +/* A (sorted) list of edits to apply to an unwind table. */ +typedef struct arm_unwind_table_edit +{ + arm_unwind_edit_type type; + /* Note: we sometimes want to insert an unwind entry corresponding to a + section different from the one we're currently writing out, so record the + (text) section this edit relates to here. */ + asection *linked_section; + unsigned int index; + struct arm_unwind_table_edit *next; +} +arm_unwind_table_edit; + typedef struct _arm_elf_section_data { + /* Information about mapping symbols. */ struct bfd_elf_section_data elf; unsigned int mapcount; unsigned int mapsize; elf32_arm_section_map *map; + /* Information about CPU errata. */ unsigned int erratumcount; elf32_vfp11_erratum_list *erratumlist; + /* Information about unwind tables. */ + union + { + /* Unwind info attached to a text section. */ + struct + { + asection *arm_exidx_sec; + } text; + + /* Unwind info attached to an .ARM.exidx section. */ + struct + { + arm_unwind_table_edit *unwind_edit_list; + arm_unwind_table_edit *unwind_edit_tail; + } exidx; + } u; } _arm_elf_section_data; #define elf32_arm_section_data(sec) \ ((_arm_elf_section_data *) elf_section_data (sec)) +/* A fix which might be required for Cortex-A8 Thumb-2 branch/TLB erratum. + These fixes are subject to a relaxation procedure (in elf32_arm_size_stubs), + so may be created multiple times: we use an array of these entries whilst + relaxing which we can refresh easily, then create stubs for each potentially + erratum-triggering instruction once we've settled on a solution. */ + +struct a8_erratum_fix { + bfd *input_bfd; + asection *section; + bfd_vma offset; + bfd_vma addend; + unsigned long orig_insn; + char *stub_name; + enum elf32_arm_stub_type stub_type; +}; + +/* A table of relocs applied to branches which might trigger Cortex-A8 + erratum. */ + +struct a8_erratum_reloc { + bfd_vma from; + bfd_vma destination; + unsigned int r_type; + unsigned char st_type; + const char *sym_name; + bfd_boolean non_a8_stub; +}; + /* The size of the thread control block. */ #define TCB_SIZE 8 @@ -2272,6 +2521,17 @@ struct elf32_arm_link_hash_entry ((struct elf32_arm_stub_hash_entry *) \ bfd_hash_lookup ((table), (string), (create), (copy))) +/* Array to keep track of which stub sections have been created, and + information on stub grouping. */ +struct map_stub +{ + /* This is the section to which stubs in the group will be + attached. */ + asection *link_sec; + /* The stub section. */ + asection *stub_sec; +}; + /* ARM ELF linker hash table. */ struct elf32_arm_link_hash_table { @@ -2295,6 +2555,12 @@ struct elf32_arm_link_hash_table veneers. */ bfd_size_type vfp11_erratum_glue_size; + /* A table of fix locations for Cortex-A8 Thumb-2 branch/TLB erratum. This + holds Cortex-A8 erratum fix locations between elf32_arm_size_stubs() and + elf32_arm_write_section(). */ + struct a8_erratum_fix *a8_erratum_fixes; + unsigned int num_a8_erratum_fixes; + /* An arbitrary input BFD chosen to hold the glue sections. */ bfd * bfd_of_glue_owner; @@ -2313,6 +2579,9 @@ struct elf32_arm_link_hash_table 2 = Generate v4 interworing stubs. */ int fix_v4bx; + /* Whether we should fix the Cortex-A8 Thumb-2 branch/TLB erratum. */ + int fix_cortex_a8; + /* Nonzero if the ARM/Thumb BLX instructions are available for use. */ int use_blx; @@ -2360,8 +2629,8 @@ struct elf32_arm_link_hash_table bfd_vma offset; } tls_ldm_got; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; /* For convenience in allocate_dynrelocs. */ bfd * obfd; @@ -2378,14 +2647,7 @@ struct elf32_arm_link_hash_table /* Array to keep track of which stub sections have been created, and information on stub grouping. */ - struct map_stub - { - /* This is the section to which stubs in the group will be - attached. */ - asection *link_sec; - /* The stub section. */ - asection *stub_sec; - } *stub_group; + struct map_stub *stub_group; /* Assorted information used by elf32_arm_size_stubs. */ unsigned int bfd_count; @@ -2406,7 +2668,8 @@ elf32_arm_link_hash_newfunc (struct bfd_hash_entry * entry, /* Allocate the structure if it has not already been allocated by a subclass. */ if (ret == NULL) - ret = bfd_hash_allocate (table, sizeof (struct elf32_arm_link_hash_entry)); + ret = (struct elf32_arm_link_hash_entry *) + bfd_hash_allocate (table, sizeof (struct elf32_arm_link_hash_entry)); if (ret == NULL) return (struct bfd_hash_entry *) ret; @@ -2440,8 +2703,8 @@ stub_hash_newfunc (struct bfd_hash_entry *entry, subclass. */ if (entry == NULL) { - entry = bfd_hash_allocate (table, - sizeof (struct elf32_arm_stub_hash_entry)); + entry = (struct bfd_hash_entry *) + bfd_hash_allocate (table, sizeof (struct elf32_arm_stub_hash_entry)); if (entry == NULL) return entry; } @@ -2458,9 +2721,15 @@ stub_hash_newfunc (struct bfd_hash_entry *entry, eh->stub_offset = 0; eh->target_value = 0; eh->target_section = NULL; + eh->target_addend = 0; + eh->orig_insn = 0; eh->stub_type = arm_stub_none; + eh->stub_size = 0; + eh->stub_template = NULL; + eh->stub_template_size = 0; eh->h = NULL; eh->id_sec = NULL; + eh->output_name = NULL; } return entry; @@ -2487,15 +2756,9 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) if (!htab->sgot || !htab->sgotplt) abort (); - htab->srelgot = bfd_make_section_with_flags (dynobj, - RELOC_SECTION (htab, ".got"), - (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)); - if (htab->srelgot == NULL - || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2)) + htab->srelgot = bfd_get_section_by_name (dynobj, + RELOC_SECTION (htab, ".got")); + if (htab->srelgot == NULL) return FALSE; return TRUE; } @@ -2622,7 +2885,7 @@ elf32_arm_link_hash_table_create (bfd *abfd) struct elf32_arm_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf32_arm_link_hash_table); - ret = bfd_malloc (amt); + ret = (struct elf32_arm_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; @@ -2649,6 +2912,7 @@ elf32_arm_link_hash_table_create (bfd *abfd) ret->vfp11_fix = BFD_ARM_VFP11_FIX_NONE; ret->vfp11_erratum_glue_size = 0; ret->num_vfp11_fixes = 0; + ret->fix_cortex_a8 = 0; ret->bfd_of_glue_owner = NULL; ret->byteswap_code = 0; ret->target1_is_rel = 0; @@ -2665,7 +2929,7 @@ elf32_arm_link_hash_table_create (bfd *abfd) ret->vxworks_p = 0; ret->symbian_p = 0; ret->use_rel = 1; - ret->sym_sec.abfd = NULL; + ret->sym_cache.abfd = NULL; ret->obfd = abfd; ret->tls_ldm_got.refcount = 0; ret->stub_bfd = NULL; @@ -2726,14 +2990,36 @@ using_thumb2 (struct elf32_arm_link_hash_table *globals) return arch == TAG_CPU_ARCH_V6T2 || arch >= TAG_CPU_ARCH_V7; } +/* Determine what kind of NOPs are available. */ + +static bfd_boolean +arch_has_arm_nop (struct elf32_arm_link_hash_table *globals) +{ + const int arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC, + Tag_CPU_arch); + return arch == TAG_CPU_ARCH_V6T2 + || arch == TAG_CPU_ARCH_V6K + || arch == TAG_CPU_ARCH_V7; +} + +static bfd_boolean +arch_has_thumb2_nop (struct elf32_arm_link_hash_table *globals) +{ + const int arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC, + Tag_CPU_arch); + return arch == TAG_CPU_ARCH_V6T2 || arch == TAG_CPU_ARCH_V7; +} + static bfd_boolean arm_stub_is_thumb (enum elf32_arm_stub_type stub_type) { switch (stub_type) { - case arm_thumb_thumb_stub_long_branch: - case arm_thumb_arm_v4t_stub_long_branch: - case arm_thumb_arm_v4t_stub_short_branch: + case arm_stub_long_branch_thumb_only: + case arm_stub_long_branch_v4t_thumb_arm: + case arm_stub_short_branch_v4t_thumb_arm: + case arm_stub_long_branch_v4t_thumb_arm_pic: + case arm_stub_long_branch_thumb_only_pic: return TRUE; case arm_stub_none: BFD_FAIL (); @@ -2764,6 +3050,7 @@ arm_type_of_stub (struct bfd_link_info *info, int thumb2; int thumb_only; enum elf32_arm_stub_type stub_type = arm_stub_none; + int use_plt = 0; /* We don't know the actual type of destination in case it is of type STT_SECTION: give up. */ @@ -2785,20 +3072,40 @@ arm_type_of_stub (struct bfd_link_info *info, r_type = ELF32_R_TYPE (rel->r_info); - /* If the call will go through a PLT entry then we do not need - glue. */ + /* Keep a simpler condition, for the sake of clarity. */ if (globals->splt != NULL && hash != NULL && hash->root.plt.offset != (bfd_vma) -1) - return stub_type; - - if (r_type == R_ARM_THM_CALL) { + use_plt = 1; + /* Note when dealing with PLT entries: the main PLT stub is in + ARM mode, so if the branch is in Thumb mode, another + Thumb->ARM stub will be inserted later just before the ARM + PLT stub. We don't take this extra distance into account + here, because if a long branch stub is needed, we'll add a + Thumb->Arm one and branch directly to the ARM PLT entry + because it avoids spreading offset corrections in several + places. */ + } + + if (r_type == R_ARM_THM_CALL || r_type == R_ARM_THM_JUMP24) + { + /* Handle cases where: + - this call goes too far (different Thumb/Thumb2 max + distance) + - it's a Thumb->Arm call and blx is not available, or it's a + Thumb->Arm branch (not bl). A stub is needed in this case, + but only if this call is not through a PLT entry. Indeed, + PLT stubs handle mode switching already. + */ if ((!thumb2 && (branch_offset > THM_MAX_FWD_BRANCH_OFFSET || (branch_offset < THM_MAX_BWD_BRANCH_OFFSET))) || (thumb2 && (branch_offset > THM2_MAX_FWD_BRANCH_OFFSET || (branch_offset < THM2_MAX_BWD_BRANCH_OFFSET))) - || ((st_type != STT_ARM_TFUNC) && !globals->use_blx)) + || ((st_type != STT_ARM_TFUNC) + && (((r_type == R_ARM_THM_CALL) && !globals->use_blx) + || (r_type == R_ARM_THM_JUMP24)) + && !use_plt)) { if (st_type == STT_ARM_TFUNC) { @@ -2806,20 +3113,32 @@ arm_type_of_stub (struct bfd_link_info *info, if (!thumb_only) { stub_type = (info->shared | globals->pic_veneer) - ? ((globals->use_blx) - ? arm_stub_pic_long_branch - : arm_stub_none) - : (globals->use_blx) - ? arm_stub_long_branch - : arm_stub_none; + /* PIC stubs. */ + ? ((globals->use_blx + && (r_type ==R_ARM_THM_CALL)) + /* V5T and above. Stub starts with ARM code, so + we must be able to switch mode before + reaching it, which is only possible for 'bl' + (ie R_ARM_THM_CALL relocation). */ + ? arm_stub_long_branch_any_thumb_pic + /* On V4T, use Thumb code only. */ + : arm_stub_long_branch_v4t_thumb_thumb_pic) + + /* non-PIC stubs. */ + : ((globals->use_blx + && (r_type ==R_ARM_THM_CALL)) + /* V5T and above. */ + ? arm_stub_long_branch_any_any + /* V4T. */ + : arm_stub_long_branch_v4t_thumb_thumb); } else { stub_type = (info->shared | globals->pic_veneer) - ? arm_stub_none - : (globals->use_blx) - ? arm_thumb_thumb_stub_long_branch - : arm_stub_none; + /* PIC stub. */ + ? arm_stub_long_branch_thumb_only_pic + /* non-PIC stub. */ + : arm_stub_long_branch_thumb_only; } } else @@ -2836,22 +3155,31 @@ arm_type_of_stub (struct bfd_link_info *info, } stub_type = (info->shared | globals->pic_veneer) - ? ((globals->use_blx) - ? arm_stub_pic_long_branch - : arm_stub_none) - : (globals->use_blx) - ? arm_stub_long_branch - : arm_thumb_arm_v4t_stub_long_branch; + /* PIC stubs. */ + ? ((globals->use_blx + && (r_type ==R_ARM_THM_CALL)) + /* V5T and above. */ + ? arm_stub_long_branch_any_arm_pic + /* V4T PIC stub. */ + : arm_stub_long_branch_v4t_thumb_arm_pic) + + /* non-PIC stubs. */ + : ((globals->use_blx + && (r_type ==R_ARM_THM_CALL)) + /* V5T and above. */ + ? arm_stub_long_branch_any_any + /* V4T. */ + : arm_stub_long_branch_v4t_thumb_arm); /* Handle v4t short branches. */ - if ((stub_type == arm_thumb_arm_v4t_stub_long_branch) + if ((stub_type == arm_stub_long_branch_v4t_thumb_arm) && (branch_offset <= THM_MAX_FWD_BRANCH_OFFSET) && (branch_offset >= THM_MAX_BWD_BRANCH_OFFSET)) - stub_type = arm_thumb_arm_v4t_stub_short_branch; + stub_type = arm_stub_short_branch_v4t_thumb_arm; } } } - else if (r_type == R_ARM_CALL) + else if (r_type == R_ARM_CALL || r_type == R_ARM_JUMP24 || r_type == R_ARM_PLT32) { if (st_type == STT_ARM_TFUNC) { @@ -2863,7 +3191,7 @@ arm_type_of_stub (struct bfd_link_info *info, { (*_bfd_error_handler) (_("%B(%s): warning: interworking not enabled.\n" - " first occurrence: %B: Thumb call to ARM"), + " first occurrence: %B: ARM call to Thumb"), sym_sec->owner, input_bfd, name); } @@ -2871,13 +3199,24 @@ arm_type_of_stub (struct bfd_link_info *info, the mode change (bit 24 (H) of BLX encoding). */ if (branch_offset > (ARM_MAX_FWD_BRANCH_OFFSET + 2) || (branch_offset < ARM_MAX_BWD_BRANCH_OFFSET) - || !globals->use_blx) + || ((r_type == R_ARM_CALL) && !globals->use_blx) + || (r_type == R_ARM_JUMP24) + || (r_type == R_ARM_PLT32)) { stub_type = (info->shared | globals->pic_veneer) - ? arm_stub_pic_long_branch - : (globals->use_blx) - ? arm_stub_long_branch - : arm_thumb_v4t_stub_long_branch; + /* PIC stubs. */ + ? ((globals->use_blx) + /* V5T and above. */ + ? arm_stub_long_branch_any_thumb_pic + /* V4T stub. */ + : arm_stub_long_branch_v4t_arm_thumb_pic) + + /* non-PIC stubs. */ + : ((globals->use_blx) + /* V5T and above. */ + ? arm_stub_long_branch_any_any + /* V4T. */ + : arm_stub_long_branch_v4t_arm_thumb); } } else @@ -2887,8 +3226,10 @@ arm_type_of_stub (struct bfd_link_info *info, || (branch_offset < ARM_MAX_BWD_BRANCH_OFFSET)) { stub_type = (info->shared | globals->pic_veneer) - ? arm_stub_pic_long_branch - : arm_stub_long_branch; + /* PIC stubs. */ + ? arm_stub_long_branch_any_arm_pic + /* non-PIC stubs. */ + : arm_stub_long_branch_any_any; } } } @@ -2910,7 +3251,7 @@ elf32_arm_stub_name (const asection *input_section, if (hash) { len = 8 + 1 + strlen (hash->root.root.root.string) + 1 + 8 + 1; - stub_name = bfd_malloc (len); + stub_name = (char *) bfd_malloc (len); if (stub_name != NULL) sprintf (stub_name, "%08x_%s+%x", input_section->id & 0xffffffff, @@ -2920,7 +3261,7 @@ elf32_arm_stub_name (const asection *input_section, else { len = 8 + 1 + 8 + 1 + 8 + 1 + 8 + 1; - stub_name = bfd_malloc (len); + stub_name = (char *) bfd_malloc (len); if (stub_name != NULL) sprintf (stub_name, "%08x_%x:%x+%x", input_section->id & 0xffffffff, @@ -2981,17 +3322,16 @@ elf32_arm_get_stub_entry (const asection *input_section, return stub_entry; } -/* Add a new stub entry to the stub hash. Not all fields of the new - stub entry are initialised. */ +/* Find or create a stub section. Returns a pointer to the stub section, and + the section to which the stub section will be attached (in *LINK_SEC_P). + LINK_SEC_P may be NULL. */ -static struct elf32_arm_stub_hash_entry * -elf32_arm_add_stub (const char *stub_name, - asection *section, - struct elf32_arm_link_hash_table *htab) +static asection * +elf32_arm_create_or_find_stub_sec (asection **link_sec_p, asection *section, + struct elf32_arm_link_hash_table *htab) { asection *link_sec; asection *stub_sec; - struct elf32_arm_stub_hash_entry *stub_entry; link_sec = htab->stub_group[section->id].link_sec; stub_sec = htab->stub_group[section->id].stub_sec; @@ -3006,7 +3346,7 @@ elf32_arm_add_stub (const char *stub_name, namelen = strlen (link_sec->name); len = namelen + sizeof (STUB_SUFFIX); - s_name = bfd_alloc (htab->stub_bfd, len); + s_name = (char *) bfd_alloc (htab->stub_bfd, len); if (s_name == NULL) return NULL; @@ -3019,6 +3359,28 @@ elf32_arm_add_stub (const char *stub_name, } htab->stub_group[section->id].stub_sec = stub_sec; } + + if (link_sec_p) + *link_sec_p = link_sec; + + return stub_sec; +} + +/* Add a new stub entry to the stub hash. Not all fields of the new + stub entry are initialised. */ + +static struct elf32_arm_stub_hash_entry * +elf32_arm_add_stub (const char *stub_name, + asection *section, + struct elf32_arm_link_hash_table *htab) +{ + asection *link_sec; + asection *stub_sec; + struct elf32_arm_stub_hash_entry *stub_entry; + + stub_sec = elf32_arm_create_or_find_stub_sec (&link_sec, section, htab); + if (stub_sec == NULL) + return NULL; /* Enter this entry into the linker stub hash table. */ stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name, @@ -3064,10 +3426,16 @@ put_thumb_insn (struct elf32_arm_link_hash_table * htab, bfd_putb16 (val, ptr); } +static bfd_reloc_status_type elf32_arm_final_link_relocate + (reloc_howto_type *, bfd *, bfd *, asection *, bfd_byte *, + Elf_Internal_Rela *, bfd_vma, struct bfd_link_info *, asection *, + const char *, int, struct elf_link_hash_entry *, bfd_boolean *, char **); + static bfd_boolean arm_build_one_stub (struct bfd_hash_entry *gen_entry, void * in_arg) { +#define MAXRELOCS 2 struct elf32_arm_stub_hash_entry *stub_entry; struct bfd_link_info *info; struct elf32_arm_link_hash_table *htab; @@ -3078,9 +3446,12 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, bfd_vma sym_value; int template_size; int size; - const bfd_vma *template; + const insn_sequence *template_sequence; int i; struct elf32_arm_link_hash_table * globals; + int stub_reloc_idx[MAXRELOCS] = {-1, -1}; + int stub_reloc_offset[MAXRELOCS] = {0, 0}; + int nrelocs = 0; /* Massage our args to the form they really have. */ stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry; @@ -3091,6 +3462,12 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, htab = elf32_arm_hash_table (info); stub_sec = stub_entry->stub_sec; + if ((htab->fix_cortex_a8 < 0) + != (stub_entry->stub_type >= arm_stub_a8_veneer_lwm)) + /* We have to do the a8 fixes last, as they are less aligned than + the other veneers. */ + return TRUE; + /* Make a note of the offset within the stubs for this entry. */ stub_entry->stub_offset = stub_sec->size; loc = stub_sec->contents + stub_entry->stub_offset; @@ -3106,102 +3483,179 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, + stub_entry->target_section->output_offset + stub_entry->target_section->output_section->vma); - switch (stub_entry->stub_type) - { - case arm_stub_long_branch: - template = arm_long_branch_stub; - template_size = (sizeof (arm_long_branch_stub) / sizeof (bfd_vma)) * 4; - break; - case arm_thumb_v4t_stub_long_branch: - template = arm_thumb_v4t_long_branch_stub; - template_size = (sizeof (arm_thumb_v4t_long_branch_stub) / sizeof (bfd_vma)) * 4; - break; - case arm_thumb_thumb_stub_long_branch: - template = arm_thumb_thumb_long_branch_stub; - template_size = (sizeof (arm_thumb_thumb_long_branch_stub) / sizeof (bfd_vma)) * 4; - break; - case arm_thumb_arm_v4t_stub_long_branch: - template = arm_thumb_arm_v4t_long_branch_stub; - template_size = (sizeof (arm_thumb_arm_v4t_long_branch_stub) / sizeof (bfd_vma)) * 4; - break; - case arm_thumb_arm_v4t_stub_short_branch: - template = arm_thumb_arm_v4t_short_branch_stub; - template_size = (sizeof(arm_thumb_arm_v4t_short_branch_stub) / sizeof (bfd_vma)) * 4; - break; - case arm_stub_pic_long_branch: - template = arm_pic_long_branch_stub; - template_size = (sizeof (arm_pic_long_branch_stub) / sizeof (bfd_vma)) * 4; - break; - default: - BFD_FAIL (); - return FALSE; - } + template_sequence = stub_entry->stub_template; + template_size = stub_entry->stub_template_size; size = 0; - for (i = 0; i < (template_size / 4); i++) + for (i = 0; i < template_size; i++) { - /* A 0 pattern is a placeholder, every other pattern is an - instruction. */ - if (template[i] != 0) - put_arm_insn (globals, stub_bfd, template[i], loc + size); - else - bfd_put_32 (stub_bfd, template[i], loc + size); + switch (template_sequence[i].type) + { + case THUMB16_TYPE: + { + bfd_vma data = (bfd_vma) template_sequence[i].data; + if (template_sequence[i].reloc_addend != 0) + { + /* We've borrowed the reloc_addend field to mean we should + insert a condition code into this (Thumb-1 branch) + instruction. See THUMB16_BCOND_INSN. */ + BFD_ASSERT ((data & 0xff00) == 0xd000); + data |= ((stub_entry->orig_insn >> 22) & 0xf) << 8; + } + put_thumb_insn (globals, stub_bfd, data, loc + size); + size += 2; + } + break; + + case THUMB32_TYPE: + put_thumb_insn (globals, stub_bfd, + (template_sequence[i].data >> 16) & 0xffff, + loc + size); + put_thumb_insn (globals, stub_bfd, template_sequence[i].data & 0xffff, + loc + size + 2); + if (template_sequence[i].r_type != R_ARM_NONE) + { + stub_reloc_idx[nrelocs] = i; + stub_reloc_offset[nrelocs++] = size; + } + size += 4; + break; - size += 4; + case ARM_TYPE: + put_arm_insn (globals, stub_bfd, template_sequence[i].data, + loc + size); + /* Handle cases where the target is encoded within the + instruction. */ + if (template_sequence[i].r_type == R_ARM_JUMP24) + { + stub_reloc_idx[nrelocs] = i; + stub_reloc_offset[nrelocs++] = size; + } + size += 4; + break; + + case DATA_TYPE: + bfd_put_32 (stub_bfd, template_sequence[i].data, loc + size); + stub_reloc_idx[nrelocs] = i; + stub_reloc_offset[nrelocs++] = size; + size += 4; + break; + + default: + BFD_FAIL (); + return FALSE; + } } + stub_sec->size += size; + /* Stub size has already been computed in arm_size_one_stub. Check + consistency. */ + BFD_ASSERT (size == stub_entry->stub_size); + /* Destination is Thumb. Force bit 0 to 1 to reflect this. */ if (stub_entry->st_type == STT_ARM_TFUNC) sym_value |= 1; - switch (stub_entry->stub_type) - { - case arm_stub_long_branch: - _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_ABS32), - stub_bfd, stub_sec, stub_sec->contents, - stub_entry->stub_offset + 4, sym_value, 0); - break; - case arm_thumb_v4t_stub_long_branch: - _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_ABS32), - stub_bfd, stub_sec, stub_sec->contents, - stub_entry->stub_offset + 8, sym_value, 0); - break; - case arm_thumb_thumb_stub_long_branch: - _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_ABS32), - stub_bfd, stub_sec, stub_sec->contents, - stub_entry->stub_offset + 12, sym_value, 0); - break; - case arm_thumb_arm_v4t_stub_long_branch: - _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_ABS32), - stub_bfd, stub_sec, stub_sec->contents, - stub_entry->stub_offset + 16, sym_value, 0); - break; - case arm_thumb_arm_v4t_stub_short_branch: + /* Assume there is at least one and at most MAXRELOCS entries to relocate + in each stub. */ + BFD_ASSERT (nrelocs != 0 && nrelocs <= MAXRELOCS); + + for (i = 0; i < nrelocs; i++) + if (template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_JUMP24 + || template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_JUMP19 + || template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_CALL + || template_sequence[stub_reloc_idx[i]].r_type == R_ARM_THM_XPC22) + { + Elf_Internal_Rela rel; + bfd_boolean unresolved_reloc; + char *error_message; + int sym_flags + = (template_sequence[stub_reloc_idx[i]].r_type != R_ARM_THM_XPC22) + ? STT_ARM_TFUNC : 0; + bfd_vma points_to = sym_value + stub_entry->target_addend; + + rel.r_offset = stub_entry->stub_offset + stub_reloc_offset[i]; + rel.r_info = ELF32_R_INFO (0, + template_sequence[stub_reloc_idx[i]].r_type); + rel.r_addend = template_sequence[stub_reloc_idx[i]].reloc_addend; + + if (stub_entry->stub_type == arm_stub_a8_veneer_b_cond && i == 0) + /* The first relocation in the elf32_arm_stub_a8_veneer_b_cond[] + template should refer back to the instruction after the original + branch. */ + points_to = sym_value; + + /* There may be unintended consequences if this is not true. */ + BFD_ASSERT (stub_entry->h == NULL); + + /* Note: _bfd_final_link_relocate doesn't handle these relocations + properly. We should probably use this function unconditionally, + rather than only for certain relocations listed in the enclosing + conditional, for the sake of consistency. */ + elf32_arm_final_link_relocate (elf32_arm_howto_from_type + (template_sequence[stub_reloc_idx[i]].r_type), + stub_bfd, info->output_bfd, stub_sec, stub_sec->contents, &rel, + points_to, info, stub_entry->target_section, "", sym_flags, + (struct elf_link_hash_entry *) stub_entry->h, &unresolved_reloc, + &error_message); + } + else { - long int rel_offset; - static const insn32 t2a3_b_insn = 0xea000000; + _bfd_final_link_relocate (elf32_arm_howto_from_type + (template_sequence[stub_reloc_idx[i]].r_type), stub_bfd, stub_sec, + stub_sec->contents, stub_entry->stub_offset + stub_reloc_offset[i], + sym_value + stub_entry->target_addend, + template_sequence[stub_reloc_idx[i]].reloc_addend); + } - rel_offset = sym_value - (stub_addr + 8 + 4); + return TRUE; +#undef MAXRELOCS +} - put_arm_insn (globals, stub_bfd, - (bfd_vma) t2a3_b_insn | ((rel_offset >> 2) & 0x00FFFFFF), - loc + 4); - } - break; +/* Calculate the template, template size and instruction size for a stub. + Return value is the instruction size. */ - case arm_stub_pic_long_branch: - /* We want the value relative to the address 8 bytes from the - start of the stub. */ - _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_REL32), - stub_bfd, stub_sec, stub_sec->contents, - stub_entry->stub_offset + 8, sym_value, 0); - break; - default: - break; +static unsigned int +find_stub_size_and_template (enum elf32_arm_stub_type stub_type, + const insn_sequence **stub_template, + int *stub_template_size) +{ + const insn_sequence *template_sequence = NULL; + int template_size = 0, i; + unsigned int size; + + template_sequence = stub_definitions[stub_type].template_sequence; + template_size = stub_definitions[stub_type].template_size; + + size = 0; + for (i = 0; i < template_size; i++) + { + switch (template_sequence[i].type) + { + case THUMB16_TYPE: + size += 2; + break; + + case ARM_TYPE: + case THUMB32_TYPE: + case DATA_TYPE: + size += 4; + break; + + default: + BFD_FAIL (); + return FALSE; + } } - return TRUE; + if (stub_template) + *stub_template = template_sequence; + + if (stub_template_size) + *stub_template_size = template_size; + + return size; } /* As above, but don't actually build the stub. Just bump offset so @@ -3213,52 +3667,26 @@ arm_size_one_stub (struct bfd_hash_entry *gen_entry, { struct elf32_arm_stub_hash_entry *stub_entry; struct elf32_arm_link_hash_table *htab; - const bfd_vma *template; - int template_size; - int size; - int i; + const insn_sequence *template_sequence; + int template_size, size; /* Massage our args to the form they really have. */ stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry; htab = (struct elf32_arm_link_hash_table *) in_arg; - switch (stub_entry->stub_type) - { - case arm_stub_long_branch: - template = arm_long_branch_stub; - template_size = (sizeof (arm_long_branch_stub) / sizeof (bfd_vma)) * 4; - break; - case arm_thumb_v4t_stub_long_branch: - template = arm_thumb_v4t_long_branch_stub; - template_size = (sizeof (arm_thumb_v4t_long_branch_stub) / sizeof (bfd_vma)) * 4; - break; - case arm_thumb_thumb_stub_long_branch: - template = arm_thumb_thumb_long_branch_stub; - template_size = (sizeof (arm_thumb_thumb_long_branch_stub) / sizeof (bfd_vma)) * 4; - break; - case arm_thumb_arm_v4t_stub_long_branch: - template = arm_thumb_arm_v4t_long_branch_stub; - template_size = (sizeof (arm_thumb_arm_v4t_long_branch_stub) / sizeof (bfd_vma)) * 4; - break; - case arm_thumb_arm_v4t_stub_short_branch: - template = arm_thumb_arm_v4t_short_branch_stub; - template_size = (sizeof(arm_thumb_arm_v4t_short_branch_stub) / sizeof (bfd_vma)) * 4; - break; - case arm_stub_pic_long_branch: - template = arm_pic_long_branch_stub; - template_size = (sizeof (arm_pic_long_branch_stub) / sizeof (bfd_vma)) * 4; - break; - default: - BFD_FAIL (); - return FALSE; - break; - } + BFD_ASSERT((stub_entry->stub_type > arm_stub_none) + && stub_entry->stub_type < ARRAY_SIZE(stub_definitions)); + + size = find_stub_size_and_template (stub_entry->stub_type, &template_sequence, + &template_size); + + stub_entry->stub_size = size; + stub_entry->stub_template = template_sequence; + stub_entry->stub_template_size = template_size; - size = 0; - for (i = 0; i < (template_size / 4); i++) - size += 4; size = (size + 7) & ~7; stub_entry->stub_sec->size += size; + return TRUE; } @@ -3300,7 +3728,7 @@ elf32_arm_setup_section_lists (bfd *output_bfd, htab->bfd_count = bfd_count; amt = sizeof (struct map_stub) * (top_id + 1); - htab->stub_group = bfd_zmalloc (amt); + htab->stub_group = (struct map_stub *) bfd_zmalloc (amt); if (htab->stub_group == NULL) return -1; @@ -3317,7 +3745,7 @@ elf32_arm_setup_section_lists (bfd *output_bfd, htab->top_index = top_index; amt = sizeof (asection *) * (top_index + 1); - input_list = bfd_malloc (amt); + input_list = (asection **) bfd_malloc (amt); htab->input_list = input_list; if (input_list == NULL) return -1; @@ -3360,7 +3788,7 @@ elf32_arm_next_input_section (struct bfd_link_info *info, /* Steal the link_sec pointer for our list. */ #define PREV_SEC(sec) (htab->stub_group[(sec)->id].link_sec) /* This happens to make the list in reverse order, - which is what we want. */ + which we reverse later. */ PREV_SEC (isec) = *list; *list = isec; } @@ -3369,7 +3797,7 @@ elf32_arm_next_input_section (struct bfd_link_info *info, /* See whether we can group stub sections together. Grouping stub sections may result in fewer stubs. More importantly, we need to - put all .init* and .fini* stubs at the beginning of the .init or + put all .init* and .fini* stubs at the end of the .init or .fini output sections respectively, because glibc splits the _init and _fini functions into multiple parts. Putting a stub in the middle of a function is not a good idea. */ @@ -3377,101 +3805,459 @@ elf32_arm_next_input_section (struct bfd_link_info *info, static void group_sections (struct elf32_arm_link_hash_table *htab, bfd_size_type stub_group_size, - bfd_boolean stubs_always_before_branch) + bfd_boolean stubs_always_after_branch) { - asection **list = htab->input_list + htab->top_index; + asection **list = htab->input_list; do { asection *tail = *list; + asection *head; if (tail == bfd_abs_section_ptr) continue; + /* Reverse the list: we must avoid placing stubs at the + beginning of the section because the beginning of the text + section may be required for an interrupt vector in bare metal + code. */ +#define NEXT_SEC PREV_SEC + head = NULL; while (tail != NULL) + { + /* Pop from tail. */ + asection *item = tail; + tail = PREV_SEC (item); + + /* Push on head. */ + NEXT_SEC (item) = head; + head = item; + } + + while (head != NULL) { asection *curr; - asection *prev; - bfd_size_type total; + asection *next; + bfd_vma stub_group_start = head->output_offset; + bfd_vma end_of_next; - curr = tail; - total = tail->size; - while ((prev = PREV_SEC (curr)) != NULL - && ((total += curr->output_offset - prev->output_offset) - < stub_group_size)) - curr = prev; + curr = head; + while (NEXT_SEC (curr) != NULL) + { + next = NEXT_SEC (curr); + end_of_next = next->output_offset + next->size; + if (end_of_next - stub_group_start >= stub_group_size) + /* End of NEXT is too far from start, so stop. */ + break; + /* Add NEXT to the group. */ + curr = next; + } - /* OK, the size from the start of CURR to the end is less + /* OK, the size from the start to the start of CURR is less than stub_group_size and thus can be handled by one stub - section. (Or the tail section is itself larger than + section. (Or the head section is itself larger than stub_group_size, in which case we may be toast.) We should really be keeping track of the total size of stubs added here, as stubs contribute to the final output section size. */ do { - prev = PREV_SEC (tail); + next = NEXT_SEC (head); /* Set up this stub group. */ - htab->stub_group[tail->id].link_sec = curr; + htab->stub_group[head->id].link_sec = curr; } - while (tail != curr && (tail = prev) != NULL); + while (head != curr && (head = next) != NULL); /* But wait, there's more! Input sections up to stub_group_size - bytes before the stub section can be handled by it too. */ - if (!stubs_always_before_branch) + bytes after the stub section can be handled by it too. */ + if (!stubs_always_after_branch) { - total = 0; - while (prev != NULL - && ((total += tail->output_offset - prev->output_offset) - < stub_group_size)) + stub_group_start = curr->output_offset + curr->size; + + while (next != NULL) { - tail = prev; - prev = PREV_SEC (tail); - htab->stub_group[tail->id].link_sec = curr; + end_of_next = next->output_offset + next->size; + if (end_of_next - stub_group_start >= stub_group_size) + /* End of NEXT is too far from stubs, so stop. */ + break; + /* Add NEXT to the stub group. */ + head = next; + next = NEXT_SEC (head); + htab->stub_group[head->id].link_sec = curr; } } - tail = prev; + head = next; } } - while (list-- != htab->input_list); + while (list++ != htab->input_list + htab->top_index); free (htab->input_list); #undef PREV_SEC +#undef NEXT_SEC } -/* Determine and set the size of the stub section for a final link. - - The basic idea here is to examine all the relocations looking for - PC-relative calls to a target that is unreachable with a "bl" - instruction. */ +/* Comparison function for sorting/searching relocations relating to Cortex-A8 + erratum fix. */ -bfd_boolean -elf32_arm_size_stubs (bfd *output_bfd, - bfd *stub_bfd, - struct bfd_link_info *info, - bfd_signed_vma group_size, - asection * (*add_stub_section) (const char *, asection *), - void (*layout_sections_again) (void)) +static int +a8_reloc_compare (const void *a, const void *b) { - bfd_size_type stub_group_size; - bfd_boolean stubs_always_before_branch; - bfd_boolean stub_changed = 0; - struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info); + const struct a8_erratum_reloc *ra = (const struct a8_erratum_reloc *) a; + const struct a8_erratum_reloc *rb = (const struct a8_erratum_reloc *) b; - /* Propagate mach to stub bfd, because it may not have been - finalized when we created stub_bfd. */ - bfd_set_arch_mach (stub_bfd, bfd_get_arch (output_bfd), - bfd_get_mach (output_bfd)); - - /* Stash our params away. */ - htab->stub_bfd = stub_bfd; - htab->add_stub_section = add_stub_section; - htab->layout_sections_again = layout_sections_again; - stubs_always_before_branch = group_size < 0; - if (group_size < 0) - stub_group_size = -group_size; + if (ra->from < rb->from) + return -1; + else if (ra->from > rb->from) + return 1; else - stub_group_size = group_size; + return 0; +} + +static struct elf_link_hash_entry *find_thumb_glue (struct bfd_link_info *, + const char *, char **); + +/* Helper function to scan code for sequences which might trigger the Cortex-A8 + branch/TLB erratum. Fill in the table described by A8_FIXES_P, + NUM_A8_FIXES_P, A8_FIX_TABLE_SIZE_P. Returns true if an error occurs, false + otherwise. */ + +static bfd_boolean +cortex_a8_erratum_scan (bfd *input_bfd, + struct bfd_link_info *info, + struct a8_erratum_fix **a8_fixes_p, + unsigned int *num_a8_fixes_p, + unsigned int *a8_fix_table_size_p, + struct a8_erratum_reloc *a8_relocs, + unsigned int num_a8_relocs, + unsigned prev_num_a8_fixes, + bfd_boolean *stub_changed_p) +{ + asection *section; + struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info); + struct a8_erratum_fix *a8_fixes = *a8_fixes_p; + unsigned int num_a8_fixes = *num_a8_fixes_p; + unsigned int a8_fix_table_size = *a8_fix_table_size_p; + + for (section = input_bfd->sections; + section != NULL; + section = section->next) + { + bfd_byte *contents = NULL; + struct _arm_elf_section_data *sec_data; + unsigned int span; + bfd_vma base_vma; + + if (elf_section_type (section) != SHT_PROGBITS + || (elf_section_flags (section) & SHF_EXECINSTR) == 0 + || (section->flags & SEC_EXCLUDE) != 0 + || (section->sec_info_type == ELF_INFO_TYPE_JUST_SYMS) + || (section->output_section == bfd_abs_section_ptr)) + continue; + + base_vma = section->output_section->vma + section->output_offset; + + if (elf_section_data (section)->this_hdr.contents != NULL) + contents = elf_section_data (section)->this_hdr.contents; + else if (! bfd_malloc_and_get_section (input_bfd, section, &contents)) + return TRUE; + + sec_data = elf32_arm_section_data (section); + + for (span = 0; span < sec_data->mapcount; span++) + { + unsigned int span_start = sec_data->map[span].vma; + unsigned int span_end = (span == sec_data->mapcount - 1) + ? section->size : sec_data->map[span + 1].vma; + unsigned int i; + char span_type = sec_data->map[span].type; + bfd_boolean last_was_32bit = FALSE, last_was_branch = FALSE; + + if (span_type != 't') + continue; + + /* Span is entirely within a single 4KB region: skip scanning. */ + if (((base_vma + span_start) & ~0xfff) + == ((base_vma + span_end) & ~0xfff)) + continue; + + /* Scan for 32-bit Thumb-2 branches which span two 4K regions, where: + + * The opcode is BLX.W, BL.W, B.W, Bcc.W + * The branch target is in the same 4KB region as the + first half of the branch. + * The instruction before the branch is a 32-bit + length non-branch instruction. */ + for (i = span_start; i < span_end;) + { + unsigned int insn = bfd_getl16 (&contents[i]); + bfd_boolean insn_32bit = FALSE, is_blx = FALSE, is_b = FALSE; + bfd_boolean is_bl = FALSE, is_bcc = FALSE, is_32bit_branch; + + if ((insn & 0xe000) == 0xe000 && (insn & 0x1800) != 0x0000) + insn_32bit = TRUE; + + if (insn_32bit) + { + /* Load the rest of the insn (in manual-friendly order). */ + insn = (insn << 16) | bfd_getl16 (&contents[i + 2]); + + /* Encoding T4: B.W. */ + is_b = (insn & 0xf800d000) == 0xf0009000; + /* Encoding T1: BL.W. */ + is_bl = (insn & 0xf800d000) == 0xf000d000; + /* Encoding T2: BLX.W. */ + is_blx = (insn & 0xf800d000) == 0xf000c000; + /* Encoding T3: B.W (not permitted in IT block). */ + is_bcc = (insn & 0xf800d000) == 0xf0008000 + && (insn & 0x07f00000) != 0x03800000; + } + + is_32bit_branch = is_b || is_bl || is_blx || is_bcc; + + if (((base_vma + i) & 0xfff) == 0xffe + && insn_32bit + && is_32bit_branch + && last_was_32bit + && ! last_was_branch) + { + bfd_signed_vma offset; + bfd_boolean force_target_arm = FALSE; + bfd_boolean force_target_thumb = FALSE; + bfd_vma target; + enum elf32_arm_stub_type stub_type = arm_stub_none; + struct a8_erratum_reloc key, *found; + + key.from = base_vma + i; + found = (struct a8_erratum_reloc *) + bsearch (&key, a8_relocs, num_a8_relocs, + sizeof (struct a8_erratum_reloc), + &a8_reloc_compare); + + if (found) + { + char *error_message = NULL; + struct elf_link_hash_entry *entry; + + /* We don't care about the error returned from this + function, only if there is glue or not. */ + entry = find_thumb_glue (info, found->sym_name, + &error_message); + + if (entry) + found->non_a8_stub = TRUE; + + if (found->r_type == R_ARM_THM_CALL + && found->st_type != STT_ARM_TFUNC) + force_target_arm = TRUE; + else if (found->r_type == R_ARM_THM_CALL + && found->st_type == STT_ARM_TFUNC) + force_target_thumb = TRUE; + } + + /* Check if we have an offending branch instruction. */ + + if (found && found->non_a8_stub) + /* We've already made a stub for this instruction, e.g. + it's a long branch or a Thumb->ARM stub. Assume that + stub will suffice to work around the A8 erratum (see + setting of always_after_branch above). */ + ; + else if (is_bcc) + { + offset = (insn & 0x7ff) << 1; + offset |= (insn & 0x3f0000) >> 4; + offset |= (insn & 0x2000) ? 0x40000 : 0; + offset |= (insn & 0x800) ? 0x80000 : 0; + offset |= (insn & 0x4000000) ? 0x100000 : 0; + if (offset & 0x100000) + offset |= ~ ((bfd_signed_vma) 0xfffff); + stub_type = arm_stub_a8_veneer_b_cond; + } + else if (is_b || is_bl || is_blx) + { + int s = (insn & 0x4000000) != 0; + int j1 = (insn & 0x2000) != 0; + int j2 = (insn & 0x800) != 0; + int i1 = !(j1 ^ s); + int i2 = !(j2 ^ s); + + offset = (insn & 0x7ff) << 1; + offset |= (insn & 0x3ff0000) >> 4; + offset |= i2 << 22; + offset |= i1 << 23; + offset |= s << 24; + if (offset & 0x1000000) + offset |= ~ ((bfd_signed_vma) 0xffffff); + + if (is_blx) + offset &= ~ ((bfd_signed_vma) 3); + + stub_type = is_blx ? arm_stub_a8_veneer_blx : + is_bl ? arm_stub_a8_veneer_bl : arm_stub_a8_veneer_b; + } + + if (stub_type != arm_stub_none) + { + bfd_vma pc_for_insn = base_vma + i + 4; + + /* The original instruction is a BL, but the target is + an ARM instruction. If we were not making a stub, + the BL would have been converted to a BLX. Use the + BLX stub instead in that case. */ + if (htab->use_blx && force_target_arm + && stub_type == arm_stub_a8_veneer_bl) + { + stub_type = arm_stub_a8_veneer_blx; + is_blx = TRUE; + is_bl = FALSE; + } + /* Conversely, if the original instruction was + BLX but the target is Thumb mode, use the BL + stub. */ + else if (force_target_thumb + && stub_type == arm_stub_a8_veneer_blx) + { + stub_type = arm_stub_a8_veneer_bl; + is_blx = FALSE; + is_bl = TRUE; + } + + if (is_blx) + pc_for_insn &= ~ ((bfd_vma) 3); + + /* If we found a relocation, use the proper destination, + not the offset in the (unrelocated) instruction. + Note this is always done if we switched the stub type + above. */ + if (found) + offset = + (bfd_signed_vma) (found->destination - pc_for_insn); + + target = pc_for_insn + offset; + + /* The BLX stub is ARM-mode code. Adjust the offset to + take the different PC value (+8 instead of +4) into + account. */ + if (stub_type == arm_stub_a8_veneer_blx) + offset += 4; + + if (((base_vma + i) & ~0xfff) == (target & ~0xfff)) + { + char *stub_name = NULL; + + if (num_a8_fixes == a8_fix_table_size) + { + a8_fix_table_size *= 2; + a8_fixes = (struct a8_erratum_fix *) + bfd_realloc (a8_fixes, + sizeof (struct a8_erratum_fix) + * a8_fix_table_size); + } + + if (num_a8_fixes < prev_num_a8_fixes) + { + /* If we're doing a subsequent scan, + check if we've found the same fix as + before, and try and reuse the stub + name. */ + stub_name = a8_fixes[num_a8_fixes].stub_name; + if ((a8_fixes[num_a8_fixes].section != section) + || (a8_fixes[num_a8_fixes].offset != i)) + { + free (stub_name); + stub_name = NULL; + *stub_changed_p = TRUE; + } + } + + if (!stub_name) + { + stub_name = (char *) bfd_malloc (8 + 1 + 8 + 1); + if (stub_name != NULL) + sprintf (stub_name, "%x:%x", section->id, i); + } + + a8_fixes[num_a8_fixes].input_bfd = input_bfd; + a8_fixes[num_a8_fixes].section = section; + a8_fixes[num_a8_fixes].offset = i; + a8_fixes[num_a8_fixes].addend = offset; + a8_fixes[num_a8_fixes].orig_insn = insn; + a8_fixes[num_a8_fixes].stub_name = stub_name; + a8_fixes[num_a8_fixes].stub_type = stub_type; + + num_a8_fixes++; + } + } + } + + i += insn_32bit ? 4 : 2; + last_was_32bit = insn_32bit; + last_was_branch = is_32bit_branch; + } + } + + if (elf_section_data (section)->this_hdr.contents == NULL) + free (contents); + } + + *a8_fixes_p = a8_fixes; + *num_a8_fixes_p = num_a8_fixes; + *a8_fix_table_size_p = a8_fix_table_size; + + return FALSE; +} + +/* Determine and set the size of the stub section for a final link. + + The basic idea here is to examine all the relocations looking for + PC-relative calls to a target that is unreachable with a "bl" + instruction. */ + +bfd_boolean +elf32_arm_size_stubs (bfd *output_bfd, + bfd *stub_bfd, + struct bfd_link_info *info, + bfd_signed_vma group_size, + asection * (*add_stub_section) (const char *, asection *), + void (*layout_sections_again) (void)) +{ + bfd_size_type stub_group_size; + bfd_boolean stubs_always_after_branch; + struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info); + struct a8_erratum_fix *a8_fixes = NULL; + unsigned int num_a8_fixes = 0, a8_fix_table_size = 10; + struct a8_erratum_reloc *a8_relocs = NULL; + unsigned int num_a8_relocs = 0, a8_reloc_table_size = 10, i; + + if (htab->fix_cortex_a8) + { + a8_fixes = (struct a8_erratum_fix *) + bfd_zmalloc (sizeof (struct a8_erratum_fix) * a8_fix_table_size); + a8_relocs = (struct a8_erratum_reloc *) + bfd_zmalloc (sizeof (struct a8_erratum_reloc) * a8_reloc_table_size); + } + + /* Propagate mach to stub bfd, because it may not have been + finalized when we created stub_bfd. */ + bfd_set_arch_mach (stub_bfd, bfd_get_arch (output_bfd), + bfd_get_mach (output_bfd)); + + /* Stash our params away. */ + htab->stub_bfd = stub_bfd; + htab->add_stub_section = add_stub_section; + htab->layout_sections_again = layout_sections_again; + stubs_always_after_branch = group_size < 0; + + /* The Cortex-A8 erratum fix depends on stubs not being in the same 4K page + as the first half of a 32-bit branch straddling two 4K pages. This is a + crude way of enforcing that. */ + if (htab->fix_cortex_a8) + stubs_always_after_branch = 1; + + if (group_size < 0) + stub_group_size = -group_size; + else + stub_group_size = group_size; if (stub_group_size == 1) { @@ -3487,14 +4273,27 @@ elf32_arm_size_stubs (bfd *output_bfd, stub_group_size = 4170000; } - group_sections (htab, stub_group_size, stubs_always_before_branch); + group_sections (htab, stub_group_size, stubs_always_after_branch); + + /* If we're applying the cortex A8 fix, we need to determine the + program header size now, because we cannot change it later -- + that could alter section placements. Notice the A8 erratum fix + ends up requiring the section addresses to remain unchanged + modulo the page size. That's something we cannot represent + inside BFD, and we don't want to force the section alignment to + be the page size. */ + if (htab->fix_cortex_a8) + (*htab->layout_sections_again) (); while (1) { bfd *input_bfd; unsigned int bfd_indx; asection *stub_sec; + bfd_boolean stub_changed = FALSE; + unsigned prev_num_a8_fixes = num_a8_fixes; + num_a8_fixes = 0; for (input_bfd = info->input_bfds, bfd_indx = 0; input_bfd != NULL; input_bfd = input_bfd->link_next, bfd_indx++) @@ -3503,6 +4302,8 @@ elf32_arm_size_stubs (bfd *output_bfd, asection *section; Elf_Internal_Sym *local_syms = NULL; + num_a8_relocs = 0; + /* We'll need the symbol table in a second. */ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; if (symtab_hdr->sh_info == 0) @@ -3551,6 +4352,7 @@ elf32_arm_size_stubs (bfd *output_bfd, char *stub_name; const asection *id_sec; unsigned char st_type; + bfd_boolean created_stub = FALSE; r_type = ELF32_R_TYPE (irela->r_info); r_indx = ELF32_R_SYM (irela->r_info); @@ -3564,9 +4366,14 @@ elf32_arm_size_stubs (bfd *output_bfd, goto error_ret_free_local; } - /* Only look for stubs on call instructions. */ + /* Only look for stubs on branch instructions. */ if ((r_type != (unsigned int) R_ARM_CALL) - && (r_type != (unsigned int) R_ARM_THM_CALL)) + && (r_type != (unsigned int) R_ARM_THM_CALL) + && (r_type != (unsigned int) R_ARM_JUMP24) + && (r_type != (unsigned int) R_ARM_THM_JUMP19) + && (r_type != (unsigned int) R_ARM_THM_XPC22) + && (r_type != (unsigned int) R_ARM_THM_JUMP24) + && (r_type != (unsigned int) R_ARM_PLT32)) continue; /* Now determine the call target, its name, value, @@ -3598,6 +4405,11 @@ elf32_arm_size_stubs (bfd *output_bfd, sym = local_syms + r_indx; hdr = elf_elfsections (input_bfd)[sym->st_shndx]; sym_sec = hdr->bfd_section; + if (!sym_sec) + /* This is an undefined symbol. It can never + be resolved. */ + continue; + if (ELF_ST_TYPE (sym->st_info) != STT_SECTION) sym_value = sym->st_value; destination = (sym_value + irela->r_addend @@ -3628,17 +4440,52 @@ elf32_arm_size_stubs (bfd *output_bfd, { sym_sec = hash->root.root.u.def.section; sym_value = hash->root.root.u.def.value; - if (sym_sec->output_section != NULL) + + struct elf32_arm_link_hash_table *globals = + elf32_arm_hash_table (info); + + /* For a destination in a shared library, + use the PLT stub as target address to + decide whether a branch stub is + needed. */ + if (globals->splt != NULL && hash != NULL + && hash->root.plt.offset != (bfd_vma) -1) + { + sym_sec = globals->splt; + sym_value = hash->root.plt.offset; + if (sym_sec->output_section != NULL) + destination = (sym_value + + sym_sec->output_offset + + sym_sec->output_section->vma); + } + else if (sym_sec->output_section != NULL) destination = (sym_value + irela->r_addend + sym_sec->output_offset + sym_sec->output_section->vma); } - else if (hash->root.root.type == bfd_link_hash_undefweak - || hash->root.root.type == bfd_link_hash_undefined) - /* For a shared library, these will need a PLT stub, - which is treated separately. - For absolute code, they cannot be handled. */ - continue; + else if ((hash->root.root.type == bfd_link_hash_undefined) + || (hash->root.root.type == bfd_link_hash_undefweak)) + { + /* For a shared library, use the PLT stub as + target address to decide whether a long + branch stub is needed. + For absolute code, they cannot be handled. */ + struct elf32_arm_link_hash_table *globals = + elf32_arm_hash_table (info); + + if (globals->splt != NULL && hash != NULL + && hash->root.plt.offset != (bfd_vma) -1) + { + sym_sec = globals->splt; + sym_value = hash->root.plt.offset; + if (sym_sec->output_section != NULL) + destination = (sym_value + + sym_sec->output_offset + + sym_sec->output_section->vma); + } + else + continue; + } else { bfd_set_error (bfd_error_bad_value); @@ -3648,79 +4495,151 @@ elf32_arm_size_stubs (bfd *output_bfd, sym_name = hash->root.root.root.string; } - /* Determine what (if any) linker stub is needed. */ - stub_type = arm_type_of_stub (info, section, irela, st_type, - hash, destination, sym_sec, - input_bfd, sym_name); - if (stub_type == arm_stub_none) - continue; - - /* Support for grouping stub sections. */ - id_sec = htab->stub_group[section->id].link_sec; - - /* Get the name of this stub. */ - stub_name = elf32_arm_stub_name (id_sec, sym_sec, hash, irela); - if (!stub_name) - goto error_ret_free_internal; - - stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, - stub_name, - FALSE, FALSE); - if (stub_entry != NULL) - { - /* The proper stub has already been created. */ - free (stub_name); - continue; - } - - stub_entry = elf32_arm_add_stub (stub_name, section, htab); - if (stub_entry == NULL) - { - free (stub_name); - goto error_ret_free_internal; - } - - stub_entry->target_value = sym_value; - stub_entry->target_section = sym_sec; - stub_entry->stub_type = stub_type; - stub_entry->h = hash; - stub_entry->st_type = st_type; - - if (sym_name == NULL) - sym_name = "unnamed"; - stub_entry->output_name - = bfd_alloc (htab->stub_bfd, - sizeof (THUMB2ARM_GLUE_ENTRY_NAME) - + strlen (sym_name)); - if (stub_entry->output_name == NULL) + do { - free (stub_name); - goto error_ret_free_internal; - } + /* Determine what (if any) linker stub is needed. */ + stub_type = arm_type_of_stub (info, section, irela, + st_type, hash, + destination, sym_sec, + input_bfd, sym_name); + if (stub_type == arm_stub_none) + break; + + /* Support for grouping stub sections. */ + id_sec = htab->stub_group[section->id].link_sec; + + /* Get the name of this stub. */ + stub_name = elf32_arm_stub_name (id_sec, sym_sec, hash, + irela); + if (!stub_name) + goto error_ret_free_internal; + + /* We've either created a stub for this reloc already, + or we are about to. */ + created_stub = TRUE; + + stub_entry = arm_stub_hash_lookup + (&htab->stub_hash_table, stub_name, + FALSE, FALSE); + if (stub_entry != NULL) + { + /* The proper stub has already been created. */ + free (stub_name); + stub_entry->target_value = sym_value; + break; + } - /* For historical reasons, use the existing names for - ARM-to-Thumb and Thumb-to-ARM stubs. */ - if (r_type == (unsigned int) R_ARM_THM_CALL - && st_type != STT_ARM_TFUNC) - sprintf (stub_entry->output_name, THUMB2ARM_GLUE_ENTRY_NAME, - sym_name); - else if (r_type == (unsigned int) R_ARM_CALL - && st_type == STT_ARM_TFUNC) - sprintf (stub_entry->output_name, ARM2THUMB_GLUE_ENTRY_NAME, - sym_name); - else - sprintf (stub_entry->output_name, STUB_ENTRY_NAME, - sym_name); + stub_entry = elf32_arm_add_stub (stub_name, section, + htab); + if (stub_entry == NULL) + { + free (stub_name); + goto error_ret_free_internal; + } - stub_changed = TRUE; + stub_entry->target_value = sym_value; + stub_entry->target_section = sym_sec; + stub_entry->stub_type = stub_type; + stub_entry->h = hash; + stub_entry->st_type = st_type; + + if (sym_name == NULL) + sym_name = "unnamed"; + stub_entry->output_name = (char *) + bfd_alloc (htab->stub_bfd, + sizeof (THUMB2ARM_GLUE_ENTRY_NAME) + + strlen (sym_name)); + if (stub_entry->output_name == NULL) + { + free (stub_name); + goto error_ret_free_internal; + } + + /* For historical reasons, use the existing names for + ARM-to-Thumb and Thumb-to-ARM stubs. */ + if ( ((r_type == (unsigned int) R_ARM_THM_CALL) + || (r_type == (unsigned int) R_ARM_THM_JUMP24)) + && st_type != STT_ARM_TFUNC) + sprintf (stub_entry->output_name, + THUMB2ARM_GLUE_ENTRY_NAME, sym_name); + else if ( ((r_type == (unsigned int) R_ARM_CALL) + || (r_type == (unsigned int) R_ARM_JUMP24)) + && st_type == STT_ARM_TFUNC) + sprintf (stub_entry->output_name, + ARM2THUMB_GLUE_ENTRY_NAME, sym_name); + else + sprintf (stub_entry->output_name, STUB_ENTRY_NAME, + sym_name); + + stub_changed = TRUE; + } + while (0); + + /* Look for relocations which might trigger Cortex-A8 + erratum. */ + if (htab->fix_cortex_a8 + && (r_type == (unsigned int) R_ARM_THM_JUMP24 + || r_type == (unsigned int) R_ARM_THM_JUMP19 + || r_type == (unsigned int) R_ARM_THM_CALL + || r_type == (unsigned int) R_ARM_THM_XPC22)) + { + bfd_vma from = section->output_section->vma + + section->output_offset + + irela->r_offset; + + if ((from & 0xfff) == 0xffe) + { + /* Found a candidate. Note we haven't checked the + destination is within 4K here: if we do so (and + don't create an entry in a8_relocs) we can't tell + that a branch should have been relocated when + scanning later. */ + if (num_a8_relocs == a8_reloc_table_size) + { + a8_reloc_table_size *= 2; + a8_relocs = (struct a8_erratum_reloc *) + bfd_realloc (a8_relocs, + sizeof (struct a8_erratum_reloc) + * a8_reloc_table_size); + } + + a8_relocs[num_a8_relocs].from = from; + a8_relocs[num_a8_relocs].destination = destination; + a8_relocs[num_a8_relocs].r_type = r_type; + a8_relocs[num_a8_relocs].st_type = st_type; + a8_relocs[num_a8_relocs].sym_name = sym_name; + a8_relocs[num_a8_relocs].non_a8_stub = created_stub; + + num_a8_relocs++; + } + } } - /* We're done with the internal relocs, free them. */ - if (elf_section_data (section)->relocs == NULL) - free (internal_relocs); + /* We're done with the internal relocs, free them. */ + if (elf_section_data (section)->relocs == NULL) + free (internal_relocs); + } + + if (htab->fix_cortex_a8) + { + /* Sort relocs which might apply to Cortex-A8 erratum. */ + qsort (a8_relocs, num_a8_relocs, + sizeof (struct a8_erratum_reloc), + &a8_reloc_compare); + + /* Scan for branches which might trigger Cortex-A8 erratum. */ + if (cortex_a8_erratum_scan (input_bfd, info, &a8_fixes, + &num_a8_fixes, &a8_fix_table_size, + a8_relocs, num_a8_relocs, + prev_num_a8_fixes, &stub_changed) + != 0) + goto error_ret_free_local; } } + if (prev_num_a8_fixes != num_a8_fixes) + stub_changed = TRUE; + if (!stub_changed) break; @@ -3729,15 +4648,89 @@ elf32_arm_size_stubs (bfd *output_bfd, for (stub_sec = htab->stub_bfd->sections; stub_sec != NULL; stub_sec = stub_sec->next) - stub_sec->size = 0; + { + /* Ignore non-stub sections. */ + if (!strstr (stub_sec->name, STUB_SUFFIX)) + continue; + + stub_sec->size = 0; + } bfd_hash_traverse (&htab->stub_hash_table, arm_size_one_stub, htab); + /* Add Cortex-A8 erratum veneers to stub section sizes too. */ + if (htab->fix_cortex_a8) + for (i = 0; i < num_a8_fixes; i++) + { + stub_sec = elf32_arm_create_or_find_stub_sec (NULL, + a8_fixes[i].section, htab); + + if (stub_sec == NULL) + goto error_ret_free_local; + + stub_sec->size + += find_stub_size_and_template (a8_fixes[i].stub_type, NULL, + NULL); + } + + /* Ask the linker to do its stuff. */ (*htab->layout_sections_again) (); - stub_changed = FALSE; } + /* Add stubs for Cortex-A8 erratum fixes now. */ + if (htab->fix_cortex_a8) + { + for (i = 0; i < num_a8_fixes; i++) + { + struct elf32_arm_stub_hash_entry *stub_entry; + char *stub_name = a8_fixes[i].stub_name; + asection *section = a8_fixes[i].section; + unsigned int section_id = a8_fixes[i].section->id; + asection *link_sec = htab->stub_group[section_id].link_sec; + asection *stub_sec = htab->stub_group[section_id].stub_sec; + const insn_sequence *template_sequence; + int template_size, size = 0; + + stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name, + TRUE, FALSE); + if (stub_entry == NULL) + { + (*_bfd_error_handler) (_("%s: cannot create stub entry %s"), + section->owner, + stub_name); + return FALSE; + } + + stub_entry->stub_sec = stub_sec; + stub_entry->stub_offset = 0; + stub_entry->id_sec = link_sec; + stub_entry->stub_type = a8_fixes[i].stub_type; + stub_entry->target_section = a8_fixes[i].section; + stub_entry->target_value = a8_fixes[i].offset; + stub_entry->target_addend = a8_fixes[i].addend; + stub_entry->orig_insn = a8_fixes[i].orig_insn; + stub_entry->st_type = STT_ARM_TFUNC; + + size = find_stub_size_and_template (a8_fixes[i].stub_type, + &template_sequence, + &template_size); + + stub_entry->stub_size = size; + stub_entry->stub_template = template_sequence; + stub_entry->stub_template_size = template_size; + } + + /* Stash the Cortex-A8 erratum fix array for use later in + elf32_arm_write_section(). */ + htab->a8_erratum_fixes = a8_fixes; + htab->num_a8_erratum_fixes = num_a8_fixes; + } + else + { + htab->a8_erratum_fixes = NULL; + htab->num_a8_erratum_fixes = 0; + } return TRUE; error_ret_free_local: @@ -3771,7 +4764,7 @@ elf32_arm_build_stubs (struct bfd_link_info *info) /* Allocate memory to hold the linker stubs. */ size = stub_sec->size; - stub_sec->contents = bfd_zalloc (htab->stub_bfd, size); + stub_sec->contents = (unsigned char *) bfd_zalloc (htab->stub_bfd, size); if (stub_sec->contents == NULL && size != 0) return FALSE; stub_sec->size = 0; @@ -3780,6 +4773,12 @@ elf32_arm_build_stubs (struct bfd_link_info *info) /* Build the stubs as directed by the stub hash table. */ table = &htab->stub_hash_table; bfd_hash_traverse (table, arm_build_one_stub, info); + if (htab->fix_cortex_a8) + { + /* Place the cortex a8 stubs last. */ + htab->fix_cortex_a8 = -1; + bfd_hash_traverse (table, arm_build_one_stub, info); + } return TRUE; } @@ -3798,8 +4797,8 @@ find_thumb_glue (struct bfd_link_info *link_info, /* We need a pointer to the armelf specific hash table. */ hash_table = elf32_arm_hash_table (link_info); - tmp_name = bfd_malloc ((bfd_size_type) strlen (name) - + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1); + tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name) + + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1); BFD_ASSERT (tmp_name); @@ -3832,8 +4831,8 @@ find_arm_glue (struct bfd_link_info *link_info, /* We need a pointer to the elfarm specific hash table. */ hash_table = elf32_arm_hash_table (link_info); - tmp_name = bfd_malloc ((bfd_size_type) strlen (name) - + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1); + tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name) + + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1); BFD_ASSERT (tmp_name); @@ -3927,14 +4926,23 @@ arm_allocate_glue_section_space (bfd * abfd, bfd_size_type size, const char * na bfd_byte * contents; if (size == 0) - return; + { + /* Do not include empty glue sections in the output. */ + if (abfd != NULL) + { + s = bfd_get_section_by_name (abfd, name); + if (s != NULL) + s->flags |= SEC_EXCLUDE; + } + return; + } BFD_ASSERT (abfd != NULL); s = bfd_get_section_by_name (abfd, name); BFD_ASSERT (s != NULL); - contents = bfd_alloc (abfd, size); + contents = (bfd_byte *) bfd_alloc (abfd, size); BFD_ASSERT (s->size == size); s->contents = contents; @@ -3993,7 +5001,8 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info, BFD_ASSERT (s != NULL); - tmp_name = bfd_malloc ((bfd_size_type) strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1); + tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name) + + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1); BFD_ASSERT (tmp_name); @@ -4039,86 +5048,6 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info, return myh; } -static void -record_thumb_to_arm_glue (struct bfd_link_info *link_info, - struct elf_link_hash_entry *h) -{ - const char *name = h->root.root.string; - asection *s; - char *tmp_name; - struct elf_link_hash_entry *myh; - struct bfd_link_hash_entry *bh; - struct elf32_arm_link_hash_table *hash_table; - bfd_vma val; - - hash_table = elf32_arm_hash_table (link_info); - - BFD_ASSERT (hash_table != NULL); - BFD_ASSERT (hash_table->bfd_of_glue_owner != NULL); - - s = bfd_get_section_by_name - (hash_table->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME); - - BFD_ASSERT (s != NULL); - - tmp_name = bfd_malloc ((bfd_size_type) strlen (name) - + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1); - - BFD_ASSERT (tmp_name); - - sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name); - - myh = elf_link_hash_lookup - (&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE); - - if (myh != NULL) - { - /* We've already seen this guy. */ - free (tmp_name); - return; - } - - /* The only trick here is using hash_table->thumb_glue_size as the value. - Even though the section isn't allocated yet, this is where we will be - putting it. The +1 on the value marks that the stub has not been - output yet - not that it is a Thumb function. */ - bh = NULL; - val = hash_table->thumb_glue_size + 1; - _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, - tmp_name, BSF_GLOBAL, s, val, - NULL, TRUE, FALSE, &bh); - - /* If we mark it 'Thumb', the disassembler will do a better job. */ - myh = (struct elf_link_hash_entry *) bh; - myh->type = ELF_ST_INFO (STB_LOCAL, STT_ARM_TFUNC); - myh->forced_local = 1; - - free (tmp_name); - -#define CHANGE_TO_ARM "__%s_change_to_arm" -#define BACK_FROM_ARM "__%s_back_from_arm" - - /* Allocate another symbol to mark where we switch to Arm mode. */ - tmp_name = bfd_malloc ((bfd_size_type) strlen (name) - + strlen (CHANGE_TO_ARM) + 1); - - BFD_ASSERT (tmp_name); - - sprintf (tmp_name, CHANGE_TO_ARM, name); - - bh = NULL; - val = hash_table->thumb_glue_size + 4, - _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, - tmp_name, BSF_LOCAL, s, val, - NULL, TRUE, FALSE, &bh); - - free (tmp_name); - - s->size += THUMB2ARM_GLUE_SIZE; - hash_table->thumb_glue_size += THUMB2ARM_GLUE_SIZE; -} - - /* Allocate space for ARMv4 BX veneers. */ static void @@ -4150,7 +5079,8 @@ record_arm_bx_glue (struct bfd_link_info * link_info, int reg) BFD_ASSERT (s != NULL); /* Add symbol for veneer. */ - tmp_name = bfd_malloc ((bfd_size_type) strlen (ARM_BX_GLUE_ENTRY_NAME) + 1); + tmp_name = (char *) + bfd_malloc ((bfd_size_type) strlen (ARM_BX_GLUE_ENTRY_NAME) + 1); BFD_ASSERT (tmp_name); @@ -4187,7 +5117,8 @@ elf32_arm_section_map_add (asection *sec, char type, bfd_vma vma) if (sec_data->map == NULL) { - sec_data->map = bfd_malloc (sizeof (elf32_arm_section_map)); + sec_data->map = (elf32_arm_section_map *) + bfd_malloc (sizeof (elf32_arm_section_map)); sec_data->mapcount = 0; sec_data->mapsize = 1; } @@ -4197,8 +5128,9 @@ elf32_arm_section_map_add (asection *sec, char type, bfd_vma vma) if (sec_data->mapcount > sec_data->mapsize) { sec_data->mapsize *= 2; - sec_data->map = bfd_realloc_or_free (sec_data->map, sec_data->mapsize - * sizeof (elf32_arm_section_map)); + sec_data->map = (elf32_arm_section_map *) + bfd_realloc_or_free (sec_data->map, sec_data->mapsize + * sizeof (elf32_arm_section_map)); } if (sec_data->map) @@ -4241,8 +5173,8 @@ record_vfp11_erratum_veneer (struct bfd_link_info *link_info, BFD_ASSERT (s != NULL); - tmp_name = bfd_malloc ((bfd_size_type) strlen - (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10); + tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen + (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10); BFD_ASSERT (tmp_name); @@ -4266,7 +5198,8 @@ record_vfp11_erratum_veneer (struct bfd_link_info *link_info, /* Link veneer back to calling location. */ errcount = ++(sec_data->erratumcount); - newerr = bfd_zmalloc (sizeof (elf32_vfp11_erratum_list)); + newerr = (elf32_vfp11_erratum_list *) + bfd_zmalloc (sizeof (elf32_vfp11_erratum_list)); newerr->type = VFP11_ERRATUM_ARM_VENEER; newerr->vma = -1; @@ -4329,11 +5262,9 @@ record_vfp11_erratum_veneer (struct bfd_link_info *link_info, return val; } -/* Note: we do not include the flag SEC_LINKER_CREATED, as that - would prevent elf_link_input_bfd() from processing the contents - of the section. */ #define ARM_GLUE_SECTION_FLAGS \ - (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY) + (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE \ + | SEC_READONLY | SEC_LINKER_CREATED) /* Create a fake section for use by the ARM backend of the linker. */ @@ -4372,10 +5303,6 @@ bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd, if (info->relocatable) return TRUE; - /* Linker stubs don't need glue. */ - if (!strcmp (abfd->filename, "linker stubs")) - return TRUE; - return arm_make_glue_section (abfd, ARM2THUMB_GLUE_SECTION_NAME) && arm_make_glue_section (abfd, THUMB2ARM_GLUE_SECTION_NAME) && arm_make_glue_section (abfd, VFP11_ERRATUM_VENEER_SECTION_NAME) @@ -4494,9 +5421,6 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, /* These are the only relocation types we care about. */ if ( r_type != R_ARM_PC24 - && r_type != R_ARM_PLT32 - && r_type != R_ARM_JUMP24 - && r_type != R_ARM_THM_JUMP24 && (r_type != R_ARM_V4BX || globals->fix_v4bx < 2)) continue; @@ -4548,26 +5472,13 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, switch (r_type) { case R_ARM_PC24: - case R_ARM_PLT32: - case R_ARM_JUMP24: /* This one is a call from arm code. We need to look up the target of the call. If it is a thumb target, we insert glue. */ - if (ELF_ST_TYPE (h->type) == STT_ARM_TFUNC - && !(r_type == R_ARM_CALL && globals->use_blx)) + if (ELF_ST_TYPE (h->type) == STT_ARM_TFUNC) record_arm_to_thumb_glue (link_info, h); break; - case R_ARM_THM_JUMP24: - /* This one is a call from thumb code. We look - up the target of the call. If it is not a thumb - target, we insert glue. */ - if (ELF_ST_TYPE (h->type) != STT_ARM_TFUNC - && !(globals->use_blx && r_type == R_ARM_THM_CALL) - && h->root.type != bfd_link_hash_undefweak) - record_thumb_to_arm_glue (link_info, h); - break; - default: abort (); } @@ -4648,6 +5559,28 @@ bfd_elf32_arm_init_maps (bfd *abfd) } +/* Auto-select enabling of Cortex-A8 erratum fix if the user didn't explicitly + say what they wanted. */ + +void +bfd_elf32_arm_set_cortex_a8_fix (bfd *obfd, struct bfd_link_info *link_info) +{ + struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info); + obj_attribute *out_attr = elf_known_obj_attributes_proc (obfd); + + if (globals->fix_cortex_a8 == -1) + { + /* Turn on Cortex-A8 erratum workaround for ARMv7-A. */ + if (out_attr[Tag_CPU_arch].i == TAG_CPU_ARCH_V7 + && (out_attr[Tag_CPU_arch_profile].i == 'A' + || out_attr[Tag_CPU_arch_profile].i == 0)) + globals->fix_cortex_a8 = 1; + else + globals->fix_cortex_a8 = 0; + } +} + + void bfd_elf32_arm_set_vfp11_fix (bfd *obfd, struct bfd_link_info *link_info) { @@ -5112,8 +6045,8 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info) if (state == 3) { - elf32_vfp11_erratum_list *newerr - = bfd_zmalloc (sizeof (elf32_vfp11_erratum_list)); + elf32_vfp11_erratum_list *newerr =(elf32_vfp11_erratum_list *) + bfd_zmalloc (sizeof (elf32_vfp11_erratum_list)); int errcount; errcount = ++(elf32_arm_section_data (sec)->erratumcount); @@ -5181,8 +6114,8 @@ bfd_elf32_arm_vfp11_fix_veneer_locations (bfd *abfd, globals = elf32_arm_hash_table (link_info); - tmp_name = bfd_malloc ((bfd_size_type) strlen - (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10); + tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen + (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10); for (sec = abfd->sections; sec != NULL; sec = sec->next) { @@ -5257,7 +6190,7 @@ bfd_elf32_arm_set_target_relocs (struct bfd *output_bfd, int use_blx, bfd_arm_vfp11_fix vfp11_fix, int no_enum_warn, int no_wchar_warn, - int pic_veneer) + int pic_veneer, int fix_cortex_a8) { struct elf32_arm_link_hash_table *globals; @@ -5279,6 +6212,7 @@ bfd_elf32_arm_set_target_relocs (struct bfd *output_bfd, globals->use_blx |= use_blx; globals->vfp11_fix = vfp11_fix; globals->pic_veneer = pic_veneer; + globals->fix_cortex_a8 = fix_cortex_a8; BFD_ASSERT (is_arm_elf (output_bfd)); elf_arm_tdata (output_bfd)->no_enum_size_warning = no_enum_warn; @@ -5909,9 +6843,13 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, /* Handle relocations which should use the PLT entry. ABS32/REL32 will use the symbol's value, which may point to a PLT entry, but we don't need to handle that here. If we created a PLT entry, all - branches in this object should go to it. */ + branches in this object should go to it, except if the PLT is too + far away, in which case a long branch stub should be inserted. */ if ((r_type != R_ARM_ABS32 && r_type != R_ARM_REL32 - && r_type != R_ARM_ABS32_NOI && r_type != R_ARM_REL32_NOI) + && r_type != R_ARM_ABS32_NOI && r_type != R_ARM_REL32_NOI + && r_type != R_ARM_CALL + && r_type != R_ARM_JUMP24 + && r_type != R_ARM_PLT32) && h != NULL && splt != NULL && h->plt.offset != (bfd_vma) -1) @@ -6064,15 +7002,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, case R_ARM_PC24: /* Arm B/BL instruction. */ case R_ARM_PLT32: { - bfd_vma from; bfd_signed_vma branch_offset; struct elf32_arm_stub_hash_entry *stub_entry = NULL; - from = (input_section->output_section->vma - + input_section->output_offset - + rel->r_offset); - branch_offset = (bfd_signed_vma)(value - from); - if (r_type == R_ARM_XPC25) { /* Check for Arm calling Arm function. */ @@ -6084,7 +7016,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, input_bfd, h ? h->root.root.string : "(local)"); } - else if (r_type != R_ARM_CALL) + else if (r_type == R_ARM_PC24) { /* Check for Arm calling Thumb function. */ if (sym_flags == STT_ARM_TFUNC) @@ -6102,11 +7034,37 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, /* Check if a stub has to be inserted because the destination is too far or we are changing mode. */ - if (r_type == R_ARM_CALL) + if ( r_type == R_ARM_CALL + || r_type == R_ARM_JUMP24 + || r_type == R_ARM_PLT32) { + bfd_vma from; + + /* If the call goes through a PLT entry, make sure to + check distance to the right destination address. */ + if (h != NULL && splt != NULL && h->plt.offset != (bfd_vma) -1) + { + value = (splt->output_section->vma + + splt->output_offset + + h->plt.offset); + *unresolved_reloc_p = FALSE; + /* The PLT entry is in ARM mode, regardless of the + target function. */ + sym_flags = STT_FUNC; + } + + from = (input_section->output_section->vma + + input_section->output_offset + + rel->r_offset); + branch_offset = (bfd_signed_vma)(value - from); + if (branch_offset > ARM_MAX_FWD_BRANCH_OFFSET || branch_offset < ARM_MAX_BWD_BRANCH_OFFSET - || sym_flags == STT_ARM_TFUNC) + || ((sym_flags == STT_ARM_TFUNC) + && (((r_type == R_ARM_CALL) && !globals->use_blx) + || (r_type == R_ARM_JUMP24) + || (r_type == R_ARM_PLT32) )) + ) { /* The target is out of reach, so redirect the branch to the local stub for this function. */ @@ -6153,11 +7111,20 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, signed_addend >>= howto->rightshift; /* A branch to an undefined weak symbol is turned into a jump to - the next instruction. */ - if (h && h->root.type == bfd_link_hash_undefweak) + the next instruction unless a PLT entry will be created. + Do the same for local undefined symbols. + The jump to the next instruction is optimized as a NOP depending + on the architecture. */ + if (h ? (h->root.type == bfd_link_hash_undefweak + && !(splt != NULL && h->plt.offset != (bfd_vma) -1)) + : bfd_is_und_section (sym_sec)) { - value = (bfd_get_32 (input_bfd, hit_data) & 0xf0000000) - | 0x0affffff; + value = (bfd_get_32 (input_bfd, hit_data) & 0xf0000000); + + if (arch_has_arm_nop (globals)) + value |= 0x0320f000; + else + value |= 0x01a00000; /* Using pre-UAL nop: mov r0, r0. */ } else { @@ -6171,16 +7138,17 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, value = (signed_addend & howto->dst_mask) | (bfd_get_32 (input_bfd, hit_data) & (~ howto->dst_mask)); - /* Set the H bit in the BLX instruction. */ - if (sym_flags == STT_ARM_TFUNC) - { - if (addend) - value |= (1 << 24); - else - value &= ~(bfd_vma)(1 << 24); - } if (r_type == R_ARM_CALL) { + /* Set the H bit in the BLX instruction. */ + if (sym_flags == STT_ARM_TFUNC) + { + if (addend) + value |= (1 << 24); + else + value &= ~(bfd_vma)(1 << 24); + } + /* Select the correct instruction (BL or BLX). */ /* Only if we are not handling a BL to a stub. In this case, mode switching is performed by the stub. */ @@ -6316,6 +7284,40 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, return bfd_reloc_ok; } + case R_ARM_THM_PC8: + /* PR 10073: This reloc is not generated by the GNU toolchain, + but it is supported for compatibility with third party libraries + generated by other compilers, specifically the ARM/IAR. */ + { + bfd_vma insn; + bfd_signed_vma relocation; + + insn = bfd_get_16 (input_bfd, hit_data); + + if (globals->use_rel) + addend = (insn & 0x00ff) << 2; + + relocation = value + addend; + relocation -= (input_section->output_section->vma + + input_section->output_offset + + rel->r_offset); + + value = abs (relocation); + + /* We do not check for overflow of this reloc. Although strictly + speaking this is incorrect, it appears to be necessary in order + to work with IAR generated relocs. Since GCC and GAS do not + generate R_ARM_THM_PC8 relocs, the lack of a check should not be + a problem for them. */ + value &= 0x3fc; + + insn = (insn & 0xff00) | (value >> 2); + + bfd_put_16 (input_bfd, insn, hit_data); + + return bfd_reloc_ok; + } + case R_ARM_THM_PC12: /* Corresponds to: ldr.w reg, [pc, #offset]. */ { @@ -6367,15 +7369,25 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, bfd_vma check; bfd_signed_vma signed_check; int bitsize; - int thumb2 = using_thumb2 (globals); + const int thumb2 = using_thumb2 (globals); /* A branch to an undefined weak symbol is turned into a jump to - the next instruction unless a PLT entry will be created. */ + the next instruction unless a PLT entry will be created. + The jump to the next instruction is optimized as a NOP.W for + Thumb-2 enabled architectures. */ if (h && h->root.type == bfd_link_hash_undefweak && !(splt != NULL && h->plt.offset != (bfd_vma) -1)) { - bfd_put_16 (input_bfd, 0xe000, hit_data); - bfd_put_16 (input_bfd, 0xbf00, hit_data + 2); + if (arch_has_thumb2_nop (globals)) + { + bfd_put_16 (input_bfd, 0xf3af, hit_data); + bfd_put_16 (input_bfd, 0x8000, hit_data + 2); + } + else + { + bfd_put_16 (input_bfd, 0xe000, hit_data); + bfd_put_16 (input_bfd, 0xbf00, hit_data + 2); + } return bfd_reloc_ok; } @@ -6424,7 +7436,8 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, /* Convert BL to BLX. */ lower_insn = (lower_insn & ~0x1000) | 0x0800; } - else if (r_type != R_ARM_THM_CALL) + else if (( r_type != R_ARM_THM_CALL) + && (r_type != R_ARM_THM_JUMP24)) { if (elf32_thumb_to_arm_stub (info, sym_name, input_bfd, output_bfd, input_section, @@ -6454,14 +7467,18 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, /* If the Thumb BLX instruction is available, convert the BL to a BLX instruction to call the ARM-mode PLT entry. */ lower_insn = (lower_insn & ~0x1000) | 0x0800; + sym_flags = STT_FUNC; } else - /* Target the Thumb stub before the ARM PLT entry. */ - value -= PLT_THUMB_STUB_SIZE; + { + /* Target the Thumb stub before the ARM PLT entry. */ + value -= PLT_THUMB_STUB_SIZE; + sym_flags = STT_ARM_TFUNC; + } *unresolved_reloc_p = FALSE; } - if (r_type == R_ARM_THM_CALL) + if (r_type == R_ARM_THM_CALL || r_type == R_ARM_THM_JUMP24) { /* Check if a stub has to be inserted because the destination is too far. */ @@ -6481,7 +7498,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, (thumb2 && (branch_offset > THM2_MAX_FWD_BRANCH_OFFSET || (branch_offset < THM2_MAX_BWD_BRANCH_OFFSET))) - || ((sym_flags != STT_ARM_TFUNC) && !globals->use_blx)) + || ((sym_flags != STT_ARM_TFUNC) + && (((r_type == R_ARM_THM_CALL) && !globals->use_blx) + || r_type == R_ARM_THM_JUMP24))) { /* The target is out of reach or we are changing modes, so redirect the branch to the local stub for this @@ -6495,7 +7514,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, + stub_entry->stub_sec->output_section->vma); /* If this call becomes a call to Arm, force BLX. */ - if (globals->use_blx) + if (globals->use_blx && (r_type == R_ARM_THM_CALL)) { if ((stub_entry && !arm_stub_is_thumb (stub_entry->stub_type)) @@ -7085,7 +8104,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, (_("%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"), input_bfd, input_section, (long) rel->r_offset, howto->name); - return FALSE; + return (bfd_reloc_status_type) FALSE; } else value = tpoff (info, value); @@ -7762,6 +8781,25 @@ elf32_arm_relocate_section (bfd * output_bfd, sym = local_syms + r_symndx; sym_type = ELF32_ST_TYPE (sym->st_info); sec = local_sections[r_symndx]; + + /* An object file might have a reference to a local + undefined symbol. This is a daft object file, but we + should at least do something about it. V4BX & NONE + relocations do not use the symbol and are explicitly + allowed to use the undefined symbol, so allow those. */ + if (r_type != R_ARM_V4BX + && r_type != R_ARM_NONE + && bfd_is_und_section (sec) + && ELF_ST_BIND (sym->st_info) != STB_WEAK) + { + if (!info->callbacks->undefined_symbol + (info, bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name), + input_bfd, input_section, + rel->r_offset, TRUE)) + return FALSE; + } + if (globals->use_rel) { relocation = (sec->output_section->vma @@ -8004,6 +9042,308 @@ elf32_arm_relocate_section (bfd * output_bfd, return TRUE; } +/* Add a new unwind edit to the list described by HEAD, TAIL. If INDEX is zero, + adds the edit to the start of the list. (The list must be built in order of + ascending INDEX: the function's callers are primarily responsible for + maintaining that condition). */ + +static void +add_unwind_table_edit (arm_unwind_table_edit **head, + arm_unwind_table_edit **tail, + arm_unwind_edit_type type, + asection *linked_section, + unsigned int index) +{ + arm_unwind_table_edit *new_edit = (arm_unwind_table_edit *) + xmalloc (sizeof (arm_unwind_table_edit)); + + new_edit->type = type; + new_edit->linked_section = linked_section; + new_edit->index = index; + + if (index > 0) + { + new_edit->next = NULL; + + if (*tail) + (*tail)->next = new_edit; + + (*tail) = new_edit; + + if (!*head) + (*head) = new_edit; + } + else + { + new_edit->next = *head; + + if (!*tail) + *tail = new_edit; + + *head = new_edit; + } +} + +static _arm_elf_section_data *get_arm_elf_section_data (asection *); + +/* Increase the size of EXIDX_SEC by ADJUST bytes. ADJUST mau be negative. */ +static void +adjust_exidx_size(asection *exidx_sec, int adjust) +{ + asection *out_sec; + + if (!exidx_sec->rawsize) + exidx_sec->rawsize = exidx_sec->size; + + bfd_set_section_size (exidx_sec->owner, exidx_sec, exidx_sec->size + adjust); + out_sec = exidx_sec->output_section; + /* Adjust size of output section. */ + bfd_set_section_size (out_sec->owner, out_sec, out_sec->size +adjust); +} + +/* Insert an EXIDX_CANTUNWIND marker at the end of a section. */ +static void +insert_cantunwind_after(asection *text_sec, asection *exidx_sec) +{ + struct _arm_elf_section_data *exidx_arm_data; + + exidx_arm_data = get_arm_elf_section_data (exidx_sec); + add_unwind_table_edit ( + &exidx_arm_data->u.exidx.unwind_edit_list, + &exidx_arm_data->u.exidx.unwind_edit_tail, + INSERT_EXIDX_CANTUNWIND_AT_END, text_sec, UINT_MAX); + + adjust_exidx_size(exidx_sec, 8); +} + +/* Scan .ARM.exidx tables, and create a list describing edits which should be + made to those tables, such that: + + 1. Regions without unwind data are marked with EXIDX_CANTUNWIND entries. + 2. Duplicate entries are merged together (EXIDX_CANTUNWIND, or unwind + codes which have been inlined into the index). + + The edits are applied when the tables are written + (in elf32_arm_write_section). +*/ + +bfd_boolean +elf32_arm_fix_exidx_coverage (asection **text_section_order, + unsigned int num_text_sections, + struct bfd_link_info *info) +{ + bfd *inp; + unsigned int last_second_word = 0, i; + asection *last_exidx_sec = NULL; + asection *last_text_sec = NULL; + int last_unwind_type = -1; + + /* Walk over all EXIDX sections, and create backlinks from the corrsponding + text sections. */ + for (inp = info->input_bfds; inp != NULL; inp = inp->link_next) + { + asection *sec; + + for (sec = inp->sections; sec != NULL; sec = sec->next) + { + struct bfd_elf_section_data *elf_sec = elf_section_data (sec); + Elf_Internal_Shdr *hdr = &elf_sec->this_hdr; + + if (!hdr || hdr->sh_type != SHT_ARM_EXIDX) + continue; + + if (elf_sec->linked_to) + { + Elf_Internal_Shdr *linked_hdr + = &elf_section_data (elf_sec->linked_to)->this_hdr; + struct _arm_elf_section_data *linked_sec_arm_data + = get_arm_elf_section_data (linked_hdr->bfd_section); + + if (linked_sec_arm_data == NULL) + continue; + + /* Link this .ARM.exidx section back from the text section it + describes. */ + linked_sec_arm_data->u.text.arm_exidx_sec = sec; + } + } + } + + /* Walk all text sections in order of increasing VMA. Eilminate duplicate + index table entries (EXIDX_CANTUNWIND and inlined unwind opcodes), + and add EXIDX_CANTUNWIND entries for sections with no unwind table data. + */ + + for (i = 0; i < num_text_sections; i++) + { + asection *sec = text_section_order[i]; + asection *exidx_sec; + struct _arm_elf_section_data *arm_data = get_arm_elf_section_data (sec); + struct _arm_elf_section_data *exidx_arm_data; + bfd_byte *contents = NULL; + int deleted_exidx_bytes = 0; + bfd_vma j; + arm_unwind_table_edit *unwind_edit_head = NULL; + arm_unwind_table_edit *unwind_edit_tail = NULL; + Elf_Internal_Shdr *hdr; + bfd *ibfd; + + if (arm_data == NULL) + continue; + + exidx_sec = arm_data->u.text.arm_exidx_sec; + if (exidx_sec == NULL) + { + /* Section has no unwind data. */ + if (last_unwind_type == 0 || !last_exidx_sec) + continue; + + /* Ignore zero sized sections. */ + if (sec->size == 0) + continue; + + insert_cantunwind_after(last_text_sec, last_exidx_sec); + last_unwind_type = 0; + continue; + } + + /* Skip /DISCARD/ sections. */ + if (bfd_is_abs_section (exidx_sec->output_section)) + continue; + + hdr = &elf_section_data (exidx_sec)->this_hdr; + if (hdr->sh_type != SHT_ARM_EXIDX) + continue; + + exidx_arm_data = get_arm_elf_section_data (exidx_sec); + if (exidx_arm_data == NULL) + continue; + + ibfd = exidx_sec->owner; + + if (hdr->contents != NULL) + contents = hdr->contents; + else if (! bfd_malloc_and_get_section (ibfd, exidx_sec, &contents)) + /* An error? */ + continue; + + for (j = 0; j < hdr->sh_size; j += 8) + { + unsigned int second_word = bfd_get_32 (ibfd, contents + j + 4); + int unwind_type; + int elide = 0; + + /* An EXIDX_CANTUNWIND entry. */ + if (second_word == 1) + { + if (last_unwind_type == 0) + elide = 1; + unwind_type = 0; + } + /* Inlined unwinding data. Merge if equal to previous. */ + else if ((second_word & 0x80000000) != 0) + { + if (last_second_word == second_word && last_unwind_type == 1) + elide = 1; + unwind_type = 1; + last_second_word = second_word; + } + /* Normal table entry. In theory we could merge these too, + but duplicate entries are likely to be much less common. */ + else + unwind_type = 2; + + if (elide) + { + add_unwind_table_edit (&unwind_edit_head, &unwind_edit_tail, + DELETE_EXIDX_ENTRY, NULL, j / 8); + + deleted_exidx_bytes += 8; + } + + last_unwind_type = unwind_type; + } + + /* Free contents if we allocated it ourselves. */ + if (contents != hdr->contents) + free (contents); + + /* Record edits to be applied later (in elf32_arm_write_section). */ + exidx_arm_data->u.exidx.unwind_edit_list = unwind_edit_head; + exidx_arm_data->u.exidx.unwind_edit_tail = unwind_edit_tail; + + if (deleted_exidx_bytes > 0) + adjust_exidx_size(exidx_sec, -deleted_exidx_bytes); + + last_exidx_sec = exidx_sec; + last_text_sec = sec; + } + + /* Add terminating CANTUNWIND entry. */ + if (last_exidx_sec && last_unwind_type != 0) + insert_cantunwind_after(last_text_sec, last_exidx_sec); + + return TRUE; +} + +static bfd_boolean +elf32_arm_output_glue_section (struct bfd_link_info *info, bfd *obfd, + bfd *ibfd, const char *name) +{ + asection *sec, *osec; + + sec = bfd_get_section_by_name (ibfd, name); + if (sec == NULL || (sec->flags & SEC_EXCLUDE) != 0) + return TRUE; + + osec = sec->output_section; + if (elf32_arm_write_section (obfd, info, sec, sec->contents)) + return TRUE; + + if (! bfd_set_section_contents (obfd, osec, sec->contents, + sec->output_offset, sec->size)) + return FALSE; + + return TRUE; +} + +static bfd_boolean +elf32_arm_final_link (bfd *abfd, struct bfd_link_info *info) +{ + struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (info); + + /* Invoke the regular ELF backend linker to do all the work. */ + if (!bfd_elf_final_link (abfd, info)) + return FALSE; + + /* Write out any glue sections now that we have created all the + stubs. */ + if (globals->bfd_of_glue_owner != NULL) + { + if (! elf32_arm_output_glue_section (info, abfd, + globals->bfd_of_glue_owner, + ARM2THUMB_GLUE_SECTION_NAME)) + return FALSE; + + if (! elf32_arm_output_glue_section (info, abfd, + globals->bfd_of_glue_owner, + THUMB2ARM_GLUE_SECTION_NAME)) + return FALSE; + + if (! elf32_arm_output_glue_section (info, abfd, + globals->bfd_of_glue_owner, + VFP11_ERRATUM_VENEER_SECTION_NAME)) + return FALSE; + + if (! elf32_arm_output_glue_section (info, abfd, + globals->bfd_of_glue_owner, + ARM_BX_GLUE_SECTION_NAME)) + return FALSE; + } + + return TRUE; +} + /* Set the right machine number. */ static bfd_boolean @@ -8212,7 +9552,7 @@ set_secondary_compatible_arch (bfd *abfd, int arch) /* Note: the tag and its argument below are uleb128 values, though currently-defined values fit in one byte for each. */ if (!attr->s) - attr->s = bfd_alloc (abfd, 3); + attr->s = (char *) bfd_alloc (abfd, 3); attr->s[0] = Tag_CPU_arch; attr->s[1] = arch; attr->s[2] = '\0'; @@ -8329,7 +9669,7 @@ tag_cpu_arch_combine (bfd *ibfd, int oldtag, int *secondary_compat_out, if (oldtag >= MAX_TAG_CPU_ARCH || newtag >= MAX_TAG_CPU_ARCH) { - _bfd_error_handler (_("ERROR: %B: Unknown CPU architecture"), ibfd); + _bfd_error_handler (_("error: %B: Unknown CPU architecture"), ibfd); return -1; } @@ -8367,7 +9707,7 @@ tag_cpu_arch_combine (bfd *ibfd, int oldtag, int *secondary_compat_out, if (result == -1) { - _bfd_error_handler (_("ERROR: %B: Conflicting CPU architectures %d/%d"), + _bfd_error_handler (_("error: %B: Conflicting CPU architectures %d/%d"), ibfd, oldtag, newtag); return -1; } @@ -8395,6 +9735,12 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) int i; bfd_boolean result = TRUE; + /* Skip the linker stubs file. This preserves previous behavior + of accepting unknown attributes in the first input file - but + is that a bug? */ + if (ibfd->flags & BFD_LINKER_CREATED) + return TRUE; + if (!elf_known_obj_attributes_proc (obfd)[0].i) { /* This is the first object. Copy the attributes. */ @@ -8418,7 +9764,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) else if (in_attr[Tag_ABI_FP_number_model].i != 0) { _bfd_error_handler - (_("ERROR: %B uses VFP register arguments, %B does not"), + (_("error: %B uses VFP register arguments, %B does not"), ibfd, obfd); result = FALSE; } @@ -8534,7 +9880,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) binaries in the toolchain have had the attributes set properly. _bfd_error_handler - (_("ERROR: %B: 8-byte data alignment conflicts with %B"), + (_("error: %B: 8-byte data alignment conflicts with %B"), obfd, ibfd); result = FALSE; */ } @@ -8568,7 +9914,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) else { _bfd_error_handler - (_("ERROR: %B: Conflicting architecture profiles %c/%c"), + (_("error: %B: Conflicting architecture profiles %c/%c"), ibfd, in_attr[i].i ? in_attr[i].i : '0', out_attr[i].i ? out_attr[i].i : '0'); @@ -8601,7 +9947,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) && in_attr[i].i != AEABI_R9_unused) { _bfd_error_handler - (_("ERROR: %B: Conflicting use of R9"), ibfd); + (_("error: %B: Conflicting use of R9"), ibfd); result = FALSE; } if (out_attr[i].i == AEABI_R9_unused) @@ -8613,7 +9959,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) && out_attr[Tag_ABI_PCS_R9_use].i != AEABI_R9_unused) { _bfd_error_handler - (_("ERROR: %B: SB relative addressing conflicts with use of R9"), + (_("error: %B: SB relative addressing conflicts with use of R9"), ibfd); result = FALSE; } @@ -8669,7 +10015,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) if (in_attr[i].i != out_attr[i].i) { _bfd_error_handler - (_("ERROR: %B uses iWMMXt register arguments, %B does not"), + (_("error: %B uses iWMMXt register arguments, %B does not"), ibfd, obfd); result = FALSE; } @@ -8691,7 +10037,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd) if (in_attr[i].i != out_attr[i].i) { _bfd_error_handler - (_("ERROR: fp16 format mismatch between %B and %B"), + (_("error: fp16 format mismatch between %B and %B"), ibfd, obfd); result = FALSE; } @@ -8862,281 +10208,63 @@ elf32_arm_versions_compatible (unsigned iver, unsigned over) object file when linking. */ static bfd_boolean -elf32_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd) -{ - flagword out_flags; - flagword in_flags; - bfd_boolean flags_compatible = TRUE; - asection *sec; +elf32_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd); - /* Check if we have the same endianess. */ - if (! _bfd_generic_verify_endian_match (ibfd, obfd)) - return FALSE; +/* Display the flags field. */ - if (! is_arm_elf (ibfd) || ! is_arm_elf (obfd)) - return TRUE; +static bfd_boolean +elf32_arm_print_private_bfd_data (bfd *abfd, void * ptr) +{ + FILE * file = (FILE *) ptr; + unsigned long flags; - if (!elf32_arm_merge_eabi_attributes (ibfd, obfd)) - return FALSE; + BFD_ASSERT (abfd != NULL && ptr != NULL); - /* The input BFD must have had its flags initialised. */ - /* The following seems bogus to me -- The flags are initialized in - the assembler but I don't think an elf_flags_init field is - written into the object. */ - /* BFD_ASSERT (elf_flags_init (ibfd)); */ + /* Print normal ELF private data. */ + _bfd_elf_print_private_bfd_data (abfd, ptr); - in_flags = elf_elfheader (ibfd)->e_flags; - out_flags = elf_elfheader (obfd)->e_flags; + flags = elf_elfheader (abfd)->e_flags; + /* Ignore init flag - it may not be set, despite the flags field + containing valid data. */ - /* In theory there is no reason why we couldn't handle this. However - in practice it isn't even close to working and there is no real - reason to want it. */ - if (EF_ARM_EABI_VERSION (in_flags) >= EF_ARM_EABI_VER4 - && !(ibfd->flags & DYNAMIC) - && (in_flags & EF_ARM_BE8)) - { - _bfd_error_handler (_("ERROR: %B is already in final BE8 format"), - ibfd); - return FALSE; - } + /* xgettext:c-format */ + fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags); - if (!elf_flags_init (obfd)) + switch (EF_ARM_EABI_VERSION (flags)) { - /* If the input is the default architecture and had the default - flags then do not bother setting the flags for the output - architecture, instead allow future merges to do this. If no - future merges ever set these flags then they will retain their - uninitialised values, which surprise surprise, correspond - to the default values. */ - if (bfd_get_arch_info (ibfd)->the_default - && elf_elfheader (ibfd)->e_flags == 0) - return TRUE; + case EF_ARM_EABI_UNKNOWN: + /* The following flag bits are GNU extensions and not part of the + official ARM ELF extended ABI. Hence they are only decoded if + the EABI version is not set. */ + if (flags & EF_ARM_INTERWORK) + fprintf (file, _(" [interworking enabled]")); - elf_flags_init (obfd) = TRUE; - elf_elfheader (obfd)->e_flags = in_flags; + if (flags & EF_ARM_APCS_26) + fprintf (file, " [APCS-26]"); + else + fprintf (file, " [APCS-32]"); - if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) - && bfd_get_arch_info (obfd)->the_default) - return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); + if (flags & EF_ARM_VFP_FLOAT) + fprintf (file, _(" [VFP float format]")); + else if (flags & EF_ARM_MAVERICK_FLOAT) + fprintf (file, _(" [Maverick float format]")); + else + fprintf (file, _(" [FPA float format]")); - return TRUE; - } + if (flags & EF_ARM_APCS_FLOAT) + fprintf (file, _(" [floats passed in float registers]")); - /* Determine what should happen if the input ARM architecture - does not match the output ARM architecture. */ - if (! bfd_arm_merge_machines (ibfd, obfd)) - return FALSE; + if (flags & EF_ARM_PIC) + fprintf (file, _(" [position independent]")); - /* Identical flags must be compatible. */ - if (in_flags == out_flags) - return TRUE; + if (flags & EF_ARM_NEW_ABI) + fprintf (file, _(" [new ABI]")); - /* Check to see if the input BFD actually contains any sections. If - not, its flags may not have been initialised either, but it - cannot actually cause any incompatiblity. Do not short-circuit - dynamic objects; their section list may be emptied by - elf_link_add_object_symbols. + if (flags & EF_ARM_OLD_ABI) + fprintf (file, _(" [old ABI]")); - Also check to see if there are no code sections in the input. - In this case there is no need to check for code specific flags. - XXX - do we need to worry about floating-point format compatability - in data sections ? */ - if (!(ibfd->flags & DYNAMIC)) - { - bfd_boolean null_input_bfd = TRUE; - bfd_boolean only_data_sections = TRUE; - - for (sec = ibfd->sections; sec != NULL; sec = sec->next) - { - /* Ignore synthetic glue sections. */ - if (strcmp (sec->name, ".glue_7") - && strcmp (sec->name, ".glue_7t")) - { - if ((bfd_get_section_flags (ibfd, sec) - & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) - == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) - only_data_sections = FALSE; - - null_input_bfd = FALSE; - break; - } - } - - if (null_input_bfd || only_data_sections) - return TRUE; - } - - /* Complain about various flag mismatches. */ - if (!elf32_arm_versions_compatible (EF_ARM_EABI_VERSION (in_flags), - EF_ARM_EABI_VERSION (out_flags))) - { - _bfd_error_handler - (_("ERROR: Source object %B has EABI version %d, but target %B has EABI version %d"), - ibfd, obfd, - (in_flags & EF_ARM_EABIMASK) >> 24, - (out_flags & EF_ARM_EABIMASK) >> 24); - return FALSE; - } - - /* Not sure what needs to be checked for EABI versions >= 1. */ - /* VxWorks libraries do not use these flags. */ - if (get_elf_backend_data (obfd) != &elf32_arm_vxworks_bed - && get_elf_backend_data (ibfd) != &elf32_arm_vxworks_bed - && EF_ARM_EABI_VERSION (in_flags) == EF_ARM_EABI_UNKNOWN) - { - if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26)) - { - _bfd_error_handler - (_("ERROR: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"), - ibfd, obfd, - in_flags & EF_ARM_APCS_26 ? 26 : 32, - out_flags & EF_ARM_APCS_26 ? 26 : 32); - flags_compatible = FALSE; - } - - if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT)) - { - if (in_flags & EF_ARM_APCS_FLOAT) - _bfd_error_handler - (_("ERROR: %B passes floats in float registers, whereas %B passes them in integer registers"), - ibfd, obfd); - else - _bfd_error_handler - (_("ERROR: %B passes floats in integer registers, whereas %B passes them in float registers"), - ibfd, obfd); - - flags_compatible = FALSE; - } - - if ((in_flags & EF_ARM_VFP_FLOAT) != (out_flags & EF_ARM_VFP_FLOAT)) - { - if (in_flags & EF_ARM_VFP_FLOAT) - _bfd_error_handler - (_("ERROR: %B uses VFP instructions, whereas %B does not"), - ibfd, obfd); - else - _bfd_error_handler - (_("ERROR: %B uses FPA instructions, whereas %B does not"), - ibfd, obfd); - - flags_compatible = FALSE; - } - - if ((in_flags & EF_ARM_MAVERICK_FLOAT) != (out_flags & EF_ARM_MAVERICK_FLOAT)) - { - if (in_flags & EF_ARM_MAVERICK_FLOAT) - _bfd_error_handler - (_("ERROR: %B uses Maverick instructions, whereas %B does not"), - ibfd, obfd); - else - _bfd_error_handler - (_("ERROR: %B does not use Maverick instructions, whereas %B does"), - ibfd, obfd); - - flags_compatible = FALSE; - } - -#ifdef EF_ARM_SOFT_FLOAT - if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT)) - { - /* We can allow interworking between code that is VFP format - layout, and uses either soft float or integer regs for - passing floating point arguments and results. We already - know that the APCS_FLOAT flags match; similarly for VFP - flags. */ - if ((in_flags & EF_ARM_APCS_FLOAT) != 0 - || (in_flags & EF_ARM_VFP_FLOAT) == 0) - { - if (in_flags & EF_ARM_SOFT_FLOAT) - _bfd_error_handler - (_("ERROR: %B uses software FP, whereas %B uses hardware FP"), - ibfd, obfd); - else - _bfd_error_handler - (_("ERROR: %B uses hardware FP, whereas %B uses software FP"), - ibfd, obfd); - - flags_compatible = FALSE; - } - } -#endif - - /* Interworking mismatch is only a warning. */ - if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK)) - { - if (in_flags & EF_ARM_INTERWORK) - { - _bfd_error_handler - (_("Warning: %B supports interworking, whereas %B does not"), - ibfd, obfd); - } - else - { - _bfd_error_handler - (_("Warning: %B does not support interworking, whereas %B does"), - ibfd, obfd); - } - } - } - - return flags_compatible; -} - -/* Display the flags field. */ - -static bfd_boolean -elf32_arm_print_private_bfd_data (bfd *abfd, void * ptr) -{ - FILE * file = (FILE *) ptr; - unsigned long flags; - - BFD_ASSERT (abfd != NULL && ptr != NULL); - - /* Print normal ELF private data. */ - _bfd_elf_print_private_bfd_data (abfd, ptr); - - flags = elf_elfheader (abfd)->e_flags; - /* Ignore init flag - it may not be set, despite the flags field - containing valid data. */ - - /* xgettext:c-format */ - fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags); - - switch (EF_ARM_EABI_VERSION (flags)) - { - case EF_ARM_EABI_UNKNOWN: - /* The following flag bits are GNU extensions and not part of the - official ARM ELF extended ABI. Hence they are only decoded if - the EABI version is not set. */ - if (flags & EF_ARM_INTERWORK) - fprintf (file, _(" [interworking enabled]")); - - if (flags & EF_ARM_APCS_26) - fprintf (file, " [APCS-26]"); - else - fprintf (file, " [APCS-32]"); - - if (flags & EF_ARM_VFP_FLOAT) - fprintf (file, _(" [VFP float format]")); - else if (flags & EF_ARM_MAVERICK_FLOAT) - fprintf (file, _(" [Maverick float format]")); - else - fprintf (file, _(" [FPA float format]")); - - if (flags & EF_ARM_APCS_FLOAT) - fprintf (file, _(" [floats passed in float registers]")); - - if (flags & EF_ARM_PIC) - fprintf (file, _(" [position independent]")); - - if (flags & EF_ARM_NEW_ABI) - fprintf (file, _(" [new ABI]")); - - if (flags & EF_ARM_OLD_ABI) - fprintf (file, _(" [old ABI]")); - - if (flags & EF_ARM_SOFT_FLOAT) - fprintf (file, _(" [software FP]")); + if (flags & EF_ARM_SOFT_FLOAT) + fprintf (file, _(" [software FP]")); flags &= ~(EF_ARM_INTERWORK | EF_ARM_APCS_26 | EF_ARM_APCS_FLOAT | EF_ARM_PIC | EF_ARM_NEW_ABI | EF_ARM_OLD_ABI @@ -9410,6 +10538,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, bfd_vma *local_got_offsets; struct elf32_arm_link_hash_table *htab; bfd_boolean needs_plt; + unsigned long nsyms; if (info->relocatable) return TRUE; @@ -9433,7 +10562,8 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, symtab_hdr = & elf_symtab_hdr (abfd); sym_hashes = elf_sym_hashes (abfd); - + nsyms = NUM_SHDR_ENTRIES (symtab_hdr); + rel_end = relocs + sec->reloc_count; for (rel = relocs; rel < rel_end; rel++) { @@ -9446,14 +10576,18 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, r_type = ELF32_R_TYPE (rel->r_info); r_type = arm_real_reloc_type (htab, r_type); - if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr)) + if (r_symndx >= nsyms + /* PR 9934: It is possible to have relocations that do not + refer to symbols, thus it is also possible to have an + object file containing relocations but no symbol table. */ + && (r_symndx > 0 || nsyms > 0)) { (*_bfd_error_handler) (_("%B: bad symbol index: %d"), abfd, - r_symndx); + r_symndx); return FALSE; } - if (r_symndx < symtab_hdr->sh_info) + if (nsyms == 0 || r_symndx < symtab_hdr->sh_info) h = NULL; else { @@ -9499,7 +10633,8 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, size = symtab_hdr->sh_info; size *= (sizeof (bfd_signed_vma) + sizeof (char)); - local_got_refcounts = bfd_zalloc (abfd, size); + local_got_refcounts = (bfd_signed_vma *) + bfd_zalloc (abfd, size); if (local_got_refcounts == NULL) return FALSE; elf_local_got_refcounts (abfd) = local_got_refcounts; @@ -9562,16 +10697,27 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, needs_plt = 1; goto normal_reloc; + case R_ARM_MOVW_ABS_NC: + case R_ARM_MOVT_ABS: + case R_ARM_THM_MOVW_ABS_NC: + case R_ARM_THM_MOVT_ABS: + if (info->shared) + { + (*_bfd_error_handler) + (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"), + abfd, elf32_arm_howto_table_1[r_type].name, + (h) ? h->root.root.string : "a local symbol"); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + + /* Fall through. */ case R_ARM_ABS32: case R_ARM_ABS32_NOI: case R_ARM_REL32: case R_ARM_REL32_NOI: - case R_ARM_MOVW_ABS_NC: - case R_ARM_MOVT_ABS: case R_ARM_MOVW_PREL_NC: case R_ARM_MOVT_PREL: - case R_ARM_THM_MOVW_ABS_NC: - case R_ARM_THM_MOVT_ABS: case R_ARM_THM_MOVW_PREL_NC: case R_ARM_THM_MOVT_PREL: needs_plt = 0; @@ -9644,12 +10790,12 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, return FALSE; /* BPABI objects never have dynamic relocations mapped. */ - if (! htab->symbian_p) + if (htab->symbian_p) { flagword flags; flags = bfd_get_section_flags (dynobj, sreloc); - flags |= (SEC_LOAD | SEC_ALLOC); + flags &= ~(SEC_LOAD | SEC_ALLOC); bfd_set_section_flags (dynobj, sreloc, flags); } } @@ -9665,15 +10811,19 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, /* Track dynamic relocs needed for local syms too. We really need local syms available to do this easily. Oh well. */ - asection *s; void *vpp; + Elf_Internal_Sym *isym; - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (s == NULL) + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; + vpp = &elf_section_data (s)->local_dynrel; head = (struct elf32_arm_relocs_copied **) vpp; } @@ -9683,7 +10833,8 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, { bfd_size_type amt = sizeof *p; - p = bfd_alloc (htab->root.dynobj, amt); + p = (struct elf32_arm_relocs_copied *) + bfd_alloc (htab->root.dynobj, amt); if (p == NULL) return FALSE; p->next = *head; @@ -10457,7 +11608,8 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, { struct elf32_arm_relocs_copied *p; - for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next) + for (p = (struct elf32_arm_relocs_copied *) + elf_section_data (s)->local_dynrel; p != NULL; p = p->next) { if (!bfd_is_abs_section (p->section) && bfd_is_abs_section (p->section->output_section)) @@ -10547,6 +11699,9 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, ibfd->filename); } + /* Allocate space for the glue sections now that we've sized them. */ + bfd_elf32_arm_allocate_interworking_sections (info); + /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ @@ -10608,7 +11763,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, continue; /* Allocate memory for the section contents. */ - s->contents = bfd_zalloc (dynobj, s->size); + s->contents = (unsigned char *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) return FALSE; } @@ -11403,7 +12558,7 @@ record_section_with_arm_elf_section_data (asection * sec) { struct section_list * entry; - entry = bfd_malloc (sizeof (* entry)); + entry = (struct section_list *) bfd_malloc (sizeof (* entry)); if (entry == NULL) return; entry->sec = sec; @@ -11487,8 +12642,8 @@ typedef struct struct bfd_link_info *info; asection *sec; int sec_shndx; - bfd_boolean (*func) (void *, const char *, Elf_Internal_Sym *, - asection *, struct elf_link_hash_entry *); + int (*func) (void *, const char *, Elf_Internal_Sym *, + asection *, struct elf_link_hash_entry *); } output_arch_syminfo; enum map_symbol_type @@ -11518,9 +12673,7 @@ elf32_arm_output_map_sym (output_arch_syminfo *osi, sym.st_other = 0; sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_NOTYPE); sym.st_shndx = osi->sec_shndx; - if (!osi->func (osi->finfo, names[type], &sym, osi->sec, NULL)) - return FALSE; - return TRUE; + return osi->func (osi->finfo, names[type], &sym, osi->sec, NULL) == 1; } @@ -11618,9 +12771,7 @@ elf32_arm_output_stub_sym (output_arch_syminfo *osi, const char *name, sym.st_other = 0; sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_FUNC); sym.st_shndx = osi->sec_shndx; - if (!osi->func (osi->finfo, name, &sym, osi->sec, NULL)) - return FALSE; - return TRUE; + return osi->func (osi->finfo, name, &sym, osi->sec, NULL) == 1; } static bfd_boolean @@ -11634,6 +12785,11 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry, bfd_vma addr; char *stub_name; output_arch_syminfo *osi; + const insn_sequence *template_sequence; + enum stub_insn_type prev_type; + int size; + int i; + enum map_symbol_type sym_type; /* Massage our args to the form they really have. */ stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry; @@ -11652,81 +12808,97 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry, addr = (bfd_vma) stub_entry->stub_offset; stub_name = stub_entry->output_name; - switch (stub_entry->stub_type) + template_sequence = stub_entry->stub_template; + switch (template_sequence[0].type) { - case arm_stub_long_branch: - if (!elf32_arm_output_stub_sym (osi, stub_name, addr, 8)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 4)) - return FALSE; - break; - case arm_thumb_v4t_stub_long_branch: - if (!elf32_arm_output_stub_sym (osi, stub_name, addr, 12)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 8)) - return FALSE; - break; - case arm_thumb_thumb_stub_long_branch: - if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1, 16)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_THUMB, addr)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 12)) + case ARM_TYPE: + if (!elf32_arm_output_stub_sym (osi, stub_name, addr, stub_entry->stub_size)) return FALSE; break; - case arm_thumb_arm_v4t_stub_long_branch: - if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1, 20)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_THUMB, addr)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr + 8)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 16)) - return FALSE; - break; - case arm_thumb_arm_v4t_stub_short_branch: - if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1, 8)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr + 4)) - return FALSE; - break; - case arm_stub_pic_long_branch: - if (!elf32_arm_output_stub_sym (osi, stub_name, addr, 12)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr)) - return FALSE; - if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 8)) + case THUMB16_TYPE: + case THUMB32_TYPE: + if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1, + stub_entry->stub_size)) return FALSE; break; default: BFD_FAIL (); + return 0; } - return TRUE; -} + prev_type = DATA_TYPE; + size = 0; + for (i = 0; i < stub_entry->stub_template_size; i++) + { + switch (template_sequence[i].type) + { + case ARM_TYPE: + sym_type = ARM_MAP_ARM; + break; -/* Output mapping symbols for linker generated sections. */ + case THUMB16_TYPE: + case THUMB32_TYPE: + sym_type = ARM_MAP_THUMB; + break; -static bfd_boolean -elf32_arm_output_arch_local_syms (bfd *output_bfd, - struct bfd_link_info *info, - void *finfo, - bfd_boolean (*func) (void *, const char *, - Elf_Internal_Sym *, - asection *, - struct elf_link_hash_entry *)) -{ - output_arch_syminfo osi; - struct elf32_arm_link_hash_table *htab; - bfd_vma offset; - bfd_size_type size; + case DATA_TYPE: + sym_type = ARM_MAP_DATA; + break; - htab = elf32_arm_hash_table (info); - check_use_blx (htab); + default: + BFD_FAIL (); + return FALSE; + } + + if (template_sequence[i].type != prev_type) + { + prev_type = template_sequence[i].type; + if (!elf32_arm_output_map_sym (osi, sym_type, addr + size)) + return FALSE; + } + + switch (template_sequence[i].type) + { + case ARM_TYPE: + case THUMB32_TYPE: + size += 4; + break; + + case THUMB16_TYPE: + size += 2; + break; + + case DATA_TYPE: + size += 4; + break; + + default: + BFD_FAIL (); + return FALSE; + } + } + + return TRUE; +} + +/* Output mapping symbols for linker generated sections. */ + +static bfd_boolean +elf32_arm_output_arch_local_syms (bfd *output_bfd, + struct bfd_link_info *info, + void *finfo, + int (*func) (void *, const char *, + Elf_Internal_Sym *, + asection *, + struct elf_link_hash_entry *)) +{ + output_arch_syminfo osi; + struct elf32_arm_link_hash_table *htab; + bfd_vma offset; + bfd_size_type size; + + htab = elf32_arm_hash_table (info); + check_use_blx (htab); osi.finfo = finfo; osi.info = info; @@ -11850,7 +13022,7 @@ elf32_arm_new_section_hook (bfd *abfd, asection *sec) _arm_elf_section_data *sdata; bfd_size_type amt = sizeof (*sdata); - sdata = bfd_zalloc (abfd, amt); + sdata = (_arm_elf_section_data *) bfd_zalloc (abfd, amt); if (sdata == NULL) return FALSE; sec->used_by_bfd = sdata; @@ -11885,6 +13057,149 @@ elf32_arm_compare_mapping (const void * a, const void * b) return 0; } +/* Add OFFSET to lower 31 bits of ADDR, leaving other bits unmodified. */ + +static unsigned long +offset_prel31 (unsigned long addr, bfd_vma offset) +{ + return (addr & ~0x7ffffffful) | ((addr + offset) & 0x7ffffffful); +} + +/* Copy an .ARM.exidx table entry, adding OFFSET to (applied) PREL31 + relocations. */ + +static void +copy_exidx_entry (bfd *output_bfd, bfd_byte *to, bfd_byte *from, bfd_vma offset) +{ + unsigned long first_word = bfd_get_32 (output_bfd, from); + unsigned long second_word = bfd_get_32 (output_bfd, from + 4); + + /* High bit of first word is supposed to be zero. */ + if ((first_word & 0x80000000ul) == 0) + first_word = offset_prel31 (first_word, offset); + + /* If the high bit of the first word is clear, and the bit pattern is not 0x1 + (EXIDX_CANTUNWIND), this is an offset to an .ARM.extab entry. */ + if ((second_word != 0x1) && ((second_word & 0x80000000ul) == 0)) + second_word = offset_prel31 (second_word, offset); + + bfd_put_32 (output_bfd, first_word, to); + bfd_put_32 (output_bfd, second_word, to + 4); +} + +/* Data for make_branch_to_a8_stub(). */ + +struct a8_branch_to_stub_data { + asection *writing_section; + bfd_byte *contents; +}; + + +/* Helper to insert branches to Cortex-A8 erratum stubs in the right + places for a particular section. */ + +static bfd_boolean +make_branch_to_a8_stub (struct bfd_hash_entry *gen_entry, + void *in_arg) +{ + struct elf32_arm_stub_hash_entry *stub_entry; + struct a8_branch_to_stub_data *data; + bfd_byte *contents; + unsigned long branch_insn; + bfd_vma veneered_insn_loc, veneer_entry_loc; + bfd_signed_vma branch_offset; + bfd *abfd; + unsigned int index; + + stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry; + data = (struct a8_branch_to_stub_data *) in_arg; + + if (stub_entry->target_section != data->writing_section + || stub_entry->stub_type < arm_stub_a8_veneer_b_cond) + return TRUE; + + contents = data->contents; + + veneered_insn_loc = stub_entry->target_section->output_section->vma + + stub_entry->target_section->output_offset + + stub_entry->target_value; + + veneer_entry_loc = stub_entry->stub_sec->output_section->vma + + stub_entry->stub_sec->output_offset + + stub_entry->stub_offset; + + if (stub_entry->stub_type == arm_stub_a8_veneer_blx) + veneered_insn_loc &= ~3u; + + branch_offset = veneer_entry_loc - veneered_insn_loc - 4; + + abfd = stub_entry->target_section->owner; + index = stub_entry->target_value; + + /* We attempt to avoid this condition by setting stubs_always_after_branch + in elf32_arm_size_stubs if we've enabled the Cortex-A8 erratum workaround. + This check is just to be on the safe side... */ + if ((veneered_insn_loc & ~0xfff) == (veneer_entry_loc & ~0xfff)) + { + (*_bfd_error_handler) (_("%B: error: Cortex-A8 erratum stub is " + "allocated in unsafe location"), abfd); + return FALSE; + } + + switch (stub_entry->stub_type) + { + case arm_stub_a8_veneer_b: + case arm_stub_a8_veneer_b_cond: + branch_insn = 0xf0009000; + goto jump24; + + case arm_stub_a8_veneer_blx: + branch_insn = 0xf000e800; + goto jump24; + + case arm_stub_a8_veneer_bl: + { + unsigned int i1, j1, i2, j2, s; + + branch_insn = 0xf000d000; + + jump24: + if (branch_offset < -16777216 || branch_offset > 16777214) + { + /* There's not much we can do apart from complain if this + happens. */ + (*_bfd_error_handler) (_("%B: error: Cortex-A8 erratum stub out " + "of range (input file too large)"), abfd); + return FALSE; + } + + /* i1 = not(j1 eor s), so: + not i1 = j1 eor s + j1 = (not i1) eor s. */ + + branch_insn |= (branch_offset >> 1) & 0x7ff; + branch_insn |= ((branch_offset >> 12) & 0x3ff) << 16; + i2 = (branch_offset >> 22) & 1; + i1 = (branch_offset >> 23) & 1; + s = (branch_offset >> 24) & 1; + j1 = (!i1) ^ s; + j2 = (!i2) ^ s; + branch_insn |= j2 << 11; + branch_insn |= j1 << 13; + branch_insn |= s << 26; + } + break; + + default: + BFD_FAIL (); + return FALSE; + } + + bfd_put_16 (abfd, (branch_insn >> 16) & 0xffff, &contents[index]); + bfd_put_16 (abfd, branch_insn & 0xffff, &contents[index + 2]); + + return TRUE; +} /* Do code byteswapping. Return FALSE afterwards so that the section is written out as normal. */ @@ -11895,7 +13210,7 @@ elf32_arm_write_section (bfd *output_bfd, asection *sec, bfd_byte *contents) { - int mapcount, errcount; + unsigned int mapcount, errcount; _arm_elf_section_data *arm_data; struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info); elf32_arm_section_map *map; @@ -11904,7 +13219,7 @@ elf32_arm_write_section (bfd *output_bfd, bfd_vma end; bfd_vma offset = sec->output_section->vma + sec->output_offset; bfd_byte tmp; - int i; + unsigned int i; /* If this section has not been allocated an _arm_elf_section_data structure then we cannot record anything. */ @@ -11991,6 +13306,106 @@ elf32_arm_write_section (bfd *output_bfd, } } + if (arm_data->elf.this_hdr.sh_type == SHT_ARM_EXIDX) + { + arm_unwind_table_edit *edit_node + = arm_data->u.exidx.unwind_edit_list; + /* Now, sec->size is the size of the section we will write. The original + size (before we merged duplicate entries and inserted EXIDX_CANTUNWIND + markers) was sec->rawsize. (This isn't the case if we perform no + edits, then rawsize will be zero and we should use size). */ + bfd_byte *edited_contents = (bfd_byte *) bfd_malloc (sec->size); + unsigned int input_size = sec->rawsize ? sec->rawsize : sec->size; + unsigned int in_index, out_index; + bfd_vma add_to_offsets = 0; + + for (in_index = 0, out_index = 0; in_index * 8 < input_size || edit_node;) + { + if (edit_node) + { + unsigned int edit_index = edit_node->index; + + if (in_index < edit_index && in_index * 8 < input_size) + { + copy_exidx_entry (output_bfd, edited_contents + out_index * 8, + contents + in_index * 8, add_to_offsets); + out_index++; + in_index++; + } + else if (in_index == edit_index + || (in_index * 8 >= input_size + && edit_index == UINT_MAX)) + { + switch (edit_node->type) + { + case DELETE_EXIDX_ENTRY: + in_index++; + add_to_offsets += 8; + break; + + case INSERT_EXIDX_CANTUNWIND_AT_END: + { + asection *text_sec = edit_node->linked_section; + bfd_vma text_offset = text_sec->output_section->vma + + text_sec->output_offset + + text_sec->size; + bfd_vma exidx_offset = offset + out_index * 8; + unsigned long prel31_offset; + + /* Note: this is meant to be equivalent to an + R_ARM_PREL31 relocation. These synthetic + EXIDX_CANTUNWIND markers are not relocated by the + usual BFD method. */ + prel31_offset = (text_offset - exidx_offset) + & 0x7ffffffful; + + /* First address we can't unwind. */ + bfd_put_32 (output_bfd, prel31_offset, + &edited_contents[out_index * 8]); + + /* Code for EXIDX_CANTUNWIND. */ + bfd_put_32 (output_bfd, 0x1, + &edited_contents[out_index * 8 + 4]); + + out_index++; + add_to_offsets -= 8; + } + break; + } + + edit_node = edit_node->next; + } + } + else + { + /* No more edits, copy remaining entries verbatim. */ + copy_exidx_entry (output_bfd, edited_contents + out_index * 8, + contents + in_index * 8, add_to_offsets); + out_index++; + in_index++; + } + } + + if (!(sec->flags & SEC_EXCLUDE) && !(sec->flags & SEC_NEVER_LOAD)) + bfd_set_section_contents (output_bfd, sec->output_section, + edited_contents, + (file_ptr) sec->output_offset, sec->size); + + return TRUE; + } + + /* Fix code to point to Cortex-A8 erratum stubs. */ + if (globals->fix_cortex_a8) + { + struct a8_branch_to_stub_data data; + + data.writing_section = sec; + data.contents = contents; + + bfd_hash_traverse (&globals->stub_hash_table, make_branch_to_a8_stub, + &data); + } + if (mapcount == 0) return FALSE; @@ -12172,7 +13587,8 @@ elf32_arm_modify_segment_map (bfd *abfd, m = m->next; if (!m) { - m = bfd_zalloc (abfd, sizeof (struct elf_segment_map)); + m = (struct elf_segment_map *) + bfd_zalloc (abfd, sizeof (struct elf_segment_map)); if (m == NULL) return FALSE; m->p_type = PT_ARM_EXIDX; @@ -12267,6 +13683,7 @@ const struct elf_size_info elf32_arm_size_info = #define bfd_elf32_bfd_is_target_special_symbol elf32_arm_is_target_special_symbol #define bfd_elf32_close_and_cleanup elf32_arm_close_and_cleanup #define bfd_elf32_bfd_free_cached_info elf32_arm_bfd_free_cached_info +#define bfd_elf32_bfd_final_link elf32_arm_final_link #define elf_backend_get_symbol_type elf32_arm_get_symbol_type #define elf_backend_gc_mark_hook elf32_arm_gc_mark_hook @@ -12383,6 +13800,231 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker) #include "elf32-target.h" +/* Merge backend specific data from an object file to the output + object file when linking. */ + +static bfd_boolean +elf32_arm_merge_private_bfd_data (bfd * ibfd, bfd * obfd) +{ + flagword out_flags; + flagword in_flags; + bfd_boolean flags_compatible = TRUE; + asection *sec; + + /* Check if we have the same endianess. */ + if (! _bfd_generic_verify_endian_match (ibfd, obfd)) + return FALSE; + + if (! is_arm_elf (ibfd) || ! is_arm_elf (obfd)) + return TRUE; + + if (!elf32_arm_merge_eabi_attributes (ibfd, obfd)) + return FALSE; + + /* The input BFD must have had its flags initialised. */ + /* The following seems bogus to me -- The flags are initialized in + the assembler but I don't think an elf_flags_init field is + written into the object. */ + /* BFD_ASSERT (elf_flags_init (ibfd)); */ + + in_flags = elf_elfheader (ibfd)->e_flags; + out_flags = elf_elfheader (obfd)->e_flags; + + /* In theory there is no reason why we couldn't handle this. However + in practice it isn't even close to working and there is no real + reason to want it. */ + if (EF_ARM_EABI_VERSION (in_flags) >= EF_ARM_EABI_VER4 + && !(ibfd->flags & DYNAMIC) + && (in_flags & EF_ARM_BE8)) + { + _bfd_error_handler (_("error: %B is already in final BE8 format"), + ibfd); + return FALSE; + } + + if (!elf_flags_init (obfd)) + { + /* If the input is the default architecture and had the default + flags then do not bother setting the flags for the output + architecture, instead allow future merges to do this. If no + future merges ever set these flags then they will retain their + uninitialised values, which surprise surprise, correspond + to the default values. */ + if (bfd_get_arch_info (ibfd)->the_default + && elf_elfheader (ibfd)->e_flags == 0) + return TRUE; + + elf_flags_init (obfd) = TRUE; + elf_elfheader (obfd)->e_flags = in_flags; + + if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) + && bfd_get_arch_info (obfd)->the_default) + return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); + + return TRUE; + } + + /* Determine what should happen if the input ARM architecture + does not match the output ARM architecture. */ + if (! bfd_arm_merge_machines (ibfd, obfd)) + return FALSE; + + /* Identical flags must be compatible. */ + if (in_flags == out_flags) + return TRUE; + + /* Check to see if the input BFD actually contains any sections. If + not, its flags may not have been initialised either, but it + cannot actually cause any incompatiblity. Do not short-circuit + dynamic objects; their section list may be emptied by + elf_link_add_object_symbols. + + Also check to see if there are no code sections in the input. + In this case there is no need to check for code specific flags. + XXX - do we need to worry about floating-point format compatability + in data sections ? */ + if (!(ibfd->flags & DYNAMIC)) + { + bfd_boolean null_input_bfd = TRUE; + bfd_boolean only_data_sections = TRUE; + + for (sec = ibfd->sections; sec != NULL; sec = sec->next) + { + /* Ignore synthetic glue sections. */ + if (strcmp (sec->name, ".glue_7") + && strcmp (sec->name, ".glue_7t")) + { + if ((bfd_get_section_flags (ibfd, sec) + & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) + == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) + only_data_sections = FALSE; + + null_input_bfd = FALSE; + break; + } + } + + if (null_input_bfd || only_data_sections) + return TRUE; + } + + /* Complain about various flag mismatches. */ + if (!elf32_arm_versions_compatible (EF_ARM_EABI_VERSION (in_flags), + EF_ARM_EABI_VERSION (out_flags))) + { + _bfd_error_handler + (_("error: Source object %B has EABI version %d, but target %B has EABI version %d"), + ibfd, obfd, + (in_flags & EF_ARM_EABIMASK) >> 24, + (out_flags & EF_ARM_EABIMASK) >> 24); + return FALSE; + } + + /* Not sure what needs to be checked for EABI versions >= 1. */ + /* VxWorks libraries do not use these flags. */ + if (get_elf_backend_data (obfd) != &elf32_arm_vxworks_bed + && get_elf_backend_data (ibfd) != &elf32_arm_vxworks_bed + && EF_ARM_EABI_VERSION (in_flags) == EF_ARM_EABI_UNKNOWN) + { + if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26)) + { + _bfd_error_handler + (_("error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"), + ibfd, obfd, + in_flags & EF_ARM_APCS_26 ? 26 : 32, + out_flags & EF_ARM_APCS_26 ? 26 : 32); + flags_compatible = FALSE; + } + + if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT)) + { + if (in_flags & EF_ARM_APCS_FLOAT) + _bfd_error_handler + (_("error: %B passes floats in float registers, whereas %B passes them in integer registers"), + ibfd, obfd); + else + _bfd_error_handler + (_("error: %B passes floats in integer registers, whereas %B passes them in float registers"), + ibfd, obfd); + + flags_compatible = FALSE; + } + + if ((in_flags & EF_ARM_VFP_FLOAT) != (out_flags & EF_ARM_VFP_FLOAT)) + { + if (in_flags & EF_ARM_VFP_FLOAT) + _bfd_error_handler + (_("error: %B uses VFP instructions, whereas %B does not"), + ibfd, obfd); + else + _bfd_error_handler + (_("error: %B uses FPA instructions, whereas %B does not"), + ibfd, obfd); + + flags_compatible = FALSE; + } + + if ((in_flags & EF_ARM_MAVERICK_FLOAT) != (out_flags & EF_ARM_MAVERICK_FLOAT)) + { + if (in_flags & EF_ARM_MAVERICK_FLOAT) + _bfd_error_handler + (_("error: %B uses Maverick instructions, whereas %B does not"), + ibfd, obfd); + else + _bfd_error_handler + (_("error: %B does not use Maverick instructions, whereas %B does"), + ibfd, obfd); + + flags_compatible = FALSE; + } + +#ifdef EF_ARM_SOFT_FLOAT + if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT)) + { + /* We can allow interworking between code that is VFP format + layout, and uses either soft float or integer regs for + passing floating point arguments and results. We already + know that the APCS_FLOAT flags match; similarly for VFP + flags. */ + if ((in_flags & EF_ARM_APCS_FLOAT) != 0 + || (in_flags & EF_ARM_VFP_FLOAT) == 0) + { + if (in_flags & EF_ARM_SOFT_FLOAT) + _bfd_error_handler + (_("error: %B uses software FP, whereas %B uses hardware FP"), + ibfd, obfd); + else + _bfd_error_handler + (_("error: %B uses hardware FP, whereas %B uses software FP"), + ibfd, obfd); + + flags_compatible = FALSE; + } + } +#endif + + /* Interworking mismatch is only a warning. */ + if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK)) + { + if (in_flags & EF_ARM_INTERWORK) + { + _bfd_error_handler + (_("Warning: %B supports interworking, whereas %B does not"), + ibfd, obfd); + } + else + { + _bfd_error_handler + (_("Warning: %B does not support interworking, whereas %B does"), + ibfd, obfd); + } + } + } + + return flags_compatible; +} + + /* Symbian OS Targets. */ #undef TARGET_LITTLE_SYM diff --git a/cegcc/src/binutils/bfd/elf32-avr.c b/cegcc/src/binutils/bfd/elf32-avr.c index afcef18aa..cc063600a 100644 --- a/cegcc/src/binutils/bfd/elf32-avr.c +++ b/cegcc/src/binutils/bfd/elf32-avr.c @@ -1,5 +1,5 @@ /* AVR-specific support for 32-bit ELF - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008 + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Denis Chertykov @@ -1415,7 +1415,6 @@ elf32_avr_relax_delete_bytes (bfd *abfd, Elf_Internal_Rela *irelalign; Elf_Internal_Sym *isym; Elf_Internal_Sym *isymbuf = NULL; - Elf_Internal_Sym *isymend; bfd_vma toaddr; struct elf_link_hash_entry **sym_hashes; struct elf_link_hash_entry **end_hashes; @@ -1553,13 +1552,19 @@ elf32_avr_relax_delete_bytes (bfd *abfd, /* Adjust the local symbols defined in this section. */ isym = (Elf_Internal_Sym *) symtab_hdr->contents; - isymend = isym + symtab_hdr->sh_info; - for (; isym < isymend; isym++) + /* Fix PR 9841, there may be no local symbols. */ + if (isym != NULL) { - if (isym->st_shndx == sec_shndx - && isym->st_value > addr - && isym->st_value < toaddr) - isym->st_value -= count; + Elf_Internal_Sym *isymend; + + isymend = isym + symtab_hdr->sh_info; + for (; isym < isymend; isym++) + { + if (isym->st_shndx == sec_shndx + && isym->st_value > addr + && isym->st_value < toaddr) + isym->st_value -= count; + } } /* Now adjust the global symbols defined in this section. */ @@ -1629,6 +1634,10 @@ elf32_avr_relax_section (bfd *abfd, static Elf_Internal_Rela *last_reloc = NULL; struct elf32_avr_link_hash_table *htab; + if (link_info->relocatable) + (*link_info->callbacks->einfo) + (_("%P%F: --relax and -r may not be used together\n")); + htab = avr_link_hash_table (link_info); if (htab == NULL) return FALSE; diff --git a/cegcc/src/binutils/bfd/elf32-bfin.c b/cegcc/src/binutils/bfd/elf32-bfin.c index c7d11240a..a76774901 100644 --- a/cegcc/src/binutils/bfd/elf32-bfin.c +++ b/cegcc/src/binutils/bfd/elf32-bfin.c @@ -1,5 +1,5 @@ /* ADI Blackfin BFD support for 32-bit ELF. - Copyright 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -23,7 +23,7 @@ #include "libbfd.h" #include "elf-bfd.h" #include "elf/bfin.h" -#include "elf/dwarf2.h" +#include "dwarf2.h" #include "hashtab.h" /* FUNCTION : bfin_pltpc_reloc @@ -421,7 +421,7 @@ bfin_bfd_reloc (bfd *abfd, static reloc_howto_type bfin_howto_table [] = { /* This reloc does nothing. . */ - HOWTO (R_unused0, /* type. */ + HOWTO (R_BFIN_UNUSED0, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ @@ -429,13 +429,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ - "R_unused0", /* name. */ + "R_BFIN_UNUSED0", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ FALSE), /* pcrel_offset. */ - HOWTO (R_pcrel5m2, /* type. */ + HOWTO (R_BFIN_PCREL5M2, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long).. */ 4, /* bitsize. */ @@ -443,13 +443,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ - "R_pcrel5m2", /* name. */ + "R_BFIN_PCREL5M2", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x0000000F, /* dst_mask. */ FALSE), /* pcrel_offset. */ - HOWTO (R_unused1, /* type. */ + HOWTO (R_BFIN_UNUSED1, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ @@ -457,13 +457,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ - "R_unused1", /* name. */ + "R_BFIN_UNUSED1", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ FALSE), /* pcrel_offset. */ - HOWTO (R_pcrel10, /* type. */ + HOWTO (R_BFIN_PCREL10, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 10, /* bitsize. */ @@ -471,13 +471,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ - "R_pcrel10", /* name. */ + "R_BFIN_PCREL10", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x000003FF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_pcrel12_jump, /* type. */ + HOWTO (R_BFIN_PCREL12_JUMP, /* type. */ 1, /* rightshift. */ /* the offset is actually 13 bit aligned on a word boundary so @@ -489,13 +489,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ - "R_pcrel12_jump", /* name. */ + "R_BFIN_PCREL12_JUMP", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x0FFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_rimm16, /* type. */ + HOWTO (R_BFIN_RIMM16, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ @@ -503,13 +503,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_imm16_reloc, /* special_function. */ - "R_rimm16", /* name. */ + "R_BFIN_RIMM16", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x0000FFFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_luimm16, /* type. */ + HOWTO (R_BFIN_LUIMM16, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ @@ -517,13 +517,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ bfin_imm16_reloc, /* special_function. */ - "R_luimm16", /* name. */ + "R_BFIN_LUIMM16", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x0000FFFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_huimm16, /* type. */ + HOWTO (R_BFIN_HUIMM16, /* type. */ 16, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ @@ -531,13 +531,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfin_imm16_reloc, /* special_function. */ - "R_huimm16", /* name. */ + "R_BFIN_HUIMM16", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x0000FFFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_pcrel12_jump_s, /* type. */ + HOWTO (R_BFIN_PCREL12_JUMP_S, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 12, /* bitsize. */ @@ -545,13 +545,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ - "R_pcrel12_jump_s", /* name. */ + "R_BFIN_PCREL12_JUMP_S", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x00000FFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_pcrel24_jump_x, /* type. */ + HOWTO (R_BFIN_PCREL24_JUMP_X, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 24, /* bitsize. */ @@ -559,13 +559,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_pcrel24_reloc, /* special_function. */ - "R_pcrel24_jump_x", /* name. */ + "R_BFIN_PCREL24_JUMP_X", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x00FFFFFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_pcrel24, /* type. */ + HOWTO (R_BFIN_PCREL24, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 24, /* bitsize. */ @@ -573,13 +573,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_pcrel24_reloc, /* special_function. */ - "R_pcrel24", /* name. */ + "R_BFIN_PCREL24", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x00FFFFFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_unusedb, /* type. */ + HOWTO (R_BFIN_UNUSEDB, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ @@ -587,13 +587,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ - "R_unusedb", /* name. */ + "R_BFIN_UNUSEDB", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ FALSE), /* pcrel_offset. */ - HOWTO (R_unusedc, /* type. */ + HOWTO (R_BFIN_UNUSEDC, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ @@ -601,13 +601,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ - "R_unusedc", /* name. */ + "R_BFIN_UNUSEDC", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ FALSE), /* pcrel_offset. */ - HOWTO (R_pcrel24_jump_l, /* type. */ + HOWTO (R_BFIN_PCREL24_JUMP_L, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 24, /* bitsize. */ @@ -615,13 +615,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_pcrel24_reloc, /* special_function. */ - "R_pcrel24_jump_l", /* name. */ + "R_BFIN_PCREL24_JUMP_L", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x00FFFFFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_pcrel24_call_x, /* type. */ + HOWTO (R_BFIN_PCREL24_CALL_X, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 24, /* bitsize. */ @@ -629,13 +629,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_pcrel24_reloc, /* special_function. */ - "R_pcrel24_call_x", /* name. */ + "R_BFIN_PCREL24_CALL_X", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x00FFFFFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_var_eq_symb, /* type. */ + HOWTO (R_BFIN_VAR_EQ_SYMB, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ @@ -643,13 +643,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ - "R_var_eq_symb", /* name. */ + "R_BFIN_VAR_EQ_SYMB", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ FALSE), /* pcrel_offset. */ - HOWTO (R_byte_data, /* type. */ + HOWTO (R_BFIN_BYTE_DATA, /* type. */ 0, /* rightshift. */ 0, /* size (0 = byte, 1 = short, 2 = long). */ 8, /* bitsize. */ @@ -657,13 +657,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ - "R_byte_data", /* name. */ + "R_BFIN_BYTE_DATA", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0xFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_byte2_data, /* type. */ + HOWTO (R_BFIN_BYTE2_DATA, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ @@ -671,13 +671,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ - "R_byte2_data", /* name. */ + "R_BFIN_BYTE2_DATA", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0xFFFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_byte4_data, /* type. */ + HOWTO (R_BFIN_BYTE4_DATA, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ @@ -685,13 +685,13 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfin_byte4_reloc, /* special_function. */ - "R_byte4_data", /* name. */ + "R_BFIN_BYTE4_DATA", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0xFFFFFFFF, /* dst_mask. */ TRUE), /* pcrel_offset. */ - HOWTO (R_pcrel11, /* type. */ + HOWTO (R_BFIN_PCREL11, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 10, /* bitsize. */ @@ -699,7 +699,7 @@ static reloc_howto_type bfin_howto_table [] = 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ - "R_pcrel11", /* name. */ + "R_BFIN_PCREL11", /* name. */ FALSE, /* partial_inplace. */ 0, /* src_mask. */ 0x000003FF, /* dst_mask. */ @@ -931,7 +931,7 @@ static reloc_howto_type bfin_howto_table [] = static reloc_howto_type bfin_gnuext_howto_table [] = { - HOWTO (R_pltpc, /* type. */ + HOWTO (R_BFIN_PLTPC, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ @@ -939,13 +939,13 @@ static reloc_howto_type bfin_gnuext_howto_table [] = 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfin_pltpc_reloc, /* special_function. */ - "R_pltpc", /* name. */ + "R_BFIN_PLTPC", /* name. */ FALSE, /* partial_inplace. */ 0xffff, /* src_mask. */ 0xffff, /* dst_mask. */ FALSE), /* pcrel_offset. */ - HOWTO (R_got, /* type. */ + HOWTO (R_BFIN_GOT, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ @@ -953,7 +953,7 @@ static reloc_howto_type bfin_gnuext_howto_table [] = 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ - "R_got", /* name. */ + "R_BFIN_GOT", /* name. */ FALSE, /* partial_inplace. */ 0x7fff, /* src_mask. */ 0x7fff, /* dst_mask. */ @@ -998,27 +998,27 @@ struct bfin_reloc_map static const struct bfin_reloc_map bfin_reloc_map [] = { - { BFD_RELOC_NONE, R_unused0 }, - { BFD_RELOC_BFIN_5_PCREL, R_pcrel5m2 }, - { BFD_RELOC_NONE, R_unused1 }, - { BFD_RELOC_BFIN_10_PCREL, R_pcrel10 }, - { BFD_RELOC_BFIN_12_PCREL_JUMP, R_pcrel12_jump }, - { BFD_RELOC_BFIN_16_IMM, R_rimm16 }, - { BFD_RELOC_BFIN_16_LOW, R_luimm16 }, - { BFD_RELOC_BFIN_16_HIGH, R_huimm16 }, - { BFD_RELOC_BFIN_12_PCREL_JUMP_S, R_pcrel12_jump_s }, - { BFD_RELOC_24_PCREL, R_pcrel24 }, - { BFD_RELOC_24_PCREL, R_pcrel24 }, - { BFD_RELOC_BFIN_24_PCREL_JUMP_L, R_pcrel24_jump_l }, - { BFD_RELOC_NONE, R_unusedb }, - { BFD_RELOC_NONE, R_unusedc }, - { BFD_RELOC_BFIN_24_PCREL_CALL_X, R_pcrel24_call_x }, - { BFD_RELOC_8, R_byte_data }, - { BFD_RELOC_16, R_byte2_data }, - { BFD_RELOC_32, R_byte4_data }, - { BFD_RELOC_BFIN_11_PCREL, R_pcrel11 }, - { BFD_RELOC_BFIN_GOT, R_got }, - { BFD_RELOC_BFIN_PLTPC, R_pltpc }, + { BFD_RELOC_NONE, R_BFIN_UNUSED0 }, + { BFD_RELOC_BFIN_5_PCREL, R_BFIN_PCREL5M2 }, + { BFD_RELOC_NONE, R_BFIN_UNUSED1 }, + { BFD_RELOC_BFIN_10_PCREL, R_BFIN_PCREL10 }, + { BFD_RELOC_BFIN_12_PCREL_JUMP, R_BFIN_PCREL12_JUMP }, + { BFD_RELOC_BFIN_16_IMM, R_BFIN_RIMM16 }, + { BFD_RELOC_BFIN_16_LOW, R_BFIN_LUIMM16 }, + { BFD_RELOC_BFIN_16_HIGH, R_BFIN_HUIMM16 }, + { BFD_RELOC_BFIN_12_PCREL_JUMP_S, R_BFIN_PCREL12_JUMP_S }, + { BFD_RELOC_24_PCREL, R_BFIN_PCREL24 }, + { BFD_RELOC_24_PCREL, R_BFIN_PCREL24 }, + { BFD_RELOC_BFIN_24_PCREL_JUMP_L, R_BFIN_PCREL24_JUMP_L }, + { BFD_RELOC_NONE, R_BFIN_UNUSEDB }, + { BFD_RELOC_NONE, R_BFIN_UNUSEDC }, + { BFD_RELOC_BFIN_24_PCREL_CALL_X, R_BFIN_PCREL24_CALL_X }, + { BFD_RELOC_8, R_BFIN_BYTE_DATA }, + { BFD_RELOC_16, R_BFIN_BYTE2_DATA }, + { BFD_RELOC_32, R_BFIN_BYTE4_DATA }, + { BFD_RELOC_BFIN_11_PCREL, R_BFIN_PCREL11 }, + { BFD_RELOC_BFIN_GOT, R_BFIN_GOT }, + { BFD_RELOC_BFIN_PLTPC, R_BFIN_PLTPC }, { BFD_RELOC_BFIN_GOT17M4, R_BFIN_GOT17M4 }, { BFD_RELOC_BFIN_GOTHI, R_BFIN_GOTHI }, @@ -1123,7 +1123,7 @@ bfin_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, bfin local labels begin with L$. */ static bfd_boolean bfin_is_local_label_name ( - bfd *abfd ATTRIBUTE_UNUSED, + bfd *abfd, const char *label) { if (label[0] == 'L' && label[1] == '$' ) @@ -1191,7 +1191,7 @@ bfin_check_relocs (bfd * abfd, return FALSE; break; - case R_got: + case R_BFIN_GOT: if (h != NULL && strcmp (h->root.root.string, "__GLOBAL_OFFSET_TABLE_") == 0) break; @@ -1301,7 +1301,7 @@ bfin_final_link_relocate (Elf_Internal_Rela *rel, reloc_howto_type *howto, { int r_type = ELF32_R_TYPE (rel->r_info); - if (r_type == R_pcrel24 || r_type == R_pcrel24_jump_l) + if (r_type == R_BFIN_PCREL24 || r_type == R_BFIN_PCREL24_JUMP_L) { bfd_reloc_status_type r = bfd_reloc_ok; bfd_vma x; @@ -1450,7 +1450,7 @@ bfin_relocate_section (bfd * output_bfd, case R_BFIN_GNU_VTENTRY: return bfd_reloc_ok; - case R_got: + case R_BFIN_GOT: /* Relocation is to the address of the entry for this symbol in the global offset table. */ if (h != NULL @@ -1543,7 +1543,7 @@ bfin_relocate_section (bfd * output_bfd, outrel.r_offset = (sgot->output_section->vma + sgot->output_offset + off); outrel.r_info = - ELF32_R_INFO (0, R_pcrel24); + ELF32_R_INFO (0, R_BFIN_PCREL24); outrel.r_addend = relocation; loc = s->contents; loc += @@ -1675,7 +1675,7 @@ bfin_gc_sweep_hook (bfd * abfd, switch (ELF32_R_TYPE (rel->r_info)) { - case R_got: + case R_BFIN_GOT: r_symndx = ELF32_R_SYM (rel->r_info); if (r_symndx >= symtab_hdr->sh_info) { @@ -1740,6 +1740,9 @@ struct bfinfdpic_elf_link_hash_table /* A hash table holding information about which symbols were referenced with which PIC-related relocations. */ struct htab *relocs_info; + /* Summary reloc information collected by + _bfinfdpic_count_got_plt_entries. */ + struct _bfinfdpic_dynamic_got_info *g; }; /* Get the Blackfin ELF linker hash table from a link_info structure. */ @@ -1763,6 +1766,8 @@ struct bfinfdpic_elf_link_hash_table (bfinfdpic_hash_table (info)->got0) #define bfinfdpic_plt_initial_offset(info) \ (bfinfdpic_hash_table (info)->plt0) +#define bfinfdpic_dynamic_got_plt_info(info) \ + (bfinfdpic_hash_table (info)->g) /* The name of the dynamic interpreter. This is put in the .interp section. */ @@ -1893,7 +1898,7 @@ struct bfinfdpic_relocs_info needed for this symbol. */ unsigned done:1; - /* The number of R_byte4_data, R_BFIN_FUNCDESC and R_BFIN_FUNCDESC_VALUE + /* The number of R_BFIN_BYTE4_DATA, R_BFIN_FUNCDESC and R_BFIN_FUNCDESC_VALUE relocations referencing the symbol. */ unsigned relocs32, relocsfd, relocsfdv; @@ -1945,8 +1950,12 @@ bfinfdpic_relocs_info_find (struct htab *ht, const struct bfinfdpic_relocs_info *entry, enum insert_option insert) { - struct bfinfdpic_relocs_info **loc = - (struct bfinfdpic_relocs_info **) htab_find_slot (ht, entry, insert); + struct bfinfdpic_relocs_info **loc; + + if (!ht) + return NULL; + + loc = (struct bfinfdpic_relocs_info **) htab_find_slot (ht, entry, insert); if (! loc) return NULL; @@ -2149,7 +2158,8 @@ _bfinfdpic_emit_got_relocs_plt_entries (struct bfinfdpic_relocs_info *entry, dynindx = entry->d.h->dynindx; else { - if (sec->output_section + if (sec + && sec->output_section && ! bfd_is_abs_section (sec->output_section) && ! bfd_is_und_section (sec->output_section)) dynindx = elf_section_data (sec->output_section)->dynindx; @@ -2209,7 +2219,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (struct bfinfdpic_relocs_info *entry, + bfinfdpic_got_section (info) ->output_section->vma + bfinfdpic_got_section (info)->output_offset, - R_byte4_data, idx, ad, entry); + R_BFIN_BYTE4_DATA, idx, ad, entry); bfd_put_32 (output_bfd, ad, bfinfdpic_got_section (info)->contents @@ -2261,7 +2271,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (struct bfinfdpic_relocs_info *entry, so reference it directly. */ if (elf_hash_table (info)->dynamic_sections_created) BFD_ASSERT (entry->privfd); - reloc = R_byte4_data; + reloc = R_BFIN_BYTE4_DATA; idx = elf_section_data (bfinfdpic_got_section (info) ->output_section)->dynindx; ad = bfinfdpic_got_section (info)->output_offset @@ -2417,8 +2427,9 @@ _bfinfdpic_emit_got_relocs_plt_entries (struct bfinfdpic_relocs_info *entry, of the section. For a non-local function, it's disregarded. */ lowword = ad; - if (entry->symndx == -1 && entry->d.h->dynindx != -1 - && entry->d.h->dynindx == idx) + if (sec == NULL + || (entry->symndx == -1 && entry->d.h->dynindx != -1 + && entry->d.h->dynindx == idx)) highword = 0; else highword = _bfinfdpic_osec_to_segment @@ -2665,9 +2676,9 @@ bfinfdpic_relocate_section (bfd * output_bfd, switch (r_type) { - case R_pcrel24: - case R_pcrel24_jump_l: - case R_byte4_data: + case R_BFIN_PCREL24: + case R_BFIN_PCREL24_JUMP_L: + case R_BFIN_BYTE4_DATA: if (! IS_FDPIC (output_bfd)) goto non_fdpic; @@ -2727,8 +2738,8 @@ bfinfdpic_relocate_section (bfd * output_bfd, switch (r_type) { - case R_pcrel24: - case R_pcrel24_jump_l: + case R_BFIN_PCREL24: + case R_BFIN_PCREL24_JUMP_L: check_segment[0] = isec_segment; if (! IS_FDPIC (output_bfd)) check_segment[1] = isec_segment; @@ -2826,7 +2837,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, /* Otherwise, we know we have a private function descriptor, so reference it directly. */ BFD_ASSERT (picrel->privfd); - r_type = R_byte4_data; + r_type = R_BFIN_BYTE4_DATA; dynindx = elf_section_data (bfinfdpic_got_section (info) ->output_section)->dynindx; addend = bfinfdpic_got_section (info)->output_offset @@ -2843,6 +2854,8 @@ bfinfdpic_relocate_section (bfd * output_bfd, if (info->executable && !info->pie && (!h || BFINFDPIC_FUNCDESC_LOCAL (info, h))) { + bfd_vma offset; + addend += bfinfdpic_got_section (info)->output_section->vma; if ((bfd_get_section_flags (output_bfd, input_section->output_section) @@ -2858,16 +2871,19 @@ bfinfdpic_relocate_section (bfd * output_bfd, name, input_bfd, input_section, rel->r_offset); return FALSE; } - _bfinfdpic_add_rofixup (output_bfd, - bfinfdpic_gotfixup_section - (info), - _bfd_elf_section_offset - (output_bfd, info, - input_section, rel->r_offset) - + input_section - ->output_section->vma - + input_section->output_offset, - picrel); + + offset = _bfd_elf_section_offset + (output_bfd, info, + input_section, rel->r_offset); + + if (offset != (bfd_vma)-1) + _bfinfdpic_add_rofixup (output_bfd, + bfinfdpic_gotfixup_section + (info), + offset + input_section + ->output_section->vma + + input_section->output_offset, + picrel); } } else if ((bfd_get_section_flags (output_bfd, @@ -2888,14 +2904,8 @@ bfinfdpic_relocate_section (bfd * output_bfd, } offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); - /* Only output a reloc for a not deleted entry. */ - if (offset >= (bfd_vma) -2) - _bfinfdpic_add_dyn_reloc (output_bfd, - bfinfdpic_gotrel_section (info), - 0, - R_unused0, - dynindx, addend, picrel); - else + + if (offset != (bfd_vma)-1) _bfinfdpic_add_dyn_reloc (output_bfd, bfinfdpic_gotrel_section (info), offset + input_section @@ -2916,7 +2926,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, check_segment[0] = check_segment[1] = got_segment; break; - case R_byte4_data: + case R_BFIN_BYTE4_DATA: if (! IS_FDPIC (output_bfd)) { check_segment[0] = check_segment[1] = -1; @@ -2986,28 +2996,17 @@ bfinfdpic_relocate_section (bfd * output_bfd, } if (!h || h->root.type != bfd_link_hash_undefweak) { - /* Only output a reloc for a not deleted entry. */ - if (offset >= (bfd_vma)-2) - _bfinfdpic_add_rofixup (output_bfd, - bfinfdpic_gotfixup_section - (info), -1, picrel); - else - _bfinfdpic_add_rofixup (output_bfd, - bfinfdpic_gotfixup_section - (info), - offset + input_section - ->output_section->vma - + input_section->output_offset, - picrel); - - if (r_type == R_BFIN_FUNCDESC_VALUE) + if (offset != (bfd_vma)-1) { - if (offset >= (bfd_vma)-2) - _bfinfdpic_add_rofixup - (output_bfd, - bfinfdpic_gotfixup_section (info), - -1, picrel); - else + _bfinfdpic_add_rofixup (output_bfd, + bfinfdpic_gotfixup_section + (info), + offset + input_section + ->output_section->vma + + input_section->output_offset, + picrel); + + if (r_type == R_BFIN_FUNCDESC_VALUE) _bfinfdpic_add_rofixup (output_bfd, bfinfdpic_gotfixup_section (info), @@ -3033,17 +3032,12 @@ bfinfdpic_relocate_section (bfd * output_bfd, name, input_bfd, input_section, rel->r_offset); return FALSE; } - /* Only output a reloc for a not deleted entry. */ - if (offset >= (bfd_vma)-2) - _bfinfdpic_add_dyn_reloc (output_bfd, - bfinfdpic_gotrel_section (info), - 0, R_unused0, dynindx, addend, picrel); - else + + if (offset != (bfd_vma)-1) _bfinfdpic_add_dyn_reloc (output_bfd, bfinfdpic_gotrel_section (info), offset - + input_section - ->output_section->vma + + input_section->output_section->vma + input_section->output_offset, r_type, dynindx, addend, picrel); } @@ -3055,7 +3049,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, relocation = addend - rel->r_addend; } - if (r_type == R_BFIN_FUNCDESC_VALUE && offset < (bfd_vma)-2) + if (r_type == R_BFIN_FUNCDESC_VALUE) { /* If we've omitted the dynamic relocation, just emit the fixed addresses of the symbol and of the local @@ -3153,8 +3147,8 @@ bfinfdpic_relocate_section (bfd * output_bfd, switch (r_type) { - case R_pcrel24: - case R_pcrel24_jump_l: + case R_BFIN_PCREL24: + case R_BFIN_PCREL24_JUMP_L: if (! IS_FDPIC (output_bfd) || ! picrel->plt) break; /* Fall through. */ @@ -3284,8 +3278,8 @@ bfinfdpic_gc_sweep_hook (bfd *abfd, switch (ELF32_R_TYPE (rel->r_info)) { - case R_pcrel24: - case R_pcrel24_jump_l: + case R_BFIN_PCREL24: + case R_BFIN_PCREL24_JUMP_L: picrel->call--; break; @@ -3295,7 +3289,7 @@ bfinfdpic_gc_sweep_hook (bfd *abfd, picrel->relocs32++; /* Fall through. */ - case R_byte4_data: + case R_BFIN_BYTE4_DATA: picrel->sym--; if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC) picrel->relocs32--; @@ -3351,9 +3345,8 @@ bfinfdpic_gc_sweep_hook (bfd *abfd, relocate independently. */ static bfd_boolean _bfinfdpic_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, - struct bfd_link_info *info - ATTRIBUTE_UNUSED, - asection *p ATTRIBUTE_UNUSED) + struct bfd_link_info *info ATTRIBUTE_UNUSED, + asection *p) { switch (elf_section_data (p)->this_hdr.sh_type) { @@ -3470,28 +3463,7 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info) flags = BSF_GLOBAL | BSF_WEAK; } - return TRUE; -} - -/* Make sure the got and plt sections exist, and that our pointers in - the link hash table point to them. */ - -static bfd_boolean -elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) -{ - /* This is mostly copied from - elflink.c:_bfd_elf_create_dynamic_sections(). */ - flagword flags, pltflags; - asection *s; - const struct elf_backend_data *bed = get_elf_backend_data (abfd); - - /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and - .rel[a].bss sections. */ - - flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY - | SEC_LINKER_CREATED); - - pltflags = flags; + flags = pltflags; pltflags |= SEC_CODE; if (bed->plt_not_loaded) pltflags &= ~ (SEC_CODE | SEC_LOAD | SEC_HAS_CONTENTS); @@ -3533,6 +3505,27 @@ elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) /* Blackfin-specific: remember it. */ bfinfdpic_pltrel_section (info) = s; + return TRUE; +} + +/* Make sure the got and plt sections exist, and that our pointers in + the link hash table point to them. */ + +static bfd_boolean +elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) +{ + /* This is mostly copied from + elflink.c:_bfd_elf_create_dynamic_sections(). */ + flagword flags; + asection *s; + const struct elf_backend_data *bed = get_elf_backend_data (abfd); + + flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY + | SEC_LINKER_CREATED); + + /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and + .rel[a].bss sections. */ + /* Blackfin-specific: we want to create the GOT in the Blackfin way. */ if (! _bfin_create_got_section (abfd, info)) return FALSE; @@ -3570,8 +3563,7 @@ elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (! info->shared) { s = bfd_make_section_with_flags (abfd, - (bed->default_use_rela_p - ? ".rela.bss" : ".rel.bss"), + ".rela.bss", flags | SEC_READONLY); if (s == NULL || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align)) @@ -3587,13 +3579,10 @@ elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) the symbol, an entry pointing to its function descriptor, and a private function descriptors taking two words. */ -static int -_bfinfdpic_count_got_plt_entries (void **entryp, void *dinfo_) +static void +_bfinfdpic_count_nontls_entries (struct bfinfdpic_relocs_info *entry, + struct _bfinfdpic_dynamic_got_info *dinfo) { - struct bfinfdpic_relocs_info *entry = *entryp; - struct _bfinfdpic_dynamic_got_info *dinfo = dinfo_; - unsigned relocs = 0, fixups = 0; - /* Allocate space for a GOT entry pointing to the symbol. */ if (entry->got17m4) dinfo->got17m4 += 4; @@ -3641,6 +3630,18 @@ _bfinfdpic_count_got_plt_entries (void **entryp, void *dinfo_) if (entry->lazyplt) dinfo->lzplt += LZPLT_NORMAL_SIZE; +} + +/* Compute the number of dynamic relocations and fixups that a symbol + requires, and add (or subtract) from the grand and per-symbol + totals. */ + +static void +_bfinfdpic_count_relocs_fixups (struct bfinfdpic_relocs_info *entry, + struct _bfinfdpic_dynamic_got_info *dinfo, + bfd_boolean subtract) +{ + bfd_vma relocs = 0, fixups = 0; if (!dinfo->info->executable || dinfo->info->pie) relocs = entry->relocs32 + entry->relocsfd + entry->relocsfdv; @@ -3666,10 +3667,32 @@ _bfinfdpic_count_got_plt_entries (void **entryp, void *dinfo_) relocs += entry->relocsfd; } + if (subtract) + { + relocs = - relocs; + fixups = - fixups; + } + entry->dynrelocs += relocs; entry->fixups += fixups; dinfo->relocs += relocs; dinfo->fixups += fixups; +} + +/* Compute the total GOT and PLT size required by each symbol in each range. * + Symbols may require up to 4 words in the GOT: an entry pointing to + the symbol, an entry pointing to its function descriptor, and a + private function descriptors taking two words. */ + +static int +_bfinfdpic_count_got_plt_entries (void **entryp, void *dinfo_) +{ + struct bfinfdpic_relocs_info *entry = *entryp; + struct _bfinfdpic_dynamic_got_info *dinfo = dinfo_; + + _bfinfdpic_count_nontls_entries (entry, dinfo); + + _bfinfdpic_count_relocs_fixups (entry, dinfo, FALSE); return 1; } @@ -3965,6 +3988,23 @@ _bfinfdpic_assign_plt_entries (void **entryp, void *info_) return 1; } +/* Cancel out any effects of calling _bfinfdpic_assign_got_entries and + _bfinfdpic_assign_plt_entries. */ + +static int +_bfinfdpic_reset_got_plt_entries (void **entryp, void *ignore ATTRIBUTE_UNUSED) +{ + struct bfinfdpic_relocs_info *entry = *entryp; + + entry->got_entry = 0; + entry->fdgot_entry = 0; + entry->fd_entry = 0; + entry->plt_entry = (bfd_vma)-1; + entry->lzplt_entry = (bfd_vma)-1; + + return 1; +} + /* Follow indirect and warning hash entries so that each got entry points to the final symbol definition. P must point to a pointer to the hash table we're traversing. Since this traversal may @@ -4021,89 +4061,62 @@ _bfinfdpic_resolve_final_relocs_info (void **entryp, void *p) return 1; } -/* Set the sizes of the dynamic sections. */ +/* Compute the total size of the GOT, the PLT, the dynamic relocations + section and the rofixup section. Assign locations for GOT and PLT + entries. */ static bfd_boolean -elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, - struct bfd_link_info *info) +_bfinfdpic_size_got_plt (bfd *output_bfd, + struct _bfinfdpic_dynamic_got_plt_info *gpinfop) { - bfd *dynobj; - asection *s; - struct _bfinfdpic_dynamic_got_plt_info gpinfo; bfd_signed_vma odd; bfd_vma limit; + struct bfd_link_info *info = gpinfop->g.info; + bfd *dynobj = elf_hash_table (info)->dynobj; - dynobj = elf_hash_table (info)->dynobj; - BFD_ASSERT (dynobj != NULL); - - if (elf_hash_table (info)->dynamic_sections_created) - { - /* Set the contents of the .interp section to the interpreter. */ - if (info->executable) - { - s = bfd_get_section_by_name (dynobj, ".interp"); - BFD_ASSERT (s != NULL); - s->size = sizeof ELF_DYNAMIC_INTERPRETER; - s->contents = (bfd_byte *) ELF_DYNAMIC_INTERPRETER; - } - } - - memset (&gpinfo, 0, sizeof (gpinfo)); - gpinfo.g.info = info; - - for (;;) - { - htab_t relocs = bfinfdpic_relocs_info (info); - - htab_traverse (relocs, _bfinfdpic_resolve_final_relocs_info, &relocs); - - if (relocs == bfinfdpic_relocs_info (info)) - break; - } - - htab_traverse (bfinfdpic_relocs_info (info), _bfinfdpic_count_got_plt_entries, - &gpinfo.g); + memcpy (bfinfdpic_dynamic_got_plt_info (info), &gpinfop->g, + sizeof (gpinfop->g)); odd = 12; /* Compute the total size taken by entries in the 18-bit range, to tell how many PLT function descriptors we can bring into it without causing it to overflow. */ - limit = odd + gpinfo.g.got17m4 + gpinfo.g.fd17m4; + limit = odd + gpinfop->g.got17m4 + gpinfop->g.fd17m4; if (limit < (bfd_vma)1 << 18) limit = ((bfd_vma)1 << 18) - limit; else limit = 0; - if (gpinfo.g.fdplt < limit) - limit = gpinfo.g.fdplt; + if (gpinfop->g.fdplt < limit) + limit = gpinfop->g.fdplt; /* Determine the ranges of GOT offsets that we can use for each range of addressing modes. */ - odd = _bfinfdpic_compute_got_alloc_data (&gpinfo.got17m4, + odd = _bfinfdpic_compute_got_alloc_data (&gpinfop->got17m4, 0, odd, 16, - gpinfo.g.got17m4, - gpinfo.g.fd17m4, + gpinfop->g.got17m4, + gpinfop->g.fd17m4, limit, (bfd_vma)1 << (18-1)); - odd = _bfinfdpic_compute_got_alloc_data (&gpinfo.gothilo, - gpinfo.got17m4.min, + odd = _bfinfdpic_compute_got_alloc_data (&gpinfop->gothilo, + gpinfop->got17m4.min, odd, - gpinfo.got17m4.max, - gpinfo.g.gothilo, - gpinfo.g.fdhilo, - gpinfo.g.fdplt - gpinfo.got17m4.fdplt, + gpinfop->got17m4.max, + gpinfop->g.gothilo, + gpinfop->g.fdhilo, + gpinfop->g.fdplt - gpinfop->got17m4.fdplt, (bfd_vma)1 << (32-1)); /* Now assign (most) GOT offsets. */ htab_traverse (bfinfdpic_relocs_info (info), _bfinfdpic_assign_got_entries, - &gpinfo); + gpinfop); - bfinfdpic_got_section (info)->size = gpinfo.gothilo.max - - gpinfo.gothilo.min + bfinfdpic_got_section (info)->size = gpinfop->gothilo.max + - gpinfop->gothilo.min /* If an odd word is the last word of the GOT, we don't need this word to be part of the GOT. */ - - (odd + 4 == gpinfo.gothilo.max ? 4 : 0); + - (odd + 4 == gpinfop->gothilo.max ? 4 : 0); if (bfinfdpic_got_section (info)->size == 0) bfinfdpic_got_section (info)->flags |= SEC_EXCLUDE; else if (bfinfdpic_got_section (info)->size == 12 @@ -4125,10 +4138,10 @@ elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, /* Subtract the number of lzplt entries, since those will generate relocations in the pltrel section. */ bfinfdpic_gotrel_section (info)->size = - (gpinfo.g.relocs - gpinfo.g.lzplt / LZPLT_NORMAL_SIZE) + (gpinfop->g.relocs - gpinfop->g.lzplt / LZPLT_NORMAL_SIZE) * get_elf_backend_data (output_bfd)->s->sizeof_rel; else - BFD_ASSERT (gpinfo.g.relocs == 0); + BFD_ASSERT (gpinfop->g.relocs == 0); if (bfinfdpic_gotrel_section (info)->size == 0) bfinfdpic_gotrel_section (info)->flags |= SEC_EXCLUDE; else @@ -4140,7 +4153,7 @@ elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, return FALSE; } - bfinfdpic_gotfixup_section (info)->size = (gpinfo.g.fixups + 1) * 4; + bfinfdpic_gotfixup_section (info)->size = (gpinfop->g.fixups + 1) * 4; if (bfinfdpic_gotfixup_section (info)->size == 0) bfinfdpic_gotfixup_section (info)->flags |= SEC_EXCLUDE; else @@ -4153,19 +4166,17 @@ elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, } if (elf_hash_table (info)->dynamic_sections_created) + bfinfdpic_pltrel_section (info)->size = + gpinfop->g.lzplt / LZPLT_NORMAL_SIZE * get_elf_backend_data (output_bfd)->s->sizeof_rel; + if (bfinfdpic_pltrel_section (info)->size == 0) + bfinfdpic_pltrel_section (info)->flags |= SEC_EXCLUDE; + else { - bfinfdpic_pltrel_section (info)->size = - gpinfo.g.lzplt / LZPLT_NORMAL_SIZE * get_elf_backend_data (output_bfd)->s->sizeof_rel; - if (bfinfdpic_pltrel_section (info)->size == 0) - bfinfdpic_pltrel_section (info)->flags |= SEC_EXCLUDE; - else - { - bfinfdpic_pltrel_section (info)->contents = - (bfd_byte *) bfd_zalloc (dynobj, - bfinfdpic_pltrel_section (info)->size); - if (bfinfdpic_pltrel_section (info)->contents == NULL) - return FALSE; - } + bfinfdpic_pltrel_section (info)->contents = + (bfd_byte *) bfd_zalloc (dynobj, + bfinfdpic_pltrel_section (info)->size); + if (bfinfdpic_pltrel_section (info)->contents == NULL) + return FALSE; } /* Add 4 bytes for every block of at most 65535 lazy PLT entries, @@ -4175,47 +4186,97 @@ elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, block size. */ if (elf_hash_table (info)->dynamic_sections_created) { - bfinfdpic_plt_section (info)->size = gpinfo.g.lzplt - + ((gpinfo.g.lzplt + (BFINFDPIC_LZPLT_BLOCK_SIZE - 4) - LZPLT_NORMAL_SIZE) + bfinfdpic_plt_section (info)->size = gpinfop->g.lzplt + + ((gpinfop->g.lzplt + (BFINFDPIC_LZPLT_BLOCK_SIZE - 4) - LZPLT_NORMAL_SIZE) / (BFINFDPIC_LZPLT_BLOCK_SIZE - 4) * LZPLT_RESOLVER_EXTRA); } /* Reset it, such that _bfinfdpic_assign_plt_entries() can use it to actually assign lazy PLT entries addresses. */ - gpinfo.g.lzplt = 0; + gpinfop->g.lzplt = 0; /* Save information that we're going to need to generate GOT and PLT entries. */ - bfinfdpic_got_initial_offset (info) = -gpinfo.gothilo.min; + bfinfdpic_got_initial_offset (info) = -gpinfop->gothilo.min; if (get_elf_backend_data (output_bfd)->want_got_sym) elf_hash_table (info)->hgot->root.u.def.value - += bfinfdpic_got_initial_offset (info); + = bfinfdpic_got_initial_offset (info); if (elf_hash_table (info)->dynamic_sections_created) bfinfdpic_plt_initial_offset (info) = bfinfdpic_plt_section (info)->size; htab_traverse (bfinfdpic_relocs_info (info), _bfinfdpic_assign_plt_entries, - &gpinfo); + gpinfop); /* Allocate the PLT section contents only after _bfinfdpic_assign_plt_entries has a chance to add the size of the non-lazy PLT entries. */ - if (elf_hash_table (info)->dynamic_sections_created) + if (bfinfdpic_plt_section (info)->size == 0) + bfinfdpic_plt_section (info)->flags |= SEC_EXCLUDE; + else { - if (bfinfdpic_plt_section (info)->size == 0) - bfinfdpic_plt_section (info)->flags |= SEC_EXCLUDE; - else + bfinfdpic_plt_section (info)->contents = + (bfd_byte *) bfd_zalloc (dynobj, + bfinfdpic_plt_section (info)->size); + if (bfinfdpic_plt_section (info)->contents == NULL) + return FALSE; + } + + return TRUE; +} + +/* Set the sizes of the dynamic sections. */ + +static bfd_boolean +elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, + struct bfd_link_info *info) +{ + struct elf_link_hash_table *htab; + bfd *dynobj; + asection *s; + struct _bfinfdpic_dynamic_got_plt_info gpinfo; + + htab = elf_hash_table (info); + dynobj = htab->dynobj; + BFD_ASSERT (dynobj != NULL); + + if (htab->dynamic_sections_created) + { + /* Set the contents of the .interp section to the interpreter. */ + if (info->executable) { - bfinfdpic_plt_section (info)->contents = - (bfd_byte *) bfd_zalloc (dynobj, - bfinfdpic_plt_section (info)->size); - if (bfinfdpic_plt_section (info)->contents == NULL) - return FALSE; + s = bfd_get_section_by_name (dynobj, ".interp"); + BFD_ASSERT (s != NULL); + s->size = sizeof ELF_DYNAMIC_INTERPRETER; + s->contents = (bfd_byte *) ELF_DYNAMIC_INTERPRETER; } } + memset (&gpinfo, 0, sizeof (gpinfo)); + gpinfo.g.info = info; + + for (;;) + { + htab_t relocs = bfinfdpic_relocs_info (info); + + htab_traverse (relocs, _bfinfdpic_resolve_final_relocs_info, &relocs); + + if (relocs == bfinfdpic_relocs_info (info)) + break; + } + + htab_traverse (bfinfdpic_relocs_info (info), _bfinfdpic_count_got_plt_entries, + &gpinfo.g); + + /* Allocate space to save the summary information, we're going to + use it if we're doing relaxations. */ + bfinfdpic_dynamic_got_plt_info (info) = bfd_alloc (dynobj, sizeof (gpinfo.g)); + + if (!_bfinfdpic_size_got_plt (output_bfd, &gpinfo)) + return FALSE; + if (elf_hash_table (info)->dynamic_sections_created) { if (bfinfdpic_got_section (info)->size) @@ -4236,6 +4297,14 @@ elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, return FALSE; } + s = bfd_get_section_by_name (dynobj, ".dynbss"); + if (s && s->size == 0) + s->flags |= SEC_EXCLUDE; + + s = bfd_get_section_by_name (dynobj, ".rela.bss"); + if (s && s->size == 0) + s->flags |= SEC_EXCLUDE; + return TRUE; } @@ -4276,6 +4345,122 @@ elf32_bfinfdpic_always_size_sections (bfd *output_bfd, return TRUE; } +/* Check whether any of the relocations was optimized away, and + subtract it from the relocation or fixup count. */ +static bfd_boolean +_bfinfdpic_check_discarded_relocs (bfd *abfd, asection *sec, + struct bfd_link_info *info, + + bfd_boolean *changed) +{ + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes, **sym_hashes_end; + Elf_Internal_Rela *rel, *erel; + + if ((sec->flags & SEC_RELOC) == 0 + || sec->reloc_count == 0) + return TRUE; + + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (abfd); + sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym); + if (!elf_bad_symtab (abfd)) + sym_hashes_end -= symtab_hdr->sh_info; + + rel = elf_section_data (sec)->relocs; + + /* Now examine each relocation. */ + for (erel = rel + sec->reloc_count; rel < erel; rel++) + { + struct elf_link_hash_entry *h; + unsigned long r_symndx; + struct bfinfdpic_relocs_info *picrel; + struct _bfinfdpic_dynamic_got_info *dinfo; + + if (ELF32_R_TYPE (rel->r_info) != R_BFIN_BYTE4_DATA + && ELF32_R_TYPE (rel->r_info) != R_BFIN_FUNCDESC) + continue; + + if (_bfd_elf_section_offset (sec->output_section->owner, + info, sec, rel->r_offset) + != (bfd_vma)-1) + continue; + + r_symndx = ELF32_R_SYM (rel->r_info); + if (r_symndx < symtab_hdr->sh_info) + h = NULL; + else + { + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *)h->root.u.i.link; + } + + if (h != NULL) + picrel = bfinfdpic_relocs_info_for_global (bfinfdpic_relocs_info (info), + abfd, h, + rel->r_addend, NO_INSERT); + else + picrel = bfinfdpic_relocs_info_for_local (bfinfdpic_relocs_info (info), + abfd, r_symndx, + rel->r_addend, NO_INSERT); + + if (! picrel) + return FALSE; + + *changed = TRUE; + dinfo = bfinfdpic_dynamic_got_plt_info (info); + + _bfinfdpic_count_relocs_fixups (picrel, dinfo, TRUE); + if (ELF32_R_TYPE (rel->r_info) == R_BFIN_BYTE4_DATA) + picrel->relocs32--; + else /* we know (ELF32_R_TYPE (rel->r_info) == R_BFIN_FUNCDESC) */ + picrel->relocsfd--; + _bfinfdpic_count_relocs_fixups (picrel, dinfo, FALSE); + } + + return TRUE; +} + +static bfd_boolean +bfinfdpic_elf_discard_info (bfd *ibfd, + struct elf_reloc_cookie *cookie ATTRIBUTE_UNUSED, + struct bfd_link_info *info) +{ + bfd_boolean changed = FALSE; + asection *s; + bfd *obfd = NULL; + + /* Account for relaxation of .eh_frame section. */ + for (s = ibfd->sections; s; s = s->next) + if (s->sec_info_type == ELF_INFO_TYPE_EH_FRAME) + { + if (!_bfinfdpic_check_discarded_relocs (ibfd, s, info, &changed)) + return FALSE; + obfd = s->output_section->owner; + } + + if (changed) + { + struct _bfinfdpic_dynamic_got_plt_info gpinfo; + + memset (&gpinfo, 0, sizeof (gpinfo)); + memcpy (&gpinfo.g, bfinfdpic_dynamic_got_plt_info (info), + sizeof (gpinfo.g)); + + /* Clear GOT and PLT assignments. */ + htab_traverse (bfinfdpic_relocs_info (info), + _bfinfdpic_reset_got_plt_entries, + NULL); + + if (!_bfinfdpic_size_got_plt (obfd, &gpinfo)) + return FALSE; + } + + return TRUE; +} + static bfd_boolean elf32_bfinfdpic_modify_program_headers (bfd *output_bfd, struct bfd_link_info *info) @@ -4415,8 +4600,8 @@ elf32_bfinfdpic_finish_dynamic_sections (bfd *output_bfd, static bfd_boolean elf32_bfinfdpic_adjust_dynamic_symbol -(struct bfd_link_info *info ATTRIBUTE_UNUSED, - struct elf_link_hash_entry *h ATTRIBUTE_UNUSED) +(struct bfd_link_info *info, + struct elf_link_hash_entry *h) { bfd * dynobj; @@ -4654,9 +4839,9 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, if (! IS_FDPIC (abfd)) goto bad_reloc; /* Fall through. */ - case R_pcrel24: - case R_pcrel24_jump_l: - case R_byte4_data: + case R_BFIN_PCREL24: + case R_BFIN_PCREL24_JUMP_L: + case R_BFIN_BYTE4_DATA: if (IS_FDPIC (abfd) && ! dynobj) { elf_hash_table (info)->dynobj = dynobj = abfd; @@ -4700,8 +4885,8 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, switch (ELF32_R_TYPE (rel->r_info)) { - case R_pcrel24: - case R_pcrel24_jump_l: + case R_BFIN_PCREL24: + case R_BFIN_PCREL24_JUMP_L: if (IS_FDPIC (abfd)) picrel->call++; break; @@ -4712,7 +4897,7 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, picrel->relocs32--; /* Fall through. */ - case R_byte4_data: + case R_BFIN_BYTE4_DATA: if (! IS_FDPIC (abfd)) break; @@ -4775,10 +4960,10 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, return FALSE; break; - case R_huimm16: - case R_luimm16: - case R_pcrel12_jump_s: - case R_pcrel10: + case R_BFIN_HUIMM16: + case R_BFIN_LUIMM16: + case R_BFIN_PCREL12_JUMP_S: + case R_BFIN_PCREL10: break; default: @@ -4967,8 +5152,8 @@ struct bfin_link_hash_table { struct elf_link_hash_table root; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; }; #define bfin_hash_entry(ent) ((struct bfin_link_hash_entry *) (ent)) @@ -5014,7 +5199,7 @@ bfin_link_hash_table_create (bfd * abfd) return NULL; } - ret->sym_sec.abfd = NULL; + ret->sym_cache.abfd = NULL; return &ret->root.root; } @@ -5095,7 +5280,7 @@ bfin_finish_dynamic_symbol (bfd * output_bfd, || h->dynindx == -1 || h->forced_local) && h->def_regular) { fprintf(stderr, "*** check this relocation %s\n", __FUNCTION__); - rela.r_info = ELF32_R_INFO (0, R_pcrel24); + rela.r_info = ELF32_R_INFO (0, R_BFIN_PCREL24); rela.r_addend = bfd_get_signed_32 (output_bfd, (sgot->contents + @@ -5106,7 +5291,7 @@ bfin_finish_dynamic_symbol (bfd * output_bfd, { bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + (h->got.offset & ~(bfd_vma) 1)); - rela.r_info = ELF32_R_INFO (h->dynindx, R_got); + rela.r_info = ELF32_R_INFO (h->dynindx, R_BFIN_GOT); rela.r_addend = 0; } @@ -5501,7 +5686,7 @@ bfd_bfin_elf32_create_embedded_relocs ( characters. */ /* We can only relocate absolute longword relocs at run time. */ - if (ELF32_R_TYPE (irel->r_info) != (int) R_byte4_data) + if (ELF32_R_TYPE (irel->r_info) != (int) R_BFIN_BYTE4_DATA) { *errmsg = _("unsupported reloc type"); bfd_set_error (bfd_error_bad_value); @@ -5679,6 +5864,9 @@ struct bfd_elf_special_section const elf32_bfin_special_sections[] = #define elf_backend_finish_dynamic_sections \ elf32_bfinfdpic_finish_dynamic_sections +#undef elf_backend_discard_info +#define elf_backend_discard_info \ + bfinfdpic_elf_discard_info #undef elf_backend_can_make_relative_eh_frame #define elf_backend_can_make_relative_eh_frame \ bfinfdpic_elf_use_relative_eh_frame diff --git a/cegcc/src/binutils/bfd/elf32-cr16.c b/cegcc/src/binutils/bfd/elf32-cr16.c index 795590c62..f82d1e902 100644 --- a/cegcc/src/binutils/bfd/elf32-cr16.c +++ b/cegcc/src/binutils/bfd/elf32-cr16.c @@ -1,5 +1,5 @@ /* BFD back-end for National Semiconductor's CR16 ELF - Copyright 2007 Free Software Foundation, Inc. + Copyright 2007, 2008, 2009 Free Software Foundation, Inc. Written by M R Swami Reddy. This file is part of BFD, the Binary File Descriptor library. @@ -1259,6 +1259,21 @@ cr16_elf_final_link_relocate (reloc_howto_type *howto, | (bfd_get_32 (input_bfd, hit_data) & 0xf0ff)); } + else if (r_type == R_CR16_NUM32) + { + Rvalue1 = (bfd_get_32 (input_bfd, hit_data)); + + /* Add or subtract the offset value */ + if (Rvalue1 & 0x80000000) + Rvalue -= (~Rvalue1 + 1) & 0xffffffff; + else + Rvalue += Rvalue1; + + /* Check for Ranga */ + if (Rvalue > 0xffffffff) + return bfd_reloc_overflow; + } + bfd_put_32 (input_bfd, Rvalue, hit_data); } break; @@ -1416,9 +1431,6 @@ elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry **sym_hashes; Elf_Internal_Rela *rel, *relend; - if (info->relocatable) - return TRUE; - symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); @@ -1458,6 +1470,20 @@ elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info, unresolved_reloc, warned); } + if (sec != NULL && elf_discarded_section (sec)) + { + /* For relocs against symbols from removed linkonce sections, + or sections discarded by a linker script, we just want the + section contents zeroed. Avoid any special processing. */ + _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset); + rel->r_info = 0; + rel->r_addend = 0; + continue; + } + + if (info->relocatable) + continue; + r = cr16_elf_final_link_relocate (howto, input_bfd, output_bfd, input_section, contents, rel->r_offset, diff --git a/cegcc/src/binutils/bfd/elf32-cr16c.c b/cegcc/src/binutils/bfd/elf32-cr16c.c index 08730e2e6..18d4ade82 100644 --- a/cegcc/src/binutils/bfd/elf32-cr16c.c +++ b/cegcc/src/binutils/bfd/elf32-cr16c.c @@ -1,5 +1,5 @@ /* BFD back-end for National Semiconductor's CR16C ELF - Copyright 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -927,7 +927,7 @@ elf32_cr16c_add_symbol_hook (bfd *abfd, return TRUE; } -static bfd_boolean +static int elf32_cr16c_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -946,7 +946,7 @@ elf32_cr16c_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED sym->st_shndx = SHN_CR16C_NCOMMON; } - return TRUE; + return 1; } /* Definitions for setting CR16C target vector. */ diff --git a/cegcc/src/binutils/bfd/elf32-cris.c b/cegcc/src/binutils/bfd/elf32-cris.c index bd6de292a..2037b10f5 100644 --- a/cegcc/src/binutils/bfd/elf32-cris.c +++ b/cegcc/src/binutils/bfd/elf32-cris.c @@ -1615,10 +1615,12 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, case R_CRIS_16_DTPREL: case R_CRIS_32_DTPREL: /* This relocation must only be performed against local - symbols. It's also ok when we link a program and the - symbol is defined in an ordinary (non-DSO) object (if - it's undefined there, we've already seen an error). */ + symbols, or to sections that are not loadable. It's also + ok when we link a program and the symbol is defined in an + ordinary (non-DSO) object (if it's undefined there, we've + already seen an error). */ if (h != NULL + && (input_section->flags & SEC_ALLOC) != 0 && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && (info->shared || (!h->def_regular @@ -1641,14 +1643,16 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, return FALSE; } - BFD_ASSERT (elf_cris_hash_table (info)->dtpmod_refcount != 0); + BFD_ASSERT ((input_section->flags & SEC_ALLOC) == 0 + || elf_cris_hash_table (info)->dtpmod_refcount != 0); /* Fill in a R_CRIS_DTPMOD reloc at offset 3 if we haven't already done so. Note that we do this in .got.plt, not in .got, as .got.plt contains the first part, still the reloc is against .got, because the linker script directs (is required to direct) them both into .got. */ - if (elf_cris_hash_table (info)->dtpmod_refcount > 0) + if (elf_cris_hash_table (info)->dtpmod_refcount > 0 + && (input_section->flags & SEC_ALLOC) != 0) { asection *sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); BFD_ASSERT (sgotplt != NULL); @@ -1729,15 +1733,15 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, return FALSE; } - if (!info->shared && (h == NULL || h->def_regular)) + if (!info->shared + && (h == NULL || h->def_regular || ELF_COMMON_DEF_P (h))) { /* Known contents of the GOT. */ bfd_vma off; /* The symbol is defined in the program, so just write - (1, -prog_tls_size+known_tpoffset) into the GOT. */ + (1, known_tpoffset) into the GOT. */ relocation -= elf_hash_table (info)->tls_sec->vma; - relocation -= elf_hash_table (info)->tls_size; if (h != NULL) { @@ -1997,7 +2001,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, if (h != NULL && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT - && !h->def_regular + && !(h->def_regular || ELF_COMMON_DEF_P (h)) /* If it's undefined, then an error message has already been emitted. */ && h->root.type != bfd_link_hash_undefined) @@ -2685,6 +2689,10 @@ cris_elf_gc_sweep_hook (bfd *abfd, break; case R_CRIS_32_DTPREL: + /* This'd be a .dtpreld entry in e.g. debug info. */ + if ((sec->flags & SEC_ALLOC) == 0) + break; + /* Fall through. */ case R_CRIS_16_DTPREL: elf_cris_hash_table (info)->dtpmod_refcount--; if (elf_cris_hash_table (info)->dtpmod_refcount == 0) @@ -3152,8 +3160,17 @@ cris_elf_check_relocs (abfd, info, sec, relocs) on the first input bfd we found that contained dynamic relocs. */ switch (r_type) { - case R_CRIS_16_DTPREL: case R_CRIS_32_DTPREL: + if ((sec->flags & SEC_ALLOC) == 0) + /* This'd be a .dtpreld entry in e.g. debug info. We have + several different switch statements below, but none of + that is needed; we need no preparations for resolving + R_CRIS_32_DTPREL into a non-allocated section (debug + info), so let's just move on to the next + relocation. */ + continue; + /* Fall through. */ + case R_CRIS_16_DTPREL: /* The first .got.plt entry is right after the R_CRIS_DTPMOD entry at index 3. */ if (elf_cris_hash_table (info)->dtpmod_refcount == 0) diff --git a/cegcc/src/binutils/bfd/elf32-crx.c b/cegcc/src/binutils/bfd/elf32-crx.c index b0db783b1..71a3f6bdb 100644 --- a/cegcc/src/binutils/bfd/elf32-crx.c +++ b/cegcc/src/binutils/bfd/elf32-crx.c @@ -1,5 +1,5 @@ /* BFD back-end for National Semiconductor's CRX ELF - Copyright 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Written by Tomer Levi, NSC, Israel. This file is part of BFD, the Binary File Descriptor library. @@ -104,7 +104,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL4", /* name */ FALSE, /* partial_inplace */ - 0xf, /* src_mask */ + 0x0, /* src_mask */ 0xf, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -118,7 +118,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL8", /* name */ FALSE, /* partial_inplace */ - 0xff, /* src_mask */ + 0x0, /* src_mask */ 0xff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -132,7 +132,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL8_CMP", /* name */ FALSE, /* partial_inplace */ - 0xff, /* src_mask */ + 0x0, /* src_mask */ 0xff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -146,7 +146,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL16", /* name */ FALSE, /* partial_inplace */ - 0xffff, /* src_mask */ + 0x0, /* src_mask */ 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -160,7 +160,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL24", /* name */ FALSE, /* partial_inplace */ - 0xffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -174,7 +174,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -188,7 +188,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL12", /* name */ FALSE, /* partial_inplace */ - 0xfff, /* src_mask */ + 0x0, /* src_mask */ 0xfff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -202,7 +202,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL22", /* name */ FALSE, /* partial_inplace */ - 0x3fffff, /* src_mask */ + 0x0, /* src_mask */ 0x3fffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -216,7 +216,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL28", /* name */ FALSE, /* partial_inplace */ - 0xfffffff, /* src_mask */ + 0x0, /* src_mask */ 0xfffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -230,7 +230,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -244,7 +244,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_ABS16", /* name */ FALSE, /* partial_inplace */ - 0xffff, /* src_mask */ + 0x0, /* src_mask */ 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -258,7 +258,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_ABS32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -272,7 +272,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_NUM8", /* name */ FALSE, /* partial_inplace */ - 0xff, /* src_mask */ + 0x0, /* src_mask */ 0xff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -286,7 +286,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_NUM16", /* name */ FALSE, /* partial_inplace */ - 0xffff, /* src_mask */ + 0x0, /* src_mask */ 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -300,7 +300,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_NUM32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -314,7 +314,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_IMM16", /* name */ FALSE, /* partial_inplace */ - 0xffff, /* src_mask */ + 0x0, /* src_mask */ 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -328,7 +328,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_IMM32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -345,7 +345,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_SWITCH8", /* name */ FALSE, /* partial_inplace */ - 0xff, /* src_mask */ + 0x0, /* src_mask */ 0xff, /* dst_mask */ TRUE), /* pcrel_offset */ @@ -362,7 +362,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_SWITCH16", /* name */ FALSE, /* partial_inplace */ - 0xffff, /* src_mask */ + 0x0, /* src_mask */ 0xffff, /* dst_mask */ TRUE), /* pcrel_offset */ @@ -379,7 +379,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_SWITCH32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ TRUE) /* pcrel_offset */ }; diff --git a/cegcc/src/binutils/bfd/elf32-dlx.c b/cegcc/src/binutils/bfd/elf32-dlx.c index 69e7dc963..6b96ac976 100644 --- a/cegcc/src/binutils/bfd/elf32-dlx.c +++ b/cegcc/src/binutils/bfd/elf32-dlx.c @@ -1,5 +1,5 @@ /* DLX specific support for 32-bit ELF - Copyright 2002, 2003, 2004, 2005, 2007 + Copyright 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elf32-fr30.c b/cegcc/src/binutils/bfd/elf32-fr30.c index 9cb8d75ab..f96b1f666 100644 --- a/cegcc/src/binutils/bfd/elf32-fr30.c +++ b/cegcc/src/binutils/bfd/elf32-fr30.c @@ -1,5 +1,5 @@ /* FR30-specific support for 32-bit ELF. - Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elf32-frv.c b/cegcc/src/binutils/bfd/elf32-frv.c index 01e15f960..00b39c223 100644 --- a/cegcc/src/binutils/bfd/elf32-frv.c +++ b/cegcc/src/binutils/bfd/elf32-frv.c @@ -1,5 +1,5 @@ /* FRV-specific support for 32-bit ELF. - Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -24,7 +24,7 @@ #include "libbfd.h" #include "elf-bfd.h" #include "elf/frv.h" -#include "elf/dwarf2.h" +#include "dwarf2.h" #include "hashtab.h" /* Forward declarations. */ @@ -5738,6 +5738,10 @@ elf32_frvfdpic_relax_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, { struct _frvfdpic_dynamic_got_plt_info gpinfo; + if (info->relocatable) + (*info->callbacks->einfo) + (_("%P%F: --relax and -r may not be used together\n")); + /* If we return early, we didn't change anything. */ *again = FALSE; diff --git a/cegcc/src/binutils/bfd/elf32-h8300.c b/cegcc/src/binutils/bfd/elf32-h8300.c index 888c9adee..523a9112f 100644 --- a/cegcc/src/binutils/bfd/elf32-h8300.c +++ b/cegcc/src/binutils/bfd/elf32-h8300.c @@ -1,6 +1,6 @@ /* BFD back-end for Renesas H8/300 ELF binaries. Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, - 2007 Free Software Foundation, Inc. + 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -722,6 +722,13 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, { bfd_vma symval; + { + arelent bfd_reloc; + reloc_howto_type *h; + + elf32_h8_info_to_howto (abfd, &bfd_reloc, irel); + h = bfd_reloc.howto; + } /* Keep track of the previous reloc so that we can delete some long jumps created by the compiler. */ if (irel != internal_relocs) @@ -994,7 +1001,8 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, /* This is bsr. */ bfd_put_8 (abfd, 0x55, contents + irel->r_offset - 2); else - abort (); + /* Might be MOVSD. */ + break; /* Fix the relocation's type. */ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), @@ -1207,6 +1215,8 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, if (value <= 0x7fff || value >= 0xffff8000u) { unsigned char code; + unsigned char op0, op1, op2, op3; + unsigned char *op_ptr; /* Note that we've changed the relocs, section contents, etc. */ @@ -1214,6 +1224,87 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, elf_section_data (sec)->this_hdr.contents = contents; symtab_hdr->contents = (unsigned char *) isymbuf; + if (irel->r_offset >= 4) + { + /* Check for 4-byte MOVA relaxation. */ + int second_reloc = 0; + + op_ptr = contents + irel->r_offset - 4; + + if (last_reloc) + { + arelent bfd_reloc; + reloc_howto_type *h; + bfd_vma last_reloc_size; + + elf32_h8_info_to_howto (abfd, &bfd_reloc, last_reloc); + h = bfd_reloc.howto; + last_reloc_size = 1 << h->size; + if (last_reloc->r_offset + last_reloc_size + == irel->r_offset) + { + op_ptr -= last_reloc_size; + second_reloc = 1; + } + } + if (irel < irelend) + { + Elf_Internal_Rela *next_reloc = irel + 1; + arelent bfd_reloc; + reloc_howto_type *h; + bfd_vma next_reloc_size; + + elf32_h8_info_to_howto (abfd, &bfd_reloc, next_reloc); + h = bfd_reloc.howto; + next_reloc_size = 1 << h->size; + if (next_reloc->r_offset + next_reloc_size + == irel->r_offset) + { + op_ptr -= next_reloc_size; + second_reloc = 1; + } + } + + op0 = bfd_get_8 (abfd, op_ptr + 0); + op1 = bfd_get_8 (abfd, op_ptr + 1); + op2 = bfd_get_8 (abfd, op_ptr + 2); + op3 = bfd_get_8 (abfd, op_ptr + 3); + + if (op0 == 0x01 + && (op1 & 0xdf) == 0x5f + && (op2 & 0x40) == 0x40 + && (op3 & 0x80) == 0x80) + { + if ((op2 & 0x08) == 0) + second_reloc = 1; + + if (second_reloc) + { + op3 &= ~0x08; + bfd_put_8 (abfd, op3, op_ptr + 3); + } + else + { + op2 &= ~0x08; + bfd_put_8 (abfd, op2, op_ptr + 2); + } + goto r_h8_dir32a16_common; + } + } + + /* Now check for short version of MOVA. */ + op_ptr = contents + irel->r_offset - 2; + op0 = bfd_get_8 (abfd, op_ptr + 0); + op1 = bfd_get_8 (abfd, op_ptr + 1); + + if (op0 == 0x7a + && (op1 & 0x88) == 0x80) + { + op1 |= 0x08; + bfd_put_8 (abfd, op1, op_ptr + 1); + goto r_h8_dir32a16_common; + } + /* Get the opcode. */ code = bfd_get_8 (abfd, contents + irel->r_offset - 1); @@ -1224,6 +1315,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, bfd_put_8 (abfd, code, contents + irel->r_offset - 1); + r_h8_dir32a16_common: /* Fix the relocation's type. */ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_H8_DIR16); diff --git a/cegcc/src/binutils/bfd/elf32-hppa.c b/cegcc/src/binutils/bfd/elf32-hppa.c index 077f3efa7..cac0a215f 100644 --- a/cegcc/src/binutils/bfd/elf32-hppa.c +++ b/cegcc/src/binutils/bfd/elf32-hppa.c @@ -1,6 +1,6 @@ /* BFD back-end for HP PA-RISC ELF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Original code by @@ -301,8 +301,8 @@ struct elf32_hppa_link_hash_table /* Set if we need a .plt stub to support lazy dynamic linking. */ unsigned int need_plt_stub:1; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; /* Data for LDM relocations. */ union @@ -460,7 +460,7 @@ elf32_hppa_link_hash_table_create (bfd *abfd) htab->has_17bit_branch = 0; htab->has_22bit_branch = 0; htab->need_plt_stub = 0; - htab->sym_sec.abfd = NULL; + htab->sym_cache.abfd = NULL; htab->tls_ldm_got.refcount = 0; return &htab->etab.root; @@ -1011,16 +1011,7 @@ elf32_hppa_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->srelplt = bfd_get_section_by_name (abfd, ".rela.plt"); htab->sgot = bfd_get_section_by_name (abfd, ".got"); - htab->srelgot = bfd_make_section_with_flags (abfd, ".rela.got", - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)); - if (htab->srelgot == NULL - || ! bfd_set_section_alignment (abfd, htab->srelgot, 2)) - return FALSE; + htab->srelgot = bfd_get_section_by_name (abfd, ".rela.got"); htab->sdynbss = bfd_get_section_by_name (abfd, ".dynbss"); htab->srelbss = bfd_get_section_by_name (abfd, ".rela.bss"); @@ -1113,6 +1104,38 @@ elf32_hppa_optimized_tls_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED, return r_type; } +/* Return a pointer to the local GOT, PLT and TLS reference counts + for ABFD. Returns NULL if the storage allocation fails. */ + +static bfd_signed_vma * +hppa32_elf_local_refcounts (bfd *abfd) +{ + Elf_Internal_Shdr *symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + bfd_signed_vma *local_refcounts; + + local_refcounts = elf_local_got_refcounts (abfd); + if (local_refcounts == NULL) + { + bfd_size_type size; + + /* Allocate space for local GOT and PLT reference + counts. Done this way to save polluting elf_obj_tdata + with another target specific pointer. */ + size = symtab_hdr->sh_info; + size *= 2 * sizeof (bfd_signed_vma); + /* Add in space to store the local GOT TLS types. */ + size += symtab_hdr->sh_info; + local_refcounts = bfd_zalloc (abfd, size); + if (local_refcounts == NULL) + return NULL; + elf_local_got_refcounts (abfd) = local_refcounts; + memset (hppa_elf_local_got_tls_type (abfd), GOT_UNKNOWN, + symtab_hdr->sh_info); + } + return local_refcounts; +} + + /* Look through the relocs for a section during the first phase, and calculate needed space in the global offset table, procedure linkage table, and dynamic reloc sections. At this point we haven't @@ -1359,26 +1382,9 @@ elf32_hppa_check_relocs (bfd *abfd, bfd_signed_vma *local_got_refcounts; /* This is a global offset table entry for a local symbol. */ - local_got_refcounts = elf_local_got_refcounts (abfd); + local_got_refcounts = hppa32_elf_local_refcounts (abfd); if (local_got_refcounts == NULL) - { - bfd_size_type size; - - /* Allocate space for local got offsets and local - plt offsets. Done this way to save polluting - elf_obj_tdata with another target specific - pointer. */ - size = symtab_hdr->sh_info; - size *= 2 * sizeof (bfd_signed_vma); - /* Add in space to store the local GOT TLS types. */ - size += symtab_hdr->sh_info; - local_got_refcounts = bfd_zalloc (abfd, size); - if (local_got_refcounts == NULL) - return FALSE; - elf_local_got_refcounts (abfd) = local_got_refcounts; - memset (hppa_elf_local_got_tls_type (abfd), - GOT_UNKNOWN, symtab_hdr->sh_info); - } + return FALSE; local_got_refcounts[r_symndx] += 1; old_tls_type = hppa_elf_local_got_tls_type (abfd) [r_symndx]; @@ -1425,22 +1431,9 @@ elf32_hppa_check_relocs (bfd *abfd, bfd_signed_vma *local_got_refcounts; bfd_signed_vma *local_plt_refcounts; - local_got_refcounts = elf_local_got_refcounts (abfd); + local_got_refcounts = hppa32_elf_local_refcounts (abfd); if (local_got_refcounts == NULL) - { - bfd_size_type size; - - /* Allocate space for local got offsets and local - plt offsets. */ - size = symtab_hdr->sh_info; - size *= 2 * sizeof (bfd_signed_vma); - /* Add in space to store the local GOT TLS types. */ - size += symtab_hdr->sh_info; - local_got_refcounts = bfd_zalloc (abfd, size); - if (local_got_refcounts == NULL) - return FALSE; - elf_local_got_refcounts (abfd) = local_got_refcounts; - } + return FALSE; local_plt_refcounts = (local_got_refcounts + symtab_hdr->sh_info); local_plt_refcounts[r_symndx] += 1; @@ -1529,15 +1522,19 @@ elf32_hppa_check_relocs (bfd *abfd, /* Track dynamic relocs needed for local syms too. We really need local syms available to do this easily. Oh well. */ - asection *sr; void *vpp; + Elf_Internal_Sym *isym; - sr = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (sr == NULL) + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + sr = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (sr == NULL) + sr = sec; + vpp = &elf_section_data (sr)->local_dynrel; hdh_head = (struct elf32_hppa_dyn_reloc_entry **) vpp; } @@ -3409,7 +3406,7 @@ final_link_relocate (asection *input_section, (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"), input_bfd, input_section, - offset, + (long) offset, howto->name, insn); } @@ -3573,7 +3570,7 @@ final_link_relocate (asection *input_section, (_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"), input_bfd, input_section, - offset, + (long) offset, hsh->bh_root.string); bfd_set_error (bfd_error_bad_value); return bfd_reloc_notsupported; diff --git a/cegcc/src/binutils/bfd/elf32-hppa.h b/cegcc/src/binutils/bfd/elf32-hppa.h index 601002826..9b88229d8 100644 --- a/cegcc/src/binutils/bfd/elf32-hppa.h +++ b/cegcc/src/binutils/bfd/elf32-hppa.h @@ -5,7 +5,7 @@ February 1994. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, - 2002, 2003, 2007 Free Software Foundation, Inc. + 2002, 2003, 2005, 2007 Free Software Foundation, Inc. Written by: diff --git a/cegcc/src/binutils/bfd/elf32-i386.c b/cegcc/src/binutils/bfd/elf32-i386.c index dda6e1fa2..016e04611 100644 --- a/cegcc/src/binutils/bfd/elf32-i386.c +++ b/cegcc/src/binutils/bfd/elf32-i386.c @@ -1,6 +1,6 @@ /* Intel 80386/80486-specific support for 32-bit ELF Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -26,6 +26,8 @@ #include "elf-bfd.h" #include "elf-vxworks.h" #include "bfd_stdint.h" +#include "objalloc.h" +#include "hashtab.h" /* 386 uses REL relocations instead of RELA. */ #define USE_REL 1 @@ -138,10 +140,13 @@ static reloc_howto_type elf_howto_table[]= HOWTO(R_386_TLS_DESC, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_DESC", TRUE, 0xffffffff, 0xffffffff, FALSE), + HOWTO(R_386_IRELATIVE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_IRELATIVE", + TRUE, 0xffffffff, 0xffffffff, FALSE), /* Another gap. */ -#define R_386_tls (R_386_TLS_DESC + 1 - R_386_tls_offset) -#define R_386_vt_offset (R_386_GNU_VTINHERIT - R_386_tls) +#define R_386_irelative (R_386_IRELATIVE + 1 - R_386_tls_offset) +#define R_386_vt_offset (R_386_GNU_VTINHERIT - R_386_irelative) /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_386_GNU_VTINHERIT, /* type */ @@ -316,6 +321,10 @@ elf_i386_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, TRACE ("BFD_RELOC_386_TLS_DESC"); return &elf_howto_table[R_386_TLS_DESC - R_386_tls_offset]; + case BFD_RELOC_386_IRELATIVE: + TRACE ("BFD_RELOC_386_IRELATIVE"); + return &elf_howto_table[R_386_IRELATIVE]; + case BFD_RELOC_VTABLE_INHERIT: TRACE ("BFD_RELOC_VTABLE_INHERIT"); return &elf_howto_table[R_386_GNU_VTINHERIT - R_386_vt_offset]; @@ -355,9 +364,9 @@ elf_i386_rtype_to_howto (bfd *abfd, unsigned r_type) && ((indx = r_type - R_386_ext_offset) - R_386_standard >= R_386_ext - R_386_standard) && ((indx = r_type - R_386_tls_offset) - R_386_ext - >= R_386_tls - R_386_ext) - && ((indx = r_type - R_386_vt_offset) - R_386_tls - >= R_386_vt - R_386_tls)) + >= R_386_irelative - R_386_ext) + && ((indx = r_type - R_386_vt_offset) - R_386_irelative + >= R_386_vt - R_386_irelative)) { (*_bfd_error_handler) (_("%B: invalid relocation type %d"), abfd, (int) r_type); @@ -568,26 +577,6 @@ static const bfd_byte elf_i386_pic_plt_entry[PLT_ENTRY_SIZE] = #define PLTRESOLVE_RELOCS 2 #define PLT_NON_JUMP_SLOT_RELOCS 2 -/* The i386 linker needs to keep track of the number of relocs that it - decides to copy as dynamic relocs in check_relocs for each symbol. - This is so that it can later discard them if they are found to be - unnecessary. We store the information in a field extending the - regular ELF linker hash table. */ - -struct elf_i386_dyn_relocs -{ - struct elf_i386_dyn_relocs *next; - - /* The input section of the reloc. */ - asection *sec; - - /* Total number of relocs copied for the input section. */ - bfd_size_type count; - - /* Number of pc-relative relocs copied for the input section. */ - bfd_size_type pc_count; -}; - /* i386 ELF linker hash entry. */ struct elf_i386_link_hash_entry @@ -595,7 +584,7 @@ struct elf_i386_link_hash_entry struct elf_link_hash_entry elf; /* Track dynamic relocs copied for this symbol. */ - struct elf_i386_dyn_relocs *dyn_relocs; + struct elf_dyn_relocs *dyn_relocs; #define GOT_UNKNOWN 0 #define GOT_NORMAL 1 @@ -661,11 +650,6 @@ struct elf_i386_link_hash_table struct elf_link_hash_table elf; /* Short-cuts to get to dynamic linker sections. */ - asection *sgot; - asection *sgotplt; - asection *srelgot; - asection *splt; - asection *srelplt; asection *sdynbss; asection *srelbss; @@ -690,11 +674,15 @@ struct elf_i386_link_hash_table section, plus whatever space is used by the jump slots. */ bfd_vma sgotplt_jump_table_size; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; /* _TLS_MODULE_BASE_ symbol. */ struct bfd_link_hash_entry *tls_module_base; + + /* Used by local STT_GNU_IFUNC symbols. */ + htab_t loc_hash_table; + void *loc_hash_memory; }; /* Get the i386 ELF linker hash table from a link_info structure. */ @@ -708,16 +696,16 @@ struct elf_i386_link_hash_table /* Create an entry in an i386 ELF linker hash table. */ static struct bfd_hash_entry * -link_hash_newfunc (struct bfd_hash_entry *entry, - struct bfd_hash_table *table, - const char *string) +elf_i386_link_hash_newfunc (struct bfd_hash_entry *entry, + struct bfd_hash_table *table, + const char *string) { /* Allocate the structure if it has not already been allocated by a subclass. */ if (entry == NULL) { - entry = bfd_hash_allocate (table, - sizeof (struct elf_i386_link_hash_entry)); + entry = (struct bfd_hash_entry *) + bfd_hash_allocate (table, sizeof (struct elf_i386_link_hash_entry)); if (entry == NULL) return entry; } @@ -737,6 +725,75 @@ link_hash_newfunc (struct bfd_hash_entry *entry, return entry; } +/* Compute a hash of a local hash entry. We use elf_link_hash_entry + for local symbol so that we can handle local STT_GNU_IFUNC symbols + as global symbol. We reuse indx and dynstr_index for local symbol + hash since they aren't used by global symbols in this backend. */ + +static hashval_t +elf_i386_local_htab_hash (const void *ptr) +{ + struct elf_link_hash_entry *h + = (struct elf_link_hash_entry *) ptr; + return ELF_LOCAL_SYMBOL_HASH (h->indx, h->dynstr_index); +} + +/* Compare local hash entries. */ + +static int +elf_i386_local_htab_eq (const void *ptr1, const void *ptr2) +{ + struct elf_link_hash_entry *h1 + = (struct elf_link_hash_entry *) ptr1; + struct elf_link_hash_entry *h2 + = (struct elf_link_hash_entry *) ptr2; + + return h1->indx == h2->indx && h1->dynstr_index == h2->dynstr_index; +} + +/* Find and/or create a hash entry for local symbol. */ + +static struct elf_link_hash_entry * +elf_i386_get_local_sym_hash (struct elf_i386_link_hash_table *htab, + bfd *abfd, const Elf_Internal_Rela *rel, + bfd_boolean create) +{ + struct elf_i386_link_hash_entry e, *ret; + asection *sec = abfd->sections; + hashval_t h = ELF_LOCAL_SYMBOL_HASH (sec->id, + ELF32_R_SYM (rel->r_info)); + void **slot; + + e.elf.indx = sec->id; + e.elf.dynstr_index = ELF32_R_SYM (rel->r_info); + slot = htab_find_slot_with_hash (htab->loc_hash_table, &e, h, + create ? INSERT : NO_INSERT); + + if (!slot) + return NULL; + + if (*slot) + { + ret = (struct elf_i386_link_hash_entry *) *slot; + return &ret->elf; + } + + ret = (struct elf_i386_link_hash_entry *) + objalloc_alloc ((struct objalloc *) htab->loc_hash_memory, + sizeof (struct elf_i386_link_hash_entry)); + if (ret) + { + memset (ret, 0, sizeof (*ret)); + ret->elf.indx = sec->id; + ret->elf.dynstr_index = ELF32_R_SYM (rel->r_info); + ret->elf.dynindx = -1; + ret->elf.plt.offset = (bfd_vma) -1; + ret->elf.got.offset = (bfd_vma) -1; + *slot = ret; + } + return &ret->elf; +} + /* Create an i386 ELF linker hash table. */ static struct bfd_link_hash_table * @@ -745,63 +802,56 @@ elf_i386_link_hash_table_create (bfd *abfd) struct elf_i386_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf_i386_link_hash_table); - ret = bfd_malloc (amt); + ret = (struct elf_i386_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; - if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc, + if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, + elf_i386_link_hash_newfunc, sizeof (struct elf_i386_link_hash_entry))) { free (ret); return NULL; } - ret->sgot = NULL; - ret->sgotplt = NULL; - ret->srelgot = NULL; - ret->splt = NULL; - ret->srelplt = NULL; ret->sdynbss = NULL; ret->srelbss = NULL; ret->tls_ldm_got.refcount = 0; ret->next_tls_desc_index = 0; ret->sgotplt_jump_table_size = 0; - ret->sym_sec.abfd = NULL; + ret->sym_cache.abfd = NULL; ret->is_vxworks = 0; ret->srelplt2 = NULL; ret->plt0_pad_byte = 0; ret->tls_module_base = NULL; + ret->loc_hash_table = htab_try_create (1024, + elf_i386_local_htab_hash, + elf_i386_local_htab_eq, + NULL); + ret->loc_hash_memory = objalloc_create (); + if (!ret->loc_hash_table || !ret->loc_hash_memory) + { + free (ret); + return NULL; + } + return &ret->elf.root; } -/* Create .got, .gotplt, and .rel.got sections in DYNOBJ, and set up - shortcuts to them in our hash table. */ +/* Destroy an i386 ELF linker hash table. */ -static bfd_boolean -create_got_section (bfd *dynobj, struct bfd_link_info *info) +static void +elf_i386_link_hash_table_free (struct bfd_link_hash_table *hash) { - struct elf_i386_link_hash_table *htab; - - if (! _bfd_elf_create_got_section (dynobj, info)) - return FALSE; - - htab = elf_i386_hash_table (info); - htab->sgot = bfd_get_section_by_name (dynobj, ".got"); - htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); - if (!htab->sgot || !htab->sgotplt) - abort (); - - htab->srelgot = bfd_make_section_with_flags (dynobj, ".rel.got", - (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)); - if (htab->srelgot == NULL - || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2)) - return FALSE; - return TRUE; + struct elf_i386_link_hash_table *htab + = (struct elf_i386_link_hash_table *) hash; + + if (htab->loc_hash_table) + htab_delete (htab->loc_hash_table); + if (htab->loc_hash_memory) + objalloc_free ((struct objalloc *) htab->loc_hash_memory); + _bfd_generic_link_hash_table_free (hash); } /* Create .plt, .rel.plt, .got, .got.plt, .rel.got, .dynbss, and @@ -813,25 +863,21 @@ elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { struct elf_i386_link_hash_table *htab; - htab = elf_i386_hash_table (info); - if (!htab->sgot && !create_got_section (dynobj, info)) - return FALSE; - if (!_bfd_elf_create_dynamic_sections (dynobj, info)) return FALSE; - htab->splt = bfd_get_section_by_name (dynobj, ".plt"); - htab->srelplt = bfd_get_section_by_name (dynobj, ".rel.plt"); + htab = elf_i386_hash_table (info); htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss"); if (!info->shared) htab->srelbss = bfd_get_section_by_name (dynobj, ".rel.bss"); - if (!htab->splt || !htab->srelplt || !htab->sdynbss + if (!htab->sdynbss || (!info->shared && !htab->srelbss)) abort (); if (htab->is_vxworks - && !elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2)) + && !elf_vxworks_create_dynamic_sections (dynobj, info, + &htab->srelplt2)) return FALSE; return TRUE; @@ -853,14 +899,14 @@ elf_i386_copy_indirect_symbol (struct bfd_link_info *info, { if (edir->dyn_relocs != NULL) { - struct elf_i386_dyn_relocs **pp; - struct elf_i386_dyn_relocs *p; + struct elf_dyn_relocs **pp; + struct elf_dyn_relocs *p; /* Add reloc counts against the indirect sym to the direct sym list. Merge any entries against the same section. */ for (pp = &eind->dyn_relocs; (p = *pp) != NULL; ) { - struct elf_i386_dyn_relocs *q; + struct elf_dyn_relocs *q; for (q = edir->dyn_relocs; q != NULL; q = q->next) if (q->sec == p->sec) @@ -955,7 +1001,7 @@ elf_i386_check_tls_transition (bfd *abfd, asection *sec, type = bfd_get_8 (abfd, contents + offset - 2); if (r_type == R_386_TLS_GD) { - /* Check transition from LD access model. Only + /* Check transition from GD access model. Only leal foo@tlsgd(,%reg,1), %eax; call ___tls_get_addr leal foo@tlsgd(%reg), %eax; call ___tls_get_addr; nop can transit to different access model. */ @@ -1007,11 +1053,14 @@ elf_i386_check_tls_transition (bfd *abfd, asection *sec, return FALSE; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + /* Use strncmp to check ___tls_get_addr since ___tls_get_addr + may be versioned. */ return (h != NULL && h->root.root.string != NULL && (ELF32_R_TYPE (rel[1].r_info) == R_386_PC32 || ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32) - && (strcmp (h->root.root.string, "___tls_get_addr") == 0)); + && (strncmp (h->root.root.string, "___tls_get_addr", + 15) == 0)); case R_386_TLS_IE: /* Check transition from IE access model: @@ -1100,7 +1149,8 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, unsigned int *r_type, int tls_type, const Elf_Internal_Rela *rel, const Elf_Internal_Rela *relend, - struct elf_link_hash_entry *h) + struct elf_link_hash_entry *h, + unsigned long r_symndx) { unsigned int from_type = *r_type; unsigned int to_type = from_type; @@ -1114,7 +1164,7 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, case R_386_TLS_IE_32: case R_386_TLS_IE: case R_386_TLS_GOTIE: - if (!info->shared) + if (info->executable) { if (h == NULL) to_type = R_386_TLS_LE_32; @@ -1130,7 +1180,7 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, { unsigned int new_to_type = to_type; - if (!info->shared + if (info->executable && h != NULL && h->dynindx == -1 && (tls_type & GOT_TLS_IE)) @@ -1156,7 +1206,7 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, break; case R_386_TLS_LDM: - if (!info->shared) + if (info->executable) to_type = R_386_TLS_LE_32; break; @@ -1175,15 +1225,27 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, from_type, rel, relend)) { reloc_howto_type *from, *to; + const char *name; from = elf_i386_rtype_to_howto (abfd, from_type); to = elf_i386_rtype_to_howto (abfd, to_type); + if (h) + name = h->root.root.string; + else + { + Elf_Internal_Sym *isym; + struct elf_i386_link_hash_table *htab; + htab = elf_i386_hash_table (info); + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL); + } + (*_bfd_error_handler) (_("%B: TLS transition from %s to %s against `%s' at 0x%lx " "in section `%A' failed"), - abfd, sec, from->name, to->name, - h ? h->root.root.string : "a local symbol", + abfd, sec, from->name, to->name, name, (unsigned long) rel->r_offset); bfd_set_error (bfd_error_bad_value); return FALSE; @@ -1227,6 +1289,8 @@ elf_i386_check_relocs (bfd *abfd, unsigned int r_type; unsigned long r_symndx; struct elf_link_hash_entry *h; + Elf_Internal_Sym *isym; + const char *name; r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); @@ -1240,19 +1304,134 @@ elf_i386_check_relocs (bfd *abfd, } if (r_symndx < symtab_hdr->sh_info) - h = NULL; + { + /* A local symbol. */ + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; + + /* Check relocation against local STT_GNU_IFUNC symbol. */ + if (ELF32_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) + { + h = elf_i386_get_local_sym_hash (htab, abfd, rel, + TRUE); + if (h == NULL) + return FALSE; + + /* Fake a STT_GNU_IFUNC symbol. */ + h->type = STT_GNU_IFUNC; + h->def_regular = 1; + h->ref_regular = 1; + h->forced_local = 1; + h->root.type = bfd_link_hash_defined; + } + else + h = NULL; + } else { + isym = NULL; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; } + if (h != NULL) + { + /* Create the ifunc sections for static executables. If we + never see an indirect function symbol nor we are building + a static executable, those sections will be empty and + won't appear in output. */ + switch (r_type) + { + default: + break; + + case R_386_32: + case R_386_PC32: + case R_386_PLT32: + case R_386_GOT32: + case R_386_GOTOFF: + if (!_bfd_elf_create_ifunc_sections (abfd, info)) + return FALSE; + break; + } + + /* Since STT_GNU_IFUNC symbol must go through PLT, we handle + it here if it is defined in a non-shared object. */ + if (h->type == STT_GNU_IFUNC + && h->def_regular) + { + /* It is referenced by a non-shared object. */ + h->ref_regular = 1; + h->needs_plt = 1; + + /* STT_GNU_IFUNC symbol must go through PLT. */ + h->plt.refcount += 1; + + /* STT_GNU_IFUNC needs dynamic sections. */ + if (htab->elf.dynobj == NULL) + htab->elf.dynobj = abfd; + + switch (r_type) + { + default: + if (h->root.root.string) + name = h->root.root.string; + else + name = bfd_elf_sym_name (abfd, symtab_hdr, isym, + NULL); + (*_bfd_error_handler) + (_("%B: relocation %s against STT_GNU_IFUNC " + "symbol `%s' isn't handled by %s"), abfd, + elf_howto_table[r_type].name, + name, __FUNCTION__); + bfd_set_error (bfd_error_bad_value); + return FALSE; + + case R_386_32: + h->non_got_ref = 1; + h->pointer_equality_needed = 1; + if (info->shared) + { + /* We must copy these reloc types into the + output file. Create a reloc section in + dynobj and make room for this reloc. */ + sreloc = _bfd_elf_create_ifunc_dyn_reloc + (abfd, info, sec, sreloc, + &((struct elf_i386_link_hash_entry *) h)->dyn_relocs); + if (sreloc == NULL) + return FALSE; + } + break; + + case R_386_PC32: + h->non_got_ref = 1; + break; + + case R_386_PLT32: + break; + + case R_386_GOT32: + case R_386_GOTOFF: + h->got.refcount += 1; + if (htab->elf.sgot == NULL + && !_bfd_elf_create_got_section (htab->elf.dynobj, + info)) + return FALSE; + break; + } + + continue; + } + } + if (! elf_i386_tls_transition (info, abfd, sec, NULL, symtab_hdr, sym_hashes, &r_type, GOT_UNKNOWN, - rel, rel_end, h)) + rel, rel_end, h, r_symndx)) return FALSE; switch (r_type) @@ -1281,7 +1460,7 @@ elf_i386_check_relocs (bfd *abfd, case R_386_TLS_IE_32: case R_386_TLS_IE: case R_386_TLS_GOTIE: - if (info->shared) + if (!info->executable) info->flags |= DF_STATIC_TLS; /* Fall through */ @@ -1332,7 +1511,8 @@ elf_i386_check_relocs (bfd *abfd, size = symtab_hdr->sh_info; size *= (sizeof (bfd_signed_vma) + sizeof (bfd_vma) + sizeof(char)); - local_got_refcounts = bfd_zalloc (abfd, size); + local_got_refcounts = (bfd_signed_vma *) + bfd_zalloc (abfd, size); if (local_got_refcounts == NULL) return FALSE; elf_local_got_refcounts (abfd) = local_got_refcounts; @@ -1360,11 +1540,15 @@ elf_i386_check_relocs (bfd *abfd, tls_type |= old_tls_type; else { + if (h) + name = h->root.root.string; + else + name = bfd_elf_sym_name (abfd, symtab_hdr, isym, + NULL); (*_bfd_error_handler) (_("%B: `%s' accessed both as normal and " "thread local symbol"), - abfd, - h ? h->root.root.string : ""); + abfd, name); return FALSE; } } @@ -1382,11 +1566,11 @@ elf_i386_check_relocs (bfd *abfd, case R_386_GOTOFF: case R_386_GOTPC: create_got: - if (htab->sgot == NULL) + if (htab->elf.sgot == NULL) { if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; - if (!create_got_section (htab->elf.dynobj, info)) + if (!_bfd_elf_create_got_section (htab->elf.dynobj, info)) return FALSE; } if (r_type != R_386_TLS_IE) @@ -1395,14 +1579,14 @@ elf_i386_check_relocs (bfd *abfd, case R_386_TLS_LE_32: case R_386_TLS_LE: - if (!info->shared) + if (info->executable) break; info->flags |= DF_STATIC_TLS; /* Fall through */ case R_386_32: case R_386_PC32: - if (h != NULL && !info->shared) + if (h != NULL && info->executable) { /* If this reloc is in a read-only section, we might need a copy reloc. We can't check reliably at this @@ -1454,8 +1638,8 @@ elf_i386_check_relocs (bfd *abfd, && (h->root.type == bfd_link_hash_defweak || !h->def_regular))) { - struct elf_i386_dyn_relocs *p; - struct elf_i386_dyn_relocs **head; + struct elf_dyn_relocs *p; + struct elf_dyn_relocs **head; /* We must copy these reloc types into the output file. Create a reloc section in dynobj and make room for @@ -1480,26 +1664,32 @@ elf_i386_check_relocs (bfd *abfd, } else { - void **vpp; /* Track dynamic relocs needed for local syms too. We really need local syms available to do this easily. Oh well. */ - + void **vpp; asection *s; - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (s == NULL) + Elf_Internal_Sym *isym; + + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; + vpp = &elf_section_data (s)->local_dynrel; - head = (struct elf_i386_dyn_relocs **)vpp; + head = (struct elf_dyn_relocs **)vpp; } p = *head; if (p == NULL || p->sec != sec) { bfd_size_type amt = sizeof *p; - p = bfd_alloc (htab->elf.dynobj, amt); + p = (struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj, + amt); if (p == NULL) return FALSE; p->next = *head; @@ -1593,8 +1783,8 @@ elf_i386_gc_sweep_hook (bfd *abfd, if (r_symndx >= symtab_hdr->sh_info) { struct elf_i386_link_hash_entry *eh; - struct elf_i386_dyn_relocs **pp; - struct elf_i386_dyn_relocs *p; + struct elf_dyn_relocs **pp; + struct elf_dyn_relocs *p; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; while (h->root.type == bfd_link_hash_indirect @@ -1615,7 +1805,7 @@ elf_i386_gc_sweep_hook (bfd *abfd, if (! elf_i386_tls_transition (info, abfd, sec, NULL, symtab_hdr, sym_hashes, &r_type, GOT_UNKNOWN, - rel, relend, h)) + rel, relend, h, r_symndx)) return FALSE; switch (r_type) @@ -1679,6 +1869,17 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_i386_link_hash_table *htab; asection *s; + /* STT_GNU_IFUNC symbol must go through PLT. */ + if (h->type == STT_GNU_IFUNC) + { + if (h->plt.refcount <= 0) + { + h->plt.offset = (bfd_vma) -1; + h->needs_plt = 0; + } + return TRUE; + } + /* If this is a function, put it in the procedure linkage table. We will fill in the contents of the procedure linkage table later, when we know the address of the .got section. */ @@ -1754,7 +1955,7 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info, if (ELIMINATE_COPY_RELOCS && !htab->is_vxworks) { struct elf_i386_link_hash_entry * eh; - struct elf_i386_dyn_relocs *p; + struct elf_dyn_relocs *p; eh = (struct elf_i386_link_hash_entry *) h; for (p = eh->dyn_relocs; p != NULL; p = p->next) @@ -1806,12 +2007,12 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info, dynamic relocs. */ static bfd_boolean -allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) +elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; struct elf_i386_link_hash_table *htab; struct elf_i386_link_hash_entry *eh; - struct elf_i386_dyn_relocs *p; + struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) return TRUE; @@ -1821,12 +2022,20 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) entry in the hash table, thus we never get to see the real symbol in a hash traversal. So look at it now. */ h = (struct elf_link_hash_entry *) h->root.u.i.link; + eh = (struct elf_i386_link_hash_entry *) h; info = (struct bfd_link_info *) inf; htab = elf_i386_hash_table (info); - if (htab->elf.dynamic_sections_created - && h->plt.refcount > 0) + /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it + here if it is defined and referenced in a non-shared object. */ + if (h->type == STT_GNU_IFUNC + && h->def_regular) + return _bfd_elf_allocate_ifunc_dyn_relocs (info, h, + &eh->dyn_relocs, + PLT_ENTRY_SIZE, 4); + else if (htab->elf.dynamic_sections_created + && h->plt.refcount > 0) { /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ @@ -1840,7 +2049,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (info->shared || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h)) { - asection *s = htab->splt; + asection *s = htab->elf.splt; /* If this is the first .plt entry, make room for the special first entry. */ @@ -1866,10 +2075,10 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) /* We also need to make an entry in the .got.plt section, which will be placed in the .got section by the linker script. */ - htab->sgotplt->size += 4; + htab->elf.sgotplt->size += 4; /* We also need to make an entry in the .rel.plt section. */ - htab->srelplt->size += sizeof (Elf32_External_Rel); + htab->elf.srelplt->size += sizeof (Elf32_External_Rel); htab->next_tls_desc_index++; if (htab->is_vxworks && !info->shared) @@ -1904,13 +2113,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h->needs_plt = 0; } - eh = (struct elf_i386_link_hash_entry *) h; eh->tlsdesc_got = (bfd_vma) -1; /* If R_386_TLS_{IE_32,IE,GOTIE} symbol is now local to the binary, make it a R_386_TLS_LE_32 requiring no TLS entry. */ if (h->got.refcount > 0 - && !info->shared + && info->executable && h->dynindx == -1 && (elf_i386_hash_entry(h)->tls_type & GOT_TLS_IE)) h->got.offset = (bfd_vma) -1; @@ -1929,12 +2137,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) return FALSE; } - s = htab->sgot; + s = htab->elf.sgot; if (GOT_TLS_GDESC_P (tls_type)) { - eh->tlsdesc_got = htab->sgotplt->size + eh->tlsdesc_got = htab->elf.sgotplt->size - elf_i386_compute_jump_table_size (htab); - htab->sgotplt->size += 8; + htab->elf.sgotplt->size += 8; h->got.offset = (bfd_vma) -2; } if (! GOT_TLS_GDESC_P (tls_type) @@ -1953,20 +2161,20 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) need two), R_386_TLS_GD needs one if local symbol and two if global. */ if (tls_type == GOT_TLS_IE_BOTH) - htab->srelgot->size += 2 * sizeof (Elf32_External_Rel); + htab->elf.srelgot->size += 2 * sizeof (Elf32_External_Rel); else if ((GOT_TLS_GD_P (tls_type) && h->dynindx == -1) || (tls_type & GOT_TLS_IE)) - htab->srelgot->size += sizeof (Elf32_External_Rel); + htab->elf.srelgot->size += sizeof (Elf32_External_Rel); else if (GOT_TLS_GD_P (tls_type)) - htab->srelgot->size += 2 * sizeof (Elf32_External_Rel); + htab->elf.srelgot->size += 2 * sizeof (Elf32_External_Rel); else if (! GOT_TLS_GDESC_P (tls_type) && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak) && (info->shared || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))) - htab->srelgot->size += sizeof (Elf32_External_Rel); + htab->elf.srelgot->size += sizeof (Elf32_External_Rel); if (GOT_TLS_GDESC_P (tls_type)) - htab->srelplt->size += sizeof (Elf32_External_Rel); + htab->elf.srelplt->size += sizeof (Elf32_External_Rel); } else h->got.offset = (bfd_vma) -1; @@ -1990,7 +2198,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) should avoid writing assembly like ".long foo - .". */ if (SYMBOL_CALLS_LOCAL (info, h)) { - struct elf_i386_dyn_relocs **pp; + struct elf_dyn_relocs **pp; for (pp = &eh->dyn_relocs; (p = *pp) != NULL; ) { @@ -2005,7 +2213,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (htab->is_vxworks) { - struct elf_i386_dyn_relocs **pp; + struct elf_dyn_relocs **pp; for (pp = &eh->dyn_relocs; (p = *pp) != NULL; ) { if (strcmp (p->sec->output_section->name, ".tls_vars") == 0) @@ -2080,13 +2288,32 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) return TRUE; } +/* Allocate space in .plt, .got and associated reloc sections for + local dynamic relocs. */ + +static bfd_boolean +elf_i386_allocate_local_dynrelocs (void **slot, void *inf) +{ + struct elf_link_hash_entry *h + = (struct elf_link_hash_entry *) *slot; + + if (h->type != STT_GNU_IFUNC + || !h->def_regular + || !h->ref_regular + || !h->forced_local + || h->root.type != bfd_link_hash_defined) + abort (); + + return elf_i386_allocate_dynrelocs (h, inf); +} + /* Find any dynamic relocs that apply to read-only sections. */ static bfd_boolean -readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf) +elf_i386_readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct elf_i386_link_hash_entry *eh; - struct elf_i386_dyn_relocs *p; + struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; @@ -2156,9 +2383,9 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, for (s = ibfd->sections; s != NULL; s = s->next) { - struct elf_i386_dyn_relocs *p; + struct elf_dyn_relocs *p; - for (p = ((struct elf_i386_dyn_relocs *) + for (p = ((struct elf_dyn_relocs *) elf_section_data (s)->local_dynrel); p != NULL; p = p->next) @@ -2197,8 +2424,8 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, end_local_got = local_got + locsymcount; local_tls_type = elf_i386_local_got_tls_type (ibfd); local_tlsdesc_gotent = elf_i386_local_tlsdesc_gotent (ibfd); - s = htab->sgot; - srel = htab->srelgot; + s = htab->elf.sgot; + srel = htab->elf.srelgot; for (; local_got < end_local_got; ++local_got, ++local_tls_type, ++local_tlsdesc_gotent) { @@ -2207,9 +2434,9 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { if (GOT_TLS_GDESC_P (*local_tls_type)) { - *local_tlsdesc_gotent = htab->sgotplt->size + *local_tlsdesc_gotent = htab->elf.sgotplt->size - elf_i386_compute_jump_table_size (htab); - htab->sgotplt->size += 8; + htab->elf.sgotplt->size += 8; *local_got = (bfd_vma) -2; } if (! GOT_TLS_GDESC_P (*local_tls_type) @@ -2231,7 +2458,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, || ! GOT_TLS_GDESC_P (*local_tls_type)) srel->size += sizeof (Elf32_External_Rel); if (GOT_TLS_GDESC_P (*local_tls_type)) - htab->srelplt->size += sizeof (Elf32_External_Rel); + htab->elf.srelplt->size += sizeof (Elf32_External_Rel); } } else @@ -2243,23 +2470,28 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { /* Allocate 2 got entries and 1 dynamic reloc for R_386_TLS_LDM relocs. */ - htab->tls_ldm_got.offset = htab->sgot->size; - htab->sgot->size += 8; - htab->srelgot->size += sizeof (Elf32_External_Rel); + htab->tls_ldm_got.offset = htab->elf.sgot->size; + htab->elf.sgot->size += 8; + htab->elf.srelgot->size += sizeof (Elf32_External_Rel); } else htab->tls_ldm_got.offset = -1; /* Allocate global sym .plt and .got entries, and space for global sym dynamic relocs. */ - elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info); + elf_link_hash_traverse (&htab->elf, elf_i386_allocate_dynrelocs, info); + + /* Allocate .plt and .got entries, and space for local symbols. */ + htab_traverse (htab->loc_hash_table, + elf_i386_allocate_local_dynrelocs, + info); /* For every jump slot reserved in the sgotplt, reloc_count is incremented. However, when we reserve space for TLS descriptors, it's not incremented, so in order to compute the space reserved for them, it suffices to multiply the reloc count by the jump slot size. */ - if (htab->srelplt) + if (htab->elf.srelplt) htab->sgotplt_jump_table_size = htab->next_tls_desc_index * 4; /* We now have determined the sizes of the various dynamic sections. @@ -2272,9 +2504,11 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if ((s->flags & SEC_LINKER_CREATED) == 0) continue; - if (s == htab->splt - || s == htab->sgot - || s == htab->sgotplt + if (s == htab->elf.splt + || s == htab->elf.sgot + || s == htab->elf.sgotplt + || s == htab->elf.iplt + || s == htab->elf.igotplt || s == htab->sdynbss) { /* Strip this section if we don't need it; see the @@ -2288,7 +2522,9 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, } else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rel")) { - if (s->size != 0 && s != htab->srelplt && s != htab->srelplt2) + if (s->size != 0 + && s != htab->elf.srelplt + && s != htab->srelplt2) relocs = TRUE; /* We use the reloc_count field as a counter if we need @@ -2325,7 +2561,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, section's contents are written out. This should not happen, but this way if it does, we get a R_386_NONE reloc instead of garbage. */ - s->contents = bfd_zalloc (dynobj, s->size); + s->contents = (unsigned char *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) return FALSE; } @@ -2346,7 +2582,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, return FALSE; } - if (htab->splt->size != 0) + if (htab->elf.splt->size != 0) { if (!add_dynamic_entry (DT_PLTGOT, 0) || !add_dynamic_entry (DT_PLTRELSZ, 0) @@ -2365,7 +2601,8 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* If any dynamic relocs apply to a read-only section, then we need a DT_TEXTREL entry. */ if ((info->flags & DF_TEXTREL) == 0) - elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info); + elf_link_hash_traverse (&htab->elf, + elf_i386_readonly_dynrelocs, info); if ((info->flags & DF_TEXTREL) != 0) { @@ -2460,7 +2697,7 @@ elf_i386_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, multiple times, it is idempotent. */ static void -set_tls_module_base (struct bfd_link_info *info) +elf_i386_set_tls_module_base (struct bfd_link_info *info) { struct bfd_link_hash_entry *base; @@ -2480,7 +2717,7 @@ set_tls_module_base (struct bfd_link_info *info) This is PT_TLS segment p_vaddr. */ static bfd_vma -dtpoff_base (struct bfd_link_info *info) +elf_i386_dtpoff_base (struct bfd_link_info *info) { /* If tls_sec is NULL, we should have signalled an error already. */ if (elf_hash_table (info)->tls_sec == NULL) @@ -2492,7 +2729,7 @@ dtpoff_base (struct bfd_link_info *info) if STT_TLS virtual address is ADDRESS. */ static bfd_vma -tpoff (struct bfd_link_info *info, bfd_vma address) +elf_i386_tpoff (struct bfd_link_info *info, bfd_vma address) { struct elf_link_hash_table *htab = elf_hash_table (info); @@ -2536,7 +2773,7 @@ elf_i386_relocate_section (bfd *output_bfd, && !strcmp (input_section->output_section->name, ".tls_vars")); - set_tls_module_base (info); + elf_i386_set_tls_module_base (info); rel = relocs; relend = relocs + input_section->reloc_count; @@ -2564,7 +2801,7 @@ elf_i386_relocate_section (bfd *output_bfd, && ((indx = r_type - R_386_ext_offset) - R_386_standard >= R_386_ext - R_386_standard) && ((indx = r_type - R_386_tls_offset) - R_386_ext - >= R_386_tls - R_386_ext)) + >= R_386_irelative - R_386_ext)) { (*_bfd_error_handler) (_("%B: unrecognized relocation (0x%x) in section `%A'"), @@ -2656,6 +2893,19 @@ elf_i386_relocate_section (bfd *output_bfd, break; } } + else if (!info->relocatable + && ELF32_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + { + /* Relocate against local STT_GNU_IFUNC symbol. */ + h = elf_i386_get_local_sym_hash (htab, input_bfd, + rel, FALSE); + if (h == NULL) + abort (); + + /* Set STT_GNU_IFUNC symbol value. */ + h->root.u.def.value = sym->st_value; + h->root.u.def.section = sec; + } } else { @@ -2681,12 +2931,189 @@ elf_i386_relocate_section (bfd *output_bfd, if (info->relocatable) continue; + /* Since STT_GNU_IFUNC symbol must go through PLT, we handle + it here if it is defined in a non-shared object. */ + if (h != NULL + && h->type == STT_GNU_IFUNC + && h->def_regular) + { + asection *plt, *gotplt, *base_got; + bfd_vma plt_index; + const char *name; + + if ((input_section->flags & SEC_ALLOC) == 0 + || h->plt.offset == (bfd_vma) -1) + abort (); + + /* STT_GNU_IFUNC symbol must go through PLT. */ + if (htab->elf.splt != NULL) + { + plt = htab->elf.splt; + gotplt = htab->elf.sgotplt; + } + else + { + plt = htab->elf.iplt; + gotplt = htab->elf.igotplt; + } + + relocation = (plt->output_section->vma + + plt->output_offset + h->plt.offset); + + switch (r_type) + { + default: + if (h->root.root.string) + name = h->root.root.string; + else + name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, + NULL); + (*_bfd_error_handler) + (_("%B: relocation %s against STT_GNU_IFUNC " + "symbol `%s' isn't handled by %s"), input_bfd, + elf_howto_table[r_type].name, + name, __FUNCTION__); + bfd_set_error (bfd_error_bad_value); + return FALSE; + + case R_386_32: + /* Generate dynamic relcoation only when there is a + non-GOF reference in a shared object. */ + if (info->shared && h->non_got_ref) + { + Elf_Internal_Rela outrel; + bfd_byte *loc; + asection *sreloc; + bfd_vma offset; + + /* Need a dynamic relocation to get the real function + adddress. */ + offset = _bfd_elf_section_offset (output_bfd, + info, + input_section, + rel->r_offset); + if (offset == (bfd_vma) -1 + || offset == (bfd_vma) -2) + abort (); + + outrel.r_offset = (input_section->output_section->vma + + input_section->output_offset + + offset); + + if (h->dynindx == -1 + || h->forced_local + || info->executable) + { + /* This symbol is resolved locally. */ + outrel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE); + bfd_put_32 (output_bfd, + (h->root.u.def.value + + h->root.u.def.section->output_section->vma + + h->root.u.def.section->output_offset), + contents + offset); + } + else + outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); + + sreloc = htab->elf.irelifunc; + loc = sreloc->contents; + loc += (sreloc->reloc_count++ + * sizeof (Elf32_External_Rel)); + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc); + + /* If this reloc is against an external symbol, we + do not want to fiddle with the addend. Otherwise, + we need to include the symbol value so that it + becomes an addend for the dynamic reloc. For an + internal symbol, we have updated addend. */ + continue; + } + + case R_386_PC32: + case R_386_PLT32: + goto do_relocation; + + case R_386_GOT32: + base_got = htab->elf.sgot; + off = h->got.offset; + + if (base_got == NULL) + abort (); + + if (off == (bfd_vma) -1) + { + /* We can't use h->got.offset here to save state, or + even just remember the offset, as finish_dynamic_symbol + would use that as offset into .got. */ + + if (htab->elf.splt != NULL) + { + plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; + off = (plt_index + 3) * 4; + base_got = htab->elf.sgotplt; + } + else + { + plt_index = h->plt.offset / PLT_ENTRY_SIZE; + off = plt_index * 4; + base_got = htab->elf.igotplt; + } + + if (h->dynindx == -1 + || h->forced_local + || info->symbolic) + { + /* This references the local defitionion. We must + initialize this entry in the global offset table. + Since the offset must always be a multiple of 8, + we use the least significant bit to record + whether we have initialized it already. + + When doing a dynamic link, we create a .rela.got + relocation entry to initialize the value. This + is done in the finish_dynamic_symbol routine. */ + if ((off & 1) != 0) + off &= ~1; + else + { + bfd_put_32 (output_bfd, relocation, + base_got->contents + off); + h->got.offset |= 1; + } + } + + relocation = off; + + /* Adjust for static executables. */ + if (htab->elf.splt == NULL) + relocation += gotplt->output_offset; + } + else + { + relocation = (base_got->output_section->vma + + base_got->output_offset + off + - gotplt->output_section->vma + - gotplt->output_offset); + /* Adjust for static executables. */ + if (htab->elf.splt == NULL) + relocation += gotplt->output_offset; + } + + goto do_relocation; + + case R_386_GOTOFF: + relocation -= (gotplt->output_section->vma + + gotplt->output_offset); + goto do_relocation; + } + } + switch (r_type) { case R_386_GOT32: /* Relocation is to the entry for this symbol in the global offset table. */ - if (htab->sgot == NULL) + if (htab->elf.sgot == NULL) abort (); if (h != NULL) @@ -2718,7 +3145,7 @@ elf_i386_relocate_section (bfd *output_bfd, else { bfd_put_32 (output_bfd, relocation, - htab->sgot->contents + off); + htab->elf.sgot->contents + off); h->got.offset |= 1; } } @@ -2740,7 +3167,7 @@ elf_i386_relocate_section (bfd *output_bfd, else { bfd_put_32 (output_bfd, relocation, - htab->sgot->contents + off); + htab->elf.sgot->contents + off); if (info->shared) { @@ -2748,12 +3175,12 @@ elf_i386_relocate_section (bfd *output_bfd, Elf_Internal_Rela outrel; bfd_byte *loc; - s = htab->srelgot; + s = htab->elf.srelgot; if (s == NULL) abort (); - outrel.r_offset = (htab->sgot->output_section->vma - + htab->sgot->output_offset + outrel.r_offset = (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off); outrel.r_info = ELF32_R_INFO (0, R_386_RELATIVE); loc = s->contents; @@ -2768,10 +3195,10 @@ elf_i386_relocate_section (bfd *output_bfd, if (off >= (bfd_vma) -2) abort (); - relocation = htab->sgot->output_section->vma - + htab->sgot->output_offset + off - - htab->sgotplt->output_section->vma - - htab->sgotplt->output_offset; + relocation = htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off + - htab->elf.sgotplt->output_section->vma + - htab->elf.sgotplt->output_offset; break; case R_386_GOTOFF: @@ -2827,14 +3254,14 @@ elf_i386_relocate_section (bfd *output_bfd, defined _GLOBAL_OFFSET_TABLE_ in a different way, as is permitted by the ABI, we might have to change this calculation. */ - relocation -= htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset; + relocation -= htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset; break; case R_386_GOTPC: /* Use global offset table as symbol value. */ - relocation = htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset; + relocation = htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset; unresolved_reloc = FALSE; break; @@ -2848,7 +3275,7 @@ elf_i386_relocate_section (bfd *output_bfd, break; if (h->plt.offset == (bfd_vma) -1 - || htab->splt == NULL) + || htab->elf.splt == NULL) { /* We didn't make a PLT entry for this symbol. This happens when statically linking PIC code, or when @@ -2856,8 +3283,8 @@ elf_i386_relocate_section (bfd *output_bfd, break; } - relocation = (htab->splt->output_section->vma - + htab->splt->output_offset + relocation = (htab->elf.splt->output_section->vma + + htab->elf.splt->output_offset + h->plt.offset); unresolved_reloc = FALSE; break; @@ -2941,7 +3368,7 @@ elf_i386_relocate_section (bfd *output_bfd, break; case R_386_TLS_IE: - if (info->shared) + if (!info->executable) { Elf_Internal_Rela outrel; bfd_byte *loc; @@ -2977,7 +3404,7 @@ elf_i386_relocate_section (bfd *output_bfd, input_section, contents, symtab_hdr, sym_hashes, &r_type, tls_type, rel, - relend, h)) + relend, h, r_symndx)) return FALSE; if (r_type == R_386_TLS_LE_32) @@ -3010,7 +3437,7 @@ elf_i386_relocate_section (bfd *output_bfd, "\x65\xa1\0\0\0\0\x81\xe8\0\0\0", 12); roff = rel->r_offset + 6; } - bfd_put_32 (output_bfd, tpoff (info, relocation), + bfd_put_32 (output_bfd, elf_i386_tpoff (info, relocation), contents + roff); /* Skip R_386_PC32/R_386_PLT32. */ rel++; @@ -3037,7 +3464,7 @@ elf_i386_relocate_section (bfd *output_bfd, below with 0x86. */ bfd_put_8 (output_bfd, val ^ 0x86, contents + roff - 1); - bfd_put_32 (output_bfd, -tpoff (info, relocation), + bfd_put_32 (output_bfd, -elf_i386_tpoff (info, relocation), contents + roff); continue; } @@ -3105,7 +3532,7 @@ elf_i386_relocate_section (bfd *output_bfd, break; } } - bfd_put_32 (output_bfd, -tpoff (info, relocation), + bfd_put_32 (output_bfd, -elf_i386_tpoff (info, relocation), contents + rel->r_offset); continue; } @@ -3151,16 +3578,16 @@ elf_i386_relocate_section (bfd *output_bfd, else BFD_FAIL (); if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GOTIE) - bfd_put_32 (output_bfd, -tpoff (info, relocation), + bfd_put_32 (output_bfd, -elf_i386_tpoff (info, relocation), contents + rel->r_offset); else - bfd_put_32 (output_bfd, tpoff (info, relocation), + bfd_put_32 (output_bfd, elf_i386_tpoff (info, relocation), contents + rel->r_offset); continue; } } - if (htab->sgot == NULL) + if (htab->elf.sgot == NULL) abort (); if (h != NULL) @@ -3186,7 +3613,7 @@ elf_i386_relocate_section (bfd *output_bfd, int dr_type, indx; asection *sreloc; - if (htab->srelgot == NULL) + if (htab->elf.srelgot == NULL) abort (); indx = h && h->dynindx != -1 ? h->dynindx : 0; @@ -3195,12 +3622,12 @@ elf_i386_relocate_section (bfd *output_bfd, { outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_DESC); BFD_ASSERT (htab->sgotplt_jump_table_size + offplt + 8 - <= htab->sgotplt->size); - outrel.r_offset = (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + <= htab->elf.sgotplt->size); + outrel.r_offset = (htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset + offplt + htab->sgotplt_jump_table_size); - sreloc = htab->srelplt; + sreloc = htab->elf.srelplt; loc = sreloc->contents; loc += (htab->next_tls_desc_index++ * sizeof (Elf32_External_Rel)); @@ -3211,22 +3638,22 @@ elf_i386_relocate_section (bfd *output_bfd, { BFD_ASSERT (! unresolved_reloc); bfd_put_32 (output_bfd, - relocation - dtpoff_base (info), - htab->sgotplt->contents + offplt + relocation - elf_i386_dtpoff_base (info), + htab->elf.sgotplt->contents + offplt + htab->sgotplt_jump_table_size + 4); } else { bfd_put_32 (output_bfd, 0, - htab->sgotplt->contents + offplt + htab->elf.sgotplt->contents + offplt + htab->sgotplt_jump_table_size + 4); } } - sreloc = htab->srelgot; + sreloc = htab->elf.srelgot; - outrel.r_offset = (htab->sgot->output_section->vma - + htab->sgot->output_offset + off); + outrel.r_offset = (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off); if (GOT_TLS_GD_P (tls_type)) dr_type = R_386_TLS_DTPMOD32; @@ -3238,14 +3665,16 @@ elf_i386_relocate_section (bfd *output_bfd, dr_type = R_386_TLS_TPOFF32; if (dr_type == R_386_TLS_TPOFF && indx == 0) - bfd_put_32 (output_bfd, relocation - dtpoff_base (info), - htab->sgot->contents + off); + bfd_put_32 (output_bfd, + relocation - elf_i386_dtpoff_base (info), + htab->elf.sgot->contents + off); else if (dr_type == R_386_TLS_TPOFF32 && indx == 0) - bfd_put_32 (output_bfd, dtpoff_base (info) - relocation, - htab->sgot->contents + off); + bfd_put_32 (output_bfd, + elf_i386_dtpoff_base (info) - relocation, + htab->elf.sgot->contents + off); else if (dr_type != R_386_TLS_DESC) bfd_put_32 (output_bfd, 0, - htab->sgot->contents + off); + htab->elf.sgot->contents + off); outrel.r_info = ELF32_R_INFO (indx, dr_type); loc = sreloc->contents; @@ -3260,13 +3689,13 @@ elf_i386_relocate_section (bfd *output_bfd, { BFD_ASSERT (! unresolved_reloc); bfd_put_32 (output_bfd, - relocation - dtpoff_base (info), - htab->sgot->contents + off + 4); + relocation - elf_i386_dtpoff_base (info), + htab->elf.sgot->contents + off + 4); } else { bfd_put_32 (output_bfd, 0, - htab->sgot->contents + off + 4); + htab->elf.sgot->contents + off + 4); outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_DTPOFF32); outrel.r_offset += 4; @@ -3280,8 +3709,10 @@ elf_i386_relocate_section (bfd *output_bfd, else if (tls_type == GOT_TLS_IE_BOTH) { bfd_put_32 (output_bfd, - indx == 0 ? relocation - dtpoff_base (info) : 0, - htab->sgot->contents + off + 4); + (indx == 0 + ? relocation - elf_i386_dtpoff_base (info) + : 0), + htab->elf.sgot->contents + off + 4); outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_TPOFF); outrel.r_offset += 4; sreloc->reloc_count++; @@ -3307,10 +3738,10 @@ elf_i386_relocate_section (bfd *output_bfd, } else if (r_type == ELF32_R_TYPE (rel->r_info)) { - bfd_vma g_o_t = htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset; - relocation = htab->sgot->output_section->vma - + htab->sgot->output_offset + off - g_o_t; + bfd_vma g_o_t = htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset; + relocation = htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off - g_o_t; if ((r_type == R_386_TLS_IE || r_type == R_386_TLS_GOTIE) && tls_type == GOT_TLS_IE_BOTH) relocation += 4; @@ -3352,10 +3783,10 @@ elf_i386_relocate_section (bfd *output_bfd, if (tls_type == GOT_TLS_IE_POS) contents[roff + 6] = 0x03; bfd_put_32 (output_bfd, - htab->sgot->output_section->vma - + htab->sgot->output_offset + off - - htab->sgotplt->output_section->vma - - htab->sgotplt->output_offset, + htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off + - htab->elf.sgotplt->output_section->vma + - htab->elf.sgotplt->output_offset, contents + roff + 8); /* Skip R_386_PLT32. */ rel++; @@ -3393,10 +3824,10 @@ elf_i386_relocate_section (bfd *output_bfd, off += 4; bfd_put_32 (output_bfd, - htab->sgot->output_section->vma - + htab->sgot->output_offset + off - - htab->sgotplt->output_section->vma - - htab->sgotplt->output_offset, + htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off + - htab->elf.sgotplt->output_section->vma + - htab->elf.sgotplt->output_offset, contents + roff); continue; } @@ -3442,7 +3873,7 @@ elf_i386_relocate_section (bfd *output_bfd, input_section, contents, symtab_hdr, sym_hashes, &r_type, GOT_UNKNOWN, rel, - relend, h)) + relend, h, r_symndx)) return FALSE; if (r_type != R_386_TLS_LDM) @@ -3459,7 +3890,7 @@ elf_i386_relocate_section (bfd *output_bfd, continue; } - if (htab->sgot == NULL) + if (htab->elf.sgot == NULL) abort (); off = htab->tls_ldm_got.offset; @@ -3470,40 +3901,40 @@ elf_i386_relocate_section (bfd *output_bfd, Elf_Internal_Rela outrel; bfd_byte *loc; - if (htab->srelgot == NULL) + if (htab->elf.srelgot == NULL) abort (); - outrel.r_offset = (htab->sgot->output_section->vma - + htab->sgot->output_offset + off); + outrel.r_offset = (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off); bfd_put_32 (output_bfd, 0, - htab->sgot->contents + off); + htab->elf.sgot->contents + off); bfd_put_32 (output_bfd, 0, - htab->sgot->contents + off + 4); + htab->elf.sgot->contents + off + 4); outrel.r_info = ELF32_R_INFO (0, R_386_TLS_DTPMOD32); - loc = htab->srelgot->contents; - loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rel); + loc = htab->elf.srelgot->contents; + loc += htab->elf.srelgot->reloc_count++ * sizeof (Elf32_External_Rel); bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc); htab->tls_ldm_got.offset |= 1; } - relocation = htab->sgot->output_section->vma - + htab->sgot->output_offset + off - - htab->sgotplt->output_section->vma - - htab->sgotplt->output_offset; + relocation = htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off + - htab->elf.sgotplt->output_section->vma + - htab->elf.sgotplt->output_offset; unresolved_reloc = FALSE; break; case R_386_TLS_LDO_32: if (info->shared || (input_section->flags & SEC_CODE) == 0) - relocation -= dtpoff_base (info); + relocation -= elf_i386_dtpoff_base (info); else /* When converting LDO to LE, we must negate. */ - relocation = -tpoff (info, relocation); + relocation = -elf_i386_tpoff (info, relocation); break; case R_386_TLS_LE_32: case R_386_TLS_LE: - if (info->shared) + if (!info->executable) { Elf_Internal_Rela outrel; asection *sreloc; @@ -3530,14 +3961,14 @@ elf_i386_relocate_section (bfd *output_bfd, if (indx) continue; else if (r_type == R_386_TLS_LE_32) - relocation = dtpoff_base (info) - relocation; + relocation = elf_i386_dtpoff_base (info) - relocation; else - relocation -= dtpoff_base (info); + relocation -= elf_i386_dtpoff_base (info); } else if (r_type == R_386_TLS_LE_32) - relocation = tpoff (info, relocation); + relocation = elf_i386_tpoff (info, relocation); else - relocation = -tpoff (info, relocation); + relocation = -elf_i386_tpoff (info, relocation); break; default: @@ -3561,6 +3992,7 @@ elf_i386_relocate_section (bfd *output_bfd, return FALSE; } +do_relocation: r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, relocation, 0); @@ -3623,37 +4055,67 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, bfd_vma got_offset; Elf_Internal_Rela rel; bfd_byte *loc; + asection *plt, *gotplt, *relplt; + + /* When building a static executable, use .iplt, .igot.plt and + .rel.iplt sections for STT_GNU_IFUNC symbols. */ + if (htab->elf.splt != NULL) + { + plt = htab->elf.splt; + gotplt = htab->elf.sgotplt; + relplt = htab->elf.srelplt; + } + else + { + plt = htab->elf.iplt; + gotplt = htab->elf.igotplt; + relplt = htab->elf.irelplt; + } /* This symbol has an entry in the procedure linkage table. Set it up. */ - if (h->dynindx == -1 - || htab->splt == NULL - || htab->sgotplt == NULL - || htab->srelplt == NULL) + if ((h->dynindx == -1 + && !((h->forced_local || info->executable) + && h->def_regular + && h->type == STT_GNU_IFUNC)) + || plt == NULL + || gotplt == NULL + || relplt == NULL) abort (); /* Get the index in the procedure linkage table which corresponds to this symbol. This is the index of this symbol in all the symbols for which we are making plt entries. The - first entry in the procedure linkage table is reserved. */ - plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; + first entry in the procedure linkage table is reserved. - /* Get the offset into the .got table of the entry that + Get the offset into the .got table of the entry that corresponds to this function. Each .got entry is 4 bytes. - The first three are reserved. */ - got_offset = (plt_index + 3) * 4; + The first three are reserved. + + For static executables, we don't reserve anything. */ + + if (plt == htab->elf.splt) + { + plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; + got_offset = (plt_index + 3) * 4; + } + else + { + plt_index = h->plt.offset / PLT_ENTRY_SIZE; + got_offset = plt_index * 4; + } /* Fill in the entry in the procedure linkage table. */ if (! info->shared) { - memcpy (htab->splt->contents + h->plt.offset, elf_i386_plt_entry, + memcpy (plt->contents + h->plt.offset, elf_i386_plt_entry, PLT_ENTRY_SIZE); bfd_put_32 (output_bfd, - (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + (gotplt->output_section->vma + + gotplt->output_offset + got_offset), - htab->splt->contents + h->plt.offset + 2); + plt->contents + h->plt.offset + 2); if (htab->is_vxworks) { @@ -3675,16 +4137,16 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, loc = (htab->srelplt2->contents + reloc_index * sizeof (Elf32_External_Rel)); - rel.r_offset = (htab->splt->output_section->vma - + htab->splt->output_offset + rel.r_offset = (htab->elf.splt->output_section->vma + + htab->elf.splt->output_offset + h->plt.offset + 2), rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32); bfd_elf32_swap_reloc_out (output_bfd, &rel, loc); /* Create the R_386_32 relocation referencing the beginning of the PLT for this GOT entry. */ - rel.r_offset = (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + rel.r_offset = (htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset + got_offset); rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_386_32); bfd_elf32_swap_reloc_out (output_bfd, &rel, @@ -3693,31 +4155,52 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, } else { - memcpy (htab->splt->contents + h->plt.offset, elf_i386_pic_plt_entry, + memcpy (plt->contents + h->plt.offset, elf_i386_pic_plt_entry, PLT_ENTRY_SIZE); bfd_put_32 (output_bfd, got_offset, - htab->splt->contents + h->plt.offset + 2); + plt->contents + h->plt.offset + 2); } - bfd_put_32 (output_bfd, plt_index * sizeof (Elf32_External_Rel), - htab->splt->contents + h->plt.offset + 7); - bfd_put_32 (output_bfd, - (h->plt.offset + PLT_ENTRY_SIZE), - htab->splt->contents + h->plt.offset + 12); + /* Don't fill PLT entry for static executables. */ + if (plt == htab->elf.splt) + { + bfd_put_32 (output_bfd, plt_index * sizeof (Elf32_External_Rel), + plt->contents + h->plt.offset + 7); + bfd_put_32 (output_bfd, - (h->plt.offset + PLT_ENTRY_SIZE), + plt->contents + h->plt.offset + 12); + } /* Fill in the entry in the global offset table. */ bfd_put_32 (output_bfd, - (htab->splt->output_section->vma - + htab->splt->output_offset + (plt->output_section->vma + + plt->output_offset + h->plt.offset + 6), - htab->sgotplt->contents + got_offset); + gotplt->contents + got_offset); /* Fill in the entry in the .rel.plt section. */ - rel.r_offset = (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + rel.r_offset = (gotplt->output_section->vma + + gotplt->output_offset + got_offset); - rel.r_info = ELF32_R_INFO (h->dynindx, R_386_JUMP_SLOT); - loc = htab->srelplt->contents + plt_index * sizeof (Elf32_External_Rel); + if (h->dynindx == -1 + || ((info->executable + || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT) + && h->def_regular + && h->type == STT_GNU_IFUNC)) + { + /* If an STT_GNU_IFUNC symbol is locally defined, generate + R_386_IRELATIVE instead of R_386_JUMP_SLOT. Store addend + in the .got.plt section. */ + bfd_put_32 (output_bfd, + (h->root.u.def.value + + h->root.u.def.section->output_section->vma + + h->root.u.def.section->output_offset), + gotplt->contents + got_offset); + rel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE); + } + else + rel.r_info = ELF32_R_INFO (h->dynindx, R_386_JUMP_SLOT); + loc = relplt->contents + plt_index * sizeof (Elf32_External_Rel); bfd_elf32_swap_reloc_out (output_bfd, &rel, loc); if (!h->def_regular) @@ -3746,11 +4229,11 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, /* This symbol has an entry in the global offset table. Set it up. */ - if (htab->sgot == NULL || htab->srelgot == NULL) + if (htab->elf.sgot == NULL || htab->elf.srelgot == NULL) abort (); - rel.r_offset = (htab->sgot->output_section->vma - + htab->sgot->output_offset + rel.r_offset = (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + (h->got.offset & ~(bfd_vma) 1)); /* If this is a static link, or it is a -Bsymbolic link and the @@ -3758,8 +4241,34 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, of a version file, we just want to emit a RELATIVE reloc. The entry in the global offset table will already have been initialized in the relocate_section function. */ - if (info->shared - && SYMBOL_REFERENCES_LOCAL (info, h)) + if (h->def_regular + && h->type == STT_GNU_IFUNC) + { + if (info->shared) + { + /* Generate R_386_GLOB_DAT. */ + goto do_glob_dat; + } + else + { + asection *plt; + + if (!h->pointer_equality_needed) + abort (); + + /* For non-shared object, we can't use .got.plt, which + contains the real function addres if we need pointer + equality. We load the GOT entry with the PLT entry. */ + plt = htab->elf.splt ? htab->elf.splt : htab->elf.iplt; + bfd_put_32 (output_bfd, + (plt->output_section->vma + + plt->output_offset + h->plt.offset), + htab->elf.sgot->contents + h->got.offset); + return TRUE; + } + } + else if (info->shared + && SYMBOL_REFERENCES_LOCAL (info, h)) { BFD_ASSERT((h->got.offset & 1) != 0); rel.r_info = ELF32_R_INFO (0, R_386_RELATIVE); @@ -3767,13 +4276,14 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, else { BFD_ASSERT((h->got.offset & 1) == 0); +do_glob_dat: bfd_put_32 (output_bfd, (bfd_vma) 0, - htab->sgot->contents + h->got.offset); + htab->elf.sgot->contents + h->got.offset); rel.r_info = ELF32_R_INFO (h->dynindx, R_386_GLOB_DAT); } - loc = htab->srelgot->contents; - loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rel); + loc = htab->elf.srelgot->contents; + loc += htab->elf.srelgot->reloc_count++ * sizeof (Elf32_External_Rel); bfd_elf32_swap_reloc_out (output_bfd, &rel, loc); } @@ -3799,16 +4309,34 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, bfd_elf32_swap_reloc_out (output_bfd, &rel, loc); } - /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. + /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. SYM may + be NULL for local symbols. + On VxWorks, the _GLOBAL_OFFSET_TABLE_ symbol is not absolute: it is relative to the ".got" section. */ - if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || (!htab->is_vxworks && h == htab->elf.hgot)) + if (sym != NULL + && (strcmp (h->root.root.string, "_DYNAMIC") == 0 + || (!htab->is_vxworks && h == htab->elf.hgot))) sym->st_shndx = SHN_ABS; return TRUE; } +/* Finish up local dynamic symbol handling. We set the contents of + various dynamic sections here. */ + +static bfd_boolean +elf_i386_finish_local_dynamic_symbol (void **slot, void *inf) +{ + struct elf_link_hash_entry *h + = (struct elf_link_hash_entry *) *slot; + struct bfd_link_info *info + = (struct bfd_link_info *) inf; + + return elf_i386_finish_dynamic_symbol (info->output_bfd, info, + h, NULL); +} + /* Used to decide how to sort relocs in an optimal manner for the dynamic linker, before writing them out. */ @@ -3846,7 +4374,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, { Elf32_External_Dyn *dyncon, *dynconend; - if (sdyn == NULL || htab->sgot == NULL) + if (sdyn == NULL || htab->elf.sgot == NULL) abort (); dyncon = (Elf32_External_Dyn *) sdyn->contents; @@ -3867,17 +4395,17 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, continue; case DT_PLTGOT: - s = htab->sgotplt; + s = htab->elf.sgotplt; dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; break; case DT_JMPREL: - s = htab->srelplt; + s = htab->elf.srelplt; dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; break; case DT_PLTRELSZ: - s = htab->srelplt; + s = htab->elf.srelplt; dyn.d_un.d_val = s->size; break; @@ -3888,7 +4416,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, what Solaris does. However, UnixWare can not handle that case. Therefore, we override the DT_RELSZ entry here to make it not include the JMPREL relocs. */ - s = htab->srelplt; + s = htab->elf.srelplt; if (s == NULL) continue; dyn.d_un.d_val -= s->size; @@ -3898,7 +4426,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, /* We may not be using the standard ELF linker script. If .rel.plt is the first .rel section, we adjust DT_REL to not include it. */ - s = htab->srelplt; + s = htab->elf.srelplt; if (s == NULL) continue; if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset) @@ -3911,33 +4439,33 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, } /* Fill in the first entry in the procedure linkage table. */ - if (htab->splt && htab->splt->size > 0) + if (htab->elf.splt && htab->elf.splt->size > 0) { if (info->shared) { - memcpy (htab->splt->contents, elf_i386_pic_plt0_entry, + memcpy (htab->elf.splt->contents, elf_i386_pic_plt0_entry, sizeof (elf_i386_pic_plt0_entry)); - memset (htab->splt->contents + sizeof (elf_i386_pic_plt0_entry), + memset (htab->elf.splt->contents + sizeof (elf_i386_pic_plt0_entry), htab->plt0_pad_byte, PLT_ENTRY_SIZE - sizeof (elf_i386_pic_plt0_entry)); } else { - memcpy (htab->splt->contents, elf_i386_plt0_entry, + memcpy (htab->elf.splt->contents, elf_i386_plt0_entry, sizeof(elf_i386_plt0_entry)); - memset (htab->splt->contents + sizeof (elf_i386_plt0_entry), + memset (htab->elf.splt->contents + sizeof (elf_i386_plt0_entry), htab->plt0_pad_byte, PLT_ENTRY_SIZE - sizeof (elf_i386_plt0_entry)); bfd_put_32 (output_bfd, - (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + (htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset + 4), - htab->splt->contents + 2); + htab->elf.splt->contents + 2); bfd_put_32 (output_bfd, - (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + (htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset + 8), - htab->splt->contents + 8); + htab->elf.splt->contents + 8); if (htab->is_vxworks) { @@ -3946,15 +4474,15 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, /* Generate a relocation for _GLOBAL_OFFSET_TABLE_ + 4. On IA32 we use REL relocations so the addend goes in the PLT directly. */ - rel.r_offset = (htab->splt->output_section->vma - + htab->splt->output_offset + rel.r_offset = (htab->elf.splt->output_section->vma + + htab->elf.splt->output_offset + 2); rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32); bfd_elf32_swap_reloc_out (output_bfd, &rel, htab->srelplt2->contents); /* Generate a relocation for _GLOBAL_OFFSET_TABLE_ + 8. */ - rel.r_offset = (htab->splt->output_section->vma - + htab->splt->output_offset + rel.r_offset = (htab->elf.splt->output_section->vma + + htab->elf.splt->output_offset + 8); rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32); bfd_elf32_swap_reloc_out (output_bfd, &rel, @@ -3965,13 +4493,13 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, /* UnixWare sets the entsize of .plt to 4, although that doesn't really seem like the right value. */ - elf_section_data (htab->splt->output_section) + elf_section_data (htab->elf.splt->output_section) ->this_hdr.sh_entsize = 4; /* Correct the .rel.plt.unloaded relocations. */ if (htab->is_vxworks && !info->shared) { - int num_plts = (htab->splt->size / PLT_ENTRY_SIZE) - 1; + int num_plts = (htab->elf.splt->size / PLT_ENTRY_SIZE) - 1; unsigned char *p; p = htab->srelplt2->contents; @@ -3997,24 +4525,29 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, } } - if (htab->sgotplt) + if (htab->elf.sgotplt) { /* Fill in the first three entries in the global offset table. */ - if (htab->sgotplt->size > 0) + if (htab->elf.sgotplt->size > 0) { bfd_put_32 (output_bfd, (sdyn == NULL ? 0 : sdyn->output_section->vma + sdyn->output_offset), - htab->sgotplt->contents); - bfd_put_32 (output_bfd, 0, htab->sgotplt->contents + 4); - bfd_put_32 (output_bfd, 0, htab->sgotplt->contents + 8); + htab->elf.sgotplt->contents); + bfd_put_32 (output_bfd, 0, htab->elf.sgotplt->contents + 4); + bfd_put_32 (output_bfd, 0, htab->elf.sgotplt->contents + 8); } - elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize = 4; + elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize = 4; } - if (htab->sgot && htab->sgot->size > 0) - elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 4; + if (htab->elf.sgot && htab->elf.sgot->size > 0) + elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4; + + /* Fill PLT and GOT entries for local STT_GNU_IFUNC symbols. */ + htab_traverse (htab->loc_hash_table, + elf_i386_finish_local_dynamic_symbol, + info); return TRUE; } @@ -4042,6 +4575,24 @@ elf_i386_hash_symbol (struct elf_link_hash_entry *h) return _bfd_elf_hash_symbol (h); } +/* Hook called by the linker routine which adds symbols from an object + file. */ + +static bfd_boolean +elf_i386_add_symbol_hook (bfd * abfd ATTRIBUTE_UNUSED, + struct bfd_link_info * info ATTRIBUTE_UNUSED, + Elf_Internal_Sym * sym, + const char ** namep ATTRIBUTE_UNUSED, + flagword * flagsp ATTRIBUTE_UNUSED, + asection ** secp ATTRIBUTE_UNUSED, + bfd_vma * valp ATTRIBUTE_UNUSED) +{ + if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + + return TRUE; +} + #define TARGET_LITTLE_SYM bfd_elf32_i386_vec #define TARGET_LITTLE_NAME "elf32-i386" #define ELF_ARCH bfd_arch_i386 @@ -4063,6 +4614,7 @@ elf_i386_hash_symbol (struct elf_link_hash_entry *h) #define bfd_elf32_bfd_is_local_label_name elf_i386_is_local_label_name #define bfd_elf32_bfd_link_hash_table_create elf_i386_link_hash_table_create +#define bfd_elf32_bfd_link_hash_table_free elf_i386_link_hash_table_free #define bfd_elf32_bfd_reloc_type_lookup elf_i386_reloc_type_lookup #define bfd_elf32_bfd_reloc_name_lookup elf_i386_reloc_name_lookup @@ -4086,6 +4638,9 @@ elf_i386_hash_symbol (struct elf_link_hash_entry *h) ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true) #define elf_backend_plt_sym_val elf_i386_plt_sym_val #define elf_backend_hash_symbol elf_i386_hash_symbol +#define elf_backend_add_symbol_hook elf_i386_add_symbol_hook +#undef elf_backend_post_process_headers +#define elf_backend_post_process_headers _bfd_elf_set_osabi #include "elf32-target.h" @@ -4103,15 +4658,10 @@ elf_i386_hash_symbol (struct elf_link_hash_entry *h) executables and (for simplicity) also all other object files. */ static void -elf_i386_post_process_headers (bfd *abfd, - struct bfd_link_info *info ATTRIBUTE_UNUSED) +elf_i386_fbsd_post_process_headers (bfd *abfd, struct bfd_link_info *info) { - Elf_Internal_Ehdr *i_ehdrp; + _bfd_elf_set_osabi (abfd, info); - i_ehdrp = elf_elfheader (abfd); - - /* Put an ABI label supported by FreeBSD >= 4.1. */ - i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi; #ifdef OLD_FREEBSD_ABI_LABEL /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */ memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8); @@ -4119,10 +4669,12 @@ elf_i386_post_process_headers (bfd *abfd, } #undef elf_backend_post_process_headers -#define elf_backend_post_process_headers elf_i386_post_process_headers +#define elf_backend_post_process_headers elf_i386_fbsd_post_process_headers #undef elf32_bed #define elf32_bed elf32_i386_fbsd_bed +#undef elf_backend_add_symbol_hook + #include "elf32-target.h" /* VxWorks support. */ diff --git a/cegcc/src/binutils/bfd/elf32-lm32.c b/cegcc/src/binutils/bfd/elf32-lm32.c index 620dc506d..705356872 100644 --- a/cegcc/src/binutils/bfd/elf32-lm32.c +++ b/cegcc/src/binutils/bfd/elf32-lm32.c @@ -1,5 +1,5 @@ /* Lattice Mico32-specific support for 32-bit ELF - Copyright 2008 Free Software Foundation, Inc. + Copyright 2008, 2009 Free Software Foundation, Inc. Contributed by Jon Beniston This file is part of BFD, the Binary File Descriptor library. @@ -225,20 +225,10 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) htab = lm32_elf_hash_table (info); htab->sgot = bfd_get_section_by_name (dynobj, ".got"); htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); - if (! htab->sgot || ! htab->sgotplt) + htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); + if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot) abort (); - htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got", - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)); - if (htab->srelgot == NULL - || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2)) - return FALSE; - return TRUE; } diff --git a/cegcc/src/binutils/bfd/elf32-m32c.c b/cegcc/src/binutils/bfd/elf32-m32c.c index 5f45784f3..4de500a1c 100644 --- a/cegcc/src/binutils/bfd/elf32-m32c.c +++ b/cegcc/src/binutils/bfd/elf32-m32c.c @@ -1,5 +1,5 @@ /* M16C/M32C specific support for 32-bit ELF. - Copyright (C) 2005, 2006, 2007, 2008 + Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1951,13 +1951,24 @@ m32c_elf_relax_delete_bytes for (; isym < isymend; isym++, shndx = (shndx ? shndx + 1 : NULL)) { - + /* If the symbol is in the range of memory we just moved, we + have to adjust its value. */ if ((int) isym->st_shndx == sec_shndx && isym->st_value > addr && isym->st_value < toaddr) { isym->st_value -= count; } + /* If the symbol *spans* the bytes we just deleted (i.e. it's + *end* is in the moved bytes but it's *start* isn't), then we + must adjust its size. */ + if ((int) isym->st_shndx == sec_shndx + && isym->st_value < addr + && isym->st_value + isym->st_size > addr + && isym->st_value + isym->st_size < toaddr) + { + isym->st_size -= count; + } } /* Now adjust the global symbols defined in this section. */ @@ -1972,13 +1983,21 @@ m32c_elf_relax_delete_bytes struct elf_link_hash_entry * sym_hash = * sym_hashes; if (sym_hash && - ( sym_hash->root.type == bfd_link_hash_defined + (sym_hash->root.type == bfd_link_hash_defined || sym_hash->root.type == bfd_link_hash_defweak) - && sym_hash->root.u.def.section == sec - && sym_hash->root.u.def.value > addr - && sym_hash->root.u.def.value < toaddr) + && sym_hash->root.u.def.section == sec) { - sym_hash->root.u.def.value -= count; + if (sym_hash->root.u.def.value > addr + && sym_hash->root.u.def.value < toaddr) + { + sym_hash->root.u.def.value -= count; + } + if (sym_hash->root.u.def.value < addr + && sym_hash->root.u.def.value + sym_hash->size > addr + && sym_hash->root.u.def.value + sym_hash->size < toaddr) + { + sym_hash->size -= count; + } } } diff --git a/cegcc/src/binutils/bfd/elf32-m32r.c b/cegcc/src/binutils/bfd/elf32-m32r.c index 96db6cbdf..bd2fd993f 100644 --- a/cegcc/src/binutils/bfd/elf32-m32r.c +++ b/cegcc/src/binutils/bfd/elf32-m32r.c @@ -1,6 +1,6 @@ /* M32R-specific support for 32-bit ELF. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1526,8 +1526,8 @@ struct elf_m32r_link_hash_table asection *sdynbss; asection *srelbss; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; }; /* Traverse an m32r ELF linker hash table. */ @@ -1604,7 +1604,7 @@ m32r_elf_link_hash_table_create (bfd *abfd) ret->srelplt = NULL; ret->sdynbss = NULL; ret->srelbss = NULL; - ret->sym_sec.abfd = NULL; + ret->sym_cache.abfd = NULL; return &ret->root.root; } @@ -1623,20 +1623,10 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) htab = m32r_elf_hash_table (info); htab->sgot = bfd_get_section_by_name (dynobj, ".got"); htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); - if (! htab->sgot || ! htab->sgotplt) + htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); + if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot) abort (); - htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got", - (SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)); - if (htab->srelgot == NULL - || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2)) - return FALSE; - return TRUE; } @@ -3951,14 +3941,19 @@ m32r_elf_check_relocs (bfd *abfd, head = &((struct elf_m32r_link_hash_entry *) h)->dyn_relocs; else { + /* Track dynamic relocs needed for local syms too. */ asection *s; void *vpp; + Elf_Internal_Sym *isym; - /* Track dynamic relocs needed for local syms too. */ - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (s == NULL) - return FALSE; + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; + + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; vpp = &elf_section_data (s)->local_dynrel; head = (struct elf_m32r_dyn_relocs **) vpp; diff --git a/cegcc/src/binutils/bfd/elf32-m68hc1x.c b/cegcc/src/binutils/bfd/elf32-m68hc1x.c index 2660c890c..544db35b7 100644 --- a/cegcc/src/binutils/bfd/elf32-m68hc1x.c +++ b/cegcc/src/binutils/bfd/elf32-m68hc1x.c @@ -1,6 +1,6 @@ /* Motorola 68HC11/HC12-specific support for 32-bit ELF - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 - Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2009 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of BFD, the Binary File Descriptor library. @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "alloca-conf.h" #include "sysdep.h" #include "bfd.h" #include "bfdlink.h" @@ -94,7 +95,7 @@ m68hc11_elf_hash_table_create (bfd *abfd) ret->stub_bfd = NULL; ret->stub_section = 0; ret->add_stub_section = NULL; - ret->sym_sec.abfd = NULL; + ret->sym_cache.abfd = NULL; return ret; } diff --git a/cegcc/src/binutils/bfd/elf32-m68hc1x.h b/cegcc/src/binutils/bfd/elf32-m68hc1x.h index 2bf636d6d..5bc547afa 100644 --- a/cegcc/src/binutils/bfd/elf32-m68hc1x.h +++ b/cegcc/src/binutils/bfd/elf32-m68hc1x.h @@ -1,5 +1,5 @@ /* Motorola 68HC11/68HC12-specific support for 32-bit ELF - Copyright 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Contributed by Stephane Carrez (stcarrez@nerim.fr) This file is part of BFD, the Binary File Descriptor library. @@ -120,8 +120,8 @@ struct m68hc11_elf_link_hash_table int top_index; asection **input_list; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; bfd_boolean (* size_one_stub) PARAMS((struct bfd_hash_entry*, void*)); bfd_boolean (* build_one_stub) PARAMS((struct bfd_hash_entry*, void*)); diff --git a/cegcc/src/binutils/bfd/elf32-m68k.c b/cegcc/src/binutils/bfd/elf32-m68k.c index 542501bbf..17a5e0b52 100644 --- a/cegcc/src/binutils/bfd/elf32-m68k.c +++ b/cegcc/src/binutils/bfd/elf32-m68k.c @@ -374,13 +374,17 @@ static reloc_howto_type howto_table[] = { }; static void -rtype_to_howto (abfd, cache_ptr, dst) - bfd *abfd ATTRIBUTE_UNUSED; - arelent *cache_ptr; - Elf_Internal_Rela *dst; +rtype_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { - BFD_ASSERT (ELF32_R_TYPE(dst->r_info) < (unsigned int) R_68K_max); - cache_ptr->howto = &howto_table[ELF32_R_TYPE(dst->r_info)]; + unsigned int indx = ELF32_R_TYPE (dst->r_info); + + if (indx >= (unsigned int) R_68K_max) + { + (*_bfd_error_handler) (_("%B: invalid relocation type %d"), + abfd, (int) indx); + indx = R_68K_NONE; + } + cache_ptr->howto = &howto_table[indx]; } #define elf_info_to_howto rtype_to_howto @@ -909,8 +913,8 @@ struct elf_m68k_link_hash_table { struct elf_link_hash_table root; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; /* The PLT format used by this link, or NULL if the format has not yet been chosen. */ @@ -989,7 +993,7 @@ elf_m68k_link_hash_table_create (abfd) return NULL; } - ret->sym_sec.abfd = NULL; + ret->sym_cache.abfd = NULL; ret->plt_info = NULL; ret->local_gp_p = FALSE; ret->use_neg_got_offsets_p = FALSE; @@ -1076,7 +1080,68 @@ elf32_m68k_object_p (bfd *abfd) return TRUE; } +/* Somewhat reverse of elf32_m68k_object_p, this sets the e_flag + field based on the machine number. */ + +static void +elf_m68k_final_write_processing (bfd *abfd, + bfd_boolean linker ATTRIBUTE_UNUSED) +{ + int mach = bfd_get_mach (abfd); + unsigned long e_flags = elf_elfheader (abfd)->e_flags; + + if (!e_flags) + { + unsigned int arch_mask; + + arch_mask = bfd_m68k_mach_to_features (mach); + + if (arch_mask & m68000) + e_flags = EF_M68K_M68000; + else if (arch_mask & cpu32) + e_flags = EF_M68K_CPU32; + else if (arch_mask & fido_a) + e_flags = EF_M68K_FIDO; + else + { + switch (arch_mask + & (mcfisa_a | mcfisa_aa | mcfisa_b | mcfisa_c | mcfhwdiv | mcfusp)) + { + case mcfisa_a: + e_flags |= EF_M68K_CF_ISA_A_NODIV; + break; + case mcfisa_a | mcfhwdiv: + e_flags |= EF_M68K_CF_ISA_A; + break; + case mcfisa_a | mcfisa_aa | mcfhwdiv | mcfusp: + e_flags |= EF_M68K_CF_ISA_A_PLUS; + break; + case mcfisa_a | mcfisa_b | mcfhwdiv: + e_flags |= EF_M68K_CF_ISA_B_NOUSP; + break; + case mcfisa_a | mcfisa_b | mcfhwdiv | mcfusp: + e_flags |= EF_M68K_CF_ISA_B; + break; + case mcfisa_a | mcfisa_c | mcfhwdiv | mcfusp: + e_flags |= EF_M68K_CF_ISA_C; + break; + case mcfisa_a | mcfisa_c | mcfusp: + e_flags |= EF_M68K_CF_ISA_C_NODIV; + break; + } + if (arch_mask & mcfmac) + e_flags |= EF_M68K_CF_MAC; + else if (arch_mask & mcfemac) + e_flags |= EF_M68K_CF_EMAC; + if (arch_mask & cfloat) + e_flags |= EF_M68K_CF_FLOAT | EF_M68K_CFV4E; + } + elf_elfheader (abfd)->e_flags = e_flags; + } +} + /* Keep m68k-specific flags in the ELF header. */ + static bfd_boolean elf32_m68k_set_private_flags (abfd, flags) bfd *abfd; @@ -1531,7 +1596,7 @@ elf_m68k_get_got_entry (struct elf_m68k_got *got, static enum elf_m68k_reloc_type elf_m68k_update_got_entry_type (struct elf_m68k_got *got, enum elf_m68k_reloc_type was, - enum elf_m68k_reloc_type new) + enum elf_m68k_reloc_type new_reloc) { enum elf_m68k_got_offset_size was_size; enum elf_m68k_got_offset_size new_size; @@ -1543,20 +1608,20 @@ elf_m68k_update_got_entry_type (struct elf_m68k_got *got, /* Update all got->n_slots counters, including n_slots[R_32]. */ was_size = R_LAST; - was = new; + was = new_reloc; } else { /* !!! We, probably, should emit an error rather then fail on assert in such a case. */ BFD_ASSERT (elf_m68k_reloc_got_type (was) - == elf_m68k_reloc_got_type (new)); + == elf_m68k_reloc_got_type (new_reloc)); was_size = elf_m68k_reloc_got_offset_size (was); } - new_size = elf_m68k_reloc_got_offset_size (new); - n_slots = elf_m68k_reloc_got_n_slots (new); + new_size = elf_m68k_reloc_got_offset_size (new_reloc); + n_slots = elf_m68k_reloc_got_n_slots (new_reloc); while (was_size > new_size) { @@ -1564,10 +1629,10 @@ elf_m68k_update_got_entry_type (struct elf_m68k_got *got, got->n_slots[was_size] += n_slots; } - if (new > was) + if (new_reloc > was) /* Relocations are ordered from bigger got offset size to lesser, so choose the relocation type with lesser offset size. */ - was = new; + was = new_reloc; return was; } @@ -2487,6 +2552,10 @@ elf_m68k_copy_indirect_symbol (struct bfd_link_info *info, dir = elf_m68k_hash_entry (_dir); ind = elf_m68k_hash_entry (_ind); + /* Any absolute non-dynamic relocations against an indirect or weak + definition will be against the target symbol. */ + _dir->non_got_ref |= _ind->non_got_ref; + /* We might have a direct symbol already having entries in the GOTs. Update its key only in case indirect symbol has GOT entries and assert that both indirect and direct symbols don't have GOT entries @@ -2581,6 +2650,14 @@ elf_m68k_check_relocs (abfd, info, sec, relocs) case R_68K_TLS_IE16: case R_68K_TLS_IE32: + case R_68K_TLS_TPREL32: + case R_68K_TLS_DTPREL32: + + if (ELF32_R_TYPE (rel->r_info) == R_68K_TLS_TPREL32 + && info->shared) + /* Do the special chorus for libraries with static TLS. */ + info->flags |= DF_STATIC_TLS; + /* This symbol requires a global offset table entry. */ if (dynobj == NULL) @@ -2739,6 +2816,10 @@ elf_m68k_check_relocs (abfd, info, sec, relocs) /* Make sure a plt entry is created for this symbol if it turns out to be a function defined by a dynamic object. */ h->plt.refcount++; + + if (!info->shared) + /* This symbol needs a non-GOT reference. */ + h->non_got_ref = 1; } /* If we are creating a shared library, we need to copy the @@ -2793,13 +2874,17 @@ elf_m68k_check_relocs (abfd, info, sec, relocs) { asection *s; void *vpp; + Elf_Internal_Sym *isym; - s = (bfd_section_from_r_symndx - (abfd, &elf_m68k_hash_table (info)->sym_sec, - sec, r_symndx)); - if (s == NULL) + isym = bfd_sym_from_r_symndx (&elf_m68k_hash_table (info)->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; + vpp = &elf_section_data (s)->local_dynrel; head = (struct elf_m68k_pcrel_relocs_copied **) vpp; } @@ -2942,6 +3027,9 @@ elf_m68k_gc_sweep_hook (bfd *abfd, case R_68K_TLS_IE16: case R_68K_TLS_IE32: + case R_68K_TLS_TPREL32: + case R_68K_TLS_DTPREL32: + if (got == NULL) { got = elf_m68k_get_bfd2got_entry (elf_m68k_multi_got (info), @@ -3155,6 +3243,11 @@ elf_m68k_adjust_dynamic_symbol (info, h) if (info->shared) return TRUE; + /* If there are no references to this symbol that do not use the + GOT, we don't need to generate a copy reloc. */ + if (!h->non_got_ref) + return TRUE; + if (h->size == 0) { (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"), @@ -3418,9 +3511,11 @@ elf_m68k_install_rela (bfd *output_bfd, bfd_elf32_swap_reloca_out (output_bfd, rela, loc); } -/* Return the base VMA address which should be subtracted from real addresses - when resolving @dtpoff relocation. - This is PT_TLS segment p_vaddr. */ +/* Find the base offsets for thread-local storage in this object, + for GD/LD and IE/LE respectively. */ + +#define DTP_OFFSET 0x8000 +#define TP_OFFSET 0x7000 static bfd_vma dtpoff_base (struct bfd_link_info *info) @@ -3428,23 +3523,116 @@ dtpoff_base (struct bfd_link_info *info) /* If tls_sec is NULL, we should have signalled an error already. */ if (elf_hash_table (info)->tls_sec == NULL) return 0; - return elf_hash_table (info)->tls_sec->vma; + return elf_hash_table (info)->tls_sec->vma + DTP_OFFSET; } -/* Return the relocation value for @tpoff relocation - if STT_TLS virtual address is ADDRESS. */ - static bfd_vma -tpoff (struct bfd_link_info *info, bfd_vma address) +tpoff_base (struct bfd_link_info *info) { - struct elf_link_hash_table *htab = elf_hash_table (info); - bfd_vma base; - /* If tls_sec is NULL, we should have signalled an error already. */ - if (htab->tls_sec == NULL) + if (elf_hash_table (info)->tls_sec == NULL) return 0; - base = align_power ((bfd_vma) 8, htab->tls_sec->alignment_power); - return address - htab->tls_sec->vma + base; + return elf_hash_table (info)->tls_sec->vma + TP_OFFSET; +} + +/* Output necessary relocation to handle a symbol during static link. + This function is called from elf_m68k_relocate_section. */ + +static void +elf_m68k_init_got_entry_static (struct bfd_link_info *info, + bfd *output_bfd, + enum elf_m68k_reloc_type r_type, + asection *sgot, + bfd_vma got_entry_offset, + bfd_vma relocation) +{ + switch (elf_m68k_reloc_got_type (r_type)) + { + case R_68K_GOT32O: + bfd_put_32 (output_bfd, relocation, sgot->contents + got_entry_offset); + break; + + case R_68K_TLS_GD32: + /* We know the offset within the module, + put it into the second GOT slot. */ + bfd_put_32 (output_bfd, relocation - dtpoff_base (info), + sgot->contents + got_entry_offset + 4); + /* FALLTHRU */ + + case R_68K_TLS_LDM32: + /* Mark it as belonging to module 1, the executable. */ + bfd_put_32 (output_bfd, 1, sgot->contents + got_entry_offset); + break; + + case R_68K_TLS_IE32: + bfd_put_32 (output_bfd, relocation - tpoff_base (info), + sgot->contents + got_entry_offset); + break; + + default: + BFD_ASSERT (FALSE); + } +} + +/* Output necessary relocation to handle a local symbol + during dynamic link. + This function is called either from elf_m68k_relocate_section + or from elf_m68k_finish_dynamic_symbol. */ + +static void +elf_m68k_init_got_entry_local_shared (struct bfd_link_info *info, + bfd *output_bfd, + enum elf_m68k_reloc_type r_type, + asection *sgot, + bfd_vma got_entry_offset, + bfd_vma relocation, + asection *srela) +{ + Elf_Internal_Rela outrel; + + switch (elf_m68k_reloc_got_type (r_type)) + { + case R_68K_GOT32O: + /* Emit RELATIVE relocation to initialize GOT slot + at run-time. */ + outrel.r_info = ELF32_R_INFO (0, R_68K_RELATIVE); + outrel.r_addend = relocation; + break; + + case R_68K_TLS_GD32: + /* We know the offset within the module, + put it into the second GOT slot. */ + bfd_put_32 (output_bfd, relocation - dtpoff_base (info), + sgot->contents + got_entry_offset + 4); + /* FALLTHRU */ + + case R_68K_TLS_LDM32: + /* We don't know the module number, + create a relocation for it. */ + outrel.r_info = ELF32_R_INFO (0, R_68K_TLS_DTPMOD32); + outrel.r_addend = 0; + break; + + case R_68K_TLS_IE32: + /* Emit TPREL relocation to initialize GOT slot + at run-time. */ + outrel.r_info = ELF32_R_INFO (0, R_68K_TLS_TPREL32); + outrel.r_addend = relocation - elf_hash_table (info)->tls_sec->vma; + break; + + default: + BFD_ASSERT (FALSE); + } + + /* Offset of the GOT entry. */ + outrel.r_offset = (sgot->output_section->vma + + sgot->output_offset + + got_entry_offset); + + /* Install one of the above relocations. */ + elf_m68k_install_rela (output_bfd, srela, &outrel); + + bfd_put_32 (output_bfd, outrel.r_addend, sgot->contents + got_entry_offset); } /* Relocate an M68K ELF section. */ @@ -3467,6 +3655,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, asection *sgot; asection *splt; asection *sreloc; + asection *srela; struct elf_m68k_got *got; Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; @@ -3478,6 +3667,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, sgot = NULL; splt = NULL; sreloc = NULL; + srela = NULL; got = NULL; @@ -3676,7 +3866,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, /* This is actually a static link, or it is a -Bsymbolic link and the symbol is defined locally, or the symbol was forced to be local - because of a version file.. We must initialize + because of a version file. We must initialize this entry in the global offset table. Since the offset must always be a multiple of 4, we use the least significant bit to record whether @@ -3686,26 +3876,12 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, relocation entry to initialize the value. This is done in the finish_dynamic_symbol routine. */ - if (elf_m68k_reloc_got_type (r_type) == R_68K_GOT32O) - bfd_put_32 (output_bfd, relocation, - sgot->contents + off); - else if (elf_m68k_reloc_got_type (r_type) - == R_68K_TLS_GD32) - /* Mark it as belonging to module 1, - the executable. */ - { - bfd_put_32 (output_bfd, 1, - sgot->contents + off); - bfd_put_32 (output_bfd, (relocation - - dtpoff_base (info)), - sgot->contents + off + 4); - } - else if (elf_m68k_reloc_got_type (r_type) - == R_68K_TLS_IE32) - bfd_put_32 (output_bfd, tpoff (info, relocation), - sgot->contents + off); - else - BFD_ASSERT (FALSE); + elf_m68k_init_got_entry_static (info, + output_bfd, + r_type, + sgot, + off, + relocation); *off_ptr |= 1; } @@ -3713,103 +3889,32 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, unresolved_reloc = FALSE; } else if (info->shared) /* && h == NULL */ + /* Process local symbol during dynamic link. */ { - asection *srela; - Elf_Internal_Rela outrel; - - srela = bfd_get_section_by_name (dynobj, ".rela.got"); - BFD_ASSERT (srela != NULL); - - if (elf_m68k_reloc_got_type (r_type) == R_68K_GOT32O) - { - /* Emit RELATIVE relocation to initialize GOT slot - at run-time. */ - outrel.r_info = ELF32_R_INFO (0, R_68K_RELATIVE); - outrel.r_addend = relocation; - outrel.r_offset = (sgot->output_section->vma - + sgot->output_offset - + off); - - elf_m68k_install_rela (output_bfd, srela, &outrel); - } - else if (elf_m68k_reloc_got_type (r_type) - == R_68K_TLS_LDM32) + if (srela == NULL) { - /* If we don't know the module number, create - a relocation for it. */ - outrel.r_info = ELF32_R_INFO (0, R_68K_TLS_DTPMOD32); - outrel.r_addend = 0; - outrel.r_offset = (sgot->output_section->vma - + sgot->output_offset - + off); - - elf_m68k_install_rela (output_bfd, srela, &outrel); + srela = bfd_get_section_by_name (dynobj, ".rela.got"); + BFD_ASSERT (srela != NULL); } - else if (elf_m68k_reloc_got_type (r_type) - == R_68K_TLS_GD32) - { - /* If we don't know the module number, create - a relocation for it. */ - outrel.r_info = ELF32_R_INFO (0, R_68K_TLS_DTPMOD32); - outrel.r_addend = 0; - outrel.r_offset = (sgot->output_section->vma - + sgot->output_offset - + off); - - elf_m68k_install_rela (output_bfd, srela, &outrel); - - bfd_put_32 (output_bfd, (relocation - - dtpoff_base (info)), - sgot->contents + off + 4); - } - else if (elf_m68k_reloc_got_type (r_type) - == R_68K_TLS_IE32) - { - outrel.r_info = ELF32_R_INFO (0, R_68K_TLS_TPREL32); - outrel.r_addend = relocation - dtpoff_base (info); - outrel.r_offset = (sgot->output_section->vma - + sgot->output_offset - + off); - elf_m68k_install_rela (output_bfd, srela, &outrel); - } - else - BFD_ASSERT (FALSE); - - bfd_put_32 (output_bfd, outrel.r_addend, - sgot->contents + off); + elf_m68k_init_got_entry_local_shared (info, + output_bfd, + r_type, + sgot, + off, + relocation, + srela); *off_ptr |= 1; } else /* h == NULL && !info->shared */ { - if (elf_m68k_reloc_got_type (r_type) == R_68K_GOT32O) - bfd_put_32 (output_bfd, relocation, - sgot->contents + off); - else if (elf_m68k_reloc_got_type (r_type) - == R_68K_TLS_LDM32) - /* If this is a static link, put the number of the - only module in the GOT slot. */ - bfd_put_32 (output_bfd, 1, sgot->contents + off); - else if (elf_m68k_reloc_got_type (r_type) - == R_68K_TLS_GD32) - { - /* If we are not emitting relocations for a - general dynamic reference, then we must be in a - static link or an executable link with the - symbol binding locally. Mark it as belonging - to module 1, the executable. */ - bfd_put_32 (output_bfd, 1, sgot->contents + off); - bfd_put_32 (output_bfd, (relocation - - dtpoff_base (info)), - sgot->contents + off + 4); - } - else if (elf_m68k_reloc_got_type (r_type) - == R_68K_TLS_IE32) - bfd_put_32 (output_bfd, tpoff (info, relocation), - sgot->contents + off); - else - BFD_ASSERT (FALSE); + elf_m68k_init_got_entry_static (info, + output_bfd, + r_type, + sgot, + off, + relocation); *off_ptr |= 1; } @@ -3839,7 +3944,6 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, } /* This relocation does not use the addend. */ - BFD_ASSERT (rel->r_addend == 0); rel->r_addend = 0; } else @@ -3867,7 +3971,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, return FALSE; } else - relocation = tpoff (info, relocation); + relocation -= tpoff_base (info); break; @@ -4266,15 +4370,12 @@ elf_m68k_finish_dynamic_symbol (output_bfd, info, h, sym) while (got_entry != NULL) { - Elf_Internal_Rela rela; + enum elf_m68k_reloc_type r_type; bfd_vma got_entry_offset; + r_type = got_entry->key_.type; got_entry_offset = got_entry->u.s2.offset &~ (bfd_vma) 1; - rela.r_offset = (sgot->output_section->vma - + sgot->output_offset - + got_entry_offset); - /* If this is a -Bsymbolic link, and the symbol is defined locally, we just want to emit a RELATIVE reloc. Likewise if the symbol was forced to be local because of a version file. @@ -4283,33 +4384,43 @@ elf_m68k_finish_dynamic_symbol (output_bfd, info, h, sym) if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h)) { - rela.r_addend = bfd_get_signed_32 (output_bfd, - (sgot->contents - + got_entry_offset)); + bfd_vma relocation; - switch (elf_m68k_reloc_got_type (got_entry->key_.type)) + relocation = bfd_get_signed_32 (output_bfd, + (sgot->contents + + got_entry_offset)); + + /* Undo TP bias. */ + switch (elf_m68k_reloc_got_type (r_type)) { case R_68K_GOT32O: - rela.r_info = ELF32_R_INFO (0, R_68K_RELATIVE); + case R_68K_TLS_LDM32: break; case R_68K_TLS_GD32: - rela.r_info = ELF32_R_INFO (0, R_68K_TLS_DTPMOD32); + relocation += dtpoff_base (info); break; case R_68K_TLS_IE32: - rela.r_info = ELF32_R_INFO (0, R_68K_TLS_TPREL32); + relocation += tpoff_base (info); break; default: BFD_ASSERT (FALSE); - break; } - elf_m68k_install_rela (output_bfd, srela, &rela); + elf_m68k_init_got_entry_local_shared (info, + output_bfd, + r_type, + sgot, + got_entry_offset, + relocation, + srela); } else { + Elf_Internal_Rela rela; + /* Put zeros to GOT slots that will be initialized at run-time. */ { @@ -4323,8 +4434,11 @@ elf_m68k_finish_dynamic_symbol (output_bfd, info, h, sym) } rela.r_addend = 0; + rela.r_offset = (sgot->output_section->vma + + sgot->output_offset + + got_entry_offset); - switch (elf_m68k_reloc_got_type (got_entry->key_.type)) + switch (elf_m68k_reloc_got_type (r_type)) { case R_68K_GOT32O: rela.r_info = ELF32_R_INFO (h->dynindx, R_68K_GLOB_DAT); @@ -4711,6 +4825,7 @@ elf_m68k_plt_sym_val (bfd_vma i, const asection *plt, elf_m68k_adjust_dynamic_symbol #define elf_backend_size_dynamic_sections \ elf_m68k_size_dynamic_sections +#define elf_backend_final_write_processing elf_m68k_final_write_processing #define elf_backend_init_index_section _bfd_elf_init_1_index_section #define elf_backend_relocate_section elf_m68k_relocate_section #define elf_backend_finish_dynamic_symbol \ diff --git a/cegcc/src/binutils/bfd/elf32-m88k.c b/cegcc/src/binutils/bfd/elf32-m88k.c index b3cf3b46e..d6c02ffd2 100644 --- a/cegcc/src/binutils/bfd/elf32-m88k.c +++ b/cegcc/src/binutils/bfd/elf32-m88k.c @@ -1,5 +1,5 @@ /* Motorola 88k-specific support for 32-bit ELF - Copyright 1993, 1995, 1999, 2007 Free Software Foundation, Inc. + Copyright 1993, 1995, 1999, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elf32-mep.c b/cegcc/src/binutils/bfd/elf32-mep.c index 4e96a788c..1993b0339 100644 --- a/cegcc/src/binutils/bfd/elf32-mep.c +++ b/cegcc/src/binutils/bfd/elf32-mep.c @@ -1,5 +1,5 @@ /* MeP-specific support for 32-bit ELF. - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -731,6 +731,7 @@ elf32_mep_machine (bfd * abfd) case EF_MEP_CPU_C2: return bfd_mach_mep; case EF_MEP_CPU_C3: return bfd_mach_mep; case EF_MEP_CPU_C4: return bfd_mach_mep; + case EF_MEP_CPU_C5: return bfd_mach_mep_c5; case EF_MEP_CPU_H1: return bfd_mach_mep_h1; } diff --git a/cegcc/src/binutils/bfd/elf32-mips.c b/cegcc/src/binutils/bfd/elf32-mips.c index 6c09ce5c4..c987ff9b2 100644 --- a/cegcc/src/binutils/bfd/elf32-mips.c +++ b/cegcc/src/binutils/bfd/elf32-mips.c @@ -1,6 +1,6 @@ /* MIPS-specific support for 32-bit ELF Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Most of the information added by Ian Lance Taylor, Cygnus Support, . @@ -1005,7 +1005,7 @@ mips_elf_final_gp (bfd *output_bfd, asymbol *symbol, bfd_boolean relocatable, if (relocatable) { /* Make up a value. */ - *pgp = symbol->section->output_section->vma + 0x4000; + *pgp = symbol->section->output_section->vma /*+ 0x4000*/; _bfd_set_gp_value (output_bfd, *pgp); } else if (!mips_elf_assign_gp (output_bfd, pgp)) @@ -1261,6 +1261,7 @@ static const struct elf_reloc_map mips_reloc_map[] = { BFD_RELOC_MIPS_GOT_PAGE, R_MIPS_GOT_PAGE }, { BFD_RELOC_MIPS_GOT_OFST, R_MIPS_GOT_OFST }, { BFD_RELOC_MIPS_GOT_DISP, R_MIPS_GOT_DISP }, + { BFD_RELOC_MIPS_JALR, R_MIPS_JALR }, { BFD_RELOC_MIPS_TLS_DTPMOD32, R_MIPS_TLS_DTPMOD32 }, { BFD_RELOC_MIPS_TLS_DTPREL32, R_MIPS_TLS_DTPREL32 }, { BFD_RELOC_MIPS_TLS_DTPMOD64, R_MIPS_TLS_DTPMOD64 }, @@ -1449,7 +1450,7 @@ mips_elf_sym_is_global (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym) if (SGI_COMPAT (abfd)) return (sym->flags & BSF_SECTION_SYM) == 0; else - return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0 + return ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0 || bfd_is_und_section (bfd_get_section (sym)) || bfd_is_com_section (bfd_get_section (sym))); } diff --git a/cegcc/src/binutils/bfd/elf32-ppc.c b/cegcc/src/binutils/bfd/elf32-ppc.c index b04bea43e..95058a233 100644 --- a/cegcc/src/binutils/bfd/elf32-ppc.c +++ b/cegcc/src/binutils/bfd/elf32-ppc.c @@ -1,6 +1,6 @@ /* PowerPC-specific support for 32-bit ELF Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -61,6 +61,7 @@ static bfd_reloc_status_type ppc_elf_unhandled_reloc /* For new-style .glink and .plt. */ #define GLINK_PLTRESOLVE 16*4 #define GLINK_ENTRY_SIZE 4*4 +#define TLS_GET_ADDR_GLINK_SIZE 12*4 /* VxWorks uses its own plt layout, filled in by the static linker. */ @@ -135,17 +136,24 @@ static const bfd_vma ppc_elf_vxworks_pic_plt0_entry #define ADDIS_12_12 0x3d8c0000 #define ADDI_11_11 0x396b0000 #define ADD_0_11_11 0x7c0b5a14 +#define ADD_3_12_2 0x7c6c1214 #define ADD_11_0_11 0x7d605a14 #define B 0x48000000 #define BCL_20_31 0x429f0005 #define BCTR 0x4e800420 +#define BEQLR 0x4d820020 +#define CMPWI_11_0 0x2c0b0000 #define LIS_11 0x3d600000 #define LIS_12 0x3d800000 #define LWZU_0_12 0x840c0000 #define LWZ_0_12 0x800c0000 +#define LWZ_11_3 0x81630000 #define LWZ_11_11 0x816b0000 #define LWZ_11_30 0x817e0000 +#define LWZ_12_3 0x81830000 #define LWZ_12_12 0x818c0000 +#define MR_0_3 0x7c601b78 +#define MR_3_0 0x7c030378 #define MFLR_0 0x7c0802a6 #define MFLR_12 0x7d8802a6 #define MTCTR_0 0x7c0903a6 @@ -753,7 +761,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = { 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ - /* Marker reloc for TLS. */ + /* Marker relocs for TLS. */ HOWTO (R_PPC_TLS, 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -768,6 +776,34 @@ static reloc_howto_type ppc_elf_howto_raw[] = { 0, /* dst_mask */ FALSE), /* pcrel_offset */ + HOWTO (R_PPC_TLSGD, + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_PPC_TLSGD", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + FALSE), /* pcrel_offset */ + + HOWTO (R_PPC_TLSLD, + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_PPC_TLSLD", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + FALSE), /* pcrel_offset */ + /* Computes the load module index of the load module that contains the definition of its TLS sym. */ HOWTO (R_PPC_DTPMOD32, @@ -1272,7 +1308,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = { 16, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_PPC_EMB_SDAI16", /* name */ FALSE, /* partial_inplace */ @@ -1289,7 +1325,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = { 16, /* bitsize */ FALSE, /* pc_relative */ 0, /* bitpos */ - complain_overflow_bitfield, /* complain_on_overflow */ + complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_PPC_EMB_SDA2I16", /* name */ FALSE, /* partial_inplace */ @@ -1354,6 +1390,20 @@ static reloc_howto_type ppc_elf_howto_raw[] = { 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ + HOWTO (R_PPC_IRELATIVE, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_PPC_IRELATIVE", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0xffffffff, /* dst_mask */ + FALSE), /* pcrel_offset */ + /* A 16 bit relative relocation. */ HOWTO (R_PPC_REL16, /* type */ 0, /* rightshift */ @@ -1531,6 +1581,8 @@ ppc_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, case BFD_RELOC_CTOR: r = R_PPC_ADDR32; break; case BFD_RELOC_PPC_TOC16: r = R_PPC_TOC16; break; case BFD_RELOC_PPC_TLS: r = R_PPC_TLS; break; + case BFD_RELOC_PPC_TLSGD: r = R_PPC_TLSGD; break; + case BFD_RELOC_PPC_TLSLD: r = R_PPC_TLSLD; break; case BFD_RELOC_PPC_DTPMOD: r = R_PPC_DTPMOD32; break; case BFD_RELOC_PPC_TPREL16: r = R_PPC_TPREL16; break; case BFD_RELOC_PPC_TPREL16_LO: r = R_PPC_TPREL16_LO; break; @@ -2298,26 +2350,17 @@ ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED) } static bfd_boolean -is_pic_glink_stub (bfd *abfd, asection *glink, bfd_vma off) +is_nonpic_glink_stub (bfd *abfd, asection *glink, bfd_vma off) { - bfd_byte buf[16]; - unsigned int insn; + bfd_byte buf[GLINK_ENTRY_SIZE]; - if (!bfd_get_section_contents (abfd, glink, buf, off, 16)) + if (!bfd_get_section_contents (abfd, glink, buf, off, GLINK_ENTRY_SIZE)) return FALSE; - insn = bfd_get_32 (abfd, buf); - if ((insn & 0xffff0000) == LWZ_11_30 - && bfd_get_32 (abfd, buf + 4) == MTCTR_11 - && bfd_get_32 (abfd, buf + 8) == BCTR) - return TRUE; - - if ((insn & 0xffff0000) == ADDIS_11_30 - && (bfd_get_32 (abfd, buf + 4) & 0xffff0000) == LWZ_11_11 - && bfd_get_32 (abfd, buf + 8) == MTCTR_11 - && bfd_get_32 (abfd, buf + 12) == BCTR) - return TRUE; - return FALSE; + return ((bfd_get_32 (abfd, buf + 0) & 0xffff0000) == LIS_11 + && (bfd_get_32 (abfd, buf + 4) & 0xffff0000) == LWZ_11_11 + && bfd_get_32 (abfd, buf + 8) == MTCTR_11 + && bfd_get_32 (abfd, buf + 12) == BCTR); } static bfd_boolean @@ -2454,10 +2497,8 @@ ppc_elf_get_synthetic_symtab (bfd *abfd, long symcount, asymbol **syms, multiple stubs for each plt entry. If that is the case then there is no way to associate stubs with their plt entries short of figuring out the GOT pointer value used in the stub. */ - if (!bfd_get_section_contents (abfd, glink, buf, - stub_vma - glink->vma, 4) - || ((bfd_get_32 (abfd, buf) & 0xffff0000) != LIS_11 - && is_pic_glink_stub (abfd, glink, stub_vma - glink->vma - 16))) + if (!is_nonpic_glink_stub (abfd, glink, + glink_vma - GLINK_ENTRY_SIZE - glink->vma)) return 0; slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table; @@ -2467,7 +2508,11 @@ ppc_elf_get_synthetic_symtab (bfd *abfd, long symcount, asymbol **syms, size = count * sizeof (asymbol); p = relplt->relocation; for (i = 0; i < count; i++, p++) - size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt"); + { + size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt"); + if (p->addend != 0) + size += sizeof ("+0x") - 1 + 8; + } size += sizeof (asymbol) + sizeof ("__glink"); @@ -2497,6 +2542,13 @@ ppc_elf_get_synthetic_symtab (bfd *abfd, long symcount, asymbol **syms, len = strlen ((*p->sym_ptr_ptr)->name); memcpy (names, (*p->sym_ptr_ptr)->name, len); names += len; + if (p->addend != 0) + { + memcpy (names, "+0x", sizeof ("+0x") - 1); + names += sizeof ("+0x") - 1; + bfd_sprintf_vma (abfd, names, p->addend); + names += strlen (names); + } memcpy (names, "@plt", sizeof ("@plt")); names += sizeof ("@plt"); ++s; @@ -2561,15 +2613,16 @@ struct ppc_elf_dyn_relocs }; /* Track PLT entries needed for a given symbol. We might need more - than one glink entry per symbol. */ + than one glink entry per symbol when generating a pic binary. */ struct plt_entry { struct plt_entry *next; /* -fPIC uses multiple GOT sections, one per file, called ".got2". This field stores the offset into .got2 used to initialise the - GOT pointer reg. It will always be at least 32768 (and for - current gcc this is the only offset used). */ + GOT pointer reg. It will always be at least 32768. (Current + gcc always uses an offset of 32768, but ld -r will pack .got2 + sections together resulting in larger offsets). */ bfd_vma addend; /* The .got2 section. */ @@ -2646,6 +2699,7 @@ struct ppc_elf_link_hash_entry #define TLS_DTPREL 8 /* DTPREL reloc, => LD. */ #define TLS_TLS 16 /* Any TLS reloc. */ #define TLS_TPRELGD 32 /* TPREL reloc resulting from GD->IE. */ +#define PLT_IFUNC 64 /* STT_GNU_IFUNC. */ char tls_mask; /* Nonzero if we have seen a small data relocation referring to this @@ -2667,6 +2721,8 @@ struct ppc_elf_link_hash_table asection *glink; asection *plt; asection *relplt; + asection *iplt; + asection *reliplt; asection *dynbss; asection *relbss; asection *dynsbss; @@ -2692,7 +2748,7 @@ struct ppc_elf_link_hash_table bfd_vma offset; } tlsld_got; - /* Offset of PltResolve function in glink. */ + /* Offset of branch table to PltResolve function in glink. */ bfd_vma glink_pltresolve; /* Size of reserved GOT entries. */ @@ -2706,6 +2762,9 @@ struct ppc_elf_link_hash_table /* Set if we should emit symbols for stubs. */ unsigned int emit_stub_syms:1; + /* Set if __tls_get_addr optimization should not be done. */ + unsigned int no_tls_get_addr_opt:1; + /* True if the target system is VxWorks. */ unsigned int is_vxworks:1; @@ -2716,8 +2775,8 @@ struct ppc_elf_link_hash_table /* The size of the first PLT entry. */ int plt_initial_entry_size; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; }; /* Get the PPC ELF linker hash table from a link_info structure. */ @@ -2826,13 +2885,42 @@ ppc_elf_create_got (bfd *abfd, struct bfd_link_info *info) return FALSE; } - flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY - | SEC_LINKER_CREATED | SEC_READONLY); - htab->relgot = bfd_make_section_with_flags (abfd, ".rela.got", flags); - if (!htab->relgot - || ! bfd_set_section_alignment (abfd, htab->relgot, 2)) + htab->relgot = bfd_get_section_by_name (abfd, ".rela.got"); + if (!htab->relgot) + abort (); + + return TRUE; +} + +static bfd_boolean +ppc_elf_create_glink (bfd *abfd, struct bfd_link_info *info) +{ + struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info); + asection *s; + flagword flags; + + flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY | SEC_HAS_CONTENTS + | SEC_IN_MEMORY | SEC_LINKER_CREATED); + s = bfd_make_section_anyway_with_flags (abfd, ".glink", flags); + htab->glink = s; + if (s == NULL + || !bfd_set_section_alignment (abfd, s, 4)) + return FALSE; + + flags = SEC_ALLOC | SEC_LINKER_CREATED; + s = bfd_make_section_anyway_with_flags (abfd, ".iplt", flags); + htab->iplt = s; + if (s == NULL + || !bfd_set_section_alignment (abfd, s, 4)) return FALSE; + flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS + | SEC_IN_MEMORY | SEC_LINKER_CREATED); + s = bfd_make_section_with_flags (abfd, ".rela.iplt", flags); + htab->reliplt = s; + if (s == NULL + || ! bfd_set_section_alignment (abfd, s, 2)) + return FALSE; return TRUE; } @@ -2856,13 +2944,8 @@ ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (!_bfd_elf_create_dynamic_sections (abfd, info)) return FALSE; - flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS - | SEC_IN_MEMORY | SEC_LINKER_CREATED); - - s = bfd_make_section_anyway_with_flags (abfd, ".glink", flags | SEC_CODE); - htab->glink = s; - if (s == NULL - || !bfd_set_section_alignment (abfd, s, 4)) + if (htab->glink == NULL + && !ppc_elf_create_glink (abfd, info)) return FALSE; htab->dynbss = bfd_get_section_by_name (abfd, ".dynbss"); @@ -2875,6 +2958,8 @@ ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (! info->shared) { htab->relbss = bfd_get_section_by_name (abfd, ".rela.bss"); + flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS + | SEC_IN_MEMORY | SEC_LINKER_CREATED); s = bfd_make_section_with_flags (abfd, ".rela.sbss", flags); htab->relsbss = s; if (s == NULL @@ -3048,13 +3133,17 @@ ppc_elf_add_symbol_hook (bfd *abfd, *valp = sym->st_size; } + if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + return TRUE; } static bfd_boolean -create_sdata_sym (struct ppc_elf_link_hash_table *htab, - elf_linker_section_t *lsect) +create_sdata_sym (struct bfd_link_info *info, elf_linker_section_t *lsect) { + struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info); + lsect->sym = elf_link_hash_lookup (&htab->elf, lsect->sym_name, TRUE, FALSE, TRUE); if (lsect->sym == NULL) @@ -3062,6 +3151,7 @@ create_sdata_sym (struct ppc_elf_link_hash_table *htab, if (lsect->sym->root.type == bfd_link_hash_new) lsect->sym->non_elf = 0; lsect->sym->ref_regular = 1; + _bfd_elf_link_hash_hide_symbol (info, lsect->sym, TRUE); return TRUE; } @@ -3091,7 +3181,7 @@ ppc_elf_create_linker_section (bfd *abfd, return FALSE; lsect->section = s; - return create_sdata_sym (htab, lsect); + return create_sdata_sym (info, lsect); } /* Find a linker generated pointer with a given addend and type. */ @@ -3196,41 +3286,44 @@ elf_create_pointer_linker_section (bfd *abfd, return TRUE; } -static bfd_boolean +static struct plt_entry ** update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, unsigned long r_symndx, int tls_type) { bfd_signed_vma *local_got_refcounts = elf_local_got_refcounts (abfd); + struct plt_entry **local_plt; char *local_got_tls_masks; if (local_got_refcounts == NULL) { bfd_size_type size = symtab_hdr->sh_info; - size *= sizeof (*local_got_refcounts) + sizeof (*local_got_tls_masks); + size *= (sizeof (*local_got_refcounts) + + sizeof (*local_plt) + + sizeof (*local_got_tls_masks)); local_got_refcounts = bfd_zalloc (abfd, size); if (local_got_refcounts == NULL) - return FALSE; + return NULL; elf_local_got_refcounts (abfd) = local_got_refcounts; } - local_got_refcounts[r_symndx] += 1; - local_got_tls_masks = (char *) (local_got_refcounts + symtab_hdr->sh_info); + local_plt = (struct plt_entry **) (local_got_refcounts + symtab_hdr->sh_info); + local_got_tls_masks = (char *) (local_plt + symtab_hdr->sh_info); local_got_tls_masks[r_symndx] |= tls_type; - return TRUE; + if (tls_type != PLT_IFUNC) + local_got_refcounts[r_symndx] += 1; + return local_plt + r_symndx; } static bfd_boolean -update_plt_info (bfd *abfd, struct elf_link_hash_entry *h, +update_plt_info (bfd *abfd, struct plt_entry **plist, asection *sec, bfd_vma addend) { struct plt_entry *ent; - if (addend < 32768) - sec = NULL; - for (ent = h->plt.plist; ent != NULL; ent = ent->next) + for (ent = *plist; ent != NULL; ent = ent->next) if (ent->sec == sec && ent->addend == addend) break; if (ent == NULL) @@ -3239,29 +3332,44 @@ update_plt_info (bfd *abfd, struct elf_link_hash_entry *h, ent = bfd_alloc (abfd, amt); if (ent == NULL) return FALSE; - ent->next = h->plt.plist; + ent->next = *plist; ent->sec = sec; ent->addend = addend; ent->plt.refcount = 0; - h->plt.plist = ent; + *plist = ent; } ent->plt.refcount += 1; return TRUE; } static struct plt_entry * -find_plt_ent (struct elf_link_hash_entry *h, asection *sec, bfd_vma addend) +find_plt_ent (struct plt_entry **plist, asection *sec, bfd_vma addend) { struct plt_entry *ent; if (addend < 32768) sec = NULL; - for (ent = h->plt.plist; ent != NULL; ent = ent->next) + for (ent = *plist; ent != NULL; ent = ent->next) if (ent->sec == sec && ent->addend == addend) break; return ent; } +static bfd_boolean +is_branch_reloc (enum elf_ppc_reloc_type r_type) +{ + return (r_type == R_PPC_PLTREL24 + || r_type == R_PPC_LOCAL24PC + || r_type == R_PPC_REL24 + || r_type == R_PPC_REL14 + || r_type == R_PPC_REL14_BRTAKEN + || r_type == R_PPC_REL14_BRNTAKEN + || r_type == R_PPC_ADDR24 + || r_type == R_PPC_ADDR14 + || r_type == R_PPC_ADDR14_BRTAKEN + || r_type == R_PPC_ADDR14_BRNTAKEN); +} + static void bad_shared_reloc (bfd *abfd, enum elf_ppc_reloc_type r_type) { @@ -3288,6 +3396,7 @@ ppc_elf_check_relocs (bfd *abfd, const Elf_Internal_Rela *rel; const Elf_Internal_Rela *rel_end; asection *got2, *sreloc; + struct elf_link_hash_entry *tga; if (info->relocatable) return TRUE; @@ -3313,6 +3422,15 @@ ppc_elf_check_relocs (bfd *abfd, ppc_elf_howto_init (); htab = ppc_elf_hash_table (info); + if (htab->glink == NULL) + { + if (htab->elf.dynobj == NULL) + htab->elf.dynobj = abfd; + if (!ppc_elf_create_glink (htab->elf.dynobj, info)) + return FALSE; + } + tga = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", + FALSE, FALSE, TRUE); symtab_hdr = &elf_symtab_hdr (abfd); sym_hashes = elf_sym_hashes (abfd); got2 = bfd_get_section_by_name (abfd, ".got2"); @@ -3324,7 +3442,8 @@ ppc_elf_check_relocs (bfd *abfd, unsigned long r_symndx; enum elf_ppc_reloc_type r_type; struct elf_link_hash_entry *h; - int tls_type = 0; + int tls_type; + struct plt_entry **ifunc; r_symndx = ELF32_R_SYM (rel->r_info); if (r_symndx < symtab_hdr->sh_info) @@ -3351,9 +3470,75 @@ ppc_elf_check_relocs (bfd *abfd, BFD_ASSERT (h == htab->elf.hgot); } + tls_type = 0; + ifunc = NULL; r_type = ELF32_R_TYPE (rel->r_info); + if (!htab->is_vxworks) + { + if (h != NULL) + { + if (h->type == STT_GNU_IFUNC) + ifunc = &h->plt.plist; + } + else + { + Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; + + if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC + && (!info->shared + || is_branch_reloc (r_type))) + { + bfd_vma addend; + + ifunc = update_local_sym_info (abfd, symtab_hdr, r_symndx, + PLT_IFUNC); + if (ifunc == NULL) + return FALSE; + + /* STT_GNU_IFUNC symbols must have a PLT entry; + In a non-pie executable even when there are + no plt calls. */ + addend = 0; + if (r_type == R_PPC_PLTREL24) + { + ppc_elf_tdata (abfd)->makes_plt_call = 1; + if (info->shared) + addend = rel->r_addend; + } + if (!update_plt_info (abfd, ifunc, + addend < 32768 ? NULL : got2, addend)) + return FALSE; + } + } + } + + if (!htab->is_vxworks + && is_branch_reloc (r_type) + && h != NULL + && h == tga) + { + if (rel != relocs + && (ELF32_R_TYPE (rel[-1].r_info) == R_PPC_TLSGD + || ELF32_R_TYPE (rel[-1].r_info) == R_PPC_TLSLD)) + /* We have a new-style __tls_get_addr call with a marker + reloc. */ + ; + else + /* Mark this section as having an old-style call. */ + sec->has_tls_get_addr_call = 1; + } + switch (r_type) { + case R_PPC_TLSGD: + case R_PPC_TLSLD: + /* These special tls relocs tie a call to __tls_get_addr with + its parameter symbol. */ + break; + case R_PPC_GOT_TLSLD16: case R_PPC_GOT_TLSLD16_LO: case R_PPC_GOT_TLSLD16_HI: @@ -3408,6 +3593,14 @@ ppc_elf_check_relocs (bfd *abfd, /* This is a global offset table entry for a local symbol. */ if (!update_local_sym_info (abfd, symtab_hdr, r_symndx, tls_type)) return FALSE; + + /* We may also need a plt entry if the symbol turns out to be + an ifunc. */ + if (h != NULL && !info->shared) + { + if (!update_plt_info (abfd, &h->plt.plist, NULL, 0)) + return FALSE; + } break; /* Indirect .sdata relocation. */ @@ -3453,13 +3646,8 @@ ppc_elf_check_relocs (bfd *abfd, break; case R_PPC_SDAREL16: - if (info->shared) - { - bad_shared_reloc (abfd, r_type); - return FALSE; - } if (htab->sdata[0].sym == NULL - && !create_sdata_sym (htab, &htab->sdata[0])) + && !create_sdata_sym (info, &htab->sdata[0])) return FALSE; if (h != NULL) { @@ -3475,7 +3663,7 @@ ppc_elf_check_relocs (bfd *abfd, return FALSE; } if (htab->sdata[1].sym == NULL - && !create_sdata_sym (htab, &htab->sdata[1])) + && !create_sdata_sym (info, &htab->sdata[1])) return FALSE; if (h != NULL) { @@ -3492,10 +3680,10 @@ ppc_elf_check_relocs (bfd *abfd, return FALSE; } if (htab->sdata[0].sym == NULL - && !create_sdata_sym (htab, &htab->sdata[0])) + && !create_sdata_sym (info, &htab->sdata[0])) return FALSE; if (htab->sdata[1].sym == NULL - && !create_sdata_sym (htab, &htab->sdata[1])) + && !create_sdata_sym (info, &htab->sdata[1])) return FALSE; if (h != NULL) { @@ -3518,8 +3706,11 @@ ppc_elf_check_relocs (bfd *abfd, h->non_got_ref = TRUE; break; - case R_PPC_PLT32: case R_PPC_PLTREL24: + if (h == NULL) + break; + /* Fall through */ + case R_PPC_PLT32: case R_PPC_PLTREL32: case R_PPC_PLT16_LO: case R_PPC_PLT16_HI: @@ -3553,10 +3744,12 @@ ppc_elf_check_relocs (bfd *abfd, if (r_type == R_PPC_PLTREL24) { ppc_elf_tdata (abfd)->makes_plt_call = 1; - addend = rel->r_addend; + if (info->shared) + addend = rel->r_addend; } h->needs_plt = 1; - if (!update_plt_info (abfd, h, got2, addend)) + if (!update_plt_info (abfd, &h->plt.plist, + addend < 32768 ? NULL : got2, addend)) return FALSE; } break; @@ -3587,6 +3780,10 @@ ppc_elf_check_relocs (bfd *abfd, case R_PPC_EMB_MRKREF: case R_PPC_NONE: case R_PPC_max: + case R_PPC_RELAX32: + case R_PPC_RELAX32PC: + case R_PPC_RELAX32_PLT: + case R_PPC_RELAX32PC_PLT: break; /* These should only appear in dynamic objects. */ @@ -3594,6 +3791,7 @@ ppc_elf_check_relocs (bfd *abfd, case R_PPC_GLOB_DAT: case R_PPC_JMP_SLOT: case R_PPC_RELATIVE: + case R_PPC_IRELATIVE: break; /* These aren't handled yet. We'll report an error later. */ @@ -3607,7 +3805,7 @@ ppc_elf_check_relocs (bfd *abfd, /* This refers only to functions defined in the shared library. */ case R_PPC_LOCAL24PC: - if (h && h == htab->elf.hgot && htab->plt_type == PLT_UNSET) + if (h != NULL && h == htab->elf.hgot && htab->plt_type == PLT_UNSET) { htab->plt_type = PLT_OLD; htab->old_bfd = abfd; @@ -3649,7 +3847,7 @@ ppc_elf_check_relocs (bfd *abfd, if (h == NULL && got2 != NULL && (sec->flags & SEC_CODE) != 0 - && (info->shared || info->pie) + && info->shared && htab->plt_type == PLT_UNSET) { /* Old -fPIC gcc code has .long LCTOC1-LCFx just before @@ -3659,9 +3857,14 @@ ppc_elf_check_relocs (bfd *abfd, reliably deduce the GOT pointer value needed for PLT call stubs. */ asection *s; + Elf_Internal_Sym *isym; - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec, - r_symndx); + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; + + s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == got2) { htab->plt_type = PLT_OLD; @@ -3683,7 +3886,7 @@ ppc_elf_check_relocs (bfd *abfd, { /* We may need a plt entry if the symbol turns out to be a function defined in a dynamic object. */ - if (!update_plt_info (abfd, h, NULL, 0)) + if (!update_plt_info (abfd, &h->plt.plist, NULL, 0)) return FALSE; /* We may need a copy reloc too. */ @@ -3717,7 +3920,8 @@ ppc_elf_check_relocs (bfd *abfd, { /* We may need a plt entry if the symbol turns out to be a function defined in a dynamic object. */ - if (!update_plt_info (abfd, h, NULL, 0)) + h->needs_plt = 1; + if (!update_plt_info (abfd, &h->plt.plist, NULL, 0)) return FALSE; break; } @@ -3789,15 +3993,19 @@ ppc_elf_check_relocs (bfd *abfd, /* Track dynamic relocs needed for local syms too. We really need local syms available to do this easily. Oh well. */ - asection *s; void *vpp; + Elf_Internal_Sym *isym; - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (s == NULL) + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; + vpp = &elf_section_data (s)->local_dynrel; head = (struct ppc_elf_dyn_relocs **) vpp; } @@ -4080,6 +4288,8 @@ ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED, htab = ppc_elf_hash_table (info); + htab->emit_stub_syms = emit_stub_syms; + if (htab->plt_type == PLT_UNSET) { if (plt_style == PLT_OLD) @@ -4113,8 +4323,6 @@ ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED, if (htab->plt_type == PLT_OLD && plt_style == PLT_NEW) info->callbacks->info (_("Using bss-plt due to %B"), htab->old_bfd); - htab->emit_stub_syms = emit_stub_syms; - BFD_ASSERT (htab->plt_type != PLT_VXWORKS); if (htab->plt_type == PLT_NEW) @@ -4222,6 +4430,31 @@ ppc_elf_gc_sweep_hook (bfd *abfd, } r_type = ELF32_R_TYPE (rel->r_info); + if (!htab->is_vxworks + && h == NULL + && local_got_refcounts != NULL + && (!info->shared + || is_branch_reloc (r_type))) + { + struct plt_entry **local_plt = (struct plt_entry **) + (local_got_refcounts + symtab_hdr->sh_info); + char *local_got_tls_masks = (char *) + (local_plt + symtab_hdr->sh_info); + if ((local_got_tls_masks[r_symndx] & PLT_IFUNC) != 0) + { + struct plt_entry **ifunc = local_plt + r_symndx; + bfd_vma addend = 0; + struct plt_entry *ent; + + if (r_type == R_PPC_PLTREL24 && info->shared) + addend = rel->r_addend; + ent = find_plt_ent (ifunc, got2, addend); + if (ent->plt.refcount > 0) + ent->plt.refcount -= 1; + continue; + } + } + switch (r_type) { case R_PPC_GOT_TLSLD16: @@ -4248,6 +4481,14 @@ ppc_elf_gc_sweep_hook (bfd *abfd, { if (h->got.refcount > 0) h->got.refcount--; + if (!info->shared) + { + struct plt_entry *ent; + + ent = find_plt_ent (&h->plt.plist, NULL, 0); + if (ent->plt.refcount > 0) + ent->plt.refcount -= 1; + } } else if (local_got_refcounts != NULL) { @@ -4287,8 +4528,12 @@ ppc_elf_gc_sweep_hook (bfd *abfd, case R_PPC_PLT16_HA: if (h != NULL) { - bfd_vma addend = r_type == R_PPC_PLTREL24 ? rel->r_addend : 0; - struct plt_entry *ent = find_plt_ent (h, got2, addend); + bfd_vma addend = 0; + struct plt_entry *ent; + + if (r_type == R_PPC_PLTREL24 && info->shared) + addend = rel->r_addend; + ent = find_plt_ent (&h->plt.plist, got2, addend); if (ent->plt.refcount > 0) ent->plt.refcount -= 1; } @@ -4301,14 +4546,66 @@ ppc_elf_gc_sweep_hook (bfd *abfd, return TRUE; } -/* Set htab->tls_get_addr and call the generic ELF tls_setup function. */ +/* Set plt output section type, htab->tls_get_addr, and call the + generic ELF tls_setup function. */ asection * -ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) +ppc_elf_tls_setup (bfd *obfd, + struct bfd_link_info *info, + int no_tls_get_addr_opt) { struct ppc_elf_link_hash_table *htab; htab = ppc_elf_hash_table (info); + htab->tls_get_addr = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", + FALSE, FALSE, TRUE); + if (!no_tls_get_addr_opt) + { + struct elf_link_hash_entry *opt, *tga; + opt = elf_link_hash_lookup (&htab->elf, "__tls_get_addr_opt", + FALSE, FALSE, TRUE); + if (opt != NULL + && (opt->root.type == bfd_link_hash_defined + || opt->root.type == bfd_link_hash_defweak)) + { + /* If glibc supports an optimized __tls_get_addr call stub, + signalled by the presence of __tls_get_addr_opt, and we'll + be calling __tls_get_addr via a plt call stub, then + make __tls_get_addr point to __tls_get_addr_opt. */ + tga = htab->tls_get_addr; + if (htab->elf.dynamic_sections_created + && tga != NULL + && (tga->type == STT_FUNC + || tga->needs_plt) + && !(SYMBOL_CALLS_LOCAL (info, tga) + || (ELF_ST_VISIBILITY (tga->other) != STV_DEFAULT + && tga->root.type == bfd_link_hash_undefweak))) + { + struct plt_entry *ent; + ent = find_plt_ent (&tga->plt.plist, NULL, 0); + if (ent != NULL + && ent->plt.refcount > 0) + { + tga->root.type = bfd_link_hash_indirect; + tga->root.u.i.link = &opt->root; + ppc_elf_copy_indirect_symbol (info, opt, tga); + if (opt->dynindx != -1) + { + /* Use __tls_get_addr_opt in dynamic relocations. */ + opt->dynindx = -1; + _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, + opt->dynstr_index); + if (!bfd_elf_link_record_dynamic_symbol (info, opt)) + return FALSE; + } + htab->tls_get_addr = opt; + } + } + } + else + no_tls_get_addr_opt = TRUE; + } + htab->no_tls_get_addr_opt = no_tls_get_addr_opt; if (htab->plt_type == PLT_NEW && htab->plt != NULL && htab->plt->output_section != NULL) @@ -4317,11 +4614,36 @@ ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) elf_section_flags (htab->plt->output_section) = SHF_ALLOC + SHF_WRITE; } - htab->tls_get_addr = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", - FALSE, FALSE, TRUE); return _bfd_elf_tls_setup (obfd, info); } +/* Return TRUE iff REL is a branch reloc with a global symbol matching + HASH. */ + +static bfd_boolean +branch_reloc_hash_match (const bfd *ibfd, + const Elf_Internal_Rela *rel, + const struct elf_link_hash_entry *hash) +{ + Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (ibfd); + enum elf_ppc_reloc_type r_type = ELF32_R_TYPE (rel->r_info); + unsigned int r_symndx = ELF32_R_SYM (rel->r_info); + + if (r_symndx >= symtab_hdr->sh_info && is_branch_reloc (r_type)) + { + struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (ibfd); + struct elf_link_hash_entry *h; + + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h == hash) + return TRUE; + } + return FALSE; +} + /* Run through all the TLS relocs looking for optimization opportunities. */ @@ -4446,38 +4768,14 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, if (pass == 0) { - if (!expecting_tls_get_addr) + if (!expecting_tls_get_addr + || !sec->has_tls_get_addr_call) continue; - if (rel + 1 < relend) - { - enum elf_ppc_reloc_type r_type2; - unsigned long r_symndx2; - struct elf_link_hash_entry *h2; - - /* The next instruction should be a call to - __tls_get_addr. Peek at the reloc to be sure. */ - r_type2 = ELF32_R_TYPE (rel[1].r_info); - r_symndx2 = ELF32_R_SYM (rel[1].r_info); - if (r_symndx2 >= symtab_hdr->sh_info - && (r_type2 == R_PPC_REL14 - || r_type2 == R_PPC_REL14_BRTAKEN - || r_type2 == R_PPC_REL14_BRNTAKEN - || r_type2 == R_PPC_REL24 - || r_type2 == R_PPC_PLTREL24)) - { - struct elf_link_hash_entry **sym_hashes; - - sym_hashes = elf_sym_hashes (ibfd); - h2 = sym_hashes[r_symndx2 - symtab_hdr->sh_info]; - while (h2->root.type == bfd_link_hash_indirect - || h2->root.type == bfd_link_hash_warning) - h2 = ((struct elf_link_hash_entry *) - h2->root.u.i.link); - if (h2 == htab->tls_get_addr) - continue; - } - } + if (rel + 1 < relend + && branch_reloc_hash_match (ibfd, rel + 1, + htab->tls_get_addr)) + continue; /* Uh oh, we didn't find the expected call. We could just mark this symbol to exclude it @@ -4496,6 +4794,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, { Elf_Internal_Sym *sym; bfd_signed_vma *lgot_refs; + struct plt_entry **local_plt; char *lgot_masks; if (locsyms == NULL) @@ -4516,7 +4815,9 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, lgot_refs = elf_local_got_refcounts (ibfd); if (lgot_refs == NULL) abort (); - lgot_masks = (char *) (lgot_refs + symtab_hdr->sh_info); + local_plt = (struct plt_entry **) + (lgot_refs + symtab_hdr->sh_info); + lgot_masks = (char *) (local_plt + symtab_hdr->sh_info); tls_mask = &lgot_masks[r_symndx]; got_count = &lgot_refs[r_symndx]; } @@ -4532,7 +4833,8 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, { struct plt_entry *ent; - ent = find_plt_ent (htab->tls_get_addr, NULL, 0); + ent = find_plt_ent (&htab->tls_get_addr->plt.plist, + NULL, 0); if (ent != NULL && ent->plt.refcount > 0) ent->plt.refcount -= 1; } @@ -4598,6 +4900,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, htab = ppc_elf_hash_table (info); BFD_ASSERT (htab->elf.dynobj != NULL && (h->needs_plt + || h->type == STT_GNU_IFUNC || h->u.weakdef != NULL || (h->def_dynamic && h->ref_regular @@ -4605,6 +4908,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Deal with function syms. */ if (h->type == STT_FUNC + || h->type == STT_GNU_IFUNC || h->needs_plt) { /* Clear procedure linkage table information for any symbol that @@ -4614,9 +4918,10 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (ent->plt.refcount > 0) break; if (ent == NULL - || SYMBOL_CALLS_LOCAL (info, h) - || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT - && h->root.type == bfd_link_hash_undefweak)) + || (h->type != STT_GNU_IFUNC + && (SYMBOL_CALLS_LOCAL (info, h) + || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + && h->root.type == bfd_link_hash_undefweak)))) { /* A PLT entry is not required/allowed when: @@ -4633,8 +4938,10 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, } else { - /* After adjust_dynamic_symbol, non_got_ref set means that - dyn_relocs for this symbol should be discarded. + /* After adjust_dynamic_symbol, non_got_ref set in the + non-shared case means that we have allocated space in + .dynbss for the symbol and thus dyn_relocs for this + symbol should be discarded. If we get here we know we are making a PLT entry for this symbol, and in an executable we'd normally resolve relocations against this symbol to the PLT entry. Allow @@ -4642,6 +4949,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, relocs will not cause text relocation. */ if (!h->ref_regular_nonweak && h->non_got_ref + && h->type != STT_GNU_IFUNC && !htab->is_vxworks && !ppc_elf_hash_entry (h)->has_sda_refs && !readonly_dynrelocs (h)) @@ -4760,7 +5068,7 @@ add_stub_sym (struct plt_entry *ent, const char *stub; struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info); - if (info->shared || info->pie) + if (info->shared) stub = ".plt_pic32."; else stub = ".plt_call32."; @@ -4852,29 +5160,37 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h = (struct elf_link_hash_entry *) h->root.u.i.link; htab = ppc_elf_hash_table (info); - if (htab->elf.dynamic_sections_created) + if (htab->elf.dynamic_sections_created + || h->type == STT_GNU_IFUNC) { struct plt_entry *ent; bfd_boolean doneone = FALSE; bfd_vma plt_offset = 0, glink_offset = 0; + bfd_boolean dyn; for (ent = h->plt.plist; ent != NULL; ent = ent->next) if (ent->plt.refcount > 0) { /* Make sure this symbol is output as a dynamic symbol. */ if (h->dynindx == -1 - && !h->forced_local) + && !h->forced_local + && !h->def_regular + && htab->elf.dynamic_sections_created) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) return FALSE; } + dyn = htab->elf.dynamic_sections_created; if (info->shared - || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h)) + || h->type == STT_GNU_IFUNC + || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)) { asection *s = htab->plt; + if (!dyn || h->dynindx == -1) + s = htab->iplt; - if (htab->plt_type == PLT_NEW) + if (htab->plt_type == PLT_NEW || !dyn || h->dynindx == -1) { if (!doneone) { @@ -4884,10 +5200,13 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) ent->plt.offset = plt_offset; s = htab->glink; - if (!doneone || info->shared || info->pie) + if (!doneone || info->shared) { glink_offset = s->size; s->size += GLINK_ENTRY_SIZE; + if (h == htab->tls_get_addr + && !htab->no_tls_get_addr_opt) + s->size += TLS_GET_ADDR_GLINK_SIZE - GLINK_ENTRY_SIZE; } if (!doneone && !info->shared @@ -4924,8 +5243,9 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) /* If this symbol is not defined in a regular file, and we are not generating a shared - library, then set the symbol to this location - in the .plt. This is required to make + library, then set the symbol to this location + in the .plt. This is to avoid text + relocations, and is required to make function pointers compare as equal between the normal executable and the shared library. */ if (! info->shared @@ -4952,29 +5272,36 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) /* We also need to make an entry in the .rela.plt section. */ if (!doneone) { - htab->relplt->size += sizeof (Elf32_External_Rela); - - if (htab->plt_type == PLT_VXWORKS) + if (!htab->elf.dynamic_sections_created + || h->dynindx == -1) + htab->reliplt->size += sizeof (Elf32_External_Rela); + else { - /* Allocate space for the unloaded relocations. */ - if (!info->shared) + htab->relplt->size += sizeof (Elf32_External_Rela); + + if (htab->plt_type == PLT_VXWORKS) { - if (ent->plt.offset - == (bfd_vma) htab->plt_initial_entry_size) + /* Allocate space for the unloaded relocations. */ + if (!info->shared + && htab->elf.dynamic_sections_created) { + if (ent->plt.offset + == (bfd_vma) htab->plt_initial_entry_size) + { + htab->srelplt2->size + += (sizeof (Elf32_External_Rela) + * VXWORKS_PLTRESOLVE_RELOCS); + } + htab->srelplt2->size - += sizeof (Elf32_External_Rela) - * VXWORKS_PLTRESOLVE_RELOCS; + += (sizeof (Elf32_External_Rela) + * VXWORKS_PLT_NON_JMP_SLOT_RELOCS); } - htab->srelplt2->size - += sizeof (Elf32_External_Rela) - * VXWORKS_PLT_NON_JMP_SLOT_RELOCS; + /* Every PLT entry has an associated GOT entry in + .got.plt. */ + htab->sgotplt->size += 4; } - - /* Every PLT entry has an associated GOT entry in - .got.plt. */ - htab->sgotplt->size += 4; } doneone = TRUE; } @@ -5006,6 +5333,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) /* Make sure this symbol is output as a dynamic symbol. */ if (eh->elf.dynindx == -1 && !eh->elf.forced_local + && eh->elf.type != STT_GNU_IFUNC && htab->elf.dynamic_sections_created) { if (!bfd_elf_link_record_dynamic_symbol (info, &eh->elf)) @@ -5045,12 +5373,13 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && (ELF_ST_VISIBILITY (eh->elf.other) == STV_DEFAULT || eh->elf.root.type != bfd_link_hash_undefweak)) { + asection *rsec = htab->relgot; /* All the entries we allocated need relocs. Except LD only needs one. */ if ((eh->tls_mask & TLS_LD) != 0 && eh->elf.def_dynamic) need -= 4; - htab->relgot->size += need * (sizeof (Elf32_External_Rela) / 4); + rsec->size += need * (sizeof (Elf32_External_Rela) / 4); } } } @@ -5121,7 +5450,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) /* Make sure undefined weak symbols are output as a dynamic symbol in PIEs. */ else if (h->dynindx == -1 - && !h->forced_local) + && !h->forced_local + && !h->def_regular) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) return FALSE; @@ -5161,6 +5491,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) for (p = eh->dyn_relocs; p != NULL; p = p->next) { asection *sreloc = elf_section_data (p->sec)->sreloc; + if (!htab->elf.dynamic_sections_created) + sreloc = htab->reliplt; sreloc->size += p->count * sizeof (Elf32_External_Rela); } @@ -5230,6 +5562,8 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { bfd_signed_vma *local_got; bfd_signed_vma *end_local_got; + struct plt_entry **local_plt; + struct plt_entry **end_local_plt; char *lgot_masks; bfd_size_type locsymcount; Elf_Internal_Shdr *symtab_hdr; @@ -5263,8 +5597,10 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, } else if (p->count != 0) { - elf_section_data (p->sec)->sreloc->size - += p->count * sizeof (Elf32_External_Rela); + asection *sreloc = elf_section_data (p->sec)->sreloc; + if (!htab->elf.dynamic_sections_created) + sreloc = htab->reliplt; + sreloc->size += p->count * sizeof (Elf32_External_Rela); if ((p->sec->output_section->flags & (SEC_READONLY | SEC_ALLOC)) == (SEC_READONLY | SEC_ALLOC)) @@ -5280,7 +5616,9 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, symtab_hdr = &elf_symtab_hdr (ibfd); locsymcount = symtab_hdr->sh_info; end_local_got = local_got + locsymcount; - lgot_masks = (char *) end_local_got; + local_plt = (struct plt_entry **) end_local_got; + end_local_plt = local_plt + locsymcount; + lgot_masks = (char *) end_local_plt; for (; local_got < end_local_got; ++local_got, ++lgot_masks) if (*local_got > 0) { @@ -5310,6 +5648,46 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, } else *local_got = (bfd_vma) -1; + + if (htab->is_vxworks) + continue; + + /* Allocate space for calls to local STT_GNU_IFUNC syms in .iplt. */ + for (; local_plt < end_local_plt; ++local_plt) + { + struct plt_entry *ent; + bfd_boolean doneone = FALSE; + bfd_vma plt_offset = 0, glink_offset = 0; + + for (ent = *local_plt; ent != NULL; ent = ent->next) + if (ent->plt.refcount > 0) + { + asection *s = htab->iplt; + + if (!doneone) + { + plt_offset = s->size; + s->size += 4; + } + ent->plt.offset = plt_offset; + + s = htab->glink; + if (!doneone || info->shared) + { + glink_offset = s->size; + s->size += GLINK_ENTRY_SIZE; + } + ent->glink_offset = glink_offset; + + if (!doneone) + { + htab->reliplt->size += sizeof (Elf32_External_Rela); + doneone = TRUE; + } + } + else + ent->plt.offset = (bfd_vma) -1; + } } /* Allocate space for global sym dynamic relocs. */ @@ -5342,8 +5720,22 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, htab->elf.hgot->root.u.def.value = g_o_t; } + if (info->shared) + { + struct elf_link_hash_entry *sda = htab->sdata[0].sym; + if (sda != NULL + && !(sda->root.type == bfd_link_hash_defined + || sda->root.type == bfd_link_hash_defweak)) + { + sda->root.type = bfd_link_hash_defined; + sda->root.u.def.section = htab->elf.hgot->root.u.def.section; + sda->root.u.def.value = htab->elf.hgot->root.u.def.value; + } + } - if (htab->glink != NULL && htab->glink->size != 0) + if (htab->glink != NULL + && htab->glink->size != 0 + && htab->elf.dynamic_sections_created) { htab->glink_pltresolve = htab->glink->size; /* Space for the branch table. */ @@ -5399,22 +5791,23 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, continue; if (s == htab->plt - || s == htab->glink - || s == htab->got - || s == htab->sgotplt - || s == htab->sbss - || s == htab->dynbss - || s == htab->dynsbss) + || s == htab->got) { /* We'd like to strip these sections if they aren't needed, but if we've exported dynamic symbols from them we must leave them. It's too late to tell BFD to get rid of the symbols. */ - if ((s == htab->plt || s == htab->got) && htab->elf.hplt != NULL) + if (htab->elf.hplt != NULL) strip_section = FALSE; /* Strip this section if we don't need it; see the comment below. */ } - else if (s == htab->sdata[0].section + else if (s == htab->iplt + || s == htab->glink + || s == htab->sgotplt + || s == htab->sbss + || s == htab->dynbss + || s == htab->dynsbss + || s == htab->sdata[0].section || s == htab->sdata[1].section) { /* Strip these too. */ @@ -5490,6 +5883,11 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { if (!add_dynamic_entry (DT_PPC_GOT, 0)) return FALSE; + if (!htab->no_tls_get_addr_opt + && htab->tls_get_addr != NULL + && htab->tls_get_addr->plt.plist != NULL + && !add_dynamic_entry (DT_PPC_TLSOPT, 0)) + return FALSE; } if (relocs) @@ -5536,23 +5934,25 @@ ppc_elf_hash_symbol (struct elf_link_hash_entry *h) #define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) +/* Relaxation trampolines. r12 is available for clobbering (r11, is + used for some functions that are allowed to break the ABI). */ static const int shared_stub_entry[] = { 0x7c0802a6, /* mflr 0 */ 0x429f0005, /* bcl 20, 31, .Lxxx */ - 0x7d6802a6, /* mflr 11 */ - 0x3d6b0000, /* addis 11, 11, (xxx-.Lxxx)@ha */ - 0x396b0018, /* addi 11, 11, (xxx-.Lxxx)@l */ + 0x7d8802a6, /* mflr 12 */ + 0x3d8c0000, /* addis 12, 12, (xxx-.Lxxx)@ha */ + 0x398c0008, /* addi 12, 12, (xxx-.Lxxx)@l */ 0x7c0803a6, /* mtlr 0 */ - 0x7d6903a6, /* mtctr 11 */ + 0x7d8903a6, /* mtctr 12 */ 0x4e800420, /* bctr */ }; static const int stub_entry[] = { - 0x3d600000, /* lis 11,xxx@ha */ - 0x396b0000, /* addi 11,11,xxx@l */ - 0x7d6903a6, /* mtctr 11 */ + 0x3d800000, /* lis 12,xxx@ha */ + 0x398c0000, /* addi 12,12,xxx@l */ + 0x7d8903a6, /* mtctr 12 */ 0x4e800420, /* bctr */ }; @@ -5566,6 +5966,8 @@ ppc_elf_relax_section (bfd *abfd, { struct one_fixup *next; asection *tsec; + /* Final link, can use the symbol offset. For a + relocatable link we use the symbol's index. */ bfd_vma toff; bfd_vma trampoff; }; @@ -5584,12 +5986,19 @@ ppc_elf_relax_section (bfd *abfd, *again = FALSE; /* Nothing to do if there are no relocations, and no need to do - anything with non-alloc sections. */ + anything with non-alloc or non-code sections. */ if ((isec->flags & SEC_ALLOC) == 0 + || (isec->flags & SEC_CODE) == 0 || (isec->flags & SEC_RELOC) == 0 || isec->reloc_count == 0) return TRUE; + /* We cannot represent the required PIC relocs in the output, so don't + do anything. The linker doesn't support mixing -shared and -r + anyway. */ + if (link_info->relocatable && link_info->shared) + return TRUE; + trampoff = (isec->size + 3) & (bfd_vma) -4; /* Space for a branch around any trampolines. */ trampoff += 4; @@ -5609,13 +6018,15 @@ ppc_elf_relax_section (bfd *abfd, for (irel = internal_relocs; irel < irelend; irel++) { unsigned long r_type = ELF32_R_TYPE (irel->r_info); - bfd_vma symaddr, reladdr, toff, roff; + bfd_vma reladdr, toff, roff; asection *tsec; struct one_fixup *f; size_t insn_offset = 0; bfd_vma max_branch_offset, val; bfd_byte *hit_addr; unsigned long t0; + struct elf_link_hash_entry *h; + struct plt_entry **plist; unsigned char sym_type; switch (r_type) @@ -5637,6 +6048,7 @@ ppc_elf_relax_section (bfd *abfd, } /* Get the value of the symbol referred to by the reloc. */ + h = NULL; if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info) { /* A local symbol. */ @@ -5655,7 +6067,7 @@ ppc_elf_relax_section (bfd *abfd, } isym = isymbuf + ELF32_R_SYM (irel->r_info); if (isym->st_shndx == SHN_UNDEF) - continue; /* We can't do anything with undefined symbols. */ + tsec = bfd_und_section_ptr; else if (isym->st_shndx == SHN_ABS) tsec = bfd_abs_section_ptr; else if (isym->st_shndx == SHN_COMMON) @@ -5670,7 +6082,6 @@ ppc_elf_relax_section (bfd *abfd, { /* Global symbol handling. */ unsigned long indx; - struct elf_link_hash_entry *h; indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info; h = elf_sym_hashes (abfd)[indx]; @@ -5679,41 +6090,70 @@ ppc_elf_relax_section (bfd *abfd, || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; - tsec = NULL; - toff = 0; - if (r_type == R_PPC_PLTREL24 - && htab->plt != NULL) - { - struct plt_entry *ent = find_plt_ent (h, got2, irel->r_addend); - - if (ent != NULL) - { - if (htab->plt_type == PLT_NEW) - { - tsec = htab->glink; - toff = ent->glink_offset; - } - else - { - tsec = htab->plt; - toff = ent->plt.offset; - } - } - } - if (tsec != NULL) - ; - else if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) { tsec = h->root.u.def.section; toff = h->root.u.def.value; } + else if (h->root.type == bfd_link_hash_undefined + || h->root.type == bfd_link_hash_undefweak) + { + tsec = bfd_und_section_ptr; + toff = link_info->relocatable ? indx : 0; + } else continue; sym_type = h->type; } + /* The condition here under which we call find_plt_ent must + match that in relocate_section. If we call find_plt_ent here + but not in relocate_section, or vice versa, then the branch + destination used here may be incorrect. */ + plist = NULL; + if (h != NULL) + { + /* We know is_branch_reloc (r_type) is true. */ + if (h->type == STT_GNU_IFUNC + || r_type == R_PPC_PLTREL24) + plist = &h->plt.plist; + } + else if (sym_type == STT_GNU_IFUNC + && elf_local_got_offsets (abfd) != NULL) + { + bfd_vma *local_got_offsets = elf_local_got_offsets (abfd); + struct plt_entry **local_plt = (struct plt_entry **) + (local_got_offsets + symtab_hdr->sh_info); + plist = local_plt + ELF32_R_SYM (irel->r_info); + } + if (plist != NULL) + { + bfd_vma addend = 0; + struct plt_entry *ent; + + if (r_type == R_PPC_PLTREL24 && link_info->shared) + addend = irel->r_addend; + ent = find_plt_ent (plist, got2, addend); + if (ent != NULL) + { + if (htab->plt_type == PLT_NEW + || h == NULL + || !htab->elf.dynamic_sections_created + || h->dynindx == -1) + { + tsec = htab->glink; + toff = ent->glink_offset; + } + else + { + tsec = htab->plt; + toff = ent->plt.offset; + } + } + } + /* If the branch and target are in the same section, you have no hope of adding stubs. We'll error out later should the branch overflow. */ @@ -5761,14 +6201,23 @@ ppc_elf_relax_section (bfd *abfd, if (tsec->output_section == NULL) continue; - symaddr = tsec->output_section->vma + tsec->output_offset + toff; - roff = irel->r_offset; reladdr = isec->output_section->vma + isec->output_offset + roff; /* If the branch is in range, no need to do anything. */ - if (symaddr - reladdr + max_branch_offset < 2 * max_branch_offset) - continue; + if (tsec != bfd_und_section_ptr + && (!link_info->relocatable + /* A relocatable link may have sections moved during + final link, so do not presume they remain in range. */ + || tsec->output_section == isec->output_section)) + { + bfd_vma symaddr, reladdr; + + symaddr = tsec->output_section->vma + tsec->output_offset + toff; + reladdr = isec->output_section->vma + isec->output_offset + roff; + if (symaddr - reladdr + max_branch_offset < 2 * max_branch_offset) + continue; + } /* Look for an existing fixup to this address. */ for (f = fixups; f ; f = f->next) @@ -5977,6 +6426,27 @@ ppc_elf_relax_section (bfd *abfd, free (internal_relocs); *again = changes != 0; + if (!*again && link_info->relocatable) + { + /* Convert the internal relax relocs to external form. */ + for (irel = internal_relocs; irel < irelend; irel++) + if (ELF32_R_TYPE (irel->r_info) == R_PPC_RELAX32) + { + unsigned long r_symndx = ELF32_R_SYM (irel->r_info); + + /* Rewrite the reloc and convert one of the trailing nop + relocs to describe this relocation. */ + BFD_ASSERT (ELF32_R_TYPE (irelend[-1].r_info) == R_PPC_NONE); + /* The relocs are at the bottom 2 bytes */ + irel[0].r_offset += 2; + memmove (irel + 1, irel, (irelend - irel - 1) * sizeof (*irel)); + irel[0].r_info = ELF32_R_INFO (r_symndx, R_PPC_ADDR16_HA); + irel[1].r_offset += 4; + irel[1].r_info = ELF32_R_INFO (r_symndx, R_PPC_ADDR16_LO); + irel++; + } + } + return TRUE; error_return: @@ -6053,9 +6523,10 @@ elf_finish_pointer_linker_section (bfd *input_bfd, linker_section_ptr->offset += 1; } - relocation = (lsect->section->output_offset + relocation = (lsect->section->output_section->vma + + lsect->section->output_offset + linker_section_ptr->offset - 1 - - 0x8000); + - SYM_VAL (lsect->sym)); #ifdef DEBUG fprintf (stderr, @@ -6063,9 +6534,83 @@ elf_finish_pointer_linker_section (bfd *input_bfd, lsect->name, (long) relocation, (long) relocation); #endif - /* Subtract out the addend, because it will get added back in by the normal - processing. */ - return relocation - linker_section_ptr->addend; + return relocation; +} + +#define PPC_LO(v) ((v) & 0xffff) +#define PPC_HI(v) (((v) >> 16) & 0xffff) +#define PPC_HA(v) PPC_HI ((v) + 0x8000) + +static void +write_glink_stub (struct plt_entry *ent, asection *plt_sec, unsigned char *p, + struct bfd_link_info *info) +{ + struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info); + bfd *output_bfd = info->output_bfd; + bfd_vma plt; + + plt = ((ent->plt.offset & ~1) + + plt_sec->output_section->vma + + plt_sec->output_offset); + + if (info->shared) + { + bfd_vma got = 0; + + if (ent->addend >= 32768) + got = (ent->addend + + ent->sec->output_section->vma + + ent->sec->output_offset); + else if (htab->elf.hgot != NULL) + got = SYM_VAL (htab->elf.hgot); + + plt -= got; + + if (plt + 0x8000 < 0x10000) + { + bfd_put_32 (output_bfd, LWZ_11_30 + PPC_LO (plt), p); + p += 4; + bfd_put_32 (output_bfd, MTCTR_11, p); + p += 4; + bfd_put_32 (output_bfd, BCTR, p); + p += 4; + bfd_put_32 (output_bfd, NOP, p); + p += 4; + } + else + { + bfd_put_32 (output_bfd, ADDIS_11_30 + PPC_HA (plt), p); + p += 4; + bfd_put_32 (output_bfd, LWZ_11_11 + PPC_LO (plt), p); + p += 4; + bfd_put_32 (output_bfd, MTCTR_11, p); + p += 4; + bfd_put_32 (output_bfd, BCTR, p); + p += 4; + } + } + else + { + bfd_put_32 (output_bfd, LIS_11 + PPC_HA (plt), p); + p += 4; + bfd_put_32 (output_bfd, LWZ_11_11 + PPC_LO (plt), p); + p += 4; + bfd_put_32 (output_bfd, MTCTR_11, p); + p += 4; + bfd_put_32 (output_bfd, BCTR, p); + p += 4; + } +} + +/* Return true if symbol is defined statically. */ + +static bfd_boolean +is_static_defined (struct elf_link_hash_entry *h) +{ + return ((h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + && h->root.u.def.section != NULL + && h->root.u.def.section->output_section != NULL); } /* The RELOCATE_SECTION function is called by the ELF backend linker @@ -6161,6 +6706,7 @@ ppc_elf_relocate_section (bfd *output_bfd, bfd_boolean unresolved_reloc; bfd_boolean warned; unsigned int tls_type, tls_mask, tls_gd; + struct plt_entry **ifunc; r_type = ELF32_R_TYPE (rel->r_info); sym = NULL; @@ -6221,16 +6767,16 @@ ppc_elf_relocate_section (bfd *output_bfd, for the final instruction stream. */ tls_mask = 0; tls_gd = 0; - if (IS_PPC_TLS_RELOC (r_type)) + if (h != NULL) + tls_mask = ((struct ppc_elf_link_hash_entry *) h)->tls_mask; + else if (local_got_offsets != NULL) { - if (h != NULL) - tls_mask = ((struct ppc_elf_link_hash_entry *) h)->tls_mask; - else if (local_got_offsets != NULL) - { - char *lgot_masks; - lgot_masks = (char *) (local_got_offsets + symtab_hdr->sh_info); - tls_mask = lgot_masks[r_symndx]; - } + struct plt_entry **local_plt; + char *lgot_masks; + local_plt + = (struct plt_entry **) (local_got_offsets + symtab_hdr->sh_info); + lgot_masks = (char *) (local_plt + symtab_hdr->sh_info); + tls_mask = lgot_masks[r_symndx]; } /* Ensure reloc mapping code below stays sane. */ @@ -6250,7 +6796,7 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_GOT_TPREL16: case R_PPC_GOT_TPREL16_LO: - if (tls_mask != 0 + if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_TPREL) == 0) { bfd_vma insn; @@ -6264,7 +6810,7 @@ ppc_elf_relocate_section (bfd *output_bfd, break; case R_PPC_TLS: - if (tls_mask != 0 + if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_TPREL) == 0) { bfd_vma insn, rtra; @@ -6311,13 +6857,13 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_GOT_TLSGD16_HI: case R_PPC_GOT_TLSGD16_HA: tls_gd = TLS_TPRELGD; - if (tls_mask != 0 && (tls_mask & TLS_GD) == 0) + if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_GD) == 0) goto tls_gdld_hi; break; case R_PPC_GOT_TLSLD16_HI: case R_PPC_GOT_TLSLD16_HA: - if (tls_mask != 0 && (tls_mask & TLS_LD) == 0) + if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_LD) == 0) { tls_gdld_hi: if ((tls_mask & tls_gd) != 0) @@ -6336,30 +6882,44 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_GOT_TLSGD16: case R_PPC_GOT_TLSGD16_LO: tls_gd = TLS_TPRELGD; - if (tls_mask != 0 && (tls_mask & TLS_GD) == 0) + if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_GD) == 0) goto tls_ldgd_opt; break; case R_PPC_GOT_TLSLD16: case R_PPC_GOT_TLSLD16_LO: - if (tls_mask != 0 && (tls_mask & TLS_LD) == 0) + if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_LD) == 0) { - bfd_vma insn1, insn2; + unsigned int insn1, insn2; bfd_vma offset; tls_ldgd_opt: - offset = rel[1].r_offset; - insn1 = bfd_get_32 (output_bfd, - contents + rel->r_offset - d_offset); + offset = (bfd_vma) -1; + /* If not using the newer R_PPC_TLSGD/LD to mark + __tls_get_addr calls, we must trust that the call + stays with its arg setup insns, ie. that the next + reloc is the __tls_get_addr call associated with + the current reloc. Edit both insns. */ + if (input_section->has_tls_get_addr_call + && rel + 1 < relend + && branch_reloc_hash_match (input_bfd, rel + 1, + htab->tls_get_addr)) + offset = rel[1].r_offset; if ((tls_mask & tls_gd) != 0) { /* IE */ + insn1 = bfd_get_32 (output_bfd, + contents + rel->r_offset - d_offset); insn1 &= (1 << 26) - 1; insn1 |= 32 << 26; /* lwz */ - insn2 = 0x7c631214; /* add 3,3,2 */ - rel[1].r_info - = ELF32_R_INFO (ELF32_R_SYM (rel[1].r_info), R_PPC_NONE); - rel[1].r_addend = 0; + if (offset != (bfd_vma) -1) + { + rel[1].r_info + = ELF32_R_INFO (ELF32_R_SYM (rel[1].r_info), + R_PPC_NONE); + insn2 = 0x7c631214; /* add 3,3,2 */ + bfd_put_32 (output_bfd, insn2, contents + offset); + } r_type = (((r_type - (R_PPC_GOT_TLSGD16 & 3)) & 3) + R_PPC_GOT_TPREL16); rel->r_info = ELF32_R_INFO (r_symndx, r_type); @@ -6368,7 +6928,6 @@ ppc_elf_relocate_section (bfd *output_bfd, { /* LE */ insn1 = 0x3c620000; /* addis 3,2,0 */ - insn2 = 0x38630000; /* addi 3,3,0 */ if (tls_gd == 0) { /* Was an LD reloc. */ @@ -6387,14 +6946,17 @@ ppc_elf_relocate_section (bfd *output_bfd, } r_type = R_PPC_TPREL16_HA; rel->r_info = ELF32_R_INFO (r_symndx, r_type); - rel[1].r_info = ELF32_R_INFO (r_symndx, - R_PPC_TPREL16_LO); - rel[1].r_offset += d_offset; - rel[1].r_addend = rel->r_addend; + if (offset != (bfd_vma) -1) + { + rel[1].r_info = ELF32_R_INFO (r_symndx, R_PPC_TPREL16_LO); + rel[1].r_offset = offset + d_offset; + rel[1].r_addend = rel->r_addend; + insn2 = 0x38630000; /* addi 3,3,0 */ + bfd_put_32 (output_bfd, insn2, contents + offset); + } } bfd_put_32 (output_bfd, insn1, contents + rel->r_offset - d_offset); - bfd_put_32 (output_bfd, insn2, contents + offset); if (tls_gd == 0) { /* We changed the symbol on an LD reloc. Start over @@ -6404,6 +6966,66 @@ ppc_elf_relocate_section (bfd *output_bfd, } } break; + + case R_PPC_TLSGD: + if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_GD) == 0) + { + unsigned int insn2; + bfd_vma offset = rel->r_offset; + + if ((tls_mask & TLS_TPRELGD) != 0) + { + /* IE */ + r_type = R_PPC_NONE; + insn2 = 0x7c631214; /* add 3,3,2 */ + } + else + { + /* LE */ + r_type = R_PPC_TPREL16_LO; + rel->r_offset += d_offset; + insn2 = 0x38630000; /* addi 3,3,0 */ + } + rel->r_info = ELF32_R_INFO (r_symndx, r_type); + bfd_put_32 (output_bfd, insn2, contents + offset); + /* Zap the reloc on the _tls_get_addr call too. */ + BFD_ASSERT (offset == rel[1].r_offset); + rel[1].r_info = ELF32_R_INFO (ELF32_R_SYM (rel[1].r_info), + R_PPC_NONE); + } + break; + + case R_PPC_TLSLD: + if ((tls_mask & TLS_TLS) != 0 && (tls_mask & TLS_LD) == 0) + { + unsigned int insn2; + + for (r_symndx = 0; + r_symndx < symtab_hdr->sh_info; + r_symndx++) + if (local_sections[r_symndx] == sec) + break; + if (r_symndx >= symtab_hdr->sh_info) + r_symndx = 0; + rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET; + if (r_symndx != 0) + rel->r_addend -= (local_syms[r_symndx].st_value + + sec->output_offset + + sec->output_section->vma); + + rel->r_info = ELF32_R_INFO (r_symndx, R_PPC_TPREL16_LO); + rel->r_offset += d_offset; + insn2 = 0x38630000; /* addi 3,3,0 */ + bfd_put_32 (output_bfd, insn2, + contents + rel->r_offset - d_offset); + /* Zap the reloc on the _tls_get_addr call too. */ + BFD_ASSERT (rel->r_offset - d_offset == rel[1].r_offset); + rel[1].r_info = ELF32_R_INFO (ELF32_R_SYM (rel[1].r_info), + R_PPC_NONE); + rel--; + continue; + } + break; } /* Handle other relocations that tweak non-addend part of insn. */ @@ -6438,6 +7060,77 @@ ppc_elf_relocate_section (bfd *output_bfd, break; } + ifunc = NULL; + if (!htab->is_vxworks) + { + struct plt_entry *ent; + + if (h != NULL) + { + if (h->type == STT_GNU_IFUNC) + ifunc = &h->plt.plist; + } + else if (local_got_offsets != NULL + && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + { + struct plt_entry **local_plt; + + local_plt = (struct plt_entry **) (local_got_offsets + + symtab_hdr->sh_info); + ifunc = local_plt + r_symndx; + } + + ent = NULL; + if (ifunc != NULL + && (!info->shared + || is_branch_reloc (r_type))) + { + addend = 0; + if (r_type == R_PPC_PLTREL24 && info->shared) + addend = rel->r_addend; + ent = find_plt_ent (ifunc, got2, addend); + } + if (ent != NULL) + { + if (h == NULL && (ent->plt.offset & 1) == 0) + { + Elf_Internal_Rela rela; + bfd_byte *loc; + + rela.r_offset = (htab->iplt->output_section->vma + + htab->iplt->output_offset + + ent->plt.offset); + rela.r_info = ELF32_R_INFO (0, R_PPC_IRELATIVE); + rela.r_addend = relocation; + loc = htab->reliplt->contents; + loc += (htab->reliplt->reloc_count++ + * sizeof (Elf32_External_Rela)); + bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); + + ent->plt.offset |= 1; + } + if (h == NULL && (ent->glink_offset & 1) == 0) + { + unsigned char *p = ((unsigned char *) htab->glink->contents + + ent->glink_offset); + write_glink_stub (ent, htab->iplt, p, info); + ent->glink_offset |= 1; + } + + unresolved_reloc = FALSE; + if (htab->plt_type == PLT_NEW + || !htab->elf.dynamic_sections_created + || h == NULL) + relocation = (htab->glink->output_section->vma + + htab->glink->output_offset + + (ent->glink_offset & ~1)); + else + relocation = (htab->plt->output_section->vma + + htab->plt->output_offset + + ent->plt.offset); + } + } + addend = rel->r_addend; tls_type = 0; howto = NULL; @@ -6456,6 +7149,8 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_NONE: case R_PPC_TLS: + case R_PPC_TLSGD: + case R_PPC_TLSLD: case R_PPC_EMB_MRKREF: case R_PPC_GNU_VTINHERIT: case R_PPC_GNU_VTENTRY: @@ -6497,6 +7192,7 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_GOT16_LO: case R_PPC_GOT16_HI: case R_PPC_GOT16_HA: + tls_mask = 0; dogot: { /* Relocation is to the entry for this symbol in the global @@ -6591,6 +7287,8 @@ ppc_elf_relocate_section (bfd *output_bfd, || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak)) { + asection *rsec = htab->relgot; + outrel.r_offset = (htab->got->output_section->vma + htab->got->output_offset + off); @@ -6600,8 +7298,8 @@ ppc_elf_relocate_section (bfd *output_bfd, outrel.r_info = ELF32_R_INFO (indx, R_PPC_DTPMOD32); if (tls_ty == (TLS_TLS | TLS_GD)) { - loc = htab->relgot->contents; - loc += (htab->relgot->reloc_count++ + loc = rsec->contents; + loc += (rsec->reloc_count++ * sizeof (Elf32_External_Rela)); bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc); @@ -6614,18 +7312,20 @@ ppc_elf_relocate_section (bfd *output_bfd, outrel.r_info = ELF32_R_INFO (indx, R_PPC_DTPREL32); else if (tls_ty == (TLS_TLS | TLS_TPREL)) outrel.r_info = ELF32_R_INFO (indx, R_PPC_TPREL32); - else if (indx == 0) - outrel.r_info = ELF32_R_INFO (indx, R_PPC_RELATIVE); - else + else if (indx != 0) outrel.r_info = ELF32_R_INFO (indx, R_PPC_GLOB_DAT); + else if (ifunc != NULL) + outrel.r_info = ELF32_R_INFO (0, R_PPC_IRELATIVE); + else + outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE); if (indx == 0 && tls_ty != (TLS_TLS | TLS_LD)) { outrel.r_addend += relocation; if (tls_ty & (TLS_GD | TLS_DTPREL | TLS_TPREL)) outrel.r_addend -= htab->elf.tls_sec->vma; } - loc = htab->relgot->contents; - loc += (htab->relgot->reloc_count++ + loc = rsec->contents; + loc += (rsec->reloc_count++ * sizeof (Elf32_External_Rela)); bfd_elf32_swap_reloca_out (output_bfd, &outrel, loc); } @@ -6832,8 +7532,9 @@ ppc_elf_relocate_section (bfd *output_bfd, time. */ if (sreloc == NULL) { - sreloc = _bfd_elf_get_dynamic_reloc_section - (input_bfd, input_section, /*rela?*/ TRUE); + sreloc = elf_section_data (input_section)->sreloc; + if (!htab->elf.dynamic_sections_created) + sreloc = htab->reliplt; if (sreloc == NULL) return FALSE; } @@ -6863,13 +7564,35 @@ ppc_elf_relocate_section (bfd *output_bfd, { outrel.r_addend = relocation + rel->r_addend; - if (r_type == R_PPC_ADDR32) - outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE); - else + if (r_type != R_PPC_ADDR32) { long indx = 0; - if (r_symndx == 0 || bfd_is_abs_section (sec)) + if (ifunc != NULL) + { + /* If we get here when building a static + executable, then the libc startup function + responsible for applying indirect function + relocations is going to complain about + the reloc type. + If we get here when building a dynamic + executable, it will be because we have + a text relocation. The dynamic loader + will set the text segment writable and + non-executable to apply text relocations. + So we'll segfault when trying to run the + indirection function to resolve the reloc. */ + (*_bfd_error_handler) + (_("%B(%A+0x%lx): relocation %s for indirect " + "function %s unsupported"), + input_bfd, + input_section, + (long) rel->r_offset, + howto->name, + sym_name); + ret = FALSE; + } + else if (r_symndx == 0 || bfd_is_abs_section (sec)) ; else if (sec == NULL || sec->owner == NULL) { @@ -6884,7 +7607,8 @@ ppc_elf_relocate_section (bfd *output_bfd, against a section symbol. It would be proper to subtract the symbol's value, osec->vma, from the emitted reloc addend, - but ld.so expects buggy relocs. */ + but ld.so expects buggy relocs. + FIXME: Why not always use a zero index? */ osec = sec->output_section; indx = elf_section_data (osec)->dynindx; if (indx == 0) @@ -6903,6 +7627,10 @@ ppc_elf_relocate_section (bfd *output_bfd, outrel.r_info = ELF32_R_INFO (indx, r_type); } + else if (ifunc != NULL) + outrel.r_info = ELF32_R_INFO (0, R_PPC_IRELATIVE); + else + outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE); } loc = sreloc->contents; @@ -6927,18 +7655,19 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_RELAX32PC_PLT: case R_PPC_RELAX32_PLT: - { - struct plt_entry *ent = find_plt_ent (h, got2, addend); - - if (htab->plt_type == PLT_NEW) - relocation = (htab->glink->output_section->vma - + htab->glink->output_offset - + ent->glink_offset); - else - relocation = (htab->plt->output_section->vma - + htab->plt->output_offset - + ent->plt.offset); - } + if (h != NULL) + { + struct plt_entry *ent = find_plt_ent (&h->plt.plist, got2, + info->shared ? addend : 0); + if (htab->plt_type == PLT_NEW) + relocation = (htab->glink->output_section->vma + + htab->glink->output_offset + + ent->glink_offset); + else + relocation = (htab->plt->output_section->vma + + htab->plt->output_offset + + ent->plt.offset); + } if (r_type == R_PPC_RELAX32_PLT) goto relax32; /* Fall thru */ @@ -6987,17 +7716,29 @@ ppc_elf_relocate_section (bfd *output_bfd, /* Indirect .sdata relocation. */ case R_PPC_EMB_SDAI16: BFD_ASSERT (htab->sdata[0].section != NULL); + if (!is_static_defined (htab->sdata[0].sym)) + { + unresolved_reloc = TRUE; + break; + } relocation = elf_finish_pointer_linker_section (input_bfd, &htab->sdata[0], h, relocation, rel); + addend = 0; break; /* Indirect .sdata2 relocation. */ case R_PPC_EMB_SDA2I16: BFD_ASSERT (htab->sdata[1].section != NULL); + if (!is_static_defined (htab->sdata[1].sym)) + { + unresolved_reloc = TRUE; + break; + } relocation = elf_finish_pointer_linker_section (input_bfd, &htab->sdata[1], h, relocation, rel); + addend = 0; break; /* Handle the TOC16 reloc. We want to use the offset within the .got @@ -7017,11 +7758,13 @@ ppc_elf_relocate_section (bfd *output_bfd, break; case R_PPC_PLTREL24: + if (h == NULL || ifunc != NULL) + break; /* Relocation is to the entry for this symbol in the procedure linkage table. */ { - struct plt_entry *ent = find_plt_ent (h, got2, addend); - + struct plt_entry *ent = find_plt_ent (&h->plt.plist, got2, + info->shared ? addend : 0); addend = 0; if (ent == NULL || htab->plt == NULL) @@ -7048,12 +7791,16 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_SDAREL16: { const char *name; + struct elf_link_hash_entry *sda = htab->sdata[0].sym; - if (sec == NULL || sec->output_section == NULL) + if (sec == NULL + || sec->output_section == NULL + || !is_static_defined (sda)) { unresolved_reloc = TRUE; break; } + addend -= SYM_VAL (sda); name = bfd_get_section_name (abfd, sec->output_section); if (! ((CONST_STRNEQ (name, ".sdata") @@ -7069,7 +7816,6 @@ ppc_elf_relocate_section (bfd *output_bfd, howto->name, name); } - addend -= SYM_VAL (htab->sdata[0].sym); } break; @@ -7077,12 +7823,16 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_EMB_SDA2REL: { const char *name; + struct elf_link_hash_entry *sda = htab->sdata[1].sym; - if (sec == NULL || sec->output_section == NULL) + if (sec == NULL + || sec->output_section == NULL + || !is_static_defined (sda)) { unresolved_reloc = TRUE; break; } + addend -= SYM_VAL (sda); name = bfd_get_section_name (abfd, sec->output_section); if (! (CONST_STRNEQ (name, ".sdata2") @@ -7095,12 +7845,7 @@ ppc_elf_relocate_section (bfd *output_bfd, sym_name, howto->name, name); - - bfd_set_error (bfd_error_bad_value); - ret = FALSE; - continue; } - addend -= SYM_VAL (htab->sdata[1].sym); } break; @@ -7110,6 +7855,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { const char *name; int reg; + struct elf_link_hash_entry *sda = NULL; if (sec == NULL || sec->output_section == NULL) { @@ -7124,13 +7870,13 @@ ppc_elf_relocate_section (bfd *output_bfd, && (name[5] == 0 || name[5] == '.')))) { reg = 13; - addend -= SYM_VAL (htab->sdata[0].sym); + sda = htab->sdata[0].sym; } else if (CONST_STRNEQ (name, ".sdata2") || CONST_STRNEQ (name, ".sbss2")) { reg = 2; - addend -= SYM_VAL (htab->sdata[1].sym); + sda = htab->sdata[1].sym; } else if (strcmp (name, ".PPC.EMB.sdata0") == 0 || strcmp (name, ".PPC.EMB.sbss0") == 0) @@ -7152,6 +7898,16 @@ ppc_elf_relocate_section (bfd *output_bfd, continue; } + if (sda != NULL) + { + if (!is_static_defined (sda)) + { + unresolved_reloc = TRUE; + break; + } + addend -= SYM_VAL (sda); + } + if (r_type == R_PPC_EMB_SDA21) { /* fill in register field */ insn = bfd_get_32 (output_bfd, contents + rel->r_offset); @@ -7187,6 +7943,7 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_GLOB_DAT: case R_PPC_JMP_SLOT: case R_PPC_RELATIVE: + case R_PPC_IRELATIVE: case R_PPC_PLT32: case R_PPC_PLTREL32: case R_PPC_PLT16_LO: @@ -7322,10 +8079,6 @@ ppc_elf_relocate_section (bfd *output_bfd, return ret; } -#define PPC_LO(v) ((v) & 0xffff) -#define PPC_HI(v) (((v) >> 16) & 0xffff) -#define PPC_HA(v) PPC_HI ((v) + 0x8000) - /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ @@ -7357,7 +8110,9 @@ ppc_elf_finish_dynamic_symbol (bfd *output_bfd, bfd_byte *loc; bfd_vma reloc_index; - if (htab->plt_type == PLT_NEW) + if (htab->plt_type == PLT_NEW + || !htab->elf.dynamic_sections_created + || h->dynindx == -1) reloc_index = ent->plt.offset / 4; else { @@ -7370,7 +8125,9 @@ ppc_elf_finish_dynamic_symbol (bfd *output_bfd, /* This symbol has an entry in the procedure linkage table. Set it up. */ - if (htab->plt_type == PLT_VXWORKS) + if (htab->plt_type == PLT_VXWORKS + && htab->elf.dynamic_sections_created + && h->dynindx != -1) { bfd_vma got_offset; const bfd_vma *plt_entry; @@ -7492,10 +8249,17 @@ ppc_elf_finish_dynamic_symbol (bfd *output_bfd, } else { - rela.r_offset = (htab->plt->output_section->vma - + htab->plt->output_offset + asection *splt = htab->plt; + if (!htab->elf.dynamic_sections_created + || h->dynindx == -1) + splt = htab->iplt; + + rela.r_offset = (splt->output_section->vma + + splt->output_offset + ent->plt.offset); - if (htab->plt_type == PLT_OLD) + if (htab->plt_type == PLT_OLD + || !htab->elf.dynamic_sections_created + || h->dynindx == -1) { /* We don't need to fill in the .plt. The ppc dynamic linker will fill it in. */ @@ -7506,16 +8270,33 @@ ppc_elf_finish_dynamic_symbol (bfd *output_bfd, + htab->glink->output_section->vma + htab->glink->output_offset); bfd_put_32 (output_bfd, val, - htab->plt->contents + ent->plt.offset); + splt->contents + ent->plt.offset); } } /* Fill in the entry in the .rela.plt section. */ - rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_JMP_SLOT); rela.r_addend = 0; + if (!htab->elf.dynamic_sections_created + || h->dynindx == -1) + { + BFD_ASSERT (h->type == STT_GNU_IFUNC + && h->def_regular + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak)); + rela.r_info = ELF32_R_INFO (0, R_PPC_IRELATIVE); + rela.r_addend = SYM_VAL (h); + } + else + rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_JMP_SLOT); - loc = (htab->relplt->contents - + reloc_index * sizeof (Elf32_External_Rela)); + if (!htab->elf.dynamic_sections_created + || h->dynindx == -1) + loc = (htab->reliplt->contents + + (htab->reliplt->reloc_count++ + * sizeof (Elf32_External_Rela))); + else + loc = (htab->relplt->contents + + reloc_index * sizeof (Elf32_External_Rela)); bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); if (!h->def_regular) @@ -7538,69 +8319,62 @@ ppc_elf_finish_dynamic_symbol (bfd *output_bfd, sym->st_value = 0; } } + else if (h->type == STT_GNU_IFUNC + && !info->shared) + { + /* Set the value of ifunc symbols in a non-pie + executable to the glink entry. This is to avoid + text relocations. We can't do this for ifunc in + allocate_dynrelocs, as we do for normal dynamic + function symbols with plt entries, because we need + to keep the original value around for the ifunc + relocation. */ + sym->st_shndx = (_bfd_elf_section_from_bfd_section + (output_bfd, htab->glink->output_section)); + sym->st_value = (ent->glink_offset + + htab->glink->output_offset + + htab->glink->output_section->vma); + } doneone = TRUE; } - if (htab->plt_type == PLT_NEW) + if (htab->plt_type == PLT_NEW + || !htab->elf.dynamic_sections_created + || h->dynindx == -1) { - bfd_vma plt; unsigned char *p; + asection *splt = htab->plt; + if (!htab->elf.dynamic_sections_created + || h->dynindx == -1) + splt = htab->iplt; - plt = (ent->plt.offset - + htab->plt->output_section->vma - + htab->plt->output_offset); p = (unsigned char *) htab->glink->contents + ent->glink_offset; - if (info->shared || info->pie) - { - bfd_vma got = 0; - - if (ent->addend >= 32768) - got = (ent->addend - + ent->sec->output_section->vma - + ent->sec->output_offset); - else if (htab->elf.hgot != NULL) - got = SYM_VAL (htab->elf.hgot); - - plt -= got; - - if (plt + 0x8000 < 0x10000) - { - bfd_put_32 (output_bfd, LWZ_11_30 + PPC_LO (plt), p); - p += 4; - bfd_put_32 (output_bfd, MTCTR_11, p); - p += 4; - bfd_put_32 (output_bfd, BCTR, p); - p += 4; - bfd_put_32 (output_bfd, NOP, p); - p += 4; - } - else - { - bfd_put_32 (output_bfd, ADDIS_11_30 + PPC_HA (plt), p); - p += 4; - bfd_put_32 (output_bfd, LWZ_11_11 + PPC_LO (plt), p); - p += 4; - bfd_put_32 (output_bfd, MTCTR_11, p); - p += 4; - bfd_put_32 (output_bfd, BCTR, p); - p += 4; - } - } - else + if (h == htab->tls_get_addr && !htab->no_tls_get_addr_opt) { - bfd_put_32 (output_bfd, LIS_11 + PPC_HA (plt), p); + bfd_put_32 (output_bfd, LWZ_11_3, p); p += 4; - bfd_put_32 (output_bfd, LWZ_11_11 + PPC_LO (plt), p); + bfd_put_32 (output_bfd, LWZ_12_3 + 4, p); p += 4; - bfd_put_32 (output_bfd, MTCTR_11, p); + bfd_put_32 (output_bfd, MR_0_3, p); p += 4; - bfd_put_32 (output_bfd, BCTR, p); + bfd_put_32 (output_bfd, CMPWI_11_0, p); + p += 4; + bfd_put_32 (output_bfd, ADD_3_12_2, p); + p += 4; + bfd_put_32 (output_bfd, BEQLR, p); + p += 4; + bfd_put_32 (output_bfd, MR_3_0, p); + p += 4; + bfd_put_32 (output_bfd, NOP, p); p += 4; - - /* We only need one non-PIC glink stub. */ - break; } + + write_glink_stub (ent, splt, p, info); + + if (!info->shared) + /* We only need one non-PIC glink stub. */ + break; } else break; @@ -7871,7 +8645,9 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, } } - if (htab->glink != NULL && htab->glink->contents != NULL) + if (htab->glink != NULL + && htab->glink->contents != NULL + && htab->elf.dynamic_sections_created) { unsigned char *p; unsigned char *endp; @@ -8003,7 +8779,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, + htab->glink->output_offset); /* Last comes the PLTresolve stub. */ - if (info->shared || info->pie) + if (info->shared) { bfd_vma bcl; @@ -8138,6 +8914,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, #define elf_backend_plt_sym_val ppc_elf_plt_sym_val #define elf_backend_action_discarded ppc_elf_action_discarded #define elf_backend_init_index_section _bfd_elf_init_1_index_section +#define elf_backend_post_process_headers _bfd_elf_set_osabi #include "elf32-target.h" @@ -8247,5 +9024,6 @@ ppc_elf_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker) #undef elf32_bed #define elf32_bed ppc_elf_vxworks_bed +#undef elf_backend_post_process_headers #include "elf32-target.h" diff --git a/cegcc/src/binutils/bfd/elf32-ppc.h b/cegcc/src/binutils/bfd/elf32-ppc.h index ef1f0accd..4becb302a 100644 --- a/cegcc/src/binutils/bfd/elf32-ppc.h +++ b/cegcc/src/binutils/bfd/elf32-ppc.h @@ -28,6 +28,6 @@ enum ppc_elf_plt_type int ppc_elf_select_plt_layout (bfd *, struct bfd_link_info *, enum ppc_elf_plt_type, int); -asection *ppc_elf_tls_setup (bfd *, struct bfd_link_info *); +asection *ppc_elf_tls_setup (bfd *, struct bfd_link_info *, int); bfd_boolean ppc_elf_tls_optimize (bfd *, struct bfd_link_info *); void ppc_elf_set_sdata_syms (bfd *, struct bfd_link_info *); diff --git a/cegcc/src/binutils/bfd/elf32-s390.c b/cegcc/src/binutils/bfd/elf32-s390.c index 7aadadc6c..094a8dc38 100644 --- a/cegcc/src/binutils/bfd/elf32-s390.c +++ b/cegcc/src/binutils/bfd/elf32-s390.c @@ -1,5 +1,5 @@ /* IBM S/390-specific support for 32-bit ELF - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Carl B. Pedersen and Martin Schwidefsky. @@ -730,8 +730,8 @@ struct elf_s390_link_hash_table bfd_vma offset; } tls_ldm_got; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; }; /* Get the s390 ELF linker hash table from a link_info structure. */ @@ -800,7 +800,7 @@ elf_s390_link_hash_table_create (abfd) ret->sdynbss = NULL; ret->srelbss = NULL; ret->tls_ldm_got.refcount = 0; - ret->sym_sec.abfd = NULL; + ret->sym_cache.abfd = NULL; return &ret->elf.root; } @@ -821,18 +821,10 @@ create_got_section (dynobj, info) htab = elf_s390_hash_table (info); htab->sgot = bfd_get_section_by_name (dynobj, ".got"); htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); - if (!htab->sgot || !htab->sgotplt) + htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); + if (!htab->sgot || !htab->sgotplt || !htab->srelgot) abort (); - htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got", - (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)); - if (htab->srelgot == NULL - || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2)) - return FALSE; return TRUE; } @@ -1261,7 +1253,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs) && ELF32_R_TYPE (rel->r_info) != R_390_PC32DBL && ELF32_R_TYPE (rel->r_info) != R_390_PC32) || (h != NULL - && (! info->symbolic + && (! SYMBOLIC_BIND (info, h) || h->root.type == bfd_link_hash_defweak || !h->def_regular)))) || (ELIMINATE_COPY_RELOCS @@ -1302,12 +1294,17 @@ elf_s390_check_relocs (abfd, info, sec, relocs) easily. Oh well. */ asection *s; void *vpp; + Elf_Internal_Sym *isym; - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (s == NULL) + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; + vpp = &elf_section_data (s)->local_dynrel; head = (struct elf_s390_dyn_relocs **) vpp; } @@ -1566,11 +1563,9 @@ elf_s390_adjust_dynamic_symbol (info, h) || h->needs_plt) { if (h->plt.refcount <= 0 - || (! info->shared - && !h->def_dynamic - && !h->ref_dynamic - && h->root.type != bfd_link_hash_undefweak - && h->root.type != bfd_link_hash_undefined)) + || SYMBOL_CALLS_LOCAL (info, h) + || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + && h->root.type != bfd_link_hash_undefweak)) { /* This case can occur if we saw a PLT32 reloc in an input file, but the symbol was never referred to by a dynamic @@ -1709,9 +1704,7 @@ allocate_dynrelocs (h, inf) htab = elf_s390_hash_table (info); if (htab->elf.dynamic_sections_created - && h->plt.refcount > 0 - && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT - || h->root.type != bfd_link_hash_undefweak)) + && h->plt.refcount > 0) { /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ @@ -1840,7 +1833,7 @@ allocate_dynrelocs (h, inf) if (info->shared) { - if (SYMBOL_REFERENCES_LOCAL (info, h)) + if (SYMBOL_CALLS_LOCAL (info, h)) { struct elf_s390_dyn_relocs **pp; @@ -2364,10 +2357,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section, dyn = htab->elf.dynamic_sections_created; if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h) || (info->shared - && (info->symbolic - || h->dynindx == -1 - || h->forced_local) - && h->def_regular) + && SYMBOL_REFERENCES_LOCAL (info, h)) || (ELF_ST_VISIBILITY (h->other) && h->root.type == bfd_link_hash_undefweak)) { @@ -2537,8 +2527,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section, && r_type != R_390_PC16DBL && r_type != R_390_PC32DBL && r_type != R_390_PC32) - || (h != NULL - && !SYMBOL_REFERENCES_LOCAL (info, h)))) + || !SYMBOL_CALLS_LOCAL (info, h))) || (ELIMINATE_COPY_RELOCS && !info->shared && h != NULL @@ -2580,7 +2569,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section, || r_type == R_390_PC32DBL || r_type == R_390_PC32 || !info->shared - || !info->symbolic + || !SYMBOLIC_BIND (info, h) || !h->def_regular)) { outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); @@ -3262,11 +3251,10 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym) The entry in the global offset table will already have been initialized in the relocate_section function. */ if (info->shared - && (info->symbolic - || h->dynindx == -1 - || h->forced_local) - && h->def_regular) + && SYMBOL_REFERENCES_LOCAL (info, h)) { + if (!h->def_regular) + return FALSE; BFD_ASSERT((h->got.offset & 1) != 0); rela.r_info = ELF32_R_INFO (0, R_390_RELATIVE); rela.r_addend = (h->root.u.def.value diff --git a/cegcc/src/binutils/bfd/elf32-score.c b/cegcc/src/binutils/bfd/elf32-score.c index 813f21ead..a3308286d 100644 --- a/cegcc/src/binutils/bfd/elf32-score.c +++ b/cegcc/src/binutils/bfd/elf32-score.c @@ -1,6 +1,7 @@ /* 32-bit ELF support for S+core. - Copyright 2006, 2007 Free Software Foundation, Inc. + Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by + Brain.lin (brain.lin@sunplusct.com) Mei Ligang (ligang@sunnorth.com.cn) Pei-Lin Tsai (pltsai@sunplus.com) @@ -30,10 +31,13 @@ #include "elf/common.h" #include "elf/internal.h" #include "hashtab.h" +#include "elf32-score.h" -/* Score ELF linker hash table. */ +int score3 = 0; +int score7 = 1; +/* Score ELF linker hash table. */ struct score_elf_link_hash_table { /* The main hash table. */ @@ -42,7 +46,6 @@ struct score_elf_link_hash_table /* The SCORE ELF linker needs additional information for each symbol in the global hash table. */ - struct score_elf_link_hash_entry { struct elf_link_hash_entry root; @@ -175,7 +178,7 @@ struct _score_elf_section_data #define SCORE_ELF_STUB_SECTION_NAME (".SCORE.stub") #define SCORE_FUNCTION_STUB_SIZE (16) -#define STUB_LW 0xc3bcc010 /* lw r29, [r28, -0x3ff0] */ +#define STUB_LW 0xc3bcc010 /* lw r29, [r28, -0x3ff0] */ #define STUB_MOVE 0x8363bc56 /* mv r27, r3 */ #define STUB_LI16 0x87548000 /* ori r26, .dynsym_index */ #define STUB_BRL 0x801dbc09 /* brl r29 */ @@ -198,10 +201,6 @@ struct _score_elf_section_data #define SCORE_ELF_LOG_FILE_ALIGN(abfd)\ (get_elf_backend_data (abfd)->s->log_file_align) -#ifndef NUM_ELEM -#define NUM_ELEM(a) (sizeof (a) / (sizeof (a)[0])) -#endif - static bfd_byte *hi16_rel_addr; /* This will be used when we sort the dynamic relocation records. */ @@ -216,14 +215,112 @@ static asection score_elf_scom_section; static asymbol score_elf_scom_symbol; static asymbol *score_elf_scom_symbol_ptr; +static bfd_vma +score_bfd_get_16 (bfd *abfd, const void *data) +{ + return bfd_get_16 (abfd, data); +} + +static bfd_vma +score3_bfd_getl32 (const void *p) +{ + const bfd_byte *addr = p; + unsigned long v; + + v = (unsigned long) addr[2]; + v |= (unsigned long) addr[3] << 8; + v |= (unsigned long) addr[0] << 16; + v |= (unsigned long) addr[1] << 24; + return v; +} + +static bfd_vma +score3_bfd_getl48 (const void *p) +{ + const bfd_byte *addr = p; + unsigned long long v; + + v = (unsigned long long) addr[4]; + v |= (unsigned long long) addr[5] << 8; + v |= (unsigned long long) addr[2] << 16; + v |= (unsigned long long) addr[3] << 24; + v |= (unsigned long long) addr[0] << 32; + v |= (unsigned long long) addr[1] << 40; + return v; +} + +static bfd_vma +score_bfd_get_32 (bfd *abfd, const void *data) +{ + if (/* score3 && */ abfd->xvec->byteorder == BFD_ENDIAN_LITTLE) + return score3_bfd_getl32 (data); + else + return bfd_get_32 (abfd, data); +} + +static bfd_vma +score_bfd_get_48 (bfd *abfd, const void *p) +{ + if (/* score3 && */ abfd->xvec->byteorder == BFD_ENDIAN_LITTLE) + return score3_bfd_getl48 (p); + else + return bfd_get_bits (p, 48, 1); +} + +static void +score_bfd_put_16 (bfd *abfd, bfd_vma addr, void *data) +{ + return bfd_put_16 (abfd, addr, data); +} + +static void +score3_bfd_putl32 (bfd_vma data, void *p) +{ + bfd_byte *addr = p; + addr[0] = (data >> 16) & 0xff; + addr[1] = (data >> 24) & 0xff; + addr[2] = data & 0xff; + addr[3] = (data >> 8) & 0xff; +} + +static void +score3_bfd_putl48 (bfd_vma data, void *p) +{ + bfd_byte *addr = p; + addr[0] = (data >> 32) & 0xff; + addr[1] = (data >> 40) & 0xff; + addr[2] = (data >> 16) & 0xff; + addr[3] = (data >> 24) & 0xff; + addr[4] = data & 0xff; + addr[5] = (data >> 8) & 0xff; +} + +static void +score_bfd_put_32 (bfd *abfd, bfd_vma addr, void *data) +{ + if (/* score3 && */ abfd->xvec->byteorder == BFD_ENDIAN_LITTLE) + return score3_bfd_putl32 (addr, data); + else + return bfd_put_32 (abfd, addr, data); +} + +static void +score_bfd_put_48 (bfd *abfd, bfd_vma val, void *p) +{ + if (/* score3 && */ abfd->xvec->byteorder == BFD_ENDIAN_LITTLE) + return score3_bfd_putl48 (val, p); + else + return bfd_put_bits (val, p, 48, 1); +} + static bfd_reloc_status_type score_elf_hi16_reloc (bfd *abfd ATTRIBUTE_UNUSED, - arelent *reloc_entry, - asymbol *symbol ATTRIBUTE_UNUSED, - void * data, - asection *input_section ATTRIBUTE_UNUSED, - bfd *output_bfd ATTRIBUTE_UNUSED, - char **error_message ATTRIBUTE_UNUSED) + arelent *reloc_entry, + asymbol *symbol ATTRIBUTE_UNUSED, + void * data, + asection *input_section ATTRIBUTE_UNUSED, + bfd *output_bfd ATTRIBUTE_UNUSED, + char **error_message ATTRIBUTE_UNUSED) { hi16_rel_addr = (bfd_byte *) data + reloc_entry->address; return bfd_reloc_ok; @@ -231,20 +328,20 @@ score_elf_hi16_reloc (bfd *abfd ATTRIBUTE_UNUSED, static bfd_reloc_status_type score_elf_lo16_reloc (bfd *abfd, - arelent *reloc_entry, - asymbol *symbol ATTRIBUTE_UNUSED, - void * data, - asection *input_section, - bfd *output_bfd ATTRIBUTE_UNUSED, - char **error_message ATTRIBUTE_UNUSED) + arelent *reloc_entry, + asymbol *symbol ATTRIBUTE_UNUSED, + void * data, + asection *input_section, + bfd *output_bfd ATTRIBUTE_UNUSED, + char **error_message ATTRIBUTE_UNUSED) { bfd_vma addend = 0, offset = 0; unsigned long val; unsigned long hi16_offset, hi16_value, uvalue; - hi16_value = bfd_get_32 (abfd, hi16_rel_addr); + hi16_value = score_bfd_get_32 (abfd, hi16_rel_addr); hi16_offset = ((((hi16_value >> 16) & 0x3) << 15) | (hi16_value & 0x7fff)) >> 1; - addend = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); + addend = score_bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); offset = ((((addend >> 16) & 0x3) << 15) | (addend & 0x7fff)) >> 1; val = reloc_entry->addend; if (reloc_entry->address > input_section->size) @@ -252,10 +349,10 @@ score_elf_lo16_reloc (bfd *abfd, uvalue = ((hi16_offset << 16) | (offset & 0xffff)) + val; hi16_offset = (uvalue >> 16) << 1; hi16_value = (hi16_value & ~0x37fff) | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000); - bfd_put_32 (abfd, hi16_value, hi16_rel_addr); + score_bfd_put_32 (abfd, hi16_value, hi16_rel_addr); offset = (uvalue & 0xffff) << 1; addend = (addend & ~0x37fff) | (offset & 0x7fff) | ((offset << 1) & 0x30000); - bfd_put_32 (abfd, addend, (bfd_byte *) data + reloc_entry->address); + score_bfd_put_32 (abfd, addend, (bfd_byte *) data + reloc_entry->address); return bfd_reloc_ok; } @@ -284,17 +381,17 @@ score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) else { for (i = 0; i < count; i++, sym++) - { - const char *name; + { + const char *name; - name = bfd_asymbol_name (*sym); - if (*name == '_' && strcmp (name, "_gp") == 0) - { - *pgp = bfd_asymbol_value (*sym); - _bfd_set_gp_value (output_bfd, *pgp); - break; - } - } + name = bfd_asymbol_name (*sym); + if (*name == '_' && strcmp (name, "_gp") == 0) + { + *pgp = bfd_asymbol_value (*sym); + _bfd_set_gp_value (output_bfd, *pgp); + break; + } + } } if (i >= count) @@ -313,13 +410,12 @@ score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) BFD. If we can't find it, we're stuck. We cache it in the ELF target data. We don't need to adjust the symbol value for an external symbol if we are producing relocatable output. */ - static bfd_reloc_status_type score_elf_final_gp (bfd *output_bfd, - asymbol *symbol, - bfd_boolean relocatable, - char **error_message, - bfd_vma *pgp) + asymbol *symbol, + bfd_boolean relocatable, + char **error_message, + bfd_vma *pgp) { if (bfd_is_und_section (symbol->section) && ! relocatable) @@ -331,20 +427,20 @@ score_elf_final_gp (bfd *output_bfd, *pgp = _bfd_get_gp_value (output_bfd); if (*pgp == 0 && (! relocatable - || (symbol->flags & BSF_SECTION_SYM) != 0)) + || (symbol->flags & BSF_SECTION_SYM) != 0)) { if (relocatable) - { - /* Make up a value. */ - *pgp = symbol->section->output_section->vma + 0x4000; - _bfd_set_gp_value (output_bfd, *pgp); - } + { + /* Make up a value. */ + *pgp = symbol->section->output_section->vma + 0x4000; + _bfd_set_gp_value (output_bfd, *pgp); + } else if (!score_elf_assign_gp (output_bfd, pgp)) - { - *error_message = - (char *) _("GP relative relocation when _gp not defined"); - return bfd_reloc_dangerous; - } + { + *error_message = + (char *) _("GP relative relocation when _gp not defined"); + return bfd_reloc_dangerous; + } } return bfd_reloc_ok; @@ -352,12 +448,12 @@ score_elf_final_gp (bfd *output_bfd, static bfd_reloc_status_type score_elf_gprel15_with_gp (bfd *abfd, - asymbol *symbol, - arelent *reloc_entry, - asection *input_section, - bfd_boolean relocateable, - void * data, - bfd_vma gp ATTRIBUTE_UNUSED) + asymbol *symbol, + arelent *reloc_entry, + asection *input_section, + bfd_boolean relocateable, + void * data, + bfd_vma gp ATTRIBUTE_UNUSED) { bfd_vma relocation; unsigned long insn; @@ -372,13 +468,13 @@ score_elf_gprel15_with_gp (bfd *abfd, if (reloc_entry->address > input_section->size) return bfd_reloc_outofrange; - insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); + insn = score_bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); if (((reloc_entry->addend & 0xffffc000) != 0) && ((reloc_entry->addend & 0xffffc000) != 0xffffc000)) return bfd_reloc_overflow; insn = (insn & ~0x7fff) | (reloc_entry->addend & 0x7fff); - bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address); + score_bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address); if (relocateable) reloc_entry->address += input_section->output_offset; @@ -387,8 +483,8 @@ score_elf_gprel15_with_gp (bfd *abfd, static bfd_reloc_status_type gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, - asection *input_section, bfd_boolean relocatable, - void *data, bfd_vma gp) + asection *input_section, bfd_boolean relocatable, + void *data, bfd_vma gp) { bfd_vma relocation; bfd_vma val; @@ -408,7 +504,7 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, val = reloc_entry->addend; if (reloc_entry->howto->partial_inplace) - val += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); + val += score_bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); /* Adjust val for the final section location and GP value. If we are producing relocatable output, we don't want to do this for @@ -418,7 +514,7 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, val += relocation - gp; if (reloc_entry->howto->partial_inplace) - bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address); + score_bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address); else reloc_entry->addend = val; @@ -430,24 +526,24 @@ gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, static bfd_reloc_status_type score_elf_gprel15_reloc (bfd *abfd, - arelent *reloc_entry, - asymbol *symbol, - void * data, - asection *input_section, - bfd *output_bfd, - char **error_message) + arelent *reloc_entry, + asymbol *symbol, + void * data, + asection *input_section, + bfd *output_bfd, + char **error_message) { bfd_boolean relocateable; bfd_reloc_status_type ret; bfd_vma gp; - if (output_bfd != (bfd *) NULL + if (output_bfd != NULL && (symbol->flags & BSF_SECTION_SYM) == 0 && reloc_entry->addend == 0) { reloc_entry->address += input_section->output_offset; return bfd_reloc_ok; } - if (output_bfd != (bfd *) NULL) + if (output_bfd != NULL) relocateable = TRUE; else { @@ -468,8 +564,8 @@ score_elf_gprel15_reloc (bfd *abfd, static bfd_reloc_status_type score_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, - void *data, asection *input_section, bfd *output_bfd, - char **error_message) + void *data, asection *input_section, bfd *output_bfd, + char **error_message) { bfd_boolean relocatable; bfd_reloc_status_type ret; @@ -481,7 +577,7 @@ score_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, && (symbol->flags & BSF_LOCAL) != 0) { *error_message = (char *) - _("32bits gp relative relocation occurs for an external symbol"); + _("32bits gp relative relocation occurs for an external symbol"); return bfd_reloc_outofrange; } @@ -497,48 +593,47 @@ score_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, if (ret != bfd_reloc_ok) return ret; - gp = 0; /* FIXME. */ + gp = 0; return gprel32_with_gp (abfd, symbol, reloc_entry, input_section, - relocatable, data, gp); + relocatable, data, gp); } /* A howto special_function for R_SCORE_GOT15 relocations. This is just like any other 16-bit relocation when applied to global symbols, but is treated in the same as R_SCORE_HI16 when applied to local symbols. */ - static bfd_reloc_status_type score_elf_got15_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, - void *data, asection *input_section, - bfd *output_bfd, char **error_message) + void *data, asection *input_section, + bfd *output_bfd, char **error_message) { if ((symbol->flags & (BSF_GLOBAL | BSF_WEAK)) != 0 || bfd_is_und_section (bfd_get_section (symbol)) || bfd_is_com_section (bfd_get_section (symbol))) /* The relocation is against a global symbol. */ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, - input_section, output_bfd, - error_message); + input_section, output_bfd, + error_message); return score_elf_hi16_reloc (abfd, reloc_entry, symbol, data, - input_section, output_bfd, error_message); + input_section, output_bfd, error_message); } static bfd_reloc_status_type score_elf_got_lo16_reloc (bfd *abfd, - arelent *reloc_entry, - asymbol *symbol ATTRIBUTE_UNUSED, - void * data, - asection *input_section, - bfd *output_bfd ATTRIBUTE_UNUSED, - char **error_message ATTRIBUTE_UNUSED) + arelent *reloc_entry, + asymbol *symbol ATTRIBUTE_UNUSED, + void * data, + asection *input_section, + bfd *output_bfd ATTRIBUTE_UNUSED, + char **error_message ATTRIBUTE_UNUSED) { bfd_vma addend = 0, offset = 0; signed long val; signed long hi16_offset, hi16_value, uvalue; - hi16_value = bfd_get_32 (abfd, hi16_rel_addr); + hi16_value = score_bfd_get_32 (abfd, hi16_rel_addr); hi16_offset = ((((hi16_value >> 16) & 0x3) << 15) | (hi16_value & 0x7fff)) >> 1; - addend = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); + addend = score_bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); offset = ((((addend >> 16) & 0x3) << 15) | (addend & 0x7fff)) >> 1; val = reloc_entry->addend; if (reloc_entry->address > input_section->size) @@ -549,10 +644,10 @@ score_elf_got_lo16_reloc (bfd *abfd, else hi16_offset = (uvalue >> 16) & 0x7fff; hi16_value = (hi16_value & ~0x37fff) | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000); - bfd_put_32 (abfd, hi16_value, hi16_rel_addr); + score_bfd_put_32 (abfd, hi16_value, hi16_rel_addr); offset = (uvalue & 0xffff) << 1; addend = (addend & ~0x37fff) | (offset & 0x7fff) | ((offset << 1) & 0x30000); - bfd_put_32 (abfd, addend, (bfd_byte *) data + reloc_entry->address); + score_bfd_put_32 (abfd, addend, (bfd_byte *) data + reloc_entry->address); return bfd_reloc_ok; } @@ -581,7 +676,7 @@ static reloc_howto_type elf32_score_howto_table[] = FALSE, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ - score_elf_hi16_reloc, /* special_function */ + score_elf_hi16_reloc, /* special_function */ "R_SCORE_HI16", /* name */ TRUE, /* partial_inplace */ 0x37fff, /* src_mask */ @@ -603,19 +698,19 @@ static reloc_howto_type elf32_score_howto_table[] = 0x37fff, /* dst_mask */ FALSE), /* pcrel_offset */ - /* R_SCORE_DUMMY1 */ - HOWTO (R_SCORE_DUMMY1, /* type */ - 0, /* rightshift */ + /* R_SCORE_BCMP */ + HOWTO (R_SCORE_BCMP, /* type */ + 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + TRUE, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ - "R_SCORE_DUMMY1", /* name */ - TRUE, /* partial_inplace */ - 0x0000ffff, /* src_mask */ - 0x0000ffff, /* dst_mask */ + "R_SCORE_BCMP", /* name */ + FALSE, /* partial_inplace */ + 0x03e00381, /* src_mask */ + 0x03e00381, /* dst_mask */ FALSE), /* pcrel_offset */ /*R_SCORE_24 */ @@ -667,15 +762,15 @@ static reloc_howto_type elf32_score_howto_table[] = HOWTO (R_SCORE16_PC8, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ - 8, /* bitsize */ + 9, /* bitsize */ TRUE, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE16_PC8", /* name */ FALSE, /* partial_inplace */ - 0x000000ff, /* src_mask */ - 0x000000ff, /* dst_mask */ + 0x000001ff, /* src_mask */ + 0x000001ff, /* dst_mask */ FALSE), /* pcrel_offset */ /* 32 bit absolute */ @@ -830,18 +925,18 @@ static reloc_howto_type elf32_score_howto_table[] = /* 32 bit symbol relative relocation. */ HOWTO (R_SCORE_REL32, /* type */ - 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - FALSE, /* pc_relative */ - 0, /* bitpos */ - complain_overflow_dont,/* complain_on_overflow */ - bfd_elf_generic_reloc, /* special_function */ - "R_SCORE_REL32", /* name */ - TRUE, /* partial_inplace */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont,/* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_SCORE_REL32", /* name */ + TRUE, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ + FALSE), /* pcrel_offset */ /* R_SCORE_DUMMY_HI16 */ HOWTO (R_SCORE_DUMMY_HI16, /* type */ @@ -851,12 +946,42 @@ static reloc_howto_type elf32_score_howto_table[] = FALSE, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ - score_elf_hi16_reloc, /* special_function */ + score_elf_hi16_reloc, /* special_function */ "R_SCORE_DUMMY_HI16", /* name */ TRUE, /* partial_inplace */ 0x37fff, /* src_mask */ 0x37fff, /* dst_mask */ FALSE), /* pcrel_offset */ + + /* R_SCORE_IMM30 */ + HOWTO (R_SCORE_IMM30, /* type */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 30, /* bitsize */ + FALSE, /* pc_relative */ + 7, /* bitpos */ + complain_overflow_dont,/* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_SCORE_IMM30", /* name */ + FALSE, /* partial_inplace */ + 0x7f7fff7f80LL, /* src_mask */ + 0x7f7fff7f80LL, /* dst_mask */ + FALSE), /* pcrel_offset */ + + /* R_SCORE_IMM32 */ + HOWTO (R_SCORE_IMM32, /* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + FALSE, /* pc_relative */ + 5, /* bitpos */ + complain_overflow_dont,/* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_SCORE_IMM32", /* name */ + FALSE, /* partial_inplace */ + 0x7f7fff7fe0LL, /* src_mask */ + 0x7f7fff7fe0LL, /* dst_mask */ + FALSE), /* pcrel_offset */ }; struct score_reloc_map @@ -870,7 +995,7 @@ static const struct score_reloc_map elf32_score_reloc_map[] = {BFD_RELOC_NONE, R_SCORE_NONE}, {BFD_RELOC_HI16_S, R_SCORE_HI16}, {BFD_RELOC_LO16, R_SCORE_LO16}, - {BFD_RELOC_SCORE_DUMMY1, R_SCORE_DUMMY1}, + {BFD_RELOC_SCORE_BCMP, R_SCORE_BCMP}, {BFD_RELOC_SCORE_JMP, R_SCORE_24}, {BFD_RELOC_SCORE_BRANCH, R_SCORE_PC19}, {BFD_RELOC_SCORE16_JMP, R_SCORE16_11}, @@ -887,12 +1012,13 @@ static const struct score_reloc_map elf32_score_reloc_map[] = {BFD_RELOC_GPREL32, R_SCORE_GPREL32}, {BFD_RELOC_32_PCREL, R_SCORE_REL32}, {BFD_RELOC_SCORE_DUMMY_HI16, R_SCORE_DUMMY_HI16}, + {BFD_RELOC_SCORE_IMM30, R_SCORE_IMM30}, + {BFD_RELOC_SCORE_IMM32, R_SCORE_IMM32}, }; /* got_entries only match if they're identical, except for gotidx, so use all fields to compute the hash, and compare the appropriate union members. */ - static hashval_t score_elf_got_entry_hash (const void *entry_) { @@ -910,14 +1036,13 @@ score_elf_got_entry_eq (const void *entry1, const void *entry2) return e1->abfd == e2->abfd && e1->symndx == e2->symndx && (! e1->abfd ? e1->d.address == e2->d.address - : e1->symndx >= 0 ? e1->d.addend == e2->d.addend - : e1->d.h == e2->d.h); + : e1->symndx >= 0 ? e1->d.addend == e2->d.addend + : e1->d.h == e2->d.h); } /* If H needs a GOT entry, assign it the highest available dynamic index. Otherwise, assign it the lowest available dynamic index. */ - static bfd_boolean score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data) { @@ -937,7 +1062,7 @@ score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data) if (h->root.got.offset == 2) { if (hsd->max_unref_got_dynindx == hsd->min_got_dynindx) - hsd->low = (struct elf_link_hash_entry *) h; + hsd->low = (struct elf_link_hash_entry *) h; h->root.dynindx = hsd->max_unref_got_dynindx++; } else if (h->root.got.offset != 1) @@ -963,7 +1088,6 @@ score_elf_got_section (bfd *abfd, bfd_boolean maybe_excluded) /* Returns the GOT information associated with the link indicated by INFO. If SGOTP is non-NULL, it is filled in with the GOT section. */ - static struct score_got_info * score_elf_got_info (bfd *abfd, asection **sgotp) { @@ -985,12 +1109,11 @@ score_elf_got_info (bfd *abfd, asection **sgotp) appear towards the end. This reduces the amount of GOT space required. MAX_LOCAL is used to set the number of local symbols known to be in the dynamic symbol table. During - _bfd_score_elf_size_dynamic_sections, this value is 1. Afterward, the + s3_bfd_score_elf_size_dynamic_sections, this value is 1. Afterward, the section symbols are added and the count is higher. */ - static bfd_boolean score_elf_sort_hash_table (struct bfd_link_info *info, - unsigned long max_local) + unsigned long max_local) { struct score_elf_hash_sort_data hsd; struct score_got_info *g; @@ -1013,15 +1136,15 @@ score_elf_sort_hash_table (struct bfd_link_info *info, - (g->next ? g->assigned_gotno : 0); hsd.max_non_got_dynindx = max_local; score_elf_link_hash_traverse (((struct score_elf_link_hash_table *) - elf_hash_table (info)), - score_elf_sort_hash_table_f, - &hsd); + elf_hash_table (info)), + score_elf_sort_hash_table_f, + &hsd); /* There should have been enough room in the symbol table to accommodate both the GOT and non-GOT symbols. */ BFD_ASSERT (hsd.max_non_got_dynindx <= hsd.min_got_dynindx); BFD_ASSERT ((unsigned long)hsd.max_unref_got_dynindx - <= elf_hash_table (info)->dynsymcount); + <= elf_hash_table (info)->dynsymcount); /* Now we know which dynamic symbol has the lowest dynamic symbol table index in the GOT. */ @@ -1031,11 +1154,10 @@ score_elf_sort_hash_table (struct bfd_link_info *info, } /* Create an entry in an score ELF linker hash table. */ - static struct bfd_hash_entry * score_elf_link_hash_newfunc (struct bfd_hash_entry *entry, - struct bfd_hash_table *table, - const char *string) + struct bfd_hash_table *table, + const char *string) { struct score_elf_link_hash_entry *ret = (struct score_elf_link_hash_entry *)entry; @@ -1062,16 +1184,15 @@ score_elf_link_hash_newfunc (struct bfd_hash_entry *entry, /* Returns the first relocation of type r_type found, beginning with RELOCATION. RELEND is one-past-the-end of the relocation table. */ - static const Elf_Internal_Rela * score_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type, - const Elf_Internal_Rela *relocation, - const Elf_Internal_Rela *relend) + const Elf_Internal_Rela *relocation, + const Elf_Internal_Rela *relend) { while (relocation < relend) { if (ELF32_R_TYPE (relocation->r_info) == r_type) - return relocation; + return relocation; ++relocation; } @@ -1083,7 +1204,6 @@ score_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type, /* This function is called via qsort() to sort the dynamic relocation entries by increasing r_symndx value. */ - static int score_elf_sort_dynamic_relocs (const void *arg1, const void *arg2) { @@ -1097,11 +1217,11 @@ score_elf_sort_dynamic_relocs (const void *arg1, const void *arg2) } /* Return whether a relocation is against a local symbol. */ - static bfd_boolean score_elf_local_relocation_p (bfd *input_bfd, - const Elf_Internal_Rela *relocation, - bfd_boolean check_forced) + const Elf_Internal_Rela *relocation, + asection **local_sections, + bfd_boolean check_forced) { unsigned long r_symndx; Elf_Internal_Shdr *symtab_hdr; @@ -1110,29 +1230,30 @@ score_elf_local_relocation_p (bfd *input_bfd, r_symndx = ELF32_R_SYM (relocation->r_info); symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; - extsymoff = symtab_hdr->sh_info; + extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info; if (r_symndx < extsymoff) return TRUE; + if (elf_bad_symtab (input_bfd) && local_sections[r_symndx] != NULL) + return TRUE; if (check_forced) { /* Look up the hash table to check whether the symbol was forced local. */ h = (struct score_elf_link_hash_entry *) - elf_sym_hashes (input_bfd) [r_symndx - extsymoff]; + elf_sym_hashes (input_bfd) [r_symndx - extsymoff]; /* Find the real hash-table entry for this symbol. */ while (h->root.root.type == bfd_link_hash_indirect - || h->root.root.type == bfd_link_hash_warning) - h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link; + || h->root.root.type == bfd_link_hash_warning) + h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link; if (h->root.forced_local) - return TRUE; + return TRUE; } return FALSE; } /* Returns the dynamic relocation section for DYNOBJ. */ - static asection * score_elf_rel_dyn_section (bfd *dynobj, bfd_boolean create_p) { @@ -1150,11 +1271,11 @@ score_elf_rel_dyn_section (bfd *dynobj, bfd_boolean create_p) | SEC_LINKER_CREATED | SEC_READONLY)); if (sreloc == NULL - || ! bfd_set_section_alignment (dynobj, sreloc, - SCORE_ELF_LOG_FILE_ALIGN (dynobj))) - return NULL; + || ! bfd_set_section_alignment (dynobj, sreloc, + SCORE_ELF_LOG_FILE_ALIGN (dynobj))) + return NULL; } - return sreloc; + return sreloc; } static void @@ -1178,14 +1299,13 @@ score_elf_allocate_dynamic_relocations (bfd *abfd, unsigned int n) is the original relocation, which is now being transformed into a dynamic relocation. The ADDENDP is adjusted if necessary; the caller should store the result in place of the original addend. */ - static bfd_boolean score_elf_create_dynamic_relocation (bfd *output_bfd, - struct bfd_link_info *info, - const Elf_Internal_Rela *rel, - struct score_elf_link_hash_entry *h, - bfd_vma symbol, - bfd_vma *addendp, asection *input_section) + struct bfd_link_info *info, + const Elf_Internal_Rela *rel, + struct score_elf_link_hash_entry *h, + bfd_vma symbol, + bfd_vma *addendp, asection *input_section) { Elf_Internal_Rela outrel[3]; asection *sreloc; @@ -1215,8 +1335,8 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, if (outrel[0].r_offset == MINUS_TWO) { /* The relocation field has been converted into a relative value of - some sort. Functions like _bfd_elf_write_section_eh_frame expect - the field to be fully relocated, so add in the symbol's value. */ + some sort. Functions like _bfd_elf_write_section_eh_frame expect + the field to be fully relocated, so add in the symbol's value. */ *addendp += symbol; return TRUE; } @@ -1226,14 +1346,14 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, if (h != NULL && (! info->symbolic || !h->root.def_regular) /* h->root.dynindx may be -1 if this symbol was marked to - become local. */ + become local. */ && h->root.dynindx != -1) { indx = h->root.dynindx; - /* ??? glibc's ld.so just adds the final GOT entry to the - relocation field. It therefore treats relocs against - defined symbols in the same way as relocs against - undefined symbols. */ + /* ??? glibc's ld.so just adds the final GOT entry to the + relocation field. It therefore treats relocs against + defined symbols in the same way as relocs against + undefined symbols. */ defined_p = FALSE; } else @@ -1271,11 +1391,11 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, /* Adjust the output offset of the relocation to reference the correct location in the output file. */ outrel[0].r_offset += (input_section->output_section->vma - + input_section->output_offset); + + input_section->output_offset); outrel[1].r_offset += (input_section->output_section->vma - + input_section->output_offset); + + input_section->output_offset); outrel[2].r_offset += (input_section->output_section->vma - + input_section->output_offset); + + input_section->output_offset); /* Put the relocation back out. We have to use the special relocation outputter in the 64-bit case since the 64-bit @@ -1297,7 +1417,7 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, static bfd_boolean score_elf_create_got_section (bfd *abfd, struct bfd_link_info *info, - bfd_boolean maybe_exclude) + bfd_boolean maybe_exclude) { flagword flags; asection *s; @@ -1311,7 +1431,7 @@ score_elf_create_got_section (bfd *abfd, if (s) { if (! maybe_exclude) - s->flags &= ~SEC_EXCLUDE; + s->flags &= ~SEC_EXCLUDE; return TRUE; } @@ -1332,8 +1452,8 @@ score_elf_create_got_section (bfd *abfd, are not creating a global offset table. */ bh = NULL; if (! (_bfd_generic_link_add_one_symbol - (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s, - 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) + (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s, + 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) return FALSE; h = (struct elf_link_hash_entry *) bh; @@ -1357,7 +1477,7 @@ score_elf_create_got_section (bfd *abfd, g->next = NULL; g->got_entries = htab_try_create (1, score_elf_got_entry_hash, - score_elf_got_entry_eq, NULL); + score_elf_got_entry_eq, NULL); if (g->got_entries == NULL) return FALSE; score_elf_section_data (s)->u.got_info = g; @@ -1367,7 +1487,6 @@ score_elf_create_got_section (bfd *abfd, } /* Calculate the %high function. */ - static bfd_vma score_elf_high (bfd_vma value) { @@ -1376,15 +1495,14 @@ score_elf_high (bfd_vma value) /* Create a local GOT entry for VALUE. Return the index of the entry, or -1 if it could not be created. */ - static struct score_got_entry * score_elf_create_local_got_entry (bfd *abfd, bfd *ibfd ATTRIBUTE_UNUSED, - struct score_got_info *gg, - asection *sgot, bfd_vma value, - unsigned long r_symndx ATTRIBUTE_UNUSED, - struct score_elf_link_hash_entry *h ATTRIBUTE_UNUSED, - int r_type ATTRIBUTE_UNUSED) + struct score_got_info *gg, + asection *sgot, bfd_vma value, + unsigned long r_symndx ATTRIBUTE_UNUSED, + struct score_elf_link_hash_entry *h ATTRIBUTE_UNUSED, + int r_type ATTRIBUTE_UNUSED) { struct score_got_entry entry, **loc; struct score_got_info *g; @@ -1412,22 +1530,21 @@ score_elf_create_local_got_entry (bfd *abfd, (*loc)->gotidx = -1; /* We didn't allocate enough space in the GOT. */ (*_bfd_error_handler) - (_("not enough GOT space for local GOT entries")); + (_("not enough GOT space for local GOT entries")); bfd_set_error (bfd_error_bad_value); return NULL; } - bfd_put_32 (abfd, value, (sgot->contents + entry.gotidx)); + score_bfd_put_32 (abfd, value, (sgot->contents + entry.gotidx)); return *loc; } /* Find a GOT entry whose higher-order 16 bits are the same as those for value. Return the index into the GOT for this entry. */ - static bfd_vma score_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, - bfd_vma value, bfd_boolean external) + bfd_vma value, bfd_boolean external) { asection *sgot; struct score_got_info *g; @@ -1436,16 +1553,16 @@ score_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, if (!external) { /* Although the ABI says that it is "the high-order 16 bits" that we - want, it is really the %high value. The complete value is - calculated with a `addiu' of a LO16 relocation, just as with a - HI16/LO16 pair. */ + want, it is really the %high value. The complete value is + calculated with a `addiu' of a LO16 relocation, just as with a + HI16/LO16 pair. */ value = score_elf_high (value) << 16; } g = score_elf_got_info (elf_hash_table (info)->dynobj, &sgot); entry = score_elf_create_local_got_entry (abfd, ibfd, g, sgot, value, 0, NULL, - R_SCORE_GOT15); + R_SCORE_GOT15); if (entry) return entry->gotidx; else @@ -1453,9 +1570,9 @@ score_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, } static void -_bfd_score_elf_hide_symbol (struct bfd_link_info *info, - struct elf_link_hash_entry *entry, - bfd_boolean force_local) +s3_bfd_score_elf_hide_symbol (struct bfd_link_info *info, + struct elf_link_hash_entry *entry, + bfd_boolean force_local) { bfd *dynobj; asection *got; @@ -1472,55 +1589,55 @@ _bfd_score_elf_hide_symbol (struct bfd_link_info *info, { got = score_elf_got_section (dynobj, FALSE); if (got == NULL) - return; + return; g = score_elf_section_data (got)->u.got_info; if (g->next) - { - struct score_got_entry e; - struct score_got_info *gg = g; - - /* Since we're turning what used to be a global symbol into a - local one, bump up the number of local entries of each GOT - that had an entry for it. This will automatically decrease - the number of global entries, since global_gotno is actually - the upper limit of global entries. */ - e.abfd = dynobj; - e.symndx = -1; - e.d.h = h; - - for (g = g->next; g != gg; g = g->next) - if (htab_find (g->got_entries, &e)) - { - BFD_ASSERT (g->global_gotno > 0); - g->local_gotno++; - g->global_gotno--; - } - - /* If this was a global symbol forced into the primary GOT, we - no longer need an entry for it. We can't release the entry - at this point, but we must at least stop counting it as one - of the symbols that required a forced got entry. */ - if (h->root.got.offset == 2) - { - BFD_ASSERT (gg->assigned_gotno > 0); - gg->assigned_gotno--; - } - } + { + struct score_got_entry e; + struct score_got_info *gg = g; + + /* Since we're turning what used to be a global symbol into a + local one, bump up the number of local entries of each GOT + that had an entry for it. This will automatically decrease + the number of global entries, since global_gotno is actually + the upper limit of global entries. */ + e.abfd = dynobj; + e.symndx = -1; + e.d.h = h; + + for (g = g->next; g != gg; g = g->next) + if (htab_find (g->got_entries, &e)) + { + BFD_ASSERT (g->global_gotno > 0); + g->local_gotno++; + g->global_gotno--; + } + + /* If this was a global symbol forced into the primary GOT, we + no longer need an entry for it. We can't release the entry + at this point, but we must at least stop counting it as one + of the symbols that required a forced got entry. */ + if (h->root.got.offset == 2) + { + BFD_ASSERT (gg->assigned_gotno > 0); + gg->assigned_gotno--; + } + } else if (g->global_gotno == 0 && g->global_gotsym == NULL) - /* If we haven't got through GOT allocation yet, just bump up the - number of local entries, as this symbol won't be counted as - global. */ - g->local_gotno++; + /* If we haven't got through GOT allocation yet, just bump up the + number of local entries, as this symbol won't be counted as + global. */ + g->local_gotno++; else if (h->root.got.offset == 1) - { - /* If we're past non-multi-GOT allocation and this symbol had - been marked for a global got entry, give it a local entry - instead. */ - BFD_ASSERT (g->global_gotno > 0); - g->local_gotno++; - g->global_gotno--; - } + { + /* If we're past non-multi-GOT allocation and this symbol had + been marked for a global got entry, give it a local entry + instead. */ + BFD_ASSERT (g->global_gotno > 0); + g->local_gotno++; + g->global_gotno--; + } } _bfd_elf_link_hash_hide_symbol (info, &h->root, force_local); @@ -1529,12 +1646,11 @@ _bfd_score_elf_hide_symbol (struct bfd_link_info *info, /* If H is a symbol that needs a global GOT entry, but has a dynamic symbol table index lower than any we've seen to date, record it for posterity. */ - static bfd_boolean score_elf_record_global_got_symbol (struct elf_link_hash_entry *h, - bfd *abfd, + bfd *abfd, struct bfd_link_info *info, - struct score_got_info *g) + struct score_got_info *g) { struct score_got_entry entry, **loc; @@ -1542,14 +1658,14 @@ score_elf_record_global_got_symbol (struct elf_link_hash_entry *h, if (h->dynindx == -1) { switch (ELF_ST_VISIBILITY (h->other)) - { - case STV_INTERNAL: - case STV_HIDDEN: - _bfd_score_elf_hide_symbol (info, h, TRUE); - break; - } + { + case STV_INTERNAL: + case STV_HIDDEN: + s3_bfd_score_elf_hide_symbol (info, h, TRUE); + break; + } if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return FALSE; } entry.abfd = abfd; @@ -1584,12 +1700,11 @@ score_elf_record_global_got_symbol (struct elf_link_hash_entry *h, /* Reserve space in G for a GOT entry containing the value of symbol SYMNDX in input bfd ABDF, plus ADDEND. */ - static bfd_boolean score_elf_record_local_got_symbol (bfd *abfd, long symndx, bfd_vma addend, - struct score_got_info *g) + struct score_got_info *g) { struct score_got_entry entry, **loc; @@ -1615,11 +1730,10 @@ score_elf_record_local_got_symbol (bfd *abfd, /* Returns the GOT offset at which the indicated address can be found. If there is not yet a GOT entry for this value, create one. Returns -1 if no satisfactory GOT offset can be found. */ - static bfd_vma score_elf_local_got_index (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, - bfd_vma value, unsigned long r_symndx, - struct score_elf_link_hash_entry *h, int r_type) + bfd_vma value, unsigned long r_symndx, + struct score_elf_link_hash_entry *h, int r_type) { asection *sgot; struct score_got_info *g; @@ -1628,7 +1742,7 @@ score_elf_local_got_index (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, g = score_elf_got_info (elf_hash_table (info)->dynobj, &sgot); entry = score_elf_create_local_got_entry (abfd, ibfd, g, sgot, value, - r_symndx, h, r_type); + r_symndx, h, r_type); if (!entry) return MINUS_ONE; @@ -1662,10 +1776,9 @@ score_elf_global_got_index (bfd *abfd, struct elf_link_hash_entry *h) } /* Returns the offset for the entry at the INDEXth position in the GOT. */ - static bfd_vma score_elf_got_offset_from_index (bfd *dynobj, bfd *output_bfd, - bfd *input_bfd ATTRIBUTE_UNUSED, bfd_vma index) + bfd *input_bfd ATTRIBUTE_UNUSED, bfd_vma index) { asection *sgot; bfd_vma gp; @@ -1694,30 +1807,30 @@ score_elf_resolve_final_got_entry (void **entryp, void *p) struct score_elf_link_hash_entry *h = entry->d.h; while (h->root.root.type == bfd_link_hash_indirect - || h->root.root.type == bfd_link_hash_warning) - h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link; + || h->root.root.type == bfd_link_hash_warning) + h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link; if (entry->d.h == h) - return 1; + return 1; entry->d.h = h; /* If we can't find this entry with the new bfd hash, re-insert - it, and get the traversal restarted. */ + it, and get the traversal restarted. */ if (! htab_find (got_entries, entry)) - { - htab_clear_slot (got_entries, entryp); - entryp = htab_find_slot (got_entries, entry, INSERT); - if (! *entryp) - *entryp = entry; - /* Abort the traversal, since the whole table may have - moved, and leave it up to the parent to restart the - process. */ - *(htab_t *)p = NULL; - return 0; - } + { + htab_clear_slot (got_entries, entryp); + entryp = htab_find_slot (got_entries, entry, INSERT); + if (! *entryp) + *entryp = entry; + /* Abort the traversal, since the whole table may have + moved, and leave it up to the parent to restart the + process. */ + *(htab_t *)p = NULL; + return 0; + } /* We might want to decrement the global_gotno count, but it's - either too early or too late for that at this point. */ + either too early or too late for that at this point. */ } return 1; @@ -1734,19 +1847,18 @@ score_elf_resolve_final_got_entries (struct score_got_info *g) got_entries = g->got_entries; htab_traverse (got_entries, - score_elf_resolve_final_got_entry, - &got_entries); + score_elf_resolve_final_got_entry, + &got_entries); } while (got_entries == NULL); } /* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS. for -r */ - static void score_elf_add_to_rel (bfd *abfd, - bfd_byte *address, - reloc_howto_type *howto, - bfd_signed_vma increment) + bfd_byte *address, + reloc_howto_type *howto, + bfd_signed_vma increment) { bfd_signed_vma addend; bfd_vma contents; @@ -1754,7 +1866,7 @@ score_elf_add_to_rel (bfd *abfd, unsigned long r_type = howto->type; unsigned long hi16_addend, hi16_offset, hi16_value, uvalue; - contents = bfd_get_32 (abfd, address); + contents = score_bfd_get_32 (abfd, address); /* Get the (signed) value from the instruction. */ addend = contents & howto->src_mask; if (addend & ((howto->src_mask + 1) >> 1)) @@ -1775,12 +1887,12 @@ score_elf_add_to_rel (bfd *abfd, contents = (contents & ~howto-> src_mask) | (((offset << 6) & howto->src_mask) & 0x3ff0000) | (offset & 0x3ff); - bfd_put_32 (abfd, contents, address); + score_bfd_put_32 (abfd, contents, address); break; case R_SCORE_HI16: break; case R_SCORE_LO16: - hi16_addend = bfd_get_32 (abfd, address - 4); + hi16_addend = score_bfd_get_32 (abfd, address - 4); hi16_offset = ((((hi16_addend >> 16) & 0x3) << 15) | (hi16_addend & 0x7fff)) >> 1; offset = ((((contents >> 16) & 0x3) << 15) | (contents & 0x7fff)) >> 1; offset = (hi16_offset << 16) | (offset & 0xffff); @@ -1788,10 +1900,10 @@ score_elf_add_to_rel (bfd *abfd, hi16_offset = (uvalue >> 16) << 1; hi16_value = (hi16_addend & (~(howto->dst_mask))) | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000); - bfd_put_32 (abfd, hi16_value, address - 4); + score_bfd_put_32 (abfd, hi16_value, address - 4); offset = (uvalue & 0xffff) << 1; contents = (contents & (~(howto->dst_mask))) | (offset & 0x7fff) | ((offset << 1) & 0x30000); - bfd_put_32 (abfd, contents, address); + score_bfd_put_32 (abfd, contents, address); break; case R_SCORE_24: offset = @@ -1800,48 +1912,78 @@ score_elf_add_to_rel (bfd *abfd, contents = (contents & ~howto-> src_mask) | (((offset << 1) & howto->src_mask) & 0x3ff0000) | (offset & 0x7fff); - bfd_put_32 (abfd, contents, address); + score_bfd_put_32 (abfd, contents, address); break; + case R_SCORE16_11: - contents = bfd_get_16 (abfd, address); + contents = score_bfd_get_16 (abfd, address); offset = contents & howto->src_mask; offset += increment; contents = (contents & ~howto->src_mask) | (offset & howto->src_mask); - bfd_put_16 (abfd, contents, address); + score_bfd_put_16 (abfd, contents, address); break; case R_SCORE16_PC8: - contents = bfd_get_16 (abfd, address); - offset = (contents & howto->src_mask) + ((increment >> 1) & 0xff); + contents = score_bfd_get_16 (abfd, address); + offset = (contents & howto->src_mask) + ((increment >> 1) & 0x1ff); + contents = (contents & (~howto->src_mask)) | (offset & howto->src_mask); + score_bfd_put_16 (abfd, contents, address); + + break; + + case R_SCORE_BCMP: + contents = score_bfd_get_32 (abfd, address); + offset = (contents & howto->src_mask); + offset <<= howto->rightshift; + offset += increment; + offset >>= howto->rightshift; + contents = (contents & (~howto->src_mask)) | (offset & howto->src_mask); + score_bfd_put_32 (abfd, contents, address); + break; + + case R_SCORE_IMM30: + contents = score_bfd_get_48 (abfd, address); + offset = (contents & howto->src_mask); + offset <<= howto->rightshift; + offset += increment; + offset >>= howto->rightshift; contents = (contents & (~howto->src_mask)) | (offset & howto->src_mask); - bfd_put_16 (abfd, contents, address); + score_bfd_put_48 (abfd, contents, address); + break; + case R_SCORE_IMM32: + contents = score_bfd_get_48 (abfd, address); + offset = (contents & howto->src_mask); + offset += increment; + contents = (contents & (~howto->src_mask)) | (offset & howto->src_mask); + score_bfd_put_48 (abfd, contents, address); break; + default: addend += increment; contents = (contents & ~howto->dst_mask) | (addend & howto->dst_mask); - bfd_put_32 (abfd, contents, address); + score_bfd_put_32 (abfd, contents, address); break; } } /* Perform a relocation as part of a final link. */ - static bfd_reloc_status_type score_elf_final_link_relocate (reloc_howto_type *howto, - bfd *input_bfd, - bfd *output_bfd, - asection *input_section, - bfd_byte *contents, - Elf_Internal_Rela *rel, - Elf_Internal_Rela *relocs, - bfd_vma symbol, - struct bfd_link_info *info, - const char *sym_name ATTRIBUTE_UNUSED, - int sym_flags ATTRIBUTE_UNUSED, - struct score_elf_link_hash_entry *h, + bfd *input_bfd, + bfd *output_bfd, + asection *input_section, + bfd_byte *contents, + Elf_Internal_Rela *rel, + Elf_Internal_Rela *relocs, + bfd_vma symbol, + struct bfd_link_info *info, + const char *sym_name ATTRIBUTE_UNUSED, + int sym_flags ATTRIBUTE_UNUSED, + struct score_elf_link_hash_entry *h, + asection **local_sections, bfd_boolean gp_disp_p) { unsigned long r_type; @@ -1864,13 +2006,14 @@ score_elf_final_link_relocate (reloc_howto_type *howto, bfd_vma value = symbol; unsigned long hi16_addend, hi16_offset, hi16_value, uvalue, offset, abs_value = 0; + if (elf_gp (output_bfd) == 0) { struct bfd_link_hash_entry *bh; asection *o; bh = bfd_link_hash_lookup (info->hash, "_gp", 0, 0, 1); - if (bh != (struct bfd_link_hash_entry *)NULL && bh->type == bfd_link_hash_defined) + if (bh != NULL && bh->type == bfd_link_hash_defined) elf_gp (output_bfd) = (bh->u.def.value + bh->u.def.section->output_section->vma + bh->u.def.section->output_offset); @@ -1879,7 +2022,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, bfd_vma lo = -1; /* Find the GP-relative section with the lowest offset. */ - for (o = output_bfd->sections; o != (asection *) NULL; o = o->next) + for (o = output_bfd->sections; o != NULL; o = o->next) if (o->vma < lo) lo = o->vma; /* And calculate GP relative to that. */ @@ -1897,7 +2040,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); rel_addr = (input_section->output_section->vma + input_section->output_offset + rel->r_offset); - local_p = score_elf_local_relocation_p (input_bfd, rel, TRUE); + local_p = score_elf_local_relocation_p (input_bfd, rel, local_sections, TRUE); if (r_type == R_SCORE_GOT15) { @@ -1910,17 +2053,22 @@ score_elf_final_link_relocate (reloc_howto_type *howto, relend = relocs + input_section->reloc_count * bed->s->int_rels_per_ext_rel; lo16_rel = score_elf_next_relocation (input_bfd, R_SCORE_GOT_LO16, rel, relend); if ((local_p) && (lo16_rel != NULL)) - { - bfd_vma tmp = 0; - tmp = bfd_get_32 (input_bfd, contents + lo16_rel->r_offset); - lo_value = (((tmp >> 16) & 0x3) << 14) | ((tmp & 0x7fff) >> 1); - } + { + bfd_vma tmp = 0; + tmp = score_bfd_get_32 (input_bfd, contents + lo16_rel->r_offset); + lo_value = (((tmp >> 16) & 0x3) << 14) | ((tmp & 0x7fff) >> 1); + } addend = lo_value; } - else + /* For score3 R_SCORE_ABS32. */ + else if (r_type == R_SCORE_ABS32 || r_type == R_SCORE_REL32) { addend = (bfd_get_32 (input_bfd, hit_data) >> howto->bitpos) & howto->src_mask; } + else + { + addend = (score_bfd_get_32 (input_bfd, hit_data) >> howto->bitpos) & howto->src_mask; + } /* If we haven't already determined the GOT offset, or the GP value, and we're going to need it, get it now. */ @@ -1942,26 +2090,26 @@ score_elf_final_link_relocate (reloc_howto_type *howto, We must initialize this entry in the GOT. */ bfd *tmpbfd = elf_hash_table (info)->dynobj; asection *sgot = score_elf_got_section (tmpbfd, FALSE); - bfd_put_32 (tmpbfd, value, sgot->contents + g); + score_bfd_put_32 (tmpbfd, value, sgot->contents + g); } } else if (r_type == R_SCORE_GOT15 || r_type == R_SCORE_CALL15) { - /* There's no need to create a local GOT entry here; the - calculation for a local GOT15 entry does not involve G. */ - ; - } + /* There's no need to create a local GOT entry here; the + calculation for a local GOT15 entry does not involve G. */ + ; + } else { - g = score_elf_local_got_index (output_bfd, input_bfd, info, + g = score_elf_local_got_index (output_bfd, input_bfd, info, symbol + addend, r_symndx, h, r_type); - if (g == MINUS_ONE) - return bfd_reloc_outofrange; + if (g == MINUS_ONE) + return bfd_reloc_outofrange; } /* Convert GOT indices to actual offsets. */ g = score_elf_got_offset_from_index (elf_hash_table (info)->dynobj, - output_bfd, input_bfd, g); + output_bfd, input_bfd, g); break; case R_SCORE_HI16: @@ -1986,30 +2134,35 @@ score_elf_final_link_relocate (reloc_howto_type *howto, case R_SCORE_ABS32: case R_SCORE_REL32: if ((info->shared - || (elf_hash_table (info)->dynamic_sections_created - && h != NULL - && h->root.def_dynamic - && !h->root.def_regular)) - && r_symndx != 0 - && (input_section->flags & SEC_ALLOC) != 0) - { - /* If we're creating a shared library, or this relocation is against a symbol + || (elf_hash_table (info)->dynamic_sections_created + && h != NULL + && h->root.def_dynamic + && !h->root.def_regular)) + && r_symndx != 0 + && (input_section->flags & SEC_ALLOC) != 0) + { + /* If we're creating a shared library, or this relocation is against a symbol in a shared library, then we can't know where the symbol will end up. So, we create a relocation record in the output, and leave the job up to the dynamic linker. */ - value = addend; - if (!score_elf_create_dynamic_relocation (output_bfd, info, rel, h, - symbol, &value, - input_section)) - return bfd_reloc_undefined; - } + value = addend; + if (!score_elf_create_dynamic_relocation (output_bfd, info, rel, h, + symbol, &value, + input_section)) + return bfd_reloc_undefined; + } + else if (r_symndx == 0) + /* r_symndx will be zero only for relocs against symbols + from removed linkonce sections, or sections discarded by + a linker script. */ + value = 0; else - { - if (r_type != R_SCORE_REL32) - value = symbol + addend; - else - value = addend; - } + { + if (r_type != R_SCORE_REL32) + value = symbol + addend; + else + value = addend; + } value &= howto->dst_mask; bfd_put_32 (input_bfd, value, hit_data); return bfd_reloc_ok; @@ -2018,22 +2171,71 @@ score_elf_final_link_relocate (reloc_howto_type *howto, value += addend; if ((long)value > 0x7fff || (long)value < -0x8000) return bfd_reloc_overflow; - bfd_put_16 (input_bfd, value, hit_data); + score_bfd_put_16 (input_bfd, value, hit_data); return bfd_reloc_ok; case R_SCORE_24: - addend = bfd_get_32 (input_bfd, hit_data); + addend = score_bfd_get_32 (input_bfd, hit_data); offset = (((addend & howto->src_mask) >> 1) & 0x1ff8000) | ((addend & howto->src_mask) & 0x7fff); if ((offset & 0x1000000) != 0) offset |= 0xfe000000; value += offset; + abs_value = abs (value - rel_addr); + if ((abs_value & 0xfe000000) != 0) + return bfd_reloc_overflow; addend = (addend & ~howto->src_mask) | (((value << 1) & howto->src_mask) & 0x3ff0000) | (value & 0x7fff); - bfd_put_32 (input_bfd, addend, hit_data); + score_bfd_put_32 (input_bfd, addend, hit_data); return bfd_reloc_ok; + /* signed imm32. */ + case R_SCORE_IMM30: + { + int not_word_align_p = 0; + bfd_vma imm_offset = 0; + addend = score_bfd_get_48 (input_bfd, hit_data); + imm_offset = ((addend >> 7) & 0xff) + | (((addend >> 16) & 0x7fff) << 8) + | (((addend >> 32) & 0x7f) << 23); + imm_offset <<= howto->rightshift; + value += imm_offset; + value &= 0xffffffff; + + /* Check lw48/sw48 rd, value/label word align. */ + if ((value & 0x3) != 0) + not_word_align_p = 1; + + value >>= howto->rightshift; + addend = (addend & ~howto->src_mask) + | (((value & 0xff) >> 0) << 7) + | (((value & 0x7fff00) >> 8) << 16) + | (((value & 0x3f800000) >> 23) << 32); + score_bfd_put_48 (input_bfd, addend, hit_data); + if (not_word_align_p) + return bfd_reloc_other; + else + return bfd_reloc_ok; + } + + case R_SCORE_IMM32: + { + bfd_vma imm_offset = 0; + addend = score_bfd_get_48 (input_bfd, hit_data); + imm_offset = ((addend >> 5) & 0x3ff) + | (((addend >> 16) & 0x7fff) << 10) + | (((addend >> 32) & 0x7f) << 25); + value += imm_offset; + value &= 0xffffffff; + addend = (addend & ~howto->src_mask) + | ((value & 0x3ff) << 5) + | (((value >> 10) & 0x7fff) << 16) + | (((value >> 25) & 0x7f) << 32); + score_bfd_put_48 (input_bfd, addend, hit_data); + return bfd_reloc_ok; + } + case R_SCORE_PC19: - addend = bfd_get_32 (input_bfd, hit_data); + addend = score_bfd_get_32 (input_bfd, hit_data); offset = (((addend & howto->src_mask) & 0x3ff0000) >> 6) | ((addend & howto->src_mask) & 0x3ff); if ((offset & 0x80000) != 0) offset |= 0xfff00000; @@ -2045,59 +2247,79 @@ score_elf_final_link_relocate (reloc_howto_type *howto, return bfd_reloc_overflow; addend = (addend & ~howto->src_mask) | (((value << 6) & howto->src_mask) & 0x3ff0000) | (value & 0x3ff); - bfd_put_32 (input_bfd, addend, hit_data); + score_bfd_put_32 (input_bfd, addend, hit_data); return bfd_reloc_ok; case R_SCORE16_11: - addend = bfd_get_16 (input_bfd, hit_data); + addend = score_bfd_get_16 (input_bfd, hit_data); offset = addend & howto->src_mask; if ((offset & 0x800) != 0) /* Offset is negative. */ offset |= 0xfffff000; value += offset; + abs_value = abs (value - rel_addr); + if ((abs_value & 0xfffff000) != 0) + return bfd_reloc_overflow; addend = (addend & ~howto->src_mask) | (value & howto->src_mask); - bfd_put_16 (input_bfd, addend, hit_data); + score_bfd_put_16 (input_bfd, addend, hit_data); return bfd_reloc_ok; case R_SCORE16_PC8: - addend = bfd_get_16 (input_bfd, hit_data); + addend = score_bfd_get_16 (input_bfd, hit_data); offset = (addend & howto->src_mask) << 1; - if ((offset & 0x100) != 0) /* Offset is negative. */ + if ((offset & 0x200) != 0) /* Offset is negative. */ offset |= 0xfffffe00; abs_value = value = value - rel_addr + offset; /* Sign bit + exceed 9 bit. */ - if (((value & 0xffffff00) != 0) && ((value & 0xffffff00) != 0xffffff00)) + if (((value & 0xfffffe00) != 0) && ((value & 0xfffffe00) != 0xfffffe00)) return bfd_reloc_overflow; value >>= 1; addend = (addend & ~howto->src_mask) | (value & howto->src_mask); - bfd_put_16 (input_bfd, addend, hit_data); + score_bfd_put_16 (input_bfd, addend, hit_data); + return bfd_reloc_ok; + + case R_SCORE_BCMP: + addend = score_bfd_get_32 (input_bfd, hit_data); + offset = (addend & howto->src_mask) << howto->rightshift; + if ((offset & 0x200) != 0) /* Offset is negative. */ + offset |= 0xfffffe00; + value = value - rel_addr + offset; + /* Sign bit + exceed 9 bit. */ + if (((value & 0xfffffe00) != 0) && ((value & 0xfffffe00) != 0xfffffe00)) + return bfd_reloc_overflow; + value >>= howto->rightshift; + addend = (addend & ~howto->src_mask) + | (value & 0x1) + | (((value >> 1) & 0x7) << 7) + | (((value >> 4) & 0x1f) << 21); + score_bfd_put_32 (input_bfd, addend, hit_data); return bfd_reloc_ok; case R_SCORE_HI16: return bfd_reloc_ok; case R_SCORE_LO16: - hi16_addend = bfd_get_32 (input_bfd, hit_data - 4); + hi16_addend = score_bfd_get_32 (input_bfd, hit_data - 4); hi16_offset = ((((hi16_addend >> 16) & 0x3) << 15) | (hi16_addend & 0x7fff)) >> 1; - addend = bfd_get_32 (input_bfd, hit_data); + addend = score_bfd_get_32 (input_bfd, hit_data); offset = ((((addend >> 16) & 0x3) << 15) | (addend & 0x7fff)) >> 1; offset = (hi16_offset << 16) | (offset & 0xffff); if (!gp_disp_p) - uvalue = value + offset; + uvalue = value + offset; else - uvalue = offset + gp - rel_addr + 4; + uvalue = offset + gp - rel_addr + 4; hi16_offset = (uvalue >> 16) << 1; hi16_value = (hi16_addend & (~(howto->dst_mask))) | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000); - bfd_put_32 (input_bfd, hi16_value, hit_data - 4); + score_bfd_put_32 (input_bfd, hi16_value, hit_data - 4); offset = (uvalue & 0xffff) << 1; value = (addend & (~(howto->dst_mask))) | (offset & 0x7fff) | ((offset << 1) & 0x30000); - bfd_put_32 (input_bfd, value, hit_data); + score_bfd_put_32 (input_bfd, value, hit_data); return bfd_reloc_ok; case R_SCORE_GP15: - addend = bfd_get_32 (input_bfd, hit_data); + addend = score_bfd_get_32 (input_bfd, hit_data); offset = addend & 0x7fff; if ((offset & 0x4000) == 0x4000) offset |= 0xffffc000; @@ -2105,52 +2327,53 @@ score_elf_final_link_relocate (reloc_howto_type *howto, if (((value & 0xffffc000) != 0) && ((value & 0xffffc000) != 0xffffc000)) return bfd_reloc_overflow; value = (addend & ~howto->src_mask) | (value & howto->src_mask); - bfd_put_32 (input_bfd, value, hit_data); + score_bfd_put_32 (input_bfd, value, hit_data); return bfd_reloc_ok; case R_SCORE_GOT15: case R_SCORE_CALL15: if (local_p) - { - bfd_boolean forced; + { + bfd_boolean forced; - /* The special case is when the symbol is forced to be local. We need the + /* The special case is when the symbol is forced to be local. We need the full address in the GOT since no R_SCORE_GOT_LO16 relocation follows. */ - forced = ! score_elf_local_relocation_p (input_bfd, rel, FALSE); - value = score_elf_got16_entry (output_bfd, input_bfd, info, - symbol + addend, forced); - if (value == MINUS_ONE) - return bfd_reloc_outofrange; - value = score_elf_got_offset_from_index (elf_hash_table (info)->dynobj, - output_bfd, input_bfd, value); - } + forced = ! score_elf_local_relocation_p (input_bfd, rel, + local_sections, FALSE); + value = score_elf_got16_entry (output_bfd, input_bfd, info, + symbol + addend, forced); + if (value == MINUS_ONE) + return bfd_reloc_outofrange; + value = score_elf_got_offset_from_index (elf_hash_table (info)->dynobj, + output_bfd, input_bfd, value); + } else - { - value = g; - } + { + value = g; + } if ((long) value > 0x3fff || (long) value < -0x4000) return bfd_reloc_overflow; - addend = bfd_get_32 (input_bfd, hit_data); + addend = score_bfd_get_32 (input_bfd, hit_data); value = (addend & ~howto->dst_mask) | (value & howto->dst_mask); - bfd_put_32 (input_bfd, value, hit_data); + score_bfd_put_32 (input_bfd, value, hit_data); return bfd_reloc_ok; case R_SCORE_GPREL32: value = (addend + symbol - gp); value &= howto->dst_mask; - bfd_put_32 (input_bfd, value, hit_data); + score_bfd_put_32 (input_bfd, value, hit_data); return bfd_reloc_ok; case R_SCORE_GOT_LO16: - addend = bfd_get_32 (input_bfd, hit_data); + addend = score_bfd_get_32 (input_bfd, hit_data); value = (((addend >> 16) & 0x3) << 14) | ((addend & 0x7fff) >> 1); value += symbol; - value = (addend & (~(howto->dst_mask))) | ((value & 0x3fff) << 1) + value = (addend & (~(howto->dst_mask))) | ((value & 0x3fff) << 1) | (((value >> 14) & 0x3) << 16); - bfd_put_32 (input_bfd, value, hit_data); + score_bfd_put_32 (input_bfd, value, hit_data); return bfd_reloc_ok; case R_SCORE_DUMMY_HI16: @@ -2167,32 +2390,30 @@ score_elf_final_link_relocate (reloc_howto_type *howto, } /* Score backend functions. */ - static void -_bfd_score_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, - arelent *bfd_reloc, - Elf_Internal_Rela *elf_reloc) +s3_bfd_score_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, + arelent *bfd_reloc, + Elf_Internal_Rela *elf_reloc) { unsigned int r_type; r_type = ELF32_R_TYPE (elf_reloc->r_info); - if (r_type >= NUM_ELEM (elf32_score_howto_table)) + if (r_type >= ARRAY_SIZE (elf32_score_howto_table)) bfd_reloc->howto = NULL; else bfd_reloc->howto = &elf32_score_howto_table[r_type]; } /* Relocate an score ELF section. */ - static bfd_boolean -_bfd_score_elf_relocate_section (bfd *output_bfd, - struct bfd_link_info *info, - bfd *input_bfd, - asection *input_section, - bfd_byte *contents, - Elf_Internal_Rela *relocs, - Elf_Internal_Sym *local_syms, - asection **local_sections) +s3_bfd_score_elf_relocate_section (bfd *output_bfd, + struct bfd_link_info *info, + bfd *input_bfd, + asection *input_section, + bfd_byte *contents, + Elf_Internal_Rela *relocs, + Elf_Internal_Sym *local_syms, + asection **local_sections) { Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; @@ -2209,23 +2430,23 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, { bfd_size_type dynsecsymcount = 0; if (info->shared) - { - asection * p; - const struct elf_backend_data *bed = get_elf_backend_data (output_bfd); - - for (p = output_bfd->sections; p ; p = p->next) - if ((p->flags & SEC_EXCLUDE) == 0 - && (p->flags & SEC_ALLOC) != 0 - && !(*bed->elf_backend_omit_section_dynsym) (output_bfd, info, p)) - ++ dynsecsymcount; - } + { + asection * p; + const struct elf_backend_data *bed = get_elf_backend_data (output_bfd); + + for (p = output_bfd->sections; p ; p = p->next) + if ((p->flags & SEC_EXCLUDE) == 0 + && (p->flags & SEC_ALLOC) != 0 + && !(*bed->elf_backend_omit_section_dynsym) (output_bfd, info, p)) + ++ dynsecsymcount; + } if (!score_elf_sort_hash_table (info, dynsecsymcount + 1)) - return FALSE; + return FALSE; } symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; - extsymoff = symtab_hdr->sh_info; + extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info; sym_hashes = elf_sym_hashes (input_bfd); rel = relocs; relend = relocs + input_section->reloc_count; @@ -2244,7 +2465,7 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); - _bfd_score_info_to_howto (input_bfd, &bfd_reloc, (Elf_Internal_Rela *) rel); + s3_bfd_score_info_to_howto (input_bfd, &bfd_reloc, (Elf_Internal_Rela *) rel); howto = bfd_reloc.howto; h = NULL; @@ -2256,13 +2477,13 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, sym = local_syms + r_symndx; sec = local_sections[r_symndx]; relocation = (sec->output_section->vma - + sec->output_offset - + sym->st_value); + + sec->output_offset + + sym->st_value); name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sec); if (!info->relocatable - && (sec->flags & SEC_MERGE) != 0 - && ELF_ST_TYPE (sym->st_info) == STT_SECTION) + && (sec->flags & SEC_MERGE) + && ELF_ST_TYPE (sym->st_info) == STT_SECTION) { asection *msec; bfd_vma addend, value; @@ -2272,9 +2493,9 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, case R_SCORE_HI16: break; case R_SCORE_LO16: - hi16_addend = bfd_get_32 (input_bfd, contents + rel->r_offset - 4); + hi16_addend = score_bfd_get_32 (input_bfd, contents + rel->r_offset - 4); hi16_offset = ((((hi16_addend >> 16) & 0x3) << 15) | (hi16_addend & 0x7fff)) >> 1; - value = bfd_get_32 (input_bfd, contents + rel->r_offset); + value = score_bfd_get_32 (input_bfd, contents + rel->r_offset); offset = ((((value >> 16) & 0x3) << 15) | (value & 0x7fff)) >> 1; addend = (hi16_offset << 16) | (offset & 0xffff); msec = sec; @@ -2285,14 +2506,65 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, hi16_offset = (uvalue >> 16) << 1; hi16_value = (hi16_addend & (~(howto->dst_mask))) | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000); - bfd_put_32 (input_bfd, hi16_value, contents + rel->r_offset - 4); + score_bfd_put_32 (input_bfd, hi16_value, contents + rel->r_offset - 4); offset = (uvalue & 0xffff) << 1; value = (value & (~(howto->dst_mask))) | (offset & 0x7fff) | ((offset << 1) & 0x30000); - bfd_put_32 (input_bfd, value, contents + rel->r_offset); + score_bfd_put_32 (input_bfd, value, contents + rel->r_offset); break; + + case R_SCORE_IMM32: + { + value = score_bfd_get_48 (input_bfd, contents + rel->r_offset); + addend = ((value >> 5) & 0x3ff) + | (((value >> 16) & 0x7fff) << 10) + | (((value >> 32) & 0x7f) << 25); + msec = sec; + addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend); + addend -= relocation; + addend += msec->output_section->vma + msec->output_offset; + addend &= 0xffffffff; + value = (value & ~howto->src_mask) + | ((addend & 0x3ff) << 5) + | (((addend >> 10) & 0x7fff) << 16) + | (((addend >> 25) & 0x7f) << 32); + score_bfd_put_48 (input_bfd, value, contents + rel->r_offset); + break; + } + + case R_SCORE_IMM30: + { + int not_word_align_p = 0; + value = score_bfd_get_48 (input_bfd, contents + rel->r_offset); + addend = ((value >> 7) & 0xff) + | (((value >> 16) & 0x7fff) << 8) + | (((value >> 32) & 0x7f) << 23); + addend <<= howto->rightshift; + msec = sec; + addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend); + addend -= relocation; + addend += msec->output_section->vma + msec->output_offset; + addend &= 0xffffffff; + + /* Check lw48/sw48 rd, value/label word align. */ + if ((addend & 0x3) != 0) + not_word_align_p = 1; + + addend >>= howto->rightshift; + value = (value & ~howto->src_mask) + | (((addend & 0xff) >> 0) << 7) + | (((addend & 0x7fff00) >> 8) << 16) + | (((addend & 0x3f800000) >> 23) << 32); + score_bfd_put_48 (input_bfd, value, contents + rel->r_offset); + + if (not_word_align_p) + return bfd_reloc_other; + else + break; + } + case R_SCORE_GOT_LO16: - value = bfd_get_32 (input_bfd, contents + rel->r_offset); + value = score_bfd_get_32 (input_bfd, contents + rel->r_offset); addend = (((value >> 16) & 0x3) << 14) | ((value & 0x7fff) >> 1); msec = sec; addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend) - relocation; @@ -2300,9 +2572,11 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, value = (value & (~(howto->dst_mask))) | ((addend & 0x3fff) << 1) | (((addend >> 14) & 0x3) << 16); - bfd_put_32 (input_bfd, value, contents + rel->r_offset); + score_bfd_put_32 (input_bfd, value, contents + rel->r_offset); break; - default: + + case R_SCORE_ABS32: + case R_SCORE_REL32: value = bfd_get_32 (input_bfd, contents + rel->r_offset); /* Get the (signed) value from the instruction. */ addend = value & howto->src_mask; @@ -2320,91 +2594,110 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, value = (value & ~howto->dst_mask) | (addend & howto->dst_mask); bfd_put_32 (input_bfd, value, contents + rel->r_offset); break; + + default: + value = score_bfd_get_32 (input_bfd, contents + rel->r_offset); + /* Get the (signed) value from the instruction. */ + addend = value & howto->src_mask; + if (addend & ((howto->src_mask + 1) >> 1)) + { + bfd_signed_vma mask; + + mask = -1; + mask &= ~howto->src_mask; + addend |= mask; + } + msec = sec; + addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend) - relocation; + addend += msec->output_section->vma + msec->output_offset; + value = (value & ~howto->dst_mask) | (addend & howto->dst_mask); + score_bfd_put_32 (input_bfd, value, contents + rel->r_offset); + break; } } } else { - /* For global symbols we look up the symbol in the hash-table. */ - h = ((struct score_elf_link_hash_entry *) - elf_sym_hashes (input_bfd) [r_symndx - extsymoff]); - /* Find the real hash-table entry for this symbol. */ - while (h->root.root.type == bfd_link_hash_indirect - || h->root.root.type == bfd_link_hash_warning) - h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link; - - /* Record the name of this symbol, for our caller. */ - name = h->root.root.root.string; - - /* See if this is the special GP_DISP_LABEL symbol. Note that such a - symbol must always be a global symbol. */ - if (strcmp (name, GP_DISP_LABEL) == 0) - { - /* Relocations against GP_DISP_LABEL are permitted only with - R_SCORE_HI16 and R_SCORE_LO16 relocations. */ - if (r_type != R_SCORE_HI16 && r_type != R_SCORE_LO16) - return bfd_reloc_notsupported; - - gp_disp_p = TRUE; - } - - /* If this symbol is defined, calculate its address. Note that - GP_DISP_LABEL is a magic symbol, always implicitly defined by the - linker, so it's inappropriate to check to see whether or not - its defined. */ - else if ((h->root.root.type == bfd_link_hash_defined - || h->root.root.type == bfd_link_hash_defweak) - && h->root.root.u.def.section) - { - sec = h->root.root.u.def.section; - if (sec->output_section) - relocation = (h->root.root.u.def.value - + sec->output_section->vma - + sec->output_offset); - else - { - relocation = h->root.root.u.def.value; - } - } - else if (h->root.root.type == bfd_link_hash_undefweak) - /* We allow relocations against undefined weak symbols, giving - it the value zero, so that you can undefined weak functions - and check to see if they exist by looking at their addresses. */ - relocation = 0; - else if (info->unresolved_syms_in_objects == RM_IGNORE - && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT) - relocation = 0; - else if (strcmp (name, "_DYNAMIC_LINK") == 0) - { - /* If this is a dynamic link, we should have created a _DYNAMIC_LINK symbol - in _bfd_score_elf_create_dynamic_sections. Otherwise, we should define + /* For global symbols we look up the symbol in the hash-table. */ + h = ((struct score_elf_link_hash_entry *) + elf_sym_hashes (input_bfd) [r_symndx - extsymoff]); + /* Find the real hash-table entry for this symbol. */ + while (h->root.root.type == bfd_link_hash_indirect + || h->root.root.type == bfd_link_hash_warning) + h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link; + + /* Record the name of this symbol, for our caller. */ + name = h->root.root.root.string; + + /* See if this is the special GP_DISP_LABEL symbol. Note that such a + symbol must always be a global symbol. */ + if (strcmp (name, GP_DISP_LABEL) == 0) + { + /* Relocations against GP_DISP_LABEL are permitted only with + R_SCORE_HI16 and R_SCORE_LO16 relocations. */ + if (r_type != R_SCORE_HI16 && r_type != R_SCORE_LO16) + return bfd_reloc_notsupported; + + gp_disp_p = TRUE; + } + + /* If this symbol is defined, calculate its address. Note that + GP_DISP_LABEL is a magic symbol, always implicitly defined by the + linker, so it's inappropriate to check to see whether or not + its defined. */ + else if ((h->root.root.type == bfd_link_hash_defined + || h->root.root.type == bfd_link_hash_defweak) + && h->root.root.u.def.section) + { + sec = h->root.root.u.def.section; + if (sec->output_section) + relocation = (h->root.root.u.def.value + + sec->output_section->vma + + sec->output_offset); + else + { + relocation = h->root.root.u.def.value; + } + } + else if (h->root.root.type == bfd_link_hash_undefweak) + /* We allow relocations against undefined weak symbols, giving + it the value zero, so that you can undefined weak functions + and check to see if they exist by looking at their addresses. */ + relocation = 0; + else if (info->unresolved_syms_in_objects == RM_IGNORE + && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT) + relocation = 0; + else if (strcmp (name, "_DYNAMIC_LINK") == 0) + { + /* If this is a dynamic link, we should have created a _DYNAMIC_LINK symbol + in s3_bfd_score_elf_create_dynamic_sections. Otherwise, we should define the symbol with a value of 0. */ - BFD_ASSERT (! info->shared); - BFD_ASSERT (bfd_get_section_by_name (output_bfd, ".dynamic") == NULL); - relocation = 0; - } - else if (!info->relocatable) - { - if (! ((*info->callbacks->undefined_symbol) - (info, h->root.root.root.string, input_bfd, - input_section, rel->r_offset, - (info->unresolved_syms_in_objects == RM_GENERATE_ERROR) - || ELF_ST_VISIBILITY (h->root.other)))) - return bfd_reloc_undefined; - relocation = 0; - } + BFD_ASSERT (! info->shared); + BFD_ASSERT (bfd_get_section_by_name (output_bfd, ".dynamic") == NULL); + relocation = 0; + } + else if (!info->relocatable) + { + if (! ((*info->callbacks->undefined_symbol) + (info, h->root.root.root.string, input_bfd, + input_section, rel->r_offset, + (info->unresolved_syms_in_objects == RM_GENERATE_ERROR) + || ELF_ST_VISIBILITY (h->root.other)))) + return bfd_reloc_undefined; + relocation = 0; + } } if (sec != NULL && elf_discarded_section (sec)) - { - /* For relocs against symbols from removed linkonce sections, - or sections discarded by a linker script, we just want the - section contents zeroed. Avoid any special processing. */ - _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset); - rel->r_info = 0; - rel->r_addend = 0; - continue; - } + { + /* For relocs against symbols from removed linkonce sections, + or sections discarded by a linker script, we just want the + section contents zeroed. Avoid any special processing. */ + _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset); + rel->r_info = 0; + rel->r_addend = 0; + continue; + } if (info->relocatable) { @@ -2412,17 +2705,25 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, anything, unless the reloc is against a section symbol, in which case we have to adjust according to where the section symbol winds up in the output section. */ - if (sym != NULL && ELF_ST_TYPE (sym->st_info) == STT_SECTION) - score_elf_add_to_rel (input_bfd, contents + rel->r_offset, - howto, (bfd_signed_vma) sec->output_offset); + if (r_symndx < symtab_hdr->sh_info) + { + sym = local_syms + r_symndx; + if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) + { + sec = local_sections[r_symndx]; + score_elf_add_to_rel (input_bfd, contents + rel->r_offset, + howto, (bfd_signed_vma) (sec->output_offset + sym->st_value)); + } + } continue; } + /* This is a final link. */ r = score_elf_final_link_relocate (howto, input_bfd, output_bfd, input_section, contents, rel, relocs, relocation, info, name, (h ? ELF_ST_TYPE ((unsigned int)h->root.root.type) : - ELF_ST_TYPE ((unsigned int)sym->st_info)), h, + ELF_ST_TYPE ((unsigned int)sym->st_info)), h, local_sections, gp_disp_p); if (r != bfd_reloc_ok) @@ -2459,6 +2760,11 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, msg = _("internal error: dangerous error"); goto common_error; + /* Use bfd_reloc_other to check lw48, sw48 word align. */ + case bfd_reloc_other: + msg = _("address not word align"); + goto common_error; + default: msg = _("internal error: unknown error"); /* fall through */ @@ -2477,12 +2783,11 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, /* Look through the relocs for a section during the first phase, and allocate space in the global offset table. */ - static bfd_boolean -_bfd_score_elf_check_relocs (bfd *abfd, - struct bfd_link_info *info, - asection *sec, - const Elf_Internal_Rela *relocs) +s3_bfd_score_elf_check_relocs (bfd *abfd, + struct bfd_link_info *info, + asection *sec, + const Elf_Internal_Rela *relocs) { const char *name; bfd *dynobj; @@ -2502,7 +2807,7 @@ _bfd_score_elf_check_relocs (bfd *abfd, dynobj = elf_hash_table (info)->dynobj; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); - extsymoff = symtab_hdr->sh_info; + extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info; name = bfd_get_section_name (abfd, sec); @@ -2537,9 +2842,9 @@ _bfd_score_elf_check_relocs (bfd *abfd, r_type = ELF32_R_TYPE (rel->r_info); if (r_symndx < extsymoff) - { + { h = NULL; - } + } else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr)) { (*_bfd_error_handler) (_("%s: Malformed reloc detected for section %s"), abfd, name); @@ -2583,90 +2888,90 @@ _bfd_score_elf_check_relocs (bfd *abfd, if (!h && (r_type == R_SCORE_GOT_LO16)) { - if (! score_elf_record_local_got_symbol (abfd, r_symndx, rel->r_addend, g)) - return FALSE; + if (! score_elf_record_local_got_symbol (abfd, r_symndx, rel->r_addend, g)) + return FALSE; } switch (r_type) { case R_SCORE_CALL15: - if (h == NULL) - { - (*_bfd_error_handler) - (_("%B: CALL15 reloc at 0x%lx not against global symbol"), - abfd, (unsigned long) rel->r_offset); - bfd_set_error (bfd_error_bad_value); - return FALSE; - } - else - { - /* This symbol requires a global offset table entry. */ - if (! score_elf_record_global_got_symbol (h, abfd, info, g)) - return FALSE; - - /* We need a stub, not a plt entry for the undefined function. But we record + if (h == NULL) + { + (*_bfd_error_handler) + (_("%B: CALL15 reloc at 0x%lx not against global symbol"), + abfd, (unsigned long) rel->r_offset); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + else + { + /* This symbol requires a global offset table entry. */ + if (! score_elf_record_global_got_symbol (h, abfd, info, g)) + return FALSE; + + /* We need a stub, not a plt entry for the undefined function. But we record it as if it needs plt. See _bfd_elf_adjust_dynamic_symbol. */ - h->needs_plt = 1; - h->type = STT_FUNC; - } + h->needs_plt = 1; + h->type = STT_FUNC; + } + break; + case R_SCORE_GOT15: + if (h && ! score_elf_record_global_got_symbol (h, abfd, info, g)) + return FALSE; break; - case R_SCORE_GOT15: - if (h && ! score_elf_record_global_got_symbol (h, abfd, info, g)) - return FALSE; - break; case R_SCORE_ABS32: case R_SCORE_REL32: - if ((info->shared || h != NULL) && (sec->flags & SEC_ALLOC) != 0) - { - if (sreloc == NULL) - { - sreloc = score_elf_rel_dyn_section (dynobj, TRUE); - if (sreloc == NULL) - return FALSE; - } + if ((info->shared || h != NULL) && (sec->flags & SEC_ALLOC) != 0) + { + if (sreloc == NULL) + { + sreloc = score_elf_rel_dyn_section (dynobj, TRUE); + if (sreloc == NULL) + return FALSE; + } #define SCORE_READONLY_SECTION (SEC_ALLOC | SEC_LOAD | SEC_READONLY) - if (info->shared) - { - /* When creating a shared object, we must copy these reloc types into + if (info->shared) + { + /* When creating a shared object, we must copy these reloc types into the output file as R_SCORE_REL32 relocs. We make room for this reloc in the .rel.dyn reloc section. */ - score_elf_allocate_dynamic_relocations (dynobj, 1); - if ((sec->flags & SCORE_READONLY_SECTION) - == SCORE_READONLY_SECTION) - /* We tell the dynamic linker that there are - relocations against the text segment. */ - info->flags |= DF_TEXTREL; - } - else - { - struct score_elf_link_hash_entry *hscore; - - /* We only need to copy this reloc if the symbol is + score_elf_allocate_dynamic_relocations (dynobj, 1); + if ((sec->flags & SCORE_READONLY_SECTION) + == SCORE_READONLY_SECTION) + /* We tell the dynamic linker that there are + relocations against the text segment. */ + info->flags |= DF_TEXTREL; + } + else + { + struct score_elf_link_hash_entry *hscore; + + /* We only need to copy this reloc if the symbol is defined in a dynamic object. */ - hscore = (struct score_elf_link_hash_entry *)h; - ++hscore->possibly_dynamic_relocs; - if ((sec->flags & SCORE_READONLY_SECTION) - == SCORE_READONLY_SECTION) - /* We need it to tell the dynamic linker if there - are relocations against the text segment. */ - hscore->readonly_reloc = TRUE; - } - - /* Even though we don't directly need a GOT entry for this symbol, - a symbol must have a dynamic symbol table index greater that + hscore = (struct score_elf_link_hash_entry *)h; + ++hscore->possibly_dynamic_relocs; + if ((sec->flags & SCORE_READONLY_SECTION) + == SCORE_READONLY_SECTION) + /* We need it to tell the dynamic linker if there + are relocations against the text segment. */ + hscore->readonly_reloc = TRUE; + } + + /* Even though we don't directly need a GOT entry for this symbol, + a symbol must have a dynamic symbol table index greater that DT_SCORE_GOTSYM if there are dynamic relocations against it. */ - if (h != NULL) - { - if (dynobj == NULL) - elf_hash_table (info)->dynobj = dynobj = abfd; - if (! score_elf_create_got_section (dynobj, info, TRUE)) - return FALSE; - g = score_elf_got_info (dynobj, &sgot); - if (! score_elf_record_global_got_symbol (h, abfd, info, g)) - return FALSE; - } - } - break; + if (h != NULL) + { + if (dynobj == NULL) + elf_hash_table (info)->dynobj = dynobj = abfd; + if (! score_elf_create_got_section (dynobj, info, TRUE)) + return FALSE; + g = score_elf_got_info (dynobj, &sgot); + if (! score_elf_record_global_got_symbol (h, abfd, info, g)) + return FALSE; + } + } + break; /* This relocation describes the C++ object vtable hierarchy. Reconstruct it for later use during GC. */ @@ -2678,9 +2983,7 @@ _bfd_score_elf_check_relocs (bfd *abfd, /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_SCORE_GNU_VTENTRY: - BFD_ASSERT (h != NULL); - if (h != NULL - && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) + if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) return FALSE; break; default: @@ -2690,32 +2993,32 @@ _bfd_score_elf_check_relocs (bfd *abfd, /* We must not create a stub for a symbol that has relocations related to taking the function's address. */ switch (r_type) - { - default: - if (h != NULL) - { - struct score_elf_link_hash_entry *sh; + { + default: + if (h != NULL) + { + struct score_elf_link_hash_entry *sh; - sh = (struct score_elf_link_hash_entry *) h; - sh->no_fn_stub = TRUE; - } - break; - case R_SCORE_CALL15: - break; - } + sh = (struct score_elf_link_hash_entry *) h; + sh->no_fn_stub = TRUE; + } + break; + case R_SCORE_CALL15: + break; + } } return TRUE; } static bfd_boolean -_bfd_score_elf_add_symbol_hook (bfd *abfd, - struct bfd_link_info *info ATTRIBUTE_UNUSED, - Elf_Internal_Sym *sym, - const char **namep ATTRIBUTE_UNUSED, - flagword *flagsp ATTRIBUTE_UNUSED, - asection **secp, - bfd_vma *valp) +s3_bfd_score_elf_add_symbol_hook (bfd *abfd, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + Elf_Internal_Sym *sym, + const char **namep ATTRIBUTE_UNUSED, + flagword *flagsp ATTRIBUTE_UNUSED, + asection **secp, + bfd_vma *valp) { switch (sym->st_shndx) { @@ -2734,7 +3037,7 @@ _bfd_score_elf_add_symbol_hook (bfd *abfd, } static void -_bfd_score_elf_symbol_processing (bfd *abfd, asymbol *asym) +s3_bfd_score_elf_symbol_processing (bfd *abfd, asymbol *asym) { elf_symbol_type *elfsym; @@ -2765,12 +3068,12 @@ _bfd_score_elf_symbol_processing (bfd *abfd, asymbol *asym) } } -static bfd_boolean -_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, - const char *name ATTRIBUTE_UNUSED, - Elf_Internal_Sym *sym, - asection *input_sec, - struct elf_link_hash_entry *h ATTRIBUTE_UNUSED) +static int +s3_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, + const char *name ATTRIBUTE_UNUSED, + Elf_Internal_Sym *sym, + asection *input_sec, + struct elf_link_hash_entry *h ATTRIBUTE_UNUSED) { /* If we see a common symbol, which implies a relocatable link, then if a symbol was small common in an input file, mark it as small @@ -2778,13 +3081,13 @@ _bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNU if (sym->st_shndx == SHN_COMMON && strcmp (input_sec->name, ".scommon") == 0) sym->st_shndx = SHN_SCORE_SCOMMON; - return TRUE; + return 1; } static bfd_boolean -_bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, - asection *sec, - int *retval) +s3_bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, + asection *sec, + int *retval) { if (strcmp (bfd_get_section_name (abfd, sec), ".scommon") == 0) { @@ -2799,10 +3102,9 @@ _bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, regular object. The current definition is in some section of the dynamic object, but we're not including those sections. We have to change the definition to something the rest of the link can understand. */ - static bfd_boolean -_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, - struct elf_link_hash_entry *h) +s3_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, + struct elf_link_hash_entry *h) { bfd *dynobj; struct score_elf_link_hash_entry *hscore; @@ -2888,10 +3190,9 @@ _bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* This function is called after all the input files have been read, and the input sections have been assigned to output sections. */ - static bfd_boolean -_bfd_score_elf_always_size_sections (bfd *output_bfd, - struct bfd_link_info *info) +s3_bfd_score_elf_always_size_sections (bfd *output_bfd, + struct bfd_link_info *info) { bfd *dynobj; asection *s; @@ -2917,14 +3218,14 @@ _bfd_score_elf_always_size_sections (bfd *output_bfd, asection *subsection; for (subsection = sub->sections; - subsection; - subsection = subsection->next) - { - if ((subsection->flags & SEC_ALLOC) == 0) - continue; - loadable_size += ((subsection->size + 0xf) - &~ (bfd_size_type) 0xf); - } + subsection; + subsection = subsection->next) + { + if ((subsection->flags & SEC_ALLOC) == 0) + continue; + loadable_size += ((subsection->size + 0xf) + &~ (bfd_size_type) 0xf); + } } /* There has to be a global GOT entry for every symbol with @@ -2966,9 +3267,8 @@ _bfd_score_elf_always_size_sections (bfd *output_bfd, } /* Set the sizes of the dynamic sections. */ - static bfd_boolean -_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) +s3_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; asection *s; @@ -3045,10 +3345,10 @@ _bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf } else if (CONST_STRNEQ (name, ".got")) { - /* _bfd_score_elf_always_size_sections() has already done - most of the work, but some symbols may have been mapped - to versions that we must now resolve in the got_entries - hash tables. */ + /* s3_bfd_score_elf_always_size_sections() has already done + most of the work, but some symbols may have been mapped + to versions that we must now resolve in the got_entries + hash tables. */ } else if (strcmp (name, SCORE_ELF_STUB_SECTION_NAME) == 0) { @@ -3074,37 +3374,37 @@ _bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf if (elf_hash_table (info)->dynamic_sections_created) { /* Add some entries to the .dynamic section. We fill in the - values later, in _bfd_score_elf_finish_dynamic_sections, but we - must add the entries now so that we get the correct size for - the .dynamic section. The DT_DEBUG entry is filled in by the - dynamic linker and used by the debugger. */ + values later, in s3_bfd_score_elf_finish_dynamic_sections, but we + must add the entries now so that we get the correct size for + the .dynamic section. The DT_DEBUG entry is filled in by the + dynamic linker and used by the debugger. */ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0)) - return FALSE; + return FALSE; if (reltext) - info->flags |= DF_TEXTREL; + info->flags |= DF_TEXTREL; if ((info->flags & DF_TEXTREL) != 0) - { - if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0)) - return FALSE; - } + { + if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0)) + return FALSE; + } if (! SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0)) - return FALSE; + return FALSE; if (score_elf_rel_dyn_section (dynobj, FALSE)) - { - if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0)) - return FALSE; + { + if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0)) + return FALSE; - if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELSZ, 0)) - return FALSE; + if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELSZ, 0)) + return FALSE; - if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELENT, 0)) - return FALSE; - } + if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELENT, 0)) + return FALSE; + } if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_BASE_ADDRESS, 0)) return FALSE; @@ -3122,14 +3422,14 @@ _bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf return FALSE; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_HIPAGENO, 0)) - return FALSE; + return FALSE; } return TRUE; } static bfd_boolean -_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) +s3_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_entry *h; struct bfd_link_hash_entry *bh; @@ -3173,7 +3473,7 @@ _bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) bh = NULL; if (!(_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, - (bfd_vma) 0, (const char *)NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) + (bfd_vma) 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) return FALSE; h = (struct elf_link_hash_entry *)bh; @@ -3191,12 +3491,11 @@ _bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ - static bfd_boolean -_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, - struct bfd_link_info *info, - struct elf_link_hash_entry *h, - Elf_Internal_Sym *sym) +s3_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, + struct bfd_link_info *info, + struct elf_link_hash_entry *h, + Elf_Internal_Sym *sym) { bfd *dynobj; asection *sgot; @@ -3218,24 +3517,24 @@ _bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, /* FIXME: Can h->dynindex be more than 64K? */ if (h->dynindx & 0xffff0000) - return FALSE; + return FALSE; /* Fill the stub. */ - bfd_put_32 (output_bfd, STUB_LW, stub); - bfd_put_32 (output_bfd, STUB_MOVE, stub + 4); - bfd_put_32 (output_bfd, STUB_LI16 | (h->dynindx << 1), stub + 8); - bfd_put_32 (output_bfd, STUB_BRL, stub + 12); + score_bfd_put_32 (output_bfd, STUB_LW, stub); + score_bfd_put_32 (output_bfd, STUB_MOVE, stub + 4); + score_bfd_put_32 (output_bfd, STUB_LI16 | (h->dynindx << 1), stub + 8); + score_bfd_put_32 (output_bfd, STUB_BRL, stub + 12); BFD_ASSERT (h->plt.offset <= s->size); memcpy (s->contents + h->plt.offset, stub, SCORE_FUNCTION_STUB_SIZE); /* Mark the symbol as undefined. plt.offset != -1 occurs - only for the referenced symbol. */ + only for the referenced symbol. */ sym->st_shndx = SHN_UNDEF; /* The run-time linker uses the st_value field of the symbol - to reset the global offset table entry for this external - to its stub address when unlinking a shared object. */ + to reset the global offset table entry for this external + to its stub address when unlinking a shared object. */ sym->st_value = (s->output_section->vma + s->output_offset + h->plt.offset); } @@ -3256,7 +3555,7 @@ _bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, value = sym->st_value; offset = score_elf_global_got_index (dynobj, h); - bfd_put_32 (output_bfd, value, sgot->contents + offset); + score_bfd_put_32 (output_bfd, value, sgot->contents + offset); } /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ @@ -3280,10 +3579,9 @@ _bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, } /* Finish up the dynamic sections. */ - static bfd_boolean -_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, - struct bfd_link_info *info) +s3_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, + struct bfd_link_info *info) { bfd *dynobj; asection *sdyn; @@ -3313,88 +3611,88 @@ _bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, BFD_ASSERT (g != NULL); for (b = sdyn->contents; - b < sdyn->contents + sdyn->size; - b += SCORE_ELF_DYN_SIZE (dynobj)) - { - Elf_Internal_Dyn dyn; - const char *name; - size_t elemsize; - bfd_boolean swap_out_p; - - /* Read in the current dynamic entry. */ - (*get_elf_backend_data (dynobj)->s->swap_dyn_in) (dynobj, b, &dyn); - - /* Assume that we're going to modify it and write it out. */ - swap_out_p = TRUE; - - switch (dyn.d_tag) - { - case DT_RELENT: - s = score_elf_rel_dyn_section (dynobj, FALSE); - BFD_ASSERT (s != NULL); - dyn.d_un.d_val = SCORE_ELF_REL_SIZE (dynobj); - break; - - case DT_STRSZ: - /* Rewrite DT_STRSZ. */ - dyn.d_un.d_val = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr); - break; - - case DT_PLTGOT: - name = ".got"; - s = bfd_get_section_by_name (output_bfd, name); - BFD_ASSERT (s != NULL); - dyn.d_un.d_ptr = s->vma; - break; - - case DT_SCORE_BASE_ADDRESS: - s = output_bfd->sections; - BFD_ASSERT (s != NULL); - dyn.d_un.d_ptr = s->vma & ~(bfd_vma) 0xffff; - break; - - case DT_SCORE_LOCAL_GOTNO: - dyn.d_un.d_val = g->local_gotno; - break; - - case DT_SCORE_UNREFEXTNO: - /* The index into the dynamic symbol table which is the - entry of the first external symbol that is not - referenced within the same object. */ - dyn.d_un.d_val = bfd_count_sections (output_bfd) + 1; - break; - - case DT_SCORE_GOTSYM: - if (g->global_gotsym) - { - dyn.d_un.d_val = g->global_gotsym->dynindx; - break; - } - /* In case if we don't have global got symbols we default - to setting DT_SCORE_GOTSYM to the same value as - DT_SCORE_SYMTABNO, so we just fall through. */ - - case DT_SCORE_SYMTABNO: - name = ".dynsym"; - elemsize = SCORE_ELF_SYM_SIZE (output_bfd); - s = bfd_get_section_by_name (output_bfd, name); - BFD_ASSERT (s != NULL); - - dyn.d_un.d_val = s->size / elemsize; - break; - - case DT_SCORE_HIPAGENO: - dyn.d_un.d_val = g->local_gotno - SCORE_RESERVED_GOTNO; - break; - - default: - swap_out_p = FALSE; - break; - } - - if (swap_out_p) - (*get_elf_backend_data (dynobj)->s->swap_dyn_out) (dynobj, &dyn, b); - } + b < sdyn->contents + sdyn->size; + b += SCORE_ELF_DYN_SIZE (dynobj)) + { + Elf_Internal_Dyn dyn; + const char *name; + size_t elemsize; + bfd_boolean swap_out_p; + + /* Read in the current dynamic entry. */ + (*get_elf_backend_data (dynobj)->s->swap_dyn_in) (dynobj, b, &dyn); + + /* Assume that we're going to modify it and write it out. */ + swap_out_p = TRUE; + + switch (dyn.d_tag) + { + case DT_RELENT: + s = score_elf_rel_dyn_section (dynobj, FALSE); + BFD_ASSERT (s != NULL); + dyn.d_un.d_val = SCORE_ELF_REL_SIZE (dynobj); + break; + + case DT_STRSZ: + /* Rewrite DT_STRSZ. */ + dyn.d_un.d_val = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr); + break; + + case DT_PLTGOT: + name = ".got"; + s = bfd_get_section_by_name (output_bfd, name); + BFD_ASSERT (s != NULL); + dyn.d_un.d_ptr = s->vma; + break; + + case DT_SCORE_BASE_ADDRESS: + s = output_bfd->sections; + BFD_ASSERT (s != NULL); + dyn.d_un.d_ptr = s->vma & ~(bfd_vma) 0xffff; + break; + + case DT_SCORE_LOCAL_GOTNO: + dyn.d_un.d_val = g->local_gotno; + break; + + case DT_SCORE_UNREFEXTNO: + /* The index into the dynamic symbol table which is the + entry of the first external symbol that is not + referenced within the same object. */ + dyn.d_un.d_val = bfd_count_sections (output_bfd) + 1; + break; + + case DT_SCORE_GOTSYM: + if (g->global_gotsym) + { + dyn.d_un.d_val = g->global_gotsym->dynindx; + break; + } + /* In case if we don't have global got symbols we default + to setting DT_SCORE_GOTSYM to the same value as + DT_SCORE_SYMTABNO, so we just fall through. */ + + case DT_SCORE_SYMTABNO: + name = ".dynsym"; + elemsize = SCORE_ELF_SYM_SIZE (output_bfd); + s = bfd_get_section_by_name (output_bfd, name); + BFD_ASSERT (s != NULL); + + dyn.d_un.d_val = s->size / elemsize; + break; + + case DT_SCORE_HIPAGENO: + dyn.d_un.d_val = g->local_gotno - SCORE_RESERVED_GOTNO; + break; + + default: + swap_out_p = FALSE; + break; + } + + if (swap_out_p) + (*get_elf_backend_data (dynobj)->s->swap_dyn_out) (dynobj, &dyn, b); + } } /* The first entry of the global offset table will be filled at @@ -3402,8 +3700,8 @@ _bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, This isn't the case of IRIX rld. */ if (sgot != NULL && sgot->size > 0) { - bfd_put_32 (output_bfd, 0, sgot->contents); - bfd_put_32 (output_bfd, 0x80000000, sgot->contents + SCORE_ELF_GOT_SIZE (output_bfd)); + score_bfd_put_32 (output_bfd, 0, sgot->contents); + score_bfd_put_32 (output_bfd, 0x80000000, sgot->contents + SCORE_ELF_GOT_SIZE (output_bfd)); } if (sgot != NULL) @@ -3418,7 +3716,7 @@ _bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, { reldyn_sorting_bfd = output_bfd; qsort ((Elf32_External_Rel *) s->contents + 1, s->reloc_count - 1, - sizeof (Elf32_External_Rel), score_elf_sort_dynamic_relocs); + sizeof (Elf32_External_Rel), score_elf_sort_dynamic_relocs); } return TRUE; @@ -3426,11 +3724,10 @@ _bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, /* This function set up the ELF section header for a BFD section in preparation for writing it out. This is where the flags and type fields are set for unusual sections. */ - static bfd_boolean -_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, - Elf_Internal_Shdr *hdr, - asection *sec) +s3_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, + Elf_Internal_Shdr *hdr, + asection *sec) { const char *name; @@ -3452,38 +3749,35 @@ _bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, warning message will be issued. backend_fake_section is called before assign_file_positions_except_relocs(); backend_section_processing after it. so, we modify section flag there, but not backend_fake_section. */ - static bfd_boolean -_bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr) +s3_bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr) { if (hdr->bfd_section != NULL) { const char *name = bfd_get_section_name (abfd, hdr->bfd_section); if (strcmp (name, ".sdata") == 0) - { - hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL; - hdr->sh_type = SHT_PROGBITS; - } + { + hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL; + hdr->sh_type = SHT_PROGBITS; + } else if (strcmp (name, ".sbss") == 0) - { - hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL; - hdr->sh_type = SHT_NOBITS; - } + { + hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL; + hdr->sh_type = SHT_NOBITS; + } else if (strcmp (name, ".srdata") == 0) - { - hdr->sh_flags |= SHF_ALLOC | SHF_SCORE_GPREL; - hdr->sh_type = SHT_PROGBITS; - } + { + hdr->sh_flags |= SHF_ALLOC | SHF_SCORE_GPREL; + hdr->sh_type = SHT_PROGBITS; + } } return TRUE; } static bfd_boolean -_bfd_score_elf_write_section (bfd *output_bfd, - struct bfd_link_info *link_info ATTRIBUTE_UNUSED, - asection *sec, bfd_byte *contents) +s3_bfd_score_elf_write_section (bfd *output_bfd, asection *sec, bfd_byte *contents) { bfd_byte *to, *from, *end; int i; @@ -3514,11 +3808,10 @@ _bfd_score_elf_write_section (bfd *output_bfd, /* Copy data from a SCORE ELF indirect symbol to its direct symbol, hiding the old indirect symbol. Process additional relocation information. */ - static void -_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *info, - struct elf_link_hash_entry *dir, - struct elf_link_hash_entry *ind) +s3_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *info, + struct elf_link_hash_entry *dir, + struct elf_link_hash_entry *ind) { struct score_elf_link_hash_entry *dirscore, *indscore; @@ -3539,10 +3832,9 @@ _bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *info, } /* Remove information about discarded functions from other sections which mention them. */ - static bfd_boolean -_bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, - struct bfd_link_info *info) +s3_bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, + struct bfd_link_info *info) { asection *o; bfd_boolean ret = FALSE; @@ -3593,9 +3885,8 @@ _bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, } /* Signal that discard_info() has removed the discarded relocations for this section. */ - static bfd_boolean -_bfd_score_elf_ignore_discarded_relocs (asection *sec) +s3_bfd_score_elf_ignore_discarded_relocs (asection *sec) { if (strcmp (sec->name, ".pdr") == 0) return TRUE; @@ -3604,20 +3895,19 @@ _bfd_score_elf_ignore_discarded_relocs (asection *sec) /* Return the section that should be marked against GC for a given relocation. */ - static asection * -_bfd_score_elf_gc_mark_hook (asection *sec, - struct bfd_link_info *info, - Elf_Internal_Rela *rel, - struct elf_link_hash_entry *h, - Elf_Internal_Sym *sym) +s3_bfd_score_elf_gc_mark_hook (asection *sec, + struct bfd_link_info *info, + Elf_Internal_Rela *rel, + struct elf_link_hash_entry *h, + Elf_Internal_Sym *sym) { if (h != NULL) switch (ELF32_R_TYPE (rel->r_info)) { case R_SCORE_GNU_VTINHERIT: case R_SCORE_GNU_VTENTRY: - return NULL; + return NULL; } return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym); @@ -3626,7 +3916,7 @@ _bfd_score_elf_gc_mark_hook (asection *sec, /* Support for core dump NOTE sections. */ static bfd_boolean -_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) +s3_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; unsigned int raw_size; @@ -3638,10 +3928,10 @@ _bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) case 148: /* Linux/Score 32-bit. */ /* pr_cursig */ - elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12); + elf_tdata (abfd)->core_signal = score_bfd_get_16 (abfd, note->descdata + 12); /* pr_pid */ - elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24); + elf_tdata (abfd)->core_pid = score_bfd_get_32 (abfd, note->descdata + 24); /* pr_reg */ offset = 72; @@ -3655,7 +3945,7 @@ _bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) } static bfd_boolean -_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) +s3_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { @@ -3684,13 +3974,12 @@ _bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) /* Score BFD functions. */ - static reloc_howto_type * -elf32_score_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_type code) +s3_elf32_score_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_type code) { unsigned int i; - for (i = 0; i < NUM_ELEM (elf32_score_reloc_map); i++) + for (i = 0; i < ARRAY_SIZE (elf32_score_reloc_map); i++) if (elf32_score_reloc_map[i].bfd_reloc_val == code) return &elf32_score_howto_table[elf32_score_reloc_map[i].elf_reloc_val]; @@ -3699,16 +3988,16 @@ elf32_score_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_t static reloc_howto_type * elf32_score_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, - const char *r_name) + const char *r_name) { unsigned int i; for (i = 0; i < (sizeof (elf32_score_howto_table) - / sizeof (elf32_score_howto_table[0])); + / sizeof (elf32_score_howto_table[0])); i++) if (elf32_score_howto_table[i].name != NULL - && strcasecmp (elf32_score_howto_table[i].name, r_name) == 0) + && strcasecmp (elf32_score_howto_table[i].name, r_name) == 0) return &elf32_score_howto_table[i]; return NULL; @@ -3717,7 +4006,7 @@ elf32_score_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Create a score elf linker hash table. */ static struct bfd_link_hash_table * -elf32_score_link_hash_table_create (bfd *abfd) +s3_elf32_score_link_hash_table_create (bfd *abfd) { struct score_elf_link_hash_table *ret; bfd_size_type amt = sizeof (struct score_elf_link_hash_table); @@ -3727,7 +4016,7 @@ elf32_score_link_hash_table_create (bfd *abfd) return NULL; if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, score_elf_link_hash_newfunc, - sizeof (struct score_elf_link_hash_entry))) + sizeof (struct score_elf_link_hash_entry))) { free (ret); return NULL; @@ -3737,7 +4026,7 @@ elf32_score_link_hash_table_create (bfd *abfd) } static bfd_boolean -elf32_score_print_private_bfd_data (bfd *abfd, void * ptr) +s3_elf32_score_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -3762,7 +4051,7 @@ elf32_score_print_private_bfd_data (bfd *abfd, void * ptr) } static bfd_boolean -elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd) +s3_elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd) { flagword in_flags; flagword out_flags; @@ -3786,10 +4075,10 @@ elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd) elf_elfheader (obfd)->e_flags = in_flags; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) - && bfd_get_arch_info (obfd)->the_default) - { - return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); - } + && bfd_get_arch_info (obfd)->the_default) + { + return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); + } return TRUE; } @@ -3805,7 +4094,7 @@ elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd) } static bfd_boolean -elf32_score_new_section_hook (bfd *abfd, asection *sec) +s3_elf32_score_new_section_hook (bfd *abfd, asection *sec) { struct _score_elf_section_data *sdata; bfd_size_type amt = sizeof (*sdata); @@ -3818,6 +4107,363 @@ elf32_score_new_section_hook (bfd *abfd, asection *sec) return _bfd_elf_new_section_hook (abfd, sec); } +/*****************************************************************************/ + +/* s3_s7: backend hooks. */ +static void +_bfd_score_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, + arelent *bfd_reloc, + Elf_Internal_Rela *elf_reloc) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_info_to_howto (abfd, bfd_reloc, elf_reloc); + else + return s7_bfd_score_info_to_howto (abfd, bfd_reloc, elf_reloc); +} + +static bfd_boolean +_bfd_score_elf_relocate_section (bfd *output_bfd, + struct bfd_link_info *info, + bfd *input_bfd, + asection *input_section, + bfd_byte *contents, + Elf_Internal_Rela *relocs, + Elf_Internal_Sym *local_syms, + asection **local_sections) +{ + if (bfd_get_mach (output_bfd) == bfd_mach_score3) + return s3_bfd_score_elf_relocate_section (output_bfd, + info, input_bfd, input_section, contents, relocs, + local_syms, local_sections); + else + return s7_bfd_score_elf_relocate_section (output_bfd, + info, input_bfd, input_section, contents, relocs, + local_syms, local_sections); +} + +static bfd_boolean +_bfd_score_elf_check_relocs (bfd *abfd, + struct bfd_link_info *info, + asection *sec, + const Elf_Internal_Rela *relocs) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_elf_check_relocs (abfd, info, sec, relocs); + else + return s7_bfd_score_elf_check_relocs (abfd, info, sec, relocs); +} + +static bfd_boolean +_bfd_score_elf_add_symbol_hook (bfd *abfd, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + Elf_Internal_Sym *sym, + const char **namep ATTRIBUTE_UNUSED, + flagword *flagsp ATTRIBUTE_UNUSED, + asection **secp, + bfd_vma *valp) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, + secp, valp); + else + return s7_bfd_score_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, + secp, valp); +} + +static void +_bfd_score_elf_symbol_processing (bfd *abfd, asymbol *asym) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_elf_symbol_processing (abfd, asym); + else + return s7_bfd_score_elf_symbol_processing (abfd, asym); +} + +static int +_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, + const char *name ATTRIBUTE_UNUSED, + Elf_Internal_Sym *sym, + asection *input_sec, + struct elf_link_hash_entry *h ATTRIBUTE_UNUSED) +{ + /* If link a empty .o, then this filed is NULL. */ + if (info->input_bfds == NULL) + { + /* If we see a common symbol, which implies a relocatable link, then + if a symbol was small common in an input file, mark it as small + common in the output file. */ + if (sym->st_shndx == SHN_COMMON && strcmp (input_sec->name, ".scommon") == 0) + sym->st_shndx = SHN_SCORE_SCOMMON; + return 1; + } + + if (bfd_get_mach (info->input_bfds) == bfd_mach_score3) + return s3_bfd_score_elf_link_output_symbol_hook (info, name, sym, input_sec, h); + else + return s7_bfd_score_elf_link_output_symbol_hook (info, name, sym, input_sec, h); +} + +static bfd_boolean +_bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, + asection *sec, + int *retval) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_elf_section_from_bfd_section (abfd, sec, retval); + else + return s7_bfd_score_elf_section_from_bfd_section (abfd, sec, retval); +} + +static bfd_boolean +_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, + struct elf_link_hash_entry *h) +{ + if (bfd_get_mach (info->input_bfds) == bfd_mach_score3) + return s3_bfd_score_elf_adjust_dynamic_symbol (info, h); + else + return s7_bfd_score_elf_adjust_dynamic_symbol (info, h); +} + +static bfd_boolean +_bfd_score_elf_always_size_sections (bfd *output_bfd, + struct bfd_link_info *info) +{ + if (bfd_get_mach (output_bfd) == bfd_mach_score3) + return s3_bfd_score_elf_always_size_sections (output_bfd, info); + else + return s7_bfd_score_elf_always_size_sections (output_bfd, info); +} + +static bfd_boolean +_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) +{ + if (bfd_get_mach (output_bfd) == bfd_mach_score3) + return s3_bfd_score_elf_size_dynamic_sections (output_bfd, info); + else + return s7_bfd_score_elf_size_dynamic_sections (output_bfd, info); +} + +static bfd_boolean +_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_elf_create_dynamic_sections (abfd, info); + else + return s7_bfd_score_elf_create_dynamic_sections (abfd, info); +} + +static bfd_boolean +_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, + struct bfd_link_info *info, + struct elf_link_hash_entry *h, + Elf_Internal_Sym *sym) +{ + if (bfd_get_mach (output_bfd) == bfd_mach_score3) + return s3_bfd_score_elf_finish_dynamic_symbol (output_bfd, info, h, sym); + else + return s7_bfd_score_elf_finish_dynamic_symbol (output_bfd, info, h, sym); +} + +static bfd_boolean +_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, + struct bfd_link_info *info) +{ + if (bfd_get_mach (output_bfd) == bfd_mach_score3) + return s3_bfd_score_elf_finish_dynamic_sections (output_bfd, info); + else + return s7_bfd_score_elf_finish_dynamic_sections (output_bfd, info); +} + +static bfd_boolean +_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, + Elf_Internal_Shdr *hdr, + asection *sec) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_elf_fake_sections (abfd, hdr, sec); + else + return s7_bfd_score_elf_fake_sections (abfd, hdr, sec); +} + +static bfd_boolean +_bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_elf_section_processing (abfd, hdr); + else + return s7_bfd_score_elf_section_processing (abfd, hdr); +} + +static bfd_boolean +_bfd_score_elf_write_section (bfd *output_bfd, + struct bfd_link_info *link_info ATTRIBUTE_UNUSED, + asection *sec, bfd_byte *contents) +{ + if (bfd_get_mach (output_bfd) == bfd_mach_score3) + return s3_bfd_score_elf_write_section (output_bfd, sec, contents); + else + return s7_bfd_score_elf_write_section (output_bfd, sec, contents); +} + +static void +_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *info, + struct elf_link_hash_entry *dir, + struct elf_link_hash_entry *ind) +{ + if (bfd_get_mach (info->input_bfds) == bfd_mach_score3) + return s3_bfd_score_elf_copy_indirect_symbol (info, dir, ind); + else + return s7_bfd_score_elf_copy_indirect_symbol (info, dir, ind); +} + +static void +_bfd_score_elf_hide_symbol (struct bfd_link_info *info, + struct elf_link_hash_entry *entry, + bfd_boolean force_local) +{ + if (bfd_get_mach (info->input_bfds) == bfd_mach_score3) + return s3_bfd_score_elf_hide_symbol (info, entry, force_local); + else + return s7_bfd_score_elf_hide_symbol (info, entry, force_local); +} + +static bfd_boolean +_bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, + struct bfd_link_info *info) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_elf_discard_info (abfd, cookie, info); + else + return s7_bfd_score_elf_discard_info (abfd, cookie, info); +} + +static bfd_boolean +_bfd_score_elf_ignore_discarded_relocs (asection *sec) +{ + if (bfd_get_mach (sec->owner) == bfd_mach_score3) + return s3_bfd_score_elf_ignore_discarded_relocs (sec); + else + return s7_bfd_score_elf_ignore_discarded_relocs (sec); +} + +static asection * +_bfd_score_elf_gc_mark_hook (asection *sec, + struct bfd_link_info *info, + Elf_Internal_Rela *rel, + struct elf_link_hash_entry *h, + Elf_Internal_Sym *sym) +{ + if (bfd_get_mach (info->input_bfds) == bfd_mach_score3) + return s3_bfd_score_elf_gc_mark_hook (sec, info, rel, h, sym); + else + return s7_bfd_score_elf_gc_mark_hook (sec, info, rel, h, sym); +} + +static bfd_boolean +_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_elf_grok_prstatus (abfd, note); + else + return s7_bfd_score_elf_grok_prstatus (abfd, note); +} + +static bfd_boolean +_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_bfd_score_elf_grok_psinfo (abfd, note); + else + return s7_bfd_score_elf_grok_psinfo (abfd, note); +} + +static reloc_howto_type * +elf32_score_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_type code) +{ + /* s3: NOTE!!! + gas will call elf32_score_reloc_type_lookup, and don't write elf file. + So just using score3, but we don't know ld will call this or not. + If so, this way can't work. */ + + if (score3) + return s3_elf32_score_reloc_type_lookup (abfd, code); + else + return s7_elf32_score_reloc_type_lookup (abfd, code); +} + +static struct bfd_link_hash_table * +elf32_score_link_hash_table_create (bfd *abfd) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_elf32_score_link_hash_table_create (abfd); + else + return s7_elf32_score_link_hash_table_create (abfd); +} + +static bfd_boolean +elf32_score_print_private_bfd_data (bfd *abfd, void * ptr) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_elf32_score_print_private_bfd_data (abfd, ptr); + else + return s7_elf32_score_print_private_bfd_data (abfd, ptr); +} + +static bfd_boolean +elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd) +{ + if (bfd_get_mach (obfd) == bfd_mach_score3) + return s3_elf32_score_merge_private_bfd_data (ibfd, obfd); + else + return s7_elf32_score_merge_private_bfd_data (ibfd, obfd); +} + +static bfd_boolean +elf32_score_new_section_hook (bfd *abfd, asection *sec) +{ + if (bfd_get_mach (abfd) == bfd_mach_score3) + return s3_elf32_score_new_section_hook (abfd, sec); + else + return s7_elf32_score_new_section_hook (abfd, sec); +} + + +/* s3_s7: don't need to split. */ + +/* Set the right machine number. */ +static bfd_boolean +_bfd_score_elf_score_object_p (bfd * abfd) +{ + int e_set = bfd_mach_score7; + + if (elf_elfheader (abfd)->e_machine == EM_SCORE) + { + int e_mach = elf_elfheader (abfd)->e_flags & EF_SCORE_MACH & EF_OMIT_PIC_FIXDD; + switch (e_mach) + { + /* Set default target is score7. */ + default: + case E_SCORE_MACH_SCORE7: + e_set = bfd_mach_score7; + break; + + case E_SCORE_MACH_SCORE3: + e_set = bfd_mach_score3; + break; + } + } + + return bfd_default_set_arch_mach (abfd, bfd_arch_score, e_set); +} + +bfd_boolean +_bfd_score_elf_common_definition (Elf_Internal_Sym *sym) +{ + return (sym->st_shndx == SHN_COMMON || sym->st_shndx == SHN_SCORE_SCOMMON); +} + +/*****************************************************************************/ + #define USE_REL 1 #define TARGET_LITTLE_SYM bfd_elf32_littlescore_vec @@ -3826,6 +4472,7 @@ elf32_score_new_section_hook (bfd *abfd, asection *sec) #define TARGET_BIG_NAME "elf32-bigscore" #define ELF_ARCH bfd_arch_score #define ELF_MACHINE_CODE EM_SCORE +#define ELF_MACHINE_ALT1 EM_SCORE_OLD #define ELF_MAXPAGESIZE 0x8000 #define elf_info_to_howto 0 @@ -3869,6 +4516,7 @@ elf32_score_new_section_hook (bfd *abfd, asection *sec) #define elf_backend_plt_header_size 0 #define elf_backend_collect TRUE #define elf_backend_type_change_ok TRUE +#define elf_backend_object_p _bfd_score_elf_score_object_p #define bfd_elf32_bfd_reloc_type_lookup elf32_score_reloc_type_lookup #define bfd_elf32_bfd_reloc_name_lookup \ diff --git a/cegcc/src/binutils/bfd/elf32-sh-relocs.h b/cegcc/src/binutils/bfd/elf32-sh-relocs.h index 3b6e35d81..70f3a7b8a 100644 --- a/cegcc/src/binutils/bfd/elf32-sh-relocs.h +++ b/cegcc/src/binutils/bfd/elf32-sh-relocs.h @@ -1,4 +1,4 @@ -/* Copyright 2007 Free Software Foundation, Inc. +/* Copyright 2006, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elf32-sh.c b/cegcc/src/binutils/bfd/elf32-sh.c index 89cef6776..7b81aab7c 100644 --- a/cegcc/src/binutils/bfd/elf32-sh.c +++ b/cegcc/src/binutils/bfd/elf32-sh.c @@ -1,6 +1,6 @@ /* Renesas / SuperH SH specific support for 32-bit ELF Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -2187,8 +2187,8 @@ struct elf_sh_link_hash_table /* The (unloaded but important) VxWorks .rela.plt.unloaded section. */ asection *srelplt2; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; /* A counter or offset to track a TLS got entry. */ union @@ -2281,7 +2281,7 @@ sh_elf_link_hash_table_create (bfd *abfd) ret->sdynbss = NULL; ret->srelbss = NULL; ret->srelplt2 = NULL; - ret->sym_sec.abfd = NULL; + ret->sym_cache.abfd = NULL; ret->tls_ldm_got.refcount = 0; ret->plt_info = NULL; ret->vxworks_p = vxworks_object_p (abfd); @@ -2303,18 +2303,9 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) htab = sh_elf_hash_table (info); htab->sgot = bfd_get_section_by_name (dynobj, ".got"); htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); - if (! htab->sgot || ! htab->sgotplt) + htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); + if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot) abort (); - - htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got", - (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)); - if (htab->srelgot == NULL - || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2)) - return FALSE; return TRUE; } @@ -5212,15 +5203,20 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, head = &((struct elf_sh_link_hash_entry *) h)->dyn_relocs; else { + /* Track dynamic relocs needed for local syms too. */ asection *s; void *vpp; + Elf_Internal_Sym *isym; - /* Track dynamic relocs needed for local syms too. */ - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (s == NULL) + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; + vpp = &elf_section_data (s)->local_dynrel; head = (struct elf_sh_dyn_relocs **) vpp; } diff --git a/cegcc/src/binutils/bfd/elf32-sh64-com.c b/cegcc/src/binutils/bfd/elf32-sh64-com.c index 2db9178c9..a4aa1be69 100644 --- a/cegcc/src/binutils/bfd/elf32-sh64-com.c +++ b/cegcc/src/binutils/bfd/elf32-sh64-com.c @@ -1,5 +1,5 @@ /* SuperH SH64-specific support for 32-bit ELF - Copyright 2000, 2001, 2002, 2003, 2004, 2007 + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elf32-sh64.c b/cegcc/src/binutils/bfd/elf32-sh64.c index 3de856265..2f2b853db 100644 --- a/cegcc/src/binutils/bfd/elf32-sh64.c +++ b/cegcc/src/binutils/bfd/elf32-sh64.c @@ -1,5 +1,5 @@ /* SuperH SH64-specific support for 32-bit ELF - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -60,7 +60,7 @@ static int sh64_elf_get_symbol_type static bfd_boolean sh64_elf_add_symbol_hook (bfd *, struct bfd_link_info *, Elf_Internal_Sym *, const char **, flagword *, asection **, bfd_vma *); -static bfd_boolean sh64_elf_link_output_symbol_hook +static int sh64_elf_link_output_symbol_hook (struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *); static bfd_boolean sh64_backend_section_from_shdr @@ -477,7 +477,7 @@ sh64_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, we don't need to look up and make sure to emit the main symbol for each DataLabel symbol. */ -bfd_boolean +static int sh64_elf_link_output_symbol_hook (struct bfd_link_info *info, const char *cname, Elf_Internal_Sym *sym, @@ -492,7 +492,7 @@ sh64_elf_link_output_symbol_hook (struct bfd_link_info *info, name[strlen (name) - strlen (DATALABEL_SUFFIX)] = 0; } - return TRUE; + return 1; } /* Check a SH64-specific reloc and put the value to relocate to into diff --git a/cegcc/src/binutils/bfd/elf32-sh64.h b/cegcc/src/binutils/bfd/elf32-sh64.h index 0ecc714bf..fa5f3538d 100644 --- a/cegcc/src/binutils/bfd/elf32-sh64.h +++ b/cegcc/src/binutils/bfd/elf32-sh64.h @@ -1,5 +1,5 @@ /* SH ELF support for BFD. - Copyright 2003, 2007 Free Software Foundation, Inc. + Copyright 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elf32-sparc.c b/cegcc/src/binutils/bfd/elf32-sparc.c index ffe1b97d2..ae0ac2b53 100644 --- a/cegcc/src/binutils/bfd/elf32-sparc.c +++ b/cegcc/src/binutils/bfd/elf32-sparc.c @@ -1,6 +1,6 @@ /* SPARC-specific support for 32-bit ELF Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elf32-spu.c b/cegcc/src/binutils/bfd/elf32-spu.c index 725eb5a5a..890f26086 100644 --- a/cegcc/src/binutils/bfd/elf32-spu.c +++ b/cegcc/src/binutils/bfd/elf32-spu.c @@ -88,6 +88,9 @@ static reloc_howto_type elf_howto_table[] = { HOWTO (R_SPU_PPU64, 0, 4, 64, FALSE, 0, complain_overflow_dont, bfd_elf_generic_reloc, "SPU_PPU64", FALSE, 0, -1, FALSE), + HOWTO (R_SPU_ADD_PIC, 0, 0, 0, FALSE, 0, complain_overflow_dont, + bfd_elf_generic_reloc, "SPU_ADD_PIC", + FALSE, 0, 0x00000000, FALSE), }; static struct bfd_elf_special_section const spu_elf_special_sections[] = { @@ -135,6 +138,8 @@ spu_elf_bfd_to_reloc_type (bfd_reloc_code_real_type code) return R_SPU_PPU32; case BFD_RELOC_SPU_PPU64: return R_SPU_PPU64; + case BFD_RELOC_SPU_ADD_PIC: + return R_SPU_ADD_PIC; } } @@ -311,9 +316,7 @@ struct spu_link_hash_table /* The stub section for each overlay section. */ asection **stub_sec; - struct elf_link_hash_entry *ovly_load; - struct elf_link_hash_entry *ovly_return; - unsigned long ovly_load_r_symndx; + struct elf_link_hash_entry *ovly_entry[2]; /* Number of overlay buffers. */ unsigned int num_buf; @@ -324,6 +327,7 @@ struct spu_link_hash_table /* For soft icache. */ unsigned int line_size_log2; unsigned int num_lines_log2; + unsigned int fromelem_size_log2; /* How much memory we have. */ unsigned int local_store; @@ -340,6 +344,9 @@ struct spu_link_hash_table /* Count of overlay stubs needed in non-overlay area. */ unsigned int non_ovly_stub; + /* Pointer to the fixup section */ + asection *sfixup; + /* Set on error. */ unsigned int stub_err : 1; }; @@ -368,6 +375,7 @@ struct call_info unsigned int max_depth; unsigned int is_tail : 1; unsigned int is_pasted : 1; + unsigned int broken_cycle : 1; unsigned int priority : 13; }; @@ -463,10 +471,18 @@ spu_elf_link_hash_table_create (bfd *abfd) void spu_elf_setup (struct bfd_link_info *info, struct spu_elf_params *params) { + bfd_vma max_branch_log2; + struct spu_link_hash_table *htab = spu_hash_table (info); htab->params = params; htab->line_size_log2 = bfd_log2 (htab->params->line_size); htab->num_lines_log2 = bfd_log2 (htab->params->num_lines); + + /* For the software i-cache, we provide a "from" list whose size + is a power-of-two number of quadwords, big enough to hold one + byte per outgoing branch. Compute this number here. */ + max_branch_log2 = bfd_log2 (htab->params->max_branch); + htab->fromelem_size_log2 = max_branch_log2 > 4 ? max_branch_log2 - 4 : 0; } /* Find the symbol for the given R_SYMNDX in IBFD and set *HP and *SYMP @@ -545,6 +561,7 @@ get_sym_h (struct elf_link_hash_entry **hp, bfd_boolean spu_elf_create_sections (struct bfd_link_info *info) { + struct spu_link_hash_table *htab = spu_hash_table (info); bfd *ibfd; for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next) @@ -587,6 +604,19 @@ spu_elf_create_sections (struct bfd_link_info *info) s->contents = data; } + if (htab->params->emit_fixups) + { + asection *s; + flagword flags; + ibfd = info->input_bfds; + flags = SEC_LOAD | SEC_ALLOC | SEC_READONLY | SEC_HAS_CONTENTS + | SEC_IN_MEMORY; + s = bfd_make_section_anyway_with_flags (ibfd, ".fixup", flags); + if (s == NULL || !bfd_set_section_alignment (ibfd, s, 2)) + return FALSE; + htab->sfixup = s; + } + return TRUE; } @@ -605,9 +635,10 @@ sort_sections (const void *a, const void *b) return (*s1)->index - (*s2)->index; } -/* Identify overlays in the output bfd, and number them. */ +/* Identify overlays in the output bfd, and number them. + Returns 0 on error, 1 if no overlays, 2 if overlays. */ -bfd_boolean +int spu_elf_find_overlays (struct bfd_link_info *info) { struct spu_link_hash_table *htab = spu_hash_table (info); @@ -615,15 +646,18 @@ spu_elf_find_overlays (struct bfd_link_info *info) unsigned int i, n, ovl_index, num_buf; asection *s; bfd_vma ovl_end; - const char *ovly_mgr_entry; + static const char *const entry_names[2][2] = { + { "__ovly_load", "__icache_br_handler" }, + { "__ovly_return", "__icache_call_handler" } + }; if (info->output_bfd->section_count < 2) - return FALSE; + return 1; alloc_sec = bfd_malloc (info->output_bfd->section_count * sizeof (*alloc_sec)); if (alloc_sec == NULL) - return FALSE; + return 0; /* Pick out all the alloced sections. */ for (n = 0, s = info->output_bfd->sections; s != NULL; s = s->next) @@ -635,7 +669,7 @@ spu_elf_find_overlays (struct bfd_link_info *info) if (n == 0) { free (alloc_sec); - return FALSE; + return 1; } /* Sort them by vma. */ @@ -644,9 +678,10 @@ spu_elf_find_overlays (struct bfd_link_info *info) ovl_end = alloc_sec[0]->vma + alloc_sec[0]->size; if (htab->params->ovly_flavour == ovly_soft_icache) { + unsigned int prev_buf = 0, set_id = 0; + /* Look for an overlapping vma to find the first overlay section. */ bfd_vma vma_start = 0; - bfd_vma lma_start = 0; for (i = 1; i < n; i++) { @@ -655,7 +690,6 @@ spu_elf_find_overlays (struct bfd_link_info *info) { asection *s0 = alloc_sec[i - 1]; vma_start = s0->vma; - lma_start = s0->lma; ovl_end = (s0->vma + ((bfd_vma) 1 << (htab->num_lines_log2 + htab->line_size_log2))); @@ -680,25 +714,29 @@ spu_elf_find_overlays (struct bfd_link_info *info) if (strncmp (s->name, ".ovl.init", 9) != 0) { num_buf = ((s->vma - vma_start) >> htab->line_size_log2) + 1; - if (((s->vma - vma_start) & (htab->params->line_size - 1)) - || ((s->lma - lma_start) & (htab->params->line_size - 1))) + set_id = (num_buf == prev_buf)? set_id + 1 : 0; + prev_buf = num_buf; + + if ((s->vma - vma_start) & (htab->params->line_size - 1)) { info->callbacks->einfo (_("%X%P: overlay section %A " "does not start on a cache line.\n"), s); - return FALSE; + bfd_set_error (bfd_error_bad_value); + return 0; } else if (s->size > htab->params->line_size) { info->callbacks->einfo (_("%X%P: overlay section %A " "is larger than a cache line.\n"), s); - return FALSE; + bfd_set_error (bfd_error_bad_value); + return 0; } alloc_sec[ovl_index++] = s; spu_elf_section_data (s)->u.o.ovl_index - = ((s->lma - lma_start) >> htab->line_size_log2) + 1; + = (set_id << htab->num_lines_log2) + num_buf; spu_elf_section_data (s)->u.o.ovl_buf = num_buf; } } @@ -712,7 +750,8 @@ spu_elf_find_overlays (struct bfd_link_info *info) info->callbacks->einfo (_("%X%P: overlay section %A " "is not in cache area.\n"), alloc_sec[i-1]); - return FALSE; + bfd_set_error (bfd_error_bad_value); + return 0; } else ovl_end = s->vma + s->size; @@ -752,7 +791,8 @@ spu_elf_find_overlays (struct bfd_link_info *info) "and %A do not start at the " "same address.\n"), s0, s); - return FALSE; + bfd_set_error (bfd_error_bad_value); + return 0; } if (ovl_end < s->vma + s->size) ovl_end = s->vma + s->size; @@ -766,15 +806,31 @@ spu_elf_find_overlays (struct bfd_link_info *info) htab->num_overlays = ovl_index; htab->num_buf = num_buf; htab->ovl_sec = alloc_sec; - ovly_mgr_entry = "__ovly_load"; - if (htab->params->ovly_flavour == ovly_soft_icache) - ovly_mgr_entry = "__icache_br_handler"; - htab->ovly_load = elf_link_hash_lookup (&htab->elf, ovly_mgr_entry, - FALSE, FALSE, FALSE); - if (htab->params->ovly_flavour != ovly_soft_icache) - htab->ovly_return = elf_link_hash_lookup (&htab->elf, "__ovly_return", - FALSE, FALSE, FALSE); - return ovl_index != 0; + + if (ovl_index == 0) + return 1; + + for (i = 0; i < 2; i++) + { + const char *name; + struct elf_link_hash_entry *h; + + name = entry_names[i][htab->params->ovly_flavour]; + h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE); + if (h == NULL) + return 0; + + if (h->root.type == bfd_link_hash_new) + { + h->root.type = bfd_link_hash_undefined; + h->ref_regular = 1; + h->ref_regular_nonweak = 1; + h->non_elf = 0; + } + htab->ovly_entry[i] = h; + } + + return 2; } /* Non-zero to use bra in overlay stubs rather than br. */ @@ -893,7 +949,7 @@ needs_ovl_stub (struct elf_link_hash_entry *h, if (h != NULL) { /* Ensure no stubs for user supplied overlay manager syms. */ - if (h == htab->ovly_load || h == htab->ovly_return) + if (h == htab->ovly_entry[0] || h == htab->ovly_entry[1]) return ret; /* setjmp always goes via an overlay stub, because then the return @@ -979,18 +1035,14 @@ needs_ovl_stub (struct elf_link_hash_entry *h, if (spu_elf_section_data (sym_sec->output_section)->u.o.ovl_index != spu_elf_section_data (input_section->output_section)->u.o.ovl_index) { - if (call || sym_type == STT_FUNC) + unsigned int lrlive = 0; + if (branch) + lrlive = (contents[1] & 0x70) >> 4; + + if (!lrlive && (call || sym_type == STT_FUNC)) ret = call_ovl_stub; else - { - ret = br000_ovl_stub; - - if (branch) - { - unsigned int lrlive = (contents[1] & 0x70) >> 4; - ret += lrlive; - } - } + ret = br000_ovl_stub + lrlive; } /* If this insn isn't a branch then we are possibly taking the @@ -1096,12 +1148,19 @@ count_stub (struct spu_link_hash_table *htab, } /* Support two sizes of overlay stubs, a slower more compact stub of two - intructions, and a faster stub of four instructions. */ + intructions, and a faster stub of four instructions. + Soft-icache stubs are four or eight words. */ static unsigned int -ovl_stub_size (enum _ovly_flavour ovly_flavour) +ovl_stub_size (struct spu_elf_params *params) { - return 8 << ovly_flavour; + return 16 << params->ovly_flavour >> params->compact_stub; +} + +static unsigned int +ovl_stub_size_log2 (struct spu_elf_params *params) +{ + return 4 + params->ovly_flavour - params->compact_stub; } /* Two instruction overlay stubs look like: @@ -1191,9 +1250,9 @@ build_stub (struct bfd_link_info *info, dest += dest_sec->output_offset + dest_sec->output_section->vma; from = sec->size + sec->output_offset + sec->output_section->vma; g->stub_addr = from; - to = (htab->ovly_load->root.u.def.value - + htab->ovly_load->root.u.def.section->output_offset - + htab->ovly_load->root.u.def.section->output_section->vma); + to = (htab->ovly_entry[0]->root.u.def.value + + htab->ovly_entry[0]->root.u.def.section->output_offset + + htab->ovly_entry[0]->root.u.def.section->output_section->vma); if (((dest | to | from) & 3) != 0) { @@ -1202,9 +1261,9 @@ build_stub (struct bfd_link_info *info, } dest_ovl = spu_elf_section_data (dest_sec->output_section)->u.o.ovl_index; - switch (htab->params->ovly_flavour) + if (htab->params->ovly_flavour == ovly_normal + && !htab->params->compact_stub) { - case ovly_normal: bfd_put_32 (sec->owner, ILA + ((dest_ovl << 7) & 0x01ffff80) + 78, sec->contents + sec->size); bfd_put_32 (sec->owner, LNOP, @@ -1217,9 +1276,10 @@ build_stub (struct bfd_link_info *info, else bfd_put_32 (sec->owner, BRA + ((to << 5) & 0x007fff80), sec->contents + sec->size + 12); - break; - - case ovly_compact: + } + else if (htab->params->ovly_flavour == ovly_normal + && htab->params->compact_stub) + { if (!BRA_STUBS) bfd_put_32 (sec->owner, BRSL + (((to - from) << 5) & 0x007fff80) + 75, sec->contents + sec->size); @@ -1228,9 +1288,10 @@ build_stub (struct bfd_link_info *info, sec->contents + sec->size); bfd_put_32 (sec->owner, (dest & 0x3ffff) | (dest_ovl << 18), sec->contents + sec->size + 4); - break; - - case ovly_soft_icache: + } + else if (htab->params->ovly_flavour == ovly_soft_icache + && htab->params->compact_stub) + { lrlive = 0; if (stub_type == nonovl_stub) ; @@ -1310,10 +1371,15 @@ build_stub (struct bfd_link_info *info, if (stub_type > br000_ovl_stub) lrlive = stub_type - br000_ovl_stub; - /* The branch that uses this stub goes to stub_addr + 12. We'll - set up an xor pattern that can be used by the icache manager + if (ovl == 0) + to = (htab->ovly_entry[1]->root.u.def.value + + htab->ovly_entry[1]->root.u.def.section->output_offset + + htab->ovly_entry[1]->root.u.def.section->output_section->vma); + + /* The branch that uses this stub goes to stub_addr + 4. We'll + set up an xor pattern that can be used by the icache manager to modify this branch to go directly to its destination. */ - g->stub_addr += 12; + g->stub_addr += 4; br_dest = g->stub_addr; if (irela == NULL) { @@ -1324,29 +1390,27 @@ build_stub (struct bfd_link_info *info, br_dest = to; } - bfd_put_32 (sec->owner, dest_ovl - 1, - sec->contents + sec->size + 0); - set_id = (dest_ovl - 1) >> htab->num_lines_log2; + set_id = ((dest_ovl - 1) >> htab->num_lines_log2) + 1; bfd_put_32 (sec->owner, (set_id << 18) | (dest & 0x3ffff), + sec->contents + sec->size); + bfd_put_32 (sec->owner, BRASL + ((to << 5) & 0x007fff80) + 75, sec->contents + sec->size + 4); bfd_put_32 (sec->owner, (lrlive << 29) | (g->br_addr & 0x3ffff), sec->contents + sec->size + 8); - bfd_put_32 (sec->owner, BRASL + ((to << 5) & 0x007fff80) + 75, - sec->contents + sec->size + 12); patt = dest ^ br_dest; if (irela != NULL && ELF32_R_TYPE (irela->r_info) == R_SPU_REL16) patt = (dest - g->br_addr) ^ (br_dest - g->br_addr); bfd_put_32 (sec->owner, (patt << 5) & 0x007fff80, - sec->contents + sec->size + 16 + (g->br_addr & 0xf)); + sec->contents + sec->size + 12); + if (ovl == 0) /* Extra space for linked list entries. */ sec->size += 16; - break; - - default: - abort (); } - sec->size += ovl_stub_size (htab->params->ovly_flavour); + else + abort (); + + sec->size += ovl_stub_size (htab->params); if (htab->params->emit_stub_syms) { @@ -1386,7 +1450,7 @@ build_stub (struct bfd_link_info *info, { h->root.type = bfd_link_hash_defined; h->root.u.def.section = sec; - h->size = ovl_stub_size (htab->params->ovly_flavour); + h->size = ovl_stub_size (htab->params); h->root.u.def.value = sec->size - h->size; h->type = STT_FUNC; h->ref_regular = 1; @@ -1583,7 +1647,8 @@ process_stubs (struct bfd_link_info *info, bfd_boolean build) return TRUE; } -/* Allocate space for overlay call and return stubs. */ +/* Allocate space for overlay call and return stubs. + Return 0 on error, 1 if no overlays, 2 otherwise. */ int spu_elf_size_stubs (struct bfd_link_info *info) @@ -1594,7 +1659,6 @@ spu_elf_size_stubs (struct bfd_link_info *info) flagword flags; unsigned int i; asection *stub; - const char *ovout; if (!process_stubs (info, FALSE)) return 0; @@ -1604,68 +1668,68 @@ spu_elf_size_stubs (struct bfd_link_info *info) if (htab->stub_err) return 0; - if (htab->stub_count == NULL) - return 1; - ibfd = info->input_bfds; - amt = (htab->num_overlays + 1) * sizeof (*htab->stub_sec); - htab->stub_sec = bfd_zmalloc (amt); - if (htab->stub_sec == NULL) - return 0; - - flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY - | SEC_HAS_CONTENTS | SEC_IN_MEMORY); - stub = bfd_make_section_anyway_with_flags (ibfd, ".stub", flags); - htab->stub_sec[0] = stub; - if (stub == NULL - || !bfd_set_section_alignment (ibfd, stub, - htab->params->ovly_flavour + 3)) - return 0; - stub->size = htab->stub_count[0] * ovl_stub_size (htab->params->ovly_flavour); - if (htab->params->ovly_flavour == ovly_soft_icache) - /* Extra space for linked list entries. */ - stub->size += htab->stub_count[0] * 16; - (*htab->params->place_spu_section) (stub, NULL, ".text"); - - for (i = 0; i < htab->num_overlays; ++i) + if (htab->stub_count != NULL) { - asection *osec = htab->ovl_sec[i]; - unsigned int ovl = spu_elf_section_data (osec)->u.o.ovl_index; + amt = (htab->num_overlays + 1) * sizeof (*htab->stub_sec); + htab->stub_sec = bfd_zmalloc (amt); + if (htab->stub_sec == NULL) + return 0; + + flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY + | SEC_HAS_CONTENTS | SEC_IN_MEMORY); stub = bfd_make_section_anyway_with_flags (ibfd, ".stub", flags); - htab->stub_sec[ovl] = stub; + htab->stub_sec[0] = stub; if (stub == NULL || !bfd_set_section_alignment (ibfd, stub, - htab->params->ovly_flavour + 3)) + ovl_stub_size_log2 (htab->params))) return 0; - stub->size = htab->stub_count[ovl] * ovl_stub_size (htab->params->ovly_flavour); - (*htab->params->place_spu_section) (stub, osec, NULL); - } + stub->size = htab->stub_count[0] * ovl_stub_size (htab->params); + if (htab->params->ovly_flavour == ovly_soft_icache) + /* Extra space for linked list entries. */ + stub->size += htab->stub_count[0] * 16; - flags = (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS | SEC_IN_MEMORY); - htab->ovtab = bfd_make_section_anyway_with_flags (ibfd, ".ovtab", flags); - if (htab->ovtab == NULL - || !bfd_set_section_alignment (ibfd, htab->ovtab, 4)) - return 0; + for (i = 0; i < htab->num_overlays; ++i) + { + asection *osec = htab->ovl_sec[i]; + unsigned int ovl = spu_elf_section_data (osec)->u.o.ovl_index; + stub = bfd_make_section_anyway_with_flags (ibfd, ".stub", flags); + htab->stub_sec[ovl] = stub; + if (stub == NULL + || !bfd_set_section_alignment (ibfd, stub, + ovl_stub_size_log2 (htab->params))) + return 0; + stub->size = htab->stub_count[ovl] * ovl_stub_size (htab->params); + } + } if (htab->params->ovly_flavour == ovly_soft_icache) { /* Space for icache manager tables. a) Tag array, one quadword per cache line. - b) Linked list elements, max_branch per line quadwords. - c) Indirect branch descriptors, 8 quadwords. */ - htab->ovtab->size = 16 * (((1 + htab->params->max_branch) - << htab->num_lines_log2) - + 8); + b) Rewrite "to" list, one quadword per cache line. + c) Rewrite "from" list, one byte per outgoing branch (rounded up to + a power-of-two number of full quadwords) per cache line. */ + + flags = SEC_ALLOC; + htab->ovtab = bfd_make_section_anyway_with_flags (ibfd, ".ovtab", flags); + if (htab->ovtab == NULL + || !bfd_set_section_alignment (ibfd, htab->ovtab, 4)) + return 0; + + htab->ovtab->size = (16 + 16 + (16 << htab->fromelem_size_log2)) + << htab->num_lines_log2; + flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY; htab->init = bfd_make_section_anyway_with_flags (ibfd, ".ovini", flags); if (htab->init == NULL || !bfd_set_section_alignment (ibfd, htab->init, 4)) return 0; htab->init->size = 16; - (*htab->params->place_spu_section) (htab->init, NULL, ".ovl.init"); } + else if (htab->stub_count == NULL) + return 1; else { /* htab->ovtab consists of two arrays. @@ -1681,23 +1745,62 @@ spu_elf_size_stubs (struct bfd_link_info *info) . } _ovly_buf_table[]; . */ + flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY; + htab->ovtab = bfd_make_section_anyway_with_flags (ibfd, ".ovtab", flags); + if (htab->ovtab == NULL + || !bfd_set_section_alignment (ibfd, htab->ovtab, 4)) + return 0; + htab->ovtab->size = htab->num_overlays * 16 + 16 + htab->num_buf * 4; } - ovout = ".data"; - if (htab->params->ovly_flavour == ovly_soft_icache) - ovout = ".data.icache"; - (*htab->params->place_spu_section) (htab->ovtab, NULL, ovout); htab->toe = bfd_make_section_anyway_with_flags (ibfd, ".toe", SEC_ALLOC); if (htab->toe == NULL || !bfd_set_section_alignment (ibfd, htab->toe, 4)) return 0; - htab->toe->size = htab->params->ovly_flavour == ovly_soft_icache ? 256 : 16; - (*htab->params->place_spu_section) (htab->toe, NULL, ".toe"); + htab->toe->size = 16; return 2; } +/* Called from ld to place overlay manager data sections. This is done + after the overlay manager itself is loaded, mainly so that the + linker's htab->init section is placed after any other .ovl.init + sections. */ + +void +spu_elf_place_overlay_data (struct bfd_link_info *info) +{ + struct spu_link_hash_table *htab = spu_hash_table (info); + unsigned int i; + + if (htab->stub_sec != NULL) + { + (*htab->params->place_spu_section) (htab->stub_sec[0], NULL, ".text"); + + for (i = 0; i < htab->num_overlays; ++i) + { + asection *osec = htab->ovl_sec[i]; + unsigned int ovl = spu_elf_section_data (osec)->u.o.ovl_index; + (*htab->params->place_spu_section) (htab->stub_sec[ovl], osec, NULL); + } + } + + if (htab->params->ovly_flavour == ovly_soft_icache) + (*htab->params->place_spu_section) (htab->init, NULL, ".ovl.init"); + + if (htab->ovtab != NULL) + { + const char *ovout = ".data"; + if (htab->params->ovly_flavour == ovly_soft_icache) + ovout = ".bss"; + (*htab->params->place_spu_section) (htab->ovtab, NULL, ovout); + } + + if (htab->toe != NULL) + (*htab->params->place_spu_section) (htab->toe, NULL, ".toe"); +} + /* Functions to handle embedded spu_ovl.o object. */ static void * @@ -1806,74 +1909,63 @@ spu_elf_build_stubs (struct bfd_link_info *info) bfd *obfd; unsigned int i; - if (htab->stub_count == NULL) - return TRUE; - - for (i = 0; i <= htab->num_overlays; i++) - if (htab->stub_sec[i]->size != 0) - { - htab->stub_sec[i]->contents = bfd_zalloc (htab->stub_sec[i]->owner, - htab->stub_sec[i]->size); - if (htab->stub_sec[i]->contents == NULL) - return FALSE; - htab->stub_sec[i]->rawsize = htab->stub_sec[i]->size; - htab->stub_sec[i]->size = 0; - } - - h = htab->ovly_load; - if (h == NULL) + if (htab->num_overlays != 0) { - const char *ovly_mgr_entry = "__ovly_load"; - - if (htab->params->ovly_flavour == ovly_soft_icache) - ovly_mgr_entry = "__icache_br_handler"; - h = elf_link_hash_lookup (&htab->elf, ovly_mgr_entry, - FALSE, FALSE, FALSE); - htab->ovly_load = h; - } - BFD_ASSERT (h != NULL + for (i = 0; i < 2; i++) + { + h = htab->ovly_entry[i]; + if (h != NULL && (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) - && h->def_regular); - - s = h->root.u.def.section->output_section; - if (spu_elf_section_data (s)->u.o.ovl_index) - { - (*_bfd_error_handler) (_("%s in overlay section"), - h->root.root.string); - bfd_set_error (bfd_error_bad_value); - return FALSE; + && h->def_regular) + { + s = h->root.u.def.section->output_section; + if (spu_elf_section_data (s)->u.o.ovl_index) + { + (*_bfd_error_handler) (_("%s in overlay section"), + h->root.root.string); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + } + } } - h = htab->ovly_return; - if (h == NULL && htab->params->ovly_flavour != ovly_soft_icache) + if (htab->stub_sec != NULL) { - h = elf_link_hash_lookup (&htab->elf, "__ovly_return", - FALSE, FALSE, FALSE); - htab->ovly_return = h; - } + for (i = 0; i <= htab->num_overlays; i++) + if (htab->stub_sec[i]->size != 0) + { + htab->stub_sec[i]->contents = bfd_zalloc (htab->stub_sec[i]->owner, + htab->stub_sec[i]->size); + if (htab->stub_sec[i]->contents == NULL) + return FALSE; + htab->stub_sec[i]->rawsize = htab->stub_sec[i]->size; + htab->stub_sec[i]->size = 0; + } - /* Fill in all the stubs. */ - process_stubs (info, TRUE); - if (!htab->stub_err) - elf_link_hash_traverse (&htab->elf, build_spuear_stubs, info); + /* Fill in all the stubs. */ + process_stubs (info, TRUE); + if (!htab->stub_err) + elf_link_hash_traverse (&htab->elf, build_spuear_stubs, info); - if (htab->stub_err) - { - (*_bfd_error_handler) (_("overlay stub relocation overflow")); - bfd_set_error (bfd_error_bad_value); - return FALSE; - } - - for (i = 0; i <= htab->num_overlays; i++) - { - if (htab->stub_sec[i]->size != htab->stub_sec[i]->rawsize) + if (htab->stub_err) { - (*_bfd_error_handler) (_("stubs don't match calculated size")); + (*_bfd_error_handler) (_("overlay stub relocation overflow")); bfd_set_error (bfd_error_bad_value); return FALSE; } - htab->stub_sec[i]->rawsize = 0; + + for (i = 0; i <= htab->num_overlays; i++) + { + if (htab->stub_sec[i]->size != htab->stub_sec[i]->rawsize) + { + (*_bfd_error_handler) (_("stubs don't match calculated size")); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + htab->stub_sec[i]->rawsize = 0; + } } if (htab->ovtab == NULL || htab->ovtab->size == 0) @@ -1886,67 +1978,53 @@ spu_elf_build_stubs (struct bfd_link_info *info) p = htab->ovtab->contents; if (htab->params->ovly_flavour == ovly_soft_icache) { -#define BI_HANDLER "__icache_ptr_handler0" - char name[sizeof (BI_HANDLER)]; - bfd_vma off, icache_base, linklist, bihand; + bfd_vma off; - h = define_ovtab_symbol (htab, "__icache_tagbase"); + h = define_ovtab_symbol (htab, "__icache_tag_array"); if (h == NULL) return FALSE; h->root.u.def.value = 0; h->size = 16 << htab->num_lines_log2; off = h->size; - icache_base = htab->ovl_sec[0]->vma; - linklist = (htab->ovtab->output_section->vma - + htab->ovtab->output_offset - + off); - for (i = 0; i < htab->params->num_lines; i++) - { - bfd_vma line_end = icache_base + ((i + 1) << htab->line_size_log2); - bfd_vma stub_base = line_end - htab->params->max_branch * 32; - bfd_vma link_elem = linklist + i * htab->params->max_branch * 16; - bfd_vma locator = link_elem - stub_base / 2; - - bfd_put_32 (htab->ovtab->owner, locator, p + 4); - bfd_put_16 (htab->ovtab->owner, link_elem, p + 8); - bfd_put_16 (htab->ovtab->owner, link_elem, p + 10); - bfd_put_16 (htab->ovtab->owner, link_elem, p + 12); - bfd_put_16 (htab->ovtab->owner, link_elem, p + 14); - p += 16; - } - h = define_ovtab_symbol (htab, "__icache_linked_list"); + h = define_ovtab_symbol (htab, "__icache_tag_array_size"); + if (h == NULL) + return FALSE; + h->root.u.def.value = 16 << htab->num_lines_log2; + h->root.u.def.section = bfd_abs_section_ptr; + + h = define_ovtab_symbol (htab, "__icache_rewrite_to"); if (h == NULL) return FALSE; h->root.u.def.value = off; - h->size = htab->params->max_branch << (htab->num_lines_log2 + 4); + h->size = 16 << htab->num_lines_log2; off += h->size; - p += h->size; - h = elf_link_hash_lookup (&htab->elf, "__icache_bi_handler", - FALSE, FALSE, FALSE); - bihand = 0; - if (h != NULL - && (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - && h->def_regular) - bihand = (h->root.u.def.value - + h->root.u.def.section->output_offset - + h->root.u.def.section->output_section->vma); - memcpy (name, BI_HANDLER, sizeof (BI_HANDLER)); - for (i = 0; i < 8; i++) - { - name[sizeof (BI_HANDLER) - 2] = '0' + i; - h = define_ovtab_symbol (htab, name); - if (h == NULL) - return FALSE; - h->root.u.def.value = off; - h->size = 16; - bfd_put_32 (htab->ovtab->owner, bihand, p); - bfd_put_32 (htab->ovtab->owner, i << 28, p + 8); - p += 16; - off += 16; - } + h = define_ovtab_symbol (htab, "__icache_rewrite_to_size"); + if (h == NULL) + return FALSE; + h->root.u.def.value = 16 << htab->num_lines_log2; + h->root.u.def.section = bfd_abs_section_ptr; + + h = define_ovtab_symbol (htab, "__icache_rewrite_from"); + if (h == NULL) + return FALSE; + h->root.u.def.value = off; + h->size = 16 << (htab->fromelem_size_log2 + htab->num_lines_log2); + off += h->size; + + h = define_ovtab_symbol (htab, "__icache_rewrite_from_size"); + if (h == NULL) + return FALSE; + h->root.u.def.value = 16 << (htab->fromelem_size_log2 + + htab->num_lines_log2); + h->root.u.def.section = bfd_abs_section_ptr; + + h = define_ovtab_symbol (htab, "__icache_log2_fromelemsize"); + if (h == NULL) + return FALSE; + h->root.u.def.value = htab->fromelem_size_log2; + h->root.u.def.section = bfd_abs_section_ptr; h = define_ovtab_symbol (htab, "__icache_base"); if (h == NULL) @@ -1955,12 +2033,42 @@ spu_elf_build_stubs (struct bfd_link_info *info) h->root.u.def.section = bfd_abs_section_ptr; h->size = htab->num_buf << htab->line_size_log2; + h = define_ovtab_symbol (htab, "__icache_linesize"); + if (h == NULL) + return FALSE; + h->root.u.def.value = 1 << htab->line_size_log2; + h->root.u.def.section = bfd_abs_section_ptr; + + h = define_ovtab_symbol (htab, "__icache_log2_linesize"); + if (h == NULL) + return FALSE; + h->root.u.def.value = htab->line_size_log2; + h->root.u.def.section = bfd_abs_section_ptr; + h = define_ovtab_symbol (htab, "__icache_neg_log2_linesize"); if (h == NULL) return FALSE; h->root.u.def.value = -htab->line_size_log2; h->root.u.def.section = bfd_abs_section_ptr; + h = define_ovtab_symbol (htab, "__icache_cachesize"); + if (h == NULL) + return FALSE; + h->root.u.def.value = 1 << (htab->num_lines_log2 + htab->line_size_log2); + h->root.u.def.section = bfd_abs_section_ptr; + + h = define_ovtab_symbol (htab, "__icache_log2_cachesize"); + if (h == NULL) + return FALSE; + h->root.u.def.value = htab->num_lines_log2 + htab->line_size_log2; + h->root.u.def.section = bfd_abs_section_ptr; + + h = define_ovtab_symbol (htab, "__icache_neg_log2_cachesize"); + if (h == NULL) + return FALSE; + h->root.u.def.value = -(htab->num_lines_log2 + htab->line_size_log2); + h->root.u.def.section = bfd_abs_section_ptr; + if (htab->init != NULL && htab->init->size != 0) { htab->init->contents = bfd_zalloc (htab->init->owner, @@ -2029,7 +2137,7 @@ spu_elf_build_stubs (struct bfd_link_info *info) return FALSE; h->root.u.def.section = htab->toe; h->root.u.def.value = 0; - h->size = htab->params->ovly_flavour == ovly_soft_icache ? 16 * 16 : 16; + h->size = 16; return TRUE; } @@ -2058,9 +2166,6 @@ spu_elf_check_vma (struct bfd_link_info *info) || m->sections[i]->vma + m->sections[i]->size - 1 > hi)) return m->sections[i]; - /* No need for overlays if it all fits. */ - if (htab->params->ovly_flavour != ovly_soft_icache) - htab->params->auto_overlay = 0; return NULL; } @@ -2129,6 +2234,19 @@ find_function_stack_adjust (asection *sec, return reg[rt]; } } + else if (buf[0] == 0x08 && (buf[1] & 0xe0) == 0 /* sf */) + { + int rb = ((buf[1] & 0x1f) << 2) | ((buf[2] & 0xc0) >> 6); + + reg[rt] = reg[rb] - reg[ra]; + if (rt == 1) + { + if (reg[rt] > 0) + break; + *sp_adjust = offset; + return reg[rt]; + } + } else if ((buf[0] & 0xfc) == 0x40 /* il, ilh, ilhu, ila */) { if (buf[0] >= 0x42 /* ila */) @@ -2473,6 +2591,7 @@ find_function (asection *sec, bfd_vma offset, struct bfd_link_info *info) } info->callbacks->einfo (_("%A:0x%v not found in function table\n"), sec, offset); + bfd_set_error (bfd_error_bad_value); return NULL; } @@ -2496,7 +2615,7 @@ insert_callee (struct function_info *caller, struct call_info *callee) p->fun->start = NULL; p->fun->is_func = TRUE; } - p->count += 1; + p->count += callee->count; /* Reorder list so most recent call is first. */ *pp = p->next; p->next = caller->call_list; @@ -2504,7 +2623,6 @@ insert_callee (struct function_info *caller, struct call_info *callee) return FALSE; } callee->next = caller->call_list; - callee->count += 1; caller->call_list = callee; return TRUE; } @@ -2693,8 +2811,9 @@ mark_functions_via_relocs (asection *sec, return FALSE; callee->is_tail = !is_call; callee->is_pasted = FALSE; + callee->broken_cycle = FALSE; callee->priority = priority; - callee->count = 0; + callee->count = 1; if (callee->fun->last_caller != sec) { callee->fun->last_caller = sec; @@ -2717,7 +2836,14 @@ mark_functions_via_relocs (asection *sec, callee->fun->is_func = TRUE; } else if (callee->fun->start == NULL) - callee->fun->start = caller; + { + struct function_info *caller_start = caller; + while (caller_start->start) + caller_start = caller_start->start; + + if (caller_start != callee->fun) + callee->fun->start = caller_start; + } else { struct function_info *callee_start; @@ -2744,7 +2870,7 @@ mark_functions_via_relocs (asection *sec, These sections are pasted together to form a single function. */ static bfd_boolean -pasted_function (asection *sec, struct bfd_link_info *info) +pasted_function (asection *sec) { struct bfd_link_order *l; struct _spu_elf_section_data *sec_data; @@ -2779,7 +2905,9 @@ pasted_function (asection *sec, struct bfd_link_info *info) callee->fun = fun; callee->is_tail = TRUE; callee->is_pasted = TRUE; - callee->count = 0; + callee->broken_cycle = FALSE; + callee->priority = 0; + callee->count = 1; if (!insert_callee (fun_start, callee)) free (callee); return TRUE; @@ -2793,8 +2921,9 @@ pasted_function (asection *sec, struct bfd_link_info *info) fun_start = &sinfo->fun[sinfo->num_fun - 1]; } - info->callbacks->einfo (_("%A link_order not found\n"), sec); - return FALSE; + /* Don't return an error if we did not find a function preceding this + section. The section may have incorrect flags. */ + return TRUE; } /* Map address ranges in code sections to functions. */ @@ -2818,7 +2947,6 @@ discover_functions (struct bfd_link_info *info) sec_arr = bfd_zmalloc (bfd_idx * sizeof (*sec_arr)); if (sec_arr == NULL) return FALSE; - for (ibfd = info->input_bfds, bfd_idx = 0; ibfd != NULL; @@ -2873,8 +3001,7 @@ discover_functions (struct bfd_link_info *info) sec_arr[bfd_idx] = psecs; for (psy = psyms, p = psecs, sy = syms; sy < syms + symcount; ++p, ++sy) if (ELF_ST_TYPE (sy->st_info) == STT_NOTYPE - || ELF_ST_TYPE (sy->st_info) == STT_FUNC - || ELF_ST_TYPE (sy->st_info) == STT_SECTION) + || ELF_ST_TYPE (sy->st_info) == STT_FUNC) { asection *s; @@ -3004,7 +3131,7 @@ discover_functions (struct bfd_link_info *info) sec_data = spu_elf_section_data (sec); sinfo = sec_data->u.i.stack_info; - if (sinfo != NULL) + if (sinfo != NULL && sinfo->num_fun != 0) { int fun_idx; bfd_vma hi = sec->size; @@ -3014,10 +3141,12 @@ discover_functions (struct bfd_link_info *info) sinfo->fun[fun_idx].hi = hi; hi = sinfo->fun[fun_idx].lo; } + + sinfo->fun[0].lo = 0; } /* No symbols in this section. Must be .init or .fini or something similar. */ - else if (!pasted_function (sec, info)) + else if (!pasted_function (sec)) return FALSE; } } @@ -3168,9 +3297,8 @@ remove_cycles (struct function_info *fun, "from %s to %s\n"), f1, f2); } - *callp = call->next; - free (call); - continue; + + call->broken_cycle = TRUE; } callp = &call->next; } @@ -3294,7 +3422,9 @@ mark_overlay_section (struct function_info *fun, if (!fun->sec->linker_mark && (htab->params->ovly_flavour != ovly_soft_icache || htab->params->non_ia_text - || strncmp (fun->sec->name, ".text.ia.", 9) == 0)) + || strncmp (fun->sec->name, ".text.ia.", 9) == 0 + || strcmp (fun->sec->name, ".init") == 0 + || strcmp (fun->sec->name, ".fini") == 0)) { unsigned int size; @@ -3411,7 +3541,8 @@ mark_overlay_section (struct function_info *fun, BFD_ASSERT (!fun->sec->segment_mark); fun->sec->segment_mark = 1; } - if (!mark_overlay_section (call->fun, info, param)) + if (!call->broken_cycle + && !mark_overlay_section (call->fun, info, param)) return FALSE; } @@ -3471,7 +3602,8 @@ unmark_overlay_section (struct function_info *fun, } for (call = fun->call_list; call != NULL; call = call->next) - if (!unmark_overlay_section (call->fun, info, param)) + if (!call->broken_cycle + && !unmark_overlay_section (call->fun, info, param)) return FALSE; if (RECURSE_UNMARK) @@ -3522,7 +3654,8 @@ collect_lib_sections (struct function_info *fun, } for (call = fun->call_list; call != NULL; call = call->next) - collect_lib_sections (call->fun, info, param); + if (!call->broken_cycle) + collect_lib_sections (call->fun, info, param); return TRUE; } @@ -3636,7 +3769,7 @@ auto_ovl_lib_functions (struct bfd_link_info *info, unsigned int lib_size) if (p->fun == call->fun) break; if (!p) - stub_size += ovl_stub_size (htab->params->ovly_flavour); + stub_size += ovl_stub_size (htab->params); } } if (tmp + stub_size < lib_size) @@ -3654,7 +3787,7 @@ auto_ovl_lib_functions (struct bfd_link_info *info, unsigned int lib_size) while ((p = *pp) != NULL) if (!p->fun->sec->linker_mark) { - lib_size += ovl_stub_size (htab->params->ovly_flavour); + lib_size += ovl_stub_size (htab->params); *pp = p->next; free (p); } @@ -3716,7 +3849,7 @@ collect_overlays (struct function_info *fun, fun->visit7 = TRUE; for (call = fun->call_list; call != NULL; call = call->next) - if (!call->is_pasted) + if (!call->is_pasted && !call->broken_cycle) { if (!collect_overlays (call->fun, info, ovly_sections)) return FALSE; @@ -3762,7 +3895,8 @@ collect_overlays (struct function_info *fun, } for (call = fun->call_list; call != NULL; call = call->next) - if (!collect_overlays (call->fun, info, ovly_sections)) + if (!call->broken_cycle + && !collect_overlays (call->fun, info, ovly_sections)) return FALSE; if (added_fun) @@ -3813,6 +3947,8 @@ sum_stack (struct function_info *fun, max = NULL; for (call = fun->call_list; call; call = call->next) { + if (call->broken_cycle) + continue; if (!call->is_pasted) has_call = TRUE; if (!sum_stack (call->fun, info, sum_stack_param)) @@ -3856,7 +3992,7 @@ sum_stack (struct function_info *fun, { info->callbacks->minfo (_(" calls:\n")); for (call = fun->call_list; call; call = call->next) - if (!call->is_pasted) + if (!call->is_pasted && !call->broken_cycle) { const char *f2 = func_name (call->fun); const char *ann1 = call->fun == max ? "*" : " "; @@ -4016,9 +4152,6 @@ print_one_overlay_section (FILE *script, /* Handle --auto-overlay. */ -static void spu_elf_auto_overlay (struct bfd_link_info *) - ATTRIBUTE_NORETURN; - static void spu_elf_auto_overlay (struct bfd_link_info *info) { @@ -4060,11 +4193,30 @@ spu_elf_auto_overlay (struct bfd_link_info *info) if (!build_call_tree (info)) goto err_exit; + htab = spu_hash_table (info); + if (htab->reserved == 0) + { + struct _sum_stack_param sum_stack_param; + + sum_stack_param.emit_stack_syms = 0; + sum_stack_param.overall_stack = 0; + if (!for_each_node (sum_stack, info, &sum_stack_param, TRUE)) + goto err_exit; + htab->reserved = sum_stack_param.overall_stack + htab->extra_stack_space; + } + + /* No need for overlays if everything already fits. */ + if (fixed_size + htab->reserved <= htab->local_store + && htab->params->ovly_flavour != ovly_soft_icache) + { + htab->params->auto_overlay = 0; + return; + } + uos_param.exclude_input_section = 0; uos_param.exclude_output_section = bfd_get_section_by_name (info->output_bfd, ".interrupt"); - htab = spu_hash_table (info); ovly_mgr_entry = "__ovly_load"; if (htab->params->ovly_flavour == ovly_soft_icache) ovly_mgr_entry = "__icache_br_handler"; @@ -4167,18 +4319,8 @@ spu_elf_auto_overlay (struct bfd_link_info *info) } free (bfd_arr); - if (htab->reserved == 0) - { - struct _sum_stack_param sum_stack_param; - - sum_stack_param.emit_stack_syms = 0; - sum_stack_param.overall_stack = 0; - if (!for_each_node (sum_stack, info, &sum_stack_param, TRUE)) - goto err_exit; - htab->reserved = sum_stack_param.overall_stack + htab->extra_stack_space; - } fixed_size += htab->reserved; - fixed_size += htab->non_ovly_stub * ovl_stub_size (htab->params->ovly_flavour); + fixed_size += htab->non_ovly_stub * ovl_stub_size (htab->params); if (fixed_size + mos_param.max_overlay_size <= htab->local_store) { if (htab->params->ovly_flavour == ovly_soft_icache) @@ -4187,16 +4329,16 @@ spu_elf_auto_overlay (struct bfd_link_info *info) fixed_size += htab->non_ovly_stub * 16; /* Space for icache manager tables. a) Tag array, one quadword per cache line. - - word 0: ia address of present line, init to zero. - - word 1: link locator. link_elem=stub_addr/2+locator - - halfwords 4-7: head/tail pointers for linked lists. */ + - word 0: ia address of present line, init to zero. */ + fixed_size += 16 << htab->num_lines_log2; + /* b) Rewrite "to" list, one quadword per cache line. */ fixed_size += 16 << htab->num_lines_log2; - /* b) Linked list elements, max_branch per line. */ - fixed_size += htab->params->max_branch << (htab->num_lines_log2 + 4); - /* c) Indirect branch descriptors, 8 quadwords. */ - fixed_size += 8 * 16; - /* d) Pointers to __ea backing store, 16 quadwords. */ - fixed_size += 16 * 16; + /* c) Rewrite "from" list, one byte per outgoing branch (rounded up + to a power-of-two number of full quadwords) per cache line. */ + fixed_size += 16 << (htab->fromelem_size_log2 + + htab->num_lines_log2); + /* d) Pointer to __ea backing store (toe), 1 quadword. */ + fixed_size += 16; } else { @@ -4251,12 +4393,12 @@ spu_elf_auto_overlay (struct bfd_link_info *info) ovlynum = 0; while (base < count) { - unsigned int size = 0; + unsigned int size = 0, rosize = 0, roalign = 0; for (i = base; i < count; i++) { - asection *sec; - unsigned int tmp; + asection *sec, *rosec; + unsigned int tmp, rotmp; unsigned int num_stubs; struct call_info *call, *pasty; struct _spu_elf_section_data *sec_data; @@ -4266,10 +4408,16 @@ spu_elf_auto_overlay (struct bfd_link_info *info) /* See whether we can add this section to the current overlay without overflowing our overlay buffer. */ sec = ovly_sections[2 * i]; - tmp = size + sec->size; - if (ovly_sections[2 * i + 1]) - tmp += ovly_sections[2 * i + 1]->size; - if (tmp > overlay_size) + tmp = align_power (size, sec->alignment_power) + sec->size; + rotmp = rosize; + rosec = ovly_sections[2 * i + 1]; + if (rosec != NULL) + { + rotmp = align_power (rotmp, rosec->alignment_power) + rosec->size; + if (roalign < rosec->alignment_power) + roalign = rosec->alignment_power; + } + if (align_power (tmp, roalign) + rotmp > overlay_size) break; if (sec->segment_mark) { @@ -4279,15 +4427,22 @@ spu_elf_auto_overlay (struct bfd_link_info *info) while (pasty != NULL) { struct function_info *call_fun = pasty->fun; - tmp += call_fun->sec->size; + tmp = (align_power (tmp, call_fun->sec->alignment_power) + + call_fun->sec->size); if (call_fun->rodata) - tmp += call_fun->rodata->size; + { + rotmp = (align_power (rotmp, + call_fun->rodata->alignment_power) + + call_fun->rodata->size); + if (roalign < rosec->alignment_power) + roalign = rosec->alignment_power; + } for (pasty = call_fun->call_list; pasty; pasty = pasty->next) if (pasty->is_pasted) break; } } - if (tmp > overlay_size) + if (align_power (tmp, roalign) + rotmp > overlay_size) break; /* If we add this section, we might need new overlay call @@ -4326,24 +4481,29 @@ spu_elf_auto_overlay (struct bfd_link_info *info) for (call = dummy_caller.call_list; call; call = call->next) { unsigned int k; + unsigned int stub_delta = 1; + + if (htab->params->ovly_flavour == ovly_soft_icache) + stub_delta = call->count; + num_stubs += stub_delta; - ++num_stubs; /* If the call is within this overlay, we won't need a stub. */ for (k = base; k < i + 1; k++) if (call->fun->sec == ovly_sections[2 * k]) { - --num_stubs; + num_stubs -= stub_delta; break; } } if (htab->params->ovly_flavour == ovly_soft_icache && num_stubs > htab->params->max_branch) break; - if (tmp + num_stubs * ovl_stub_size (htab->params->ovly_flavour) - > overlay_size) + if (align_power (tmp, roalign) + rotmp + + num_stubs * ovl_stub_size (htab->params) > overlay_size) break; size = tmp; + rosize = rotmp; } if (i == base) @@ -4370,13 +4530,12 @@ spu_elf_auto_overlay (struct bfd_link_info *info) script = htab->params->spu_elf_open_overlay_script (); - if (fprintf (script, "SECTIONS\n{\n") <= 0) - goto file_err; - if (htab->params->ovly_flavour == ovly_soft_icache) { + if (fprintf (script, "SECTIONS\n{\n") <= 0) + goto file_err; + if (fprintf (script, - " .data.icache ALIGN (16) : { *(.ovtab) *(.data.icache) }\n" " . = ALIGN (%u);\n" " .ovl.init : { *(.ovl.init) }\n" " . = ABSOLUTE (ADDR (.ovl.init));\n", @@ -4391,10 +4550,10 @@ spu_elf_auto_overlay (struct bfd_link_info *info) unsigned int vma, lma; vma = (indx & (htab->params->num_lines - 1)) << htab->line_size_log2; - lma = indx << htab->line_size_log2; + lma = vma + (((indx >> htab->num_lines_log2) + 1) << 18); if (fprintf (script, " .ovly%u ABSOLUTE (ADDR (.ovl.init)) + %u " - ": AT (ALIGN (LOADADDR (.ovl.init) + SIZEOF (.ovl.init), 16) + %u) {\n", + ": AT (LOADADDR (.ovl.init) + %u) {\n", ovlynum, vma, lma) <= 0) goto file_err; @@ -4412,9 +4571,15 @@ spu_elf_auto_overlay (struct bfd_link_info *info) if (fprintf (script, " . = ABSOLUTE (ADDR (.ovl.init)) + %u;\n", 1 << (htab->num_lines_log2 + htab->line_size_log2)) <= 0) goto file_err; + + if (fprintf (script, "}\nINSERT AFTER .toe;\n") <= 0) + goto file_err; } else { + if (fprintf (script, "SECTIONS\n{\n") <= 0) + goto file_err; + if (fprintf (script, " . = ALIGN (16);\n" " .ovl.init : { *(.ovl.init) }\n" @@ -4466,13 +4631,13 @@ spu_elf_auto_overlay (struct bfd_link_info *info) goto file_err; } + if (fprintf (script, "}\nINSERT BEFORE .text;\n") <= 0) + goto file_err; } free (ovly_map); free (ovly_sections); - if (fprintf (script, "}\nINSERT BEFORE .text;\n") <= 0) - goto file_err; if (fclose (script) != 0) goto file_err; @@ -4574,6 +4739,48 @@ spu_elf_count_relocs (struct bfd_link_info *info, asection *sec) return count; } +/* Functions for adding fixup records to .fixup */ + +#define FIXUP_RECORD_SIZE 4 + +#define FIXUP_PUT(output_bfd,htab,index,addr) \ + bfd_put_32 (output_bfd, addr, \ + htab->sfixup->contents + FIXUP_RECORD_SIZE * (index)) +#define FIXUP_GET(output_bfd,htab,index) \ + bfd_get_32 (output_bfd, \ + htab->sfixup->contents + FIXUP_RECORD_SIZE * (index)) + +/* Store OFFSET in .fixup. This assumes it will be called with an + increasing OFFSET. When this OFFSET fits with the last base offset, + it just sets a bit, otherwise it adds a new fixup record. */ +static void +spu_elf_emit_fixup (bfd * output_bfd, struct bfd_link_info *info, + bfd_vma offset) +{ + struct spu_link_hash_table *htab = spu_hash_table (info); + asection *sfixup = htab->sfixup; + bfd_vma qaddr = offset & ~(bfd_vma) 15; + bfd_vma bit = ((bfd_vma) 8) >> ((offset & 15) >> 2); + if (sfixup->reloc_count == 0) + { + FIXUP_PUT (output_bfd, htab, 0, qaddr | bit); + sfixup->reloc_count++; + } + else + { + bfd_vma base = FIXUP_GET (output_bfd, htab, sfixup->reloc_count - 1); + if (qaddr != (base & ~(bfd_vma) 15)) + { + if ((sfixup->reloc_count + 1) * FIXUP_RECORD_SIZE > sfixup->size) + (*_bfd_error_handler) (_("fatal error while creating .fixup")); + FIXUP_PUT (output_bfd, htab, sfixup->reloc_count, qaddr | bit); + sfixup->reloc_count++; + } + else + FIXUP_PUT (output_bfd, htab, sfixup->reloc_count - 1, base | bit); + } +} + /* Apply RELOCS to CONTENTS of INPUT_SECTION from INPUT_BFD. */ static int @@ -4621,7 +4828,6 @@ spu_elf_relocate_section (bfd *output_bfd, bfd_reloc_status_type r; bfd_boolean unresolved_reloc; bfd_boolean warned; - bfd_boolean overlay_encoded; enum _stub_type stub_type; r_symndx = ELF32_R_SYM (rel->r_info); @@ -4703,10 +4909,20 @@ spu_elf_relocate_section (bfd *output_bfd, if (info->relocatable) continue; + /* Change "a rt,ra,rb" to "ai rt,ra,0". */ + if (r_type == R_SPU_ADD_PIC + && h != NULL + && !(h->def_regular || ELF_COMMON_DEF_P (h))) + { + bfd_byte *loc = contents + rel->r_offset; + loc[0] = 0x1c; + loc[1] = 0x00; + loc[2] &= 0x3f; + } + is_ea_sym = (ea != NULL && sec != NULL && sec->output_section == ea); - overlay_encoded = FALSE; /* If this symbol is in an overlay area, we may need to relocate to the overlay stub. */ @@ -4729,9 +4945,10 @@ spu_elf_relocate_section (bfd *output_bfd, for (g = *head; g != NULL; g = g->next) if (htab->params->ovly_flavour == ovly_soft_icache - ? g->br_addr == (rel->r_offset - + input_section->output_offset - + input_section->output_section->vma) + ? (g->ovl == ovl + && g->br_addr == (rel->r_offset + + input_section->output_offset + + input_section->output_section->vma)) : g->addend == addend && (g->ovl == ovl || g->ovl == 0)) break; if (g == NULL) @@ -4744,18 +4961,29 @@ spu_elf_relocate_section (bfd *output_bfd, { /* For soft icache, encode the overlay index into addresses. */ if (htab->params->ovly_flavour == ovly_soft_icache + && (r_type == R_SPU_ADDR16_HI + || r_type == R_SPU_ADDR32 || r_type == R_SPU_REL32) && !is_ea_sym) { unsigned int ovl = overlay_index (sec); if (ovl != 0) { - unsigned int set_id = (ovl - 1) >> htab->num_lines_log2; + unsigned int set_id = ((ovl - 1) >> htab->num_lines_log2) + 1; relocation += set_id << 18; - overlay_encoded = set_id != 0; } } } + if (htab->params->emit_fixups && !info->relocatable + && (input_section->flags & SEC_ALLOC) != 0 + && r_type == R_SPU_ADDR32) + { + bfd_vma offset; + offset = rel->r_offset + input_section->output_section->vma + + input_section->output_offset; + spu_elf_emit_fixup (output_bfd, info, offset); + } + if (unresolved_reloc) ; else if (r_type == R_SPU_PPU32 || r_type == R_SPU_PPU64) @@ -4804,11 +5032,6 @@ spu_elf_relocate_section (bfd *output_bfd, switch (r) { case bfd_reloc_overflow: - /* FIXME: We don't want to warn on most references - within an overlay to itself, but this may silence a - warning that should be reported. */ - if (overlay_encoded && sec == input_section) - break; if (!((*info->callbacks->reloc_overflow) (info, (h ? &h->root : NULL), sym_name, howto->name, (bfd_vma) 0, input_bfd, input_section, rel->r_offset))) @@ -4878,7 +5101,7 @@ spu_elf_relocate_section (bfd *output_bfd, /* Adjust _SPUEAR_ syms to point at their overlay stubs. */ -static bfd_boolean +static int spu_elf_output_symbol_hook (struct bfd_link_info *info, const char *sym_name ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -4910,7 +5133,7 @@ spu_elf_output_symbol_hook (struct bfd_link_info *info, } } - return TRUE; + return 1; } static int spu_plugin = 0; @@ -4967,7 +5190,8 @@ static bfd_boolean spu_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info) { asection *toe, *s; - struct elf_segment_map *m; + struct elf_segment_map *m, *m_overlay; + struct elf_segment_map **p, **p_overlay; unsigned int i; if (info == NULL) @@ -5014,6 +5238,37 @@ spu_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info) break; } + + /* Some SPU ELF loaders ignore the PF_OVERLAY flag and just load all + PT_LOAD segments. This can cause the .ovl.init section to be + overwritten with the contents of some overlay segment. To work + around this issue, we ensure that all PF_OVERLAY segments are + sorted first amongst the program headers; this ensures that even + with a broken loader, the .ovl.init section (which is not marked + as PF_OVERLAY) will be placed into SPU local store on startup. */ + + /* Move all overlay segments onto a separate list. */ + p = &elf_tdata (abfd)->segment_map; + p_overlay = &m_overlay; + while (*p != NULL) + { + if ((*p)->p_type == PT_LOAD && (*p)->count == 1 + && spu_elf_section_data ((*p)->sections[0])->u.o.ovl_index != 0) + { + struct elf_segment_map *m = *p; + *p = m->next; + *p_overlay = m; + p_overlay = &m->next; + continue; + } + + p = &((*p)->next); + } + + /* Re-insert overlay segments at the head of the segment map. */ + *p_overlay = elf_tdata (abfd)->segment_map; + elf_tdata (abfd)->segment_map = m_overlay; + return TRUE; } @@ -5124,6 +5379,72 @@ spu_elf_modify_program_headers (bfd *abfd, struct bfd_link_info *info) return TRUE; } +bfd_boolean +spu_elf_size_sections (bfd * output_bfd, struct bfd_link_info *info) +{ + struct spu_link_hash_table *htab = spu_hash_table (info); + if (htab->params->emit_fixups) + { + asection *sfixup = htab->sfixup; + int fixup_count = 0; + bfd *ibfd; + size_t size; + + for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next) + { + asection *isec; + + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour) + continue; + + /* Walk over each section attached to the input bfd. */ + for (isec = ibfd->sections; isec != NULL; isec = isec->next) + { + Elf_Internal_Rela *internal_relocs, *irelaend, *irela; + bfd_vma base_end; + + /* If there aren't any relocs, then there's nothing more + to do. */ + if ((isec->flags & SEC_RELOC) == 0 + || isec->reloc_count == 0) + continue; + + /* Get the relocs. */ + internal_relocs = + _bfd_elf_link_read_relocs (ibfd, isec, NULL, NULL, + info->keep_memory); + if (internal_relocs == NULL) + return FALSE; + + /* 1 quadword can contain up to 4 R_SPU_ADDR32 + relocations. They are stored in a single word by + saving the upper 28 bits of the address and setting the + lower 4 bits to a bit mask of the words that have the + relocation. BASE_END keeps track of the next quadword. */ + irela = internal_relocs; + irelaend = irela + isec->reloc_count; + base_end = 0; + for (; irela < irelaend; irela++) + if (ELF32_R_TYPE (irela->r_info) == R_SPU_ADDR32 + && irela->r_offset >= base_end) + { + base_end = (irela->r_offset & ~(bfd_vma) 15) + 16; + fixup_count++; + } + } + } + + /* We always have a NULL fixup as a sentinel */ + size = (fixup_count + 1) * FIXUP_RECORD_SIZE; + if (!bfd_set_section_size (output_bfd, sfixup, size)) + return FALSE; + sfixup->contents = (bfd_byte *) bfd_zalloc (info->input_bfds, size); + if (sfixup->contents == NULL) + return FALSE; + } + return TRUE; +} + #define TARGET_BIG_SYM bfd_elf32_spu_vec #define TARGET_BIG_NAME "elf32-spu" #define ELF_ARCH bfd_arch_spu @@ -5134,7 +5455,7 @@ spu_elf_modify_program_headers (bfd *abfd, struct bfd_link_info *info) #define elf_backend_can_gc_sections 1 #define bfd_elf32_bfd_reloc_type_lookup spu_elf_reloc_type_lookup -#define bfd_elf32_bfd_reloc_name_lookup spu_elf_reloc_name_lookup +#define bfd_elf32_bfd_reloc_name_lookup spu_elf_reloc_name_lookup #define elf_info_to_howto spu_elf_info_to_howto #define elf_backend_count_relocs spu_elf_count_relocs #define elf_backend_relocate_section spu_elf_relocate_section diff --git a/cegcc/src/binutils/bfd/elf32-spu.h b/cegcc/src/binutils/bfd/elf32-spu.h index 0e6955536..a31c76ec7 100644 --- a/cegcc/src/binutils/bfd/elf32-spu.h +++ b/cegcc/src/binutils/bfd/elf32-spu.h @@ -35,7 +35,8 @@ struct spu_elf_params #define OVERLAY_RODATA 4 /* Type of overlays, enum _ovly_flavour. */ - unsigned int ovly_flavour : 2; + unsigned int ovly_flavour : 1; + unsigned int compact_stub : 1; /* Set if we should emit symbols for stubs. */ unsigned int emit_stub_syms : 1; @@ -56,6 +57,9 @@ struct spu_elf_params /* Set if non-icache code should be allowed in icache lines. */ unsigned int non_ia_text : 1; + /* Set when the .fixup section should be generated. */ + unsigned int emit_fixups : 1; + /* Range of valid addresses for loadable sections. */ bfd_vma local_store_lo; bfd_vma local_store_hi; @@ -98,10 +102,8 @@ struct _spu_elf_section_data enum _ovly_flavour { - ovly_compact, ovly_normal, - ovly_soft_icache, - ovly_none + ovly_soft_icache }; struct _ovl_stream @@ -115,6 +117,8 @@ extern void spu_elf_plugin (int); extern bfd_boolean spu_elf_open_builtin_lib (bfd **, const struct _ovl_stream *); extern bfd_boolean spu_elf_create_sections (struct bfd_link_info *); -extern bfd_boolean spu_elf_find_overlays (struct bfd_link_info *); +extern bfd_boolean spu_elf_size_sections (bfd *, struct bfd_link_info *); +extern int spu_elf_find_overlays (struct bfd_link_info *); extern int spu_elf_size_stubs (struct bfd_link_info *); +extern void spu_elf_place_overlay_data (struct bfd_link_info *); extern asection *spu_elf_check_vma (struct bfd_link_info *); diff --git a/cegcc/src/binutils/bfd/elf32-v850.c b/cegcc/src/binutils/bfd/elf32-v850.c index 8f9eda409..922698f61 100644 --- a/cegcc/src/binutils/bfd/elf32-v850.c +++ b/cegcc/src/binutils/bfd/elf32-v850.c @@ -1,6 +1,6 @@ /* V850-specific support for 32-bit ELF Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1680,7 +1680,7 @@ v850_elf_relocate_section (bfd *output_bfd, name = bfd_section_name (input_bfd, sec); } - switch (r) + switch ((int) r) { case bfd_reloc_overflow: if (! ((*info->callbacks->reloc_overflow) @@ -2095,7 +2095,7 @@ v850_elf_add_symbol_hook (bfd *abfd, return TRUE; } -static bfd_boolean +static int v850_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -2122,7 +2122,7 @@ v850_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, sym->st_other &= ~(V850_OTHER_SDA | V850_OTHER_ZDA | V850_OTHER_TDA | V850_OTHER_ERROR); - return TRUE; + return 1; } static bfd_boolean diff --git a/cegcc/src/binutils/bfd/elf32-vax.c b/cegcc/src/binutils/bfd/elf32-vax.c index 7f4781922..27bb23011 100644 --- a/cegcc/src/binutils/bfd/elf32-vax.c +++ b/cegcc/src/binutils/bfd/elf32-vax.c @@ -1,6 +1,6 @@ /* VAX series support for 32-bit ELF Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Matt Thomas . This file is part of BFD, the Binary File Descriptor library. @@ -47,6 +47,8 @@ static bfd_boolean elf_vax_finish_dynamic_symbol (bfd *, struct bfd_link_info *, Elf_Internal_Sym *); static bfd_boolean elf_vax_finish_dynamic_sections (bfd *, struct bfd_link_info *); +static bfd_vma elf_vax_plt_sym_val (bfd_vma, const asection *, + const arelent *); static bfd_boolean elf32_vax_set_private_flags (bfd *, flagword); static bfd_boolean elf32_vax_merge_private_bfd_data (bfd *, bfd *); @@ -368,7 +370,7 @@ static const bfd_byte elf_vax_plt0_entry[PLT_ENTRY_SIZE] = static const bfd_byte elf_vax_plt_entry[PLT_ENTRY_SIZE] = { - 0x40, 0x00, /* .word ^M */ + 0xfc, 0x0f, /* .word ^M */ 0x16, 0xef, /* jsb L^(pc) */ 0, 0, 0, 0, /* replaced with offset to start of .plt */ 0, 0, 0, 0, /* index into .rela.plt */ @@ -599,8 +601,15 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, switch (ELF32_R_TYPE (rel->r_info)) { case R_VAX_GOT32: - if (h != NULL - && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + BFD_ASSERT (h != NULL); + if (h->forced_local + || h == elf_hash_table (info)->hgot + || h == elf_hash_table (info)->hplt) + break; + + /* If this is a local symbol, we resolve it directly without + creating a global offset table entry. */ + if (h == NULL || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT) break; /* This symbol requires a global offset table entry. */ @@ -654,10 +663,11 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, h->got.refcount++; if (eh->got_addend != (bfd_vma) rel->r_addend) (*_bfd_error_handler) - (_("%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld"), - bfd_get_filename (abfd), rel->r_addend, - h->root.root.string, - eh->got_addend); + (_("%s: warning: GOT addend of %ld to `%s' does" + " not match previous GOT addend of %ld"), + bfd_get_filename (abfd), rel->r_addend, + h->root.root.string, + eh->got_addend); } } @@ -673,8 +683,9 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, /* If this is a local symbol, we resolve it directly without creating a procedure linkage table entry. */ - if (h == NULL) - continue; + BFD_ASSERT (h != NULL); + if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT || h->forced_local) + break; h->needs_plt = 1; if (h->plt.refcount == -1) @@ -702,7 +713,9 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, && (!info->symbolic || !h->def_regular))) { - if (h != NULL) + if (h != NULL + && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT + && !h->forced_local) { /* Make sure a plt entry is created for this symbol if it turns out to be a function defined by a dynamic @@ -714,11 +727,17 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, } break; } + /* If this is a local symbol, we can resolve it directly. */ + if (h != NULL + && (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + || h->forced_local)) + break; + /* Fall through. */ case R_VAX_8: case R_VAX_16: case R_VAX_32: - if (h != NULL) + if (h != NULL && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) { /* Make sure a plt entry is created for this symbol if it turns out to be a function defined by a dynamic object. */ @@ -1305,7 +1324,8 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, PTR infoptr) srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); if (!elf_hash_table (info)->dynamic_sections_created - || (info->shared && info->symbolic)) + || (info->shared && info->symbolic) + || h->forced_local) { h->got.refcount = 0; h->got.offset = (bfd_vma) -1; @@ -1314,6 +1334,8 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, PTR infoptr) } else if (h->got.refcount > 0) { + bfd_boolean dyn; + /* Make sure this symbol is output as a dynamic symbol. */ if (h->dynindx == -1) { @@ -1321,9 +1343,15 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, PTR infoptr) return FALSE; } + dyn = elf_hash_table (info)->dynamic_sections_created; /* Allocate space in the .got and .rela.got sections. */ - sgot->size += 4; - srelgot->size += sizeof (Elf32_External_Rela); + if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT + && (info->shared + || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))) + { + sgot->size += 4; + srelgot->size += sizeof (Elf32_External_Rela); + } } return TRUE; @@ -1409,10 +1437,11 @@ elf_vax_relocate_section (bfd *output_bfd, || h->root.type == bfd_link_hash_defweak) && ((r_type == R_VAX_PLT32 && h->plt.offset != (bfd_vma) -1 + && !h->forced_local && elf_hash_table (info)->dynamic_sections_created) || (r_type == R_VAX_GOT32 - && strcmp (h->root.root.string, - "_GLOBAL_OFFSET_TABLE_") != 0 + && h->got.offset != (bfd_vma) -1 + && !h->forced_local && elf_hash_table (info)->dynamic_sections_created && (! info->shared || (! info->symbolic && h->dynindx != -1) @@ -1430,10 +1459,7 @@ elf_vax_relocate_section (bfd *output_bfd, && h->def_dynamic)) && (r_type == R_VAX_8 || r_type == R_VAX_16 - || r_type == R_VAX_32 - || r_type == R_VAX_PC8 - || r_type == R_VAX_PC16 - || r_type == R_VAX_PC32)))) + || r_type == R_VAX_32)))) /* In these cases, we don't need the relocation value. We check specially because in some obscure cases sec->output_section will be NULL. */ @@ -1459,13 +1485,17 @@ elf_vax_relocate_section (bfd *output_bfd, case R_VAX_GOT32: /* Relocation is to the address of the entry for this symbol in the global offset table. */ - if (h == NULL || h->got.offset == (bfd_vma) -1) + if (h == NULL + || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + || h->got.offset == (bfd_vma) -1 + || h->forced_local) break; /* Relocation is the offset of the entry for this symbol in the global offset table. */ { + bfd_boolean dyn; bfd_vma off; if (sgot == NULL) @@ -1479,9 +1509,10 @@ elf_vax_relocate_section (bfd *output_bfd, BFD_ASSERT (off != (bfd_vma) -1); BFD_ASSERT (off < sgot->size); - if (info->shared - && h->dynindx == -1 - && h->def_regular) + dyn = elf_hash_table (info)->dynamic_sections_created; + if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h) + || (info->shared + && SYMBOL_REFERENCES_LOCAL (info, h))) { /* The symbol was forced to be local because of a version file.. We must initialize @@ -1515,13 +1546,23 @@ elf_vax_relocate_section (bfd *output_bfd, } break; + case R_VAX_PC32: + /* If we are creating an executable and the function this + reloc refers to is in a shared lib, then we made a PLT + entry for this symbol and need to handle the reloc like + a PLT reloc. */ + if (info->shared) + goto r_vax_pc32_shared; + /* Fall through. */ case R_VAX_PLT32: /* Relocation is to the entry for this symbol in the procedure linkage table. */ /* Resolve a PLTxx reloc against a local symbol directly, without using the procedure linkage table. */ - if (h == NULL) + if (h == NULL + || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + || h->forced_local) break; if (h->plt.offset == (bfd_vma) -1 @@ -1574,8 +1615,10 @@ elf_vax_relocate_section (bfd *output_bfd, case R_VAX_PC8: case R_VAX_PC16: - case R_VAX_PC32: - if (h == NULL) + r_vax_pc32_shared: + if (h == NULL + || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + || h->forced_local) break; /* Fall through. */ case R_VAX_8: @@ -2034,6 +2077,29 @@ elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) return TRUE; } +static enum elf_reloc_type_class +elf_vax_reloc_type_class (const Elf_Internal_Rela *rela) +{ + switch ((int) ELF32_R_TYPE (rela->r_info)) + { + case R_VAX_RELATIVE: + return reloc_class_relative; + case R_VAX_JMP_SLOT: + return reloc_class_plt; + case R_VAX_COPY: + return reloc_class_copy; + default: + return reloc_class_normal; + } +} + +static bfd_vma +elf_vax_plt_sym_val (bfd_vma i, const asection *plt, + const arelent *rel ATTRIBUTE_UNUSED) +{ + return plt->vma + (i + 1) * PLT_ENTRY_SIZE; +} + #define TARGET_LITTLE_SYM bfd_elf32_vax_vec #define TARGET_LITTLE_NAME "elf32-vax" #define ELF_MACHINE_CODE EM_VAX @@ -2056,8 +2122,10 @@ elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) elf_vax_finish_dynamic_symbol #define elf_backend_finish_dynamic_sections \ elf_vax_finish_dynamic_sections +#define elf_backend_reloc_type_class elf_vax_reloc_type_class #define elf_backend_gc_mark_hook elf_vax_gc_mark_hook #define elf_backend_gc_sweep_hook elf_vax_gc_sweep_hook +#define elf_backend_plt_sym_val elf_vax_plt_sym_val #define bfd_elf32_bfd_merge_private_bfd_data \ elf32_vax_merge_private_bfd_data #define bfd_elf32_bfd_set_private_flags \ diff --git a/cegcc/src/binutils/bfd/elf32-xc16x.c b/cegcc/src/binutils/bfd/elf32-xc16x.c index 8c06c7f2c..826b6aac6 100644 --- a/cegcc/src/binutils/bfd/elf32-xc16x.c +++ b/cegcc/src/binutils/bfd/elf32-xc16x.c @@ -1,5 +1,5 @@ /* Infineon XC16X-specific support for 16-bit ELF. - Copyright 2006, 2007 Free Software Foundation, Inc. + Copyright 2006, 2007, 2009 Free Software Foundation, Inc. Contributed by KPIT Cummins Infosystems This file is part of BFD, the Binary File Descriptor library. @@ -24,7 +24,7 @@ #include "libbfd.h" #include "elf-bfd.h" #include "elf/xc16x.h" -#include "elf/dwarf2.h" +#include "dwarf2.h" #include "libiberty.h" static reloc_howto_type xc16x_elf_howto_table [] = diff --git a/cegcc/src/binutils/bfd/elf32-xtensa.c b/cegcc/src/binutils/bfd/elf32-xtensa.c index dadf42bc4..9f961dcde 100644 --- a/cegcc/src/binutils/bfd/elf32-xtensa.c +++ b/cegcc/src/binutils/bfd/elf32-xtensa.c @@ -1,5 +1,6 @@ /* Xtensa-specific support for 32-bit ELF. - Copyright 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1404,6 +1405,7 @@ elf_xtensa_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt"); htab->sgot = bfd_get_section_by_name (dynobj, ".got"); htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); + htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); /* Create any extra PLT sections in case check_relocs has already been called on all the non-dynamic input files. */ @@ -1419,12 +1421,6 @@ elf_xtensa_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) || ! bfd_set_section_flags (dynobj, htab->sgotplt, flags)) return FALSE; - /* Create ".rela.got". */ - htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got", flags); - if (htab->srelgot == NULL - || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2)) - return FALSE; - /* Create ".got.loc" (literal tables for use by dynamic linker). */ htab->sgotloc = bfd_make_section_with_flags (dynobj, ".got.loc", flags); if (htab->sgotloc == NULL @@ -5478,12 +5474,20 @@ text_action_add (text_action_list *l, for (m_p = &l->head; *m_p && (*m_p)->offset <= offset; m_p = &(*m_p)->next) { text_action *t = *m_p; - /* When the action is another fill at the same address, - just increase the size. */ - if (t->offset == offset && t->action == ta_fill && action == ta_fill) + + if (action == ta_fill) { - t->removed_bytes += removed; - return; + /* When the action is another fill at the same address, + just increase the size. */ + if (t->offset == offset && t->action == ta_fill) + { + t->removed_bytes += removed; + return; + } + /* Fills need to happen before widens so that we don't + insert fill bytes into the instruction stream. */ + if (t->offset == offset && t->action == ta_widen_insn) + break; } } @@ -10007,12 +10011,7 @@ relax_property_section (bfd *abfd, if (remove_this_rel) { offset_rel->r_info = ELF32_R_INFO (0, R_XTENSA_NONE); - /* In case this is the last entry, move the relocation offset - to the previous entry, if there is one. */ - if (offset_rel->r_offset >= bytes_to_remove) - offset_rel->r_offset -= bytes_to_remove; - else - offset_rel->r_offset = 0; + offset_rel->r_offset = 0; } if (bytes_to_remove != 0) diff --git a/cegcc/src/binutils/bfd/elf32.c b/cegcc/src/binutils/bfd/elf32.c index 09ba93cb9..98dacc1f3 100644 --- a/cegcc/src/binutils/bfd/elf32.c +++ b/cegcc/src/binutils/bfd/elf32.c @@ -1,5 +1,6 @@ /* ELF 32-bit executable support for BFD. - Copyright 1993, 2001, 2007 Free Software Foundation, Inc. + Copyright 1993, 2001, 2004, 2005, 2006, 2007, 2008, 2009 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elf64-alpha.c b/cegcc/src/binutils/bfd/elf64-alpha.c index c22b4fd5a..501e2ef5d 100644 --- a/cegcc/src/binutils/bfd/elf64-alpha.c +++ b/cegcc/src/binutils/bfd/elf64-alpha.c @@ -1,6 +1,6 @@ /* Alpha specific support for 64-bit ELF Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Richard Henderson . This file is part of BFD, the Binary File Descriptor library. @@ -103,6 +103,57 @@ bfd_boolean elf64_alpha_use_secureplt = FALSE; #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so" + +/* Used to implement multiple .got subsections. */ +struct alpha_elf_got_entry +{ + struct alpha_elf_got_entry *next; + + /* Which .got subsection? */ + bfd *gotobj; + + /* The addend in effect for this entry. */ + bfd_vma addend; + + /* The .got offset for this entry. */ + int got_offset; + + /* The .plt offset for this entry. */ + int plt_offset; + + /* How many references to this entry? */ + int use_count; + + /* The relocation type of this entry. */ + unsigned char reloc_type; + + /* How a LITERAL is used. */ + unsigned char flags; + + /* Have we initialized the dynamic relocation for this entry? */ + unsigned char reloc_done; + + /* Have we adjusted this entry for SEC_MERGE? */ + unsigned char reloc_xlated; +}; + +struct alpha_elf_reloc_entry +{ + struct alpha_elf_reloc_entry *next; + + /* Which .reloc section? */ + asection *srel; + + /* What kind of relocation? */ + unsigned int rtype; + + /* Is this against read-only section? */ + unsigned int reltext : 1; + + /* How many did we find? */ + unsigned long count; +}; + struct alpha_elf_link_hash_entry { struct elf_link_hash_entry root; @@ -125,56 +176,11 @@ struct alpha_elf_link_hash_entry #define ALPHA_ELF_LINK_HASH_TLS_IE 0x80 /* Used to implement multiple .got subsections. */ - struct alpha_elf_got_entry - { - struct alpha_elf_got_entry *next; - - /* Which .got subsection? */ - bfd *gotobj; - - /* The addend in effect for this entry. */ - bfd_vma addend; - - /* The .got offset for this entry. */ - int got_offset; - - /* The .plt offset for this entry. */ - int plt_offset; - - /* How many references to this entry? */ - int use_count; - - /* The relocation type of this entry. */ - unsigned char reloc_type; - - /* How a LITERAL is used. */ - unsigned char flags; - - /* Have we initialized the dynamic relocation for this entry? */ - unsigned char reloc_done; - - /* Have we adjusted this entry for SEC_MERGE? */ - unsigned char reloc_xlated; - } *got_entries; + struct alpha_elf_got_entry *got_entries; /* Used to count non-got, non-plt relocations for delayed sizing of relocation sections. */ - struct alpha_elf_reloc_entry - { - struct alpha_elf_reloc_entry *next; - - /* Which .reloc section? */ - asection *srel; - - /* What kind of relocation? */ - unsigned int rtype; - - /* Is this against read-only section? */ - unsigned int reltext : 1; - - /* How many did we find? */ - unsigned long count; - } *reloc_entries; + struct alpha_elf_reloc_entry *reloc_entries; }; /* Alpha ELF linker hash table. */ @@ -458,8 +464,9 @@ elf64_alpha_reloc_gpdisp (bfd *abfd, arelent *reloc_entry, from smaller values. Start with zero, widen, *then* decrement. */ #define MINUS_ONE (((bfd_vma)0) - 1) + #define SKIP_HOWTO(N) \ - HOWTO(N, 0, 0, 0, 0, 0, 0, elf64_alpha_reloc_bad, 0, 0, 0, 0, 0) + HOWTO(N, 0, 0, 0, 0, 0, complain_overflow_dont, elf64_alpha_reloc_bad, 0, 0, 0, 0, 0) static reloc_howto_type elf64_alpha_howto_table[] = { @@ -5062,7 +5069,7 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) interesting information, try to find the symbol in the linker global hash table and save the information for the output external symbols. */ - eraw_src = input_debug.external_ext; + eraw_src = (char *) input_debug.external_ext; eraw_end = (eraw_src + (input_debug.symbolic_header.iextMax * input_swap->external_ext_size)); diff --git a/cegcc/src/binutils/bfd/elf64-hppa.c b/cegcc/src/binutils/bfd/elf64-hppa.c index 3738d2bcf..0b762e40b 100644 --- a/cegcc/src/binutils/bfd/elf64-hppa.c +++ b/cegcc/src/binutils/bfd/elf64-hppa.c @@ -1,5 +1,5 @@ /* Support for HPPA 64-bit ELF - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "alloca-conf.h" #include "sysdep.h" #include "bfd.h" #include "libbfd.h" @@ -27,31 +28,6 @@ #include "libhppa.h" #include "elf64-hppa.h" -/* This is the code recommended in the autoconf documentation, almost - verbatim. */ -#ifndef __GNUC__ -# if HAVE_ALLOCA_H -# include -# else -# ifdef _AIX -/* Indented so that pre-ansi C compilers will ignore it, rather than - choke on it. Some versions of AIX require this to be the first - thing in the file. */ - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -# if !defined (__STDC__) && !defined (__hpux) -extern char *alloca (); -# else -extern void *alloca (); -# endif /* __STDC__, __hpux */ -# endif /* alloca */ -# endif /* _AIX */ -# endif /* HAVE_ALLOCA_H */ -#else -extern void *alloca (size_t); -#endif /* __GNUC__ */ - #define ARCH_SIZE 64 @@ -74,9 +50,9 @@ extern void *alloca (size_t); static char plt_stub[] = {0x53, 0x61, 0x00, 0x00, 0xe8, 0x20, 0xd0, 0x00, 0x53, 0x7b, 0x00, 0x00 }; -struct elf64_hppa_dyn_hash_entry +struct elf64_hppa_link_hash_entry { - struct bfd_hash_entry root; + struct elf_link_hash_entry eh; /* Offsets for this symbol in various linker sections. */ bfd_vma dlt_offset; @@ -84,9 +60,6 @@ struct elf64_hppa_dyn_hash_entry bfd_vma opd_offset; bfd_vma stub_offset; - /* The symbol table entry, if any, that this was derived from. */ - struct elf_link_hash_entry *h; - /* The index of the (possibly local) symbol in the input bfd and its associated BFD. Needed so that we can have relocs against local symbols in shared libraries. */ @@ -115,6 +88,9 @@ struct elf64_hppa_dyn_hash_entry /* The input section of the relocation. */ asection *sec; + /* Number of relocs copied in this section. */ + bfd_size_type count; + /* The index of the section symbol for the input section of the relocation. Only needed when building shared libraries. */ int sec_symndx; @@ -135,11 +111,6 @@ struct elf64_hppa_dyn_hash_entry unsigned want_stub; }; -struct elf64_hppa_dyn_hash_table -{ - struct bfd_hash_table root; -}; - struct elf64_hppa_link_hash_table { struct elf_link_hash_table root; @@ -166,8 +137,6 @@ struct elf64_hppa_link_hash_table bfd_vma text_segment_base; bfd_vma data_segment_base; - struct elf64_hppa_dyn_hash_table dyn_hash_table; - /* We build tables to map from an input section back to its symbol index. This is the BFD for which we currently have a map. */ @@ -178,158 +147,144 @@ struct elf64_hppa_link_hash_table int *section_syms; }; -#define elf64_hppa_hash_table(p) \ +#define hppa_link_hash_table(p) \ ((struct elf64_hppa_link_hash_table *) ((p)->hash)) +#define hppa_elf_hash_entry(ent) \ + ((struct elf64_hppa_link_hash_entry *)(ent)) + +#define eh_name(eh) \ + (eh ? eh->root.root.string : "") + typedef struct bfd_hash_entry *(*new_hash_entry_func) - PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); + (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); -static struct bfd_hash_entry *elf64_hppa_new_dyn_hash_entry - PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table, - const char *string)); static struct bfd_link_hash_table *elf64_hppa_hash_table_create - PARAMS ((bfd *abfd)); -static struct elf64_hppa_dyn_hash_entry *elf64_hppa_dyn_hash_lookup - PARAMS ((struct elf64_hppa_dyn_hash_table *table, const char *string, - bfd_boolean create, bfd_boolean copy)); -static void elf64_hppa_dyn_hash_traverse - PARAMS ((struct elf64_hppa_dyn_hash_table *table, - bfd_boolean (*func) (struct elf64_hppa_dyn_hash_entry *, PTR), - PTR info)); - -static const char *get_dyn_name - PARAMS ((bfd *, struct elf_link_hash_entry *, - const Elf_Internal_Rela *, char **, size_t *)); + (bfd *abfd); /* This must follow the definitions of the various derived linker hash tables and shared functions. */ #include "elf-hppa.h" static bfd_boolean elf64_hppa_object_p - PARAMS ((bfd *)); + (bfd *); static void elf64_hppa_post_process_headers - PARAMS ((bfd *, struct bfd_link_info *)); + (bfd *, struct bfd_link_info *); static bfd_boolean elf64_hppa_create_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); + (bfd *, struct bfd_link_info *); static bfd_boolean elf64_hppa_adjust_dynamic_symbol - PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); + (struct bfd_link_info *, struct elf_link_hash_entry *); static bfd_boolean elf64_hppa_mark_milli_and_exported_functions - PARAMS ((struct elf_link_hash_entry *, PTR)); + (struct elf_link_hash_entry *, void *); static bfd_boolean elf64_hppa_size_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); + (bfd *, struct bfd_link_info *); -static bfd_boolean elf64_hppa_link_output_symbol_hook - PARAMS ((struct bfd_link_info *, const char *, Elf_Internal_Sym *, - asection *, struct elf_link_hash_entry *)); +static int elf64_hppa_link_output_symbol_hook + (struct bfd_link_info *, const char *, Elf_Internal_Sym *, + asection *, struct elf_link_hash_entry *); static bfd_boolean elf64_hppa_finish_dynamic_symbol - PARAMS ((bfd *, struct bfd_link_info *, - struct elf_link_hash_entry *, Elf_Internal_Sym *)); + (bfd *, struct bfd_link_info *, + struct elf_link_hash_entry *, Elf_Internal_Sym *); static enum elf_reloc_type_class elf64_hppa_reloc_type_class - PARAMS ((const Elf_Internal_Rela *)); + (const Elf_Internal_Rela *); static bfd_boolean elf64_hppa_finish_dynamic_sections - PARAMS ((bfd *, struct bfd_link_info *)); + (bfd *, struct bfd_link_info *); static bfd_boolean elf64_hppa_check_relocs - PARAMS ((bfd *, struct bfd_link_info *, - asection *, const Elf_Internal_Rela *)); + (bfd *, struct bfd_link_info *, + asection *, const Elf_Internal_Rela *); static bfd_boolean elf64_hppa_dynamic_symbol_p - PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *)); + (struct elf_link_hash_entry *, struct bfd_link_info *); static bfd_boolean elf64_hppa_mark_exported_functions - PARAMS ((struct elf_link_hash_entry *, PTR)); + (struct elf_link_hash_entry *, void *); static bfd_boolean elf64_hppa_finalize_opd - PARAMS ((struct elf64_hppa_dyn_hash_entry *, PTR)); + (struct elf_link_hash_entry *, void *); static bfd_boolean elf64_hppa_finalize_dlt - PARAMS ((struct elf64_hppa_dyn_hash_entry *, PTR)); + (struct elf_link_hash_entry *, void *); static bfd_boolean allocate_global_data_dlt - PARAMS ((struct elf64_hppa_dyn_hash_entry *, PTR)); + (struct elf_link_hash_entry *, void *); static bfd_boolean allocate_global_data_plt - PARAMS ((struct elf64_hppa_dyn_hash_entry *, PTR)); + (struct elf_link_hash_entry *, void *); static bfd_boolean allocate_global_data_stub - PARAMS ((struct elf64_hppa_dyn_hash_entry *, PTR)); + (struct elf_link_hash_entry *, void *); static bfd_boolean allocate_global_data_opd - PARAMS ((struct elf64_hppa_dyn_hash_entry *, PTR)); + (struct elf_link_hash_entry *, void *); static bfd_boolean get_reloc_section - PARAMS ((bfd *, struct elf64_hppa_link_hash_table *, asection *)); + (bfd *, struct elf64_hppa_link_hash_table *, asection *); static bfd_boolean count_dyn_reloc - PARAMS ((bfd *, struct elf64_hppa_dyn_hash_entry *, - int, asection *, int, bfd_vma, bfd_vma)); + (bfd *, struct elf64_hppa_link_hash_entry *, + int, asection *, int, bfd_vma, bfd_vma); static bfd_boolean allocate_dynrel_entries - PARAMS ((struct elf64_hppa_dyn_hash_entry *, PTR)); + (struct elf_link_hash_entry *, void *); static bfd_boolean elf64_hppa_finalize_dynreloc - PARAMS ((struct elf64_hppa_dyn_hash_entry *, PTR)); + (struct elf_link_hash_entry *, void *); static bfd_boolean get_opd - PARAMS ((bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *)); + (bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *); static bfd_boolean get_plt - PARAMS ((bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *)); + (bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *); static bfd_boolean get_dlt - PARAMS ((bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *)); + (bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *); static bfd_boolean get_stub - PARAMS ((bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *)); + (bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *); static int elf64_hppa_elf_get_symbol_type - PARAMS ((Elf_Internal_Sym *, int)); + (Elf_Internal_Sym *, int); -static bfd_boolean -elf64_hppa_dyn_hash_table_init (struct elf64_hppa_dyn_hash_table *ht, - bfd *abfd ATTRIBUTE_UNUSED, - new_hash_entry_func new, - unsigned int entsize) -{ - memset (ht, 0, sizeof (*ht)); - return bfd_hash_table_init (&ht->root, new, entsize); -} +/* Initialize an entry in the link hash table. */ -static struct bfd_hash_entry* -elf64_hppa_new_dyn_hash_entry (entry, table, string) - struct bfd_hash_entry *entry; - struct bfd_hash_table *table; - const char *string; +static struct bfd_hash_entry * +hppa64_link_hash_newfunc (struct bfd_hash_entry *entry, + struct bfd_hash_table *table, + const char *string) { - struct elf64_hppa_dyn_hash_entry *ret; - ret = (struct elf64_hppa_dyn_hash_entry *) entry; - /* Allocate the structure if it has not already been allocated by a subclass. */ - if (!ret) - ret = bfd_hash_allocate (table, sizeof (*ret)); - - if (!ret) - return 0; + if (entry == NULL) + { + entry = bfd_hash_allocate (table, + sizeof (struct elf64_hppa_link_hash_entry)); + if (entry == NULL) + return entry; + } /* Call the allocation method of the superclass. */ - ret = ((struct elf64_hppa_dyn_hash_entry *) - bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string)); + entry = _bfd_elf_link_hash_newfunc (entry, table, string); + if (entry != NULL) + { + struct elf64_hppa_link_hash_entry *hh; - /* Initialize our local data. All zeros. */ - memset (&ret->dlt_offset, 0, - (sizeof (struct elf64_hppa_dyn_hash_entry) - - offsetof (struct elf64_hppa_dyn_hash_entry, dlt_offset))); + /* Initialize our local data. All zeros. */ + hh = hppa_elf_hash_entry (entry); + memset (&hh->dlt_offset, 0, + (sizeof (struct elf64_hppa_link_hash_entry) + - offsetof (struct elf64_hppa_link_hash_entry, dlt_offset))); + } - return &ret->root; + return entry; } /* Create the derived linker hash table. The PA64 ELF port uses this @@ -337,61 +292,34 @@ elf64_hppa_new_dyn_hash_entry (entry, table, string) linker (without using static variables). */ static struct bfd_link_hash_table* -elf64_hppa_hash_table_create (abfd) - bfd *abfd; +elf64_hppa_hash_table_create (bfd *abfd) { - struct elf64_hppa_link_hash_table *ret; - - ret = bfd_zalloc (abfd, (bfd_size_type) sizeof (*ret)); - if (!ret) - return 0; - if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, - _bfd_elf_link_hash_newfunc, - sizeof (struct elf_link_hash_entry))) - { - bfd_release (abfd, ret); - return 0; - } - - if (!elf64_hppa_dyn_hash_table_init (&ret->dyn_hash_table, abfd, - elf64_hppa_new_dyn_hash_entry, - sizeof (struct elf64_hppa_dyn_hash_entry))) - return 0; - return &ret->root.root; -} + struct elf64_hppa_link_hash_table *htab; + bfd_size_type amt = sizeof (*htab); -/* Look up an entry in a PA64 ELF linker hash table. */ + htab = bfd_zalloc (abfd, amt); + if (htab == NULL) + return NULL; -static struct elf64_hppa_dyn_hash_entry * -elf64_hppa_dyn_hash_lookup(table, string, create, copy) - struct elf64_hppa_dyn_hash_table *table; - const char *string; - bfd_boolean create, copy; -{ - return ((struct elf64_hppa_dyn_hash_entry *) - bfd_hash_lookup (&table->root, string, create, copy)); -} + if (!_bfd_elf_link_hash_table_init (&htab->root, abfd, + hppa64_link_hash_newfunc, + sizeof (struct elf64_hppa_link_hash_entry))) + { + bfd_release (abfd, htab); + return NULL; + } -/* Traverse a PA64 ELF linker hash table. */ + htab->text_segment_base = (bfd_vma) -1; + htab->data_segment_base = (bfd_vma) -1; -static void -elf64_hppa_dyn_hash_traverse (table, func, info) - struct elf64_hppa_dyn_hash_table *table; - bfd_boolean (*func) PARAMS ((struct elf64_hppa_dyn_hash_entry *, PTR)); - PTR info; -{ - (bfd_hash_traverse - (&table->root, - (bfd_boolean (*) PARAMS ((struct bfd_hash_entry *, PTR))) func, - info)); + return &htab->root.root; } /* Return nonzero if ABFD represents a PA2.0 ELF64 file. Additionally we set the default architecture and machine. */ static bfd_boolean -elf64_hppa_object_p (abfd) - bfd *abfd; +elf64_hppa_object_p (bfd *abfd) { Elf_Internal_Ehdr * i_ehdrp; unsigned int flags; @@ -466,73 +394,13 @@ elf64_hppa_section_from_shdr (bfd *abfd, return TRUE; } -/* Construct a string for use in the elf64_hppa_dyn_hash_table. The - name describes what was once potentially anonymous memory. We - allocate memory as necessary, possibly reusing PBUF/PLEN. */ - -static const char * -get_dyn_name (abfd, h, rel, pbuf, plen) - bfd *abfd; - struct elf_link_hash_entry *h; - const Elf_Internal_Rela *rel; - char **pbuf; - size_t *plen; -{ - asection *sec = abfd->sections; - size_t nlen, tlen; - char *buf; - size_t len; - - if (h && rel->r_addend == 0) - return h->root.root.string; - - if (h) - nlen = strlen (h->root.root.string); - else - nlen = 8 + 1 + sizeof (rel->r_info) * 2 - 8; - tlen = nlen + 1 + sizeof (rel->r_addend) * 2 + 1; - - len = *plen; - buf = *pbuf; - if (len < tlen) - { - if (buf) - free (buf); - *pbuf = buf = malloc (tlen); - *plen = len = tlen; - if (!buf) - return NULL; - } - - if (h) - { - memcpy (buf, h->root.root.string, nlen); - buf[nlen++] = '+'; - sprintf_vma (buf + nlen, rel->r_addend); - } - else - { - nlen = sprintf (buf, "%x:%lx", - sec->id & 0xffffffff, - (unsigned long) ELF64_R_SYM (rel->r_info)); - if (rel->r_addend) - { - buf[nlen++] = '+'; - sprintf_vma (buf + nlen, rel->r_addend); - } - } - - return buf; -} - /* SEC is a section containing relocs for an input BFD when linking; return a suitable section for holding relocs in the output BFD for a link. */ static bfd_boolean -get_reloc_section (abfd, hppa_info, sec) - bfd *abfd; - struct elf64_hppa_link_hash_table *hppa_info; - asection *sec; +get_reloc_section (bfd *abfd, + struct elf64_hppa_link_hash_table *hppa_info, + asection *sec) { const char *srel_name; asection *srel; @@ -581,14 +449,13 @@ get_reloc_section (abfd, hppa_info, sec) output file. */ static bfd_boolean -count_dyn_reloc (abfd, dyn_h, type, sec, sec_symndx, offset, addend) - bfd *abfd; - struct elf64_hppa_dyn_hash_entry *dyn_h; - int type; - asection *sec; - int sec_symndx; - bfd_vma offset; - bfd_vma addend; +count_dyn_reloc (bfd *abfd, + struct elf64_hppa_link_hash_entry *hh, + int type, + asection *sec, + int sec_symndx, + bfd_vma offset, + bfd_vma addend) { struct elf64_hppa_dyn_reloc_entry *rent; @@ -597,26 +464,50 @@ count_dyn_reloc (abfd, dyn_h, type, sec, sec_symndx, offset, addend) if (!rent) return FALSE; - rent->next = dyn_h->reloc_entries; + rent->next = hh->reloc_entries; rent->type = type; rent->sec = sec; rent->sec_symndx = sec_symndx; rent->offset = offset; rent->addend = addend; - dyn_h->reloc_entries = rent; + hh->reloc_entries = rent; return TRUE; } +/* Return a pointer to the local DLT, PLT and OPD reference counts + for ABFD. Returns NULL if the storage allocation fails. */ + +static bfd_signed_vma * +hppa64_elf_local_refcounts (bfd *abfd) +{ + Elf_Internal_Shdr *symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + bfd_signed_vma *local_refcounts; + + local_refcounts = elf_local_got_refcounts (abfd); + if (local_refcounts == NULL) + { + bfd_size_type size; + + /* Allocate space for local DLT, PLT and OPD reference + counts. Done this way to save polluting elf_obj_tdata + with another target specific pointer. */ + size = symtab_hdr->sh_info; + size *= 3 * sizeof (bfd_signed_vma); + local_refcounts = bfd_zalloc (abfd, size); + elf_local_got_refcounts (abfd) = local_refcounts; + } + return local_refcounts; +} + /* Scan the RELOCS and record the type of dynamic entries that each referenced symbol needs. */ static bfd_boolean -elf64_hppa_check_relocs (abfd, info, sec, relocs) - bfd *abfd; - struct bfd_link_info *info; - asection *sec; - const Elf_Internal_Rela *relocs; +elf64_hppa_check_relocs (bfd *abfd, + struct bfd_link_info *info, + asection *sec, + const Elf_Internal_Rela *relocs) { struct elf64_hppa_link_hash_table *hppa_info; const Elf_Internal_Rela *relend; @@ -638,7 +529,7 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) return FALSE; } - hppa_info = elf64_hppa_hash_table (info); + hppa_info = hppa_link_hash_table (info); symtab_hdr = &elf_tdata (abfd)->symtab_hdr; /* If necessary, build a new table holding section symbols indices @@ -751,11 +642,9 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) NEED_DYNREL = 16, }; - struct elf_link_hash_entry *h = NULL; unsigned long r_symndx = ELF64_R_SYM (rel->r_info); - struct elf64_hppa_dyn_hash_entry *dyn_h; + struct elf64_hppa_link_hash_entry *hh; int need_entry; - const char *addr_name; bfd_boolean maybe_dynamic; int dynrel_type = R_PARISC_NONE; static reloc_howto_type *howto; @@ -765,24 +654,26 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) /* We're dealing with a global symbol -- find its hash entry and mark it as being referenced. */ long indx = r_symndx - symtab_hdr->sh_info; - h = elf_sym_hashes (abfd)[indx]; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; + hh = hppa_elf_hash_entry (elf_sym_hashes (abfd)[indx]); + while (hh->eh.root.type == bfd_link_hash_indirect + || hh->eh.root.type == bfd_link_hash_warning) + hh = hppa_elf_hash_entry (hh->eh.root.u.i.link); - h->ref_regular = 1; + hh->eh.ref_regular = 1; } + else + hh = NULL; /* We can only get preliminary data on whether a symbol is locally or externally defined, as not all of the input files have yet been processed. Do something with what we know, as this may help reduce memory usage and processing time later. */ maybe_dynamic = FALSE; - if (h && ((info->shared + if (hh && ((info->shared && (!info->symbolic || info->unresolved_syms_in_shared_libs == RM_IGNORE)) - || !h->def_regular - || h->root.type == bfd_link_hash_defweak)) + || !hh->eh.def_regular + || hh->eh.root.type == bfd_link_hash_defweak)) maybe_dynamic = TRUE; howto = elf_hppa_howto_table + ELF64_R_TYPE (rel->r_info); @@ -833,7 +724,12 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) case R_PARISC_PCREL16F: case R_PARISC_PCREL16WF: case R_PARISC_PCREL16DF: - need_entry = (NEED_PLT | NEED_STUB); + /* Function calls might need to go through the .plt, and + might need a long branch stub. */ + if (hh != NULL && hh->eh.type != STT_PARISC_MILLI) + need_entry = (NEED_PLT | NEED_STUB); + else + need_entry = 0; break; case R_PARISC_PLTOFF21L: @@ -866,18 +762,18 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) case R_PARISC_LTOFF_FPTR16WF: case R_PARISC_LTOFF_FPTR16DF: if (info->shared || maybe_dynamic) - need_entry = (NEED_DLT | NEED_OPD); + need_entry = (NEED_DLT | NEED_OPD | NEED_PLT); else - need_entry = (NEED_DLT | NEED_OPD); + need_entry = (NEED_DLT | NEED_OPD | NEED_PLT); dynrel_type = R_PARISC_FPTR64; break; /* This is a simple OPD entry. */ case R_PARISC_FPTR64: if (info->shared || maybe_dynamic) - need_entry = (NEED_OPD | NEED_DYNREL); + need_entry = (NEED_OPD | NEED_PLT | NEED_DYNREL); else - need_entry = (NEED_OPD); + need_entry = (NEED_OPD | NEED_PLT); dynrel_type = R_PARISC_FPTR64; break; @@ -887,28 +783,38 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) if (!need_entry) continue; - /* Collect a canonical name for this address. */ - addr_name = get_dyn_name (abfd, h, rel, &buf, &buf_len); - - /* Collect the canonical entry data for this address. */ - dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, - addr_name, TRUE, TRUE); - BFD_ASSERT (dyn_h); - - /* Stash away enough information to be able to find this symbol - regardless of whether or not it is local or global. */ - dyn_h->h = h; - dyn_h->owner = abfd; - dyn_h->sym_indx = r_symndx; + if (hh) + { + /* Stash away enough information to be able to find this symbol + regardless of whether or not it is local or global. */ + hh->owner = abfd; + hh->sym_indx = r_symndx; + } - /* ?!? We may need to do some error checking in here. */ /* Create what's needed. */ if (need_entry & NEED_DLT) { + /* Allocate space for a DLT entry, as well as a dynamic + relocation for this entry. */ if (! hppa_info->dlt_sec && ! get_dlt (abfd, info, hppa_info)) goto err_out; - dyn_h->want_dlt = 1; + + if (hh != NULL) + { + hh->want_dlt = 1; + hh->eh.got.refcount += 1; + } + else + { + bfd_signed_vma *local_dlt_refcounts; + + /* This is a DLT entry for a local symbol. */ + local_dlt_refcounts = hppa64_elf_local_refcounts (abfd); + if (local_dlt_refcounts == NULL) + return FALSE; + local_dlt_refcounts[r_symndx] += 1; + } } if (need_entry & NEED_PLT) @@ -916,7 +822,25 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) if (! hppa_info->plt_sec && ! get_plt (abfd, info, hppa_info)) goto err_out; - dyn_h->want_plt = 1; + + if (hh != NULL) + { + hh->want_plt = 1; + hh->eh.needs_plt = 1; + hh->eh.plt.refcount += 1; + } + else + { + bfd_signed_vma *local_dlt_refcounts; + bfd_signed_vma *local_plt_refcounts; + + /* This is a PLT entry for a local symbol. */ + local_dlt_refcounts = hppa64_elf_local_refcounts (abfd); + if (local_dlt_refcounts == NULL) + return FALSE; + local_plt_refcounts = local_dlt_refcounts + symtab_hdr->sh_info; + local_plt_refcounts[r_symndx] += 1; + } } if (need_entry & NEED_STUB) @@ -924,7 +848,8 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) if (! hppa_info->stub_sec && ! get_stub (abfd, info, hppa_info)) goto err_out; - dyn_h->want_stub = 1; + if (hh) + hh->want_stub = 1; } if (need_entry & NEED_OPD) @@ -933,15 +858,24 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) && ! get_opd (abfd, info, hppa_info)) goto err_out; - dyn_h->want_opd = 1; - - /* FPTRs are not allocated by the dynamic linker for PA64, though - it is possible that will change in the future. */ + /* FPTRs are not allocated by the dynamic linker for PA64, + though it is possible that will change in the future. */ - /* This could be a local function that had its address taken, in - which case H will be NULL. */ - if (h) - h->needs_plt = 1; + if (hh != NULL) + hh->want_opd = 1; + else + { + bfd_signed_vma *local_dlt_refcounts; + bfd_signed_vma *local_opd_refcounts; + + /* This is a OPD for a local symbol. */ + local_dlt_refcounts = hppa64_elf_local_refcounts (abfd); + if (local_dlt_refcounts == NULL) + return FALSE; + local_opd_refcounts = (local_dlt_refcounts + + 2 * symtab_hdr->sh_info); + local_opd_refcounts[r_symndx] += 1; + } } /* Add a new dynamic relocation to the chain of dynamic @@ -952,8 +886,10 @@ elf64_hppa_check_relocs (abfd, info, sec, relocs) && ! get_reloc_section (abfd, hppa_info, sec)) goto err_out; - if (!count_dyn_reloc (abfd, dyn_h, dynrel_type, sec, - sec_symndx, rel->r_offset, rel->r_addend)) + /* Count dynamic relocations against global symbols. */ + if (hh != NULL + && !count_dyn_reloc (abfd, hh, dynrel_type, sec, + sec_symndx, rel->r_offset, rel->r_addend)) goto err_out; /* If we are building a shared library and we just recorded @@ -986,17 +922,16 @@ struct elf64_hppa_allocate_data /* Should we do dynamic things to this symbol? */ static bfd_boolean -elf64_hppa_dynamic_symbol_p (h, info) - struct elf_link_hash_entry *h; - struct bfd_link_info *info; +elf64_hppa_dynamic_symbol_p (struct elf_link_hash_entry *eh, + struct bfd_link_info *info) { /* ??? What, if anything, needs to happen wrt STV_PROTECTED symbols and relocations that retrieve a function descriptor? Assume the worst for now. */ - if (_bfd_elf_dynamic_symbol_p (h, info, 1)) + if (_bfd_elf_dynamic_symbol_p (eh, info, 1)) { /* ??? Why is this here and not elsewhere is_local_label_name. */ - if (h->root.root.string[0] == '$' && h->root.root.string[1] == '$') + if (eh->root.root.string[0] == '$' && eh->root.root.string[1] == '$') return FALSE; return TRUE; @@ -1009,40 +944,32 @@ elf64_hppa_dynamic_symbol_p (h, info) entries in .opd for them. */ static bfd_boolean -elf64_hppa_mark_exported_functions (h, data) - struct elf_link_hash_entry *h; - PTR data; +elf64_hppa_mark_exported_functions (struct elf_link_hash_entry *eh, void *data) { + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); struct bfd_link_info *info = (struct bfd_link_info *)data; struct elf64_hppa_link_hash_table *hppa_info; - hppa_info = elf64_hppa_hash_table (info); + hppa_info = hppa_link_hash_table (info); - if (h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (eh->root.type == bfd_link_hash_warning) + eh = (struct elf_link_hash_entry *) eh->root.u.i.link; - if (h - && (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - && h->root.u.def.section->output_section != NULL - && h->type == STT_FUNC) + if (eh + && (eh->root.type == bfd_link_hash_defined + || eh->root.type == bfd_link_hash_defweak) + && eh->root.u.def.section->output_section != NULL + && eh->type == STT_FUNC) { - struct elf64_hppa_dyn_hash_entry *dyn_h; - - /* Add this symbol to the PA64 linker hash table. */ - dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, - h->root.root.string, TRUE, TRUE); - BFD_ASSERT (dyn_h); - dyn_h->h = h; - if (! hppa_info->opd_sec && ! get_opd (hppa_info->root.dynobj, info, hppa_info)) return FALSE; - dyn_h->want_opd = 1; + hh->want_opd = 1; + /* Put a flag here for output_symbol_hook. */ - dyn_h->st_shndx = -1; - h->needs_plt = 1; + hh->st_shndx = -1; + eh->needs_plt = 1; } return TRUE; @@ -1051,34 +978,29 @@ elf64_hppa_mark_exported_functions (h, data) /* Allocate space for a DLT entry. */ static bfd_boolean -allocate_global_data_dlt (dyn_h, data) - struct elf64_hppa_dyn_hash_entry *dyn_h; - PTR data; +allocate_global_data_dlt (struct elf_link_hash_entry *eh, void *data) { + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); struct elf64_hppa_allocate_data *x = (struct elf64_hppa_allocate_data *)data; - if (dyn_h->want_dlt) + if (hh->want_dlt) { - struct elf_link_hash_entry *h = dyn_h->h; - if (x->info->shared) { /* Possibly add the symbol to the local dynamic symbol table since we might need to create a dynamic relocation against it. */ - if (! h - || (h->dynindx == -1 && h->type != STT_PARISC_MILLI)) + if (eh->dynindx == -1 && eh->type != STT_PARISC_MILLI) { - bfd *owner; - owner = (h ? h->root.u.def.section->owner : dyn_h->owner); + bfd *owner = eh->root.u.def.section->owner; if (! (bfd_elf_link_record_local_dynamic_symbol - (x->info, owner, dyn_h->sym_indx))) + (x->info, owner, hh->sym_indx))) return FALSE; } } - dyn_h->dlt_offset = x->ofs; + hh->dlt_offset = x->ofs; x->ofs += DLT_ENTRY_SIZE; } return TRUE; @@ -1087,25 +1009,24 @@ allocate_global_data_dlt (dyn_h, data) /* Allocate space for a DLT.PLT entry. */ static bfd_boolean -allocate_global_data_plt (dyn_h, data) - struct elf64_hppa_dyn_hash_entry *dyn_h; - PTR data; +allocate_global_data_plt (struct elf_link_hash_entry *eh, void *data) { + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); struct elf64_hppa_allocate_data *x = (struct elf64_hppa_allocate_data *)data; - if (dyn_h->want_plt - && elf64_hppa_dynamic_symbol_p (dyn_h->h, x->info) - && !((dyn_h->h->root.type == bfd_link_hash_defined - || dyn_h->h->root.type == bfd_link_hash_defweak) - && dyn_h->h->root.u.def.section->output_section != NULL)) + if (hh->want_plt + && elf64_hppa_dynamic_symbol_p (eh, x->info) + && !((eh->root.type == bfd_link_hash_defined + || eh->root.type == bfd_link_hash_defweak) + && eh->root.u.def.section->output_section != NULL)) { - dyn_h->plt_offset = x->ofs; + hh->plt_offset = x->ofs; x->ofs += PLT_ENTRY_SIZE; - if (dyn_h->plt_offset < 0x2000) - elf64_hppa_hash_table (x->info)->gp_offset = dyn_h->plt_offset; + if (hh->plt_offset < 0x2000) + hppa_link_hash_table (x->info)->gp_offset = hh->plt_offset; } else - dyn_h->want_plt = 0; + hh->want_plt = 0; return TRUE; } @@ -1113,73 +1034,68 @@ allocate_global_data_plt (dyn_h, data) /* Allocate space for a STUB entry. */ static bfd_boolean -allocate_global_data_stub (dyn_h, data) - struct elf64_hppa_dyn_hash_entry *dyn_h; - PTR data; +allocate_global_data_stub (struct elf_link_hash_entry *eh, void *data) { + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); struct elf64_hppa_allocate_data *x = (struct elf64_hppa_allocate_data *)data; - if (dyn_h->want_stub - && elf64_hppa_dynamic_symbol_p (dyn_h->h, x->info) - && !((dyn_h->h->root.type == bfd_link_hash_defined - || dyn_h->h->root.type == bfd_link_hash_defweak) - && dyn_h->h->root.u.def.section->output_section != NULL)) + if (hh->want_stub + && elf64_hppa_dynamic_symbol_p (eh, x->info) + && !((eh->root.type == bfd_link_hash_defined + || eh->root.type == bfd_link_hash_defweak) + && eh->root.u.def.section->output_section != NULL)) { - dyn_h->stub_offset = x->ofs; + hh->stub_offset = x->ofs; x->ofs += sizeof (plt_stub); } else - dyn_h->want_stub = 0; + hh->want_stub = 0; return TRUE; } /* Allocate space for a FPTR entry. */ static bfd_boolean -allocate_global_data_opd (dyn_h, data) - struct elf64_hppa_dyn_hash_entry *dyn_h; - PTR data; +allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data) { + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); struct elf64_hppa_allocate_data *x = (struct elf64_hppa_allocate_data *)data; - if (dyn_h->want_opd) + if (hh && hh->want_opd) { - struct elf_link_hash_entry *h = dyn_h->h; - - if (h) - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; + while (hh->eh.root.type == bfd_link_hash_indirect + || hh->eh.root.type == bfd_link_hash_warning) + hh = hppa_elf_hash_entry (hh->eh.root.u.i.link); /* We never need an opd entry for a symbol which is not defined by this output file. */ - if (h && (h->root.type == bfd_link_hash_undefined - || h->root.type == bfd_link_hash_undefweak - || h->root.u.def.section->output_section == NULL)) - dyn_h->want_opd = 0; + if (hh && (hh->eh.root.type == bfd_link_hash_undefined + || hh->eh.root.type == bfd_link_hash_undefweak + || hh->eh.root.u.def.section->output_section == NULL)) + hh->want_opd = 0; /* If we are creating a shared library, took the address of a local function or might export this function from this object file, then we have to create an opd descriptor. */ else if (x->info->shared - || h == NULL - || (h->dynindx == -1 && h->type != STT_PARISC_MILLI) - || (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak)) + || hh == NULL + || (hh->eh.dynindx == -1 && hh->eh.type != STT_PARISC_MILLI) + || (hh->eh.root.type == bfd_link_hash_defined + || hh->eh.root.type == bfd_link_hash_defweak)) { /* If we are creating a shared library, then we will have to create a runtime relocation for the symbol to properly initialize the .opd entry. Make sure the symbol gets added to the dynamic symbol table. */ if (x->info->shared - && (h == NULL || (h->dynindx == -1))) + && (hh == NULL || (hh->eh.dynindx == -1))) { bfd *owner; /* PR 6511: Default to using the dynamic symbol table. */ - owner = (dyn_h->owner ? dyn_h->owner: h->root.u.def.section->owner); + owner = (hh->owner ? hh->owner: eh->root.u.def.section->owner); if (!bfd_elf_link_record_local_dynamic_symbol - (x->info, owner, dyn_h->sym_indx)) + (x->info, owner, hh->sym_indx)) return FALSE; } @@ -1188,33 +1104,33 @@ allocate_global_data_opd (dyn_h, data) in dynamic relocs. But name munging does make the result much easier to debug. ie, the EPLT reloc will reference a symbol like .foobar, instead of .text + offset. */ - if (x->info->shared && h) + if (x->info->shared && eh) { char *new_name; struct elf_link_hash_entry *nh; - new_name = alloca (strlen (h->root.root.string) + 2); + new_name = alloca (strlen (eh->root.root.string) + 2); new_name[0] = '.'; - strcpy (new_name + 1, h->root.root.string); + strcpy (new_name + 1, eh->root.root.string); nh = elf_link_hash_lookup (elf_hash_table (x->info), new_name, TRUE, TRUE, TRUE); - nh->root.type = h->root.type; - nh->root.u.def.value = h->root.u.def.value; - nh->root.u.def.section = h->root.u.def.section; + nh->root.type = eh->root.type; + nh->root.u.def.value = eh->root.u.def.value; + nh->root.u.def.section = eh->root.u.def.section; if (! bfd_elf_link_record_dynamic_symbol (x->info, nh)) return FALSE; } - dyn_h->opd_offset = x->ofs; + hh->opd_offset = x->ofs; x->ofs += OPD_ENTRY_SIZE; } /* Otherwise we do not need an opd entry. */ else - dyn_h->want_opd = 0; + hh->want_opd = 0; } return TRUE; } @@ -1223,9 +1139,8 @@ allocate_global_data_opd (dyn_h, data) EI_ABIVERSION may not be strictly necessary. */ static void -elf64_hppa_post_process_headers (abfd, link_info) - bfd * abfd; - struct bfd_link_info * link_info ATTRIBUTE_UNUSED; +elf64_hppa_post_process_headers (bfd *abfd, + struct bfd_link_info *link_info ATTRIBUTE_UNUSED) { Elf_Internal_Ehdr * i_ehdrp; @@ -1241,10 +1156,9 @@ elf64_hppa_post_process_headers (abfd, link_info) of a procedure, thus ensuring a unique address for each procedure. */ static bfd_boolean -get_opd (abfd, info, hppa_info) - bfd *abfd; - struct bfd_link_info *info ATTRIBUTE_UNUSED; - struct elf64_hppa_link_hash_table *hppa_info; +get_opd (bfd *abfd, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + struct elf64_hppa_link_hash_table *hppa_info) { asection *opd; bfd *dynobj; @@ -1278,10 +1192,9 @@ get_opd (abfd, info, hppa_info) /* Create the PLT section. */ static bfd_boolean -get_plt (abfd, info, hppa_info) - bfd *abfd; - struct bfd_link_info *info ATTRIBUTE_UNUSED; - struct elf64_hppa_link_hash_table *hppa_info; +get_plt (bfd *abfd, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + struct elf64_hppa_link_hash_table *hppa_info) { asection *plt; bfd *dynobj; @@ -1315,10 +1228,9 @@ get_plt (abfd, info, hppa_info) /* Create the DLT section. */ static bfd_boolean -get_dlt (abfd, info, hppa_info) - bfd *abfd; - struct bfd_link_info *info ATTRIBUTE_UNUSED; - struct elf64_hppa_link_hash_table *hppa_info; +get_dlt (bfd *abfd, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + struct elf64_hppa_link_hash_table *hppa_info) { asection *dlt; bfd *dynobj; @@ -1352,10 +1264,9 @@ get_dlt (abfd, info, hppa_info) /* Create the stubs section. */ static bfd_boolean -get_stub (abfd, info, hppa_info) - bfd *abfd; - struct bfd_link_info *info ATTRIBUTE_UNUSED; - struct elf64_hppa_link_hash_table *hppa_info; +get_stub (bfd *abfd, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + struct elf64_hppa_link_hash_table *hppa_info) { asection *stub; bfd *dynobj; @@ -1425,22 +1336,21 @@ get_stub (abfd, info, hppa_info) EPLT relocations for symbols exported from shared libraries. */ static bfd_boolean -elf64_hppa_create_dynamic_sections (abfd, info) - bfd *abfd; - struct bfd_link_info *info; +elf64_hppa_create_dynamic_sections (bfd *abfd, + struct bfd_link_info *info) { asection *s; - if (! get_stub (abfd, info, elf64_hppa_hash_table (info))) + if (! get_stub (abfd, info, hppa_link_hash_table (info))) return FALSE; - if (! get_dlt (abfd, info, elf64_hppa_hash_table (info))) + if (! get_dlt (abfd, info, hppa_link_hash_table (info))) return FALSE; - if (! get_plt (abfd, info, elf64_hppa_hash_table (info))) + if (! get_plt (abfd, info, hppa_link_hash_table (info))) return FALSE; - if (! get_opd (abfd, info, elf64_hppa_hash_table (info))) + if (! get_opd (abfd, info, hppa_link_hash_table (info))) return FALSE; s = bfd_make_section_with_flags (abfd, ".rela.dlt", @@ -1452,7 +1362,7 @@ elf64_hppa_create_dynamic_sections (abfd, info) if (s == NULL || !bfd_set_section_alignment (abfd, s, 3)) return FALSE; - elf64_hppa_hash_table (info)->dlt_rel_sec = s; + hppa_link_hash_table (info)->dlt_rel_sec = s; s = bfd_make_section_with_flags (abfd, ".rela.plt", (SEC_ALLOC | SEC_LOAD @@ -1463,7 +1373,7 @@ elf64_hppa_create_dynamic_sections (abfd, info) if (s == NULL || !bfd_set_section_alignment (abfd, s, 3)) return FALSE; - elf64_hppa_hash_table (info)->plt_rel_sec = s; + hppa_link_hash_table (info)->plt_rel_sec = s; s = bfd_make_section_with_flags (abfd, ".rela.data", (SEC_ALLOC | SEC_LOAD @@ -1474,7 +1384,7 @@ elf64_hppa_create_dynamic_sections (abfd, info) if (s == NULL || !bfd_set_section_alignment (abfd, s, 3)) return FALSE; - elf64_hppa_hash_table (info)->other_rel_sec = s; + hppa_link_hash_table (info)->other_rel_sec = s; s = bfd_make_section_with_flags (abfd, ".rela.opd", (SEC_ALLOC | SEC_LOAD @@ -1485,7 +1395,7 @@ elf64_hppa_create_dynamic_sections (abfd, info) if (s == NULL || !bfd_set_section_alignment (abfd, s, 3)) return FALSE; - elf64_hppa_hash_table (info)->opd_rel_sec = s; + hppa_link_hash_table (info)->opd_rel_sec = s; return TRUE; } @@ -1494,17 +1404,16 @@ elf64_hppa_create_dynamic_sections (abfd, info) to be dynamic. */ static bfd_boolean -allocate_dynrel_entries (dyn_h, data) - struct elf64_hppa_dyn_hash_entry *dyn_h; - PTR data; +allocate_dynrel_entries (struct elf_link_hash_entry *eh, void *data) { + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); struct elf64_hppa_allocate_data *x = (struct elf64_hppa_allocate_data *)data; struct elf64_hppa_link_hash_table *hppa_info; struct elf64_hppa_dyn_reloc_entry *rent; bfd_boolean dynamic_symbol, shared; - hppa_info = elf64_hppa_hash_table (x->info); - dynamic_symbol = elf64_hppa_dynamic_symbol_p (dyn_h->h, x->info); + hppa_info = hppa_link_hash_table (x->info); + dynamic_symbol = elf64_hppa_dynamic_symbol_p (eh, x->info); shared = x->info->shared; /* We may need to allocate relocations for a non-dynamic symbol @@ -1514,11 +1423,11 @@ allocate_dynrel_entries (dyn_h, data) /* Take care of the normal data relocations. */ - for (rent = dyn_h->reloc_entries; rent; rent = rent->next) + for (rent = hh->reloc_entries; rent; rent = rent->next) { /* Allocate one iff we are building a shared library, the relocation isn't a R_PARISC_FPTR64, or we don't want an opd entry. */ - if (!shared && rent->type == R_PARISC_FPTR64 && dyn_h->want_opd) + if (!shared && rent->type == R_PARISC_FPTR64 && hh->want_opd) continue; hppa_info->other_rel_sec->size += sizeof (Elf64_External_Rela); @@ -1526,25 +1435,24 @@ allocate_dynrel_entries (dyn_h, data) /* Make sure this symbol gets into the dynamic symbol table if it is not already recorded. ?!? This should not be in the loop since the symbol need only be added once. */ - if (dyn_h->h == 0 - || (dyn_h->h->dynindx == -1 && dyn_h->h->type != STT_PARISC_MILLI)) + if (eh->dynindx == -1 && eh->type != STT_PARISC_MILLI) if (!bfd_elf_link_record_local_dynamic_symbol - (x->info, rent->sec->owner, dyn_h->sym_indx)) + (x->info, rent->sec->owner, hh->sym_indx)) return FALSE; } /* Take care of the GOT and PLT relocations. */ - if ((dynamic_symbol || shared) && dyn_h->want_dlt) + if ((dynamic_symbol || shared) && hh->want_dlt) hppa_info->dlt_rel_sec->size += sizeof (Elf64_External_Rela); /* If we are building a shared library, then every symbol that has an opd entry will need an EPLT relocation to relocate the symbol's address and __gp value based on the runtime load address. */ - if (shared && dyn_h->want_opd) + if (shared && hh->want_opd) hppa_info->opd_rel_sec->size += sizeof (Elf64_External_Rela); - if (dyn_h->want_plt && dynamic_symbol) + if (hh->want_plt && dynamic_symbol) { bfd_size_type t = 0; @@ -1566,9 +1474,8 @@ allocate_dynrel_entries (dyn_h, data) regular object. */ static bfd_boolean -elf64_hppa_adjust_dynamic_symbol (info, h) - struct bfd_link_info *info ATTRIBUTE_UNUSED; - struct elf_link_hash_entry *h; +elf64_hppa_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, + struct elf_link_hash_entry *eh) { /* ??? Undefined symbols with PLT entries should be re-defined to be the PLT entry. */ @@ -1576,12 +1483,12 @@ elf64_hppa_adjust_dynamic_symbol (info, h) /* If this is a weak symbol, and there is a real definition, the processor independent code will have arranged for us to see the real definition first, and we can just use the same value. */ - if (h->u.weakdef != NULL) + if (eh->u.weakdef != NULL) { - BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined - || h->u.weakdef->root.type == bfd_link_hash_defweak); - h->root.u.def.section = h->u.weakdef->root.u.def.section; - h->root.u.def.value = h->u.weakdef->root.u.def.value; + BFD_ASSERT (eh->u.weakdef->root.type == bfd_link_hash_defined + || eh->u.weakdef->root.type == bfd_link_hash_defweak); + eh->root.u.def.section = eh->u.weakdef->root.u.def.section; + eh->root.u.def.value = eh->u.weakdef->root.u.def.value; return TRUE; } @@ -1601,12 +1508,11 @@ elf64_hppa_adjust_dynamic_symbol (info, h) elf64_hppa_mark_exported_functions is called. */ static bfd_boolean -elf64_hppa_mark_milli_and_exported_functions (h, data) - struct elf_link_hash_entry *h; - PTR data; +elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *eh, + void *data) { + struct elf_link_hash_entry *elf = eh; struct bfd_link_info *info = (struct bfd_link_info *)data; - struct elf_link_hash_entry *elf = h; if (elf->root.type == bfd_link_hash_warning) elf = (struct elf_link_hash_entry *) elf->root.u.i.link; @@ -1622,26 +1528,25 @@ elf64_hppa_mark_milli_and_exported_functions (h, data) return TRUE; } - return elf64_hppa_mark_exported_functions (h, data); + return elf64_hppa_mark_exported_functions (eh, data); } /* Set the final sizes of the dynamic sections and allocate memory for the contents of our special sections. */ static bfd_boolean -elf64_hppa_size_dynamic_sections (output_bfd, info) - bfd *output_bfd; - struct bfd_link_info *info; +elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { + struct elf64_hppa_link_hash_table *hppa_info; + struct elf64_hppa_allocate_data data; bfd *dynobj; - asection *s; + bfd *ibfd; + asection *sec; bfd_boolean plt; bfd_boolean relocs; bfd_boolean reltext; - struct elf64_hppa_allocate_data data; - struct elf64_hppa_link_hash_table *hppa_info; - hppa_info = elf64_hppa_hash_table (info); + hppa_info = hppa_link_hash_table (info); dynobj = elf_hash_table (info)->dynobj; BFD_ASSERT (dynobj != NULL); @@ -1664,10 +1569,10 @@ elf64_hppa_size_dynamic_sections (output_bfd, info) /* Set the contents of the .interp section to the interpreter. */ if (info->executable) { - s = bfd_get_section_by_name (dynobj, ".interp"); - BFD_ASSERT (s != NULL); - s->size = sizeof ELF_DYNAMIC_INTERPRETER; - s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER; + sec = bfd_get_section_by_name (dynobj, ".interp"); + BFD_ASSERT (sec != NULL); + sec->size = sizeof ELF_DYNAMIC_INTERPRETER; + sec->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER; } } else @@ -1677,65 +1582,192 @@ elf64_hppa_size_dynamic_sections (output_bfd, info) not actually use these entries. Reset the size of .rela.dlt, which will cause it to get stripped from the output file below. */ - s = bfd_get_section_by_name (dynobj, ".rela.dlt"); - if (s != NULL) - s->size = 0; + sec = bfd_get_section_by_name (dynobj, ".rela.dlt"); + if (sec != NULL) + sec->size = 0; + } + + /* Set up DLT, PLT and OPD offsets for local syms, and space for local + dynamic relocs. */ + for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next) + { + bfd_signed_vma *local_dlt; + bfd_signed_vma *end_local_dlt; + bfd_signed_vma *local_plt; + bfd_signed_vma *end_local_plt; + bfd_signed_vma *local_opd; + bfd_signed_vma *end_local_opd; + bfd_size_type locsymcount; + Elf_Internal_Shdr *symtab_hdr; + asection *srel; + + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour) + continue; + + for (sec = ibfd->sections; sec != NULL; sec = sec->next) + { + struct elf64_hppa_dyn_reloc_entry *hdh_p; + + for (hdh_p = ((struct elf64_hppa_dyn_reloc_entry *) + elf_section_data (sec)->local_dynrel); + hdh_p != NULL; + hdh_p = hdh_p->next) + { + if (!bfd_is_abs_section (hdh_p->sec) + && bfd_is_abs_section (hdh_p->sec->output_section)) + { + /* Input section has been discarded, either because + it is a copy of a linkonce section or due to + linker script /DISCARD/, so we'll be discarding + the relocs too. */ + } + else if (hdh_p->count != 0) + { + srel = elf_section_data (hdh_p->sec)->sreloc; + srel->size += hdh_p->count * sizeof (Elf64_External_Rela); + if ((hdh_p->sec->output_section->flags & SEC_READONLY) != 0) + info->flags |= DF_TEXTREL; + } + } + } + + local_dlt = elf_local_got_refcounts (ibfd); + if (!local_dlt) + continue; + + symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; + locsymcount = symtab_hdr->sh_info; + end_local_dlt = local_dlt + locsymcount; + sec = hppa_info->dlt_sec; + srel = hppa_info->dlt_rel_sec; + for (; local_dlt < end_local_dlt; ++local_dlt) + { + if (*local_dlt > 0) + { + *local_dlt = sec->size; + sec->size += DLT_ENTRY_SIZE; + if (info->shared) + { + srel->size += sizeof (Elf64_External_Rela); + } + } + else + *local_dlt = (bfd_vma) -1; + } + + local_plt = end_local_dlt; + end_local_plt = local_plt + locsymcount; + if (! hppa_info->root.dynamic_sections_created) + { + /* Won't be used, but be safe. */ + for (; local_plt < end_local_plt; ++local_plt) + *local_plt = (bfd_vma) -1; + } + else + { + sec = hppa_info->plt_sec; + srel = hppa_info->plt_rel_sec; + for (; local_plt < end_local_plt; ++local_plt) + { + if (*local_plt > 0) + { + *local_plt = sec->size; + sec->size += PLT_ENTRY_SIZE; + if (info->shared) + srel->size += sizeof (Elf64_External_Rela); + } + else + *local_plt = (bfd_vma) -1; + } + } + + local_opd = end_local_plt; + end_local_opd = local_opd + locsymcount; + if (! hppa_info->root.dynamic_sections_created) + { + /* Won't be used, but be safe. */ + for (; local_opd < end_local_opd; ++local_opd) + *local_opd = (bfd_vma) -1; + } + else + { + sec = hppa_info->opd_sec; + srel = hppa_info->opd_rel_sec; + for (; local_opd < end_local_opd; ++local_opd) + { + if (*local_opd > 0) + { + *local_opd = sec->size; + sec->size += OPD_ENTRY_SIZE; + if (info->shared) + srel->size += sizeof (Elf64_External_Rela); + } + else + *local_opd = (bfd_vma) -1; + } + } } /* Allocate the GOT entries. */ data.info = info; - if (elf64_hppa_hash_table (info)->dlt_sec) + if (hppa_info->dlt_sec) { - data.ofs = 0x0; - elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table, - allocate_global_data_dlt, &data); + data.ofs = hppa_info->dlt_sec->size; + elf_link_hash_traverse (elf_hash_table (info), + allocate_global_data_dlt, &data); hppa_info->dlt_sec->size = data.ofs; + } - data.ofs = 0x0; - elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table, - allocate_global_data_plt, &data); + if (hppa_info->plt_sec) + { + data.ofs = hppa_info->plt_sec->size; + elf_link_hash_traverse (elf_hash_table (info), + allocate_global_data_plt, &data); hppa_info->plt_sec->size = data.ofs; + } + if (hppa_info->stub_sec) + { data.ofs = 0x0; - elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table, - allocate_global_data_stub, &data); + elf_link_hash_traverse (elf_hash_table (info), + allocate_global_data_stub, &data); hppa_info->stub_sec->size = data.ofs; } /* Allocate space for entries in the .opd section. */ - if (elf64_hppa_hash_table (info)->opd_sec) + if (hppa_info->opd_sec) { - data.ofs = 0; - elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table, - allocate_global_data_opd, &data); + data.ofs = hppa_info->opd_sec->size; + elf_link_hash_traverse (elf_hash_table (info), + allocate_global_data_opd, &data); hppa_info->opd_sec->size = data.ofs; } /* Now allocate space for dynamic relocations, if necessary. */ if (hppa_info->root.dynamic_sections_created) - elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table, - allocate_dynrel_entries, &data); + elf_link_hash_traverse (elf_hash_table (info), + allocate_dynrel_entries, &data); /* The sizes of all the sections are set. Allocate memory for them. */ plt = FALSE; relocs = FALSE; reltext = FALSE; - for (s = dynobj->sections; s != NULL; s = s->next) + for (sec = dynobj->sections; sec != NULL; sec = sec->next) { const char *name; - if ((s->flags & SEC_LINKER_CREATED) == 0) + if ((sec->flags & SEC_LINKER_CREATED) == 0) continue; /* It's OK to base decisions on the section name, because none of the dynobj section names depend upon the input files. */ - name = bfd_get_section_name (dynobj, s); + name = bfd_get_section_name (dynobj, sec); if (strcmp (name, ".plt") == 0) { /* Remember whether there is a PLT. */ - plt = s->size != 0; + plt = sec->size != 0; } else if (strcmp (name, ".opd") == 0 || CONST_STRNEQ (name, ".dlt") @@ -1746,7 +1778,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info) } else if (CONST_STRNEQ (name, ".rela")) { - if (s->size != 0) + if (sec->size != 0) { asection *target; @@ -1764,7 +1796,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info) really apply to the .got section, which we created ourselves and so know is not readonly. */ outname = bfd_get_section_name (output_bfd, - s->output_section); + sec->output_section); target = bfd_get_section_by_name (output_bfd, outname + 4); if (target != NULL && (target->flags & SEC_READONLY) != 0 @@ -1774,7 +1806,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info) /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ - s->reloc_count = 0; + sec->reloc_count = 0; } } else @@ -1783,7 +1815,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info) continue; } - if (s->size == 0) + if (sec->size == 0) { /* If we don't need this section, strip it from the output file. This is mostly to handle .rela.bss and @@ -1794,11 +1826,11 @@ elf64_hppa_size_dynamic_sections (output_bfd, info) adjust_dynamic_symbol is called, and it is that function which decides whether anything needs to go into these sections. */ - s->flags |= SEC_EXCLUDE; + sec->flags |= SEC_EXCLUDE; continue; } - if ((s->flags & SEC_HAS_CONTENTS) == 0) + if ((sec->flags & SEC_HAS_CONTENTS) == 0) continue; /* Allocate memory for the section contents if it has not @@ -1807,10 +1839,10 @@ elf64_hppa_size_dynamic_sections (output_bfd, info) contents are written out. This should not happen, but this way if it does, we get a R_PARISC_NONE reloc instead of garbage. */ - if (s->contents == NULL) + if (sec->contents == NULL) { - s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); - if (s->contents == NULL) + sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->size); + if (sec->contents == NULL) return FALSE; } } @@ -1882,28 +1914,19 @@ elf64_hppa_size_dynamic_sections (output_bfd, info) the symbols have their expected value in the normal symbol table. Ick. */ -static bfd_boolean -elf64_hppa_link_output_symbol_hook (info, name, sym, input_sec, h) - struct bfd_link_info *info; - const char *name; - Elf_Internal_Sym *sym; - asection *input_sec ATTRIBUTE_UNUSED; - struct elf_link_hash_entry *h; +static int +elf64_hppa_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, + const char *name, + Elf_Internal_Sym *sym, + asection *input_sec ATTRIBUTE_UNUSED, + struct elf_link_hash_entry *eh) { - struct elf64_hppa_link_hash_table *hppa_info; - struct elf64_hppa_dyn_hash_entry *dyn_h; + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); /* We may be called with the file symbol or section symbols. They never need munging, so it is safe to ignore them. */ - if (!name) - return TRUE; - - /* Get the PA dyn_symbol (if any) associated with NAME. */ - hppa_info = elf64_hppa_hash_table (info); - dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, - name, FALSE, FALSE); - if (!dyn_h || dyn_h->h != h) - return TRUE; + if (!name || !eh) + return 1; /* Function symbols for which we created .opd entries *may* have been munged by finish_dynamic_symbol and have to be un-munged here. @@ -1911,34 +1934,31 @@ elf64_hppa_link_output_symbol_hook (info, name, sym, input_sec, h) Note that finish_dynamic_symbol sometimes turns dynamic symbols into non-dynamic ones, so we initialize st_shndx to -1 in mark_exported_functions and check to see if it was overwritten - here instead of just checking dyn_h->h->dynindx. */ - if (dyn_h->want_opd && dyn_h->st_shndx != -1) + here instead of just checking eh->dynindx. */ + if (hh->want_opd && hh->st_shndx != -1) { /* Restore the saved value and section index. */ - sym->st_value = dyn_h->st_value; - sym->st_shndx = dyn_h->st_shndx; + sym->st_value = hh->st_value; + sym->st_shndx = hh->st_shndx; } - return TRUE; + return 1; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ static bfd_boolean -elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) - bfd *output_bfd; - struct bfd_link_info *info; - struct elf_link_hash_entry *h; - Elf_Internal_Sym *sym; +elf64_hppa_finish_dynamic_symbol (bfd *output_bfd, + struct bfd_link_info *info, + struct elf_link_hash_entry *eh, + Elf_Internal_Sym *sym) { + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); asection *stub, *splt, *sdlt, *sopd, *spltrel, *sdltrel; struct elf64_hppa_link_hash_table *hppa_info; - struct elf64_hppa_dyn_hash_entry *dyn_h; - hppa_info = elf64_hppa_hash_table (info); - dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, - h->root.root.string, FALSE, FALSE); + hppa_info = hppa_link_hash_table (info); stub = hppa_info->stub_sec; splt = hppa_info->plt_sec; @@ -1954,18 +1974,18 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) We will store a new value and section index into the symbol long enough to output it into the dynamic symbol table, then we restore the original values (in elf64_hppa_link_output_symbol_hook). */ - if (dyn_h && dyn_h->want_opd) + if (hh->want_opd) { BFD_ASSERT (sopd != NULL); /* Save away the original value and section index so that we can restore them later. */ - dyn_h->st_value = sym->st_value; - dyn_h->st_shndx = sym->st_shndx; + hh->st_value = sym->st_value; + hh->st_shndx = sym->st_shndx; /* For the dynamic symbol table entry, we want the value to be address of this symbol's entry within the .opd section. */ - sym->st_value = (dyn_h->opd_offset + sym->st_value = (hh->opd_offset + sopd->output_offset + sopd->output_section->vma); sym->st_shndx = _bfd_elf_section_from_bfd_section (output_bfd, @@ -1973,8 +1993,8 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) } /* Initialize a .plt entry if requested. */ - if (dyn_h && dyn_h->want_plt - && elf64_hppa_dynamic_symbol_p (dyn_h->h, info)) + if (hh->want_plt + && elf64_hppa_dynamic_symbol_p (eh, info)) { bfd_vma value; Elf_Internal_Rela rel; @@ -1986,10 +2006,10 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) if we are creating a shared library and the symbol is still undefined, we create a dynamic relocation to fill in the correct value. */ - if (info->shared && h->root.type == bfd_link_hash_undefined) + if (info->shared && eh->root.type == bfd_link_hash_undefined) value = 0; else - value = (h->root.u.def.value + h->root.u.def.section->vma); + value = (eh->root.u.def.value + eh->root.u.def.section->vma); /* Fill in the entry in the procedure linkage table. @@ -2002,9 +2022,9 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) We are modifying the in-memory PLT contents here, so we do not add in the output_offset of the PLT section. */ - bfd_put_64 (splt->owner, value, splt->contents + dyn_h->plt_offset); + bfd_put_64 (splt->owner, value, splt->contents + hh->plt_offset); value = _bfd_get_gp_value (splt->output_section->owner); - bfd_put_64 (splt->owner, value, splt->contents + dyn_h->plt_offset + 0x8); + bfd_put_64 (splt->owner, value, splt->contents + hh->plt_offset + 0x8); /* Create a dynamic IPLT relocation for this entry. @@ -2012,9 +2032,9 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) which is included within the DLT secton. So we do need to include the PLT's output_offset in the computation of the relocation's address. */ - rel.r_offset = (dyn_h->plt_offset + splt->output_offset + rel.r_offset = (hh->plt_offset + splt->output_offset + splt->output_section->vma); - rel.r_info = ELF64_R_INFO (h->dynindx, R_PARISC_IPLT); + rel.r_info = ELF64_R_INFO (hh->eh.dynindx, R_PARISC_IPLT); rel.r_addend = 0; loc = spltrel->contents; @@ -2023,8 +2043,8 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) } /* Initialize an external call stub entry if requested. */ - if (dyn_h && dyn_h->want_stub - && elf64_hppa_dynamic_symbol_p (dyn_h->h, info)) + if (hh->want_stub + && elf64_hppa_dynamic_symbol_p (eh, info)) { bfd_vma value; int insn; @@ -2036,7 +2056,7 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) We are modifying the contents of the stub section, so we do not need to include the stub section's output_offset here. */ - memcpy (stub->contents + dyn_h->stub_offset, plt_stub, sizeof (plt_stub)); + memcpy (stub->contents + hh->stub_offset, plt_stub, sizeof (plt_stub)); /* Fix up the first ldd instruction. @@ -2049,9 +2069,9 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) the same address as the start of the PLT section. gp_offset contains the offset of __gp within the PLT section. */ - value = dyn_h->plt_offset - hppa_info->gp_offset; + value = hh->plt_offset - hppa_info->gp_offset; - insn = bfd_get_32 (stub->owner, stub->contents + dyn_h->stub_offset); + insn = bfd_get_32 (stub->owner, stub->contents + hh->stub_offset); if (output_bfd->arch_info->mach >= 25) { /* Wide mode allows 16 bit offsets. */ @@ -2069,17 +2089,17 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) if ((value & 7) || value + max_offset >= 2*max_offset - 8) { (*_bfd_error_handler) (_("stub entry for %s cannot load .plt, dp offset = %ld"), - dyn_h->root.string, + hh->eh.root.root.string, (long) value); return FALSE; } bfd_put_32 (stub->owner, (bfd_vma) insn, - stub->contents + dyn_h->stub_offset); + stub->contents + hh->stub_offset); /* Fix up the second ldd instruction. */ value += 8; - insn = bfd_get_32 (stub->owner, stub->contents + dyn_h->stub_offset + 8); + insn = bfd_get_32 (stub->owner, stub->contents + hh->stub_offset + 8); if (output_bfd->arch_info->mach >= 25) { insn &= ~ 0xfff1; @@ -2091,7 +2111,7 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) insn |= re_assemble_14 ((int) value); } bfd_put_32 (stub->owner, (bfd_vma) insn, - stub->contents + dyn_h->stub_offset + 8); + stub->contents + hh->stub_offset + 8); } return TRUE; @@ -2101,21 +2121,19 @@ elf64_hppa_finish_dynamic_symbol (output_bfd, info, h, sym) exports. Initialize the FPTR entries. */ static bfd_boolean -elf64_hppa_finalize_opd (dyn_h, data) - struct elf64_hppa_dyn_hash_entry *dyn_h; - PTR data; +elf64_hppa_finalize_opd (struct elf_link_hash_entry *eh, void *data) { + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); struct bfd_link_info *info = (struct bfd_link_info *)data; struct elf64_hppa_link_hash_table *hppa_info; - struct elf_link_hash_entry *h = dyn_h ? dyn_h->h : NULL; asection *sopd; asection *sopdrel; - hppa_info = elf64_hppa_hash_table (info); + hppa_info = hppa_link_hash_table (info); sopd = hppa_info->opd_sec; sopdrel = hppa_info->opd_rel_sec; - if (h && dyn_h->want_opd) + if (hh->want_opd) { bfd_vma value; @@ -2123,24 +2141,24 @@ elf64_hppa_finalize_opd (dyn_h, data) We are modifying the contents of the OPD section in memory, so we do not need to include its output offset in this computation. */ - memset (sopd->contents + dyn_h->opd_offset, 0, 16); + memset (sopd->contents + hh->opd_offset, 0, 16); - value = (h->root.u.def.value - + h->root.u.def.section->output_section->vma - + h->root.u.def.section->output_offset); + value = (eh->root.u.def.value + + eh->root.u.def.section->output_section->vma + + eh->root.u.def.section->output_offset); /* The next word is the address of the function. */ - bfd_put_64 (sopd->owner, value, sopd->contents + dyn_h->opd_offset + 16); + bfd_put_64 (sopd->owner, value, sopd->contents + hh->opd_offset + 16); /* The last word is our local __gp value. */ value = _bfd_get_gp_value (sopd->output_section->owner); - bfd_put_64 (sopd->owner, value, sopd->contents + dyn_h->opd_offset + 24); + bfd_put_64 (sopd->owner, value, sopd->contents + hh->opd_offset + 24); } /* If we are generating a shared library, we must generate EPLT relocations for each entry in the .opd, even for static functions (they may have had their address taken). */ - if (info->shared && dyn_h && dyn_h->want_opd) + if (info->shared && hh->want_opd) { Elf_Internal_Rela rel; bfd_byte *loc; @@ -2149,16 +2167,16 @@ elf64_hppa_finalize_opd (dyn_h, data) /* We may need to do a relocation against a local symbol, in which case we have to look up it's dynamic symbol index off the local symbol hash table. */ - if (h && h->dynindx != -1) - dynindx = h->dynindx; + if (eh->dynindx != -1) + dynindx = eh->dynindx; else dynindx - = _bfd_elf_link_lookup_local_dynindx (info, dyn_h->owner, - dyn_h->sym_indx); + = _bfd_elf_link_lookup_local_dynindx (info, hh->owner, + hh->sym_indx); /* The offset of this relocation is the absolute address of the .opd entry for this symbol. */ - rel.r_offset = (dyn_h->opd_offset + sopd->output_offset + rel.r_offset = (hh->opd_offset + sopd->output_offset + sopd->output_section->vma); /* If H is non-null, then we have an external symbol. @@ -2188,14 +2206,14 @@ elf64_hppa_finalize_opd (dyn_h, data) We do have to play similar games for FPTR relocations in shared libraries, including those for static symbols. See the FPTR handling in elf64_hppa_finalize_dynreloc. */ - if (h) + if (eh) { char *new_name; struct elf_link_hash_entry *nh; - new_name = alloca (strlen (h->root.root.string) + 2); + new_name = alloca (strlen (eh->root.root.string) + 2); new_name[0] = '.'; - strcpy (new_name + 1, h->root.root.string); + strcpy (new_name + 1, eh->root.root.string); nh = elf_link_hash_lookup (elf_hash_table (info), new_name, TRUE, TRUE, FALSE); @@ -2221,16 +2239,14 @@ elf64_hppa_finalize_opd (dyn_h, data) we can not depend on finish_dynamic_symbol to initialize the .dlt. */ static bfd_boolean -elf64_hppa_finalize_dlt (dyn_h, data) - struct elf64_hppa_dyn_hash_entry *dyn_h; - PTR data; +elf64_hppa_finalize_dlt (struct elf_link_hash_entry *eh, void *data) { + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); struct bfd_link_info *info = (struct bfd_link_info *)data; struct elf64_hppa_link_hash_table *hppa_info; asection *sdlt, *sdltrel; - struct elf_link_hash_entry *h = dyn_h ? dyn_h->h : NULL; - hppa_info = elf64_hppa_hash_table (info); + hppa_info = hppa_link_hash_table (info); sdlt = hppa_info->dlt_sec; sdltrel = hppa_info->dlt_rel_sec; @@ -2239,7 +2255,7 @@ elf64_hppa_finalize_dlt (dyn_h, data) address, so there is no need to create a relocation. Just install the proper value into the DLT, note this shortcut can not be skipped when building a shared library. */ - if (! info->shared && h && dyn_h->want_dlt) + if (! info->shared && hh && hh->want_dlt) { bfd_vma value; @@ -2249,21 +2265,21 @@ elf64_hppa_finalize_dlt (dyn_h, data) We include the OPD's output offset in this computation as we are referring to an absolute address in the resulting object file. */ - if (dyn_h->want_opd) + if (hh->want_opd) { - value = (dyn_h->opd_offset + value = (hh->opd_offset + hppa_info->opd_sec->output_offset + hppa_info->opd_sec->output_section->vma); } - else if ((h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - && h->root.u.def.section) + else if ((eh->root.type == bfd_link_hash_defined + || eh->root.type == bfd_link_hash_defweak) + && eh->root.u.def.section) { - value = h->root.u.def.value + h->root.u.def.section->output_offset; - if (h->root.u.def.section->output_section) - value += h->root.u.def.section->output_section->vma; + value = eh->root.u.def.value + eh->root.u.def.section->output_offset; + if (eh->root.u.def.section->output_section) + value += eh->root.u.def.section->output_section->vma; else - value += h->root.u.def.section->vma; + value += eh->root.u.def.section->vma; } else /* We have an undefined function reference. */ @@ -2271,13 +2287,13 @@ elf64_hppa_finalize_dlt (dyn_h, data) /* We do not need to include the output offset of the DLT section here because we are modifying the in-memory contents. */ - bfd_put_64 (sdlt->owner, value, sdlt->contents + dyn_h->dlt_offset); + bfd_put_64 (sdlt->owner, value, sdlt->contents + hh->dlt_offset); } /* Create a relocation for the DLT entry associated with this symbol. When building a shared library the symbol does not have to be dynamic. */ - if (dyn_h->want_dlt - && (elf64_hppa_dynamic_symbol_p (dyn_h->h, info) || info->shared)) + if (hh->want_dlt + && (elf64_hppa_dynamic_symbol_p (eh, info) || info->shared)) { Elf_Internal_Rela rel; bfd_byte *loc; @@ -2286,19 +2302,19 @@ elf64_hppa_finalize_dlt (dyn_h, data) /* We may need to do a relocation against a local symbol, in which case we have to look up it's dynamic symbol index off the local symbol hash table. */ - if (h && h->dynindx != -1) - dynindx = h->dynindx; + if (eh && eh->dynindx != -1) + dynindx = eh->dynindx; else dynindx - = _bfd_elf_link_lookup_local_dynindx (info, dyn_h->owner, - dyn_h->sym_indx); + = _bfd_elf_link_lookup_local_dynindx (info, hh->owner, + hh->sym_indx); /* Create a dynamic relocation for this entry. Do include the output offset of the DLT entry since we need an absolute address in the resulting object file. */ - rel.r_offset = (dyn_h->dlt_offset + sdlt->output_offset + rel.r_offset = (hh->dlt_offset + sdlt->output_offset + sdlt->output_section->vma); - if (h && h->type == STT_FUNC) + if (eh && eh->type == STT_FUNC) rel.r_info = ELF64_R_INFO (dynindx, R_PARISC_FPTR64); else rel.r_info = ELF64_R_INFO (dynindx, R_PARISC_DIR64); @@ -2315,46 +2331,44 @@ elf64_hppa_finalize_dlt (dyn_h, data) for dynamic functions used to initialize static data. */ static bfd_boolean -elf64_hppa_finalize_dynreloc (dyn_h, data) - struct elf64_hppa_dyn_hash_entry *dyn_h; - PTR data; +elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *eh, + void *data) { + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); struct bfd_link_info *info = (struct bfd_link_info *)data; struct elf64_hppa_link_hash_table *hppa_info; - struct elf_link_hash_entry *h; int dynamic_symbol; - dynamic_symbol = elf64_hppa_dynamic_symbol_p (dyn_h->h, info); + dynamic_symbol = elf64_hppa_dynamic_symbol_p (eh, info); if (!dynamic_symbol && !info->shared) return TRUE; - if (dyn_h->reloc_entries) + if (hh->reloc_entries) { struct elf64_hppa_dyn_reloc_entry *rent; int dynindx; - hppa_info = elf64_hppa_hash_table (info); - h = dyn_h->h; + hppa_info = hppa_link_hash_table (info); /* We may need to do a relocation against a local symbol, in which case we have to look up it's dynamic symbol index off the local symbol hash table. */ - if (h && h->dynindx != -1) - dynindx = h->dynindx; + if (eh->dynindx != -1) + dynindx = eh->dynindx; else dynindx - = _bfd_elf_link_lookup_local_dynindx (info, dyn_h->owner, - dyn_h->sym_indx); + = _bfd_elf_link_lookup_local_dynindx (info, hh->owner, + hh->sym_indx); - for (rent = dyn_h->reloc_entries; rent; rent = rent->next) + for (rent = hh->reloc_entries; rent; rent = rent->next) { Elf_Internal_Rela rel; bfd_byte *loc; /* Allocate one iff we are building a shared library, the relocation isn't a R_PARISC_FPTR64, or we don't want an opd entry. */ - if (!info->shared && rent->type == R_PARISC_FPTR64 && dyn_h->want_opd) + if (!info->shared && rent->type == R_PARISC_FPTR64 && hh->want_opd) continue; /* Create a dynamic relocation for this entry. @@ -2384,12 +2398,12 @@ elf64_hppa_finalize_dynreloc (dyn_h, data) We use a section symbol recorded by check_relocs as the base symbol for the relocation. The addend is the difference between the section symbol and the address of the .opd entry. */ - if (info->shared && rent->type == R_PARISC_FPTR64 && dyn_h->want_opd) + if (info->shared && rent->type == R_PARISC_FPTR64 && hh->want_opd) { bfd_vma value, value2; /* First compute the address of the opd entry for this symbol. */ - value = (dyn_h->opd_offset + value = (hh->opd_offset + hppa_info->opd_sec->output_section->vma + hppa_info->opd_sec->output_offset); @@ -2432,8 +2446,7 @@ elf64_hppa_finalize_dynreloc (dyn_h, data) dynamic linker, before writing them out. */ static enum elf_reloc_type_class -elf64_hppa_reloc_type_class (rela) - const Elf_Internal_Rela *rela; +elf64_hppa_reloc_type_class (const Elf_Internal_Rela *rela) { if (ELF64_R_SYM (rela->r_info) == 0) return reloc_class_relative; @@ -2452,31 +2465,30 @@ elf64_hppa_reloc_type_class (rela) /* Finish up the dynamic sections. */ static bfd_boolean -elf64_hppa_finish_dynamic_sections (output_bfd, info) - bfd *output_bfd; - struct bfd_link_info *info; +elf64_hppa_finish_dynamic_sections (bfd *output_bfd, + struct bfd_link_info *info) { bfd *dynobj; asection *sdyn; struct elf64_hppa_link_hash_table *hppa_info; - hppa_info = elf64_hppa_hash_table (info); + hppa_info = hppa_link_hash_table (info); /* Finalize the contents of the .opd section. */ - elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table, - elf64_hppa_finalize_opd, - info); + elf_link_hash_traverse (elf_hash_table (info), + elf64_hppa_finalize_opd, + info); - elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table, - elf64_hppa_finalize_dynreloc, - info); + elf_link_hash_traverse (elf_hash_table (info), + elf64_hppa_finalize_dynreloc, + info); /* Finalize the contents of the .dlt section. */ dynobj = elf_hash_table (info)->dynobj; /* Finalize the contents of the .dlt section. */ - elf64_hppa_dyn_hash_traverse (&hppa_info->dyn_hash_table, - elf64_hppa_finalize_dlt, - info); + elf_link_hash_traverse (elf_hash_table (info), + elf64_hppa_finalize_dlt, + info); sdyn = bfd_get_section_by_name (dynobj, ".dynamic"); @@ -2638,7 +2650,7 @@ elf64_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) static int elf64_hppa_additional_program_headers (bfd *abfd, - struct bfd_link_info *info ATTRIBUTE_UNUSED) + struct bfd_link_info *info ATTRIBUTE_UNUSED) { asection *s; @@ -2718,9 +2730,8 @@ elf64_hppa_modify_segment_map (bfd *abfd, /* Called when writing out an object file to decide the type of a symbol. */ static int -elf64_hppa_elf_get_symbol_type (elf_sym, type) - Elf_Internal_Sym *elf_sym; - int type; +elf64_hppa_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, + int type) { if (ELF_ST_TYPE (elf_sym->st_info) == STT_PARISC_MILLI) return STT_PARISC_MILLI; @@ -2776,6 +2787,1201 @@ elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int index, return _bfd_elf_make_section_from_phdr (abfd, hdr, index, typename); } +/* Hook called by the linker routine which adds symbols from an object + file. HP's libraries define symbols with HP specific section + indices, which we have to handle. */ + +static bfd_boolean +elf_hppa_add_symbol_hook (bfd *abfd, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + Elf_Internal_Sym *sym, + const char **namep ATTRIBUTE_UNUSED, + flagword *flagsp ATTRIBUTE_UNUSED, + asection **secp, + bfd_vma *valp) +{ + unsigned int index = sym->st_shndx; + + switch (index) + { + case SHN_PARISC_ANSI_COMMON: + *secp = bfd_make_section_old_way (abfd, ".PARISC.ansi.common"); + (*secp)->flags |= SEC_IS_COMMON; + *valp = sym->st_size; + break; + + case SHN_PARISC_HUGE_COMMON: + *secp = bfd_make_section_old_way (abfd, ".PARISC.huge.common"); + (*secp)->flags |= SEC_IS_COMMON; + *valp = sym->st_size; + break; + } + + return TRUE; +} + +static bfd_boolean +elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h, + void *data) +{ + struct bfd_link_info *info = data; + + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + + /* If we are not creating a shared library, and this symbol is + referenced by a shared library but is not defined anywhere, then + the generic code will warn that it is undefined. + + This behavior is undesirable on HPs since the standard shared + libraries contain references to undefined symbols. + + So we twiddle the flags associated with such symbols so that they + will not trigger the warning. ?!? FIXME. This is horribly fragile. + + Ultimately we should have better controls over the generic ELF BFD + linker code. */ + if (! info->relocatable + && info->unresolved_syms_in_shared_libs != RM_IGNORE + && h->root.type == bfd_link_hash_undefined + && h->ref_dynamic + && !h->ref_regular) + { + h->ref_dynamic = 0; + h->pointer_equality_needed = 1; + } + + return TRUE; +} + +static bfd_boolean +elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h, + void *data) +{ + struct bfd_link_info *info = data; + + if (h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + + /* If we are not creating a shared library, and this symbol is + referenced by a shared library but is not defined anywhere, then + the generic code will warn that it is undefined. + + This behavior is undesirable on HPs since the standard shared + libraries contain references to undefined symbols. + + So we twiddle the flags associated with such symbols so that they + will not trigger the warning. ?!? FIXME. This is horribly fragile. + + Ultimately we should have better controls over the generic ELF BFD + linker code. */ + if (! info->relocatable + && info->unresolved_syms_in_shared_libs != RM_IGNORE + && h->root.type == bfd_link_hash_undefined + && !h->ref_dynamic + && !h->ref_regular + && h->pointer_equality_needed) + { + h->ref_dynamic = 1; + h->pointer_equality_needed = 0; + } + + return TRUE; +} + +static bfd_boolean +elf_hppa_is_dynamic_loader_symbol (const char *name) +{ + return (! strcmp (name, "__CPU_REVISION") + || ! strcmp (name, "__CPU_KEYBITS_1") + || ! strcmp (name, "__SYSTEM_ID_D") + || ! strcmp (name, "__FPU_MODEL") + || ! strcmp (name, "__FPU_REVISION") + || ! strcmp (name, "__ARGC") + || ! strcmp (name, "__ARGV") + || ! strcmp (name, "__ENVP") + || ! strcmp (name, "__TLS_SIZE_D") + || ! strcmp (name, "__LOAD_INFO") + || ! strcmp (name, "__systab")); +} + +/* Record the lowest address for the data and text segments. */ +static void +elf_hppa_record_segment_addrs (bfd *abfd, + asection *section, + void *data) +{ + struct elf64_hppa_link_hash_table *hppa_info = data; + + if ((section->flags & (SEC_ALLOC | SEC_LOAD)) == (SEC_ALLOC | SEC_LOAD)) + { + bfd_vma value; + Elf_Internal_Phdr *p; + + p = _bfd_elf_find_segment_containing_section (abfd, section->output_section); + BFD_ASSERT (p != NULL); + value = p->p_vaddr; + + if (section->flags & SEC_READONLY) + { + if (value < hppa_info->text_segment_base) + hppa_info->text_segment_base = value; + } + else + { + if (value < hppa_info->data_segment_base) + hppa_info->data_segment_base = value; + } + } +} + +/* Called after we have seen all the input files/sections, but before + final symbol resolution and section placement has been determined. + + We use this hook to (possibly) provide a value for __gp, then we + fall back to the generic ELF final link routine. */ + +static bfd_boolean +elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info) +{ + bfd_boolean retval; + struct elf64_hppa_link_hash_table *hppa_info = hppa_link_hash_table (info); + + if (! info->relocatable) + { + struct elf_link_hash_entry *gp; + bfd_vma gp_val; + + /* The linker script defines a value for __gp iff it was referenced + by one of the objects being linked. First try to find the symbol + in the hash table. If that fails, just compute the value __gp + should have had. */ + gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", FALSE, + FALSE, FALSE); + + if (gp) + { + + /* Adjust the value of __gp as we may want to slide it into the + .plt section so that the stubs can access PLT entries without + using an addil sequence. */ + gp->root.u.def.value += hppa_info->gp_offset; + + gp_val = (gp->root.u.def.section->output_section->vma + + gp->root.u.def.section->output_offset + + gp->root.u.def.value); + } + else + { + asection *sec; + + /* First look for a .plt section. If found, then __gp is the + address of the .plt + gp_offset. + + If no .plt is found, then look for .dlt, .opd and .data (in + that order) and set __gp to the base address of whichever + section is found first. */ + + sec = hppa_info->plt_sec; + if (sec && ! (sec->flags & SEC_EXCLUDE)) + gp_val = (sec->output_offset + + sec->output_section->vma + + hppa_info->gp_offset); + else + { + sec = hppa_info->dlt_sec; + if (!sec || (sec->flags & SEC_EXCLUDE)) + sec = hppa_info->opd_sec; + if (!sec || (sec->flags & SEC_EXCLUDE)) + sec = bfd_get_section_by_name (abfd, ".data"); + if (!sec || (sec->flags & SEC_EXCLUDE)) + gp_val = 0; + else + gp_val = sec->output_offset + sec->output_section->vma; + } + } + + /* Install whatever value we found/computed for __gp. */ + _bfd_set_gp_value (abfd, gp_val); + } + + /* We need to know the base of the text and data segments so that we + can perform SEGREL relocations. We will record the base addresses + when we encounter the first SEGREL relocation. */ + hppa_info->text_segment_base = (bfd_vma)-1; + hppa_info->data_segment_base = (bfd_vma)-1; + + /* HP's shared libraries have references to symbols that are not + defined anywhere. The generic ELF BFD linker code will complain + about such symbols. + + So we detect the losing case and arrange for the flags on the symbol + to indicate that it was never referenced. This keeps the generic + ELF BFD link code happy and appears to not create any secondary + problems. Ultimately we need a way to control the behavior of the + generic ELF BFD link code better. */ + elf_link_hash_traverse (elf_hash_table (info), + elf_hppa_unmark_useless_dynamic_symbols, + info); + + /* Invoke the regular ELF backend linker to do all the work. */ + retval = bfd_elf_final_link (abfd, info); + + elf_link_hash_traverse (elf_hash_table (info), + elf_hppa_remark_useless_dynamic_symbols, + info); + + /* If we're producing a final executable, sort the contents of the + unwind section. */ + if (retval) + retval = elf_hppa_sort_unwind (abfd); + + return retval; +} + +/* Relocate the given INSN. VALUE should be the actual value we want + to insert into the instruction, ie by this point we should not be + concerned with computing an offset relative to the DLT, PC, etc. + Instead this routine is meant to handle the bit manipulations needed + to insert the relocation into the given instruction. */ + +static int +elf_hppa_relocate_insn (int insn, int sym_value, unsigned int r_type) +{ + switch (r_type) + { + /* This is any 22 bit branch. In PA2.0 syntax it corresponds to + the "B" instruction. */ + case R_PARISC_PCREL22F: + case R_PARISC_PCREL22C: + return (insn & ~0x3ff1ffd) | re_assemble_22 (sym_value); + + /* This is any 12 bit branch. */ + case R_PARISC_PCREL12F: + return (insn & ~0x1ffd) | re_assemble_12 (sym_value); + + /* This is any 17 bit branch. In PA2.0 syntax it also corresponds + to the "B" instruction as well as BE. */ + case R_PARISC_PCREL17F: + case R_PARISC_DIR17F: + case R_PARISC_DIR17R: + case R_PARISC_PCREL17C: + case R_PARISC_PCREL17R: + return (insn & ~0x1f1ffd) | re_assemble_17 (sym_value); + + /* ADDIL or LDIL instructions. */ + case R_PARISC_DLTREL21L: + case R_PARISC_DLTIND21L: + case R_PARISC_LTOFF_FPTR21L: + case R_PARISC_PCREL21L: + case R_PARISC_LTOFF_TP21L: + case R_PARISC_DPREL21L: + case R_PARISC_PLTOFF21L: + case R_PARISC_DIR21L: + return (insn & ~0x1fffff) | re_assemble_21 (sym_value); + + /* LDO and integer loads/stores with 14 bit displacements. */ + case R_PARISC_DLTREL14R: + case R_PARISC_DLTREL14F: + case R_PARISC_DLTIND14R: + case R_PARISC_DLTIND14F: + case R_PARISC_LTOFF_FPTR14R: + case R_PARISC_PCREL14R: + case R_PARISC_PCREL14F: + case R_PARISC_LTOFF_TP14R: + case R_PARISC_LTOFF_TP14F: + case R_PARISC_DPREL14R: + case R_PARISC_DPREL14F: + case R_PARISC_PLTOFF14R: + case R_PARISC_PLTOFF14F: + case R_PARISC_DIR14R: + case R_PARISC_DIR14F: + return (insn & ~0x3fff) | low_sign_unext (sym_value, 14); + + /* PA2.0W LDO and integer loads/stores with 16 bit displacements. */ + case R_PARISC_LTOFF_FPTR16F: + case R_PARISC_PCREL16F: + case R_PARISC_LTOFF_TP16F: + case R_PARISC_GPREL16F: + case R_PARISC_PLTOFF16F: + case R_PARISC_DIR16F: + case R_PARISC_LTOFF16F: + return (insn & ~0xffff) | re_assemble_16 (sym_value); + + /* Doubleword loads and stores with a 14 bit displacement. */ + case R_PARISC_DLTREL14DR: + case R_PARISC_DLTIND14DR: + case R_PARISC_LTOFF_FPTR14DR: + case R_PARISC_LTOFF_FPTR16DF: + case R_PARISC_PCREL14DR: + case R_PARISC_PCREL16DF: + case R_PARISC_LTOFF_TP14DR: + case R_PARISC_LTOFF_TP16DF: + case R_PARISC_DPREL14DR: + case R_PARISC_GPREL16DF: + case R_PARISC_PLTOFF14DR: + case R_PARISC_PLTOFF16DF: + case R_PARISC_DIR14DR: + case R_PARISC_DIR16DF: + case R_PARISC_LTOFF16DF: + return (insn & ~0x3ff1) | (((sym_value & 0x2000) >> 13) + | ((sym_value & 0x1ff8) << 1)); + + /* Floating point single word load/store instructions. */ + case R_PARISC_DLTREL14WR: + case R_PARISC_DLTIND14WR: + case R_PARISC_LTOFF_FPTR14WR: + case R_PARISC_LTOFF_FPTR16WF: + case R_PARISC_PCREL14WR: + case R_PARISC_PCREL16WF: + case R_PARISC_LTOFF_TP14WR: + case R_PARISC_LTOFF_TP16WF: + case R_PARISC_DPREL14WR: + case R_PARISC_GPREL16WF: + case R_PARISC_PLTOFF14WR: + case R_PARISC_PLTOFF16WF: + case R_PARISC_DIR16WF: + case R_PARISC_DIR14WR: + case R_PARISC_LTOFF16WF: + return (insn & ~0x3ff9) | (((sym_value & 0x2000) >> 13) + | ((sym_value & 0x1ffc) << 1)); + + default: + return insn; + } +} + +/* Compute the value for a relocation (REL) during a final link stage, + then insert the value into the proper location in CONTENTS. + + VALUE is a tentative value for the relocation and may be overridden + and modified here based on the specific relocation to be performed. + + For example we do conversions for PC-relative branches in this routine + or redirection of calls to external routines to stubs. + + The work of actually applying the relocation is left to a helper + routine in an attempt to reduce the complexity and size of this + function. */ + +static bfd_reloc_status_type +elf_hppa_final_link_relocate (Elf_Internal_Rela *rel, + bfd *input_bfd, + bfd *output_bfd, + asection *input_section, + bfd_byte *contents, + bfd_vma value, + struct bfd_link_info *info, + asection *sym_sec, + struct elf_link_hash_entry *eh) +{ + struct elf64_hppa_link_hash_table *hppa_info = hppa_link_hash_table (info); + struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); + bfd_vma *local_offsets; + Elf_Internal_Shdr *symtab_hdr; + int insn; + bfd_vma max_branch_offset = 0; + bfd_vma offset = rel->r_offset; + bfd_signed_vma addend = rel->r_addend; + reloc_howto_type *howto = elf_hppa_howto_table + ELF_R_TYPE (rel->r_info); + unsigned int r_symndx = ELF_R_SYM (rel->r_info); + unsigned int r_type = howto->type; + bfd_byte *hit_data = contents + offset; + + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; + local_offsets = elf_local_got_offsets (input_bfd); + insn = bfd_get_32 (input_bfd, hit_data); + + switch (r_type) + { + case R_PARISC_NONE: + break; + + /* Basic function call support. + + Note for a call to a function defined in another dynamic library + we want to redirect the call to a stub. */ + + /* PC relative relocs without an implicit offset. */ + case R_PARISC_PCREL21L: + case R_PARISC_PCREL14R: + case R_PARISC_PCREL14F: + case R_PARISC_PCREL14WR: + case R_PARISC_PCREL14DR: + case R_PARISC_PCREL16F: + case R_PARISC_PCREL16WF: + case R_PARISC_PCREL16DF: + { + /* If this is a call to a function defined in another dynamic + library, then redirect the call to the local stub for this + function. */ + if (sym_sec == NULL || sym_sec->output_section == NULL) + value = (hh->stub_offset + hppa_info->stub_sec->output_offset + + hppa_info->stub_sec->output_section->vma); + + /* Turn VALUE into a proper PC relative address. */ + value -= (offset + input_section->output_offset + + input_section->output_section->vma); + + /* Adjust for any field selectors. */ + if (r_type == R_PARISC_PCREL21L) + value = hppa_field_adjust (value, -8 + addend, e_lsel); + else if (r_type == R_PARISC_PCREL14F + || r_type == R_PARISC_PCREL16F + || r_type == R_PARISC_PCREL16WF + || r_type == R_PARISC_PCREL16DF) + value = hppa_field_adjust (value, -8 + addend, e_fsel); + else + value = hppa_field_adjust (value, -8 + addend, e_rsel); + + /* Apply the relocation to the given instruction. */ + insn = elf_hppa_relocate_insn (insn, (int) value, r_type); + break; + } + + case R_PARISC_PCREL12F: + case R_PARISC_PCREL22F: + case R_PARISC_PCREL17F: + case R_PARISC_PCREL22C: + case R_PARISC_PCREL17C: + case R_PARISC_PCREL17R: + { + /* If this is a call to a function defined in another dynamic + library, then redirect the call to the local stub for this + function. */ + if (sym_sec == NULL || sym_sec->output_section == NULL) + value = (hh->stub_offset + hppa_info->stub_sec->output_offset + + hppa_info->stub_sec->output_section->vma); + + /* Turn VALUE into a proper PC relative address. */ + value -= (offset + input_section->output_offset + + input_section->output_section->vma); + addend -= 8; + + if (r_type == (unsigned int) R_PARISC_PCREL22F) + max_branch_offset = (1 << (22-1)) << 2; + else if (r_type == (unsigned int) R_PARISC_PCREL17F) + max_branch_offset = (1 << (17-1)) << 2; + else if (r_type == (unsigned int) R_PARISC_PCREL12F) + max_branch_offset = (1 << (12-1)) << 2; + + /* Make sure we can reach the branch target. */ + if (max_branch_offset != 0 + && value + addend + max_branch_offset >= 2*max_branch_offset) + { + (*_bfd_error_handler) + (_("%B(%A+0x%lx): cannot reach %s"), + input_bfd, + input_section, + offset, + eh->root.root.string); + bfd_set_error (bfd_error_bad_value); + return bfd_reloc_notsupported; + } + + /* Adjust for any field selectors. */ + if (r_type == R_PARISC_PCREL17R) + value = hppa_field_adjust (value, addend, e_rsel); + else + value = hppa_field_adjust (value, addend, e_fsel); + + /* All branches are implicitly shifted by 2 places. */ + value >>= 2; + + /* Apply the relocation to the given instruction. */ + insn = elf_hppa_relocate_insn (insn, (int) value, r_type); + break; + } + + /* Indirect references to data through the DLT. */ + case R_PARISC_DLTIND14R: + case R_PARISC_DLTIND14F: + case R_PARISC_DLTIND14DR: + case R_PARISC_DLTIND14WR: + case R_PARISC_DLTIND21L: + case R_PARISC_LTOFF_FPTR14R: + case R_PARISC_LTOFF_FPTR14DR: + case R_PARISC_LTOFF_FPTR14WR: + case R_PARISC_LTOFF_FPTR21L: + case R_PARISC_LTOFF_FPTR16F: + case R_PARISC_LTOFF_FPTR16WF: + case R_PARISC_LTOFF_FPTR16DF: + case R_PARISC_LTOFF_TP21L: + case R_PARISC_LTOFF_TP14R: + case R_PARISC_LTOFF_TP14F: + case R_PARISC_LTOFF_TP14WR: + case R_PARISC_LTOFF_TP14DR: + case R_PARISC_LTOFF_TP16F: + case R_PARISC_LTOFF_TP16WF: + case R_PARISC_LTOFF_TP16DF: + case R_PARISC_LTOFF16F: + case R_PARISC_LTOFF16WF: + case R_PARISC_LTOFF16DF: + { + bfd_vma off; + + /* If this relocation was against a local symbol, then we still + have not set up the DLT entry (it's not convenient to do so + in the "finalize_dlt" routine because it is difficult to get + to the local symbol's value). + + So, if this is a local symbol (h == NULL), then we need to + fill in its DLT entry. + + Similarly we may still need to set up an entry in .opd for + a local function which had its address taken. */ + if (hh == NULL) + { + bfd_vma *local_opd_offsets, *local_dlt_offsets; + + if (local_offsets == NULL) + abort (); + + /* Now do .opd creation if needed. */ + if (r_type == R_PARISC_LTOFF_FPTR14R + || r_type == R_PARISC_LTOFF_FPTR14DR + || r_type == R_PARISC_LTOFF_FPTR14WR + || r_type == R_PARISC_LTOFF_FPTR21L + || r_type == R_PARISC_LTOFF_FPTR16F + || r_type == R_PARISC_LTOFF_FPTR16WF + || r_type == R_PARISC_LTOFF_FPTR16DF) + { + local_opd_offsets = local_offsets + 2 * symtab_hdr->sh_info; + off = local_opd_offsets[r_symndx]; + + /* The last bit records whether we've already initialised + this local .opd entry. */ + if ((off & 1) != 0) + { + BFD_ASSERT (off != (bfd_vma) -1); + off &= ~1; + } + else + { + local_opd_offsets[r_symndx] |= 1; + + /* The first two words of an .opd entry are zero. */ + memset (hppa_info->opd_sec->contents + off, 0, 16); + + /* The next word is the address of the function. */ + bfd_put_64 (hppa_info->opd_sec->owner, value + addend, + (hppa_info->opd_sec->contents + off + 16)); + + /* The last word is our local __gp value. */ + value = _bfd_get_gp_value + (hppa_info->opd_sec->output_section->owner); + bfd_put_64 (hppa_info->opd_sec->owner, value, + (hppa_info->opd_sec->contents + off + 24)); + } + + /* The DLT value is the address of the .opd entry. */ + value = (off + + hppa_info->opd_sec->output_offset + + hppa_info->opd_sec->output_section->vma); + addend = 0; + } + + local_dlt_offsets = local_offsets; + off = local_dlt_offsets[r_symndx]; + + if ((off & 1) != 0) + { + BFD_ASSERT (off != (bfd_vma) -1); + off &= ~1; + } + else + { + local_dlt_offsets[r_symndx] |= 1; + bfd_put_64 (hppa_info->dlt_sec->owner, + value + addend, + hppa_info->dlt_sec->contents + off); + } + } + else + off = hh->dlt_offset; + + /* We want the value of the DLT offset for this symbol, not + the symbol's actual address. Note that __gp may not point + to the start of the DLT, so we have to compute the absolute + address, then subtract out the value of __gp. */ + value = (off + + hppa_info->dlt_sec->output_offset + + hppa_info->dlt_sec->output_section->vma); + value -= _bfd_get_gp_value (output_bfd); + + /* All DLTIND relocations are basically the same at this point, + except that we need different field selectors for the 21bit + version vs the 14bit versions. */ + if (r_type == R_PARISC_DLTIND21L + || r_type == R_PARISC_LTOFF_FPTR21L + || r_type == R_PARISC_LTOFF_TP21L) + value = hppa_field_adjust (value, 0, e_lsel); + else if (r_type == R_PARISC_DLTIND14F + || r_type == R_PARISC_LTOFF_FPTR16F + || r_type == R_PARISC_LTOFF_FPTR16WF + || r_type == R_PARISC_LTOFF_FPTR16DF + || r_type == R_PARISC_LTOFF16F + || r_type == R_PARISC_LTOFF16DF + || r_type == R_PARISC_LTOFF16WF + || r_type == R_PARISC_LTOFF_TP16F + || r_type == R_PARISC_LTOFF_TP16WF + || r_type == R_PARISC_LTOFF_TP16DF) + value = hppa_field_adjust (value, 0, e_fsel); + else + value = hppa_field_adjust (value, 0, e_rsel); + + insn = elf_hppa_relocate_insn (insn, (int) value, r_type); + break; + } + + case R_PARISC_DLTREL14R: + case R_PARISC_DLTREL14F: + case R_PARISC_DLTREL14DR: + case R_PARISC_DLTREL14WR: + case R_PARISC_DLTREL21L: + case R_PARISC_DPREL21L: + case R_PARISC_DPREL14WR: + case R_PARISC_DPREL14DR: + case R_PARISC_DPREL14R: + case R_PARISC_DPREL14F: + case R_PARISC_GPREL16F: + case R_PARISC_GPREL16WF: + case R_PARISC_GPREL16DF: + { + /* Subtract out the global pointer value to make value a DLT + relative address. */ + value -= _bfd_get_gp_value (output_bfd); + + /* All DLTREL relocations are basically the same at this point, + except that we need different field selectors for the 21bit + version vs the 14bit versions. */ + if (r_type == R_PARISC_DLTREL21L + || r_type == R_PARISC_DPREL21L) + value = hppa_field_adjust (value, addend, e_lrsel); + else if (r_type == R_PARISC_DLTREL14F + || r_type == R_PARISC_DPREL14F + || r_type == R_PARISC_GPREL16F + || r_type == R_PARISC_GPREL16WF + || r_type == R_PARISC_GPREL16DF) + value = hppa_field_adjust (value, addend, e_fsel); + else + value = hppa_field_adjust (value, addend, e_rrsel); + + insn = elf_hppa_relocate_insn (insn, (int) value, r_type); + break; + } + + case R_PARISC_DIR21L: + case R_PARISC_DIR17R: + case R_PARISC_DIR17F: + case R_PARISC_DIR14R: + case R_PARISC_DIR14F: + case R_PARISC_DIR14WR: + case R_PARISC_DIR14DR: + case R_PARISC_DIR16F: + case R_PARISC_DIR16WF: + case R_PARISC_DIR16DF: + { + /* All DIR relocations are basically the same at this point, + except that branch offsets need to be divided by four, and + we need different field selectors. Note that we don't + redirect absolute calls to local stubs. */ + + if (r_type == R_PARISC_DIR21L) + value = hppa_field_adjust (value, addend, e_lrsel); + else if (r_type == R_PARISC_DIR17F + || r_type == R_PARISC_DIR16F + || r_type == R_PARISC_DIR16WF + || r_type == R_PARISC_DIR16DF + || r_type == R_PARISC_DIR14F) + value = hppa_field_adjust (value, addend, e_fsel); + else + value = hppa_field_adjust (value, addend, e_rrsel); + + if (r_type == R_PARISC_DIR17R || r_type == R_PARISC_DIR17F) + /* All branches are implicitly shifted by 2 places. */ + value >>= 2; + + insn = elf_hppa_relocate_insn (insn, (int) value, r_type); + break; + } + + case R_PARISC_PLTOFF21L: + case R_PARISC_PLTOFF14R: + case R_PARISC_PLTOFF14F: + case R_PARISC_PLTOFF14WR: + case R_PARISC_PLTOFF14DR: + case R_PARISC_PLTOFF16F: + case R_PARISC_PLTOFF16WF: + case R_PARISC_PLTOFF16DF: + { + /* We want the value of the PLT offset for this symbol, not + the symbol's actual address. Note that __gp may not point + to the start of the DLT, so we have to compute the absolute + address, then subtract out the value of __gp. */ + value = (hh->plt_offset + + hppa_info->plt_sec->output_offset + + hppa_info->plt_sec->output_section->vma); + value -= _bfd_get_gp_value (output_bfd); + + /* All PLTOFF relocations are basically the same at this point, + except that we need different field selectors for the 21bit + version vs the 14bit versions. */ + if (r_type == R_PARISC_PLTOFF21L) + value = hppa_field_adjust (value, addend, e_lrsel); + else if (r_type == R_PARISC_PLTOFF14F + || r_type == R_PARISC_PLTOFF16F + || r_type == R_PARISC_PLTOFF16WF + || r_type == R_PARISC_PLTOFF16DF) + value = hppa_field_adjust (value, addend, e_fsel); + else + value = hppa_field_adjust (value, addend, e_rrsel); + + insn = elf_hppa_relocate_insn (insn, (int) value, r_type); + break; + } + + case R_PARISC_LTOFF_FPTR32: + { + /* We may still need to create the FPTR itself if it was for + a local symbol. */ + if (hh == NULL) + { + /* The first two words of an .opd entry are zero. */ + memset (hppa_info->opd_sec->contents + hh->opd_offset, 0, 16); + + /* The next word is the address of the function. */ + bfd_put_64 (hppa_info->opd_sec->owner, value + addend, + (hppa_info->opd_sec->contents + + hh->opd_offset + 16)); + + /* The last word is our local __gp value. */ + value = _bfd_get_gp_value + (hppa_info->opd_sec->output_section->owner); + bfd_put_64 (hppa_info->opd_sec->owner, value, + hppa_info->opd_sec->contents + hh->opd_offset + 24); + + /* The DLT value is the address of the .opd entry. */ + value = (hh->opd_offset + + hppa_info->opd_sec->output_offset + + hppa_info->opd_sec->output_section->vma); + + bfd_put_64 (hppa_info->dlt_sec->owner, + value, + hppa_info->dlt_sec->contents + hh->dlt_offset); + } + + /* We want the value of the DLT offset for this symbol, not + the symbol's actual address. Note that __gp may not point + to the start of the DLT, so we have to compute the absolute + address, then subtract out the value of __gp. */ + value = (hh->dlt_offset + + hppa_info->dlt_sec->output_offset + + hppa_info->dlt_sec->output_section->vma); + value -= _bfd_get_gp_value (output_bfd); + bfd_put_32 (input_bfd, value, hit_data); + return bfd_reloc_ok; + } + + case R_PARISC_LTOFF_FPTR64: + case R_PARISC_LTOFF_TP64: + { + /* We may still need to create the FPTR itself if it was for + a local symbol. */ + if (eh == NULL && r_type == R_PARISC_LTOFF_FPTR64) + { + /* The first two words of an .opd entry are zero. */ + memset (hppa_info->opd_sec->contents + hh->opd_offset, 0, 16); + + /* The next word is the address of the function. */ + bfd_put_64 (hppa_info->opd_sec->owner, value + addend, + (hppa_info->opd_sec->contents + + hh->opd_offset + 16)); + + /* The last word is our local __gp value. */ + value = _bfd_get_gp_value + (hppa_info->opd_sec->output_section->owner); + bfd_put_64 (hppa_info->opd_sec->owner, value, + hppa_info->opd_sec->contents + hh->opd_offset + 24); + + /* The DLT value is the address of the .opd entry. */ + value = (hh->opd_offset + + hppa_info->opd_sec->output_offset + + hppa_info->opd_sec->output_section->vma); + + bfd_put_64 (hppa_info->dlt_sec->owner, + value, + hppa_info->dlt_sec->contents + hh->dlt_offset); + } + + /* We want the value of the DLT offset for this symbol, not + the symbol's actual address. Note that __gp may not point + to the start of the DLT, so we have to compute the absolute + address, then subtract out the value of __gp. */ + value = (hh->dlt_offset + + hppa_info->dlt_sec->output_offset + + hppa_info->dlt_sec->output_section->vma); + value -= _bfd_get_gp_value (output_bfd); + bfd_put_64 (input_bfd, value, hit_data); + return bfd_reloc_ok; + } + + case R_PARISC_DIR32: + bfd_put_32 (input_bfd, value + addend, hit_data); + return bfd_reloc_ok; + + case R_PARISC_DIR64: + bfd_put_64 (input_bfd, value + addend, hit_data); + return bfd_reloc_ok; + + case R_PARISC_GPREL64: + /* Subtract out the global pointer value to make value a DLT + relative address. */ + value -= _bfd_get_gp_value (output_bfd); + + bfd_put_64 (input_bfd, value + addend, hit_data); + return bfd_reloc_ok; + + case R_PARISC_LTOFF64: + /* We want the value of the DLT offset for this symbol, not + the symbol's actual address. Note that __gp may not point + to the start of the DLT, so we have to compute the absolute + address, then subtract out the value of __gp. */ + value = (hh->dlt_offset + + hppa_info->dlt_sec->output_offset + + hppa_info->dlt_sec->output_section->vma); + value -= _bfd_get_gp_value (output_bfd); + + bfd_put_64 (input_bfd, value + addend, hit_data); + return bfd_reloc_ok; + + case R_PARISC_PCREL32: + { + /* If this is a call to a function defined in another dynamic + library, then redirect the call to the local stub for this + function. */ + if (sym_sec == NULL || sym_sec->output_section == NULL) + value = (hh->stub_offset + hppa_info->stub_sec->output_offset + + hppa_info->stub_sec->output_section->vma); + + /* Turn VALUE into a proper PC relative address. */ + value -= (offset + input_section->output_offset + + input_section->output_section->vma); + + value += addend; + value -= 8; + bfd_put_32 (input_bfd, value, hit_data); + return bfd_reloc_ok; + } + + case R_PARISC_PCREL64: + { + /* If this is a call to a function defined in another dynamic + library, then redirect the call to the local stub for this + function. */ + if (sym_sec == NULL || sym_sec->output_section == NULL) + value = (hh->stub_offset + hppa_info->stub_sec->output_offset + + hppa_info->stub_sec->output_section->vma); + + /* Turn VALUE into a proper PC relative address. */ + value -= (offset + input_section->output_offset + + input_section->output_section->vma); + + value += addend; + value -= 8; + bfd_put_64 (input_bfd, value, hit_data); + return bfd_reloc_ok; + } + + case R_PARISC_FPTR64: + { + bfd_vma off; + + /* We may still need to create the FPTR itself if it was for + a local symbol. */ + if (hh == NULL) + { + bfd_vma *local_opd_offsets; + + if (local_offsets == NULL) + abort (); + + local_opd_offsets = local_offsets + 2 * symtab_hdr->sh_info; + off = local_opd_offsets[r_symndx]; + + /* The last bit records whether we've already initialised + this local .opd entry. */ + if ((off & 1) != 0) + { + BFD_ASSERT (off != (bfd_vma) -1); + off &= ~1; + } + else + { + /* The first two words of an .opd entry are zero. */ + memset (hppa_info->opd_sec->contents + off, 0, 16); + + /* The next word is the address of the function. */ + bfd_put_64 (hppa_info->opd_sec->owner, value + addend, + (hppa_info->opd_sec->contents + off + 16)); + + /* The last word is our local __gp value. */ + value = _bfd_get_gp_value + (hppa_info->opd_sec->output_section->owner); + bfd_put_64 (hppa_info->opd_sec->owner, value, + hppa_info->opd_sec->contents + off + 24); + } + } + else + off = hh->opd_offset; + + if (hh == NULL || hh->want_opd) + /* We want the value of the OPD offset for this symbol. */ + value = (off + + hppa_info->opd_sec->output_offset + + hppa_info->opd_sec->output_section->vma); + else + /* We want the address of the symbol. */ + value += addend; + + bfd_put_64 (input_bfd, value, hit_data); + return bfd_reloc_ok; + } + + case R_PARISC_SECREL32: + if (sym_sec) + value -= sym_sec->output_section->vma; + bfd_put_32 (input_bfd, value + addend, hit_data); + return bfd_reloc_ok; + + case R_PARISC_SEGREL32: + case R_PARISC_SEGREL64: + { + /* If this is the first SEGREL relocation, then initialize + the segment base values. */ + if (hppa_info->text_segment_base == (bfd_vma) -1) + bfd_map_over_sections (output_bfd, elf_hppa_record_segment_addrs, + hppa_info); + + /* VALUE holds the absolute address. We want to include the + addend, then turn it into a segment relative address. + + The segment is derived from SYM_SEC. We assume that there are + only two segments of note in the resulting executable/shlib. + A readonly segment (.text) and a readwrite segment (.data). */ + value += addend; + + if (sym_sec->flags & SEC_CODE) + value -= hppa_info->text_segment_base; + else + value -= hppa_info->data_segment_base; + + if (r_type == R_PARISC_SEGREL32) + bfd_put_32 (input_bfd, value, hit_data); + else + bfd_put_64 (input_bfd, value, hit_data); + return bfd_reloc_ok; + } + + /* Something we don't know how to handle. */ + default: + return bfd_reloc_notsupported; + } + + /* Update the instruction word. */ + bfd_put_32 (input_bfd, (bfd_vma) insn, hit_data); + return bfd_reloc_ok; +} + +/* Relocate an HPPA ELF section. */ + +static bfd_boolean +elf64_hppa_relocate_section (bfd *output_bfd, + struct bfd_link_info *info, + bfd *input_bfd, + asection *input_section, + bfd_byte *contents, + Elf_Internal_Rela *relocs, + Elf_Internal_Sym *local_syms, + asection **local_sections) +{ + Elf_Internal_Shdr *symtab_hdr; + Elf_Internal_Rela *rel; + Elf_Internal_Rela *relend; + struct elf64_hppa_link_hash_table *hppa_info; + + hppa_info = hppa_link_hash_table (info); + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; + + rel = relocs; + relend = relocs + input_section->reloc_count; + for (; rel < relend; rel++) + { + int r_type; + reloc_howto_type *howto = elf_hppa_howto_table + ELF_R_TYPE (rel->r_info); + unsigned long r_symndx; + struct elf_link_hash_entry *eh; + Elf_Internal_Sym *sym; + asection *sym_sec; + bfd_vma relocation; + bfd_reloc_status_type r; + bfd_boolean warned_undef; + + r_type = ELF_R_TYPE (rel->r_info); + if (r_type < 0 || r_type >= (int) R_PARISC_UNIMPLEMENTED) + { + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + if (r_type == (unsigned int) R_PARISC_GNU_VTENTRY + || r_type == (unsigned int) R_PARISC_GNU_VTINHERIT) + continue; + + /* This is a final link. */ + r_symndx = ELF_R_SYM (rel->r_info); + eh = NULL; + sym = NULL; + sym_sec = NULL; + warned_undef = FALSE; + if (r_symndx < symtab_hdr->sh_info) + { + /* This is a local symbol, hh defaults to NULL. */ + sym = local_syms + r_symndx; + sym_sec = local_sections[r_symndx]; + relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel); + } + else + { + /* This is not a local symbol. */ + bfd_boolean unresolved_reloc; + struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); + + /* It seems this can happen with erroneous or unsupported + input (mixing a.out and elf in an archive, for example.) */ + if (sym_hashes == NULL) + return FALSE; + + eh = sym_hashes[r_symndx - symtab_hdr->sh_info]; + + while (eh->root.type == bfd_link_hash_indirect + || eh->root.type == bfd_link_hash_warning) + eh = (struct elf_link_hash_entry *) eh->root.u.i.link; + + warned_undef = FALSE; + unresolved_reloc = FALSE; + relocation = 0; + if (eh->root.type == bfd_link_hash_defined + || eh->root.type == bfd_link_hash_defweak) + { + sym_sec = eh->root.u.def.section; + if (sym_sec == NULL + || sym_sec->output_section == NULL) + /* Set a flag that will be cleared later if we find a + relocation value for this symbol. output_section + is typically NULL for symbols satisfied by a shared + library. */ + unresolved_reloc = TRUE; + else + relocation = (eh->root.u.def.value + + sym_sec->output_section->vma + + sym_sec->output_offset); + } + else if (eh->root.type == bfd_link_hash_undefweak) + ; + else if (info->unresolved_syms_in_objects == RM_IGNORE + && ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT) + ; + else if (!info->relocatable + && elf_hppa_is_dynamic_loader_symbol (eh->root.root.string)) + continue; + else if (!info->relocatable) + { + bfd_boolean err; + err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR + || ELF_ST_VISIBILITY (eh->other) != STV_DEFAULT); + if (!info->callbacks->undefined_symbol (info, + eh->root.root.string, + input_bfd, + input_section, + rel->r_offset, err)) + return FALSE; + warned_undef = TRUE; + } + + if (!info->relocatable + && relocation == 0 + && eh->root.type != bfd_link_hash_defined + && eh->root.type != bfd_link_hash_defweak + && eh->root.type != bfd_link_hash_undefweak) + { + if (info->unresolved_syms_in_objects == RM_IGNORE + && ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT + && eh->type == STT_PARISC_MILLI) + { + if (! info->callbacks->undefined_symbol + (info, eh_name (eh), input_bfd, + input_section, rel->r_offset, FALSE)) + return FALSE; + warned_undef = TRUE; + } + } + } + + if (sym_sec != NULL && elf_discarded_section (sym_sec)) + { + /* For relocs against symbols from removed linkonce sections, + or sections discarded by a linker script, we just want the + section contents zeroed. Avoid any special processing. */ + _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset); + rel->r_info = 0; + rel->r_addend = 0; + continue; + } + + if (info->relocatable) + continue; + + r = elf_hppa_final_link_relocate (rel, input_bfd, output_bfd, + input_section, contents, + relocation, info, sym_sec, + eh); + + if (r != bfd_reloc_ok) + { + switch (r) + { + default: + abort (); + case bfd_reloc_overflow: + { + const char *sym_name; + + if (eh != NULL) + sym_name = NULL; + else + { + sym_name = bfd_elf_string_from_elf_section (input_bfd, + symtab_hdr->sh_link, + sym->st_name); + if (sym_name == NULL) + return FALSE; + if (*sym_name == '\0') + sym_name = bfd_section_name (input_bfd, sym_sec); + } + + if (!((*info->callbacks->reloc_overflow) + (info, (eh ? &eh->root : NULL), sym_name, + howto->name, (bfd_vma) 0, input_bfd, + input_section, rel->r_offset))) + return FALSE; + } + break; + } + } + } + return TRUE; +} + static const struct bfd_elf_special_section elf64_hppa_special_sections[] = { { STRING_COMMA_LEN (".fini"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, diff --git a/cegcc/src/binutils/bfd/elf64-hppa.h b/cegcc/src/binutils/bfd/elf64-hppa.h index 1959c17de..addbd81d1 100644 --- a/cegcc/src/binutils/bfd/elf64-hppa.h +++ b/cegcc/src/binutils/bfd/elf64-hppa.h @@ -1,6 +1,6 @@ /* ELF64/HPPA support - Copyright 1999, 2000, 2002, 2007 Free Software Foundation, Inc. + Copyright 1999, 2000, 2002, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -26,11 +26,11 @@ #include "libhppa.h" #include "elf/hppa.h" -elf_hppa_reloc_type elf64_hppa_reloc_final_type - PARAMS ((bfd *, elf_hppa_reloc_type, int, unsigned int)); +extern elf_hppa_reloc_type elf64_hppa_reloc_final_type + (bfd *, elf_hppa_reloc_type, int, unsigned int); extern elf_hppa_reloc_type ** _bfd_elf64_hppa_gen_reloc_type - PARAMS ((bfd *, elf_hppa_reloc_type, int, unsigned int, int, asymbol *)); + (bfd *, elf_hppa_reloc_type, int, unsigned int, int, asymbol *); /* Define groups of basic relocations. FIXME: These should be the only basic relocations created by GAS. The rest diff --git a/cegcc/src/binutils/bfd/elf64-mips.c b/cegcc/src/binutils/bfd/elf64-mips.c index ad00a3db1..312c976db 100644 --- a/cegcc/src/binutils/bfd/elf64-mips.c +++ b/cegcc/src/binutils/bfd/elf64-mips.c @@ -1,6 +1,6 @@ /* MIPS-specific support for 64-bit ELF Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2007 Free Software Foundation, Inc. + 2006, 2007, 2008 Free Software Foundation, Inc. Ian Lance Taylor, Cygnus Support Linker support added by Mark Mitchell, CodeSourcery, LLC. @@ -1328,7 +1328,20 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = /* TLS relocations. */ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD32), EMPTY_HOWTO (R_MIPS_TLS_DTPREL32), - EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64), + + HOWTO (R_MIPS_TLS_DTPMOD64, /* type */ + 0, /* rightshift */ + 4, /* size (0 = byte, 1 = short, 2 = long) */ + 64, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + _bfd_mips_elf_generic_reloc, /* special_function */ + "R_MIPS_TLS_DTPMOD64", /* name */ + TRUE, /* partial_inplace */ + MINUS_ONE, /* src_mask */ + MINUS_ONE, /* dst_mask */ + FALSE), /* pcrel_offset */ HOWTO (R_MIPS_TLS_DTPREL64, /* type */ 0, /* rightshift */ @@ -1419,8 +1432,22 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 0x0000ffff, /* dst_mask */ FALSE), /* pcrel_offset */ + /* TLS IE dynamic relocations. */ EMPTY_HOWTO (R_MIPS_TLS_TPREL32), - EMPTY_HOWTO (R_MIPS_TLS_TPREL64), + + HOWTO (R_MIPS_TLS_TPREL64, /* type */ + 0, /* rightshift */ + 4, /* size (0 = byte, 1 = short, 2 = long) */ + 64, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + _bfd_mips_elf_generic_reloc, /* special_function */ + "R_MIPS_TLS_TPREL64", /* name */ + TRUE, /* partial_inplace */ + MINUS_ONE, /* src_mask */ + MINUS_ONE, /* dst_mask */ + FALSE), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_TPREL_HI16, /* type */ diff --git a/cegcc/src/binutils/bfd/elf64-mmix.c b/cegcc/src/binutils/bfd/elf64-mmix.c index 9a37840a2..b090f23be 100644 --- a/cegcc/src/binutils/bfd/elf64-mmix.c +++ b/cegcc/src/binutils/bfd/elf64-mmix.c @@ -1,5 +1,5 @@ /* MMIX-specific support for 64-bit ELF. - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Contributed by Hans-Peter Nilsson @@ -159,7 +159,7 @@ struct bpo_greg_section_info struct bpo_reloc_request *reloc_request; }; -static bfd_boolean mmix_elf_link_output_symbol_hook +static int mmix_elf_link_output_symbol_hook PARAMS ((struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *)); @@ -2082,7 +2082,7 @@ _bfd_mmix_check_all_relocs (abfd, info) the register section, and scale them down to correspond to the register number. */ -static bfd_boolean +static int mmix_elf_link_output_symbol_hook (info, name, sym, input_sec, h) struct bfd_link_info *info ATTRIBUTE_UNUSED; const char *name ATTRIBUTE_UNUSED; @@ -2099,7 +2099,7 @@ mmix_elf_link_output_symbol_hook (info, name, sym, input_sec, h) sym->st_shndx = SHN_REGISTER; } - return TRUE; + return 1; } /* We fake a register section that holds values that are register numbers. @@ -2557,7 +2557,7 @@ mmix_dump_bpo_gregs (link_info, pf) when the last such reloc is done, an index-array is sorted according to the values and iterated over to produce register numbers (indexed by 0 from the first allocated register number) and offsets for use in real - relocation. + relocation. (N.B.: Relocatable runs are handled, not just punted.) PUSHJ stub accounting is also done here. diff --git a/cegcc/src/binutils/bfd/elf64-ppc.c b/cegcc/src/binutils/bfd/elf64-ppc.c index 02a863250..35757b85d 100644 --- a/cegcc/src/binutils/bfd/elf64-ppc.c +++ b/cegcc/src/binutils/bfd/elf64-ppc.c @@ -1,6 +1,6 @@ /* PowerPC64-specific support for 64-bit ELF. - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 - Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2009 Free Software Foundation, Inc. Written by Linus Nordberg, Swox AB , based on elf32-ppc.c by Ian Lance Taylor. Largely rewritten by Alan Modra @@ -112,6 +112,7 @@ static bfd_vma opd_entry_value #define elf_backend_finish_dynamic_sections ppc64_elf_finish_dynamic_sections #define elf_backend_link_output_symbol_hook ppc64_elf_output_symbol_hook #define elf_backend_special_sections ppc64_elf_special_sections +#define elf_backend_post_process_headers _bfd_elf_set_osabi /* The name of the dynamic interpreter. This is put in the .interp section. */ @@ -1235,7 +1236,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { 0xfffc, /* dst_mask */ FALSE), /* pcrel_offset */ - /* Marker reloc for TLS. */ + /* Marker relocs for TLS. */ HOWTO (R_PPC64_TLS, 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -1250,6 +1251,34 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { 0, /* dst_mask */ FALSE), /* pcrel_offset */ + HOWTO (R_PPC64_TLSGD, + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_PPC64_TLSGD", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + FALSE), /* pcrel_offset */ + + HOWTO (R_PPC64_TLSLD, + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_PPC64_TLSLD", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + FALSE), /* pcrel_offset */ + /* Computes the load module index of the load module that contains the definition of its TLS sym. */ HOWTO (R_PPC64_DTPMOD64, @@ -1845,6 +1874,95 @@ static reloc_howto_type ppc64_elf_howto_raw[] = { 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ + HOWTO (R_PPC64_JMP_IREL, /* type */ + 0, /* rightshift */ + 0, /* size (0=byte, 1=short, 2=long, 4=64 bits) */ + 0, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + ppc64_elf_unhandled_reloc, /* special_function */ + "R_PPC64_JMP_IREL", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0, /* dst_mask */ + FALSE), /* pcrel_offset */ + + HOWTO (R_PPC64_IRELATIVE, /* type */ + 0, /* rightshift */ + 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */ + 64, /* bitsize */ + FALSE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_PPC64_IRELATIVE", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + ONES (64), /* dst_mask */ + FALSE), /* pcrel_offset */ + + /* A 16 bit relative relocation. */ + HOWTO (R_PPC64_REL16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + TRUE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_bitfield, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_PPC64_REL16", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0xffff, /* dst_mask */ + TRUE), /* pcrel_offset */ + + /* A 16 bit relative relocation without overflow. */ + HOWTO (R_PPC64_REL16_LO, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + TRUE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont,/* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_PPC64_REL16_LO", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0xffff, /* dst_mask */ + TRUE), /* pcrel_offset */ + + /* The high order 16 bits of a relative address. */ + HOWTO (R_PPC64_REL16_HI, /* type */ + 16, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + TRUE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + bfd_elf_generic_reloc, /* special_function */ + "R_PPC64_REL16_HI", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0xffff, /* dst_mask */ + TRUE), /* pcrel_offset */ + + /* The high order 16 bits of a relative address, plus 1 if the contents of + the low 16 bits, treated as a signed number, is negative. */ + HOWTO (R_PPC64_REL16_HA, /* type */ + 16, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + TRUE, /* pc_relative */ + 0, /* bitpos */ + complain_overflow_dont, /* complain_on_overflow */ + ppc64_elf_ha_reloc, /* special_function */ + "R_PPC64_REL16_HA", /* name */ + FALSE, /* partial_inplace */ + 0, /* src_mask */ + 0xffff, /* dst_mask */ + TRUE), /* pcrel_offset */ + /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_PPC64_GNU_VTINHERIT, /* type */ 0, /* rightshift */ @@ -2031,6 +2149,10 @@ ppc64_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, break; case BFD_RELOC_PPC_TLS: r = R_PPC64_TLS; break; + case BFD_RELOC_PPC_TLSGD: r = R_PPC64_TLSGD; + break; + case BFD_RELOC_PPC_TLSLD: r = R_PPC64_TLSLD; + break; case BFD_RELOC_PPC_DTPMOD: r = R_PPC64_DTPMOD64; break; case BFD_RELOC_PPC_TPREL16: r = R_PPC64_TPREL16; @@ -2109,6 +2231,14 @@ ppc64_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, break; case BFD_RELOC_PPC64_DTPREL16_HIGHESTA: r = R_PPC64_DTPREL16_HIGHESTA; break; + case BFD_RELOC_16_PCREL: r = R_PPC64_REL16; + break; + case BFD_RELOC_LO16_PCREL: r = R_PPC64_REL16_LO; + break; + case BFD_RELOC_HI16_PCREL: r = R_PPC64_REL16_HI; + break; + case BFD_RELOC_HI16_S_PCREL: r = R_PPC64_REL16_HA; + break; case BFD_RELOC_VTABLE_INHERIT: r = R_PPC64_GNU_VTINHERIT; break; case BFD_RELOC_VTABLE_ENTRY: r = R_PPC64_GNU_VTENTRY; @@ -2608,9 +2738,15 @@ struct _ppc64_elf_section_data long *adjust; } opd; - /* An array for toc sections, indexed by offset/8. - Specifies the relocation symbol index used at a given toc offset. */ - unsigned *t_symndx; + /* An array for toc sections, indexed by offset/8. */ + struct _toc_sec_data + { + /* Specifies the relocation symbol index used at a given toc offset. */ + unsigned *symndx; + + /* And the relocation addend. */ + bfd_vma *add; + } toc; } u; enum _ppc64_sec_type sec_type:2; @@ -2651,7 +2787,6 @@ get_opd_info (asection * sec) } /* Parameters for the qsort hook. */ -static asection *synthetic_opd; static bfd_boolean synthetic_relocatable; /* qsort comparison function for ppc64_elf_get_synthetic_symtab. */ @@ -2669,9 +2804,11 @@ compare_symbols (const void *ap, const void *bp) return 1; /* then .opd symbols. */ - if (a->section == synthetic_opd && b->section != synthetic_opd) + if (strcmp (a->section->name, ".opd") == 0 + && strcmp (b->section->name, ".opd") != 0) return -1; - if (a->section != synthetic_opd && b->section == synthetic_opd) + if (strcmp (a->section->name, ".opd") != 0 + && strcmp (b->section->name, ".opd") == 0) return 1; /* then other code symbols. */ @@ -2825,7 +2962,6 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, else memcpy (syms, static_syms, (symcount + 1) * sizeof (*syms)); - synthetic_opd = opd; synthetic_relocatable = relocatable; qsort (syms, symcount, sizeof (*syms), compare_symbols); @@ -2843,7 +2979,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, } i = 0; - if (syms[i]->section == opd) + if (strcmp (syms[i]->section->name, ".opd") == 0) ++i; codesecsym = i; @@ -2860,7 +2996,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, secsymend = i; for (; i < symcount; ++i) - if (syms[i]->section != opd) + if (strcmp (syms[i]->section->name, ".opd") != 0) break; opdsymend = i; @@ -2995,6 +3131,10 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, { bfd_vma ent; + /* Ignore bogus symbols. */ + if (syms[i]->value > opd->size - 8) + continue; + ent = bfd_get_64 (abfd, contents + syms[i]->value); if (!sym_exists_at (syms, opdsymend, symcount, -1, ent)) { @@ -3074,7 +3214,11 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, p = relplt->relocation; for (i = 0; i < plt_count; i++, p++) - size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt"); + { + size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt"); + if (p->addend != 0) + size += sizeof ("+0x") - 1 + 16; + } } } @@ -3088,6 +3232,9 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, { bfd_vma ent; + if (syms[i]->value > opd->size - 8) + continue; + ent = bfd_get_64 (abfd, contents + syms[i]->value); if (!sym_exists_at (syms, opdsymend, symcount, -1, ent)) { @@ -3191,6 +3338,13 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, len = strlen ((*p->sym_ptr_ptr)->name); memcpy (names, (*p->sym_ptr_ptr)->name, len); names += len; + if (p->addend != 0) + { + memcpy (names, "+0x", sizeof ("+0x") - 1); + names += sizeof ("+0x") - 1; + bfd_sprintf_vma (abfd, names, p->addend); + names += strlen (names); + } memcpy (names, "@plt", sizeof ("@plt")); names += sizeof ("@plt"); s++; @@ -3473,6 +3627,7 @@ struct ppc_stub_hash_entry { /* The symbol table entry, if any, that this was derived from. */ struct ppc_link_hash_entry *h; + struct plt_entry *plt_ent; /* And the reloc addend that this was derived from. */ bfd_vma addend; @@ -3541,6 +3696,7 @@ struct ppc_link_hash_entry #define TLS_TLS 16 /* Any TLS reloc. */ #define TLS_EXPLICIT 32 /* Marks TOC section TLS relocs. */ #define TLS_TPRELGD 64 /* TPREL reloc resulting from GD->IE. */ +#define PLT_IFUNC 128 /* STT_GNU_IFUNC. */ char tls_mask; }; @@ -3593,6 +3749,8 @@ struct ppc_link_hash_table asection *got; asection *plt; asection *relplt; + asection *iplt; + asection *reliplt; asection *dynbss; asection *relbss; asection *glink; @@ -3613,6 +3771,9 @@ struct ppc_link_hash_table /* Set if we should emit symbols for stubs. */ unsigned int emit_stub_syms:1; + /* Set if __tls_get_addr optimization should not be done. */ + unsigned int no_tls_get_addr_opt:1; + /* Support for multiple toc sections. */ unsigned int no_multi_toc:1; unsigned int multi_toc_needed:1; @@ -3626,8 +3787,8 @@ struct ppc_link_hash_table /* Incremented every time we size stubs. */ unsigned int stub_iteration; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; }; /* Rename some of the generic section flags to better document how they @@ -4017,6 +4178,21 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) || ! bfd_set_section_alignment (dynobj, htab->glink, 3)) return FALSE; + flags = SEC_ALLOC | SEC_LINKER_CREATED; + htab->iplt = bfd_make_section_anyway_with_flags (dynobj, ".iplt", flags); + if (htab->iplt == NULL + || ! bfd_set_section_alignment (dynobj, htab->iplt, 3)) + return FALSE; + + flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY + | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); + htab->reliplt = bfd_make_section_anyway_with_flags (dynobj, + ".rela.iplt", + flags); + if (htab->reliplt == NULL + || ! bfd_set_section_alignment (dynobj, htab->reliplt, 3)) + return FALSE; + /* Create branch lookup table for plt_branch stubs. */ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); @@ -4034,7 +4210,7 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) htab->relbrlt = bfd_make_section_anyway_with_flags (dynobj, ".rela.branch_lt", flags); - if (!htab->relbrlt + if (htab->relbrlt == NULL || ! bfd_set_section_alignment (dynobj, htab->relbrlt, 3)) return FALSE; @@ -4109,6 +4285,29 @@ ppc64_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) return TRUE; } +/* Follow indirect and warning symbol links. */ + +static inline struct bfd_link_hash_entry * +follow_link (struct bfd_link_hash_entry *h) +{ + while (h->type == bfd_link_hash_indirect + || h->type == bfd_link_hash_warning) + h = h->u.i.link; + return h; +} + +static inline struct elf_link_hash_entry * +elf_follow_link (struct elf_link_hash_entry *h) +{ + return (struct elf_link_hash_entry *) follow_link (&h->root); +} + +static inline struct ppc_link_hash_entry * +ppc_follow_link (struct ppc_link_hash_entry *h) +{ + return (struct ppc_link_hash_entry *) follow_link (&h->elf.root); +} + /* Merge PLT info on FROM with that on TO. */ static void @@ -4191,6 +4390,8 @@ ppc64_elf_copy_indirect_symbol (struct bfd_link_info *info, edir->is_func |= eind->is_func; edir->is_func_descriptor |= eind->is_func_descriptor; edir->tls_mask |= eind->tls_mask; + if (eind->oh != NULL) + edir->oh = ppc_follow_link (eind->oh); /* If called to transfer flags for a weakdef during processing of elf_adjust_dynamic_symbol, don't copy NON_GOT_REF. @@ -4260,7 +4461,7 @@ ppc64_elf_copy_indirect_symbol (struct bfd_link_info *info, hash entry FH. Link the entries via their OH fields. */ static struct ppc_link_hash_entry * -get_fdh (struct ppc_link_hash_entry *fh, struct ppc_link_hash_table *htab) +lookup_fdh (struct ppc_link_hash_entry *fh, struct ppc_link_hash_table *htab) { struct ppc_link_hash_entry *fdh = fh->oh; @@ -4270,16 +4471,16 @@ get_fdh (struct ppc_link_hash_entry *fh, struct ppc_link_hash_table *htab) fdh = (struct ppc_link_hash_entry *) elf_link_hash_lookup (&htab->elf, fd_name, FALSE, FALSE, FALSE); - if (fdh != NULL) - { - fdh->is_func_descriptor = 1; - fdh->oh = fh; - fh->is_func = 1; - fh->oh = fdh; - } + if (fdh == NULL) + return fdh; + + fdh->is_func_descriptor = 1; + fdh->oh = fh; + fh->is_func = 1; + fh->oh = fdh; } - return fdh; + return ppc_follow_link (fdh); } /* Make a fake function descriptor sym for the code sym FH. */ @@ -4322,15 +4523,19 @@ make_fdh (struct bfd_link_info *info, static bfd_boolean ppc64_elf_add_symbol_hook (bfd *ibfd ATTRIBUTE_UNUSED, - struct bfd_link_info *info ATTRIBUTE_UNUSED, + struct bfd_link_info *info, Elf_Internal_Sym *isym, const char **name ATTRIBUTE_UNUSED, flagword *flags ATTRIBUTE_UNUSED, asection **sec, bfd_vma *value ATTRIBUTE_UNUSED) { - if (*sec != NULL - && strcmp (bfd_get_section_name (ibfd, *sec), ".opd") == 0) + if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) + elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + else if (ELF_ST_TYPE (isym->st_info) == STT_FUNC) + ; + else if (*sec != NULL + && strcmp (bfd_get_section_name (ibfd, *sec), ".opd") == 0) isym->st_info = ELF_ST_INFO (ELF_ST_BIND (isym->st_info), STT_FUNC); return TRUE; @@ -4397,23 +4602,24 @@ add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info) abort (); htab = ppc_hash_table (info); - fdh = get_fdh (eh, htab); - if (fdh == NULL - && !info->relocatable - && (eh->elf.root.type == bfd_link_hash_undefined - || eh->elf.root.type == bfd_link_hash_undefweak) - && eh->elf.ref_regular) - { - /* Make an undefweak function descriptor sym, which is enough to - pull in an --as-needed shared lib, but won't cause link - errors. Archives are handled elsewhere. */ - fdh = make_fdh (info, eh); - if (fdh == NULL) - return FALSE; - else - fdh->elf.ref_regular = 1; + fdh = lookup_fdh (eh, htab); + if (fdh == NULL) + { + if (!info->relocatable + && (eh->elf.root.type == bfd_link_hash_undefined + || eh->elf.root.type == bfd_link_hash_undefweak) + && eh->elf.ref_regular) + { + /* Make an undefweak function descriptor sym, which is enough to + pull in an --as-needed shared lib, but won't cause link + errors. Archives are handled elsewhere. */ + fdh = make_fdh (info, eh); + if (fdh == NULL) + return FALSE; + fdh->elf.ref_regular = 1; + } } - else if (fdh != NULL) + else { unsigned entry_vis = ELF_ST_VISIBILITY (eh->elf.other) - 1; unsigned descr_vis = ELF_ST_VISIBILITY (fdh->elf.other) - 1; @@ -4488,25 +4694,28 @@ ppc64_elf_as_needed_cleanup (bfd *ibfd ATTRIBUTE_UNUSED, return TRUE; } -static bfd_boolean +static struct plt_entry ** update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, unsigned long r_symndx, bfd_vma r_addend, int tls_type) { struct got_entry **local_got_ents = elf_local_got_ents (abfd); + struct plt_entry **local_plt; char *local_got_tls_masks; if (local_got_ents == NULL) { bfd_size_type size = symtab_hdr->sh_info; - size *= sizeof (*local_got_ents) + sizeof (*local_got_tls_masks); + size *= (sizeof (*local_got_ents) + + sizeof (*local_plt) + + sizeof (*local_got_tls_masks)); local_got_ents = bfd_zalloc (abfd, size); if (local_got_ents == NULL) - return FALSE; + return NULL; elf_local_got_ents (abfd) = local_got_ents; } - if ((tls_type & TLS_EXPLICIT) == 0) + if ((tls_type & (PLT_IFUNC | TLS_EXPLICIT)) == 0) { struct got_entry *ent; @@ -4531,17 +4740,19 @@ update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, ent->got.refcount += 1; } - local_got_tls_masks = (char *) (local_got_ents + symtab_hdr->sh_info); + local_plt = (struct plt_entry **) (local_got_ents + symtab_hdr->sh_info); + local_got_tls_masks = (char *) (local_plt + symtab_hdr->sh_info); local_got_tls_masks[r_symndx] |= tls_type; - return TRUE; + + return local_plt + r_symndx; } static bfd_boolean -update_plt_info (bfd *abfd, struct ppc_link_hash_entry *eh, bfd_vma addend) +update_plt_info (bfd *abfd, struct plt_entry **plist, bfd_vma addend) { struct plt_entry *ent; - for (ent = eh->elf.plt.plist; ent != NULL; ent = ent->next) + for (ent = *plist; ent != NULL; ent = ent->next) if (ent->addend == addend) break; if (ent == NULL) @@ -4550,19 +4761,28 @@ update_plt_info (bfd *abfd, struct ppc_link_hash_entry *eh, bfd_vma addend) ent = bfd_alloc (abfd, amt); if (ent == NULL) return FALSE; - ent->next = eh->elf.plt.plist; + ent->next = *plist; ent->addend = addend; ent->plt.refcount = 0; - eh->elf.plt.plist = ent; + *plist = ent; } ent->plt.refcount += 1; - eh->elf.needs_plt = 1; - if (eh->elf.root.root.string[0] == '.' - && eh->elf.root.root.string[1] != '\0') - eh->is_func = 1; return TRUE; } +static bfd_boolean +is_branch_reloc (enum elf_ppc64_reloc_type r_type) +{ + return (r_type == R_PPC64_REL24 + || r_type == R_PPC64_REL14 + || r_type == R_PPC64_REL14_BRTAKEN + || r_type == R_PPC64_REL14_BRNTAKEN + || r_type == R_PPC64_ADDR24 + || r_type == R_PPC64_ADDR14 + || r_type == R_PPC64_ADDR14_BRTAKEN + || r_type == R_PPC64_ADDR14_BRNTAKEN); +} + /* Look through the relocs for a section during the first phase, and calculate needed space in the global offset table, procedure linkage table, and dynamic reloc sections. */ @@ -4578,6 +4798,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Rela *rel_end; asection *sreloc; asection **opd_sym_map; + struct elf_link_hash_entry *tga, *dottga; if (info->relocatable) return TRUE; @@ -4594,6 +4815,10 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, BFD_ASSERT (is_ppc64_elf (abfd)); htab = ppc_hash_table (info); + tga = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", + FALSE, FALSE, TRUE); + dottga = elf_link_hash_lookup (&htab->elf, ".__tls_get_addr", + FALSE, FALSE, TRUE); symtab_hdr = &elf_symtab_hdr (abfd); sym_hashes = elf_sym_hashes (abfd); @@ -4633,8 +4858,9 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, unsigned long r_symndx; struct elf_link_hash_entry *h; enum elf_ppc64_reloc_type r_type; - int tls_type = 0; + int tls_type; struct _ppc64_elf_section_data *ppc64_sec; + struct plt_entry **ifunc; r_symndx = ELF64_R_SYM (rel->r_info); if (r_symndx < symtab_hdr->sh_info) @@ -4642,14 +4868,64 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, else { h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; + h = elf_follow_link (h); } + tls_type = 0; + ifunc = NULL; + if (h != NULL) + { + if (h->type == STT_GNU_IFUNC) + { + h->needs_plt = 1; + ifunc = &h->plt.plist; + } + } + else + { + Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; + + if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) + { + ifunc = update_local_sym_info (abfd, symtab_hdr, r_symndx, + rel->r_addend, PLT_IFUNC); + if (ifunc == NULL) + return FALSE; + } + } r_type = ELF64_R_TYPE (rel->r_info); + if (is_branch_reloc (r_type)) + { + if (h != NULL && (h == tga || h == dottga)) + { + if (rel != relocs + && (ELF64_R_TYPE (rel[-1].r_info) == R_PPC64_TLSGD + || ELF64_R_TYPE (rel[-1].r_info) == R_PPC64_TLSLD)) + /* We have a new-style __tls_get_addr call with a marker + reloc. */ + ; + else + /* Mark this section as having an old-style call. */ + sec->has_tls_get_addr_call = 1; + } + + /* STT_GNU_IFUNC symbols must have a PLT entry. */ + if (ifunc != NULL + && !update_plt_info (abfd, ifunc, rel->r_addend)) + return FALSE; + } + switch (r_type) { + case R_PPC64_TLSGD: + case R_PPC64_TLSLD: + /* These special tls relocs tie a call to __tls_get_addr with + its parameter symbol. */ + break; + case R_PPC64_GOT_TLSLD16: case R_PPC64_GOT_TLSLD16_LO: case R_PPC64_GOT_TLSLD16_HI: @@ -4746,9 +5022,14 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, return FALSE; } else - if (!update_plt_info (abfd, (struct ppc_link_hash_entry *) h, - rel->r_addend)) - return FALSE; + { + if (!update_plt_info (abfd, &h->plt.plist, rel->r_addend)) + return FALSE; + h->needs_plt = 1; + if (h->root.root.string[0] == '.' + && h->root.root.string[1] != '\0') + ((struct ppc_link_hash_entry *) h)->is_func = 1; + } break; /* The following relocations don't need to propagate the @@ -4773,6 +5054,12 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, break; /* Nor do these. */ + case R_PPC64_REL16: + case R_PPC64_REL16_LO: + case R_PPC64_REL16_HI: + case R_PPC64_REL16_HA: + break; + case R_PPC64_TOC16: case R_PPC64_TOC16_LO: case R_PPC64_TOC16_HI: @@ -4814,40 +5101,35 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, dest = h->root.u.def.section; } else - dest = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); + { + Elf_Internal_Sym *isym; + + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; + + dest = bfd_section_from_elf_index (abfd, isym->st_shndx); + } + if (dest != sec) ppc64_elf_section_data (sec)->has_14bit_branch = 1; } /* Fall through. */ case R_PPC64_REL24: - if (h != NULL) + if (h != NULL && ifunc == NULL) { /* We may need a .plt entry if the function this reloc refers to is in a shared lib. */ - if (!update_plt_info (abfd, (struct ppc_link_hash_entry *) h, - rel->r_addend)) + if (!update_plt_info (abfd, &h->plt.plist, rel->r_addend)) return FALSE; - if (h == &htab->tls_get_addr->elf - || h == &htab->tls_get_addr_fd->elf) + h->needs_plt = 1; + if (h->root.root.string[0] == '.' + && h->root.root.string[1] != '\0') + ((struct ppc_link_hash_entry *) h)->is_func = 1; + if (h == tga || h == dottga) sec->has_tls_reloc = 1; - else if (htab->tls_get_addr == NULL - && CONST_STRNEQ (h->root.root.string, ".__tls_get_addr") - && (h->root.root.string[15] == 0 - || h->root.root.string[15] == '@')) - { - htab->tls_get_addr = (struct ppc_link_hash_entry *) h; - sec->has_tls_reloc = 1; - } - else if (htab->tls_get_addr_fd == NULL - && CONST_STRNEQ (h->root.root.string, "__tls_get_addr") - && (h->root.root.string[14] == 0 - || h->root.root.string[14] == '@')) - { - htab->tls_get_addr_fd = (struct ppc_link_hash_entry *) h; - sec->has_tls_reloc = 1; - } } break; @@ -4891,23 +5173,30 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, ppc64_sec = ppc64_elf_section_data (sec); if (ppc64_sec->sec_type != sec_toc) { + bfd_size_type amt; + /* One extra to simplify get_tls_mask. */ - bfd_size_type amt = sec->size * sizeof (unsigned) / 8 + 1; - ppc64_sec->u.t_symndx = bfd_zalloc (abfd, amt); - if (ppc64_sec->u.t_symndx == NULL) + amt = sec->size * sizeof (unsigned) / 8 + sizeof (unsigned); + ppc64_sec->u.toc.symndx = bfd_zalloc (abfd, amt); + if (ppc64_sec->u.toc.symndx == NULL) + return FALSE; + amt = sec->size * sizeof (bfd_vma) / 8; + ppc64_sec->u.toc.add = bfd_zalloc (abfd, amt); + if (ppc64_sec->u.toc.add == NULL) return FALSE; BFD_ASSERT (ppc64_sec->sec_type == sec_normal); ppc64_sec->sec_type = sec_toc; } BFD_ASSERT (rel->r_offset % 8 == 0); - ppc64_sec->u.t_symndx[rel->r_offset / 8] = r_symndx; + ppc64_sec->u.toc.symndx[rel->r_offset / 8] = r_symndx; + ppc64_sec->u.toc.add[rel->r_offset / 8] = rel->r_addend; /* Mark the second slot of a GD or LD entry. -1 to indicate GD and -2 to indicate LD. */ if (tls_type == (TLS_EXPLICIT | TLS_TLS | TLS_GD)) - ppc64_sec->u.t_symndx[rel->r_offset / 8 + 1] = -1; + ppc64_sec->u.toc.symndx[rel->r_offset / 8 + 1] = -1; else if (tls_type == (TLS_EXPLICIT | TLS_TLS | TLS_LD)) - ppc64_sec->u.t_symndx[rel->r_offset / 8 + 1] = -2; + ppc64_sec->u.toc.symndx[rel->r_offset / 8 + 1] = -2; goto dodyn; case R_PPC64_TPREL16: @@ -4937,7 +5226,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { if (h->root.root.string[0] == '.' && h->root.root.string[1] != 0 - && get_fdh ((struct ppc_link_hash_entry *) h, htab)) + && lookup_fdh ((struct ppc_link_hash_entry *) h, htab)) ; else ((struct ppc_link_hash_entry *) h)->is_func = 1; @@ -4945,12 +5234,15 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, else { asection *s; + Elf_Internal_Sym *isym; - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec, - r_symndx); - if (s == NULL) + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; - else if (s != sec) + + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s != NULL && s != sec) opd_sym_map[rel->r_offset / 8] = s; } } @@ -5018,7 +5310,9 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, && !info->shared && h != NULL && (h->root.type == bfd_link_hash_defweak - || !h->def_regular))) + || !h->def_regular)) + || (!info->shared + && ifunc != NULL)) { struct ppc_dyn_relocs *p; struct ppc_dyn_relocs **head; @@ -5046,15 +5340,19 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* Track dynamic relocs needed for local syms too. We really need local syms available to do this easily. Oh well. */ - asection *s; void *vpp; + Elf_Internal_Sym *isym; - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (s == NULL) + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; + vpp = &elf_section_data (s)->local_dynrel; head = (struct ppc_dyn_relocs **) vpp; } @@ -5181,9 +5479,7 @@ opd_entry_value (asection *opd_sec, sym_hashes = elf_sym_hashes (opd_bfd); rh = sym_hashes[symndx - symtab_hdr->sh_info]; - while (rh->root.type == bfd_link_hash_indirect - || rh->root.type == bfd_link_hash_warning) - rh = ((struct elf_link_hash_entry *) rh->root.u.i.link); + rh = elf_follow_link (rh); BFD_ASSERT (rh->root.type == bfd_link_hash_defined || rh->root.type == bfd_link_hash_defweak); val = rh->root.u.def.value; @@ -5204,6 +5500,39 @@ opd_entry_value (asection *opd_sec, return val; } +/* If FDH is a function descriptor symbol, return the associated code + entry symbol if it is defined. Return NULL otherwise. */ + +static struct ppc_link_hash_entry * +defined_code_entry (struct ppc_link_hash_entry *fdh) +{ + if (fdh->is_func_descriptor) + { + struct ppc_link_hash_entry *fh = ppc_follow_link (fdh->oh); + if (fh->elf.root.type == bfd_link_hash_defined + || fh->elf.root.type == bfd_link_hash_defweak) + return fh; + } + return NULL; +} + +/* If FH is a function code entry symbol, return the associated + function descriptor symbol if it is defined. Return NULL otherwise. */ + +static struct ppc_link_hash_entry * +defined_func_desc (struct ppc_link_hash_entry *fh) +{ + if (fh->oh != NULL + && fh->oh->is_func_descriptor) + { + struct ppc_link_hash_entry *fdh = ppc_follow_link (fh->oh); + if (fdh->elf.root.type == bfd_link_hash_defined + || fdh->elf.root.type == bfd_link_hash_defweak) + return fdh; + } + return NULL; +} + /* Mark all our entry sym sections, both opd and code section. */ static void @@ -5214,22 +5543,21 @@ ppc64_elf_gc_keep (struct bfd_link_info *info) for (sym = info->gc_sym_list; sym != NULL; sym = sym->next) { - struct ppc_link_hash_entry *eh; + struct ppc_link_hash_entry *eh, *fh; asection *sec; eh = (struct ppc_link_hash_entry *) - elf_link_hash_lookup (&htab->elf, sym->name, FALSE, FALSE, FALSE); + elf_link_hash_lookup (&htab->elf, sym->name, FALSE, FALSE, TRUE); if (eh == NULL) continue; if (eh->elf.root.type != bfd_link_hash_defined && eh->elf.root.type != bfd_link_hash_defweak) continue; - if (eh->is_func_descriptor - && (eh->oh->elf.root.type == bfd_link_hash_defined - || eh->oh->elf.root.type == bfd_link_hash_defweak)) + fh = defined_code_entry (eh); + if (fh != NULL) { - sec = eh->oh->elf.root.u.def.section; + sec = fh->elf.root.u.def.section; sec->flags |= SEC_KEEP; } else if (get_opd_info (eh->elf.root.u.def.section) != NULL @@ -5252,16 +5580,15 @@ ppc64_elf_gc_mark_dynamic_ref (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info = (struct bfd_link_info *) inf; struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) h; + struct ppc_link_hash_entry *fdh; if (eh->elf.root.type == bfd_link_hash_warning) eh = (struct ppc_link_hash_entry *) eh->elf.root.u.i.link; /* Dynamic linking info is on the func descriptor sym. */ - if (eh->oh != NULL - && eh->oh->is_func_descriptor - && (eh->oh->elf.root.type == bfd_link_hash_defined - || eh->oh->elf.root.type == bfd_link_hash_defweak)) - eh = eh->oh; + fdh = defined_func_desc (eh); + if (fdh != NULL) + eh = fdh; if ((eh->elf.root.type == bfd_link_hash_defined || eh->elf.root.type == bfd_link_hash_defweak) @@ -5272,15 +5599,18 @@ ppc64_elf_gc_mark_dynamic_ref (struct elf_link_hash_entry *h, void *inf) && ELF_ST_VISIBILITY (eh->elf.other) != STV_HIDDEN))) { asection *code_sec; + struct ppc_link_hash_entry *fh; eh->elf.root.u.def.section->flags |= SEC_KEEP; /* Function descriptor syms cause the associated function code sym section to be marked. */ - if (eh->is_func_descriptor - && (eh->oh->elf.root.type == bfd_link_hash_defined - || eh->oh->elf.root.type == bfd_link_hash_defweak)) - eh->oh->elf.root.u.def.section->flags |= SEC_KEEP; + fh = defined_code_entry (eh); + if (fh != NULL) + { + code_sec = fh->elf.root.u.def.section; + code_sec->flags |= SEC_KEEP; + } else if (get_opd_info (eh->elf.root.u.def.section) != NULL && opd_entry_value (eh->elf.root.u.def.section, eh->elf.root.u.def.value, @@ -5312,7 +5642,7 @@ ppc64_elf_gc_mark_hook (asection *sec, if (h != NULL) { enum elf_ppc64_reloc_type r_type; - struct ppc_link_hash_entry *eh; + struct ppc_link_hash_entry *eh, *fh, *fdh; r_type = ELF64_R_TYPE (rel->r_info); switch (r_type) @@ -5327,22 +5657,19 @@ ppc64_elf_gc_mark_hook (asection *sec, case bfd_link_hash_defined: case bfd_link_hash_defweak: eh = (struct ppc_link_hash_entry *) h; - if (eh->oh != NULL - && eh->oh->is_func_descriptor - && (eh->oh->elf.root.type == bfd_link_hash_defined - || eh->oh->elf.root.type == bfd_link_hash_defweak)) - eh = eh->oh; + fdh = defined_func_desc (eh); + if (fdh != NULL) + eh = fdh; /* Function descriptor syms cause the associated function code sym section to be marked. */ - if (eh->is_func_descriptor - && (eh->oh->elf.root.type == bfd_link_hash_defined - || eh->oh->elf.root.type == bfd_link_hash_defweak)) + fh = defined_code_entry (eh); + if (fh != NULL) { /* They also mark their opd section. */ eh->elf.root.u.def.section->gc_mark = 1; - rsec = eh->oh->elf.root.u.def.section; + rsec = fh->elf.root.u.def.section; } else if (get_opd_info (eh->elf.root.u.def.section) != NULL && opd_entry_value (eh->elf.root.u.def.section, @@ -5422,9 +5749,7 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info, struct ppc_dyn_relocs *p; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; + h = elf_follow_link (h); eh = (struct ppc_link_hash_entry *) h; for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next) @@ -5436,6 +5761,38 @@ ppc64_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info, } } + if (is_branch_reloc (r_type)) + { + struct plt_entry **ifunc = NULL; + if (h != NULL) + { + if (h->type == STT_GNU_IFUNC) + ifunc = &h->plt.plist; + } + else if (local_got_ents != NULL) + { + struct plt_entry **local_plt = (struct plt_entry **) + (local_got_ents + symtab_hdr->sh_info); + char *local_got_tls_masks = (char *) + (local_plt + symtab_hdr->sh_info); + if ((local_got_tls_masks[r_symndx] & PLT_IFUNC) != 0) + ifunc = local_plt + r_symndx; + } + if (ifunc != NULL) + { + struct plt_entry *ent; + + for (ent = *ifunc; ent != NULL; ent = ent->next) + if (ent->addend == rel->r_addend) + break; + if (ent == NULL) + abort (); + if (ent->plt.refcount > 0) + ent->plt.refcount -= 1; + continue; + } + } + switch (r_type) { case R_PPC64_GOT_TLSLD16: @@ -5778,18 +6135,17 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf) in dynamic objects are handled elsewhere. */ if (fh->elf.root.type == bfd_link_hash_undefweak && fh->was_undefined - && (fh->oh->elf.root.type == bfd_link_hash_defined - || fh->oh->elf.root.type == bfd_link_hash_defweak) - && get_opd_info (fh->oh->elf.root.u.def.section) != NULL - && opd_entry_value (fh->oh->elf.root.u.def.section, - fh->oh->elf.root.u.def.value, + && (fdh = defined_func_desc (fh)) != NULL + && get_opd_info (fdh->elf.root.u.def.section) != NULL + && opd_entry_value (fdh->elf.root.u.def.section, + fdh->elf.root.u.def.value, &fh->elf.root.u.def.section, &fh->elf.root.u.def.value) != (bfd_vma) -1) { - fh->elf.root.type = fh->oh->elf.root.type; + fh->elf.root.type = fdh->elf.root.type; fh->elf.forced_local = 1; - fh->elf.def_regular = fh->oh->elf.def_regular; - fh->elf.def_dynamic = fh->oh->elf.def_dynamic; + fh->elf.def_regular = fdh->elf.def_regular; + fh->elf.def_dynamic = fdh->elf.def_dynamic; } /* If this is a function code symbol, transfer dynamic linking @@ -5808,12 +6164,7 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf) /* Find the corresponding function descriptor symbol. Create it as undefined if necessary. */ - fdh = get_fdh (fh, htab); - if (fdh != NULL) - while (fdh->elf.root.type == bfd_link_hash_indirect - || fdh->elf.root.type == bfd_link_hash_warning) - fdh = (struct ppc_link_hash_entry *) fdh->elf.root.u.i.link; - + fdh = lookup_fdh (fh, htab); if (fdh == NULL && !info->executable && (fh->elf.root.type == bfd_link_hash_undefined @@ -5950,6 +6301,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Deal with function syms. */ if (h->type == STT_FUNC + || h->type == STT_GNU_IFUNC || h->needs_plt) { /* Clear procedure linkage table information for any symbol that @@ -5959,9 +6311,10 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (ent->plt.refcount > 0) break; if (ent == NULL - || SYMBOL_CALLS_LOCAL (info, h) - || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT - && h->root.type == bfd_link_hash_undefweak)) + || (h->type != STT_GNU_IFUNC + && (SYMBOL_CALLS_LOCAL (info, h) + || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + && h->root.type == bfd_link_hash_undefweak)))) { h->plt.plist = NULL; h->needs_plt = 0; @@ -6149,9 +6502,7 @@ get_sym_h (struct elf_link_hash_entry **hp, struct elf_link_hash_entry *h; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; + h = elf_follow_link (h); if (hp != NULL) *hp = h; @@ -6212,7 +6563,10 @@ get_sym_h (struct elf_link_hash_entry **hp, lgot_ents = elf_local_got_ents (ibfd); if (lgot_ents != NULL) { - char *lgot_masks = (char *) (lgot_ents + symtab_hdr->sh_info); + struct plt_entry **local_plt = (struct plt_entry **) + (lgot_ents + symtab_hdr->sh_info); + char *lgot_masks = (char *) + (local_plt + symtab_hdr->sh_info); tls_mask = &lgot_masks[r_symndx]; } *tls_maskp = tls_mask; @@ -6226,9 +6580,12 @@ get_sym_h (struct elf_link_hash_entry **hp, type suitable for optimization, and 1 otherwise. */ static int -get_tls_mask (char **tls_maskp, unsigned long *toc_symndx, +get_tls_mask (char **tls_maskp, + unsigned long *toc_symndx, + bfd_vma *toc_addend, Elf_Internal_Sym **locsymsp, - const Elf_Internal_Rela *rel, bfd *ibfd) + const Elf_Internal_Rela *rel, + bfd *ibfd) { unsigned long r_symndx; int next_r; @@ -6256,12 +6613,14 @@ get_tls_mask (char **tls_maskp, unsigned long *toc_symndx, off = sym->st_value; off += rel->r_addend; BFD_ASSERT (off % 8 == 0); - r_symndx = ppc64_elf_section_data (sec)->u.t_symndx[off / 8]; - next_r = ppc64_elf_section_data (sec)->u.t_symndx[off / 8 + 1]; - if (!get_sym_h (&h, &sym, &sec, tls_maskp, locsymsp, r_symndx, ibfd)) - return 0; + r_symndx = ppc64_elf_section_data (sec)->u.toc.symndx[off / 8]; + next_r = ppc64_elf_section_data (sec)->u.toc.symndx[off / 8 + 1]; if (toc_symndx != NULL) *toc_symndx = r_symndx; + if (toc_addend != NULL) + *toc_addend = ppc64_elf_section_data (sec)->u.toc.add[off / 8]; + if (!get_sym_h (&h, &sym, &sec, tls_maskp, locsymsp, r_symndx, ibfd)) + return 0; if ((h == NULL || ((h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) @@ -6627,11 +6986,12 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info, { Elf_Internal_Rela *write_rel; bfd_byte *rptr, *wptr; - bfd_byte *new_contents = NULL; + bfd_byte *new_contents; bfd_boolean skip; long opd_ent_size; bfd_size_type amt; + new_contents = NULL; amt = sec->size * sizeof (long) / 8; opd = &ppc64_elf_section_data (sec)->u.opd; opd->adjust = bfd_zalloc (obfd, amt); @@ -6710,8 +7070,8 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info, if (h != NULL && h->root.root.string[0] == '.') { - fdh = get_fdh ((struct ppc_link_hash_entry *) h, - ppc_hash_table (info)); + fdh = lookup_fdh ((struct ppc_link_hash_entry *) h, + ppc_hash_table (info)); if (fdh != NULL && fdh->elf.root.type != bfd_link_hash_defined && fdh->elf.root.type != bfd_link_hash_defweak) @@ -6861,41 +7221,120 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info, /* Set htab->tls_get_addr and call the generic ELF tls_setup function. */ asection * -ppc64_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) +ppc64_elf_tls_setup (bfd *obfd, + struct bfd_link_info *info, + int no_tls_get_addr_opt) { struct ppc_link_hash_table *htab; htab = ppc_hash_table (info); + htab->tls_get_addr = ((struct ppc_link_hash_entry *) + elf_link_hash_lookup (&htab->elf, ".__tls_get_addr", + FALSE, FALSE, TRUE)); + /* Move dynamic linking info to the function descriptor sym. */ if (htab->tls_get_addr != NULL) - { - struct ppc_link_hash_entry *h = htab->tls_get_addr; + func_desc_adjust (&htab->tls_get_addr->elf, info); + htab->tls_get_addr_fd = ((struct ppc_link_hash_entry *) + elf_link_hash_lookup (&htab->elf, "__tls_get_addr", + FALSE, FALSE, TRUE)); + if (!no_tls_get_addr_opt) + { + struct elf_link_hash_entry *opt, *opt_fd, *tga, *tga_fd; + + opt = elf_link_hash_lookup (&htab->elf, ".__tls_get_addr_opt", + FALSE, FALSE, TRUE); + if (opt != NULL) + func_desc_adjust (opt, info); + opt_fd = elf_link_hash_lookup (&htab->elf, "__tls_get_addr_opt", + FALSE, FALSE, TRUE); + if (opt_fd != NULL + && (opt_fd->root.type == bfd_link_hash_defined + || opt_fd->root.type == bfd_link_hash_defweak)) + { + /* If glibc supports an optimized __tls_get_addr call stub, + signalled by the presence of __tls_get_addr_opt, and we'll + be calling __tls_get_addr via a plt call stub, then + make __tls_get_addr point to __tls_get_addr_opt. */ + tga_fd = &htab->tls_get_addr_fd->elf; + if (htab->elf.dynamic_sections_created + && tga_fd != NULL + && (tga_fd->type == STT_FUNC + || tga_fd->needs_plt) + && !(SYMBOL_CALLS_LOCAL (info, tga_fd) + || (ELF_ST_VISIBILITY (tga_fd->other) != STV_DEFAULT + && tga_fd->root.type == bfd_link_hash_undefweak))) + { + struct plt_entry *ent; - while (h->elf.root.type == bfd_link_hash_indirect - || h->elf.root.type == bfd_link_hash_warning) - h = (struct ppc_link_hash_entry *) h->elf.root.u.i.link; + for (ent = tga_fd->plt.plist; ent != NULL; ent = ent->next) + if (ent->plt.refcount > 0) + break; + if (ent != NULL) + { + tga_fd->root.type = bfd_link_hash_indirect; + tga_fd->root.u.i.link = &opt_fd->root; + ppc64_elf_copy_indirect_symbol (info, opt_fd, tga_fd); + if (opt_fd->dynindx != -1) + { + /* Use __tls_get_addr_opt in dynamic relocations. */ + opt_fd->dynindx = -1; + _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, + opt_fd->dynstr_index); + if (!bfd_elf_link_record_dynamic_symbol (info, opt_fd)) + return FALSE; + } + htab->tls_get_addr_fd = (struct ppc_link_hash_entry *) opt_fd; + tga = &htab->tls_get_addr->elf; + if (opt != NULL && tga != NULL) + { + tga->root.type = bfd_link_hash_indirect; + tga->root.u.i.link = &opt->root; + ppc64_elf_copy_indirect_symbol (info, opt, tga); + _bfd_elf_link_hash_hide_symbol (info, opt, + tga->forced_local); + htab->tls_get_addr = (struct ppc_link_hash_entry *) opt; + } + htab->tls_get_addr_fd->oh = htab->tls_get_addr; + htab->tls_get_addr_fd->is_func_descriptor = 1; + if (htab->tls_get_addr != NULL) + { + htab->tls_get_addr->oh = htab->tls_get_addr_fd; + htab->tls_get_addr->is_func = 1; + } + } + } + } + else + no_tls_get_addr_opt = TRUE; + } + htab->no_tls_get_addr_opt = no_tls_get_addr_opt; + return _bfd_elf_tls_setup (obfd, info); +} - htab->tls_get_addr = h; +/* Return TRUE iff REL is a branch reloc with a global symbol matching + HASH1 or HASH2. */ - if (htab->tls_get_addr_fd == NULL - && h->oh != NULL - && h->oh->is_func_descriptor - && (h->oh->elf.root.type == bfd_link_hash_defined - || h->oh->elf.root.type == bfd_link_hash_defweak)) - htab->tls_get_addr_fd = h->oh; - } +static bfd_boolean +branch_reloc_hash_match (const bfd *ibfd, + const Elf_Internal_Rela *rel, + const struct ppc_link_hash_entry *hash1, + const struct ppc_link_hash_entry *hash2) +{ + Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (ibfd); + enum elf_ppc64_reloc_type r_type = ELF64_R_TYPE (rel->r_info); + unsigned int r_symndx = ELF64_R_SYM (rel->r_info); - if (htab->tls_get_addr_fd != NULL) + if (r_symndx >= symtab_hdr->sh_info && is_branch_reloc (r_type)) { - struct ppc_link_hash_entry *h = htab->tls_get_addr_fd; - - while (h->elf.root.type == bfd_link_hash_indirect - || h->elf.root.type == bfd_link_hash_warning) - h = (struct ppc_link_hash_entry *) h->elf.root.u.i.link; + struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (ibfd); + struct elf_link_hash_entry *h; - htab->tls_get_addr_fd = h; + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + h = elf_follow_link (h); + if (h == &hash1->elf || h == &hash2->elf) + return TRUE; } - - return _bfd_elf_tls_setup (obfd, info); + return FALSE; } /* Run through all the TLS relocs looking for optimization @@ -7053,6 +7492,8 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) case R_PPC64_TOC16: case R_PPC64_TOC16_LO: case R_PPC64_TLS: + case R_PPC64_TLSGD: + case R_PPC64_TLSLD: if (sym_sec == NULL || sym_sec != toc) continue; @@ -7073,7 +7514,9 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) value += rel->r_addend; BFD_ASSERT (value < toc->size && value % 8 == 0); toc_ref_index = value / 8; - if (r_type == R_PPC64_TLS) + if (r_type == R_PPC64_TLS + || r_type == R_PPC64_TLSGD + || r_type == R_PPC64_TLSLD) { toc_ref[toc_ref_index] = 1; continue; @@ -7138,58 +7581,30 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) if (pass == 0) { - if (!expecting_tls_get_addr) + if (!expecting_tls_get_addr + || !sec->has_tls_get_addr_call) continue; - if (rel + 1 < relend) + if (rel + 1 < relend + && branch_reloc_hash_match (ibfd, rel + 1, + htab->tls_get_addr, + htab->tls_get_addr_fd)) { - Elf_Internal_Shdr *symtab_hdr; - enum elf_ppc64_reloc_type r_type2; - unsigned long r_symndx2; - struct elf_link_hash_entry *h2; - - symtab_hdr = &elf_symtab_hdr (ibfd); - - /* The next instruction should be a call to - __tls_get_addr. Peek at the reloc to be sure. */ - r_type2 = ELF64_R_TYPE (rel[1].r_info); - r_symndx2 = ELF64_R_SYM (rel[1].r_info); - if (r_symndx2 >= symtab_hdr->sh_info - && (r_type2 == R_PPC64_REL14 - || r_type2 == R_PPC64_REL14_BRTAKEN - || r_type2 == R_PPC64_REL14_BRNTAKEN - || r_type2 == R_PPC64_REL24)) + if (expecting_tls_get_addr == 2) { - struct elf_link_hash_entry **sym_hashes; - - sym_hashes = elf_sym_hashes (ibfd); - - h2 = sym_hashes[r_symndx2 - symtab_hdr->sh_info]; - while (h2->root.type == bfd_link_hash_indirect - || h2->root.type == bfd_link_hash_warning) - h2 = ((struct elf_link_hash_entry *) - h2->root.u.i.link); - if (h2 != NULL - && (h2 == &htab->tls_get_addr->elf - || h2 == &htab->tls_get_addr_fd->elf)) - { - if (expecting_tls_get_addr == 2) - { - /* Check for toc tls entries. */ - char *toc_tls; - int retval; - - retval = get_tls_mask (&toc_tls, NULL, - &locsyms, - rel, ibfd); - if (retval == 0) - goto err_free_rel; - if (retval > 1 && toc_tls != NULL) - toc_ref[toc_ref_index] = 1; - } - continue; - } + /* Check for toc tls entries. */ + char *toc_tls; + int retval; + + retval = get_tls_mask (&toc_tls, NULL, NULL, + &locsyms, + rel, ibfd); + if (retval == 0) + goto err_free_rel; + if (retval > 1 && toc_tls != NULL) + toc_ref[toc_ref_index] = 1; } + continue; } if (expecting_tls_get_addr != 1) @@ -7286,18 +7701,18 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) free (relstart); } - if (toc_ref != NULL) - free (toc_ref); + if (toc_ref != NULL) + free (toc_ref); - if (locsyms != NULL - && (elf_symtab_hdr (ibfd).contents != (unsigned char *) locsyms)) - { - if (!info->keep_memory) - free (locsyms); - else - elf_symtab_hdr (ibfd).contents = (unsigned char *) locsyms; - } - } + if (locsyms != NULL + && (elf_symtab_hdr (ibfd).contents != (unsigned char *) locsyms)) + { + if (!info->keep_memory) + free (locsyms); + else + elf_symtab_hdr (ibfd).contents = (unsigned char *) locsyms; + } + } return TRUE; } @@ -7776,37 +8191,49 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) info = (struct bfd_link_info *) inf; htab = ppc_hash_table (info); - if (htab->elf.dynamic_sections_created - && h->dynindx != -1 - && WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h)) + if ((htab->elf.dynamic_sections_created + && h->dynindx != -1 + && WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h)) + || h->type == STT_GNU_IFUNC) { struct plt_entry *pent; bfd_boolean doneone = FALSE; for (pent = h->plt.plist; pent != NULL; pent = pent->next) if (pent->plt.refcount > 0) { - /* If this is the first .plt entry, make room for the special - first entry. */ - s = htab->plt; - if (s->size == 0) - s->size += PLT_INITIAL_ENTRY_SIZE; - - pent->plt.offset = s->size; - - /* Make room for this entry. */ - s->size += PLT_ENTRY_SIZE; - - /* Make room for the .glink code. */ - s = htab->glink; - if (s->size == 0) - s->size += GLINK_CALL_STUB_SIZE; - /* We need bigger stubs past index 32767. */ - if (s->size >= GLINK_CALL_STUB_SIZE + 32768*2*4) - s->size += 4; - s->size += 2*4; - - /* We also need to make an entry in the .rela.plt section. */ - s = htab->relplt; + if (!htab->elf.dynamic_sections_created + || h->dynindx == -1) + { + s = htab->iplt; + pent->plt.offset = s->size; + s->size += PLT_ENTRY_SIZE; + s = htab->reliplt; + } + else + { + /* If this is the first .plt entry, make room for the special + first entry. */ + s = htab->plt; + if (s->size == 0) + s->size += PLT_INITIAL_ENTRY_SIZE; + + pent->plt.offset = s->size; + + /* Make room for this entry. */ + s->size += PLT_ENTRY_SIZE; + + /* Make room for the .glink code. */ + s = htab->glink; + if (s->size == 0) + s->size += GLINK_CALL_STUB_SIZE; + /* We need bigger stubs past index 32767. */ + if (s->size >= GLINK_CALL_STUB_SIZE + 32768*2*4) + s->size += 4; + s->size += 2*4; + + /* We also need to make an entry in the .rela.plt section. */ + s = htab->relplt; + } s->size += sizeof (Elf64_External_Rela); doneone = TRUE; } @@ -7854,12 +8281,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (gent->got.refcount > 0) { bfd_boolean dyn; + asection *rsec; /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic, nor will all TLS symbols. */ if (h->dynindx == -1 && !h->forced_local + && h->type != STT_GNU_IFUNC && htab->elf.dynamic_sections_created) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) @@ -7882,20 +8311,25 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) s->size += (gent->tls_type & eh->tls_mask & (TLS_GD | TLS_LD)) ? 16 : 8; dyn = htab->elf.dynamic_sections_created; + rsec = NULL; if ((info->shared || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)) && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak)) - ppc64_elf_tdata (gent->owner)->relgot->size - += (gent->tls_type & eh->tls_mask & TLS_GD - ? 2 * sizeof (Elf64_External_Rela) - : sizeof (Elf64_External_Rela)); + rsec = ppc64_elf_tdata (gent->owner)->relgot; + else if (h->type == STT_GNU_IFUNC) + rsec = htab->reliplt; + if (rsec != NULL) + rsec->size += (gent->tls_type & eh->tls_mask & TLS_GD + ? 2 * sizeof (Elf64_External_Rela) + : sizeof (Elf64_External_Rela)); } else gent->got.offset = (bfd_vma) -1; if (eh->dyn_relocs == NULL - || !htab->elf.dynamic_sections_created) + || (!htab->elf.dynamic_sections_created + && h->type != STT_GNU_IFUNC)) return TRUE; /* In the shared -Bsymbolic case, discard space allocated for @@ -7945,6 +8379,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) } } } + else if (h->type == STT_GNU_IFUNC) + { + if (!h->non_got_ref) + eh->dyn_relocs = NULL; + } else if (ELIMINATE_COPY_RELOCS) { /* For the non-shared case, discard space for relocs against @@ -7978,6 +8417,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) for (p = eh->dyn_relocs; p != NULL; p = p->next) { asection *sreloc = elf_section_data (p->sec)->sreloc; + if (!htab->elf.dynamic_sections_created) + sreloc = htab->reliplt; sreloc->size += p->count * sizeof (Elf64_External_Rela); } @@ -8049,6 +8490,8 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { struct got_entry **lgot_ents; struct got_entry **end_lgot_ents; + struct plt_entry **local_plt; + struct plt_entry **end_local_plt; char *lgot_masks; bfd_size_type locsymcount; Elf_Internal_Shdr *symtab_hdr; @@ -8074,6 +8517,8 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else if (p->count != 0) { srel = elf_section_data (p->sec)->sreloc; + if (!htab->elf.dynamic_sections_created) + srel = htab->reliplt; srel->size += p->count * sizeof (Elf64_External_Rela); if ((p->sec->output_section->flags & SEC_READONLY) != 0) info->flags |= DF_TEXTREL; @@ -8088,7 +8533,9 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, symtab_hdr = &elf_symtab_hdr (ibfd); locsymcount = symtab_hdr->sh_info; end_lgot_ents = lgot_ents + locsymcount; - lgot_masks = (char *) end_lgot_ents; + local_plt = (struct plt_entry **) end_lgot_ents; + end_local_plt = local_plt + locsymcount; + lgot_masks = (char *) end_local_plt; s = ppc64_elf_tdata (ibfd)->got; srel = ppc64_elf_tdata (ibfd)->relgot; for (; lgot_ents < end_lgot_ents; ++lgot_ents, ++lgot_masks) @@ -8105,24 +8552,39 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, } else { + unsigned int num = 1; ent->got.offset = s->size; if ((ent->tls_type & *lgot_masks & TLS_GD) != 0) - { - s->size += 16; - if (info->shared) - srel->size += 2 * sizeof (Elf64_External_Rela); - } - else - { - s->size += 8; - if (info->shared) - srel->size += sizeof (Elf64_External_Rela); - } + num = 2; + s->size += num * 8; + if (info->shared) + srel->size += num * sizeof (Elf64_External_Rela); + else if ((*lgot_masks & PLT_IFUNC) != 0) + htab->reliplt->size += num * sizeof (Elf64_External_Rela); } } else ent->got.offset = (bfd_vma) -1; } + + /* Allocate space for calls to local STT_GNU_IFUNC syms in .iplt. */ + for (; local_plt < end_local_plt; ++local_plt) + { + struct plt_entry *ent; + + for (ent = *local_plt; ent != NULL; ent = ent->next) + if (ent->plt.refcount > 0) + { + asection *s = htab->iplt; + + ent->plt.offset = s->size; + s->size += PLT_ENTRY_SIZE; + + htab->reliplt->size += sizeof (Elf64_External_Rela); + } + else + ent->plt.offset = (bfd_vma) -1; + } } /* Allocate global sym .plt and .got entries, and space for global @@ -8162,6 +8624,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, continue; else if (s == htab->got || s == htab->plt + || s == htab->iplt || s == htab->glink || s == htab->dynbss) { @@ -8282,6 +8745,12 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, return FALSE; } + if (!htab->no_tls_get_addr_opt + && htab->tls_get_addr_fd != NULL + && htab->tls_get_addr_fd->elf.plt.plist != NULL + && !add_dynamic_entry (DT_PPC64_TLSOPT, 0)) + return FALSE; + if (relocs) { if (!add_dynamic_entry (DT_RELA, 0) @@ -8312,6 +8781,7 @@ static inline enum ppc_stub_type ppc_type_of_stub (asection *input_sec, const Elf_Internal_Rela *rel, struct ppc_link_hash_entry **hash, + struct plt_entry **plt_ent, bfd_vma destination) { struct ppc_link_hash_entry *h = *hash; @@ -8322,23 +8792,20 @@ ppc_type_of_stub (asection *input_sec, if (h != NULL) { + struct plt_entry *ent; struct ppc_link_hash_entry *fdh = h; - if (fdh->oh != NULL - && fdh->oh->is_func_descriptor) - fdh = fdh->oh; - - if (fdh->elf.dynindx != -1) - { - struct plt_entry *ent; + if (h->oh != NULL + && h->oh->is_func_descriptor) + fdh = ppc_follow_link (h->oh); - for (ent = fdh->elf.plt.plist; ent != NULL; ent = ent->next) - if (ent->addend == rel->r_addend - && ent->plt.offset != (bfd_vma) -1) - { - *hash = fdh; - return ppc_stub_plt_call; - } - } + for (ent = fdh->elf.plt.plist; ent != NULL; ent = ent->next) + if (ent->addend == rel->r_addend + && ent->plt.offset != (bfd_vma) -1) + { + *hash = fdh; + *plt_ent = ent; + return ppc_stub_plt_call; + } /* Here, we know we don't have a plt entry. If we don't have a either a defined function descriptor or a defined entry symbol @@ -8352,6 +8819,26 @@ ppc_type_of_stub (asection *input_sec, && h->elf.root.u.def.section->output_section != NULL)) return ppc_stub_none; } + else if (elf_local_got_ents (input_sec->owner) != NULL) + { + Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (input_sec->owner); + struct plt_entry **local_plt = (struct plt_entry **) + elf_local_got_ents (input_sec->owner) + symtab_hdr->sh_info; + unsigned long r_symndx = ELF64_R_SYM (rel->r_info); + + if (local_plt[r_symndx] != NULL) + { + struct plt_entry *ent; + + for (ent = local_plt[r_symndx]; ent != NULL; ent = ent->next) + if (ent->addend == rel->r_addend + && ent->plt.offset != (bfd_vma) -1) + { + *plt_ent = ent; + return ppc_stub_plt_call; + } + } + } /* Determine where the call point is. */ location = (input_sec->output_offset @@ -8457,6 +8944,49 @@ build_plt_stub (bfd *obfd, bfd_byte *p, int offset, Elf_Internal_Rela *r) return p; } +/* Build a special .plt call stub for __tls_get_addr. */ + +#define LD_R11_0R3 0xe9630000 +#define LD_R12_0R3 0xe9830000 +#define MR_R0_R3 0x7c601b78 +#define CMPDI_R11_0 0x2c2b0000 +#define ADD_R3_R12_R13 0x7c6c6a14 +#define BEQLR 0x4d820020 +#define MR_R3_R0 0x7c030378 +#define MFLR_R11 0x7d6802a6 +#define STD_R11_0R1 0xf9610000 +#define BCTRL 0x4e800421 +#define LD_R11_0R1 0xe9610000 +#define LD_R2_0R1 0xe8410000 +#define MTLR_R11 0x7d6803a6 + +static inline bfd_byte * +build_tls_get_addr_stub (bfd *obfd, bfd_byte *p, int offset, + Elf_Internal_Rela *r) +{ + bfd_put_32 (obfd, LD_R11_0R3 + 0, p), p += 4; + bfd_put_32 (obfd, LD_R12_0R3 + 8, p), p += 4; + bfd_put_32 (obfd, MR_R0_R3, p), p += 4; + bfd_put_32 (obfd, CMPDI_R11_0, p), p += 4; + bfd_put_32 (obfd, ADD_R3_R12_R13, p), p += 4; + bfd_put_32 (obfd, BEQLR, p), p += 4; + bfd_put_32 (obfd, MR_R3_R0, p), p += 4; + bfd_put_32 (obfd, MFLR_R11, p), p += 4; + bfd_put_32 (obfd, STD_R11_0R1 + 32, p), p += 4; + + if (r != NULL) + r[0].r_offset += 9 * 4; + p = build_plt_stub (obfd, p, offset, r); + bfd_put_32 (obfd, BCTRL, p - 4); + + bfd_put_32 (obfd, LD_R11_0R1 + 32, p), p += 4; + bfd_put_32 (obfd, LD_R2_0R1 + 40, p), p += 4; + bfd_put_32 (obfd, MTLR_R11, p), p += 4; + bfd_put_32 (obfd, BLR, p), p += 4; + + return p; +} + static Elf_Internal_Rela * get_relocs (asection *sec, int count) { @@ -8492,10 +9022,10 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) struct ppc_link_hash_table *htab; bfd_byte *loc; bfd_byte *p; - struct plt_entry *ent; bfd_vma dest, off; int size; Elf_Internal_Rela *r; + asection *plt; /* Massage our args to the form they really have. */ stub_entry = (struct ppc_stub_hash_entry *) gen_entry; @@ -8583,7 +9113,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) hashes[symndx] = &h->elf; r->r_info = ELF64_R_INFO (symndx, R_PPC64_REL24); if (h->oh != NULL && h->oh->is_func) - h = h->oh; + h = ppc_follow_link (h->oh); if (h->elf.root.u.def.section != stub_entry->target_section) /* H is an opd symbol. The addend must be zero. */ r->r_addend = 0; @@ -8748,47 +9278,65 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) break; case ppc_stub_plt_call: - /* Do the best we can for shared libraries built without - exporting ".foo" for each "foo". This can happen when symbol - versioning scripts strip all bar a subset of symbols. */ - if (stub_entry->h->oh != NULL - && stub_entry->h->oh->elf.root.type != bfd_link_hash_defined - && stub_entry->h->oh->elf.root.type != bfd_link_hash_defweak) - { - /* Point the symbol at the stub. There may be multiple stubs, - we don't really care; The main thing is to make this sym - defined somewhere. Maybe defining the symbol in the stub - section is a silly idea. If we didn't do this, htab->top_id - could disappear. */ - stub_entry->h->oh->elf.root.type = bfd_link_hash_defined; - stub_entry->h->oh->elf.root.u.def.section = stub_entry->stub_sec; - stub_entry->h->oh->elf.root.u.def.value = stub_entry->stub_offset; + if (stub_entry->h != NULL + && stub_entry->h->is_func_descriptor + && stub_entry->h->oh != NULL) + { + struct ppc_link_hash_entry *fh = ppc_follow_link (stub_entry->h->oh); + + /* If the old-ABI "dot-symbol" is undefined make it weak so + we don't get a link error from RELOC_FOR_GLOBAL_SYMBOL. + FIXME: We used to define the symbol on one of the call + stubs instead, which is why we test symbol section id + against htab->top_id in various places. Likely all + these checks could now disappear. */ + if (fh->elf.root.type == bfd_link_hash_undefined) + fh->elf.root.type = bfd_link_hash_undefweak; } /* Now build the stub. */ - dest = (bfd_vma) -1; - for (ent = stub_entry->h->elf.plt.plist; ent != NULL; ent = ent->next) - if (ent->addend == stub_entry->addend) - { - dest = ent->plt.offset; - break; - } + dest = stub_entry->plt_ent->plt.offset & ~1; if (dest >= (bfd_vma) -2) abort (); - dest &= ~ (bfd_vma) 1; - dest += (htab->plt->output_offset - + htab->plt->output_section->vma); + plt = htab->plt; + if (!htab->elf.dynamic_sections_created + || stub_entry->h == NULL + || stub_entry->h->elf.dynindx == -1) + plt = htab->iplt; + + dest += plt->output_offset + plt->output_section->vma; + + if (stub_entry->h == NULL + && (stub_entry->plt_ent->plt.offset & 1) == 0) + { + Elf_Internal_Rela rela; + bfd_byte *rl; + + rela.r_offset = dest; + rela.r_info = ELF64_R_INFO (0, R_PPC64_JMP_IREL); + rela.r_addend = (stub_entry->target_value + + stub_entry->target_section->output_offset + + stub_entry->target_section->output_section->vma); + + rl = (htab->reliplt->contents + + (htab->reliplt->reloc_count++ + * sizeof (Elf64_External_Rela))); + bfd_elf64_swap_reloca_out (info->output_bfd, &rela, rl); + stub_entry->plt_ent->plt.offset |= 1; + } off = (dest - - elf_gp (htab->plt->output_section->owner) + - elf_gp (plt->output_section->owner) - htab->stub_group[stub_entry->id_sec->id].toc_off); if (off + 0x80008000 > 0xffffffff || (off & 7) != 0) { (*_bfd_error_handler) (_("linkage table error against `%s'"), - stub_entry->h->elf.root.root.string); + stub_entry->h != NULL + ? stub_entry->h->elf.root.root.string + : ""); bfd_set_error (bfd_error_bad_value); htab->stub_error = TRUE; return FALSE; @@ -8807,7 +9355,13 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) r[0].r_offset += 2; r[0].r_addend = dest; } - p = build_plt_stub (htab->stub_bfd, loc, off, r); + if (stub_entry->h != NULL + && (stub_entry->h == htab->tls_get_addr_fd + || stub_entry->h == htab->tls_get_addr) + && !htab->no_tls_get_addr_opt) + p = build_tls_get_addr_stub (htab->stub_bfd, loc, off, r); + else + p = build_plt_stub (htab->stub_bfd, loc, off, r); size = p - loc; break; @@ -8877,19 +9431,18 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (stub_entry->stub_type == ppc_stub_plt_call) { - struct plt_entry *ent; - off = (bfd_vma) -1; - for (ent = stub_entry->h->elf.plt.plist; ent != NULL; ent = ent->next) - if (ent->addend == stub_entry->addend) - { - off = ent->plt.offset & ~(bfd_vma) 1; - break; - } + asection *plt; + off = stub_entry->plt_ent->plt.offset & ~(bfd_vma) 1; if (off >= (bfd_vma) -2) abort (); - off += (htab->plt->output_offset - + htab->plt->output_section->vma - - elf_gp (htab->plt->output_section->owner) + plt = htab->plt; + if (!htab->elf.dynamic_sections_created + || stub_entry->h == NULL + || stub_entry->h->elf.dynindx == -1) + plt = htab->iplt; + off += (plt->output_offset + + plt->output_section->vma + - elf_gp (plt->output_section->owner) - htab->stub_group[stub_entry->id_sec->id].toc_off); size = PLT_CALL_STUB_SIZE; @@ -8897,6 +9450,11 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) size -= 4; if (PPC_HA (off + 16) != PPC_HA (off)) size += 4; + if (stub_entry->h != NULL + && (stub_entry->h == htab->tls_get_addr_fd + || stub_entry->h == htab->tls_get_addr) + && !htab->no_tls_get_addr_opt) + size += 13 * 4; if (info->emitrelocations) { stub_entry->stub_sec->reloc_count @@ -9181,7 +9739,7 @@ toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec) if (eh != NULL && (eh->elf.plt.plist != NULL || (eh->oh != NULL - && eh->oh->elf.plt.plist != NULL))) + && ppc_follow_link (eh->oh)->elf.plt.plist != NULL))) { ret = 1; break; @@ -9563,7 +10121,7 @@ ppc64_elf_size_stubs (bfd *output_bfd, enum ppc_stub_type stub_type; struct ppc_stub_hash_entry *stub_entry; asection *sym_sec, *code_sec; - bfd_vma sym_value; + bfd_vma sym_value, code_value; bfd_vma destination; bfd_boolean ok_dest; struct ppc_link_hash_entry *hash; @@ -9573,6 +10131,7 @@ ppc64_elf_size_stubs (bfd *output_bfd, char *stub_name; const asection *id_sec; struct _opd_sec_data *opd; + struct plt_entry *plt_ent; r_type = ELF64_R_TYPE (irela->r_info); r_indx = ELF64_R_SYM (irela->r_info); @@ -9619,7 +10178,7 @@ ppc64_elf_size_stubs (bfd *output_bfd, use the func descriptor sym instead if it is defined. */ if (hash->elf.root.root.string[0] == '.' - && (fdh = get_fdh (hash, htab)) != NULL) + && (fdh = lookup_fdh (hash, htab)) != NULL) { if (fdh->elf.root.type == bfd_link_hash_defined || fdh->elf.root.type == bfd_link_hash_defweak) @@ -9649,6 +10208,7 @@ ppc64_elf_size_stubs (bfd *output_bfd, } code_sec = sym_sec; + code_value = sym_value; opd = get_opd_info (sym_sec); if (opd != NULL) { @@ -9659,10 +10219,11 @@ ppc64_elf_size_stubs (bfd *output_bfd, long adjust = opd->adjust[sym_value / 8]; if (adjust == -1) continue; + code_value += adjust; sym_value += adjust; } dest = opd_entry_value (sym_sec, sym_value, - &code_sec, &sym_value); + &code_sec, &code_value); if (dest != (bfd_vma) -1) { destination = dest; @@ -9672,14 +10233,15 @@ ppc64_elf_size_stubs (bfd *output_bfd, entry. */ hash->elf.root.type = bfd_link_hash_defweak; hash->elf.root.u.def.section = code_sec; - hash->elf.root.u.def.value = sym_value; + hash->elf.root.u.def.value = code_value; } } } /* Determine what (if any) linker stub is needed. */ + plt_ent = NULL; stub_type = ppc_type_of_stub (section, irela, &hash, - destination); + &plt_ent, destination); if (stub_type != ppc_stub_plt_call) { @@ -9712,7 +10274,7 @@ ppc64_elf_size_stubs (bfd *output_bfd, /* Get tls info. */ char *tls_mask; - if (!get_tls_mask (&tls_mask, NULL, &local_syms, + if (!get_tls_mask (&tls_mask, NULL, NULL, &local_syms, irela - 1, input_bfd)) goto error_ret_free_internal; if (*tls_mask != 0) @@ -9752,9 +10314,18 @@ ppc64_elf_size_stubs (bfd *output_bfd, } stub_entry->stub_type = stub_type; - stub_entry->target_value = sym_value; - stub_entry->target_section = code_sec; + if (stub_type != ppc_stub_plt_call) + { + stub_entry->target_value = code_value; + stub_entry->target_section = code_sec; + } + else + { + stub_entry->target_value = sym_value; + stub_entry->target_section = sym_sec; + } stub_entry->h = hash; + stub_entry->plt_ent = plt_ent; stub_entry->addend = irela->r_addend; if (stub_entry->h != NULL) @@ -9840,13 +10411,13 @@ ppc64_elf_toc (bfd *obfd) /* The TOC consists of sections .got, .toc, .tocbss, .plt in that order. The TOC starts where the first of these sections starts. */ s = bfd_get_section_by_name (obfd, ".got"); - if (s == NULL) + if (s == NULL || (s->flags & SEC_EXCLUDE) != 0) s = bfd_get_section_by_name (obfd, ".toc"); - if (s == NULL) + if (s == NULL || (s->flags & SEC_EXCLUDE) != 0) s = bfd_get_section_by_name (obfd, ".tocbss"); - if (s == NULL) + if (s == NULL || (s->flags & SEC_EXCLUDE) != 0) s = bfd_get_section_by_name (obfd, ".plt"); - if (s == NULL) + if (s == NULL || (s->flags & SEC_EXCLUDE) != 0) { /* This may happen for o references to TOC base (SYM@toc / TOC[tc0]) without a @@ -9859,21 +10430,23 @@ ppc64_elf_toc (bfd *obfd) /* Look for a likely section. We probably won't even be using TOCstart. */ for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA | SEC_READONLY)) + if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA | SEC_READONLY + | SEC_EXCLUDE)) == (SEC_ALLOC | SEC_SMALL_DATA)) break; if (s == NULL) for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA)) + if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA | SEC_EXCLUDE)) == (SEC_ALLOC | SEC_SMALL_DATA)) break; if (s == NULL) for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & (SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC) + if ((s->flags & (SEC_ALLOC | SEC_READONLY | SEC_EXCLUDE)) + == SEC_ALLOC) break; if (s == NULL) for (s = obfd->sections; s != NULL; s = s->next) - if ((s->flags & SEC_ALLOC) == SEC_ALLOC) + if ((s->flags & (SEC_ALLOC | SEC_EXCLUDE)) == SEC_ALLOC) break; } @@ -10204,6 +10777,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, struct ppc_link_hash_entry *fdh; const char *sym_name; unsigned long r_symndx, toc_symndx; + bfd_vma toc_addend; char tls_mask, tls_gd, tls_type; char sym_type; bfd_vma relocation; @@ -10297,28 +10871,30 @@ ppc64_elf_relocate_section (bfd *output_bfd, tls_mask = 0; tls_gd = 0; toc_symndx = 0; - if (IS_PPC64_TLS_RELOC (r_type)) + if (h != NULL) + tls_mask = h->tls_mask; + else if (local_got_ents != NULL) { - if (h != NULL) - tls_mask = h->tls_mask; - else if (local_got_ents != NULL) - { - char *lgot_masks; - lgot_masks = (char *) (local_got_ents + symtab_hdr->sh_info); - tls_mask = lgot_masks[r_symndx]; - } - if (tls_mask == 0 && r_type == R_PPC64_TLS) - { - /* Check for toc tls entries. */ - char *toc_tls; + struct plt_entry **local_plt = (struct plt_entry **) + (local_got_ents + symtab_hdr->sh_info); + char *lgot_masks = (char *) + (local_plt + symtab_hdr->sh_info); + tls_mask = lgot_masks[r_symndx]; + } + if (tls_mask == 0 + && (r_type == R_PPC64_TLS + || r_type == R_PPC64_TLSGD + || r_type == R_PPC64_TLSLD)) + { + /* Check for toc tls entries. */ + char *toc_tls; - if (!get_tls_mask (&toc_tls, &toc_symndx, &local_syms, - rel, input_bfd)) - return FALSE; + if (!get_tls_mask (&toc_tls, &toc_symndx, &toc_addend, + &local_syms, rel, input_bfd)) + return FALSE; - if (toc_tls) - tls_mask = *toc_tls; - } + if (toc_tls) + tls_mask = *toc_tls; } /* Check that tls relocs are used with tls syms, and non-tls @@ -10333,7 +10909,10 @@ ppc64_elf_relocate_section (bfd *output_bfd, || (sym_type == STT_SECTION && (sec->flags & SEC_THREAD_LOCAL) != 0)))) { - if (r_type == R_PPC64_TLS && tls_mask != 0) + if (tls_mask != 0 + && (r_type == R_PPC64_TLS + || r_type == R_PPC64_TLSGD + || r_type == R_PPC64_TLSLD)) /* R_PPC64_TLS is OK against a symbol in the TOC. */ ; else @@ -10375,8 +10954,8 @@ ppc64_elf_relocate_section (bfd *output_bfd, char *toc_tls; int retval; - retval = get_tls_mask (&toc_tls, &toc_symndx, &local_syms, - rel, input_bfd); + retval = get_tls_mask (&toc_tls, &toc_symndx, &toc_addend, + &local_syms, rel, input_bfd); if (retval == 0) return FALSE; @@ -10424,6 +11003,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, if (toc_symndx != 0) { rel->r_info = ELF64_R_INFO (toc_symndx, r_type); + rel->r_addend = toc_addend; /* We changed the symbol. Start over in order to get h, sym, sec etc. right. */ rel--; @@ -10477,6 +11057,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, if (toc_symndx != 0) { rel->r_info = ELF64_R_INFO (toc_symndx, r_type); + rel->r_addend = toc_addend; /* We changed the symbol. Start over in order to get h, sym, sec etc. right. */ rel--; @@ -10523,25 +11104,33 @@ ppc64_elf_relocate_section (bfd *output_bfd, case R_PPC64_GOT_TLSLD16_LO: if (tls_mask != 0 && (tls_mask & TLS_LD) == 0) { - bfd_vma insn1, insn2, insn3; + unsigned int insn1, insn2, insn3; bfd_vma offset; tls_ldgd_opt: - /* We know that the next reloc is on a tls_get_addr - call, since ppc64_elf_tls_optimize checks this. */ - offset = rel[1].r_offset; - insn1 = bfd_get_32 (output_bfd, - contents + rel->r_offset - d_offset); - insn3 = bfd_get_32 (output_bfd, - contents + offset + 4); + offset = (bfd_vma) -1; + /* If not using the newer R_PPC64_TLSGD/LD to mark + __tls_get_addr calls, we must trust that the call + stays with its arg setup insns, ie. that the next + reloc is the __tls_get_addr call associated with + the current reloc. Edit both insns. */ + if (input_section->has_tls_get_addr_call + && rel + 1 < relend + && branch_reloc_hash_match (input_bfd, rel + 1, + htab->tls_get_addr, + htab->tls_get_addr_fd)) + offset = rel[1].r_offset; if ((tls_mask & tls_gd) != 0) { /* IE */ + insn1 = bfd_get_32 (output_bfd, + contents + rel->r_offset - d_offset); insn1 &= (1 << 26) - (1 << 2); insn1 |= 58 << 26; /* ld */ insn2 = 0x7c636a14; /* add 3,3,13 */ - rel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (rel[1].r_info), - R_PPC64_NONE); + if (offset != (bfd_vma) -1) + rel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (rel[1].r_info), + R_PPC64_NONE); if ((tls_mask & TLS_EXPLICIT) == 0) r_type = (((r_type - (R_PPC64_GOT_TLSGD16 & 3)) & 3) + R_PPC64_GOT_TPREL16_DS); @@ -10571,37 +11160,139 @@ ppc64_elf_relocate_section (bfd *output_bfd, rel->r_addend -= (local_syms[r_symndx].st_value + sec->output_offset + sec->output_section->vma); - rel[1].r_addend = rel->r_addend; } else if (toc_symndx != 0) - r_symndx = toc_symndx; + { + r_symndx = toc_symndx; + rel->r_addend = toc_addend; + } r_type = R_PPC64_TPREL16_HA; rel->r_info = ELF64_R_INFO (r_symndx, r_type); - rel[1].r_info = ELF64_R_INFO (r_symndx, - R_PPC64_TPREL16_LO); - rel[1].r_offset += d_offset; + if (offset != (bfd_vma) -1) + { + rel[1].r_info = ELF64_R_INFO (r_symndx, + R_PPC64_TPREL16_LO); + rel[1].r_offset = offset + d_offset; + rel[1].r_addend = rel->r_addend; + } + } + bfd_put_32 (output_bfd, insn1, + contents + rel->r_offset - d_offset); + if (offset != (bfd_vma) -1) + { + insn3 = bfd_get_32 (output_bfd, + contents + offset + 4); + if (insn3 == NOP + || insn3 == CROR_151515 || insn3 == CROR_313131) + { + rel[1].r_offset += 4; + bfd_put_32 (output_bfd, insn2, contents + offset + 4); + insn2 = NOP; + } + bfd_put_32 (output_bfd, insn2, contents + offset); + } + if ((tls_mask & tls_gd) == 0 + && (tls_gd == 0 || toc_symndx != 0)) + { + /* We changed the symbol. Start over in order + to get h, sym, sec etc. right. */ + rel--; + continue; } + } + break; + + case R_PPC64_TLSGD: + if (tls_mask != 0 && (tls_mask & TLS_GD) == 0) + { + unsigned int insn2, insn3; + bfd_vma offset = rel->r_offset; + + if ((tls_mask & TLS_TPRELGD) != 0) + { + /* IE */ + r_type = R_PPC64_NONE; + insn2 = 0x7c636a14; /* add 3,3,13 */ + } + else + { + /* LE */ + if (toc_symndx != 0) + { + r_symndx = toc_symndx; + rel->r_addend = toc_addend; + } + r_type = R_PPC64_TPREL16_LO; + rel->r_offset = offset + d_offset; + insn2 = 0x38630000; /* addi 3,3,0 */ + } + rel->r_info = ELF64_R_INFO (r_symndx, r_type); + /* Zap the reloc on the _tls_get_addr call too. */ + BFD_ASSERT (offset == rel[1].r_offset); + rel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (rel[1].r_info), + R_PPC64_NONE); + insn3 = bfd_get_32 (output_bfd, + contents + offset + 4); if (insn3 == NOP || insn3 == CROR_151515 || insn3 == CROR_313131) { - insn3 = insn2; + rel->r_offset += 4; + bfd_put_32 (output_bfd, insn2, contents + offset + 4); insn2 = NOP; - rel[1].r_offset += 4; } - bfd_put_32 (output_bfd, insn1, - contents + rel->r_offset - d_offset); bfd_put_32 (output_bfd, insn2, contents + offset); - bfd_put_32 (output_bfd, insn3, contents + offset + 4); - if (tls_gd == 0 || toc_symndx != 0) + if ((tls_mask & TLS_TPRELGD) == 0 && toc_symndx != 0) { - /* We changed the symbol. Start over in order - to get h, sym, sec etc. right. */ rel--; continue; } } break; + case R_PPC64_TLSLD: + if (tls_mask != 0 && (tls_mask & TLS_LD) == 0) + { + unsigned int insn2, insn3; + bfd_vma offset = rel->r_offset; + + if (toc_symndx) + sec = local_sections[toc_symndx]; + for (r_symndx = 0; + r_symndx < symtab_hdr->sh_info; + r_symndx++) + if (local_sections[r_symndx] == sec) + break; + if (r_symndx >= symtab_hdr->sh_info) + r_symndx = 0; + rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET; + if (r_symndx != 0) + rel->r_addend -= (local_syms[r_symndx].st_value + + sec->output_offset + + sec->output_section->vma); + + r_type = R_PPC64_TPREL16_LO; + rel->r_info = ELF64_R_INFO (r_symndx, r_type); + rel->r_offset = offset + d_offset; + /* Zap the reloc on the _tls_get_addr call too. */ + BFD_ASSERT (offset == rel[1].r_offset); + rel[1].r_info = ELF64_R_INFO (ELF64_R_SYM (rel[1].r_info), + R_PPC64_NONE); + insn2 = 0x38630000; /* addi 3,3,0 */ + insn3 = bfd_get_32 (output_bfd, + contents + offset + 4); + if (insn3 == NOP + || insn3 == CROR_151515 || insn3 == CROR_313131) + { + rel->r_offset += 4; + bfd_put_32 (output_bfd, insn2, contents + offset + 4); + insn2 = NOP; + } + bfd_put_32 (output_bfd, insn2, contents + offset); + rel--; + continue; + } + break; + case R_PPC64_DTPMOD64: if (rel + 1 < relend && rel[1].r_info == ELF64_R_INFO (r_symndx, R_PPC64_DTPREL64) @@ -10675,15 +11366,19 @@ ppc64_elf_relocate_section (bfd *output_bfd, base pointer. */ stub_entry = NULL; fdh = h; - if (((h != NULL - && (((fdh = h->oh) != NULL - && fdh->elf.plt.plist != NULL) - || (fdh = h)->elf.plt.plist != NULL)) + if (h != NULL + && h->oh != NULL + && h->oh->is_func_descriptor) + fdh = ppc_follow_link (h->oh); + if (((fdh != NULL + && fdh->elf.plt.plist != NULL) || (sec != NULL && sec->output_section != NULL && sec->id <= htab->top_id && (htab->stub_group[sec->id].toc_off - != htab->stub_group[input_section->id].toc_off))) + != htab->stub_group[input_section->id].toc_off)) + || (h == NULL + && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)) && (stub_entry = ppc_get_stub_entry (input_section, sec, fdh, rel, htab)) != NULL && (stub_entry->stub_type == ppc_stub_plt_call @@ -10699,8 +11394,16 @@ ppc64_elf_relocate_section (bfd *output_bfd, if (nop == NOP || nop == CROR_151515 || nop == CROR_313131) { - bfd_put_32 (input_bfd, LD_R2_40R1, - contents + rel->r_offset + 4); + if (h != NULL + && (h == htab->tls_get_addr_fd + || h == htab->tls_get_addr) + && !htab->no_tls_get_addr_opt) + { + /* Special stub used, leave nop alone. */ + } + else + bfd_put_32 (input_bfd, LD_R2_40R1, + contents + rel->r_offset + 4); can_plt_call = TRUE; } } @@ -10855,6 +11558,8 @@ ppc64_elf_relocate_section (bfd *output_bfd, case R_PPC64_NONE: case R_PPC64_TLS: + case R_PPC64_TLSGD: + case R_PPC64_TLSLD: case R_PPC64_GNU_VTINHERIT: case R_PPC64_GNU_VTENTRY: continue; @@ -10965,13 +11670,23 @@ ppc64_elf_relocate_section (bfd *output_bfd, /* Generate relocs for the dynamic linker, except in the case of TLSLD where we'll use one entry per module. */ - asection *relgot = ppc64_elf_tdata (input_bfd)->relgot; + asection *relgot; + bfd_boolean ifunc; *offp = off | 1; + relgot = NULL; + ifunc = (h != NULL + ? h->elf.type == STT_GNU_IFUNC + : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC); if ((info->shared || indx != 0) - && (h == NULL + && (offp == &ppc64_tlsld_got (input_bfd)->offset + || h == NULL || ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT || h->elf.root.type != bfd_link_hash_undefweak)) + relgot = ppc64_elf_tdata (input_bfd)->relgot; + else if (ifunc) + relgot = htab->reliplt; + if (relgot != NULL) { outrel.r_offset = (got->output_section->vma + got->output_offset @@ -10998,9 +11713,14 @@ ppc64_elf_relocate_section (bfd *output_bfd, outrel.r_info = ELF64_R_INFO (indx, R_PPC64_DTPREL64); else if (tls_type == (TLS_TLS | TLS_TPREL)) outrel.r_info = ELF64_R_INFO (indx, R_PPC64_TPREL64); - else if (indx == 0) + else if (indx != 0) + outrel.r_info = ELF64_R_INFO (indx, R_PPC64_GLOB_DAT); + else { - outrel.r_info = ELF64_R_INFO (indx, R_PPC64_RELATIVE); + if (ifunc) + outrel.r_info = ELF64_R_INFO (0, R_PPC64_IRELATIVE); + else + outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE); /* Write the .got section contents for the sake of prelink. */ @@ -11008,8 +11728,6 @@ ppc64_elf_relocate_section (bfd *output_bfd, bfd_put_64 (output_bfd, outrel.r_addend + relocation, loc); } - else - outrel.r_info = ELF64_R_INFO (indx, R_PPC64_GLOB_DAT); if (indx == 0 && tls_type != (TLS_TLS | TLS_LD)) { @@ -11128,6 +11846,12 @@ ppc64_elf_relocate_section (bfd *output_bfd, addend -= sec->output_section->vma; break; + case R_PPC64_REL16: + case R_PPC64_REL16_LO: + case R_PPC64_REL16_HI: + case R_PPC64_REL16_HA: + break; + case R_PPC64_REL14: case R_PPC64_REL14_BRNTAKEN: case R_PPC64_REL14_BRTAKEN: @@ -11220,7 +11944,11 @@ ppc64_elf_relocate_section (bfd *output_bfd, && h != NULL && h->elf.dynindx != -1 && !h->elf.non_got_ref - && !h->elf.def_regular)) + && !h->elf.def_regular) + || (!info->shared + && (h != NULL + ? h->elf.type == STT_GNU_IFUNC + : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC))) { Elf_Internal_Rela outrel; bfd_boolean skip, relocate; @@ -11285,19 +12013,42 @@ ppc64_elf_relocate_section (bfd *output_bfd, entry in this lib. */ unresolved_reloc = FALSE; } - outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE); + if (!is_opd + && r_type == R_PPC64_ADDR64 + && (h != NULL + ? h->elf.type == STT_GNU_IFUNC + : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)) + outrel.r_info = ELF64_R_INFO (0, R_PPC64_IRELATIVE); + else + { + outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE); - /* We need to relocate .opd contents for ld.so. - Prelink also wants simple and consistent rules - for relocs. This make all RELATIVE relocs have - *r_offset equal to r_addend. */ - relocate = TRUE; + /* We need to relocate .opd contents for ld.so. + Prelink also wants simple and consistent rules + for relocs. This make all RELATIVE relocs have + *r_offset equal to r_addend. */ + relocate = TRUE; + } } else { long indx = 0; - if (r_symndx == 0 || bfd_is_abs_section (sec)) + if (h != NULL + ? h->elf.type == STT_GNU_IFUNC + : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + { + (*_bfd_error_handler) + (_("%B(%A+0x%lx): relocation %s for indirect " + "function %s unsupported"), + input_bfd, + input_section, + (long) rel->r_offset, + ppc64_elf_howto_table[r_type]->name, + sym_name); + ret = FALSE; + } + else if (r_symndx == 0 || bfd_is_abs_section (sec)) ; else if (sec == NULL || sec->owner == NULL) { @@ -11335,6 +12086,8 @@ ppc64_elf_relocate_section (bfd *output_bfd, } sreloc = elf_section_data (input_section)->sreloc; + if (!htab->elf.dynamic_sections_created) + sreloc = htab->reliplt; if (sreloc == NULL) abort (); @@ -11376,6 +12129,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, case R_PPC64_COPY: case R_PPC64_GLOB_DAT: case R_PPC64_JMP_SLOT: + case R_PPC64_JMP_IREL: case R_PPC64_RELATIVE: /* We shouldn't ever see these dynamic relocs in relocatable files. */ @@ -11408,6 +12162,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, break; case R_PPC64_ADDR16_HA: + case R_PPC64_REL16_HA: case R_PPC64_ADDR16_HIGHERA: case R_PPC64_ADDR16_HIGHESTA: case R_PPC64_TOC16_HA: @@ -11573,7 +12328,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, /* Adjust the value of any local symbols in opd sections. */ -static bfd_boolean +static int ppc64_elf_output_symbol_hook (struct bfd_link_info *info, const char *name ATTRIBUTE_UNUSED, Elf_Internal_Sym *elfsym, @@ -11585,11 +12340,11 @@ ppc64_elf_output_symbol_hook (struct bfd_link_info *info, bfd_vma value; if (h != NULL) - return TRUE; + return 1; opd = get_opd_info (input_sec); if (opd == NULL || opd->adjust == NULL) - return TRUE; + return 1; value = elfsym->st_value - input_sec->output_offset; if (!info->relocatable) @@ -11597,10 +12352,10 @@ ppc64_elf_output_symbol_hook (struct bfd_link_info *info, adjust = opd->adjust[value / 8]; if (adjust == -1) - elfsym->st_value = 0; - else - elfsym->st_value += adjust; - return TRUE; + return 2; + + elfsym->st_value += adjust; + return 1; } /* Finish up dynamic symbol handling. We set the contents of various @@ -11624,23 +12379,36 @@ ppc64_elf_finish_dynamic_symbol (bfd *output_bfd, { /* This symbol has an entry in the procedure linkage table. Set it up. */ - - if (htab->plt == NULL - || htab->relplt == NULL - || htab->glink == NULL) - abort (); - - /* Create a JMP_SLOT reloc to inform the dynamic linker to - fill in the PLT entry. */ - rela.r_offset = (htab->plt->output_section->vma - + htab->plt->output_offset - + ent->plt.offset); - rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_JMP_SLOT); - rela.r_addend = ent->addend; - - loc = htab->relplt->contents; - loc += ((ent->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE - * sizeof (Elf64_External_Rela)); + if (!htab->elf.dynamic_sections_created + || h->dynindx == -1) + { + BFD_ASSERT (h->type == STT_GNU_IFUNC + && h->def_regular + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak)); + rela.r_offset = (htab->iplt->output_section->vma + + htab->iplt->output_offset + + ent->plt.offset); + rela.r_info = ELF64_R_INFO (0, R_PPC64_JMP_IREL); + rela.r_addend = (h->root.u.def.value + + h->root.u.def.section->output_offset + + h->root.u.def.section->output_section->vma + + ent->addend); + loc = (htab->reliplt->contents + + (htab->reliplt->reloc_count++ + * sizeof (Elf64_External_Rela))); + } + else + { + rela.r_offset = (htab->plt->output_section->vma + + htab->plt->output_offset + + ent->plt.offset); + rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_JMP_SLOT); + rela.r_addend = ent->addend; + loc = (htab->relplt->contents + + ((ent->plt.offset - PLT_INITIAL_ENTRY_SIZE) + / (PLT_ENTRY_SIZE / sizeof (Elf64_External_Rela)))); + } bfd_elf64_swap_reloca_out (output_bfd, &rela, loc); } diff --git a/cegcc/src/binutils/bfd/elf64-ppc.h b/cegcc/src/binutils/bfd/elf64-ppc.h index 687b4a1bf..e5f714041 100644 --- a/cegcc/src/binutils/bfd/elf64-ppc.h +++ b/cegcc/src/binutils/bfd/elf64-ppc.h @@ -24,7 +24,7 @@ void ppc64_elf_init_stub_bfd bfd_boolean ppc64_elf_edit_opd (bfd *, struct bfd_link_info *, bfd_boolean); asection *ppc64_elf_tls_setup - (bfd *, struct bfd_link_info *); +(bfd *, struct bfd_link_info *, int); bfd_boolean ppc64_elf_tls_optimize (bfd *, struct bfd_link_info *); bfd_boolean ppc64_elf_edit_toc diff --git a/cegcc/src/binutils/bfd/elf64-s390.c b/cegcc/src/binutils/bfd/elf64-s390.c index 7d8795ec3..fbe86683a 100644 --- a/cegcc/src/binutils/bfd/elf64-s390.c +++ b/cegcc/src/binutils/bfd/elf64-s390.c @@ -1,5 +1,5 @@ /* IBM S/390-specific support for 64-bit ELF - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed Martin Schwidefsky (schwidefsky@de.ibm.com). @@ -685,8 +685,8 @@ struct elf_s390_link_hash_table bfd_vma offset; } tls_ldm_got; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; }; /* Get the s390 ELF linker hash table from a link_info structure. */ @@ -755,7 +755,7 @@ elf_s390_link_hash_table_create (abfd) ret->sdynbss = NULL; ret->srelbss = NULL; ret->tls_ldm_got.refcount = 0; - ret->sym_sec.abfd = NULL; + ret->sym_cache.abfd = NULL; return &ret->elf.root; } @@ -776,18 +776,9 @@ create_got_section (dynobj, info) htab = elf_s390_hash_table (info); htab->sgot = bfd_get_section_by_name (dynobj, ".got"); htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); - if (!htab->sgot || !htab->sgotplt) + htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); + if (!htab->sgot || !htab->sgotplt || !htab->srelgot) abort (); - - htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got", - (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)); - if (htab->srelgot == NULL - || ! bfd_set_section_alignment (dynobj, htab->srelgot, 3)) - return FALSE; return TRUE; } @@ -1228,7 +1219,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs) && ELF64_R_TYPE (rel->r_info) != R_390_PC32DBL && ELF64_R_TYPE (rel->r_info) != R_390_PC64) || (h != NULL - && (! info->symbolic + && (! SYMBOLIC_BIND (info, h) || h->root.type == bfd_link_hash_defweak || !h->def_regular)))) || (ELIMINATE_COPY_RELOCS @@ -1267,15 +1258,19 @@ elf_s390_check_relocs (abfd, info, sec, relocs) /* Track dynamic relocs needed for local syms too. We really need local syms available to do this easily. Oh well. */ - asection *s; void *vpp; + Elf_Internal_Sym *isym; - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (s == NULL) + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; + vpp = &elf_section_data (s)->local_dynrel; head = (struct elf_s390_dyn_relocs **) vpp; } @@ -1541,11 +1536,9 @@ elf_s390_adjust_dynamic_symbol (info, h) || h->needs_plt) { if (h->plt.refcount <= 0 - || (! info->shared - && !h->def_dynamic - && !h->ref_dynamic - && h->root.type != bfd_link_hash_undefweak - && h->root.type != bfd_link_hash_undefined)) + || SYMBOL_CALLS_LOCAL (info, h) + || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + && h->root.type == bfd_link_hash_undefweak)) { /* This case can occur if we saw a PLT32 reloc in an input file, but the symbol was never referred to by a dynamic @@ -1684,9 +1677,7 @@ allocate_dynrelocs (h, inf) htab = elf_s390_hash_table (info); if (htab->elf.dynamic_sections_created - && h->plt.refcount > 0 - && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT - || h->root.type != bfd_link_hash_undefweak)) + && h->plt.refcount > 0) { /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ @@ -1815,7 +1806,7 @@ allocate_dynrelocs (h, inf) if (info->shared) { - if (SYMBOL_REFERENCES_LOCAL (info, h)) + if (SYMBOL_CALLS_LOCAL (info, h)) { struct elf_s390_dyn_relocs **pp; @@ -2340,10 +2331,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section, dyn = htab->elf.dynamic_sections_created; if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h) || (info->shared - && (info->symbolic - || h->dynindx == -1 - || h->forced_local) - && h->def_regular) + && SYMBOL_REFERENCES_LOCAL (info, h)) || (ELF_ST_VISIBILITY (h->other) && h->root.type == bfd_link_hash_undefweak)) { @@ -2519,8 +2507,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section, && r_type != R_390_PC32 && r_type != R_390_PC32DBL && r_type != R_390_PC64) - || (h != NULL - && !SYMBOL_REFERENCES_LOCAL (info, h)))) + || !SYMBOL_CALLS_LOCAL (info, h))) || (ELIMINATE_COPY_RELOCS && !info->shared && h != NULL @@ -2563,7 +2550,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section, || r_type == R_390_PC32DBL || r_type == R_390_PC64 || !info->shared - || !info->symbolic + || !SYMBOLIC_BIND (info, h) || !h->def_regular)) { outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); @@ -3168,11 +3155,10 @@ elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym) The entry in the global offset table will already have been initialized in the relocate_section function. */ if (info->shared - && (info->symbolic - || h->dynindx == -1 - || h->forced_local) - && h->def_regular) + && SYMBOL_REFERENCES_LOCAL (info, h)) { + if (!h->def_regular) + return FALSE; BFD_ASSERT((h->got.offset & 1) != 0); rela.r_info = ELF64_R_INFO (0, R_390_RELATIVE); rela.r_addend = (h->root.u.def.value diff --git a/cegcc/src/binutils/bfd/elf64-sh64.c b/cegcc/src/binutils/bfd/elf64-sh64.c index e76aeb7e7..478197df1 100644 --- a/cegcc/src/binutils/bfd/elf64-sh64.c +++ b/cegcc/src/binutils/bfd/elf64-sh64.c @@ -1,5 +1,5 @@ /* SuperH SH64-specific support for 64-bit ELF - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -2879,7 +2879,7 @@ sh64_elf64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, we don't need to look up and make sure to emit the main symbol for each DataLabel symbol. */ -static bfd_boolean +static int sh64_elf64_link_output_symbol_hook (struct bfd_link_info *info, const char *cname, Elf_Internal_Sym *sym, @@ -2894,7 +2894,7 @@ sh64_elf64_link_output_symbol_hook (struct bfd_link_info *info, name[strlen (name) - strlen (DATALABEL_SUFFIX)] = 0; } - return TRUE; + return 1; } /* Set bit 0 on the entry address; it always points to SHmedia code. This diff --git a/cegcc/src/binutils/bfd/elf64-sparc.c b/cegcc/src/binutils/bfd/elf64-sparc.c index df3fb8bb8..18bdfb4b4 100644 --- a/cegcc/src/binutils/bfd/elf64-sparc.c +++ b/cegcc/src/binutils/bfd/elf64-sparc.c @@ -1,6 +1,6 @@ /* SPARC-specific support for 64-bit ELF Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -538,10 +538,11 @@ elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, static bfd_boolean elf64_sparc_output_arch_syms (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, - PTR finfo, bfd_boolean (*func) (PTR, const char *, - Elf_Internal_Sym *, - asection *, - struct elf_link_hash_entry *)) + PTR finfo, + int (*func) (PTR, const char *, + Elf_Internal_Sym *, + asection *, + struct elf_link_hash_entry *)) { int reg; struct _bfd_sparc_elf_app_reg *app_regs = @@ -585,10 +586,10 @@ elf64_sparc_output_arch_syms (bfd *output_bfd ATTRIBUTE_UNUSED, sym.st_other = 0; sym.st_info = ELF_ST_INFO (app_regs [reg].bind, STT_REGISTER); sym.st_shndx = app_regs [reg].shndx; - if (! (*func) (finfo, app_regs [reg].name, &sym, - sym.st_shndx == SHN_ABS - ? bfd_abs_section_ptr : bfd_und_section_ptr, - NULL)) + if ((*func) (finfo, app_regs [reg].name, &sym, + sym.st_shndx == SHN_ABS + ? bfd_abs_section_ptr : bfd_und_section_ptr, + NULL) != 1) return FALSE; } diff --git a/cegcc/src/binutils/bfd/elf64-x86-64.c b/cegcc/src/binutils/bfd/elf64-x86-64.c index 7e8a0fd98..779ad0f80 100644 --- a/cegcc/src/binutils/bfd/elf64-x86-64.c +++ b/cegcc/src/binutils/bfd/elf64-x86-64.c @@ -1,5 +1,5 @@ /* X86-64 specific support for 64-bit ELF - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Jan Hubicka . @@ -26,6 +26,8 @@ #include "libbfd.h" #include "elf-bfd.h" #include "bfd_stdint.h" +#include "objalloc.h" +#include "hashtab.h" #include "elf/x86-64.h" @@ -143,12 +145,15 @@ static reloc_howto_type x86_64_elf_howto_table[] = complain_overflow_bitfield, bfd_elf_generic_reloc, "R_X86_64_TLSDESC", FALSE, MINUS_ONE, MINUS_ONE, FALSE), + HOWTO(R_X86_64_IRELATIVE, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_IRELATIVE", FALSE, MINUS_ONE, + MINUS_ONE, FALSE), /* We have a gap in the reloc numbers here. R_X86_64_standard counts the number up to this point, and R_X86_64_vt_offset is the value to subtract from a reloc type of R_X86_64_GNU_VT* to form an index into this table. */ -#define R_X86_64_standard (R_X86_64_TLSDESC + 1) +#define R_X86_64_standard (R_X86_64_IRELATIVE + 1) #define R_X86_64_vt_offset (R_X86_64_GNU_VTINHERIT - R_X86_64_standard) /* GNU extension to record C++ vtable hierarchy. */ @@ -161,6 +166,12 @@ static reloc_howto_type x86_64_elf_howto_table[] = FALSE) }; +#define IS_X86_64_PCREL_TYPE(TYPE) \ + ( ((TYPE) == R_X86_64_PC8) \ + || ((TYPE) == R_X86_64_PC16) \ + || ((TYPE) == R_X86_64_PC32) \ + || ((TYPE) == R_X86_64_PC64)) + /* Map BFD relocs to the x86_64 elf relocs. */ struct elf_reloc_map { @@ -205,6 +216,7 @@ static const struct elf_reloc_map x86_64_reloc_map[] = { BFD_RELOC_X86_64_GOTPC32_TLSDESC, R_X86_64_GOTPC32_TLSDESC, }, { BFD_RELOC_X86_64_TLSDESC_CALL, R_X86_64_TLSDESC_CALL, }, { BFD_RELOC_X86_64_TLSDESC, R_X86_64_TLSDESC, }, + { BFD_RELOC_X86_64_IRELATIVE, R_X86_64_IRELATIVE, }, { BFD_RELOC_VTABLE_INHERIT, R_X86_64_GNU_VTINHERIT, }, { BFD_RELOC_VTABLE_ENTRY, R_X86_64_GNU_VTENTRY, }, }; @@ -384,27 +396,6 @@ static const bfd_byte elf64_x86_64_plt_entry[PLT_ENTRY_SIZE] = 0, 0, 0, 0 /* replaced with offset to start of .plt0. */ }; -/* The x86-64 linker needs to keep track of the number of relocs that - it decides to copy as dynamic relocs in check_relocs for each symbol. - This is so that it can later discard them if they are found to be - unnecessary. We store the information in a field extending the - regular ELF linker hash table. */ - -struct elf64_x86_64_dyn_relocs -{ - /* Next section. */ - struct elf64_x86_64_dyn_relocs *next; - - /* The input section of the reloc. */ - asection *sec; - - /* Total number of relocs copied for the input section. */ - bfd_size_type count; - - /* Number of pc-relative relocs copied for the input section. */ - bfd_size_type pc_count; -}; - /* x86-64 ELF linker hash entry. */ struct elf64_x86_64_link_hash_entry @@ -412,7 +403,7 @@ struct elf64_x86_64_link_hash_entry struct elf_link_hash_entry elf; /* Track dynamic relocs copied for this symbol. */ - struct elf64_x86_64_dyn_relocs *dyn_relocs; + struct elf_dyn_relocs *dyn_relocs; #define GOT_UNKNOWN 0 #define GOT_NORMAL 1 @@ -476,11 +467,6 @@ struct elf64_x86_64_link_hash_table struct elf_link_hash_table elf; /* Short-cuts to get to dynamic linker sections. */ - asection *sgot; - asection *sgotplt; - asection *srelgot; - asection *splt; - asection *srelplt; asection *sdynbss; asection *srelbss; @@ -501,11 +487,15 @@ struct elf64_x86_64_link_hash_table /* The amount of space used by the jump slots in the GOT. */ bfd_vma sgotplt_jump_table_size; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; /* _TLS_MODULE_BASE_ symbol. */ struct bfd_link_hash_entry *tls_module_base; + + /* Used by local STT_GNU_IFUNC symbols. */ + htab_t loc_hash_table; + void *loc_hash_memory; }; /* Get the x86-64 ELF linker hash table from a link_info structure. */ @@ -514,20 +504,22 @@ struct elf64_x86_64_link_hash_table ((struct elf64_x86_64_link_hash_table *) ((p)->hash)) #define elf64_x86_64_compute_jump_table_size(htab) \ - ((htab)->srelplt->reloc_count * GOT_ENTRY_SIZE) + ((htab)->elf.srelplt->reloc_count * GOT_ENTRY_SIZE) /* Create an entry in an x86-64 ELF linker hash table. */ static struct bfd_hash_entry * -link_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table, - const char *string) +elf64_x86_64_link_hash_newfunc (struct bfd_hash_entry *entry, + struct bfd_hash_table *table, + const char *string) { /* Allocate the structure if it has not already been allocated by a subclass. */ if (entry == NULL) { - entry = bfd_hash_allocate (table, - sizeof (struct elf64_x86_64_link_hash_entry)); + entry = (struct bfd_hash_entry *) + bfd_hash_allocate (table, + sizeof (struct elf64_x86_64_link_hash_entry)); if (entry == NULL) return entry; } @@ -547,6 +539,75 @@ link_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table, return entry; } +/* Compute a hash of a local hash entry. We use elf_link_hash_entry + for local symbol so that we can handle local STT_GNU_IFUNC symbols + as global symbol. We reuse indx and dynstr_index for local symbol + hash since they aren't used by global symbols in this backend. */ + +static hashval_t +elf64_x86_64_local_htab_hash (const void *ptr) +{ + struct elf_link_hash_entry *h + = (struct elf_link_hash_entry *) ptr; + return ELF_LOCAL_SYMBOL_HASH (h->indx, h->dynstr_index); +} + +/* Compare local hash entries. */ + +static int +elf64_x86_64_local_htab_eq (const void *ptr1, const void *ptr2) +{ + struct elf_link_hash_entry *h1 + = (struct elf_link_hash_entry *) ptr1; + struct elf_link_hash_entry *h2 + = (struct elf_link_hash_entry *) ptr2; + + return h1->indx == h2->indx && h1->dynstr_index == h2->dynstr_index; +} + +/* Find and/or create a hash entry for local symbol. */ + +static struct elf_link_hash_entry * +elf64_x86_64_get_local_sym_hash (struct elf64_x86_64_link_hash_table *htab, + bfd *abfd, const Elf_Internal_Rela *rel, + bfd_boolean create) +{ + struct elf64_x86_64_link_hash_entry e, *ret; + asection *sec = abfd->sections; + hashval_t h = ELF_LOCAL_SYMBOL_HASH (sec->id, + ELF64_R_SYM (rel->r_info)); + void **slot; + + e.elf.indx = sec->id; + e.elf.dynstr_index = ELF64_R_SYM (rel->r_info); + slot = htab_find_slot_with_hash (htab->loc_hash_table, &e, h, + create ? INSERT : NO_INSERT); + + if (!slot) + return NULL; + + if (*slot) + { + ret = (struct elf64_x86_64_link_hash_entry *) *slot; + return &ret->elf; + } + + ret = (struct elf64_x86_64_link_hash_entry *) + objalloc_alloc ((struct objalloc *) htab->loc_hash_memory, + sizeof (struct elf64_x86_64_link_hash_entry)); + if (ret) + { + memset (ret, 0, sizeof (*ret)); + ret->elf.indx = sec->id; + ret->elf.dynstr_index = ELF64_R_SYM (rel->r_info); + ret->elf.dynindx = -1; + ret->elf.plt.offset = (bfd_vma) -1; + ret->elf.got.offset = (bfd_vma) -1; + *slot = ret; + } + return &ret->elf; +} + /* Create an X86-64 ELF linker hash table. */ static struct bfd_link_hash_table * @@ -559,57 +620,50 @@ elf64_x86_64_link_hash_table_create (bfd *abfd) if (ret == NULL) return NULL; - if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc, + if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, + elf64_x86_64_link_hash_newfunc, sizeof (struct elf64_x86_64_link_hash_entry))) { free (ret); return NULL; } - ret->sgot = NULL; - ret->sgotplt = NULL; - ret->srelgot = NULL; - ret->splt = NULL; - ret->srelplt = NULL; ret->sdynbss = NULL; ret->srelbss = NULL; - ret->sym_sec.abfd = NULL; + ret->sym_cache.abfd = NULL; ret->tlsdesc_plt = 0; ret->tlsdesc_got = 0; ret->tls_ld_got.refcount = 0; ret->sgotplt_jump_table_size = 0; ret->tls_module_base = NULL; + ret->loc_hash_table = htab_try_create (1024, + elf64_x86_64_local_htab_hash, + elf64_x86_64_local_htab_eq, + NULL); + ret->loc_hash_memory = objalloc_create (); + if (!ret->loc_hash_table || !ret->loc_hash_memory) + { + free (ret); + return NULL; + } + return &ret->elf.root; } -/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up - shortcuts to them in our hash table. */ +/* Destroy an X86-64 ELF linker hash table. */ -static bfd_boolean -create_got_section (bfd *dynobj, struct bfd_link_info *info) +static void +elf64_x86_64_link_hash_table_free (struct bfd_link_hash_table *hash) { - struct elf64_x86_64_link_hash_table *htab; - - if (! _bfd_elf_create_got_section (dynobj, info)) - return FALSE; - - htab = elf64_x86_64_hash_table (info); - htab->sgot = bfd_get_section_by_name (dynobj, ".got"); - htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); - if (!htab->sgot || !htab->sgotplt) - abort (); - - htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got", - (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)); - if (htab->srelgot == NULL - || ! bfd_set_section_alignment (dynobj, htab->srelgot, 3)) - return FALSE; - return TRUE; + struct elf64_x86_64_link_hash_table *htab + = (struct elf64_x86_64_link_hash_table *) hash; + + if (htab->loc_hash_table) + htab_delete (htab->loc_hash_table); + if (htab->loc_hash_memory) + objalloc_free ((struct objalloc *) htab->loc_hash_memory); + _bfd_generic_link_hash_table_free (hash); } /* Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and @@ -621,20 +675,15 @@ elf64_x86_64_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { struct elf64_x86_64_link_hash_table *htab; - htab = elf64_x86_64_hash_table (info); - if (!htab->sgot && !create_got_section (dynobj, info)) - return FALSE; - if (!_bfd_elf_create_dynamic_sections (dynobj, info)) return FALSE; - htab->splt = bfd_get_section_by_name (dynobj, ".plt"); - htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt"); + htab = elf64_x86_64_hash_table (info); htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss"); if (!info->shared) htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss"); - if (!htab->splt || !htab->srelplt || !htab->sdynbss + if (!htab->sdynbss || (!info->shared && !htab->srelbss)) abort (); @@ -657,14 +706,14 @@ elf64_x86_64_copy_indirect_symbol (struct bfd_link_info *info, { if (edir->dyn_relocs != NULL) { - struct elf64_x86_64_dyn_relocs **pp; - struct elf64_x86_64_dyn_relocs *p; + struct elf_dyn_relocs **pp; + struct elf_dyn_relocs *p; /* Add reloc counts against the indirect sym to the direct sym list. Merge any entries against the same section. */ for (pp = &eind->dyn_relocs; (p = *pp) != NULL; ) { - struct elf64_x86_64_dyn_relocs *q; + struct elf_dyn_relocs *q; for (q = edir->dyn_relocs; q != NULL; q = q->next) if (q->sec == p->sec) @@ -810,11 +859,14 @@ elf64_x86_64_check_tls_transition (bfd *abfd, asection *sec, return FALSE; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + /* Use strncmp to check __tls_get_addr since __tls_get_addr + may be versioned. */ return (h != NULL && h->root.root.string != NULL && (ELF64_R_TYPE (rel[1].r_info) == R_X86_64_PC32 || ELF64_R_TYPE (rel[1].r_info) == R_X86_64_PLT32) - && (strcmp (h->root.root.string, "__tls_get_addr") == 0)); + && (strncmp (h->root.root.string, + "__tls_get_addr", 14) == 0)); case R_X86_64_GOTTPOFF: /* Check transition from IE access model: @@ -886,7 +938,8 @@ elf64_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, unsigned int *r_type, int tls_type, const Elf_Internal_Rela *rel, const Elf_Internal_Rela *relend, - struct elf_link_hash_entry *h) + struct elf_link_hash_entry *h, + unsigned long r_symndx) { unsigned int from_type = *r_type; unsigned int to_type = from_type; @@ -898,7 +951,7 @@ elf64_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, case R_X86_64_GOTPC32_TLSDESC: case R_X86_64_TLSDESC_CALL: case R_X86_64_GOTTPOFF: - if (!info->shared) + if (info->executable) { if (h == NULL) to_type = R_X86_64_TPOFF32; @@ -913,7 +966,7 @@ elf64_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, { unsigned int new_to_type = to_type; - if (!info->shared + if (info->executable && h != NULL && h->dynindx == -1 && tls_type == GOT_TLS_IE) @@ -937,7 +990,7 @@ elf64_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, break; case R_X86_64_TLSLD: - if (!info->shared) + if (info->executable) to_type = R_X86_64_TPOFF32; break; @@ -956,15 +1009,27 @@ elf64_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, from_type, rel, relend)) { reloc_howto_type *from, *to; + const char *name; from = elf64_x86_64_rtype_to_howto (abfd, from_type); to = elf64_x86_64_rtype_to_howto (abfd, to_type); + if (h) + name = h->root.root.string; + else + { + Elf_Internal_Sym *isym; + struct elf64_x86_64_link_hash_table *htab; + htab = elf64_x86_64_hash_table (info); + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL); + } + (*_bfd_error_handler) (_("%B: TLS transition from %s to %s against `%s' at 0x%lx " "in section `%A' failed"), - abfd, sec, from->name, to->name, - h ? h->root.root.string : "a local symbol", + abfd, sec, from->name, to->name, name, (unsigned long) rel->r_offset); bfd_set_error (bfd_error_bad_value); return FALSE; @@ -1007,6 +1072,8 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, unsigned int r_type; unsigned long r_symndx; struct elf_link_hash_entry *h; + Elf_Internal_Sym *isym; + const char *name; r_symndx = ELF64_R_SYM (rel->r_info); r_type = ELF64_R_TYPE (rel->r_info); @@ -1019,19 +1086,143 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, } if (r_symndx < symtab_hdr->sh_info) - h = NULL; + { + /* A local symbol. */ + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) + return FALSE; + + /* Check relocation against local STT_GNU_IFUNC symbol. */ + if (ELF64_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) + { + h = elf64_x86_64_get_local_sym_hash (htab, abfd, rel, + TRUE); + if (h == NULL) + return FALSE; + + /* Fake a STT_GNU_IFUNC symbol. */ + h->type = STT_GNU_IFUNC; + h->def_regular = 1; + h->ref_regular = 1; + h->forced_local = 1; + h->root.type = bfd_link_hash_defined; + } + else + h = NULL; + } else { + isym = NULL; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; } + if (h != NULL) + { + /* Create the ifunc sections for static executables. If we + never see an indirect function symbol nor we are building + a static executable, those sections will be empty and + won't appear in output. */ + switch (r_type) + { + default: + break; + + case R_X86_64_32S: + case R_X86_64_32: + case R_X86_64_64: + case R_X86_64_PC32: + case R_X86_64_PC64: + case R_X86_64_PLT32: + case R_X86_64_GOTPCREL: + case R_X86_64_GOTPCREL64: + if (!_bfd_elf_create_ifunc_sections (abfd, info)) + return FALSE; + break; + } + + /* Since STT_GNU_IFUNC symbol must go through PLT, we handle + it here if it is defined in a non-shared object. */ + if (h->type == STT_GNU_IFUNC + && h->def_regular) + { + /* It is referenced by a non-shared object. */ + h->ref_regular = 1; + h->needs_plt = 1; + + /* STT_GNU_IFUNC symbol must go through PLT. */ + h->plt.refcount += 1; + + /* STT_GNU_IFUNC needs dynamic sections. */ + if (htab->elf.dynobj == NULL) + htab->elf.dynobj = abfd; + + switch (r_type) + { + default: + if (h->root.root.string) + name = h->root.root.string; + else + name = bfd_elf_sym_name (abfd, symtab_hdr, isym, + NULL); + (*_bfd_error_handler) + (_("%B: relocation %s against STT_GNU_IFUNC " + "symbol `%s' isn't handled by %s"), abfd, + x86_64_elf_howto_table[r_type].name, + name, __FUNCTION__); + bfd_set_error (bfd_error_bad_value); + return FALSE; + + case R_X86_64_64: + h->non_got_ref = 1; + h->pointer_equality_needed = 1; + if (info->shared) + { + /* We must copy these reloc types into the output + file. Create a reloc section in dynobj and + make room for this reloc. */ + sreloc = _bfd_elf_create_ifunc_dyn_reloc + (abfd, info, sec, sreloc, + &((struct elf64_x86_64_link_hash_entry *) h)->dyn_relocs); + if (sreloc == NULL) + return FALSE; + } + break; + + case R_X86_64_32S: + case R_X86_64_32: + case R_X86_64_PC32: + case R_X86_64_PC64: + h->non_got_ref = 1; + if (r_type != R_X86_64_PC32 + && r_type != R_X86_64_PC64) + h->pointer_equality_needed = 1; + break; + + case R_X86_64_PLT32: + break; + + case R_X86_64_GOTPCREL: + case R_X86_64_GOTPCREL64: + h->got.refcount += 1; + if (htab->elf.sgot == NULL + && !_bfd_elf_create_got_section (htab->elf.dynobj, + info)) + return FALSE; + break; + } + + continue; + } + } + if (! elf64_x86_64_tls_transition (info, abfd, sec, NULL, symtab_hdr, sym_hashes, &r_type, GOT_UNKNOWN, - rel, rel_end, h)) + rel, rel_end, h, r_symndx)) return FALSE; switch (r_type) @@ -1041,20 +1232,24 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, goto create_got; case R_X86_64_TPOFF32: - if (info->shared) + if (!info->executable) { + if (h) + name = h->root.root.string; + else + name = bfd_elf_sym_name (abfd, symtab_hdr, isym, + NULL); (*_bfd_error_handler) (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"), abfd, - x86_64_elf_howto_table[r_type].name, - (h) ? h->root.root.string : "a local symbol"); + x86_64_elf_howto_table[r_type].name, name); bfd_set_error (bfd_error_bad_value); return FALSE; } break; case R_X86_64_GOTTPOFF: - if (info->shared) + if (!info->executable) info->flags |= DF_STATIC_TLS; /* Fall through */ @@ -1134,9 +1329,14 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, tls_type |= old_tls_type; else { + if (h) + name = h->root.root.string; + else + name = bfd_elf_sym_name (abfd, symtab_hdr, + isym, NULL); (*_bfd_error_handler) (_("%B: '%s' accessed both as normal and thread local symbol"), - abfd, h ? h->root.root.string : ""); + abfd, name); return FALSE; } } @@ -1155,11 +1355,12 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_X86_64_GOTPC32: case R_X86_64_GOTPC64: create_got: - if (htab->sgot == NULL) + if (htab->elf.sgot == NULL) { if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; - if (!create_got_section (htab->elf.dynobj, info)) + if (!_bfd_elf_create_got_section (htab->elf.dynobj, + info)) return FALSE; } break; @@ -1203,11 +1404,13 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, && (sec->flags & SEC_ALLOC) != 0 && (sec->flags & SEC_READONLY) != 0) { + if (h) + name = h->root.root.string; + else + name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL); (*_bfd_error_handler) (_("%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"), - abfd, - x86_64_elf_howto_table[r_type].name, - (h) ? h->root.root.string : "a local symbol"); + abfd, x86_64_elf_howto_table[r_type].name, name); bfd_set_error (bfd_error_bad_value); return FALSE; } @@ -1218,7 +1421,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_X86_64_PC32: case R_X86_64_PC64: case R_X86_64_64: - if (h != NULL && !info->shared) + if (h != NULL && info->executable) { /* If this reloc is in a read-only section, we might need a copy reloc. We can't check reliably at this @@ -1256,13 +1459,9 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, may need to keep relocations for symbols satisfied by a dynamic library if we manage to avoid copy relocs for the symbol. */ - if ((info->shared && (sec->flags & SEC_ALLOC) != 0 - && (((r_type != R_X86_64_PC8) - && (r_type != R_X86_64_PC16) - && (r_type != R_X86_64_PC32) - && (r_type != R_X86_64_PC64)) + && (! IS_X86_64_PCREL_TYPE (r_type) || (h != NULL && (! SYMBOLIC_BIND (info, h) || h->root.type == bfd_link_hash_defweak @@ -1274,8 +1473,8 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, && (h->root.type == bfd_link_hash_defweak || !h->def_regular))) { - struct elf64_x86_64_dyn_relocs *p; - struct elf64_x86_64_dyn_relocs **head; + struct elf_dyn_relocs *p; + struct elf_dyn_relocs **head; /* We must copy these reloc types into the output file. Create a reloc section in dynobj and make room for @@ -1300,28 +1499,34 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, } else { - void **vpp; /* Track dynamic relocs needed for local syms too. We really need local syms available to do this easily. Oh well. */ - asection *s; - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (s == NULL) + void **vpp; + Elf_Internal_Sym *isym; + + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; + /* Beware of type punned pointers vs strict aliasing rules. */ vpp = &(elf_section_data (s)->local_dynrel); - head = (struct elf64_x86_64_dyn_relocs **)vpp; + head = (struct elf_dyn_relocs **)vpp; } p = *head; if (p == NULL || p->sec != sec) { bfd_size_type amt = sizeof *p; - p = ((struct elf64_x86_64_dyn_relocs *) + + p = ((struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) return FALSE; @@ -1333,10 +1538,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, } p->count += 1; - if (r_type == R_X86_64_PC8 - || r_type == R_X86_64_PC16 - || r_type == R_X86_64_PC32 - || r_type == R_X86_64_PC64) + if (IS_X86_64_PCREL_TYPE (r_type)) p->pc_count += 1; } break; @@ -1418,8 +1620,8 @@ elf64_x86_64_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info, if (r_symndx >= symtab_hdr->sh_info) { struct elf64_x86_64_link_hash_entry *eh; - struct elf64_x86_64_dyn_relocs **pp; - struct elf64_x86_64_dyn_relocs *p; + struct elf_dyn_relocs **pp; + struct elf_dyn_relocs *p; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; while (h->root.type == bfd_link_hash_indirect @@ -1440,7 +1642,7 @@ elf64_x86_64_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info, if (! elf64_x86_64_tls_transition (info, abfd, sec, NULL, symtab_hdr, sym_hashes, &r_type, GOT_UNKNOWN, - rel, relend, h)) + rel, relend, h, r_symndx)) return FALSE; switch (r_type) @@ -1516,6 +1718,17 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf64_x86_64_link_hash_table *htab; asection *s; + /* STT_GNU_IFUNC symbol must go through PLT. */ + if (h->type == STT_GNU_IFUNC) + { + if (h->plt.refcount <= 0) + { + h->plt.offset = (bfd_vma) -1; + h->needs_plt = 0; + } + return TRUE; + } + /* If this is a function, put it in the procedure linkage table. We will fill in the contents of the procedure linkage table later, when we know the address of the .got section. */ @@ -1585,7 +1798,7 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info, if (ELIMINATE_COPY_RELOCS) { struct elf64_x86_64_link_hash_entry * eh; - struct elf64_x86_64_dyn_relocs *p; + struct elf_dyn_relocs *p; eh = (struct elf64_x86_64_link_hash_entry *) h; for (p = eh->dyn_relocs; p != NULL; p = p->next) @@ -1641,24 +1854,33 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info, dynamic relocs. */ static bfd_boolean -allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) +elf64_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) { struct bfd_link_info *info; struct elf64_x86_64_link_hash_table *htab; struct elf64_x86_64_link_hash_entry *eh; - struct elf64_x86_64_dyn_relocs *p; + struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) return TRUE; if (h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; + eh = (struct elf64_x86_64_link_hash_entry *) h; info = (struct bfd_link_info *) inf; htab = elf64_x86_64_hash_table (info); - if (htab->elf.dynamic_sections_created - && h->plt.refcount > 0) + /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it + here if it is defined and referenced in a non-shared object. */ + if (h->type == STT_GNU_IFUNC + && h->def_regular) + return _bfd_elf_allocate_ifunc_dyn_relocs (info, h, + &eh->dyn_relocs, + PLT_ENTRY_SIZE, + GOT_ENTRY_SIZE); + else if (htab->elf.dynamic_sections_created + && h->plt.refcount > 0) { /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ @@ -1672,7 +1894,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) if (info->shared || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h)) { - asection *s = htab->splt; + asection *s = htab->elf.splt; /* If this is the first .plt entry, make room for the special first entry. */ @@ -1698,11 +1920,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) /* We also need to make an entry in the .got.plt section, which will be placed in the .got section by the linker script. */ - htab->sgotplt->size += GOT_ENTRY_SIZE; + htab->elf.sgotplt->size += GOT_ENTRY_SIZE; /* We also need to make an entry in the .rela.plt section. */ - htab->srelplt->size += sizeof (Elf64_External_Rela); - htab->srelplt->reloc_count++; + htab->elf.srelplt->size += sizeof (Elf64_External_Rela); + htab->elf.srelplt->reloc_count++; } else { @@ -1716,16 +1938,17 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) h->needs_plt = 0; } - eh = (struct elf64_x86_64_link_hash_entry *) h; eh->tlsdesc_got = (bfd_vma) -1; /* If R_X86_64_GOTTPOFF symbol is now local to the binary, make it a R_X86_64_TPOFF32 requiring no GOT entry. */ if (h->got.refcount > 0 - && !info->shared + && info->executable && h->dynindx == -1 && elf64_x86_64_hash_entry (h)->tls_type == GOT_TLS_IE) - h->got.offset = (bfd_vma) -1; + { + h->got.offset = (bfd_vma) -1; + } else if (h->got.refcount > 0) { asection *s; @@ -1743,15 +1966,15 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) if (GOT_TLS_GDESC_P (tls_type)) { - eh->tlsdesc_got = htab->sgotplt->size + eh->tlsdesc_got = htab->elf.sgotplt->size - elf64_x86_64_compute_jump_table_size (htab); - htab->sgotplt->size += 2 * GOT_ENTRY_SIZE; + htab->elf.sgotplt->size += 2 * GOT_ENTRY_SIZE; h->got.offset = (bfd_vma) -2; } if (! GOT_TLS_GDESC_P (tls_type) || GOT_TLS_GD_P (tls_type)) { - s = htab->sgot; + s = htab->elf.sgot; h->got.offset = s->size; s->size += GOT_ENTRY_SIZE; if (GOT_TLS_GD_P (tls_type)) @@ -1763,18 +1986,18 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) R_X86_64_GOTTPOFF needs one dynamic relocation. */ if ((GOT_TLS_GD_P (tls_type) && h->dynindx == -1) || tls_type == GOT_TLS_IE) - htab->srelgot->size += sizeof (Elf64_External_Rela); + htab->elf.srelgot->size += sizeof (Elf64_External_Rela); else if (GOT_TLS_GD_P (tls_type)) - htab->srelgot->size += 2 * sizeof (Elf64_External_Rela); + htab->elf.srelgot->size += 2 * sizeof (Elf64_External_Rela); else if (! GOT_TLS_GDESC_P (tls_type) && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak) && (info->shared || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))) - htab->srelgot->size += sizeof (Elf64_External_Rela); + htab->elf.srelgot->size += sizeof (Elf64_External_Rela); if (GOT_TLS_GDESC_P (tls_type)) { - htab->srelplt->size += sizeof (Elf64_External_Rela); + htab->elf.srelplt->size += sizeof (Elf64_External_Rela); htab->tlsdesc_plt = (bfd_vma) -1; } } @@ -1800,7 +2023,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) should avoid writing weird assembly. */ if (SYMBOL_CALLS_LOCAL (info, h)) { - struct elf64_x86_64_dyn_relocs **pp; + struct elf_dyn_relocs **pp; for (pp = &eh->dyn_relocs; (p = *pp) != NULL; ) { @@ -1824,12 +2047,11 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) /* Make sure undefined weak symbols are output as a dynamic symbol in PIEs. */ else if (h->dynindx == -1 - && !h->forced_local) - { - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; - } + && ! h->forced_local + && ! bfd_elf_link_record_dynamic_symbol (info, h)) + return FALSE; } + } else if (ELIMINATE_COPY_RELOCS) { @@ -1847,11 +2069,9 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ if (h->dynindx == -1 - && !h->forced_local) - { - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; - } + && ! h->forced_local + && ! bfd_elf_link_record_dynamic_symbol (info, h)) + return FALSE; /* If that succeeded, we know we'll be keeping all the relocs. */ @@ -1879,13 +2099,32 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) return TRUE; } +/* Allocate space in .plt, .got and associated reloc sections for + local dynamic relocs. */ + +static bfd_boolean +elf64_x86_64_allocate_local_dynrelocs (void **slot, void *inf) +{ + struct elf_link_hash_entry *h + = (struct elf_link_hash_entry *) *slot; + + if (h->type != STT_GNU_IFUNC + || !h->def_regular + || !h->ref_regular + || !h->forced_local + || h->root.type != bfd_link_hash_defined) + abort (); + + return elf64_x86_64_allocate_dynrelocs (h, inf); +} + /* Find any dynamic relocs that apply to read-only sections. */ static bfd_boolean -readonly_dynrelocs (struct elf_link_hash_entry *h, void * inf) +elf64_x86_64_readonly_dynrelocs (struct elf_link_hash_entry *h, void * inf) { struct elf64_x86_64_link_hash_entry *eh; - struct elf64_x86_64_dyn_relocs *p; + struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; @@ -1955,9 +2194,9 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, for (s = ibfd->sections; s != NULL; s = s->next) { - struct elf64_x86_64_dyn_relocs *p; + struct elf_dyn_relocs *p; - for (p = (struct elf64_x86_64_dyn_relocs *) + for (p = (struct elf_dyn_relocs *) (elf_section_data (s)->local_dynrel); p != NULL; p = p->next) @@ -1989,8 +2228,8 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, end_local_got = local_got + locsymcount; local_tls_type = elf64_x86_64_local_got_tls_type (ibfd); local_tlsdesc_gotent = elf64_x86_64_local_tlsdesc_gotent (ibfd); - s = htab->sgot; - srel = htab->srelgot; + s = htab->elf.sgot; + srel = htab->elf.srelgot; for (; local_got < end_local_got; ++local_got, ++local_tls_type, ++local_tlsdesc_gotent) { @@ -1999,9 +2238,9 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { if (GOT_TLS_GDESC_P (*local_tls_type)) { - *local_tlsdesc_gotent = htab->sgotplt->size + *local_tlsdesc_gotent = htab->elf.sgotplt->size - elf64_x86_64_compute_jump_table_size (htab); - htab->sgotplt->size += 2 * GOT_ENTRY_SIZE; + htab->elf.sgotplt->size += 2 * GOT_ENTRY_SIZE; *local_got = (bfd_vma) -2; } if (! GOT_TLS_GDESC_P (*local_tls_type) @@ -2018,7 +2257,8 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { if (GOT_TLS_GDESC_P (*local_tls_type)) { - htab->srelplt->size += sizeof (Elf64_External_Rela); + htab->elf.srelplt->size + += sizeof (Elf64_External_Rela); htab->tlsdesc_plt = (bfd_vma) -1; } if (! GOT_TLS_GDESC_P (*local_tls_type) @@ -2035,23 +2275,29 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { /* Allocate 2 got entries and 1 dynamic reloc for R_X86_64_TLSLD relocs. */ - htab->tls_ld_got.offset = htab->sgot->size; - htab->sgot->size += 2 * GOT_ENTRY_SIZE; - htab->srelgot->size += sizeof (Elf64_External_Rela); + htab->tls_ld_got.offset = htab->elf.sgot->size; + htab->elf.sgot->size += 2 * GOT_ENTRY_SIZE; + htab->elf.srelgot->size += sizeof (Elf64_External_Rela); } else htab->tls_ld_got.offset = -1; /* Allocate global sym .plt and .got entries, and space for global sym dynamic relocs. */ - elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info); + elf_link_hash_traverse (&htab->elf, elf64_x86_64_allocate_dynrelocs, + info); + + /* Allocate .plt and .got entries, and space for local symbols. */ + htab_traverse (htab->loc_hash_table, + elf64_x86_64_allocate_local_dynrelocs, + info); /* For every jump slot reserved in the sgotplt, reloc_count is incremented. However, when we reserve space for TLS descriptors, it's not incremented, so in order to compute the space reserved for them, it suffices to multiply the reloc count by the jump slot size. */ - if (htab->srelplt) + if (htab->elf.srelplt) htab->sgotplt_jump_table_size = elf64_x86_64_compute_jump_table_size (htab); @@ -2063,14 +2309,14 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, htab->tlsdesc_plt = 0; else { - htab->tlsdesc_got = htab->sgot->size; - htab->sgot->size += GOT_ENTRY_SIZE; + htab->tlsdesc_got = htab->elf.sgot->size; + htab->elf.sgot->size += GOT_ENTRY_SIZE; /* Reserve room for the initial entry. FIXME: we could probably do away with it in this case. */ - if (htab->splt->size == 0) - htab->splt->size += PLT_ENTRY_SIZE; - htab->tlsdesc_plt = htab->splt->size; - htab->splt->size += PLT_ENTRY_SIZE; + if (htab->elf.splt->size == 0) + htab->elf.splt->size += PLT_ENTRY_SIZE; + htab->tlsdesc_plt = htab->elf.splt->size; + htab->elf.splt->size += PLT_ENTRY_SIZE; } } @@ -2082,9 +2328,11 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if ((s->flags & SEC_LINKER_CREATED) == 0) continue; - if (s == htab->splt - || s == htab->sgot - || s == htab->sgotplt + if (s == htab->elf.splt + || s == htab->elf.sgot + || s == htab->elf.sgotplt + || s == htab->elf.iplt + || s == htab->elf.igotplt || s == htab->sdynbss) { /* Strip this section if we don't need it; see the @@ -2092,12 +2340,12 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, } else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela")) { - if (s->size != 0 && s != htab->srelplt) + if (s->size != 0 && s != htab->elf.srelplt) relocs = TRUE; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ - if (s != htab->srelplt) + if (s != htab->elf.srelplt) s->reloc_count = 0; } else @@ -2151,7 +2399,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, return FALSE; } - if (htab->splt->size != 0) + if (htab->elf.splt->size != 0) { if (!add_dynamic_entry (DT_PLTGOT, 0) || !add_dynamic_entry (DT_PLTRELSZ, 0) @@ -2175,7 +2423,9 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* If any dynamic relocs apply to a read-only section, then we need a DT_TEXTREL entry. */ if ((info->flags & DF_TEXTREL) == 0) - elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info); + elf_link_hash_traverse (&htab->elf, + elf64_x86_64_readonly_dynrelocs, + info); if ((info->flags & DF_TEXTREL) != 0) { @@ -2233,7 +2483,7 @@ elf64_x86_64_always_size_sections (bfd *output_bfd, multiple times, it is idempotent. */ static void -set_tls_module_base (struct bfd_link_info *info) +elf64_x86_64_set_tls_module_base (struct bfd_link_info *info) { struct bfd_link_hash_entry *base; @@ -2253,7 +2503,7 @@ set_tls_module_base (struct bfd_link_info *info) This is PT_TLS segment p_vaddr. */ static bfd_vma -dtpoff_base (struct bfd_link_info *info) +elf64_x86_64_dtpoff_base (struct bfd_link_info *info) { /* If tls_sec is NULL, we should have signalled an error already. */ if (elf_hash_table (info)->tls_sec == NULL) @@ -2265,7 +2515,7 @@ dtpoff_base (struct bfd_link_info *info) if STT_TLS virtual address is ADDRESS. */ static bfd_vma -tpoff (struct bfd_link_info *info, bfd_vma address) +elf64_x86_64_tpoff (struct bfd_link_info *info, bfd_vma address) { struct elf_link_hash_table *htab = elf_hash_table (info); @@ -2293,6 +2543,16 @@ is_32bit_relative_branch (bfd_byte *contents, bfd_vma offset) && (contents [offset - 1] & 0xf0) == 0x80)); } +static void +elf64_x86_64_append_rela (bfd *abfd, asection *s, Elf_Internal_Rela *rel) +{ + bfd_byte *loc = s->contents; + loc += s->reloc_count++ * sizeof (Elf64_External_Rela); + BFD_ASSERT (loc + sizeof (Elf64_External_Rela) + <= s->contents + s->size); + bfd_elf64_swap_reloca_out (abfd, rel, loc); +} + /* Relocate an x86_64 ELF section. */ static bfd_boolean @@ -2318,7 +2578,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, local_got_offsets = elf_local_got_offsets (input_bfd); local_tlsdesc_gotents = elf64_x86_64_local_tlsdesc_gotent (input_bfd); - set_tls_module_base (info); + elf64_x86_64_set_tls_module_base (info); rel = relocs; relend = relocs + input_section->reloc_count; @@ -2335,6 +2595,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd_boolean unresolved_reloc; bfd_reloc_status_type r; int tls_type; + asection *base_got; r_type = ELF64_R_TYPE (rel->r_info); if (r_type == (int) R_X86_64_GNU_VTINHERIT @@ -2358,7 +2619,22 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, sym = local_syms + r_symndx; sec = local_sections[r_symndx]; - relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + relocation = _bfd_elf_rela_local_sym (output_bfd, sym, + &sec, rel); + + /* Relocate against local STT_GNU_IFUNC symbol. */ + if (!info->relocatable + && ELF64_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + { + h = elf64_x86_64_get_local_sym_hash (htab, input_bfd, + rel, FALSE); + if (h == NULL) + abort (); + + /* Set STT_GNU_IFUNC symbol value. */ + h->root.u.def.value = sym->st_value; + h->root.u.def.section = sec; + } } else { @@ -2384,11 +2660,192 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (info->relocatable) continue; + /* Since STT_GNU_IFUNC symbol must go through PLT, we handle + it here if it is defined in a non-shared object. */ + if (h != NULL + && h->type == STT_GNU_IFUNC + && h->def_regular) + { + asection *plt; + bfd_vma plt_index; + const char *name; + + if ((input_section->flags & SEC_ALLOC) == 0 + || h->plt.offset == (bfd_vma) -1) + abort (); + + /* STT_GNU_IFUNC symbol must go through PLT. */ + plt = htab->elf.splt ? htab->elf.splt : htab->elf.iplt; + relocation = (plt->output_section->vma + + plt->output_offset + h->plt.offset); + + switch (r_type) + { + default: + if (h->root.root.string) + name = h->root.root.string; + else + name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, + NULL); + (*_bfd_error_handler) + (_("%B: relocation %s against STT_GNU_IFUNC " + "symbol `%s' isn't handled by %s"), input_bfd, + x86_64_elf_howto_table[r_type].name, + name, __FUNCTION__); + bfd_set_error (bfd_error_bad_value); + return FALSE; + + case R_X86_64_32S: + if (info->shared) + abort (); + goto do_relocation; + + case R_X86_64_64: + if (rel->r_addend != 0) + { + if (h->root.root.string) + name = h->root.root.string; + else + name = bfd_elf_sym_name (input_bfd, symtab_hdr, + sym, NULL); + (*_bfd_error_handler) + (_("%B: relocation %s against STT_GNU_IFUNC " + "symbol `%s' has non-zero addend: %d"), + input_bfd, x86_64_elf_howto_table[r_type].name, + name, rel->r_addend); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + + /* Generate dynamic relcoation only when there is a + non-GOF reference in a shared object. */ + if (info->shared && h->non_got_ref) + { + Elf_Internal_Rela outrel; + asection *sreloc; + + /* Need a dynamic relocation to get the real function + address. */ + outrel.r_offset = _bfd_elf_section_offset (output_bfd, + info, + input_section, + rel->r_offset); + if (outrel.r_offset == (bfd_vma) -1 + || outrel.r_offset == (bfd_vma) -2) + abort (); + + outrel.r_offset += (input_section->output_section->vma + + input_section->output_offset); + + if (h->dynindx == -1 + || h->forced_local + || info->executable) + { + /* This symbol is resolved locally. */ + outrel.r_info = ELF64_R_INFO (0, R_X86_64_IRELATIVE); + outrel.r_addend = (h->root.u.def.value + + h->root.u.def.section->output_section->vma + + h->root.u.def.section->output_offset); + } + else + { + outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); + outrel.r_addend = 0; + } + + sreloc = htab->elf.irelifunc; + elf64_x86_64_append_rela (output_bfd, sreloc, &outrel); + + /* If this reloc is against an external symbol, we + do not want to fiddle with the addend. Otherwise, + we need to include the symbol value so that it + becomes an addend for the dynamic reloc. For an + internal symbol, we have updated addend. */ + continue; + } + + case R_X86_64_32: + case R_X86_64_PC32: + case R_X86_64_PC64: + case R_X86_64_PLT32: + goto do_relocation; + + case R_X86_64_GOTPCREL: + case R_X86_64_GOTPCREL64: + base_got = htab->elf.sgot; + off = h->got.offset; + + if (base_got == NULL) + abort (); + + if (off == (bfd_vma) -1) + { + /* We can't use h->got.offset here to save state, or + even just remember the offset, as finish_dynamic_symbol + would use that as offset into .got. */ + + if (htab->elf.splt != NULL) + { + plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; + off = (plt_index + 3) * GOT_ENTRY_SIZE; + base_got = htab->elf.sgotplt; + } + else + { + plt_index = h->plt.offset / PLT_ENTRY_SIZE; + off = plt_index * GOT_ENTRY_SIZE; + base_got = htab->elf.igotplt; + } + + if (h->dynindx == -1 + || h->forced_local + || info->symbolic) + { + /* This references the local defitionion. We must + initialize this entry in the global offset table. + Since the offset must always be a multiple of 8, + we use the least significant bit to record + whether we have initialized it already. + + When doing a dynamic link, we create a .rela.got + relocation entry to initialize the value. This + is done in the finish_dynamic_symbol routine. */ + if ((off & 1) != 0) + off &= ~1; + else + { + bfd_put_64 (output_bfd, relocation, + base_got->contents + off); + /* Note that this is harmless for the GOTPLT64 + case, as -1 | 1 still is -1. */ + h->got.offset |= 1; + } + } + } + + relocation = (base_got->output_section->vma + + base_got->output_offset + off); + + if (r_type != R_X86_64_GOTPCREL + && r_type != R_X86_64_GOTPCREL64) + { + asection *gotplt; + if (htab->elf.splt != NULL) + gotplt = htab->elf.sgotplt; + else + gotplt = htab->elf.igotplt; + relocation -= (gotplt->output_section->vma + - gotplt->output_offset); + } + + goto do_relocation; + } + } + /* When generating a shared object, the relocations handled here are copied into the output file to be resolved at run time. */ switch (r_type) { - asection *base_got; case R_X86_64_GOT32: case R_X86_64_GOT64: /* Relocation is to the entry for this symbol in the global @@ -2403,9 +2860,9 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, offset, if this symbol got a PLT entry (it was global). Additionally if it's computed from the PLT entry, then that GOT offset is relative to .got.plt, not to .got. */ - base_got = htab->sgot; + base_got = htab->elf.sgot; - if (htab->sgot == NULL) + if (htab->elf.sgot == NULL) abort (); if (h != NULL) @@ -2423,7 +2880,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, .got. */ bfd_vma plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; off = (plt_index + 3) * GOT_ENTRY_SIZE; - base_got = htab->sgotplt; + base_got = htab->elf.sgotplt; } dyn = htab->elf.dynamic_sections_created; @@ -2480,11 +2937,10 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { asection *s; Elf_Internal_Rela outrel; - bfd_byte *loc; /* We need to generate a R_X86_64_RELATIVE reloc for the dynamic linker. */ - s = htab->srelgot; + s = htab->elf.srelgot; if (s == NULL) abort (); @@ -2493,9 +2949,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, + off); outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE); outrel.r_addend = relocation; - loc = s->contents; - loc += s->reloc_count++ * sizeof (Elf64_External_Rela); - bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); + elf64_x86_64_append_rela (output_bfd, s, &outrel); } local_got_offsets[r_symndx] |= 1; @@ -2508,8 +2962,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, relocation = base_got->output_section->vma + base_got->output_offset + off; if (r_type != R_X86_64_GOTPCREL && r_type != R_X86_64_GOTPCREL64) - relocation -= htab->sgotplt->output_section->vma - - htab->sgotplt->output_offset; + relocation -= htab->elf.sgotplt->output_section->vma + - htab->elf.sgotplt->output_offset; break; @@ -2538,15 +2992,15 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, defined _GLOBAL_OFFSET_TABLE_ in a different way, as is permitted by the ABI, we might have to change this calculation. */ - relocation -= htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset; + relocation -= htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset; break; case R_X86_64_GOTPC32: case R_X86_64_GOTPC64: /* Use global offset table as symbol value. */ - relocation = htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset; + relocation = htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset; unresolved_reloc = FALSE; break; @@ -2556,16 +3010,16 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (h != NULL /* See PLT32 handling. */ && h->plt.offset != (bfd_vma) -1 - && htab->splt != NULL) + && htab->elf.splt != NULL) { - relocation = (htab->splt->output_section->vma - + htab->splt->output_offset + relocation = (htab->elf.splt->output_section->vma + + htab->elf.splt->output_offset + h->plt.offset); unresolved_reloc = FALSE; } - relocation -= htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset; + relocation -= htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset; break; case R_X86_64_PLT32: @@ -2578,7 +3032,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, break; if (h->plt.offset == (bfd_vma) -1 - || htab->splt == NULL) + || htab->elf.splt == NULL) { /* We didn't make a PLT entry for this symbol. This happens when statically linking PIC code, or when @@ -2586,8 +3040,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, break; } - relocation = (htab->splt->output_section->vma - + htab->splt->output_offset + relocation = (htab->elf.splt->output_section->vma + + htab->elf.splt->output_offset + h->plt.offset); unresolved_reloc = FALSE; break; @@ -2671,11 +3125,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, && (h == NULL || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak) - && ((r_type != R_X86_64_PC8 - && r_type != R_X86_64_PC16 - && r_type != R_X86_64_PC32 - && r_type != R_X86_64_PC64) - || !SYMBOL_CALLS_LOCAL (info, h))) + && (! IS_X86_64_PCREL_TYPE (r_type) + || ! SYMBOL_CALLS_LOCAL (info, h))) || (ELIMINATE_COPY_RELOCS && !info->shared && h != NULL @@ -2687,7 +3138,6 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, || h->root.type == bfd_link_hash_undefined))) { Elf_Internal_Rela outrel; - bfd_byte *loc; bfd_boolean skip, relocate; asection *sreloc; @@ -2715,13 +3165,10 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, become local. */ else if (h != NULL && h->dynindx != -1 - && (r_type == R_X86_64_PC8 - || r_type == R_X86_64_PC16 - || r_type == R_X86_64_PC32 - || r_type == R_X86_64_PC64 - || !info->shared - || !SYMBOLIC_BIND (info, h) - || !h->def_regular)) + && (IS_X86_64_PCREL_TYPE (r_type) + || ! info->shared + || ! SYMBOLIC_BIND (info, h) + || ! h->def_regular)) { outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); outrel.r_addend = rel->r_addend; @@ -2771,12 +3218,10 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } sreloc = elf_section_data (input_section)->sreloc; - + BFD_ASSERT (sreloc != NULL && sreloc->contents != NULL); - loc = sreloc->contents; - loc += sreloc->reloc_count++ * sizeof (Elf64_External_Rela); - bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); + elf64_x86_64_append_rela (output_bfd, sreloc, &outrel); /* If this reloc is against an external symbol, we do not want to fiddle with the addend. Otherwise, we @@ -2802,7 +3247,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, input_section, contents, symtab_hdr, sym_hashes, &r_type, tls_type, rel, - relend, h)) + relend, h, r_symndx)) return FALSE; if (r_type == R_X86_64_TPOFF32) @@ -2822,7 +3267,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, memcpy (contents + roff - 4, "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x8d\x80\0\0\0", 16); - bfd_put_32 (output_bfd, tpoff (info, relocation), + bfd_put_32 (output_bfd, + elf64_x86_64_tpoff (info, relocation), contents + roff + 8); /* Skip R_X86_64_PC32/R_X86_64_PLT32. */ rel++; @@ -2848,7 +3294,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd_put_8 (output_bfd, 0xc7, contents + roff - 2); bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7), contents + roff - 1); - bfd_put_32 (output_bfd, tpoff (info, relocation), + bfd_put_32 (output_bfd, + elf64_x86_64_tpoff (info, relocation), contents + roff); continue; } @@ -2914,7 +3361,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd_put_8 (output_bfd, 0x80 | reg | (reg << 3), contents + roff - 1); } - bfd_put_32 (output_bfd, tpoff (info, relocation), + bfd_put_32 (output_bfd, + elf64_x86_64_tpoff (info, relocation), contents + roff); continue; } @@ -2922,7 +3370,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, BFD_ASSERT (FALSE); } - if (htab->sgot == NULL) + if (htab->elf.sgot == NULL) abort (); if (h != NULL) @@ -2944,11 +3392,10 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, else { Elf_Internal_Rela outrel; - bfd_byte *loc; int dr_type, indx; asection *sreloc; - if (htab->srelgot == NULL) + if (htab->elf.srelgot == NULL) abort (); indx = h && h->dynindx != -1 ? h->dynindx : 0; @@ -2957,28 +3404,23 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { outrel.r_info = ELF64_R_INFO (indx, R_X86_64_TLSDESC); BFD_ASSERT (htab->sgotplt_jump_table_size + offplt - + 2 * GOT_ENTRY_SIZE <= htab->sgotplt->size); - outrel.r_offset = (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + + 2 * GOT_ENTRY_SIZE <= htab->elf.sgotplt->size); + outrel.r_offset = (htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset + offplt + htab->sgotplt_jump_table_size); - sreloc = htab->srelplt; - loc = sreloc->contents; - loc += sreloc->reloc_count++ - * sizeof (Elf64_External_Rela); - BFD_ASSERT (loc + sizeof (Elf64_External_Rela) - <= sreloc->contents + sreloc->size); + sreloc = htab->elf.srelplt; if (indx == 0) - outrel.r_addend = relocation - dtpoff_base (info); + outrel.r_addend = relocation - elf64_x86_64_dtpoff_base (info); else outrel.r_addend = 0; - bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); + elf64_x86_64_append_rela (output_bfd, sreloc, &outrel); } - sreloc = htab->srelgot; + sreloc = htab->elf.srelgot; - outrel.r_offset = (htab->sgot->output_section->vma - + htab->sgot->output_offset + off); + outrel.r_offset = (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off); if (GOT_TLS_GD_P (tls_type)) dr_type = R_X86_64_DTPMOD64; @@ -2987,18 +3429,14 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, else dr_type = R_X86_64_TPOFF64; - bfd_put_64 (output_bfd, 0, htab->sgot->contents + off); + bfd_put_64 (output_bfd, 0, htab->elf.sgot->contents + off); outrel.r_addend = 0; if ((dr_type == R_X86_64_TPOFF64 || dr_type == R_X86_64_TLSDESC) && indx == 0) - outrel.r_addend = relocation - dtpoff_base (info); + outrel.r_addend = relocation - elf64_x86_64_dtpoff_base (info); outrel.r_info = ELF64_R_INFO (indx, dr_type); - loc = sreloc->contents; - loc += sreloc->reloc_count++ * sizeof (Elf64_External_Rela); - BFD_ASSERT (loc + sizeof (Elf64_External_Rela) - <= sreloc->contents + sreloc->size); - bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); + elf64_x86_64_append_rela (output_bfd, sreloc, &outrel); if (GOT_TLS_GD_P (tls_type)) { @@ -3006,21 +3444,18 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { BFD_ASSERT (! unresolved_reloc); bfd_put_64 (output_bfd, - relocation - dtpoff_base (info), - htab->sgot->contents + off + GOT_ENTRY_SIZE); + relocation - elf64_x86_64_dtpoff_base (info), + htab->elf.sgot->contents + off + GOT_ENTRY_SIZE); } else { bfd_put_64 (output_bfd, 0, - htab->sgot->contents + off + GOT_ENTRY_SIZE); + htab->elf.sgot->contents + off + GOT_ENTRY_SIZE); outrel.r_info = ELF64_R_INFO (indx, R_X86_64_DTPOFF64); outrel.r_offset += GOT_ENTRY_SIZE; - sreloc->reloc_count++; - loc += sizeof (Elf64_External_Rela); - BFD_ASSERT (loc + sizeof (Elf64_External_Rela) - <= sreloc->contents + sreloc->size); - bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); + elf64_x86_64_append_rela (output_bfd, sreloc, + &outrel); } } @@ -3038,12 +3473,12 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { if (r_type == R_X86_64_GOTPC32_TLSDESC || r_type == R_X86_64_TLSDESC_CALL) - relocation = htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + relocation = htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset + offplt + htab->sgotplt_jump_table_size; else - relocation = htab->sgot->output_section->vma - + htab->sgot->output_offset + off; + relocation = htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off; unresolved_reloc = FALSE; } else @@ -3062,8 +3497,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x03\x05\0\0\0", 16); - relocation = (htab->sgot->output_section->vma - + htab->sgot->output_offset + off + relocation = (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off - roff - input_section->output_section->vma - input_section->output_offset @@ -3097,8 +3532,8 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd_put_8 (output_bfd, 0x8b, contents + roff - 2); bfd_put_32 (output_bfd, - htab->sgot->output_section->vma - + htab->sgot->output_offset + off + htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off - rel->r_offset - input_section->output_section->vma - input_section->output_offset @@ -3133,7 +3568,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, input_section, contents, symtab_hdr, sym_hashes, &r_type, GOT_UNKNOWN, - rel, relend, h)) + rel, relend, h, r_symndx)) return FALSE; if (r_type != R_X86_64_TLSLD) @@ -3151,7 +3586,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, continue; } - if (htab->sgot == NULL) + if (htab->elf.sgot == NULL) abort (); off = htab->tls_ld_got.offset; @@ -3160,40 +3595,38 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, else { Elf_Internal_Rela outrel; - bfd_byte *loc; - if (htab->srelgot == NULL) + if (htab->elf.srelgot == NULL) abort (); - outrel.r_offset = (htab->sgot->output_section->vma - + htab->sgot->output_offset + off); + outrel.r_offset = (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off); bfd_put_64 (output_bfd, 0, - htab->sgot->contents + off); + htab->elf.sgot->contents + off); bfd_put_64 (output_bfd, 0, - htab->sgot->contents + off + GOT_ENTRY_SIZE); + htab->elf.sgot->contents + off + GOT_ENTRY_SIZE); outrel.r_info = ELF64_R_INFO (0, R_X86_64_DTPMOD64); outrel.r_addend = 0; - loc = htab->srelgot->contents; - loc += htab->srelgot->reloc_count++ * sizeof (Elf64_External_Rela); - bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); + elf64_x86_64_append_rela (output_bfd, htab->elf.srelgot, + &outrel); htab->tls_ld_got.offset |= 1; } - relocation = htab->sgot->output_section->vma - + htab->sgot->output_offset + off; + relocation = htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + off; unresolved_reloc = FALSE; break; case R_X86_64_DTPOFF32: - if (info->shared || (input_section->flags & SEC_CODE) == 0) - relocation -= dtpoff_base (info); + if (!info->executable|| (input_section->flags & SEC_CODE) == 0) + relocation -= elf64_x86_64_dtpoff_base (info); else - relocation = tpoff (info, relocation); + relocation = elf64_x86_64_tpoff (info, relocation); break; case R_X86_64_TPOFF32: - BFD_ASSERT (! info->shared); - relocation = tpoff (info, relocation); + BFD_ASSERT (info->executable); + relocation = elf64_x86_64_tpoff (info, relocation); break; default: @@ -3214,6 +3647,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, howto->name, h->root.root.string); +do_relocation: r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, relocation, rel->r_addend); @@ -3276,28 +3710,58 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd, bfd_vma got_offset; Elf_Internal_Rela rela; bfd_byte *loc; + asection *plt, *gotplt, *relplt; + + /* When building a static executable, use .iplt, .igot.plt and + .rela.iplt sections for STT_GNU_IFUNC symbols. */ + if (htab->elf.splt != NULL) + { + plt = htab->elf.splt; + gotplt = htab->elf.sgotplt; + relplt = htab->elf.srelplt; + } + else + { + plt = htab->elf.iplt; + gotplt = htab->elf.igotplt; + relplt = htab->elf.irelplt; + } /* This symbol has an entry in the procedure linkage table. Set it up. */ - if (h->dynindx == -1 - || htab->splt == NULL - || htab->sgotplt == NULL - || htab->srelplt == NULL) + if ((h->dynindx == -1 + && !((h->forced_local || info->executable) + && h->def_regular + && h->type == STT_GNU_IFUNC)) + || plt == NULL + || gotplt == NULL + || relplt == NULL) abort (); /* Get the index in the procedure linkage table which corresponds to this symbol. This is the index of this symbol in all the symbols for which we are making plt entries. The - first entry in the procedure linkage table is reserved. */ - plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; - - /* Get the offset into the .got table of the entry that + first entry in the procedure linkage table is reserved. + + Get the offset into the .got table of the entry that corresponds to this function. Each .got entry is GOT_ENTRY_SIZE - bytes. The first three are reserved for the dynamic linker. */ - got_offset = (plt_index + 3) * GOT_ENTRY_SIZE; + bytes. The first three are reserved for the dynamic linker. + + For static executables, we don't reserve anything. */ + + if (plt == htab->elf.splt) + { + plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; + got_offset = (plt_index + 3) * GOT_ENTRY_SIZE; + } + else + { + plt_index = h->plt.offset / PLT_ENTRY_SIZE; + got_offset = plt_index * GOT_ENTRY_SIZE; + } /* Fill in the entry in the procedure linkage table. */ - memcpy (htab->splt->contents + h->plt.offset, elf64_x86_64_plt_entry, + memcpy (plt->contents + h->plt.offset, elf64_x86_64_plt_entry, PLT_ENTRY_SIZE); /* Insert the relocation positions of the plt section. The magic @@ -3306,35 +3770,56 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd, /* Put offset for jmp *name@GOTPCREL(%rip), since the instruction uses 6 bytes, subtract this value. */ bfd_put_32 (output_bfd, - (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + (gotplt->output_section->vma + + gotplt->output_offset + got_offset - - htab->splt->output_section->vma - - htab->splt->output_offset + - plt->output_section->vma + - plt->output_offset - h->plt.offset - 6), - htab->splt->contents + h->plt.offset + 2); - /* Put relocation index. */ - bfd_put_32 (output_bfd, plt_index, - htab->splt->contents + h->plt.offset + 7); - /* Put offset for jmp .PLT0. */ - bfd_put_32 (output_bfd, - (h->plt.offset + PLT_ENTRY_SIZE), - htab->splt->contents + h->plt.offset + 12); + plt->contents + h->plt.offset + 2); + + /* Don't fill PLT entry for static executables. */ + if (plt == htab->elf.splt) + { + /* Put relocation index. */ + bfd_put_32 (output_bfd, plt_index, + plt->contents + h->plt.offset + 7); + /* Put offset for jmp .PLT0. */ + bfd_put_32 (output_bfd, - (h->plt.offset + PLT_ENTRY_SIZE), + plt->contents + h->plt.offset + 12); + } /* Fill in the entry in the global offset table, initially this points to the pushq instruction in the PLT which is at offset 6. */ - bfd_put_64 (output_bfd, (htab->splt->output_section->vma - + htab->splt->output_offset + bfd_put_64 (output_bfd, (plt->output_section->vma + + plt->output_offset + h->plt.offset + 6), - htab->sgotplt->contents + got_offset); + gotplt->contents + got_offset); /* Fill in the entry in the .rela.plt section. */ - rela.r_offset = (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + rela.r_offset = (gotplt->output_section->vma + + gotplt->output_offset + got_offset); - rela.r_info = ELF64_R_INFO (h->dynindx, R_X86_64_JUMP_SLOT); - rela.r_addend = 0; - loc = htab->srelplt->contents + plt_index * sizeof (Elf64_External_Rela); + if (h->dynindx == -1 + || ((info->executable + || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT) + && h->def_regular + && h->type == STT_GNU_IFUNC)) + { + /* If an STT_GNU_IFUNC symbol is locally defined, generate + R_X86_64_IRELATIVE instead of R_X86_64_JUMP_SLOT. */ + rela.r_info = ELF64_R_INFO (0, R_X86_64_IRELATIVE); + rela.r_addend = (h->root.u.def.value + + h->root.u.def.section->output_section->vma + + h->root.u.def.section->output_offset); + } + else + { + rela.r_info = ELF64_R_INFO (h->dynindx, R_X86_64_JUMP_SLOT); + rela.r_addend = 0; + } + loc = relplt->contents + plt_index * sizeof (Elf64_External_Rela); bfd_elf64_swap_reloca_out (output_bfd, &rela, loc); if (!h->def_regular) @@ -3358,15 +3843,14 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd, && elf64_x86_64_hash_entry (h)->tls_type != GOT_TLS_IE) { Elf_Internal_Rela rela; - bfd_byte *loc; /* This symbol has an entry in the global offset table. Set it up. */ - if (htab->sgot == NULL || htab->srelgot == NULL) + if (htab->elf.sgot == NULL || htab->elf.srelgot == NULL) abort (); - rela.r_offset = (htab->sgot->output_section->vma - + htab->sgot->output_offset + rela.r_offset = (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + (h->got.offset &~ (bfd_vma) 1)); /* If this is a static link, or it is a -Bsymbolic link and the @@ -3374,8 +3858,34 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd, of a version file, we just want to emit a RELATIVE reloc. The entry in the global offset table will already have been initialized in the relocate_section function. */ - if (info->shared - && SYMBOL_REFERENCES_LOCAL (info, h)) + if (h->def_regular + && h->type == STT_GNU_IFUNC) + { + if (info->shared) + { + /* Generate R_X86_64_GLOB_DAT. */ + goto do_glob_dat; + } + else + { + asection *plt; + + if (!h->pointer_equality_needed) + abort (); + + /* For non-shared object, we can't use .got.plt, which + contains the real function addres if we need pointer + equality. We load the GOT entry with the PLT entry. */ + plt = htab->elf.splt ? htab->elf.splt : htab->elf.iplt; + bfd_put_64 (output_bfd, (plt->output_section->vma + + plt->output_offset + + h->plt.offset), + htab->elf.sgot->contents + h->got.offset); + return TRUE; + } + } + else if (info->shared + && SYMBOL_REFERENCES_LOCAL (info, h)) { if (!h->def_regular) return FALSE; @@ -3388,21 +3898,19 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd, else { BFD_ASSERT((h->got.offset & 1) == 0); +do_glob_dat: bfd_put_64 (output_bfd, (bfd_vma) 0, - htab->sgot->contents + h->got.offset); + htab->elf.sgot->contents + h->got.offset); rela.r_info = ELF64_R_INFO (h->dynindx, R_X86_64_GLOB_DAT); rela.r_addend = 0; } - loc = htab->srelgot->contents; - loc += htab->srelgot->reloc_count++ * sizeof (Elf64_External_Rela); - bfd_elf64_swap_reloca_out (output_bfd, &rela, loc); + elf64_x86_64_append_rela (output_bfd, htab->elf.srelgot, &rela); } if (h->needs_copy) { Elf_Internal_Rela rela; - bfd_byte *loc; /* This symbol needs a copy reloc. Set it up. */ @@ -3417,19 +3925,34 @@ elf64_x86_64_finish_dynamic_symbol (bfd *output_bfd, + h->root.u.def.section->output_offset); rela.r_info = ELF64_R_INFO (h->dynindx, R_X86_64_COPY); rela.r_addend = 0; - loc = htab->srelbss->contents; - loc += htab->srelbss->reloc_count++ * sizeof (Elf64_External_Rela); - bfd_elf64_swap_reloca_out (output_bfd, &rela, loc); + elf64_x86_64_append_rela (output_bfd, htab->srelbss, &rela); } - /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */ - if (strcmp (h->root.root.string, "_DYNAMIC") == 0 - || h == htab->elf.hgot) + /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. SYM may + be NULL for local symbols. */ + if (sym != NULL + && (strcmp (h->root.root.string, "_DYNAMIC") == 0 + || h == htab->elf.hgot)) sym->st_shndx = SHN_ABS; return TRUE; } +/* Finish up local dynamic symbol handling. We set the contents of + various dynamic sections here. */ + +static bfd_boolean +elf64_x86_64_finish_local_dynamic_symbol (void **slot, void *inf) +{ + struct elf_link_hash_entry *h + = (struct elf_link_hash_entry *) *slot; + struct bfd_link_info *info + = (struct bfd_link_info *) inf; + + return elf64_x86_64_finish_dynamic_symbol (info->output_bfd, + info, h, NULL); +} + /* Used to decide how to sort relocs in an optimal manner for the dynamic linker, before writing them out. */ @@ -3466,7 +3989,7 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf { Elf64_External_Dyn *dyncon, *dynconend; - if (sdyn == NULL || htab->sgot == NULL) + if (sdyn == NULL || htab->elf.sgot == NULL) abort (); dyncon = (Elf64_External_Dyn *) sdyn->contents; @@ -3484,16 +4007,16 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf continue; case DT_PLTGOT: - s = htab->sgotplt; + s = htab->elf.sgotplt; dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; break; case DT_JMPREL: - dyn.d_un.d_ptr = htab->srelplt->output_section->vma; + dyn.d_un.d_ptr = htab->elf.srelplt->output_section->vma; break; case DT_PLTRELSZ: - s = htab->srelplt->output_section; + s = htab->elf.srelplt->output_section; dyn.d_un.d_val = s->size; break; @@ -3505,21 +4028,21 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf linker script arranges for .rela.plt to follow all other relocation sections, we don't have to worry about changing the DT_RELA entry. */ - if (htab->srelplt != NULL) + if (htab->elf.srelplt != NULL) { - s = htab->srelplt->output_section; + s = htab->elf.srelplt->output_section; dyn.d_un.d_val -= s->size; } break; case DT_TLSDESC_PLT: - s = htab->splt; + s = htab->elf.splt; dyn.d_un.d_ptr = s->output_section->vma + s->output_offset + htab->tlsdesc_plt; break; case DT_TLSDESC_GOT: - s = htab->sgot; + s = htab->elf.sgot; dyn.d_un.d_ptr = s->output_section->vma + s->output_offset + htab->tlsdesc_got; break; @@ -3529,97 +4052,102 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf } /* Fill in the special first entry in the procedure linkage table. */ - if (htab->splt && htab->splt->size > 0) + if (htab->elf.splt && htab->elf.splt->size > 0) { /* Fill in the first entry in the procedure linkage table. */ - memcpy (htab->splt->contents, elf64_x86_64_plt0_entry, + memcpy (htab->elf.splt->contents, elf64_x86_64_plt0_entry, PLT_ENTRY_SIZE); /* Add offset for pushq GOT+8(%rip), since the instruction uses 6 bytes subtract this value. */ bfd_put_32 (output_bfd, - (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + (htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset + 8 - - htab->splt->output_section->vma - - htab->splt->output_offset + - htab->elf.splt->output_section->vma + - htab->elf.splt->output_offset - 6), - htab->splt->contents + 2); + htab->elf.splt->contents + 2); /* Add offset for jmp *GOT+16(%rip). The 12 is the offset to the end of the instruction. */ bfd_put_32 (output_bfd, - (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + (htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset + 16 - - htab->splt->output_section->vma - - htab->splt->output_offset + - htab->elf.splt->output_section->vma + - htab->elf.splt->output_offset - 12), - htab->splt->contents + 8); + htab->elf.splt->contents + 8); - elf_section_data (htab->splt->output_section)->this_hdr.sh_entsize = + elf_section_data (htab->elf.splt->output_section)->this_hdr.sh_entsize = PLT_ENTRY_SIZE; if (htab->tlsdesc_plt) { bfd_put_64 (output_bfd, (bfd_vma) 0, - htab->sgot->contents + htab->tlsdesc_got); + htab->elf.sgot->contents + htab->tlsdesc_got); - memcpy (htab->splt->contents + htab->tlsdesc_plt, + memcpy (htab->elf.splt->contents + htab->tlsdesc_plt, elf64_x86_64_plt0_entry, PLT_ENTRY_SIZE); /* Add offset for pushq GOT+8(%rip), since the instruction uses 6 bytes subtract this value. */ bfd_put_32 (output_bfd, - (htab->sgotplt->output_section->vma - + htab->sgotplt->output_offset + (htab->elf.sgotplt->output_section->vma + + htab->elf.sgotplt->output_offset + 8 - - htab->splt->output_section->vma - - htab->splt->output_offset + - htab->elf.splt->output_section->vma + - htab->elf.splt->output_offset - htab->tlsdesc_plt - 6), - htab->splt->contents + htab->tlsdesc_plt + 2); + htab->elf.splt->contents + htab->tlsdesc_plt + 2); /* Add offset for jmp *GOT+TDG(%rip), where TGD stands for htab->tlsdesc_got. The 12 is the offset to the end of the instruction. */ bfd_put_32 (output_bfd, - (htab->sgot->output_section->vma - + htab->sgot->output_offset + (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset + htab->tlsdesc_got - - htab->splt->output_section->vma - - htab->splt->output_offset + - htab->elf.splt->output_section->vma + - htab->elf.splt->output_offset - htab->tlsdesc_plt - 12), - htab->splt->contents + htab->tlsdesc_plt + 8); + htab->elf.splt->contents + htab->tlsdesc_plt + 8); } } } - if (htab->sgotplt) + if (htab->elf.sgotplt) { /* Fill in the first three entries in the global offset table. */ - if (htab->sgotplt->size > 0) + if (htab->elf.sgotplt->size > 0) { /* Set the first entry in the global offset table to the address of the dynamic section. */ if (sdyn == NULL) - bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents); + bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents); else bfd_put_64 (output_bfd, sdyn->output_section->vma + sdyn->output_offset, - htab->sgotplt->contents); + htab->elf.sgotplt->contents); /* Write GOT[1] and GOT[2], needed for the dynamic linker. */ - bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + GOT_ENTRY_SIZE); - bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + GOT_ENTRY_SIZE*2); + bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + GOT_ENTRY_SIZE); + bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + GOT_ENTRY_SIZE*2); } - elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize = + elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize = GOT_ENTRY_SIZE; } - if (htab->sgot && htab->sgot->size > 0) - elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize + if (htab->elf.sgot && htab->elf.sgot->size > 0) + elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = GOT_ENTRY_SIZE; + /* Fill PLT and GOT entries for local STT_GNU_IFUNC symbols. */ + htab_traverse (htab->loc_hash_table, + elf64_x86_64_finish_local_dynamic_symbol, + info); + return TRUE; } @@ -3657,11 +4185,12 @@ elf64_x86_64_section_from_shdr (bfd *abfd, static bfd_boolean elf64_x86_64_add_symbol_hook (bfd *abfd, - struct bfd_link_info *info ATTRIBUTE_UNUSED, + struct bfd_link_info *info, Elf_Internal_Sym *sym, const char **namep ATTRIBUTE_UNUSED, flagword *flagsp ATTRIBUTE_UNUSED, - asection **secp, bfd_vma *valp) + asection **secp, + bfd_vma *valp) { asection *lcomm; @@ -3684,6 +4213,10 @@ elf64_x86_64_add_symbol_hook (bfd *abfd, *valp = sym->st_size; break; } + + if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + return TRUE; } @@ -3863,6 +4396,8 @@ static const struct bfd_elf_special_section #define bfd_elf64_bfd_link_hash_table_create \ elf64_x86_64_link_hash_table_create +#define bfd_elf64_bfd_link_hash_table_free \ + elf64_x86_64_link_hash_table_free #define bfd_elf64_bfd_reloc_type_lookup elf64_x86_64_reloc_type_lookup #define bfd_elf64_bfd_reloc_name_lookup \ elf64_x86_64_reloc_name_lookup @@ -3911,6 +4446,9 @@ static const struct bfd_elf_special_section #define elf_backend_hash_symbol \ elf64_x86_64_hash_symbol +#undef elf_backend_post_process_headers +#define elf_backend_post_process_headers _bfd_elf_set_osabi + #include "elf64-target.h" /* FreeBSD support. */ @@ -3923,10 +4461,57 @@ static const struct bfd_elf_special_section #undef ELF_OSABI #define ELF_OSABI ELFOSABI_FREEBSD +#undef elf64_bed +#define elf64_bed elf64_x86_64_fbsd_bed + +#include "elf64-target.h" + +/* Intel L1OM support. */ + +static bfd_boolean +elf64_l1om_elf_object_p (bfd *abfd) +{ + /* Set the right machine number for an L1OM elf64 file. */ + bfd_default_set_arch_mach (abfd, bfd_arch_l1om, bfd_mach_l1om); + return TRUE; +} + +#undef TARGET_LITTLE_SYM +#define TARGET_LITTLE_SYM bfd_elf64_l1om_vec +#undef TARGET_LITTLE_NAME +#define TARGET_LITTLE_NAME "elf64-l1om" +#undef ELF_ARCH +#define ELF_ARCH bfd_arch_l1om + +#undef ELF_MACHINE_CODE +#define ELF_MACHINE_CODE EM_L1OM + +#undef ELF_OSABI + +#undef elf64_bed +#define elf64_bed elf64_l1om_bed + +#undef elf_backend_object_p +#define elf_backend_object_p elf64_l1om_elf_object_p + #undef elf_backend_post_process_headers -#define elf_backend_post_process_headers _bfd_elf_set_osabi + +#include "elf64-target.h" + +/* FreeBSD L1OM support. */ + +#undef TARGET_LITTLE_SYM +#define TARGET_LITTLE_SYM bfd_elf64_l1om_freebsd_vec +#undef TARGET_LITTLE_NAME +#define TARGET_LITTLE_NAME "elf64-l1om-freebsd" + +#undef ELF_OSABI +#define ELF_OSABI ELFOSABI_FREEBSD #undef elf64_bed -#define elf64_bed elf64_x86_64_fbsd_bed +#define elf64_bed elf64_l1om_fbsd_bed + +#undef elf_backend_post_process_headers +#define elf_backend_post_process_headers _bfd_elf_set_osabi #include "elf64-target.h" diff --git a/cegcc/src/binutils/bfd/elf64.c b/cegcc/src/binutils/bfd/elf64.c index e983d2d61..04fd3f0b4 100644 --- a/cegcc/src/binutils/bfd/elf64.c +++ b/cegcc/src/binutils/bfd/elf64.c @@ -1,5 +1,5 @@ /* ELF 64-bit executable support for BFD. - Copyright 1993, 2007 Free Software Foundation, Inc. + Copyright 1993, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/elfcode.h b/cegcc/src/binutils/bfd/elfcode.h index b42229f00..ecdc2de5b 100644 --- a/cegcc/src/binutils/bfd/elfcode.h +++ b/cegcc/src/binutils/bfd/elfcode.h @@ -1,6 +1,6 @@ /* ELF executable support for BFD. Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Fred Fish @ Cygnus Support, from information published @@ -176,8 +176,8 @@ elf_swap_symbol_in (bfd *abfd, const void *pshn, Elf_Internal_Sym *dst) { - const Elf_External_Sym *src = psrc; - const Elf_External_Sym_Shndx *shndx = pshn; + const Elf_External_Sym *src = (const Elf_External_Sym *) psrc; + const Elf_External_Sym_Shndx *shndx = (const Elf_External_Sym_Shndx *) pshn; int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma; dst->st_name = H_GET_32 (abfd, src->st_name); @@ -210,7 +210,7 @@ elf_swap_symbol_out (bfd *abfd, void *shndx) { unsigned int tmp; - Elf_External_Sym *dst = cdst; + Elf_External_Sym *dst = (Elf_External_Sym *) cdst; H_PUT_32 (abfd, src->st_name, dst->st_name); H_PUT_WORD (abfd, src->st_value, dst->st_value); H_PUT_WORD (abfd, src->st_size, dst->st_size); @@ -439,7 +439,7 @@ elf_swap_dyn_in (bfd *abfd, const void *p, Elf_Internal_Dyn *dst) { - const Elf_External_Dyn *src = p; + const Elf_External_Dyn *src = (const Elf_External_Dyn *) p; dst->d_tag = H_GET_WORD (abfd, src->d_tag); dst->d_un.d_val = H_GET_WORD (abfd, src->d_un.d_val); @@ -450,7 +450,7 @@ elf_swap_dyn_out (bfd *abfd, const Elf_Internal_Dyn *src, void *p) { - Elf_External_Dyn *dst = p; + Elf_External_Dyn *dst = (Elf_External_Dyn *) p; H_PUT_WORD (abfd, src->d_tag, dst->d_tag); H_PUT_WORD (abfd, src->d_un.d_val, dst->d_un.d_val); @@ -736,13 +736,13 @@ elf_object_p (bfd *abfd) unsigned int num_sec; amt = sizeof (*i_shdrp) * i_ehdrp->e_shnum; - i_shdrp = bfd_alloc (abfd, amt); + i_shdrp = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt); if (!i_shdrp) goto got_no_match; num_sec = i_ehdrp->e_shnum; elf_numsections (abfd) = num_sec; amt = sizeof (i_shdrp) * num_sec; - elf_elfsections (abfd) = bfd_alloc (abfd, amt); + elf_elfsections (abfd) = (Elf_Internal_Shdr **) bfd_alloc (abfd, amt); if (!elf_elfsections (abfd)) goto got_no_match; @@ -760,7 +760,26 @@ elf_object_p (bfd *abfd) /* Sanity check sh_link and sh_info. */ if (i_shdrp[shindex].sh_link >= num_sec) - goto got_wrong_format_error; + { + /* PR 10478: Accept Solaris binaries with a sh_link + field set to SHN_BEFORE or SHN_AFTER. */ + switch (ebd->elf_machine_code) + { + case EM_386: + case EM_486: + case EM_X86_64: + case EM_OLD_SPARCV9: + case EM_SPARC32PLUS: + case EM_SPARCV9: + case EM_SPARC: + if (i_shdrp[shindex].sh_link == (SHN_LORESERVE & 0xffff) /* SHN_BEFORE */ + || i_shdrp[shindex].sh_link == ((SHN_LORESERVE + 1) & 0xffff) /* SHN_AFTER */) + break; + /* Otherwise fall through. */ + default: + goto got_wrong_format_error; + } + } if (((i_shdrp[shindex].sh_flags & SHF_INFO_LINK) || i_shdrp[shindex].sh_type == SHT_RELA @@ -807,7 +826,7 @@ elf_object_p (bfd *abfd) unsigned int i; amt = i_ehdrp->e_phnum * sizeof (Elf_Internal_Phdr); - elf_tdata (abfd)->phdr = bfd_alloc (abfd, amt); + elf_tdata (abfd)->phdr = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt); if (elf_tdata (abfd)->phdr == NULL) goto got_no_match; if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_phoff, SEEK_SET) != 0) @@ -898,7 +917,7 @@ elf_object_p (bfd *abfd) void elf_write_relocs (bfd *abfd, asection *sec, void *data) { - bfd_boolean *failedp = data; + bfd_boolean *failedp = (bfd_boolean *) data; Elf_Internal_Shdr *rela_hdr; bfd_vma addr_offset; void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *); @@ -931,7 +950,7 @@ elf_write_relocs (bfd *abfd, asection *sec, void *data) rela_hdr = &elf_section_data (sec)->rel_hdr; rela_hdr->sh_size = rela_hdr->sh_entsize * sec->reloc_count; - rela_hdr->contents = bfd_alloc (abfd, rela_hdr->sh_size); + rela_hdr->contents = (unsigned char *) bfd_alloc (abfd, rela_hdr->sh_size); if (rela_hdr->contents == NULL) { *failedp = TRUE; @@ -1061,7 +1080,7 @@ elf_write_shdrs_and_ehdr (bfd *abfd) /* at this point we've concocted all the ELF sections... */ amt = i_ehdrp->e_shnum; amt *= sizeof (*x_shdrp); - x_shdrp = bfd_alloc (abfd, amt); + x_shdrp = (Elf_External_Shdr *) bfd_alloc (abfd, amt); if (!x_shdrp) return FALSE; @@ -1189,7 +1208,7 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic) amt = symcount; amt *= sizeof (elf_symbol_type); - symbase = bfd_zalloc (abfd, amt); + symbase = (elf_symbol_type *) bfd_zalloc (abfd, amt); if (symbase == (elf_symbol_type *) NULL) goto error_return; @@ -1213,7 +1232,7 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic) if (bfd_seek (abfd, verhdr->sh_offset, SEEK_SET) != 0) goto error_return; - xverbuf = bfd_malloc (verhdr->sh_size); + xverbuf = (Elf_External_Versym *) bfd_malloc (verhdr->sh_size); if (xverbuf == NULL && verhdr->sh_size != 0) goto error_return; @@ -1282,6 +1301,9 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic) case STB_WEAK: sym->symbol.flags |= BSF_WEAK; break; + case STB_GNU_UNIQUE: + sym->symbol.flags |= BSF_GNU_UNIQUE; + break; } switch (ELF_ST_TYPE (isym->st_info)) @@ -1311,6 +1333,9 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic) case STT_SRELC: sym->symbol.flags |= BSF_SRELC; break; + case STT_GNU_IFUNC: + sym->symbol.flags |= BSF_GNU_INDIRECT_FUNCTION; + break; } if (dynamic) @@ -1396,7 +1421,7 @@ elf_slurp_reloc_table_from_section (bfd *abfd, != rel_hdr->sh_size)) goto error_return; - native_relocs = allocated; + native_relocs = (bfd_byte *) allocated; entsize = rel_hdr->sh_entsize; BFD_ASSERT (entsize == sizeof (Elf_External_Rel) @@ -1517,7 +1542,7 @@ elf_slurp_reloc_table (bfd *abfd, } amt = (reloc_count + reloc_count2) * sizeof (arelent); - relents = bfd_alloc (abfd, amt); + relents = (arelent *) bfd_alloc (abfd, amt); if (relents == NULL) return FALSE; @@ -1668,7 +1693,8 @@ NAME(_bfd_elf,bfd_from_remote_memory) return NULL; } - x_phdrs = bfd_malloc (i_ehdr.e_phnum * (sizeof *x_phdrs + sizeof *i_phdrs)); + x_phdrs = (Elf_External_Phdr *) + bfd_malloc (i_ehdr.e_phnum * (sizeof *x_phdrs + sizeof *i_phdrs)); if (x_phdrs == NULL) { bfd_set_error (bfd_error_no_memory); @@ -1736,7 +1762,7 @@ NAME(_bfd_elf,bfd_from_remote_memory) contents_size = last_phdr->p_offset + last_phdr->p_filesz; /* Now we know the size of the whole image we want read in. */ - contents = bfd_zmalloc (contents_size); + contents = (bfd_byte *) bfd_zmalloc (contents_size); if (contents == NULL) { free (x_phdrs); @@ -1781,7 +1807,7 @@ NAME(_bfd_elf,bfd_from_remote_memory) memcpy (contents, &x_ehdr, sizeof x_ehdr); /* Now we have a memory image of the ELF file contents. Make a BFD. */ - bim = bfd_malloc (sizeof (struct bfd_in_memory)); + bim = (struct bfd_in_memory *) bfd_malloc (sizeof (struct bfd_in_memory)); if (bim == NULL) { free (contents); diff --git a/cegcc/src/binutils/bfd/elfcore.h b/cegcc/src/binutils/bfd/elfcore.h index f9d578860..c51c57560 100644 --- a/cegcc/src/binutils/bfd/elfcore.h +++ b/cegcc/src/binutils/bfd/elfcore.h @@ -190,7 +190,7 @@ elf_core_file_p (bfd *abfd) /* Allocate space for the program headers. */ amt = sizeof (*i_phdrp) * i_ehdrp->e_phnum; - i_phdrp = bfd_alloc (abfd, amt); + i_phdrp = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt); if (!i_phdrp) goto fail; diff --git a/cegcc/src/binutils/bfd/elflink.c b/cegcc/src/binutils/bfd/elflink.c index 8685a2fe1..02f10ee36 100644 --- a/cegcc/src/binutils/bfd/elflink.c +++ b/cegcc/src/binutils/bfd/elflink.c @@ -101,58 +101,57 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) asection *s; struct elf_link_hash_entry *h; const struct elf_backend_data *bed = get_elf_backend_data (abfd); - int ptralign; + struct elf_link_hash_table *htab = elf_hash_table (info); /* This function may be called more than once. */ s = bfd_get_section_by_name (abfd, ".got"); if (s != NULL && (s->flags & SEC_LINKER_CREATED) != 0) return TRUE; - switch (bed->s->arch_size) - { - case 32: - ptralign = 2; - break; - - case 64: - ptralign = 3; - break; - - default: - bfd_set_error (bfd_error_bad_value); - return FALSE; - } - flags = bed->dynamic_sec_flags; + s = bfd_make_section_with_flags (abfd, + (bed->rela_plts_and_copies_p + ? ".rela.got" : ".rel.got"), + (bed->dynamic_sec_flags + | SEC_READONLY)); + if (s == NULL + || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align)) + return FALSE; + htab->srelgot = s; + s = bfd_make_section_with_flags (abfd, ".got", flags); if (s == NULL - || !bfd_set_section_alignment (abfd, s, ptralign)) + || !bfd_set_section_alignment (abfd, s, bed->s->log_file_align)) return FALSE; + htab->sgot = s; if (bed->want_got_plt) { s = bfd_make_section_with_flags (abfd, ".got.plt", flags); if (s == NULL - || !bfd_set_section_alignment (abfd, s, ptralign)) + || !bfd_set_section_alignment (abfd, s, + bed->s->log_file_align)) return FALSE; + htab->sgotplt = s; } + /* The first bit of the global offset table is the header. */ + s->size += bed->got_header_size; + if (bed->want_got_sym) { /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got (or .got.plt) section. We don't do this in the linker script because we don't want to define the symbol if we are not creating a global offset table. */ - h = _bfd_elf_define_linkage_sym (abfd, info, s, "_GLOBAL_OFFSET_TABLE_"); + h = _bfd_elf_define_linkage_sym (abfd, info, s, + "_GLOBAL_OFFSET_TABLE_"); elf_hash_table (info)->hgot = h; if (h == NULL) return FALSE; } - /* The first bit of the global offset table is the header. */ - s->size += bed->got_header_size; - return TRUE; } @@ -303,6 +302,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) struct elf_link_hash_entry *h; asection *s; const struct elf_backend_data *bed = get_elf_backend_data (abfd); + struct elf_link_hash_table *htab = elf_hash_table (info); /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and .rel[a].bss sections. */ @@ -323,6 +323,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s == NULL || ! bfd_set_section_alignment (abfd, s, bed->plt_alignment)) return FALSE; + htab->splt = s; /* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the .plt section. */ @@ -342,6 +343,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s == NULL || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align)) return FALSE; + htab->srelplt = s; if (! _bfd_elf_create_got_section (abfd, info)) return FALSE; @@ -632,7 +634,7 @@ bfd_elf_link_record_local_dynamic_symbol (struct bfd_link_info *info, return 1; amt = sizeof (*entry); - entry = bfd_alloc (input_bfd, amt); + entry = (struct elf_link_local_dynamic_entry *) bfd_alloc (input_bfd, amt); if (entry == NULL) return 0; @@ -717,7 +719,7 @@ static bfd_boolean elf_link_renumber_hash_table_dynsyms (struct elf_link_hash_entry *h, void *data) { - size_t *count = data; + size_t *count = (size_t *) data; if (h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; @@ -739,7 +741,7 @@ static bfd_boolean elf_link_renumber_local_hash_table_dynsyms (struct elf_link_hash_entry *h, void *data) { - size_t *count = data; + size_t *count = (size_t *) data; if (h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; @@ -1246,6 +1248,9 @@ _bfd_elf_merge_symbol (bfd *abfd, oldweak = (h->root.type == bfd_link_hash_defweak || h->root.type == bfd_link_hash_undefweak); + if (bind == STB_GNU_UNIQUE) + h->unique_global = 1; + /* If a new weak symbol definition comes from a regular file and the old symbol comes from a dynamic library, we treat the new one as strong. Similarly, an old weak symbol definition from a regular @@ -1619,7 +1624,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, dynamic = (abfd->flags & DYNAMIC) != 0; shortlen = p - name; - shortname = bfd_hash_allocate (&info->hash->table, shortlen + 1); + shortname = (char *) bfd_hash_allocate (&info->hash->table, shortlen + 1); if (shortname == NULL) return FALSE; memcpy (shortname, name, shortlen); @@ -1730,7 +1735,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, nondefault: len = strlen (name); - shortname = bfd_hash_allocate (&info->hash->table, len); + shortname = (char *) bfd_hash_allocate (&info->hash->table, len); if (shortname == NULL) return FALSE; memcpy (shortname, name, shortlen); @@ -1798,87 +1803,13 @@ nondefault: return TRUE; } -static struct bfd_elf_version_tree * -find_version_for_sym (struct bfd_elf_version_tree *verdefs, - const char *sym_name, - bfd_boolean *hide) -{ - struct bfd_elf_version_tree *t; - struct bfd_elf_version_tree *local_ver, *global_ver, *exist_ver; - - local_ver = NULL; - global_ver = NULL; - exist_ver = NULL; - for (t = verdefs; t != NULL; t = t->next) - { - if (t->globals.list != NULL) - { - struct bfd_elf_version_expr *d = NULL; - - while ((d = (*t->match) (&t->globals, d, sym_name)) != NULL) - { - global_ver = t; - if (d->symver) - exist_ver = t; - d->script = 1; - /* If the match is a wildcard pattern, keep looking for - a more explicit, perhaps even local, match. */ - if (d->literal) - break; - } - - if (d != NULL) - break; - } - - if (t->locals.list != NULL) - { - struct bfd_elf_version_expr *d = NULL; - - while ((d = (*t->match) (&t->locals, d, sym_name)) != NULL) - { - local_ver = t; - /* If the match is a wildcard pattern, keep looking for - a more explicit, perhaps even global, match. */ - if (d->literal) - { - /* An exact match overrides a global wildcard. */ - global_ver = NULL; - break; - } - } - - if (d != NULL) - break; - } - } - - if (global_ver != NULL) - { - /* If we already have a versioned symbol that matches the - node for this symbol, then we don't want to create a - duplicate from the unversioned symbol. Instead hide the - unversioned symbol. */ - *hide = exist_ver == global_ver; - return global_ver; - } - - if (local_ver != NULL) - { - *hide = TRUE; - return local_ver; - } - - return NULL; -} - /* This routine is used to export all defined symbols into the dynamic symbol table. It is called via elf_link_hash_traverse. */ static bfd_boolean _bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data) { - struct elf_info_failed *eif = data; + struct elf_info_failed *eif = (struct elf_info_failed *) data; /* Ignore this if we won't export it. */ if (!eif->info->export_dynamic && !h->dynamic) @@ -1898,7 +1829,7 @@ _bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data) bfd_boolean hide; if (eif->verdefs == NULL - || (find_version_for_sym (eif->verdefs, h->root.root.string, &hide) + || (bfd_find_version_for_sym (eif->verdefs, h->root.root.string, &hide) && !hide)) { if (! bfd_elf_link_record_dynamic_symbol (eif->info, h)) @@ -1921,7 +1852,7 @@ static bfd_boolean _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h, void *data) { - struct elf_find_verdep_info *rinfo = data; + struct elf_find_verdep_info *rinfo = (struct elf_find_verdep_info *) data; Elf_Internal_Verneed *t; Elf_Internal_Vernaux *a; bfd_size_type amt; @@ -1957,7 +1888,7 @@ _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h, if (t == NULL) { amt = sizeof *t; - t = bfd_zalloc (rinfo->info->output_bfd, amt); + t = (Elf_Internal_Verneed *) bfd_zalloc (rinfo->info->output_bfd, amt); if (t == NULL) { rinfo->failed = TRUE; @@ -1970,7 +1901,7 @@ _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h, } amt = sizeof *a; - a = bfd_zalloc (rinfo->info->output_bfd, amt); + a = (Elf_Internal_Vernaux *) bfd_zalloc (rinfo->info->output_bfd, amt); if (a == NULL) { rinfo->failed = TRUE; @@ -2011,7 +1942,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) char *p; bfd_size_type amt; - sinfo = data; + sinfo = (struct elf_info_failed *) data; info = sinfo->info; if (h->root.type == bfd_link_hash_warning) @@ -2068,7 +1999,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) struct bfd_elf_version_expr *d; len = p - h->root.root.string; - alc = bfd_malloc (len); + alc = (char *) bfd_malloc (len); if (alc == NULL) { sinfo->failed = TRUE; @@ -2115,7 +2046,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) return TRUE; amt = sizeof *t; - t = bfd_zalloc (info->output_bfd, amt); + t = (struct bfd_elf_version_tree *) bfd_zalloc (info->output_bfd, amt); if (t == NULL) { sinfo->failed = TRUE; @@ -2160,7 +2091,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) { bfd_boolean hide; - h->verinfo.vertree = find_version_for_sym (sinfo->verdefs, + h->verinfo.vertree = bfd_find_version_for_sym (sinfo->verdefs, h->root.root.string, &hide); if (h->verinfo.vertree != NULL && hide) (*bed->elf_backend_hide_symbol) (info, h, TRUE); @@ -2202,7 +2133,7 @@ elf_link_read_relocs_from_section (bfd *abfd, return FALSE; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - nsyms = symtab_hdr->sh_size / symtab_hdr->sh_entsize; + nsyms = NUM_SHDR_ENTRIES (symtab_hdr); bed = get_elf_backend_data (abfd); @@ -2217,7 +2148,7 @@ elf_link_read_relocs_from_section (bfd *abfd, return FALSE; } - erela = external_relocs; + erela = (const bfd_byte *) external_relocs; erelaend = erela + shdr->sh_size; irela = internal_relocs; while (erela < erelaend) @@ -2228,11 +2159,24 @@ elf_link_read_relocs_from_section (bfd *abfd, r_symndx = ELF32_R_SYM (irela->r_info); if (bed->s->arch_size == 64) r_symndx >>= 24; - if ((size_t) r_symndx >= nsyms) + if (nsyms > 0) + { + if ((size_t) r_symndx >= nsyms) + { + (*_bfd_error_handler) + (_("%B: bad reloc symbol index (0x%lx >= 0x%lx)" + " for offset 0x%lx in section `%A'"), + abfd, sec, + (unsigned long) r_symndx, (unsigned long) nsyms, irela->r_offset); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + } + else if (r_symndx != 0) { (*_bfd_error_handler) - (_("%B: bad reloc symbol index (0x%lx >= 0x%lx)" - " for offset 0x%lx in section `%A'"), + (_("%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A'" + " when the object file has no symbol table"), abfd, sec, (unsigned long) r_symndx, (unsigned long) nsyms, irela->r_offset); bfd_set_error (bfd_error_bad_value); @@ -2282,9 +2226,9 @@ _bfd_elf_link_read_relocs (bfd *abfd, size = o->reloc_count; size *= bed->s->int_rels_per_ext_rel * sizeof (Elf_Internal_Rela); if (keep_memory) - internal_relocs = alloc2 = bfd_alloc (abfd, size); + internal_relocs = alloc2 = (Elf_Internal_Rela *) bfd_alloc (abfd, size); else - internal_relocs = alloc2 = bfd_malloc (size); + internal_relocs = alloc2 = (Elf_Internal_Rela *) bfd_malloc (size); if (internal_relocs == NULL) goto error_return; } @@ -2367,7 +2311,7 @@ _bfd_elf_link_size_reloc_section (bfd *abfd, allocate it with bfd_alloc rather than malloc. Also since we cannot be sure that the contents will actually be filled in, we zero the allocated space. */ - rel_hdr->contents = bfd_zalloc (abfd, rel_hdr->sh_size); + rel_hdr->contents = (unsigned char *) bfd_zalloc (abfd, rel_hdr->sh_size); if (rel_hdr->contents == NULL && rel_hdr->sh_size != 0) return FALSE; @@ -2378,7 +2322,8 @@ _bfd_elf_link_size_reloc_section (bfd *abfd, { struct elf_link_hash_entry **p; - p = bfd_zmalloc (num_rel_hashes * sizeof (struct elf_link_hash_entry *)); + p = (struct elf_link_hash_entry **) + bfd_zmalloc (num_rel_hashes * sizeof (struct elf_link_hash_entry *)); if (p == NULL) return FALSE; @@ -2627,7 +2572,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h, static bfd_boolean _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data) { - struct elf_info_failed *eif = data; + struct elf_info_failed *eif = (struct elf_info_failed *) data; bfd *dynobj; const struct elf_backend_data *bed; @@ -2661,6 +2606,7 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data) about symbols which are defined by one dynamic object and referenced by another one? */ if (!h->needs_plt + && h->type != STT_GNU_IFUNC && (h->def_regular || !h->def_dynamic || (!h->ref_regular @@ -2807,7 +2753,7 @@ _bfd_elf_link_sec_merge_syms (struct elf_link_hash_entry *h, void *data) && ((sec = h->root.u.def.section)->flags & SEC_MERGE) && sec->sec_info_type == ELF_INFO_TYPE_MERGE) { - bfd *output_bfd = data; + bfd *output_bfd = (bfd *) data; h->root.u.def.value = _bfd_merged_section_offset (output_bfd, @@ -3122,7 +3068,7 @@ _bfd_elf_add_dynamic_entry (struct bfd_link_info *info, BFD_ASSERT (s != NULL); newsize = s->size + bed->s->sizeof_dyn; - newcontents = bfd_realloc (s->contents, newsize); + newcontents = (bfd_byte *) bfd_realloc (s->contents, newsize); if (newcontents == NULL) return FALSE; @@ -3237,7 +3183,7 @@ elf_sort_symbol (const void *arg1, const void *arg2) static bfd_boolean elf_adjust_dynstr_offsets (struct elf_link_hash_entry *h, void *data) { - struct elf_strtab_hash *dynstr = data; + struct elf_strtab_hash *dynstr = (struct elf_strtab_hash *) data; if (h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; @@ -3288,6 +3234,8 @@ elf_finalize_dynstr (bfd *output_bfd, struct bfd_link_info *info) case DT_RUNPATH: case DT_FILTER: case DT_AUXILIARY: + case DT_AUDIT: + case DT_DEPAUDIT: dyn.d_un.d_val = _bfd_elf_strtab_offset (dynstr, dyn.d_un.d_val); break; default: @@ -3412,6 +3360,7 @@ _bfd_elf_relocs_compatible (const bfd_target *input, static bfd_boolean elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { + Elf_Internal_Ehdr *ehdr; Elf_Internal_Shdr *hdr; bfd_size_type symcount; bfd_size_type extsymcount; @@ -3467,6 +3416,17 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) } } + ehdr = elf_elfheader (abfd); + if (info->warn_alternate_em + && bed->elf_machine_code != ehdr->e_machine + && ((bed->elf_machine_alt1 != 0 + && ehdr->e_machine == bed->elf_machine_alt1) + || (bed->elf_machine_alt2 != 0 + && ehdr->e_machine == bed->elf_machine_alt2))) + info->callbacks->einfo + (_("%P: alternate ELF machine code found (%d) in %B, expecting %d\n"), + ehdr->e_machine, abfd, bed->elf_machine_code); + /* As a GNU extension, any input sections which are named .gnu.warning.SYMBOL are treated as warning symbols for the given symbol. This differs from .gnu.warning sections, which generate @@ -3516,7 +3476,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) } sz = s->size; - msg = bfd_alloc (abfd, sz + 1); + msg = (char *) bfd_alloc (abfd, sz + 1); if (msg == NULL) goto error_return; @@ -3567,6 +3527,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { asection *s; const char *soname = NULL; + char *audit = NULL; struct bfd_link_needed_list *rpath = NULL, *runpath = NULL; int ret; @@ -3596,7 +3557,11 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) unsigned long shlink; if (!bfd_malloc_and_get_section (abfd, s, &dynbuf)) - goto error_free_dyn; + { +error_free_dyn: + free (dynbuf); + goto error_return; + } elfsec = _bfd_elf_section_from_bfd_section (abfd, s); if (elfsec == SHN_BAD) @@ -3624,12 +3589,12 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) unsigned int tagv = dyn.d_un.d_val; amt = sizeof (struct bfd_link_needed_list); - n = bfd_alloc (abfd, amt); + n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt); fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv); if (n == NULL || fnm == NULL) goto error_free_dyn; amt = strlen (fnm) + 1; - anm = bfd_alloc (abfd, amt); + anm = (char *) bfd_alloc (abfd, amt); if (anm == NULL) goto error_free_dyn; memcpy (anm, fnm, amt); @@ -3647,12 +3612,12 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) unsigned int tagv = dyn.d_un.d_val; amt = sizeof (struct bfd_link_needed_list); - n = bfd_alloc (abfd, amt); + n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt); fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv); if (n == NULL || fnm == NULL) goto error_free_dyn; amt = strlen (fnm) + 1; - anm = bfd_alloc (abfd, amt); + anm = (char *) bfd_alloc (abfd, amt); if (anm == NULL) goto error_free_dyn; memcpy (anm, fnm, amt); @@ -3673,18 +3638,14 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) unsigned int tagv = dyn.d_un.d_val; amt = sizeof (struct bfd_link_needed_list); - n = bfd_alloc (abfd, amt); + n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt); fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv); if (n == NULL || fnm == NULL) goto error_free_dyn; amt = strlen (fnm) + 1; - anm = bfd_alloc (abfd, amt); + anm = (char *) bfd_alloc (abfd, amt); if (anm == NULL) - { - error_free_dyn: - free (dynbuf); - goto error_return; - } + goto error_free_dyn; memcpy (anm, fnm, amt); n->name = anm; n->by = abfd; @@ -3695,6 +3656,11 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) ; *pn = n; } + if (dyn.d_tag == DT_AUDIT) + { + unsigned int tagv = dyn.d_un.d_val; + audit = bfd_elf_string_from_elf_section (abfd, shlink, tagv); + } } free (dynbuf); @@ -3747,6 +3713,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) particular dynamic object more than once. */ if (ret > 0) return TRUE; + + /* Save the DT_AUDIT entry for the linker emulation code. */ + elf_dt_audit (abfd) = audit; } /* If this is a dynamic object, we always link against the .dynsym @@ -3786,7 +3755,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) /* We store a pointer to the hash table entry for each external symbol. */ amt = extsymcount * sizeof (struct elf_link_hash_entry *); - sym_hash = bfd_alloc (abfd, amt); + sym_hash = (struct elf_link_hash_entry **) bfd_alloc (abfd, amt); if (sym_hash == NULL) goto error_free_sym; elf_sym_hashes (abfd) = sym_hash; @@ -3806,7 +3775,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) Elf_Internal_Shdr *versymhdr; versymhdr = &elf_tdata (abfd)->dynversym_hdr; - extversym = bfd_malloc (versymhdr->sh_size); + extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size); if (extversym == NULL) goto error_free_sym; amt = versymhdr->sh_size; @@ -3918,24 +3887,31 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) common = bed->common_definition (isym); bind = ELF_ST_BIND (isym->st_info); - if (bind == STB_LOCAL) + switch (bind) { + case STB_LOCAL: /* This should be impossible, since ELF requires that all global symbols follow all local symbols, and that sh_info point to the first global symbol. Unfortunately, Irix 5 screws this up. */ continue; - } - else if (bind == STB_GLOBAL) - { + + case STB_GLOBAL: if (isym->st_shndx != SHN_UNDEF && !common) flags = BSF_GLOBAL; - } - else if (bind == STB_WEAK) - flags = BSF_WEAK; - else - { + break; + + case STB_WEAK: + flags = BSF_WEAK; + break; + + case STB_GNU_UNIQUE: + flags = BSF_GNU_UNIQUE; + break; + + default: /* Leave it up to the processor backend. */ + break; } if (isym->st_shndx == SHN_UNDEF) @@ -4115,7 +4091,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) && isym->st_shndx != SHN_UNDEF) ++newlen; - newname = bfd_hash_allocate (&htab->root.table, newlen); + newname = (char *) bfd_hash_allocate (&htab->root.table, newlen); if (newname == NULL) goto error_free_vers; memcpy (newname, name, namelen); @@ -4187,7 +4163,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; + *sym_hash = h; + h->unique_global = (flags & BSF_GNU_UNIQUE) != 0; new_weakdef = FALSE; if (dynamic @@ -4326,15 +4304,24 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (ELF_ST_TYPE (isym->st_info) != STT_NOTYPE && (definition || h->type == STT_NOTYPE)) { - if (h->type != STT_NOTYPE - && h->type != ELF_ST_TYPE (isym->st_info) - && ! type_change_ok) - (*_bfd_error_handler) - (_("Warning: type of symbol `%s' changed" - " from %d to %d in %B"), - abfd, name, h->type, ELF_ST_TYPE (isym->st_info)); + unsigned int type = ELF_ST_TYPE (isym->st_info); - h->type = ELF_ST_TYPE (isym->st_info); + /* Turn an IFUNC symbol from a DSO into a normal FUNC + symbol. */ + if (type == STT_GNU_IFUNC + && (abfd->flags & DYNAMIC) != 0) + type = STT_FUNC; + + if (h->type != type) + { + if (h->type != STT_NOTYPE && ! type_change_ok) + (*_bfd_error_handler) + (_("Warning: type of symbol `%s' changed" + " from %d to %d in %B"), + abfd, name, h->type, type); + + h->type = type; + } } /* Merge st_other field. */ @@ -4409,7 +4396,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { amt = ((isymend - isym + 1) * sizeof (struct elf_link_hash_entry *)); - nondeflt_vers = bfd_malloc (amt); + nondeflt_vers = + (struct elf_link_hash_entry **) bfd_malloc (amt); if (!nondeflt_vers) goto error_free_vers; } @@ -4460,13 +4448,14 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if ((elf_dyn_lib_class (abfd) & DYN_NO_NEEDED) != 0) { (*_bfd_error_handler) - (_("%s: invalid DSO for symbol `%s' definition"), + (_("%B: invalid DSO for symbol `%s' definition"), abfd, name); bfd_set_error (bfd_error_bad_value); goto error_free_vers; } - elf_dyn_lib_class (abfd) &= ~DYN_AS_NEEDED; + elf_dyn_lib_class (abfd) = (enum dynamic_lib_link_class) + (elf_dyn_lib_class (abfd) & ~DYN_AS_NEEDED); add_needed = TRUE; ret = elf_add_dt_needed_tag (abfd, info, soname, add_needed); @@ -4572,7 +4561,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) continue; amt = p - h->root.root.string; - shortname = bfd_malloc (amt + 1); + shortname = (char *) bfd_malloc (amt + 1); if (!shortname) goto error_free_vers; memcpy (shortname, h->root.root.string, amt); @@ -4630,7 +4619,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) defined symbol, search time for N weak defined symbols will be O(N^2). Binary search will cut it down to O(NlogN). */ amt = extsymcount * sizeof (struct elf_link_hash_entry *); - sorted_sym_hash = bfd_malloc (amt); + sorted_sym_hash = (struct elf_link_hash_entry **) bfd_malloc (amt); if (sorted_sym_hash == NULL) goto error_return; sym_hash = sorted_sym_hash; @@ -4843,7 +4832,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) /* Add this bfd to the loaded list. */ struct elf_link_loaded_list *n; - n = bfd_alloc (abfd, sizeof (struct elf_link_loaded_list)); + n = (struct elf_link_loaded_list *) + bfd_alloc (abfd, sizeof (struct elf_link_loaded_list)); if (n == NULL) goto error_return; n->abfd = abfd; @@ -4894,7 +4884,7 @@ _bfd_elf_archive_symbol_lookup (bfd *abfd, /* First check with only one `@'. */ len = strlen (name); - copy = bfd_alloc (abfd, len); + copy = (char *) bfd_alloc (abfd, len); if (copy == NULL) return (struct elf_link_hash_entry *) 0 - 1; @@ -4971,8 +4961,8 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) return TRUE; amt = c; amt *= sizeof (bfd_boolean); - defined = bfd_zmalloc (amt); - included = bfd_zmalloc (amt); + defined = (bfd_boolean *) bfd_zmalloc (amt); + included = (bfd_boolean *) bfd_zmalloc (amt); if (defined == NULL || included == NULL) goto error_return; @@ -5136,7 +5126,7 @@ struct hash_codes_info static bfd_boolean elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data) { - struct hash_codes_info *inf = data; + struct hash_codes_info *inf = (struct hash_codes_info *) data; const char *name; char *p; unsigned long ha; @@ -5153,7 +5143,7 @@ elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data) p = strchr (name, ELF_VER_CHR); if (p != NULL) { - alc = bfd_malloc (p - name + 1); + alc = (char *) bfd_malloc (p - name + 1); if (alc == NULL) { inf->error = TRUE; @@ -5207,7 +5197,7 @@ struct collect_gnu_hash_codes static bfd_boolean elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data) { - struct collect_gnu_hash_codes *s = data; + struct collect_gnu_hash_codes *s = (struct collect_gnu_hash_codes *) data; const char *name; char *p; unsigned long ha; @@ -5228,7 +5218,7 @@ elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data) p = strchr (name, ELF_VER_CHR); if (p != NULL) { - alc = bfd_malloc (p - name + 1); + alc = (char *) bfd_malloc (p - name + 1); if (alc == NULL) { s->error = TRUE; @@ -5262,7 +5252,7 @@ elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data) static bfd_boolean elf_renumber_gnu_hash_syms (struct elf_link_hash_entry *h, void *data) { - struct collect_gnu_hash_codes *s = data; + struct collect_gnu_hash_codes *s = (struct collect_gnu_hash_codes *) data; unsigned long int bucket; unsigned long int val; @@ -5374,7 +5364,7 @@ compute_bucket_count (struct bfd_link_info *info, since the size could be large. */ amt = maxsize; amt *= sizeof (unsigned long int); - counts = bfd_malloc (amt); + counts = (unsigned long int *) bfd_malloc (amt); if (counts == NULL) return 0; @@ -5472,6 +5462,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, const char *soname, const char *rpath, const char *filter_shlib, + const char *audit, + const char *depaudit, const char * const *auxiliary_filters, struct bfd_link_info *info, asection **sinterpptr, @@ -5624,6 +5616,28 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, } } + if (audit != NULL) + { + bfd_size_type indx; + + indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, audit, + TRUE); + if (indx == (bfd_size_type) -1 + || !_bfd_elf_add_dynamic_entry (info, DT_AUDIT, indx)) + return FALSE; + } + + if (depaudit != NULL) + { + bfd_size_type indx; + + indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, depaudit, + TRUE); + if (indx == (bfd_size_type) -1 + || !_bfd_elf_add_dynamic_entry (info, DT_DEPAUDIT, indx)) + return FALSE; + } + eif.info = info; eif.verdefs = verdefs; eif.failed = FALSE; @@ -5656,7 +5670,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, verlen = strlen (verstr); newlen = namelen + verlen + 3; - newname = bfd_malloc (newlen); + newname = (char *) bfd_malloc (newlen); if (newname == NULL) return FALSE; memcpy (newname, name, namelen); @@ -5894,7 +5908,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, } s->size = size; - s->contents = bfd_alloc (output_bfd, s->size); + s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size); if (s->contents == NULL && s->size != 0) return FALSE; @@ -6132,7 +6146,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, } s->size = size; - s->contents = bfd_alloc (output_bfd, s->size); + s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size); if (s->contents == NULL) return FALSE; @@ -6292,7 +6306,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) && (s->flags & SEC_EXCLUDE) == 0) { s->size = dynsymcount * sizeof (Elf_External_Versym); - s->contents = bfd_zalloc (output_bfd, s->size); + s->contents = (unsigned char *) bfd_zalloc (output_bfd, s->size); if (s->contents == NULL) return FALSE; @@ -6312,7 +6326,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) if (dynsymcount != 0) { - s->contents = bfd_alloc (output_bfd, s->size); + s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size); if (s->contents == NULL) return FALSE; @@ -6339,7 +6353,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) time store the values in an array so that we could use them for optimizations. */ amt = dynsymcount * sizeof (unsigned long int); - hashcodes = bfd_malloc (amt); + hashcodes = (unsigned long int *) bfd_malloc (amt); if (hashcodes == NULL) return FALSE; hashinf.hashcodes = hashcodes; @@ -6368,7 +6382,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) BFD_ASSERT (s != NULL); hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize; s->size = ((2 + bucketcount + dynsymcount) * hash_entry_size); - s->contents = bfd_zalloc (output_bfd, s->size); + s->contents = (unsigned char *) bfd_zalloc (output_bfd, s->size); if (s->contents == NULL) return FALSE; @@ -6391,7 +6405,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) time store the values in an array so that we could use them for optimizations. */ amt = dynsymcount * 2 * sizeof (unsigned long int); - cinfo.hashcodes = bfd_malloc (amt); + cinfo.hashcodes = (long unsigned int *) bfd_malloc (amt); if (cinfo.hashcodes == NULL) return FALSE; @@ -6427,7 +6441,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) BFD_ASSERT (cinfo.min_dynindx == -1); free (cinfo.hashcodes); s->size = 5 * 4 + bed->s->arch_size / 8; - contents = bfd_zalloc (output_bfd, s->size); + contents = (unsigned char *) bfd_zalloc (output_bfd, s->size); if (contents == NULL) return FALSE; s->contents = contents; @@ -6471,14 +6485,14 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) maskwords = 1 << (maskbitslog2 - cinfo.shift1); amt = bucketcount * sizeof (unsigned long int) * 2; amt += maskwords * sizeof (bfd_vma); - cinfo.bitmask = bfd_malloc (amt); + cinfo.bitmask = (bfd_vma *) bfd_malloc (amt); if (cinfo.bitmask == NULL) { free (cinfo.hashcodes); return FALSE; } - cinfo.counts = (void *) (cinfo.bitmask + maskwords); + cinfo.counts = (long unsigned int *) (cinfo.bitmask + maskwords); cinfo.indx = cinfo.counts + bucketcount; cinfo.symindx = dynsymcount - cinfo.nsyms; memset (cinfo.bitmask, 0, maskwords * sizeof (bfd_vma)); @@ -6500,7 +6514,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) s->size = (4 + bucketcount + cinfo.nsyms) * 4; s->size += cinfo.maskbits / 8; - contents = bfd_zalloc (output_bfd, s->size); + contents = (unsigned char *) bfd_zalloc (output_bfd, s->size); if (contents == NULL) { free (cinfo.bitmask); @@ -6624,7 +6638,8 @@ _bfd_elf_link_hash_newfunc (struct bfd_hash_entry *entry, subclass. */ if (entry == NULL) { - entry = bfd_hash_allocate (table, sizeof (struct elf_link_hash_entry)); + entry = (struct bfd_hash_entry *) + bfd_hash_allocate (table, sizeof (struct elf_link_hash_entry)); if (entry == NULL) return entry; } @@ -6711,8 +6726,12 @@ _bfd_elf_link_hash_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h, bfd_boolean force_local) { - h->plt = elf_hash_table (info)->init_plt_offset; - h->needs_plt = 0; + /* STT_GNU_IFUNC symbol must go through PLT. */ + if (h->type != STT_GNU_IFUNC) + { + h->plt = elf_hash_table (info)->init_plt_offset; + h->needs_plt = 0; + } if (force_local) { h->forced_local = 1; @@ -6761,7 +6780,7 @@ _bfd_elf_link_hash_table_create (bfd *abfd) struct elf_link_hash_table *ret; bfd_size_type amt = sizeof (struct elf_link_hash_table); - ret = bfd_malloc (amt); + ret = (struct elf_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; @@ -6904,7 +6923,7 @@ bfd_elf_get_bfd_needed_list (bfd *abfd, goto error_return; amt = sizeof *l; - l = bfd_alloc (abfd, amt); + l = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt); if (l == NULL) goto error_return; @@ -6976,7 +6995,7 @@ elf_create_symbuf (bfd_size_type symcount, Elf_Internal_Sym *isymbuf) struct elf_symbuf_head *ssymbuf, *ssymhead; bfd_size_type i, shndx_count, total_size; - indbuf = bfd_malloc2 (symcount, sizeof (*indbuf)); + indbuf = (Elf_Internal_Sym **) bfd_malloc2 (symcount, sizeof (*indbuf)); if (indbuf == NULL) return NULL; @@ -6996,7 +7015,7 @@ elf_create_symbuf (bfd_size_type symcount, Elf_Internal_Sym *isymbuf) total_size = ((shndx_count + 1) * sizeof (*ssymbuf) + (indbufend - indbuf) * sizeof (*ssym)); - ssymbuf = bfd_malloc (total_size); + ssymbuf = (struct elf_symbuf_head *) bfd_malloc (total_size); if (ssymbuf == NULL) { free (indbuf); @@ -7077,8 +7096,8 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, result = FALSE; isymbuf1 = NULL; isymbuf2 = NULL; - ssymbuf1 = elf_tdata (bfd1)->symbuf; - ssymbuf2 = elf_tdata (bfd2)->symbuf; + ssymbuf1 = (struct elf_symbuf_head *) elf_tdata (bfd1)->symbuf; + ssymbuf2 = (struct elf_symbuf_head *) elf_tdata (bfd2)->symbuf; if (ssymbuf1 == NULL) { @@ -7152,8 +7171,10 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, if (count1 == 0 || count2 == 0 || count1 != count2) goto done; - symtable1 = bfd_malloc (count1 * sizeof (struct elf_symbol)); - symtable2 = bfd_malloc (count2 * sizeof (struct elf_symbol)); + symtable1 = (struct elf_symbol *) + bfd_malloc (count1 * sizeof (struct elf_symbol)); + symtable2 = (struct elf_symbol *) + bfd_malloc (count2 * sizeof (struct elf_symbol)); if (symtable1 == NULL || symtable2 == NULL) goto done; @@ -7194,8 +7215,10 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, goto done; } - symtable1 = bfd_malloc (symcount1 * sizeof (struct elf_symbol)); - symtable2 = bfd_malloc (symcount2 * sizeof (struct elf_symbol)); + symtable1 = (struct elf_symbol *) + bfd_malloc (symcount1 * sizeof (struct elf_symbol)); + symtable2 = (struct elf_symbol *) + bfd_malloc (symcount2 * sizeof (struct elf_symbol)); if (symtable1 == NULL || symtable2 == NULL) goto done; @@ -7783,6 +7806,7 @@ bfd_elf_perform_complex_relocation (bfd *input_bfd, else shift = (8 * wordsz) - (start + len); + /* FIXME: octets_per_byte. */ x = get_value (wordsz, chunksz, input_bfd, contents + rel->r_offset); #ifdef DEBUG @@ -7814,6 +7838,7 @@ bfd_elf_perform_complex_relocation (bfd *input_bfd, relocation, (mask << shift), ((relocation & mask) << shift), x); #endif + /* FIXME: octets_per_byte. */ put_value (wordsz, chunksz, input_bfd, x, contents + rel->r_offset); return r; } @@ -7897,8 +7922,8 @@ struct elf_link_sort_rela static int elf_link_sort_cmp1 (const void *A, const void *B) { - const struct elf_link_sort_rela *a = A; - const struct elf_link_sort_rela *b = B; + const struct elf_link_sort_rela *a = (const struct elf_link_sort_rela *) A; + const struct elf_link_sort_rela *b = (const struct elf_link_sort_rela *) B; int relativea, relativeb; relativea = a->type == reloc_class_relative; @@ -7922,8 +7947,8 @@ elf_link_sort_cmp1 (const void *A, const void *B) static int elf_link_sort_cmp2 (const void *A, const void *B) { - const struct elf_link_sort_rela *a = A; - const struct elf_link_sort_rela *b = B; + const struct elf_link_sort_rela *a = (const struct elf_link_sort_rela *) A; + const struct elf_link_sort_rela *b = (const struct elf_link_sort_rela *) B; int copya, copyb; if (a->u.offset < b->u.offset) @@ -8121,7 +8146,9 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) + (i2e - 1) * sizeof (Elf_Internal_Rela)); count = dynamic_relocs->size / ext_size; - sort = bfd_zmalloc (sort_elt * count); + if (count == 0) + return 0; + sort = (bfd_byte *) bfd_zmalloc (sort_elt * count); if (sort == NULL) { @@ -8151,6 +8178,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) } erel = o->contents; erelend = o->contents + o->size; + /* FIXME: octets_per_byte. */ p = sort + o->output_offset / ext_size * sort_elt; while (erel < erelend) @@ -8195,6 +8223,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) erel = o->contents; erelend = o->contents + o->size; + /* FIXME: octets_per_byte. */ p = sort + o->output_offset / ext_size * sort_elt; while (erel < erelend) { @@ -8238,7 +8267,7 @@ elf_link_flush_output_syms (struct elf_final_link_info *finfo, /* Add a symbol to the output symbol table. */ -static bfd_boolean +static int elf_link_output_sym (struct elf_final_link_info *finfo, const char *name, Elf_Internal_Sym *elfsym, @@ -8247,7 +8276,7 @@ elf_link_output_sym (struct elf_final_link_info *finfo, { bfd_byte *dest; Elf_External_Sym_Shndx *destshndx; - bfd_boolean (*output_symbol_hook) + int (*output_symbol_hook) (struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *); const struct elf_backend_data *bed; @@ -8256,8 +8285,9 @@ elf_link_output_sym (struct elf_final_link_info *finfo, output_symbol_hook = bed->elf_backend_link_output_symbol_hook; if (output_symbol_hook != NULL) { - if (! (*output_symbol_hook) (finfo->info, name, elfsym, input_sec, h)) - return FALSE; + int ret = (*output_symbol_hook) (finfo->info, name, elfsym, input_sec, h); + if (ret != 1) + return ret; } if (name == NULL || *name == '\0') @@ -8269,13 +8299,13 @@ elf_link_output_sym (struct elf_final_link_info *finfo, elfsym->st_name = (unsigned long) _bfd_stringtab_add (finfo->symstrtab, name, TRUE, FALSE); if (elfsym->st_name == (unsigned long) -1) - return FALSE; + return 0; } if (finfo->symbuf_count >= finfo->symbuf_size) { if (! elf_link_flush_output_syms (finfo, bed)) - return FALSE; + return 0; } dest = finfo->symbuf + finfo->symbuf_count * bed->s->sizeof_sym; @@ -8287,9 +8317,10 @@ elf_link_output_sym (struct elf_final_link_info *finfo, bfd_size_type amt; amt = finfo->shndxbuf_size * sizeof (Elf_External_Sym_Shndx); - destshndx = bfd_realloc (destshndx, amt * 2); + destshndx = (Elf_External_Sym_Shndx *) bfd_realloc (destshndx, + amt * 2); if (destshndx == NULL) - return FALSE; + return 0; finfo->symshndxbuf = destshndx; memset ((char *) destshndx + amt, 0, amt); finfo->shndxbuf_size *= 2; @@ -8301,7 +8332,7 @@ elf_link_output_sym (struct elf_final_link_info *finfo, finfo->symbuf_count += 1; bfd_get_symcount (finfo->output_bfd) += 1; - return TRUE; + return 1; } /* Return TRUE if the dynamic symbol SYM in ABFD is supported. */ @@ -8413,7 +8444,7 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info, /* Read in any version definitions. */ versymhdr = &elf_tdata (input)->dynversym_hdr; - extversym = bfd_malloc (versymhdr->sh_size); + extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size); if (extversym == NULL) goto error_ret; @@ -8481,12 +8512,14 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info, static bfd_boolean elf_link_output_extsym (struct elf_link_hash_entry *h, void *data) { - struct elf_outext_info *eoinfo = data; + struct elf_outext_info *eoinfo = (struct elf_outext_info *) data; struct elf_final_link_info *finfo = eoinfo->finfo; bfd_boolean strip; Elf_Internal_Sym sym; asection *input_sec; const struct elf_backend_data *bed; + long indx; + int ret; if (h->root.type == bfd_link_hash_warning) { @@ -8599,7 +8632,13 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data) sym.st_size = h->size; sym.st_other = h->other; if (h->forced_local) - sym.st_info = ELF_ST_INFO (STB_LOCAL, h->type); + { + sym.st_info = ELF_ST_INFO (STB_LOCAL, h->type); + /* Turn off visibility on local symbol. */ + sym.st_other &= ~ELF_ST_VISIBILITY (-1); + } + else if (h->unique_global) + sym.st_info = ELF_ST_INFO (STB_GNU_UNIQUE, h->type); else if (h->root.type == bfd_link_hash_undefweak || h->root.type == bfd_link_hash_defweak) sym.st_info = ELF_ST_INFO (STB_WEAK, h->type); @@ -8688,14 +8727,18 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data) /* Give the processor backend a chance to tweak the symbol value, and also to finish up anything that needs to be done for this symbol. FIXME: Not calling elf_backend_finish_dynamic_symbol for - forced local syms when non-shared is due to a historical quirk. */ - if ((h->dynindx != -1 - || h->forced_local) - && ((finfo->info->shared - && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT - || h->root.type != bfd_link_hash_undefweak)) - || !h->forced_local) - && elf_hash_table (finfo->info)->dynamic_sections_created) + forced local syms when non-shared is due to a historical quirk. + STT_GNU_IFUNC symbol must go through PLT. */ + if ((h->type == STT_GNU_IFUNC + && h->def_regular + && !finfo->info->relocatable) + || ((h->dynindx != -1 + || h->forced_local) + && ((finfo->info->shared + && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT + || h->root.type != bfd_link_hash_undefweak)) + || !h->forced_local) + && elf_hash_table (finfo->info)->dynamic_sections_created)) { if (! ((*bed->elf_backend_finish_dynamic_symbol) (finfo->output_bfd, finfo->info, h, &sym))) @@ -8717,12 +8760,17 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data) || ELF_ST_BIND (sym.st_info) == STB_WEAK)) { int bindtype; + unsigned int type = ELF_ST_TYPE (sym.st_info); + + /* Turn an undefined IFUNC symbol into a normal FUNC symbol. */ + if (type == STT_GNU_IFUNC) + type = STT_FUNC; if (h->ref_regular_nonweak) bindtype = STB_GLOBAL; else bindtype = STB_WEAK; - sym.st_info = ELF_ST_INFO (bindtype, ELF_ST_TYPE (sym.st_info)); + sym.st_info = ELF_ST_INFO (bindtype, type); } /* If this is a symbol defined in a dynamic library, don't use the @@ -8829,13 +8877,17 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data) if (strip || (input_sec->flags & SEC_EXCLUDE) != 0) return TRUE; - h->indx = bfd_get_symcount (finfo->output_bfd); - - if (! elf_link_output_sym (finfo, h->root.root.string, &sym, input_sec, h)) + indx = bfd_get_symcount (finfo->output_bfd); + ret = elf_link_output_sym (finfo, h->root.root.string, &sym, input_sec, h); + if (ret == 0) { eoinfo->failed = TRUE; return FALSE; } + else if (ret == 1) + h->indx = indx; + else if (h->indx == -2) + abort(); return TRUE; } @@ -9003,6 +9055,8 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) asection *isec; const char *name; Elf_Internal_Sym osym; + long indx; + int ret; *pindex = -1; @@ -9090,8 +9144,6 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) && bfd_is_local_label_name (input_bfd, name))) continue; - /* If we get here, we are going to output this symbol. */ - osym = *isym; /* Adjust the section index for the output file. */ @@ -9100,8 +9152,6 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) if (osym.st_shndx == SHN_BAD) return FALSE; - *pindex = bfd_get_symcount (output_bfd); - /* ELF symbols in relocatable files are section relative, but in executable files they are virtual addresses. Note that this code assumes that all ELF sections have an associated @@ -9121,8 +9171,12 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) } } - if (! elf_link_output_sym (finfo, name, &osym, isec, NULL)) + indx = bfd_get_symcount (output_bfd); + ret = elf_link_output_sym (finfo, name, &osym, isec, NULL); + if (ret == 0) return FALSE; + else if (ret == 1) + *pindex = indx; } /* Relocate the contents of each section. */ @@ -9171,6 +9225,8 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) Elf_Internal_Sym sym = isymbuf[symndx]; asection *sec = finfo->sections[symndx]->output_section; const char *name; + long indx; + int ret; name = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, @@ -9185,9 +9241,14 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) sym.st_value += o->output_offset; - finfo->indices[symndx] = bfd_get_symcount (output_bfd); - if (! elf_link_output_sym (finfo, name, &sym, o, NULL)) + indx = bfd_get_symcount (output_bfd); + ret = elf_link_output_sym (finfo, name, &sym, o, NULL); + if (ret == 0) return FALSE; + else if (ret == 1) + finfo->indices[symndx] = indx; + else + abort (); } elf_section_data (osec)->this_hdr.sh_info = finfo->indices[symndx]; @@ -9316,7 +9377,8 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) sym, *ps); } - if (s_type == STT_RELC || s_type == STT_SRELC) + if ((s_type == STT_RELC || s_type == STT_SRELC) + && !finfo->info->relocatable) { bfd_vma val; bfd_vma dot = (rel->r_offset @@ -9577,6 +9639,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) unsigned long shlink; const char *name; asection *osec; + long indx; if (finfo->info->strip == strip_all) { @@ -9616,12 +9679,15 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) } } - finfo->indices[r_symndx] - = bfd_get_symcount (output_bfd); - - if (! elf_link_output_sym (finfo, name, &sym, sec, - NULL)) + indx = bfd_get_symcount (output_bfd); + ret = elf_link_output_sym (finfo, name, &sym, sec, + NULL); + if (ret == 0) return FALSE; + else if (ret == 1) + finfo->indices[r_symndx] = indx; + else + abort (); } r_symndx = finfo->indices[r_symndx]; @@ -9684,6 +9750,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) break; default: { + /* FIXME: octets_per_byte. */ if (! (o->flags & SEC_EXCLUDE) && ! (o->output_section->flags & SEC_NEVER_LOAD) && ! bfd_set_section_contents (output_bfd, o->output_section, @@ -9791,8 +9858,8 @@ elf_reloc_link_order (bfd *output_bfd, bfd_boolean ok; const char *sym_name; - size = bfd_get_reloc_size (howto); - buf = bfd_zmalloc (size); + size = (bfd_size_type) bfd_get_reloc_size (howto); + buf = (bfd_byte *) bfd_zmalloc (size); if (buf == NULL) return FALSE; rstat = _bfd_relocate_contents (howto, output_bfd, addend, buf); @@ -10007,6 +10074,7 @@ elf_fixup_link_order (bfd *abfd, asection *o) offset &= ~(bfd_vma) 0 << s->alignment_power; s->output_offset = offset; sections[n]->offset = offset; + /* FIXME: octets_per_byte. */ offset += sections[n]->size; } @@ -10228,8 +10296,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) bfd_size_type entsize1; entsize1 = esdi->rel_hdr.sh_entsize; - BFD_ASSERT (entsize1 == bed->s->sizeof_rel - || entsize1 == bed->s->sizeof_rela); + /* PR 9827: If the header size has not been set yet then + assume that it will match the output section's reloc type. */ + if (entsize1 == 0) + entsize1 = o->use_rela_p ? bed->s->sizeof_rela : bed->s->sizeof_rel; + else + BFD_ASSERT (entsize1 == bed->s->sizeof_rel + || entsize1 == bed->s->sizeof_rela); same_size = !o->use_rela_p == (entsize1 == bed->s->sizeof_rel); if (!same_size) @@ -10344,7 +10417,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) finfo.symbuf_size = max_sym_count; amt = finfo.symbuf_size; amt *= bed->s->sizeof_sym; - finfo.symbuf = bfd_malloc (amt); + finfo.symbuf = (bfd_byte *) bfd_malloc (amt); if (finfo.symbuf == NULL) goto error_return; if (elf_numsections (abfd) > (SHN_LORESERVE & 0xFFFF)) @@ -10353,7 +10426,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) amt = 2 * max_sym_count + elf_numsections (abfd) + 1000; finfo.shndxbuf_size = amt; amt *= sizeof (Elf_External_Sym_Shndx); - finfo.symshndxbuf = bfd_zmalloc (amt); + finfo.symshndxbuf = (Elf_External_Sym_Shndx *) bfd_zmalloc (amt); if (finfo.symshndxbuf == NULL) goto error_return; } @@ -10368,8 +10441,8 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) elfsym.st_info = 0; elfsym.st_other = 0; elfsym.st_shndx = SHN_UNDEF; - if (! elf_link_output_sym (&finfo, NULL, &elfsym, bfd_und_section_ptr, - NULL)) + if (elf_link_output_sym (&finfo, NULL, &elfsym, bfd_und_section_ptr, + NULL) != 1) goto error_return; } @@ -10394,7 +10467,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) elfsym.st_shndx = i; if (!info->relocatable) elfsym.st_value = o->vma; - if (!elf_link_output_sym (&finfo, NULL, &elfsym, o, NULL)) + if (elf_link_output_sym (&finfo, NULL, &elfsym, o, NULL) != 1) goto error_return; } } @@ -10404,7 +10477,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) files. */ if (max_contents_size != 0) { - finfo.contents = bfd_malloc (max_contents_size); + finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size); if (finfo.contents == NULL) goto error_return; } @@ -10420,7 +10493,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) { amt = max_internal_reloc_count * bed->s->int_rels_per_ext_rel; amt *= sizeof (Elf_Internal_Rela); - finfo.internal_relocs = bfd_malloc (amt); + finfo.internal_relocs = (Elf_Internal_Rela *) bfd_malloc (amt); if (finfo.internal_relocs == NULL) goto error_return; } @@ -10428,22 +10501,22 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (max_sym_count != 0) { amt = max_sym_count * bed->s->sizeof_sym; - finfo.external_syms = bfd_malloc (amt); + finfo.external_syms = (bfd_byte *) bfd_malloc (amt); if (finfo.external_syms == NULL) goto error_return; amt = max_sym_count * sizeof (Elf_Internal_Sym); - finfo.internal_syms = bfd_malloc (amt); + finfo.internal_syms = (Elf_Internal_Sym *) bfd_malloc (amt); if (finfo.internal_syms == NULL) goto error_return; amt = max_sym_count * sizeof (long); - finfo.indices = bfd_malloc (amt); + finfo.indices = (long int *) bfd_malloc (amt); if (finfo.indices == NULL) goto error_return; amt = max_sym_count * sizeof (asection *); - finfo.sections = bfd_malloc (amt); + finfo.sections = (asection **) bfd_malloc (amt); if (finfo.sections == NULL) goto error_return; } @@ -10451,7 +10524,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (max_sym_shndx_count != 0) { amt = max_sym_shndx_count * sizeof (Elf_External_Sym_Shndx); - finfo.locsym_shndx = bfd_malloc (amt); + finfo.locsym_shndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt); if (finfo.locsym_shndx == NULL) goto error_return; } @@ -10570,7 +10643,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) table, do it now. */ if (bed->elf_backend_output_arch_local_syms) { - typedef bfd_boolean (*out_sym_func) + typedef int (*out_sym_func) (void *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *); @@ -10635,13 +10708,11 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) asection *s; bfd_byte *dest; - sym.st_size = e->isym.st_size; - sym.st_other = e->isym.st_other; - - /* Copy the internal symbol as is. + /* Copy the internal symbol and turn off visibility. Note that we saved a word of storage and overwrote the original st_name with the dynstr_index. */ sym = e->isym; + sym.st_other &= ~ELF_ST_VISIBILITY (-1); s = bfd_section_from_elf_index (e->input_bfd, e->isym.st_shndx); @@ -10681,7 +10752,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) table, do it now. */ if (bed->elf_backend_output_arch_syms) { - typedef bfd_boolean (*out_sym_func) + typedef int (*out_sym_func) (void *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *); @@ -10981,6 +11052,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) != SHT_STRTAB) || strcmp (bfd_get_section_name (abfd, o), ".dynstr") != 0) { + /* FIXME: octets_per_byte. */ if (! bfd_set_section_contents (abfd, o->output_section, o->contents, (file_ptr) o->output_offset, @@ -11055,7 +11127,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (attr_section) { - bfd_byte *contents = bfd_malloc (attr_size); + bfd_byte *contents = (bfd_byte *) bfd_malloc (attr_size); if (contents == NULL) return FALSE; /* Bail out and fail. */ bfd_elf_set_obj_attr_contents (abfd, contents, attr_size); @@ -11397,7 +11469,8 @@ elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data) && !h->root.u.def.section->gc_mark && !(h->root.u.def.section->owner->flags & DYNAMIC)) { - struct elf_gc_sweep_symbol_info *inf = data; + struct elf_gc_sweep_symbol_info *inf = + (struct elf_gc_sweep_symbol_info *) data; (*inf->hide_symbol) (inf->info, h, TRUE); } @@ -11778,7 +11851,8 @@ bfd_elf_gc_record_vtinherit (bfd *abfd, win: if (!child->vtable) { - child->vtable = bfd_zalloc (abfd, sizeof (*child->vtable)); + child->vtable = (struct elf_link_virtual_table_entry *) + bfd_zalloc (abfd, sizeof (*child->vtable)); if (!child->vtable) return FALSE; } @@ -11810,7 +11884,8 @@ bfd_elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED, if (!h->vtable) { - h->vtable = bfd_zalloc (abfd, sizeof (*h->vtable)); + h->vtable = (struct elf_link_virtual_table_entry *) + bfd_zalloc (abfd, sizeof (*h->vtable)); if (!h->vtable) return FALSE; } @@ -11843,7 +11918,7 @@ bfd_elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED, if (ptr) { - ptr = bfd_realloc (ptr - 1, bytes); + ptr = (bfd_boolean *) bfd_realloc (ptr - 1, bytes); if (ptr != NULL) { @@ -11855,7 +11930,7 @@ bfd_elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED, } } else - ptr = bfd_zmalloc (bytes); + ptr = (bfd_boolean *) bfd_zmalloc (bytes); if (ptr == NULL) return FALSE; @@ -11881,7 +11956,7 @@ struct alloc_got_off_arg { static bfd_boolean elf_gc_allocate_got_offsets (struct elf_link_hash_entry *h, void *arg) { - struct alloc_got_off_arg *gofarg = arg; + struct alloc_got_off_arg *gofarg = (struct alloc_got_off_arg *) arg; bfd *obfd = gofarg->info->output_bfd; const struct elf_backend_data *bed = get_elf_backend_data (obfd); @@ -11981,7 +12056,7 @@ bfd_elf_gc_common_final_link (bfd *abfd, struct bfd_link_info *info) bfd_boolean bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie) { - struct elf_reloc_cookie *rcookie = cookie; + struct elf_reloc_cookie *rcookie = (struct elf_reloc_cookie *) cookie; if (rcookie->bad_symtab) rcookie->rel = rcookie->rels; @@ -12346,7 +12421,7 @@ _bfd_elf_section_already_linked (bfd *abfd, asection *sec, /* This is the first section with this name. Record it. */ if (! bfd_section_already_linked_table_insert (already_linked_list, sec)) - info->callbacks->einfo (_("%F%P: already_linked_table: %E")); + info->callbacks->einfo (_("%F%P: already_linked_table: %E\n")); } bfd_boolean @@ -12457,7 +12532,7 @@ _bfd_elf_get_dynamic_reloc_section (bfd * abfd, section does not exist it is created and attached to the DYNOBJ bfd and stored in the SRELOC field of SEC's elf_section_data structure. - + ALIGNMENT is the alignment for the newly created section and IS_RELA defines whether the name should be .rela. or .rel.. The section name is looked up in the diff --git a/cegcc/src/binutils/bfd/elfn32-mips.c b/cegcc/src/binutils/bfd/elfn32-mips.c index aea3e5af2..24f53fb9f 100644 --- a/cegcc/src/binutils/bfd/elfn32-mips.c +++ b/cegcc/src/binutils/bfd/elfn32-mips.c @@ -1,6 +1,6 @@ /* MIPS-specific support for 32-bit ELF Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Most of the information added by Ian Lance Taylor, Cygnus Support, . @@ -2289,7 +2289,7 @@ mips_elf_sym_is_global (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym) if (SGI_COMPAT (abfd)) return (sym->flags & BSF_SECTION_SYM) == 0; else - return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0 + return ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0 || bfd_is_und_section (bfd_get_section (sym)) || bfd_is_com_section (bfd_get_section (sym))); } diff --git a/cegcc/src/binutils/bfd/elfxx-ia64.c b/cegcc/src/binutils/bfd/elfxx-ia64.c index b6f103a7e..932886b38 100644 --- a/cegcc/src/binutils/bfd/elfxx-ia64.c +++ b/cegcc/src/binutils/bfd/elfxx-ia64.c @@ -1,6 +1,6 @@ /* IA-64 support for 64-bit ELF Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2009 Free Software Foundation, Inc. + 2008, 2009 Free Software Foundation, Inc. Contributed by David Mosberger-Tang This file is part of BFD, the Binary File Descriptor library. @@ -163,11 +163,8 @@ struct elfNN_ia64_link_hash_table /* The main hash table. */ struct elf_link_hash_table root; - asection *got_sec; /* the linkage table section (or NULL) */ - asection *rel_got_sec; /* dynamic relocation section for same */ asection *fptr_sec; /* function descriptor table (or NULL) */ asection *rel_fptr_sec; /* dynamic relocation section for same */ - asection *plt_sec; /* the primary plt section (or NULL) */ asection *pltoff_sec; /* private descriptors for plt (or NULL) */ asection *rel_pltoff_sec; /* dynamic relocation section for same */ @@ -615,7 +612,7 @@ bfd_elfNN_ia64_after_parse (int itanium) static bfd_boolean elfNN_ia64_relax_br (bfd_byte *contents, bfd_vma off) { - unsigned int template, mlx; + unsigned int template_val, mlx; bfd_vma t0, t1, s0, s1, s2, br_code; long br_slot; bfd_byte *hit_addr; @@ -629,7 +626,7 @@ elfNN_ia64_relax_br (bfd_byte *contents, bfd_vma off) /* Check if we can turn br into brl. A label is always at the start of the bundle. Even if there are predicates on NOPs, we still perform this optimization. */ - template = t0 & 0x1e; + template_val = t0 & 0x1e; s0 = (t0 >> 5) & 0x1ffffffffffLL; s1 = ((t0 >> 46) | (t1 << 18)) & 0x1ffffffffffLL; s2 = (t1 >> 23) & 0x1ffffffffffLL; @@ -645,9 +642,9 @@ elfNN_ia64_relax_br (bfd_byte *contents, bfd_vma off) case 1: /* Check if slot 2 is NOP. Possible templates are MBB and BBB. For BBB, slot 0 also has to be nop.b. */ - if (!((template == 0x12 /* MBB */ + if (!((template_val == 0x12 /* MBB */ && IS_NOP_B (s2)) - || (template == 0x16 /* BBB */ + || (template_val == 0x16 /* BBB */ && IS_NOP_B (s0) && IS_NOP_B (s2)))) return FALSE; @@ -656,16 +653,16 @@ elfNN_ia64_relax_br (bfd_byte *contents, bfd_vma off) case 2: /* Check if slot 1 is NOP. Possible templates are MIB, MBB, BBB, MMB and MFB. For BBB, slot 0 also has to be nop.b. */ - if (!((template == 0x10 /* MIB */ + if (!((template_val == 0x10 /* MIB */ && IS_NOP_I (s1)) - || (template == 0x12 /* MBB */ + || (template_val == 0x12 /* MBB */ && IS_NOP_B (s1)) - || (template == 0x16 /* BBB */ + || (template_val == 0x16 /* BBB */ && IS_NOP_B (s0) && IS_NOP_B (s1)) - || (template == 0x18 /* MMB */ + || (template_val == 0x18 /* MMB */ && IS_NOP_M (s1)) - || (template == 0x1c /* MFB */ + || (template_val == 0x1c /* MFB */ && IS_NOP_F (s1)))) return FALSE; br_code = s2; @@ -689,7 +686,7 @@ elfNN_ia64_relax_br (bfd_byte *contents, bfd_vma off) else mlx = 0x4; - if (template == 0x16) + if (template_val == 0x16) { /* For BBB, we need to put nop.m in slot 0. We keep the original predicate only if slot 0 isn't br. */ @@ -718,7 +715,7 @@ elfNN_ia64_relax_br (bfd_byte *contents, bfd_vma off) static void elfNN_ia64_relax_brl (bfd_byte *contents, bfd_vma off) { - int template; + int template_val; bfd_byte *hit_addr; bfd_vma t0, t1, i0, i1, i2; @@ -737,10 +734,10 @@ elfNN_ia64_relax_brl (bfd_byte *contents, bfd_vma off) /* Turn a MLX bundle into a MBB bundle with the same stop-bit variety. */ if (t0 & 0x1) - template = 0x13; + template_val = 0x13; else - template = 0x12; - t0 = (i1 << 46) | (i0 << 5) | template; + template_val = 0x12; + t0 = (i1 << 46) | (i0 << 5) | template_val; t1 = (i2 << 23) | (i1 >> 18); bfd_putl64 (t0, hit_addr); @@ -786,6 +783,10 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, one pass. */ *again = FALSE; + if (link_info->relocatable) + (*link_info->callbacks->einfo) + (_("%P%F: --relax and -r may not be used together\n")); + /* Don't even try to relax for non-ELF outputs. */ if (!is_elf_hash_table (link_info->hash)) return FALSE; @@ -928,7 +929,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, if (r_type != R_IA64_PCREL21B) continue; - tsec = ia64_info->plt_sec; + tsec = ia64_info->root.splt; toff = dyn_i->plt2_offset; BFD_ASSERT (irel->r_addend == 0); } @@ -1001,7 +1002,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, to 32byte. We assume linker will always insert 32byte between the .plt and .text sections after the the first relaxation pass. */ - if (tsec == ia64_info->plt_sec) + if (tsec == ia64_info->root.splt) offset = -0x1000000 + 32; else offset = -0x1000000; @@ -1072,7 +1073,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, size_t size; - if (tsec == ia64_info->plt_sec) + if (tsec == ia64_info->root.splt) size = sizeof (plt_full_entry); else size = oor_branch_size; @@ -1092,7 +1093,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, goto error_return; sec->size = amt; - if (tsec == ia64_info->plt_sec) + if (tsec == ia64_info->root.splt) { memcpy (contents + trampoff, plt_full_entry, size); @@ -1246,16 +1247,16 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_data_got, &data); elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_fptr_got, &data); elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_local_got, &data); - ia64_info->got_sec->size = data.ofs; + ia64_info->root.sgot->size = data.ofs; if (ia64_info->root.dynamic_sections_created - && ia64_info->rel_got_sec != NULL) + && ia64_info->root.srelgot != NULL) { /* Resize .rela.got. */ - ia64_info->rel_got_sec->size = 0; + ia64_info->root.srelgot->size = 0; if (link_info->shared && ia64_info->self_dtpmod_offset != (bfd_vma) -1) - ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela); + ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela); data.only_got = TRUE; elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries, &data); @@ -1808,8 +1809,7 @@ elfNN_ia64_local_htab_hash (const void *ptr) struct elfNN_ia64_local_hash_entry *entry = (struct elfNN_ia64_local_hash_entry *) ptr; - return (((entry->id & 0xff) << 24) | ((entry->id & 0xff00) << 8)) - ^ entry->r_sym ^ (entry->id >> 16); + return ELF_LOCAL_SYMBOL_HASH (entry->id, entry->r_sym); } /* Compare local hash entries. */ @@ -1999,14 +1999,12 @@ elfNN_ia64_create_dynamic_sections (bfd *abfd, ia64_info = elfNN_ia64_hash_table (info); - ia64_info->plt_sec = bfd_get_section_by_name (abfd, ".plt"); - ia64_info->got_sec = bfd_get_section_by_name (abfd, ".got"); - { - flagword flags = bfd_get_section_flags (abfd, ia64_info->got_sec); - bfd_set_section_flags (abfd, ia64_info->got_sec, SEC_SMALL_DATA | flags); + flagword flags = bfd_get_section_flags (abfd, ia64_info->root.sgot); + bfd_set_section_flags (abfd, ia64_info->root.sgot, + SEC_SMALL_DATA | flags); /* The .got section is always aligned at 8 bytes. */ - bfd_set_section_alignment (abfd, ia64_info->got_sec, 3); + bfd_set_section_alignment (abfd, ia64_info->root.sgot, 3); } if (!get_pltoff (abfd, info, ia64_info)) @@ -2023,17 +2021,6 @@ elfNN_ia64_create_dynamic_sections (bfd *abfd, return FALSE; ia64_info->rel_pltoff_sec = s; - s = bfd_make_section_with_flags (abfd, ".rela.got", - (SEC_ALLOC | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY)); - if (s == NULL - || !bfd_set_section_alignment (abfd, s, LOG_SECTION_ALIGN)) - return FALSE; - ia64_info->rel_got_sec = s; - return TRUE; } @@ -2045,8 +2032,8 @@ get_local_sym_hash (struct elfNN_ia64_link_hash_table *ia64_info, { struct elfNN_ia64_local_hash_entry e, *ret; asection *sec = abfd->sections; - hashval_t h = (((sec->id & 0xff) << 24) | ((sec->id & 0xff00) << 8)) - ^ ELFNN_R_SYM (rel->r_info) ^ (sec->id >> 16); + hashval_t h = ELF_LOCAL_SYMBOL_HASH (sec->id, + ELFNN_R_SYM (rel->r_info)); void **slot; e.id = sec->id; @@ -2414,7 +2401,7 @@ get_got (bfd *abfd, struct bfd_link_info *info, asection *got; bfd *dynobj; - got = ia64_info->got_sec; + got = ia64_info->root.sgot; if (!got) { flagword flags; @@ -2425,9 +2412,7 @@ get_got (bfd *abfd, struct bfd_link_info *info, if (!_bfd_elf_create_got_section (dynobj, info)) return 0; - got = bfd_get_section_by_name (dynobj, ".got"); - BFD_ASSERT (got); - ia64_info->got_sec = got; + got = ia64_info->root.sgot; /* The .got section is always aligned at 8 bytes. */ if (!bfd_set_section_alignment (abfd, got, 3)) @@ -3326,14 +3311,14 @@ allocate_dynrel_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, || !x->info->pie || dyn_i->h == NULL || dyn_i->h->root.type != bfd_link_hash_undefweak) - ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela); + ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela); } if ((dynamic_symbol || shared) && dyn_i->want_tprel) - ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela); + ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela); if (dynamic_symbol && dyn_i->want_dtpmod) - ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela); + ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela); if (dynamic_symbol && dyn_i->want_dtprel) - ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela); + ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela); if (x->only_got) return TRUE; @@ -3467,13 +3452,13 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Allocate the GOT entries. */ - if (ia64_info->got_sec) + if (ia64_info->root.sgot) { data.ofs = 0; elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_data_got, &data); elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_global_fptr_got, &data); elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_local_got, &data); - ia64_info->got_sec->size = data.ofs; + ia64_info->root.sgot->size = data.ofs; } /* Allocate the FPTR entries. */ @@ -3512,7 +3497,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, BFD_ASSERT (ia64_info->root.dynamic_sections_created); - ia64_info->plt_sec->size = data.ofs; + ia64_info->root.splt->size = data.ofs; /* If we've got a .plt, we need some extra memory for the dynamic linker. We stuff these in .got.plt. */ @@ -3535,7 +3520,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, required. */ if (info->shared && ia64_info->self_dtpmod_offset != (bfd_vma) -1) - ia64_info->rel_got_sec->size += sizeof (ElfNN_External_Rela); + ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela); data.only_got = FALSE; elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries, &data); } @@ -3559,12 +3544,12 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, strip = (sec->size == 0); - if (sec == ia64_info->got_sec) + if (sec == ia64_info->root.sgot) strip = FALSE; - else if (sec == ia64_info->rel_got_sec) + else if (sec == ia64_info->root.srelgot) { if (strip) - ia64_info->rel_got_sec = NULL; + ia64_info->root.srelgot = NULL; else /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -3584,10 +3569,10 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, copy relocs into the output file. */ sec->reloc_count = 0; } - else if (sec == ia64_info->plt_sec) + else if (sec == ia64_info->root.splt) { if (strip) - ia64_info->plt_sec = NULL; + ia64_info->root.splt = NULL; } else if (sec == ia64_info->pltoff_sec) { @@ -3956,7 +3941,7 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info, bfd_vma got_offset; ia64_info = elfNN_ia64_hash_table (info); - got_sec = ia64_info->got_sec; + got_sec = ia64_info->root.sgot; switch (dyn_r_type) { @@ -4067,7 +4052,7 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info, } elfNN_ia64_install_dyn_reloc (abfd, NULL, got_sec, - ia64_info->rel_got_sec, + ia64_info->root.srelgot, got_offset, dyn_r_type, dynindx, addend); } @@ -4288,7 +4273,7 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info) { /* Pick a sensible value. */ - asection *got_sec = ia64_info->got_sec; + asection *got_sec = ia64_info->root.sgot; /* Start with just the address of the .got. */ if (got_sec) @@ -4841,8 +4826,8 @@ elfNN_ia64_relocate_section (bfd *output_bfd, /* Should have caught this earlier. */ BFD_ASSERT (rel->r_addend == 0); - value = (ia64_info->plt_sec->output_section->vma - + ia64_info->plt_sec->output_offset + value = (ia64_info->root.splt->output_section->vma + + ia64_info->root.splt->output_offset + dyn_i->plt2_offset); } else @@ -5180,7 +5165,7 @@ elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd, /* Initialize the minimal PLT entry. */ index = (dyn_i->plt_offset - PLT_HEADER_SIZE) / PLT_MIN_ENTRY_SIZE; - plt_sec = ia64_info->plt_sec; + plt_sec = ia64_info->root.splt; loc = plt_sec->contents + dyn_i->plt_offset; memcpy (loc, plt_min_entry, PLT_MIN_ENTRY_SIZE); @@ -5309,9 +5294,9 @@ elfNN_ia64_finish_dynamic_sections (bfd *abfd, } /* Initialize the PLT0 entry. */ - if (ia64_info->plt_sec) + if (ia64_info->root.splt) { - bfd_byte *loc = ia64_info->plt_sec->contents; + bfd_byte *loc = ia64_info->root.splt->contents; bfd_vma pltres; memcpy (loc, plt_header, PLT_HEADER_SIZE); @@ -6046,6 +6031,9 @@ elfNN_vms_close_and_cleanup (bfd *abfd) #undef elf_backend_want_p_paddr_set_to_zero +#undef ELF_OSABI +#define ELF_OSABI ELFOSABI_OPENVMS + #undef ELF_MAXPAGESIZE #define ELF_MAXPAGESIZE 0x10000 /* 64KB */ diff --git a/cegcc/src/binutils/bfd/elfxx-mips.c b/cegcc/src/binutils/bfd/elfxx-mips.c index 5a345f448..3a1c8ba9b 100644 --- a/cegcc/src/binutils/bfd/elfxx-mips.c +++ b/cegcc/src/binutils/bfd/elfxx-mips.c @@ -1,6 +1,6 @@ /* MIPS-specific support for ELF Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Most of the information added by Ian Lance Taylor, Cygnus Support, . @@ -662,6 +662,23 @@ static struct mips_got_info *mips_elf_got_for_ibfd /* This will be used when we sort the dynamic relocation records. */ static bfd *reldyn_sorting_bfd; +/* True if ABFD is for CPUs with load interlocking that include + non-MIPS1 CPUs and R3900. */ +#define LOAD_INTERLOCKS_P(abfd) \ + ( ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) != E_MIPS_ARCH_1) \ + || ((elf_elfheader (abfd)->e_flags & EF_MIPS_MACH) == E_MIPS_MACH_3900)) + +/* True if ABFD is for CPUs that are faster if JAL is converted to BAL. + This should be safe for all architectures. We enable this predicate + for RM9000 for now. */ +#define JAL_TO_BAL_P(abfd) \ + ((elf_elfheader (abfd)->e_flags & EF_MIPS_MACH) == E_MIPS_MACH_9000) + +/* True if ABFD is for CPUs that are faster if JALR is converted to BAL. + This should be safe for all architectures. We enable this predicate for + all CPUs. */ +#define JALR_TO_BAL_P(abfd) 1 + /* True if ABFD is a PIC object. */ #define PIC_OBJECT_P(abfd) \ ((elf_elfheader (abfd)->e_flags & EF_MIPS_PIC) != 0) @@ -878,7 +895,8 @@ static bfd *reldyn_sorting_bfd; #define CALL_FP_STUB_P(name) CONST_STRNEQ (name, CALL_FP_STUB) /* The format of the first PLT entry in an O32 executable. */ -static const bfd_vma mips_o32_exec_plt0_entry[] = { +static const bfd_vma mips_o32_exec_plt0_entry[] = +{ 0x3c1c0000, /* lui $28, %hi(&GOTPLT[0]) */ 0x8f990000, /* lw $25, %lo(&GOTPLT[0])($28) */ 0x279c0000, /* addiu $28, $28, %lo(&GOTPLT[0]) */ @@ -891,7 +909,8 @@ static const bfd_vma mips_o32_exec_plt0_entry[] = { /* The format of the first PLT entry in an N32 executable. Different because gp ($28) is not available; we use t2 ($14) instead. */ -static const bfd_vma mips_n32_exec_plt0_entry[] = { +static const bfd_vma mips_n32_exec_plt0_entry[] = +{ 0x3c0e0000, /* lui $14, %hi(&GOTPLT[0]) */ 0x8dd90000, /* lw $25, %lo(&GOTPLT[0])($14) */ 0x25ce0000, /* addiu $14, $14, %lo(&GOTPLT[0]) */ @@ -904,7 +923,8 @@ static const bfd_vma mips_n32_exec_plt0_entry[] = { /* The format of the first PLT entry in an N64 executable. Different from N32 because of the increased size of GOT entries. */ -static const bfd_vma mips_n64_exec_plt0_entry[] = { +static const bfd_vma mips_n64_exec_plt0_entry[] = +{ 0x3c0e0000, /* lui $14, %hi(&GOTPLT[0]) */ 0xddd90000, /* ld $25, %lo(&GOTPLT[0])($14) */ 0x25ce0000, /* addiu $14, $14, %lo(&GOTPLT[0]) */ @@ -916,7 +936,8 @@ static const bfd_vma mips_n64_exec_plt0_entry[] = { }; /* The format of subsequent PLT entries. */ -static const bfd_vma mips_exec_plt_entry[] = { +static const bfd_vma mips_exec_plt_entry[] = +{ 0x3c0f0000, /* lui $15, %hi(.got.plt entry) */ 0x01f90000, /* l[wd] $25, %lo(.got.plt entry)($15) */ 0x25f80000, /* addiu $24, $15, %lo(.got.plt entry) */ @@ -924,7 +945,8 @@ static const bfd_vma mips_exec_plt_entry[] = { }; /* The format of the first PLT entry in a VxWorks executable. */ -static const bfd_vma mips_vxworks_exec_plt0_entry[] = { +static const bfd_vma mips_vxworks_exec_plt0_entry[] = +{ 0x3c190000, /* lui t9, %hi(_GLOBAL_OFFSET_TABLE_) */ 0x27390000, /* addiu t9, t9, %lo(_GLOBAL_OFFSET_TABLE_) */ 0x8f390008, /* lw t9, 8(t9) */ @@ -934,7 +956,8 @@ static const bfd_vma mips_vxworks_exec_plt0_entry[] = { }; /* The format of subsequent PLT entries. */ -static const bfd_vma mips_vxworks_exec_plt_entry[] = { +static const bfd_vma mips_vxworks_exec_plt_entry[] = +{ 0x10000000, /* b .PLT_resolver */ 0x24180000, /* li t8, */ 0x3c190000, /* lui t9, %hi(<.got.plt slot>) */ @@ -946,7 +969,8 @@ static const bfd_vma mips_vxworks_exec_plt_entry[] = { }; /* The format of the first PLT entry in a VxWorks shared object. */ -static const bfd_vma mips_vxworks_shared_plt0_entry[] = { +static const bfd_vma mips_vxworks_shared_plt0_entry[] = +{ 0x8f990008, /* lw t9, 8(gp) */ 0x00000000, /* nop */ 0x03200008, /* jr t9 */ @@ -956,7 +980,8 @@ static const bfd_vma mips_vxworks_shared_plt0_entry[] = { }; /* The format of subsequent PLT entries. */ -static const bfd_vma mips_vxworks_shared_plt_entry[] = { +static const bfd_vma mips_vxworks_shared_plt_entry[] = +{ 0x10000000, /* b .PLT_resolver */ 0x24180000 /* li t8, */ }; @@ -5464,8 +5489,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, case R_MIPS_JALR: /* This relocation is only a hint. In some cases, we optimize it into a bal instruction. But we don't try to optimize - branches to the PLT; that will wind up wasting time. */ - if (h != NULL && h->root.plt.offset != (bfd_vma) -1) + when the symbol does not resolve locally. */ + if (h != NULL && !SYMBOL_CALLS_LOCAL (info, &h->root)) return bfd_reloc_continue; value = symbol + addend; break; @@ -5572,15 +5597,15 @@ mips_elf_perform_relocation (struct bfd_link_info *info, x = (x & ~(0x3f << 26)) | (jalx_opcode << 26); } - /* On the RM9000, bal is faster than jal, because bal uses branch - prediction hardware. If we are linking for the RM9000, and we - see jal, and bal fits, use it instead. Note that this - transformation should be safe for all architectures. */ - if (bfd_get_mach (input_bfd) == bfd_mach_mips9000 - && !info->relocatable + /* Try converting JAL and JALR to BAL, if the target is in range. */ + if (!info->relocatable && !require_jalx - && ((r_type == R_MIPS_26 && (x >> 26) == 0x3) /* jal addr */ - || (r_type == R_MIPS_JALR && x == 0x0320f809))) /* jalr t9 */ + && ((JAL_TO_BAL_P (input_bfd) + && r_type == R_MIPS_26 + && (x >> 26) == 0x3) /* jal addr */ + || (JALR_TO_BAL_P (input_bfd) + && r_type == R_MIPS_JALR + && x == 0x0320f809))) /* jalr t9 */ { bfd_vma addr; bfd_vma dest; @@ -6249,6 +6274,13 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr) { const char *name = bfd_get_section_name (abfd, hdr->bfd_section); + /* .sbss is not handled specially here because the GNU/Linux + prelinker can convert .sbss from NOBITS to PROGBITS and + changing it back to NOBITS breaks the binary. The entry in + _bfd_mips_elf_special_sections will ensure the correct flags + are set on .sbss if BFD creates it without reading it from an + input file, and without special handling here the flags set + on it in an input file will be followed. */ if (strcmp (name, ".sdata") == 0 || strcmp (name, ".lit8") == 0 || strcmp (name, ".lit4") == 0) @@ -6256,11 +6288,6 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr) hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL; hdr->sh_type = SHT_PROGBITS; } - else if (strcmp (name, ".sbss") == 0) - { - hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL; - hdr->sh_type = SHT_NOBITS; - } else if (strcmp (name, ".srdata") == 0) { hdr->sh_flags |= SHF_ALLOC | SHF_MIPS_GPREL; @@ -6783,7 +6810,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, symbol. We mark symbols as small common if appropriate. This is also where we undo the increment of the value for a mips16 symbol. */ -bfd_boolean +int _bfd_mips_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -6799,7 +6826,7 @@ _bfd_mips_elf_link_output_symbol_hook if (ELF_ST_IS_MIPS16 (sym->st_other)) sym->st_value &= ~1; - return TRUE; + return 1; } /* Functions for the dynamic linker. */ @@ -7476,6 +7503,11 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, } break; + /* This is just a hint; it can safely be ignored. Don't set + has_static_relocs for the corresponding symbol. */ + case R_MIPS_JALR: + break; + case R_MIPS_32: case R_MIPS_REL32: case R_MIPS_64: @@ -8629,8 +8661,10 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, else if (s == htab->splt) { /* If the last PLT entry has a branch delay slot, allocate - room for an extra nop to fill the delay slot. */ - if (!htab->is_vxworks && s->size > 0) + room for an extra nop to fill the delay slot. This is + for CPUs without load interlocking. */ + if (! LOAD_INTERLOCKS_P (output_bfd) + && ! htab->is_vxworks && s->size > 0) s->size += 4; } else if (! CONST_STRNEQ (name, ".init") @@ -9353,8 +9387,17 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, plt_entry = mips_exec_plt_entry; bfd_put_32 (output_bfd, plt_entry[0] | got_address_high, loc); bfd_put_32 (output_bfd, plt_entry[1] | got_address_low | load, loc + 4); - bfd_put_32 (output_bfd, plt_entry[2] | got_address_low, loc + 8); - bfd_put_32 (output_bfd, plt_entry[3], loc + 12); + + if (! LOAD_INTERLOCKS_P (output_bfd)) + { + bfd_put_32 (output_bfd, plt_entry[2] | got_address_low, loc + 8); + bfd_put_32 (output_bfd, plt_entry[3], loc + 12); + } + else + { + bfd_put_32 (output_bfd, plt_entry[3], loc + 8); + bfd_put_32 (output_bfd, plt_entry[2] | got_address_low, loc + 12); + } /* Emit an R_MIPS_JUMP_SLOT relocation against the .got.plt entry. */ mips_elf_output_dynamic_relocation (output_bfd, htab->srelplt, diff --git a/cegcc/src/binutils/bfd/elfxx-mips.h b/cegcc/src/binutils/bfd/elfxx-mips.h index 15bd4be60..0b2226d26 100644 --- a/cegcc/src/binutils/bfd/elfxx-mips.h +++ b/cegcc/src/binutils/bfd/elfxx-mips.h @@ -1,5 +1,5 @@ /* MIPS ELF specific backend routines. - Copyright 2002, 2003, 2004, 2005, 2006, 2007 + Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -41,7 +41,7 @@ extern bfd_boolean _bfd_mips_elf_section_from_bfd_section extern bfd_boolean _bfd_mips_elf_add_symbol_hook (bfd *, struct bfd_link_info *, Elf_Internal_Sym *, const char **, flagword *, asection **, bfd_vma *); -extern bfd_boolean _bfd_mips_elf_link_output_symbol_hook +extern int _bfd_mips_elf_link_output_symbol_hook (struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *); extern bfd_boolean _bfd_mips_elf_create_dynamic_sections diff --git a/cegcc/src/binutils/bfd/elfxx-sparc.c b/cegcc/src/binutils/bfd/elfxx-sparc.c index 6449f3b76..d3fe1bafa 100644 --- a/cegcc/src/binutils/bfd/elfxx-sparc.c +++ b/cegcc/src/binutils/bfd/elfxx-sparc.c @@ -1,5 +1,5 @@ /* SPARC-specific support for ELF - Copyright 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + Copyright 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -899,13 +899,7 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) htab->sgot = bfd_get_section_by_name (dynobj, ".got"); BFD_ASSERT (htab->sgot != NULL); - htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got", - SEC_ALLOC - | SEC_LOAD - | SEC_HAS_CONTENTS - | SEC_IN_MEMORY - | SEC_LINKER_CREATED - | SEC_READONLY); + htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got"); if (htab->srelgot == NULL || ! bfd_set_section_alignment (dynobj, htab->srelgot, htab->word_align_power)) @@ -1471,15 +1465,19 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* Track dynamic relocs needed for local syms too. We really need local syms available to do this easily. Oh well. */ - asection *s; void *vpp; + Elf_Internal_Sym *isym; - s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, - sec, r_symndx); - if (s == NULL) + isym = bfd_sym_from_r_symndx (&htab->sym_cache, + abfd, r_symndx); + if (isym == NULL) return FALSE; + s = bfd_section_from_elf_index (abfd, isym->st_shndx); + if (s == NULL) + s = sec; + vpp = &elf_section_data (s)->local_dynrel; head = (struct _bfd_sparc_elf_dyn_relocs **) vpp; } @@ -2453,6 +2451,10 @@ _bfd_sparc_elf_relax_section (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *link_info ATTRIBUTE_UNUSED, bfd_boolean *again) { + if (link_info->relocatable) + (*link_info->callbacks->einfo) + (_("%P%F: --relax and -r may not be used together\n")); + *again = FALSE; sec_do_relax (section) = 1; return TRUE; diff --git a/cegcc/src/binutils/bfd/elfxx-sparc.h b/cegcc/src/binutils/bfd/elfxx-sparc.h index 87ec62a71..2be037b1d 100644 --- a/cegcc/src/binutils/bfd/elfxx-sparc.h +++ b/cegcc/src/binutils/bfd/elfxx-sparc.h @@ -1,5 +1,5 @@ /* SPARC ELF specific backend routines. - Copyright 2005, 2007 Free Software Foundation, Inc. + Copyright 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -59,8 +59,8 @@ struct _bfd_sparc_elf_link_hash_table bfd_vma offset; } tls_ldm_got; - /* Small local sym to section mapping cache. */ - struct sym_sec_cache sym_sec; + /* Small local sym cache. */ + struct sym_cache sym_cache; /* True if the target system is VxWorks. */ int is_vxworks; diff --git a/cegcc/src/binutils/bfd/elfxx-target.h b/cegcc/src/binutils/bfd/elfxx-target.h index 4aa8dd4b6..413f273f8 100644 --- a/cegcc/src/binutils/bfd/elfxx-target.h +++ b/cegcc/src/binutils/bfd/elfxx-target.h @@ -1,6 +1,6 @@ /* Target definitions for NN-bit ELF Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -169,6 +169,10 @@ _bfd_elf_section_already_linked #endif +#ifndef bfd_elfNN_bfd_define_common_symbol +#define bfd_elfNN_bfd_define_common_symbol bfd_generic_define_common_symbol +#endif + #ifndef bfd_elfNN_bfd_make_debug_symbol #define bfd_elfNN_bfd_make_debug_symbol \ ((asymbol * (*) (bfd *, void *, unsigned long)) bfd_nullvoidptr) diff --git a/cegcc/src/binutils/bfd/epoc-pe-arm.c b/cegcc/src/binutils/bfd/epoc-pe-arm.c index c833707fc..a15f703c2 100644 --- a/cegcc/src/binutils/bfd/epoc-pe-arm.c +++ b/cegcc/src/binutils/bfd/epoc-pe-arm.c @@ -1,5 +1,5 @@ /* BFD back-end for ARM EPOC PE files. - Copyright 1999, 2000, 2007 Free Software Foundation, Inc. + Copyright 1999, 2000, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/epoc-pei-arm.c b/cegcc/src/binutils/bfd/epoc-pei-arm.c index 2a8e126b6..13adf2f6d 100644 --- a/cegcc/src/binutils/bfd/epoc-pei-arm.c +++ b/cegcc/src/binutils/bfd/epoc-pei-arm.c @@ -1,5 +1,5 @@ /* BFD back-end for ARM EPOC PE IMAGE COFF files. - Copyright 1999, 2000, 2007 Free Software Foundation, Inc. + Copyright 1999, 2000, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/format.c b/cegcc/src/binutils/bfd/format.c index 966ff8468..4d89a85e0 100644 --- a/cegcc/src/binutils/bfd/format.c +++ b/cegcc/src/binutils/bfd/format.c @@ -1,6 +1,6 @@ /* Generic BFD support for file formats. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, - 2003, 2005, 2007, 2008 Free Software Foundation, Inc. + 2003, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -149,7 +149,7 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) bfd_size_type amt; amt = sizeof (*matching_vector) * 2 * _bfd_target_vector_entries; - matching_vector = bfd_malloc (amt); + matching_vector = (const bfd_target **) bfd_malloc (amt); if (!matching_vector) return FALSE; } diff --git a/cegcc/src/binutils/bfd/gen-aout.c b/cegcc/src/binutils/bfd/gen-aout.c index 27f7eafe6..45331e0c8 100644 --- a/cegcc/src/binutils/bfd/gen-aout.c +++ b/cegcc/src/binutils/bfd/gen-aout.c @@ -1,5 +1,5 @@ /* Generate parameters for an a.out system. - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001, 2002, 2007 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/hash.c b/cegcc/src/binutils/bfd/hash.c index 14fc40301..5223e21d2 100644 --- a/cegcc/src/binutils/bfd/hash.c +++ b/cegcc/src/binutils/bfd/hash.c @@ -1,6 +1,6 @@ /* hash.c -- hash table routines for BFD Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002, 2003, 2004, 2005, - 2006, 2007 Free Software Foundation, Inc. + 2006, 2007, 2009 Free Software Foundation, Inc. Written by Steve Chamberlain This file is part of BFD, the Binary File Descriptor library. @@ -374,7 +374,8 @@ bfd_hash_table_init_n (struct bfd_hash_table *table, bfd_set_error (bfd_error_no_memory); return FALSE; } - table->table = objalloc_alloc ((struct objalloc *) table->memory, alloc); + table->table = (struct bfd_hash_entry **) + objalloc_alloc ((struct objalloc *) table->memory, alloc); if (table->table == NULL) { bfd_set_error (bfd_error_no_memory); @@ -407,7 +408,7 @@ bfd_hash_table_init (struct bfd_hash_table *table, void bfd_hash_table_free (struct bfd_hash_table *table) { - objalloc_free (table->memory); + objalloc_free ((struct objalloc *) table->memory); table->memory = NULL; } @@ -453,16 +454,17 @@ bfd_hash_lookup (struct bfd_hash_table *table, if (copy) { - char *new; + char *new_string; - new = objalloc_alloc ((struct objalloc *) table->memory, len + 1); - if (!new) + new_string = (char *) objalloc_alloc ((struct objalloc *) table->memory, + len + 1); + if (!new_string) { bfd_set_error (bfd_error_no_memory); return NULL; } - memcpy (new, string, len + 1); - string = new; + memcpy (new_string, string, len + 1); + string = new_string; } return bfd_hash_insert (table, string, hash); @@ -580,7 +582,8 @@ bfd_hash_newfunc (struct bfd_hash_entry *entry, const char *string ATTRIBUTE_UNUSED) { if (entry == NULL) - entry = bfd_hash_allocate (table, sizeof (* entry)); + entry = (struct bfd_hash_entry *) bfd_hash_allocate (table, + sizeof (* entry)); return entry; } @@ -675,7 +678,8 @@ strtab_hash_newfunc (struct bfd_hash_entry *entry, /* Allocate the structure if it has not already been allocated by a subclass. */ if (ret == NULL) - ret = bfd_hash_allocate (table, sizeof (* ret)); + ret = (struct strtab_hash_entry *) bfd_hash_allocate (table, + sizeof (* ret)); if (ret == NULL) return NULL; @@ -707,7 +711,7 @@ _bfd_stringtab_init (void) struct bfd_strtab_hash *table; bfd_size_type amt = sizeof (* table); - table = bfd_malloc (amt); + table = (struct bfd_strtab_hash *) bfd_malloc (amt); if (table == NULL) return NULL; @@ -770,7 +774,8 @@ _bfd_stringtab_add (struct bfd_strtab_hash *tab, } else { - entry = bfd_hash_allocate (&tab->table, sizeof (* entry)); + entry = (struct strtab_hash_entry *) bfd_hash_allocate (&tab->table, + sizeof (* entry)); if (entry == NULL) return (bfd_size_type) -1; if (! copy) @@ -779,7 +784,7 @@ _bfd_stringtab_add (struct bfd_strtab_hash *tab, { char *n; - n = bfd_hash_allocate (&tab->table, strlen (str) + 1); + n = (char *) bfd_hash_allocate (&tab->table, strlen (str) + 1); if (n == NULL) return (bfd_size_type) -1; entry->root.string = n; diff --git a/cegcc/src/binutils/bfd/host-aout.c b/cegcc/src/binutils/bfd/host-aout.c index a08c78763..5a759108f 100644 --- a/cegcc/src/binutils/bfd/host-aout.c +++ b/cegcc/src/binutils/bfd/host-aout.c @@ -1,5 +1,5 @@ /* BFD backend for local host's a.out binaries - Copyright 1990, 1991, 1992, 1994, 1995, 2001, 2007 + Copyright 1990, 1991, 1992, 1994, 1995, 2001, 2005, 2007 Free Software Foundation, Inc. Written by Cygnus Support. Probably John Gilmore's fault. diff --git a/cegcc/src/binutils/bfd/hosts/CVS/Entries b/cegcc/src/binutils/bfd/hosts/CVS/Entries dissimilarity index 99% index ba234c529..ac5158b5f 100644 --- a/cegcc/src/binutils/bfd/hosts/CVS/Entries +++ b/cegcc/src/binutils/bfd/hosts/CVS/Entries @@ -1,27 +1,27 @@ -/alphalinux.h/1.3/Fri Feb 8 14:23:07 2008// -/alphavms.h/1.7/Wed Feb 4 22:28:33 2009// -/decstation.h/1.2/Fri Feb 8 14:23:07 2008// -/delta68.h/1.3/Fri Feb 8 14:23:07 2008// -/dpx2.h/1.2/Fri Feb 8 14:23:07 2008// -/hp300bsd.h/1.2/Fri Feb 8 14:23:07 2008// -/i386bsd.h/1.2/Fri Feb 8 14:23:07 2008// -/i386linux.h/1.2/Fri Feb 8 14:23:07 2008// -/i386mach3.h/1.2/Fri Feb 8 14:23:07 2008// -/i386sco.h/1.2/Fri Feb 8 14:23:07 2008// -/i860mach3.h/1.2/Fri Feb 8 14:23:07 2008// -/m68kaux.h/1.2/Fri Feb 8 14:23:07 2008// -/m68klinux.h/1.2/Fri Feb 8 14:23:07 2008// -/m88kmach3.h/1.2/Fri Feb 8 14:23:07 2008// -/mipsbsd.h/1.2/Fri Feb 8 14:23:07 2008// -/mipsmach3.h/1.2/Fri Feb 8 14:23:07 2008// -/news-mips.h/1.2/Fri Feb 8 14:23:07 2008// -/news.h/1.2/Fri Feb 8 14:23:07 2008// -/pc532mach.h/1.2/Fri Feb 8 14:23:07 2008// -/riscos.h/1.2/Fri Feb 8 14:23:07 2008// -/symmetry.h/1.2/Fri Feb 8 14:23:07 2008// -/tahoe.h/1.2/Fri Feb 8 14:23:07 2008// -/vaxbsd.h/1.3/Fri Feb 8 14:23:07 2008// -/vaxlinux.h/1.2/Fri Feb 8 14:23:07 2008// -/vaxult.h/1.2/Fri Feb 8 14:23:07 2008// -/vaxult2.h/1.2/Fri Feb 8 14:23:07 2008// -D +/alphalinux.h/1.3/Fri Oct 16 21:38:35 2009// +/alphavms.h/1.9/Fri Oct 16 21:49:23 2009// +/decstation.h/1.2/Fri Oct 16 21:38:35 2009// +/delta68.h/1.4/Fri Oct 16 21:49:23 2009// +/dpx2.h/1.2/Fri Oct 16 21:38:35 2009// +/hp300bsd.h/1.2/Fri Oct 16 21:38:35 2009// +/i386bsd.h/1.2/Fri Oct 16 21:38:35 2009// +/i386linux.h/1.2/Fri Oct 16 21:38:35 2009// +/i386mach3.h/1.2/Fri Oct 16 21:38:35 2009// +/i386sco.h/1.2/Fri Oct 16 21:38:35 2009// +/i860mach3.h/1.2/Fri Oct 16 21:38:35 2009// +/m68kaux.h/1.2/Fri Oct 16 21:38:35 2009// +/m68klinux.h/1.2/Fri Oct 16 21:38:35 2009// +/m88kmach3.h/1.2/Fri Oct 16 21:38:35 2009// +/mipsbsd.h/1.2/Fri Oct 16 21:38:35 2009// +/mipsmach3.h/1.2/Fri Oct 16 21:38:35 2009// +/news-mips.h/1.2/Fri Oct 16 21:38:35 2009// +/news.h/1.2/Fri Oct 16 21:38:35 2009// +/pc532mach.h/1.2/Fri Oct 16 21:38:35 2009// +/riscos.h/1.2/Fri Oct 16 21:38:35 2009// +/symmetry.h/1.2/Fri Oct 16 21:38:35 2009// +/tahoe.h/1.2/Fri Oct 16 21:38:35 2009// +/vaxbsd.h/1.4/Fri Oct 16 21:49:23 2009// +/vaxlinux.h/1.3/Fri Oct 16 21:49:23 2009// +/vaxult.h/1.2/Fri Oct 16 21:38:35 2009// +/vaxult2.h/1.2/Fri Oct 16 21:38:35 2009// +D diff --git a/cegcc/src/binutils/bfd/hosts/alphavms.h b/cegcc/src/binutils/bfd/hosts/alphavms.h index 0afda86e6..2a3421200 100644 --- a/cegcc/src/binutils/bfd/hosts/alphavms.h +++ b/cegcc/src/binutils/bfd/hosts/alphavms.h @@ -1,5 +1,6 @@ /* alphavms.h -- BFD definitions for an openVMS host - Copyright 1996, 2000, 2001, 2007 Free Software Foundation, Inc. + Copyright 1996, 2000, 2001, 2005, 2007, 2008, 2009 + Free Software Foundation, Inc. Written by Klaus Kämpf (kkaempf@progis.de) of proGIS Softwareentwicklung, Aachen, Germany @@ -67,7 +68,8 @@ typedef BFD_HOST_64_BIT int64_type; #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) #endif -extern int getpagesize PARAMS ((void)); +extern int getpagesize (void); +extern char *stpcpy (char *, const char *); /* No intl. */ #define gettext(Msgid) (Msgid) diff --git a/cegcc/src/binutils/bfd/hosts/delta68.h b/cegcc/src/binutils/bfd/hosts/delta68.h index 352a5795b..3788272a0 100644 --- a/cegcc/src/binutils/bfd/hosts/delta68.h +++ b/cegcc/src/binutils/bfd/hosts/delta68.h @@ -1,4 +1,4 @@ -/* Copyright 2007 Free Software Foundation, Inc. +/* Copyright 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/hosts/vaxbsd.h b/cegcc/src/binutils/bfd/hosts/vaxbsd.h index 5dd8bded8..3e02c3de5 100644 --- a/cegcc/src/binutils/bfd/hosts/vaxbsd.h +++ b/cegcc/src/binutils/bfd/hosts/vaxbsd.h @@ -1,4 +1,4 @@ -/* Copyright 2007 Free Software Foundation, Inc. +/* Copyright 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/hosts/vaxlinux.h b/cegcc/src/binutils/bfd/hosts/vaxlinux.h index 4dd3f4c21..271587ed8 100644 --- a/cegcc/src/binutils/bfd/hosts/vaxlinux.h +++ b/cegcc/src/binutils/bfd/hosts/vaxlinux.h @@ -1,4 +1,4 @@ -/* Copyright 2007 Free Software Foundation, Inc. +/* Copyright 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/hp300bsd.c b/cegcc/src/binutils/bfd/hp300bsd.c index b150b5b48..2688b802e 100644 --- a/cegcc/src/binutils/bfd/hp300bsd.c +++ b/cegcc/src/binutils/bfd/hp300bsd.c @@ -1,5 +1,5 @@ /* BFD back-end for HP 9000/300 (68000-based) machines running BSD Unix. - Copyright 1992, 1994, 1995, 2001, 2003, 2007 + Copyright 1992, 1994, 1995, 2001, 2003, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -22,7 +22,6 @@ #define TARGET_IS_BIG_ENDIAN_P #define N_HEADER_IN_TEXT(x) 0 #define ENTRY_CAN_BE_ZERO -#define N_SHARED_LIB(x) 0 /* Avoids warning */ #define TEXT_START_ADDR 0 #define TARGET_PAGE_SIZE 4096 #define SEGMENT_SIZE TARGET_PAGE_SIZE diff --git a/cegcc/src/binutils/bfd/hp300hpux.c b/cegcc/src/binutils/bfd/hp300hpux.c index d016e3a9c..3ca56429e 100644 --- a/cegcc/src/binutils/bfd/hp300hpux.c +++ b/cegcc/src/binutils/bfd/hp300hpux.c @@ -1,6 +1,6 @@ /* BFD backend for hp-ux 9000/300 Copyright 1990, 1991, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, - 2003, 2004, 2007 Free Software Foundation, Inc. + 2003, 2004, 2005, 2007 Free Software Foundation, Inc. Written by Glenn Engel. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/hpux-core.c b/cegcc/src/binutils/bfd/hpux-core.c index cf6749cf7..fdcde7e54 100644 --- a/cegcc/src/binutils/bfd/hpux-core.c +++ b/cegcc/src/binutils/bfd/hpux-core.c @@ -1,6 +1,6 @@ /* BFD back-end for HP/UX core files. - Copyright 1993, 1994, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006, - 2007 Free Software Foundation, Inc. + Copyright 1993, 1994, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008 Free Software Foundation, Inc. Written by Stu Grossman, Cygnus Support. Converted to back-end form by Ian Lance Taylor, Cygnus SUpport diff --git a/cegcc/src/binutils/bfd/i386bsd.c b/cegcc/src/binutils/bfd/i386bsd.c index c8f272ef1..d54841ce9 100644 --- a/cegcc/src/binutils/bfd/i386bsd.c +++ b/cegcc/src/binutils/bfd/i386bsd.c @@ -1,5 +1,5 @@ /* BFD back-end for i386 a.out binaries under BSD. - Copyright 1990, 1991, 1992, 1993, 1994, 2001, 2007 + Copyright 1990, 1991, 1992, 1993, 1994, 2001, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -30,7 +30,6 @@ /* ZMAGIC files start at address 0. This does not apply to QMAGIC. */ #define TEXT_START_ADDR 0 -#define N_SHARED_LIB(x) 0 #define TARGET_PAGE_SIZE 4096 #define SEGMENT_SIZE TARGET_PAGE_SIZE diff --git a/cegcc/src/binutils/bfd/i386dynix.c b/cegcc/src/binutils/bfd/i386dynix.c index 73264118b..30d245053 100644 --- a/cegcc/src/binutils/bfd/i386dynix.c +++ b/cegcc/src/binutils/bfd/i386dynix.c @@ -1,5 +1,5 @@ /* BFD back-end for i386 a.out binaries under dynix. - Copyright 1994, 1995, 2001, 2003, 2007 Free Software Foundation, Inc. + Copyright 1994, 1995, 2001, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/i386freebsd.c b/cegcc/src/binutils/bfd/i386freebsd.c index 57024b042..52a3f6ec5 100644 --- a/cegcc/src/binutils/bfd/i386freebsd.c +++ b/cegcc/src/binutils/bfd/i386freebsd.c @@ -1,5 +1,6 @@ /* BFD back-end for FreeBSD/386 a.out-ish binaries. - Copyright 1990, 1991, 1992, 1996, 2001, 2007 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1996, 2001, 2005, 2007 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/i386linux.c b/cegcc/src/binutils/bfd/i386linux.c index 0f18789dd..a5bb77db1 100644 --- a/cegcc/src/binutils/bfd/i386linux.c +++ b/cegcc/src/binutils/bfd/i386linux.c @@ -1,6 +1,6 @@ /* BFD back-end for linux flavored i386 a.out binaries. Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003, - 2004, 2006, 2007, 2008 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -23,7 +23,6 @@ #define ZMAGIC_DISK_BLOCK_SIZE 1024 #define SEGMENT_SIZE TARGET_PAGE_SIZE #define TEXT_START_ADDR 0x0 -#define N_SHARED_LIB(x) 0 #define MACHTYPE_OK(mtype) ((mtype) == M_386 || (mtype) == M_UNKNOWN) diff --git a/cegcc/src/binutils/bfd/i386lynx.c b/cegcc/src/binutils/bfd/i386lynx.c index f8b8e0261..45909bf60 100644 --- a/cegcc/src/binutils/bfd/i386lynx.c +++ b/cegcc/src/binutils/bfd/i386lynx.c @@ -1,6 +1,6 @@ /* BFD back-end for i386 a.out binaries under LynxOS. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2001, 2002, - 2003, 2007 Free Software Foundation, Inc. + 2003, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -19,8 +19,6 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#define N_SHARED_LIB(x) 0 - #define TEXT_START_ADDR 0 #define TARGET_PAGE_SIZE 4096 #define SEGMENT_SIZE TARGET_PAGE_SIZE diff --git a/cegcc/src/binutils/bfd/i386mach3.c b/cegcc/src/binutils/bfd/i386mach3.c index 06974c16a..8402bdf99 100644 --- a/cegcc/src/binutils/bfd/i386mach3.c +++ b/cegcc/src/binutils/bfd/i386mach3.c @@ -1,5 +1,5 @@ /* BFD back-end for i386 a.out binaries. - Copyright 1990, 1991, 1993, 1994, 1995, 1997, 2001, 2002, 2003, 2007 + Copyright 1990, 1991, 1993, 1994, 1995, 1997, 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/i386msdos.c b/cegcc/src/binutils/bfd/i386msdos.c index 46489fa74..2059d9caf 100644 --- a/cegcc/src/binutils/bfd/i386msdos.c +++ b/cegcc/src/binutils/bfd/i386msdos.c @@ -1,6 +1,6 @@ /* BFD back-end for MS-DOS executables. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002, - 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Written by Bryan Ford of the University of Utah. Contributed by the Center for Software Science at the @@ -148,6 +148,7 @@ msdos_set_section_contents (bfd *abfd, #define msdos_bfd_discard_group bfd_generic_discard_group #define msdos_section_already_linked \ _bfd_generic_section_already_linked +#define msdos_bfd_define_common_symbol bfd_generic_define_common_symbol #define msdos_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define msdos_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define msdos_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/i386netbsd.c b/cegcc/src/binutils/bfd/i386netbsd.c index c80b8628f..47607b6fe 100644 --- a/cegcc/src/binutils/bfd/i386netbsd.c +++ b/cegcc/src/binutils/bfd/i386netbsd.c @@ -1,5 +1,5 @@ /* BFD back-end for NetBSD/386 a.out-ish binaries. - Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 2001, 2007 + Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 2001, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/i386os9k.c b/cegcc/src/binutils/bfd/i386os9k.c index fa4fc4255..4c33a6e67 100644 --- a/cegcc/src/binutils/bfd/i386os9k.c +++ b/cegcc/src/binutils/bfd/i386os9k.c @@ -1,6 +1,6 @@ /* BFD back-end for os9000 i386 binaries. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, 2002, - 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -172,6 +172,7 @@ os9k_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, #define os9k_bfd_discard_group bfd_generic_discard_group #define os9k_section_already_linked \ _bfd_generic_section_already_linked +#define os9k_bfd_define_common_symbol bfd_generic_define_common_symbol #define os9k_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define os9k_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define os9k_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/ieee.c b/cegcc/src/binutils/bfd/ieee.c index d032e9c13..1fecf5ae3 100644 --- a/cegcc/src/binutils/bfd/ieee.c +++ b/cegcc/src/binutils/bfd/ieee.c @@ -1,6 +1,6 @@ /* BFD back-end for ieee-695 objects. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. @@ -3627,12 +3627,12 @@ static asymbol * ieee_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (ieee_symbol_type); - ieee_symbol_type *new = bfd_zalloc (abfd, amt); + ieee_symbol_type *new_symbol = (ieee_symbol_type *) bfd_zalloc (abfd, amt); - if (!new) + if (!new_symbol) return NULL; - new->symbol.the_bfd = abfd; - return &new->symbol; + new_symbol->symbol.the_bfd = abfd; + return &new_symbol->symbol; } static bfd * @@ -3770,6 +3770,7 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, #define ieee_bfd_discard_group bfd_generic_discard_group #define ieee_section_already_linked \ _bfd_generic_section_already_linked +#define ieee_bfd_define_common_symbol bfd_generic_define_common_symbol #define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/ihex.c b/cegcc/src/binutils/bfd/ihex.c index 47e857ca1..aaad6d7b4 100644 --- a/cegcc/src/binutils/bfd/ihex.c +++ b/cegcc/src/binutils/bfd/ihex.c @@ -1,6 +1,6 @@ /* BFD back-end for Intel Hex objects. Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007 Free Software Foundation, Inc. + 2006, 2007, 2009 Free Software Foundation, Inc. Written by Ian Lance Taylor of Cygnus Support . This file is part of BFD, the Binary File Descriptor library. @@ -177,7 +177,7 @@ ihex_mkobject (bfd *abfd) { struct ihex_data_struct *tdata; - tdata = bfd_alloc (abfd, sizeof (* tdata)); + tdata = (struct ihex_data_struct *) bfd_alloc (abfd, sizeof (* tdata)); if (tdata == NULL) return FALSE; @@ -309,7 +309,7 @@ ihex_scan (bfd *abfd) chars = len * 2 + 2; if (chars >= bufsize) { - buf = bfd_realloc (buf, (bfd_size_type) chars); + buf = (bfd_byte *) bfd_realloc (buf, (bfd_size_type) chars); if (buf == NULL) goto error_return; bufsize = chars; @@ -361,7 +361,7 @@ ihex_scan (bfd *abfd) sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1); amt = strlen (secbuf) + 1; - secname = bfd_alloc (abfd, amt); + secname = (char *) bfd_alloc (abfd, amt); if (secname == NULL) goto error_return; strcpy (secname, secbuf); @@ -583,7 +583,7 @@ ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents) if (len * 2 > bufsize) { - buf = bfd_realloc (buf, (bfd_size_type) len * 2); + buf = (bfd_byte *) bfd_realloc (buf, (bfd_size_type) len * 2); if (buf == NULL) goto error_return; bufsize = len * 2; @@ -640,7 +640,8 @@ ihex_get_section_contents (bfd *abfd, section->used_by_bfd = bfd_alloc (abfd, section->size); if (section->used_by_bfd == NULL) return FALSE; - if (! ihex_read_section (abfd, section, section->used_by_bfd)) + if (! ihex_read_section (abfd, section, + (bfd_byte *) section->used_by_bfd)) return FALSE; } @@ -668,11 +669,11 @@ ihex_set_section_contents (bfd *abfd, || (section->flags & SEC_LOAD) == 0) return TRUE; - n = bfd_alloc (abfd, sizeof (* n)); + n = (struct ihex_data_list *) bfd_alloc (abfd, sizeof (* n)); if (n == NULL) return FALSE; - data = bfd_alloc (abfd, count); + data = (bfd_byte *) bfd_alloc (abfd, count); if (data == NULL) return FALSE; memcpy (data, location, (size_t) count); @@ -933,6 +934,7 @@ ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, #define ihex_bfd_is_group_section bfd_generic_is_group_section #define ihex_bfd_discard_group bfd_generic_discard_group #define ihex_section_already_linked _bfd_generic_section_already_linked +#define ihex_bfd_define_common_symbol bfd_generic_define_common_symbol #define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/init.c b/cegcc/src/binutils/bfd/init.c index 2ff155438..a023fb687 100644 --- a/cegcc/src/binutils/bfd/init.c +++ b/cegcc/src/binutils/bfd/init.c @@ -1,5 +1,5 @@ /* bfd initialization stuff - Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2003, 2007 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2003, 2005, 2007 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. diff --git a/cegcc/src/binutils/bfd/irix-core.c b/cegcc/src/binutils/bfd/irix-core.c index 41899ac53..1feff87cf 100644 --- a/cegcc/src/binutils/bfd/irix-core.c +++ b/cegcc/src/binutils/bfd/irix-core.c @@ -1,5 +1,5 @@ /* BFD back-end for Irix core files. - Copyright 1993, 1994, 1996, 1999, 2001, 2002, 2004, 2006, 2007 + Copyright 1993, 1994, 1996, 1999, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Written by Stu Grossman, Cygnus Support. Converted to back-end form by Ian Lance Taylor, Cygnus Support diff --git a/cegcc/src/binutils/bfd/libaout.h b/cegcc/src/binutils/bfd/libaout.h index d1d5b0ce3..ed2ec45a5 100644 --- a/cegcc/src/binutils/bfd/libaout.h +++ b/cegcc/src/binutils/bfd/libaout.h @@ -349,6 +349,21 @@ typedef struct aout_symbol Various things depend on this struct being around any time an a.out file is being handled. An example is dbxread.c in GDB. */ +enum aout_subformat { + default_format = 0, + /* Used on HP 9000/300 running HP/UX. See hp300hpux.c. */ + gnu_encap_format, + /* Used on Linux, 386BSD, etc. See include/aout/aout64.h. */ + q_magic_format +}; + +enum aout_magic { + undecided_magic = 0, + z_magic, + o_magic, + n_magic +}; + struct aoutdata { struct internal_exec *hdr; /* Exec file header. */ @@ -384,22 +399,9 @@ struct aoutdata unsigned vma_adjusted : 1; /* Used when a bfd supports several highly similar formats. */ - enum - { - default_format = 0, - /* Used on HP 9000/300 running HP/UX. See hp300hpux.c. */ - gnu_encap_format, - /* Used on Linux, 386BSD, etc. See include/aout/aout64.h. */ - q_magic_format - } subformat; - - enum - { - undecided_magic = 0, - z_magic, - o_magic, - n_magic - } magic; + enum aout_subformat subformat; + + enum aout_magic magic; /* A buffer for find_nearest_line. */ char *line_buf; diff --git a/cegcc/src/binutils/bfd/libbfd-in.h b/cegcc/src/binutils/bfd/libbfd-in.h index 949a2d2dc..2e441db7e 100644 --- a/cegcc/src/binutils/bfd/libbfd-in.h +++ b/cegcc/src/binutils/bfd/libbfd-in.h @@ -2,7 +2,7 @@ (This include file is not for users of the library.) Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -416,6 +416,9 @@ extern bfd_boolean _bfd_generic_set_section_contents ((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false) #define _bfd_nolink_section_already_linked \ ((void (*) (bfd *, struct bfd_section *, struct bfd_link_info *)) bfd_void) +#define _bfd_nolink_bfd_define_common_symbol \ + ((bfd_boolean (*) (bfd *, struct bfd_link_info *, \ + struct bfd_link_hash_entry *)) bfd_false) /* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC diff --git a/cegcc/src/binutils/bfd/libbfd.c b/cegcc/src/binutils/bfd/libbfd.c index a225397c3..f79e19054 100644 --- a/cegcc/src/binutils/bfd/libbfd.c +++ b/cegcc/src/binutils/bfd/libbfd.c @@ -549,35 +549,35 @@ DESCRIPTION bfd_vma bfd_getb16 (const void *p) { - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; return (addr[0] << 8) | addr[1]; } bfd_vma bfd_getl16 (const void *p) { - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; return (addr[1] << 8) | addr[0]; } bfd_signed_vma bfd_getb_signed_16 (const void *p) { - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; return COERCE16 ((addr[0] << 8) | addr[1]); } bfd_signed_vma bfd_getl_signed_16 (const void *p) { - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; return COERCE16 ((addr[1] << 8) | addr[0]); } void bfd_putb16 (bfd_vma data, void *p) { - bfd_byte *addr = p; + bfd_byte *addr = (bfd_byte *) p; addr[0] = (data >> 8) & 0xff; addr[1] = data & 0xff; } @@ -585,7 +585,7 @@ bfd_putb16 (bfd_vma data, void *p) void bfd_putl16 (bfd_vma data, void *p) { - bfd_byte *addr = p; + bfd_byte *addr = (bfd_byte *) p; addr[0] = data & 0xff; addr[1] = (data >> 8) & 0xff; } @@ -593,7 +593,7 @@ bfd_putl16 (bfd_vma data, void *p) bfd_vma bfd_getb32 (const void *p) { - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; unsigned long v; v = (unsigned long) addr[0] << 24; @@ -606,7 +606,7 @@ bfd_getb32 (const void *p) bfd_vma bfd_getl32 (const void *p) { - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; unsigned long v; v = (unsigned long) addr[0]; @@ -619,7 +619,7 @@ bfd_getl32 (const void *p) bfd_signed_vma bfd_getb_signed_32 (const void *p) { - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; unsigned long v; v = (unsigned long) addr[0] << 24; @@ -632,7 +632,7 @@ bfd_getb_signed_32 (const void *p) bfd_signed_vma bfd_getl_signed_32 (const void *p) { - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; unsigned long v; v = (unsigned long) addr[0]; @@ -646,7 +646,7 @@ bfd_uint64_t bfd_getb64 (const void *p ATTRIBUTE_UNUSED) { #ifdef BFD_HOST_64_BIT - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; bfd_uint64_t v; v = addr[0]; v <<= 8; @@ -669,7 +669,7 @@ bfd_uint64_t bfd_getl64 (const void *p ATTRIBUTE_UNUSED) { #ifdef BFD_HOST_64_BIT - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; bfd_uint64_t v; v = addr[7]; v <<= 8; @@ -693,7 +693,7 @@ bfd_int64_t bfd_getb_signed_64 (const void *p ATTRIBUTE_UNUSED) { #ifdef BFD_HOST_64_BIT - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; bfd_uint64_t v; v = addr[0]; v <<= 8; @@ -716,7 +716,7 @@ bfd_int64_t bfd_getl_signed_64 (const void *p ATTRIBUTE_UNUSED) { #ifdef BFD_HOST_64_BIT - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; bfd_uint64_t v; v = addr[7]; v <<= 8; @@ -738,7 +738,7 @@ bfd_getl_signed_64 (const void *p ATTRIBUTE_UNUSED) void bfd_putb32 (bfd_vma data, void *p) { - bfd_byte *addr = p; + bfd_byte *addr = (bfd_byte *) p; addr[0] = (data >> 24) & 0xff; addr[1] = (data >> 16) & 0xff; addr[2] = (data >> 8) & 0xff; @@ -748,7 +748,7 @@ bfd_putb32 (bfd_vma data, void *p) void bfd_putl32 (bfd_vma data, void *p) { - bfd_byte *addr = p; + bfd_byte *addr = (bfd_byte *) p; addr[0] = data & 0xff; addr[1] = (data >> 8) & 0xff; addr[2] = (data >> 16) & 0xff; @@ -759,7 +759,7 @@ void bfd_putb64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) { #ifdef BFD_HOST_64_BIT - bfd_byte *addr = p; + bfd_byte *addr = (bfd_byte *) p; addr[0] = (data >> (7*8)) & 0xff; addr[1] = (data >> (6*8)) & 0xff; addr[2] = (data >> (5*8)) & 0xff; @@ -777,7 +777,7 @@ void bfd_putl64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) { #ifdef BFD_HOST_64_BIT - bfd_byte *addr = p; + bfd_byte *addr = (bfd_byte *) p; addr[7] = (data >> (7*8)) & 0xff; addr[6] = (data >> (6*8)) & 0xff; addr[5] = (data >> (5*8)) & 0xff; @@ -794,7 +794,7 @@ bfd_putl64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) void bfd_put_bits (bfd_uint64_t data, void *p, int bits, bfd_boolean big_p) { - bfd_byte *addr = p; + bfd_byte *addr = (bfd_byte *) p; int i; int bytes; @@ -814,7 +814,7 @@ bfd_put_bits (bfd_uint64_t data, void *p, int bits, bfd_boolean big_p) bfd_uint64_t bfd_get_bits (const void *p, int bits, bfd_boolean big_p) { - const bfd_byte *addr = p; + const bfd_byte *addr = (const bfd_byte *) p; bfd_uint64_t data; int i; int bytes; diff --git a/cegcc/src/binutils/bfd/libbfd.h b/cegcc/src/binutils/bfd/libbfd.h index 26238b550..7fe65789b 100644 --- a/cegcc/src/binutils/bfd/libbfd.h +++ b/cegcc/src/binutils/bfd/libbfd.h @@ -7,7 +7,7 @@ (This include file is not for users of the library.) Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -421,6 +421,9 @@ extern bfd_boolean _bfd_generic_set_section_contents ((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false) #define _bfd_nolink_section_already_linked \ ((void (*) (bfd *, struct bfd_section *, struct bfd_link_info *)) bfd_void) +#define _bfd_nolink_bfd_define_common_symbol \ + ((bfd_boolean (*) (bfd *, struct bfd_link_info *, \ + struct bfd_link_hash_entry *)) bfd_false) /* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC @@ -770,6 +773,9 @@ struct bfd_iovec int (*bclose) (struct bfd *abfd); int (*bflush) (struct bfd *abfd); int (*bstat) (struct bfd *abfd, struct stat *sb); + /* Just like mmap: (void*)-1 on failure, mmapped address on success. */ + void *(*bmmap) (struct bfd *abfd, void *addr, bfd_size_type len, + int prot, int flags, file_ptr offset); }; /* Extracted from bfdwin.c. */ struct _bfd_window_internal { @@ -945,6 +951,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_SPU_HI16", "BFD_RELOC_SPU_PPU32", "BFD_RELOC_SPU_PPU64", + "BFD_RELOC_SPU_ADD_PIC", "BFD_RELOC_ALPHA_GPDISP_HI16", "BFD_RELOC_ALPHA_GPDISP_LO16", "BFD_RELOC_ALPHA_GPDISP", @@ -957,6 +964,10 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_ALPHA_GPREL_HI16", "BFD_RELOC_ALPHA_GPREL_LO16", "BFD_RELOC_ALPHA_BRSGP", + "BFD_RELOC_ALPHA_NOP", + "BFD_RELOC_ALPHA_BSR", + "BFD_RELOC_ALPHA_LDA", + "BFD_RELOC_ALPHA_BOH", "BFD_RELOC_ALPHA_TLSGD", "BFD_RELOC_ALPHA_TLSLDM", "BFD_RELOC_ALPHA_DTPMOD64", @@ -1023,6 +1034,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_MIPS_COPY", "BFD_RELOC_MIPS_JUMP_SLOT", + "BFD_RELOC_MOXIE_10_PCREL", + "BFD_RELOC_FRV_LABEL16", "BFD_RELOC_FRV_LABEL24", "BFD_RELOC_FRV_LO16", @@ -1097,6 +1110,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_386_TLS_GOTDESC", "BFD_RELOC_386_TLS_DESC_CALL", "BFD_RELOC_386_TLS_DESC", + "BFD_RELOC_386_IRELATIVE", "BFD_RELOC_X86_64_GOT32", "BFD_RELOC_X86_64_PLT32", "BFD_RELOC_X86_64_COPY", @@ -1123,6 +1137,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_X86_64_GOTPC32_TLSDESC", "BFD_RELOC_X86_64_TLSDESC_CALL", "BFD_RELOC_X86_64_TLSDESC", + "BFD_RELOC_X86_64_IRELATIVE", "BFD_RELOC_NS32K_IMM_8", "BFD_RELOC_NS32K_IMM_16", "BFD_RELOC_NS32K_IMM_32", @@ -1197,6 +1212,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_PPC64_PLTGOT16_DS", "BFD_RELOC_PPC64_PLTGOT16_LO_DS", "BFD_RELOC_PPC_TLS", + "BFD_RELOC_PPC_TLSGD", + "BFD_RELOC_PPC_TLSLD", "BFD_RELOC_PPC_DTPMOD", "BFD_RELOC_PPC_TPREL16", "BFD_RELOC_PPC_TPREL16_LO", @@ -1629,6 +1646,30 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_AVR_LDI", "BFD_RELOC_AVR_6", "BFD_RELOC_AVR_6_ADIW", + "BFD_RELOC_RX_NEG8", + "BFD_RELOC_RX_NEG16", + "BFD_RELOC_RX_NEG24", + "BFD_RELOC_RX_NEG32", + "BFD_RELOC_RX_16_OP", + "BFD_RELOC_RX_24_OP", + "BFD_RELOC_RX_32_OP", + "BFD_RELOC_RX_8U", + "BFD_RELOC_RX_16U", + "BFD_RELOC_RX_24U", + "BFD_RELOC_RX_DIR3U_PCREL", + "BFD_RELOC_RX_DIFF", + "BFD_RELOC_RX_GPRELB", + "BFD_RELOC_RX_GPRELW", + "BFD_RELOC_RX_GPRELL", + "BFD_RELOC_RX_SYM", + "BFD_RELOC_RX_OP_SUBTRACT", + "BFD_RELOC_RX_ABS8", + "BFD_RELOC_RX_ABS16", + "BFD_RELOC_RX_ABS32", + "BFD_RELOC_RX_ABS16U", + "BFD_RELOC_RX_ABS16UW", + "BFD_RELOC_RX_ABS16UL", + "BFD_RELOC_RX_RELAX", "BFD_RELOC_390_12", "BFD_RELOC_390_GOT12", "BFD_RELOC_390_PLT32", @@ -1679,13 +1720,15 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_390_GOT20", "BFD_RELOC_390_GOTPLT20", "BFD_RELOC_390_TLS_GOTIE20", - "BFD_RELOC_SCORE_DUMMY1", "BFD_RELOC_SCORE_GPREL15", "BFD_RELOC_SCORE_DUMMY2", "BFD_RELOC_SCORE_JMP", "BFD_RELOC_SCORE_BRANCH", + "BFD_RELOC_SCORE_IMM30", + "BFD_RELOC_SCORE_IMM32", "BFD_RELOC_SCORE16_JMP", "BFD_RELOC_SCORE16_BRANCH", + "BFD_RELOC_SCORE_BCMP", "BFD_RELOC_SCORE_GOT15", "BFD_RELOC_SCORE_GOT_LO16", "BFD_RELOC_SCORE_CALL15", @@ -2051,6 +2094,20 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_LM32_GLOB_DAT", "BFD_RELOC_LM32_JMP_SLOT", "BFD_RELOC_LM32_RELATIVE", + "BFD_RELOC_MACH_O_SECTDIFF", + "BFD_RELOC_MACH_O_PAIR", + "BFD_RELOC_MICROBLAZE_32_LO", + "BFD_RELOC_MICROBLAZE_32_LO_PCREL", + "BFD_RELOC_MICROBLAZE_32_ROSDA", + "BFD_RELOC_MICROBLAZE_32_RWSDA", + "BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM", + "BFD_RELOC_MICROBLAZE_64_NONE", + "BFD_RELOC_MICROBLAZE_64_GOTPC", + "BFD_RELOC_MICROBLAZE_64_GOT", + "BFD_RELOC_MICROBLAZE_64_PLT", + "BFD_RELOC_MICROBLAZE_64_GOTOFF", + "BFD_RELOC_MICROBLAZE_32_GOTOFF", + "BFD_RELOC_MICROBLAZE_COPY", "@@overflow: BFD_RELOC_UNUSED@@", }; #endif diff --git a/cegcc/src/binutils/bfd/libcoff-in.h b/cegcc/src/binutils/bfd/libcoff-in.h index 8f11df4df..cf0a31907 100644 --- a/cegcc/src/binutils/bfd/libcoff-in.h +++ b/cegcc/src/binutils/bfd/libcoff-in.h @@ -1,6 +1,6 @@ /* BFD COFF object file private structure. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -106,6 +106,9 @@ typedef struct coff_tdata used by ARM code. */ flagword flags; + /* coff-stgo32 EXE stub header after BFD tdata has been allocated. Its data + is kept in internal_filehdr.go32stub beforehand. */ + char *go32stub; } coff_data_type; /* Tdata for pe image files. */ @@ -117,8 +120,6 @@ typedef struct pe_tdata int has_reloc_section; bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *); flagword real_flags; - int target_subsystem; - bfd_boolean force_minimum_alignment; } pe_data_type; #define pe_data(bfd) ((bfd)->tdata.pe_obj_data) @@ -165,7 +166,8 @@ struct xcoff_tdata /* Used by the XCOFF backend linker. */ asection **csects; - unsigned long *debug_indices; + long *debug_indices; + unsigned int *lineno_counts; unsigned int import_file_id; }; @@ -215,8 +217,7 @@ struct xcoff_section_tdata /* The lineno_count field for the enclosing section, because we are going to clobber it there. */ unsigned int lineno_count; - /* The first and one past the last symbol indices for symbols used - by this csect. */ + /* The first and last symbol indices for symbols used by this csect. */ unsigned long first_symndx; unsigned long last_symndx; }; @@ -253,7 +254,7 @@ struct coff_link_hash_entry unsigned short type; /* Symbol class. */ - unsigned char class; + unsigned char symbol_class; /* Number of auxiliary entries. */ char numaux; @@ -393,7 +394,7 @@ struct coff_debug_merge_type struct coff_debug_merge_type *next; /* Class of type. */ - int class; + int type_class; /* Symbol index where this type is defined. */ long indx; @@ -589,15 +590,16 @@ extern bfd_boolean _bfd_xcoff_bfd_link_add_symbols (bfd *, struct bfd_link_info *); extern bfd_boolean _bfd_xcoff_bfd_final_link (bfd *, struct bfd_link_info *); +extern bfd_boolean _bfd_xcoff_define_common_symbol + (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); extern bfd_boolean _bfd_ppc_xcoff_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **); -/* Functions in coff-ppc.c. FIXME: These are called be pe.em in the +/* Functions in coff-ppc.c. FIXME: These are called by pe.em in the linker, and so should start with bfd and be declared in bfd.h. */ extern bfd_boolean ppc_allocate_toc_section (struct bfd_link_info *); extern bfd_boolean ppc_process_before_allocation (bfd *, struct bfd_link_info *); - diff --git a/cegcc/src/binutils/bfd/libcoff.h b/cegcc/src/binutils/bfd/libcoff.h index 9d3b33fa3..db5e2904f 100644 --- a/cegcc/src/binutils/bfd/libcoff.h +++ b/cegcc/src/binutils/bfd/libcoff.h @@ -4,7 +4,7 @@ /* BFD COFF object file private structure. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -110,6 +110,9 @@ typedef struct coff_tdata used by ARM code. */ flagword flags; + /* coff-stgo32 EXE stub header after BFD tdata has been allocated. Its data + is kept in internal_filehdr.go32stub beforehand. */ + char *go32stub; } coff_data_type; /* Tdata for pe image files. */ @@ -121,8 +124,6 @@ typedef struct pe_tdata int has_reloc_section; bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *); flagword real_flags; - int target_subsystem; - bfd_boolean force_minimum_alignment; } pe_data_type; #define pe_data(bfd) ((bfd)->tdata.pe_obj_data) @@ -169,7 +170,8 @@ struct xcoff_tdata /* Used by the XCOFF backend linker. */ asection **csects; - unsigned long *debug_indices; + long *debug_indices; + unsigned int *lineno_counts; unsigned int import_file_id; }; @@ -219,8 +221,7 @@ struct xcoff_section_tdata /* The lineno_count field for the enclosing section, because we are going to clobber it there. */ unsigned int lineno_count; - /* The first and one past the last symbol indices for symbols used - by this csect. */ + /* The first and last symbol indices for symbols used by this csect. */ unsigned long first_symndx; unsigned long last_symndx; }; @@ -257,7 +258,7 @@ struct coff_link_hash_entry unsigned short type; /* Symbol class. */ - unsigned char class; + unsigned char symbol_class; /* Number of auxiliary entries. */ char numaux; @@ -397,7 +398,7 @@ struct coff_debug_merge_type struct coff_debug_merge_type *next; /* Class of type. */ - int class; + int type_class; /* Symbol index where this type is defined. */ long indx; @@ -593,18 +594,19 @@ extern bfd_boolean _bfd_xcoff_bfd_link_add_symbols (bfd *, struct bfd_link_info *); extern bfd_boolean _bfd_xcoff_bfd_final_link (bfd *, struct bfd_link_info *); +extern bfd_boolean _bfd_xcoff_define_common_symbol + (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); extern bfd_boolean _bfd_ppc_xcoff_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **); -/* Functions in coff-ppc.c. FIXME: These are called be pe.em in the +/* Functions in coff-ppc.c. FIXME: These are called by pe.em in the linker, and so should start with bfd and be declared in bfd.h. */ extern bfd_boolean ppc_allocate_toc_section (struct bfd_link_info *); extern bfd_boolean ppc_process_before_allocation (bfd *, struct bfd_link_info *); - /* Extracted from coffcode.h. */ typedef struct coff_ptr_struct { @@ -715,7 +717,11 @@ typedef struct unsigned int _bfd_linesz; unsigned int _bfd_filnmlen; bfd_boolean _bfd_coff_long_filenames; + bfd_boolean _bfd_coff_long_section_names; + bfd_boolean (*_bfd_coff_set_long_section_names) + (bfd *, int); + unsigned int _bfd_coff_default_section_alignment_power; bfd_boolean _bfd_coff_force_symnames_in_strings; unsigned int _bfd_coff_debug_string_prefix_length; @@ -852,6 +858,8 @@ typedef struct (coff_backend_info (abfd)->_bfd_coff_long_filenames) #define bfd_coff_long_section_names(abfd) \ (coff_backend_info (abfd)->_bfd_coff_long_section_names) +#define bfd_coff_set_long_section_names(abfd, enable) \ + ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable)) #define bfd_coff_default_section_alignment_power(abfd) \ (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power) #define bfd_coff_swap_filehdr_in(abfd, i,o) \ @@ -942,3 +950,7 @@ typedef struct #define bfd_coff_print_pdata(a,p) \ ((coff_backend_info (a)->_bfd_coff_print_pdata) (a, p)) +/* Macro: Returns true if the bfd is a PE executable as opposed to a + PE object file. */ +#define bfd_pei_p(abfd) \ + (CONST_STRNEQ ((abfd)->xvec->name, "pei-")) diff --git a/cegcc/src/binutils/bfd/libecoff.h b/cegcc/src/binutils/bfd/libecoff.h index 443b9a756..0e7ea855c 100644 --- a/cegcc/src/binutils/bfd/libecoff.h +++ b/cegcc/src/binutils/bfd/libecoff.h @@ -1,6 +1,6 @@ /* BFD ECOFF object file private structure. Copyright 1993, 1994, 1995, 1996, 1999, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -76,6 +76,11 @@ struct ecoff_backend_data bfd *(*get_elt_at_filepos) (bfd *, file_ptr); }; +/* ECOFF targets don't support COFF long section names, so this + macro is provided to use as an initialiser for the related + members of the embedded bfd_coff_backend_data struct. */ +#define ECOFF_NO_LONG_SECTION_NAMES (FALSE), _bfd_ecoff_no_long_sections + /* This is the target specific information kept for ECOFF files. */ #define ecoff_data(abfd) ((abfd)->tdata.ecoff_obj_data) @@ -320,6 +325,8 @@ extern void * _bfd_ecoff_mkobject_hook (bfd *, void *, void *); ((void (*) (bfd *, asection *, void *)) bfd_void) extern bfd_boolean _bfd_ecoff_set_arch_mach_hook (bfd *, void *); +extern bfd_boolean _bfd_ecoff_no_long_sections + (bfd *abfd, int enable); extern bfd_boolean _bfd_ecoff_styp_to_sec_flags (bfd *, void *, const char *, asection *, flagword *); extern bfd_boolean _bfd_ecoff_slurp_symbol_table (bfd *); diff --git a/cegcc/src/binutils/bfd/libhppa.h b/cegcc/src/binutils/bfd/libhppa.h index beebb7079..5e0b155bb 100644 --- a/cegcc/src/binutils/bfd/libhppa.h +++ b/cegcc/src/binutils/bfd/libhppa.h @@ -1,6 +1,6 @@ /* HP PA-RISC SOM object file format: definitions internal to BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, - 2003, 2007 Free Software Foundation, Inc. + 2003, 2005, 2007 Free Software Foundation, Inc. Contributed by the Center for Software Science at the University of Utah (pa-gdb-bugs@cs.utah.edu). diff --git a/cegcc/src/binutils/bfd/libieee.h b/cegcc/src/binutils/bfd/libieee.h index 2d71577df..53f4c08a5 100644 --- a/cegcc/src/binutils/bfd/libieee.h +++ b/cegcc/src/binutils/bfd/libieee.h @@ -1,5 +1,5 @@ /* IEEE-695 object file formats: definitions internal to BFD. - Copyright 1990, 1991, 1992, 1994, 1996, 2001, 2002, 2007 + Copyright 1990, 1991, 1992, 1994, 1996, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. Written by Cygnus Support. Mostly Steve Chamberlain's fault. diff --git a/cegcc/src/binutils/bfd/liboasys.h b/cegcc/src/binutils/bfd/liboasys.h index b84a0ea4c..8228d977f 100644 --- a/cegcc/src/binutils/bfd/liboasys.h +++ b/cegcc/src/binutils/bfd/liboasys.h @@ -1,5 +1,5 @@ /* BFD internal declarations for Oasys file format handling. - Copyright 1990, 1991, 1992, 1993, 1994, 1997, 2002, 2007 + Copyright 1990, 1991, 1992, 1993, 1994, 1997, 2002, 2005, 2007 Free Software Foundation, Inc. Scrawled by Steve Chamberlain of Cygnus Support. diff --git a/cegcc/src/binutils/bfd/libpei.h b/cegcc/src/binutils/bfd/libpei.h index 8fcae7bea..f8a02b951 100644 --- a/cegcc/src/binutils/bfd/libpei.h +++ b/cegcc/src/binutils/bfd/libpei.h @@ -1,6 +1,6 @@ /* Support for the generic parts of PE/PEI; common header information. Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Solutions. This file is part of BFD, the Binary File Descriptor library. @@ -301,46 +301,6 @@ #endif /* !COFF_WITH_pep */ -/* Returns true if the target is a PE executable target. */ -#define bfd_target_pei_p(xvec) \ - (CONST_STRNEQ ((xvec)->name, "pei-")) - -/* Return the arch string of a PE executable target. */ -#define bfd_target_pei_arch(xvec) \ - ((xvec)->name + sizeof ("pei-") - 1) - -/* Returns true if the target is an EFI application target. */ -#define bfd_target_efi_app_p(xvec) \ - (CONST_STRNEQ ((xvec)->name, "efi-app-")) - -/* Return the arch string of an EFI application target. */ -#define bfd_target_efi_app_arch(xvec) \ - ((xvec)->name + sizeof ("efi-app-") - 1) - -/* Returns true if the target is an EFI Boot Service driver target. */ -#define bfd_target_efi_bsdrv_p(xvec) \ - (CONST_STRNEQ ((xvec)->name, "efi-bsdrv-")) - -/* Return the arch string of an EFI Boot Service driver target. */ -#define bfd_target_efi_bsdrv_arch(xvec) \ - ((xvec)->name + sizeof ("efi-bsdrv-") - 1) - -/* Returns true if the target is an EFI runtime driver target. */ -#define bfd_target_efi_rtdrv_p(xvec) \ - (CONST_STRNEQ ((xvec)->name, "efi-rtdrv-")) - -/* Return the arch string of an EFI runtime driver target. */ -#define bfd_target_efi_rtdrv_arch(xvec) \ - ((xvec)->name + sizeof ("efi-rtdrv-") - 1) - -/* Macro: Returns true if the bfd is a PE executable as opposed to a - PE object file. */ -#define bfd_pe_executable_p(abfd) \ - ( bfd_target_pei_p ((abfd)->xvec) \ - || bfd_target_efi_app_p ((abfd)->xvec) \ - || bfd_target_efi_bsdrv_p ((abfd)->xvec) \ - || bfd_target_efi_rtdrv_p ((abfd)->xvec)) - /* These functions are architecture dependent, and are in peicode.h: coff_swap_reloc_in int coff_swap_reloc_out diff --git a/cegcc/src/binutils/bfd/libxcoff.h b/cegcc/src/binutils/bfd/libxcoff.h index c2f0d1e01..3900dd3c7 100644 --- a/cegcc/src/binutils/bfd/libxcoff.h +++ b/cegcc/src/binutils/bfd/libxcoff.h @@ -1,5 +1,5 @@ /* BFD XCOFF object file private structure. - Copyright 2001, 2002, 2005, 2007 Free Software Foundation, Inc. + Copyright 2001, 2002, 2005, 2007, 2009 Free Software Foundation, Inc. Written by Tom Rix, Redhat. This file is part of BFD, the Binary File Descriptor library. @@ -223,6 +223,8 @@ extern bfd_boolean (*xcoff_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION]) extern bfd_boolean (*xcoff_complain_overflow[XCOFF_MAX_COMPLAIN_OVERFLOW]) (XCOFF_COMPLAIN_FUNCTION_ARGS); +#define XCOFF_NO_LONG_SECTION_NAMES (FALSE), bfd_coff_set_long_section_names_disallowed + /* Relocation functions */ bfd_boolean xcoff_reloc_type_noop (XCOFF_RELOC_FUNCTION_ARGS); bfd_boolean xcoff_reloc_type_fail (XCOFF_RELOC_FUNCTION_ARGS); diff --git a/cegcc/src/binutils/bfd/linker.c b/cegcc/src/binutils/bfd/linker.c index 5080d7d44..1163a5591 100644 --- a/cegcc/src/binutils/bfd/linker.c +++ b/cegcc/src/binutils/bfd/linker.c @@ -1,6 +1,6 @@ /* linker.c -- BFD linker routines Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008 + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support @@ -444,7 +444,8 @@ _bfd_link_hash_newfunc (struct bfd_hash_entry *entry, subclass. */ if (entry == NULL) { - entry = bfd_hash_allocate (table, sizeof (struct bfd_link_hash_entry)); + entry = (struct bfd_hash_entry *) + bfd_hash_allocate (table, sizeof (struct bfd_link_hash_entry)); if (entry == NULL) return entry; } @@ -548,7 +549,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd, references to SYM with references to __wrap_SYM. */ amt = strlen (l) + sizeof WRAP + 1; - n = bfd_malloc (amt); + n = (char *) bfd_malloc (amt); if (n == NULL) return NULL; @@ -579,7 +580,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd, with references to SYM. */ amt = strlen (l + sizeof REAL - 1) + 2; - n = bfd_malloc (amt); + n = (char *) bfd_malloc (amt); if (n == NULL) return NULL; @@ -678,7 +679,7 @@ _bfd_generic_link_hash_newfunc (struct bfd_hash_entry *entry, subclass. */ if (entry == NULL) { - entry = + entry = (struct bfd_hash_entry *) bfd_hash_allocate (table, sizeof (struct generic_link_hash_entry)); if (entry == NULL) return entry; @@ -707,7 +708,7 @@ _bfd_generic_link_hash_table_create (bfd *abfd) struct generic_link_hash_table *ret; bfd_size_type amt = sizeof (struct generic_link_hash_table); - ret = bfd_malloc (amt); + ret = (struct generic_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return NULL; if (! _bfd_link_hash_table_init (&ret->root, abfd, @@ -748,7 +749,8 @@ bfd_generic_link_read_symbols (bfd *abfd) symsize = bfd_get_symtab_upper_bound (abfd); if (symsize < 0) return FALSE; - bfd_get_outsymbols (abfd) = bfd_alloc (abfd, symsize); + bfd_get_outsymbols (abfd) = (struct bfd_symbol **) bfd_alloc (abfd, + symsize); if (bfd_get_outsymbols (abfd) == NULL && symsize != 0) return FALSE; symcount = bfd_canonicalize_symtab (abfd, bfd_get_outsymbols (abfd)); @@ -880,7 +882,8 @@ archive_hash_newfunc (struct bfd_hash_entry *entry, /* Allocate the structure if it has not already been allocated by a subclass. */ if (ret == NULL) - ret = bfd_hash_allocate (table, sizeof (struct archive_hash_entry)); + ret = (struct archive_hash_entry *) + bfd_hash_allocate (table, sizeof (struct archive_hash_entry)); if (ret == NULL) return NULL; @@ -1051,7 +1054,7 @@ _bfd_generic_link_add_archive_symbols if (info->pei386_auto_import) { bfd_size_type amt = strlen (h->root.string) + 10; - char *buf = bfd_malloc (amt); + char *buf = (char *) bfd_malloc (amt); if (buf == NULL) return FALSE; @@ -1242,7 +1245,7 @@ generic_link_check_archive_element (bfd *abfd, attached to symbfd to ensure that it is in a BFD which will be linked in. */ h->type = bfd_link_hash_common; - h->u.c.p = + h->u.c.p = (struct bfd_link_hash_common_entry *) bfd_hash_allocate (&info->hash->table, sizeof (struct bfd_link_hash_common_entry)); if (h->u.c.p == NULL) @@ -1691,7 +1694,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, if (h->type == bfd_link_hash_new) bfd_link_add_undef (info->hash, h); h->type = bfd_link_hash_common; - h->u.c.p = + h->u.c.p = (struct bfd_link_hash_common_entry *) bfd_hash_allocate (&info->hash->table, sizeof (struct bfd_link_hash_common_entry)); if (h->u.c.p == NULL) @@ -1972,7 +1975,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, char *w; size_t len = strlen (string) + 1; - w = bfd_hash_allocate (&info->hash->table, len); + w = (char *) bfd_hash_allocate (&info->hash->table, len); if (w == NULL) return FALSE; memcpy (w, string, len); @@ -2059,7 +2062,7 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info) input_section); if (relsize < 0) return FALSE; - relocs = bfd_malloc (relsize); + relocs = (arelent **) bfd_malloc (relsize); if (!relocs && relsize != 0) return FALSE; symbols = _bfd_generic_link_get_symbols (input_bfd); @@ -2081,7 +2084,7 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info) amt = o->reloc_count; amt *= sizeof (arelent *); - o->orelocation = bfd_alloc (abfd, amt); + o->orelocation = (struct reloc_cache_entry **) bfd_alloc (abfd, amt); if (!o->orelocation) return FALSE; o->flags |= SEC_RELOC; @@ -2135,7 +2138,7 @@ generic_add_output_symbol (bfd *output_bfd, size_t *psymalloc, asymbol *sym) *psymalloc *= 2; amt = *psymalloc; amt *= sizeof (asymbol *); - newsyms = bfd_realloc (bfd_get_outsymbols (output_bfd), amt); + newsyms = (asymbol **) bfd_realloc (bfd_get_outsymbols (output_bfd), amt); if (newsyms == NULL) return FALSE; bfd_get_outsymbols (output_bfd) = newsyms; @@ -2212,7 +2215,7 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, || bfd_is_ind_section (bfd_get_section (sym))) { if (sym->udata.p != NULL) - h = sym->udata.p; + h = (struct generic_link_hash_entry *) sym->udata.p; else if ((sym->flags & BSF_CONSTRUCTOR) != 0) { /* This case normally means that the main linker code @@ -2451,7 +2454,8 @@ bfd_boolean _bfd_generic_link_write_global_symbol (struct generic_link_hash_entry *h, void *data) { - struct generic_write_global_symbol_info *wginfo = data; + struct generic_write_global_symbol_info *wginfo = + (struct generic_write_global_symbol_info *) data; asymbol *sym; if (h->root.type == bfd_link_hash_warning) @@ -2508,7 +2512,7 @@ _bfd_generic_reloc_link_order (bfd *abfd, if (sec->orelocation == NULL) abort (); - r = bfd_alloc (abfd, sizeof (arelent)); + r = (arelent *) bfd_alloc (abfd, sizeof (arelent)); if (r == NULL) return FALSE; @@ -2556,7 +2560,7 @@ _bfd_generic_reloc_link_order (bfd *abfd, file_ptr loc; size = bfd_get_reloc_size (r->howto); - buf = bfd_zmalloc (size); + buf = (bfd_byte *) bfd_zmalloc (size); if (buf == NULL) return FALSE; rstat = _bfd_relocate_contents (r->howto, abfd, @@ -2604,21 +2608,21 @@ struct bfd_link_order * bfd_new_link_order (bfd *abfd, asection *section) { bfd_size_type amt = sizeof (struct bfd_link_order); - struct bfd_link_order *new; + struct bfd_link_order *new_lo; - new = bfd_zalloc (abfd, amt); - if (!new) + new_lo = (struct bfd_link_order *) bfd_zalloc (abfd, amt); + if (!new_lo) return NULL; - new->type = bfd_undefined_link_order; + new_lo->type = bfd_undefined_link_order; if (section->map_tail.link_order != NULL) - section->map_tail.link_order->next = new; + section->map_tail.link_order->next = new_lo; else - section->map_head.link_order = new; - section->map_tail.link_order = new; + section->map_head.link_order = new_lo; + section->map_tail.link_order = new_lo; - return new; + return new_lo; } /* Default link order processing routine. Note that we can not handle @@ -2671,7 +2675,7 @@ default_data_link_order (bfd *abfd, if (fill_size != 0 && fill_size < size) { bfd_byte *p; - fill = bfd_malloc (size); + fill = (bfd_byte *) bfd_malloc (size); if (fill == NULL) return FALSE; p = fill; @@ -2781,7 +2785,7 @@ default_indirect_link_order (bfd *output_bfd, /* sym->udata may have been set by generic_link_add_symbol_list. */ if (sym->udata.p != NULL) - h = sym->udata.p; + h = (struct bfd_link_hash_entry *) sym->udata.p; else if (bfd_is_und_section (bfd_get_section (sym))) h = bfd_wrapped_link_hash_lookup (output_bfd, info, bfd_asymbol_name (sym), @@ -2816,7 +2820,7 @@ default_indirect_link_order (bfd *output_bfd, sec_size = (input_section->rawsize > input_section->size ? input_section->rawsize : input_section->size); - contents = bfd_malloc (sec_size); + contents = (bfd_byte *) bfd_malloc (sec_size); if (contents == NULL && sec_size != 0) goto error_return; new_contents = (bfd_get_relocated_section_contents @@ -2949,7 +2953,8 @@ bfd_section_already_linked_table_insert /* Allocate the memory from the same obstack as the hash table is kept in. */ - l = bfd_hash_allocate (&_bfd_section_already_linked_table, sizeof *l); + l = (struct bfd_section_already_linked *) + bfd_hash_allocate (&_bfd_section_already_linked_table, sizeof *l); if (l == NULL) return FALSE; l->sec = sec; @@ -2964,7 +2969,8 @@ already_linked_newfunc (struct bfd_hash_entry *entry ATTRIBUTE_UNUSED, const char *string ATTRIBUTE_UNUSED) { struct bfd_section_already_linked_hash_entry *ret = - bfd_hash_allocate (table, sizeof *ret); + (struct bfd_section_already_linked_hash_entry *) + bfd_hash_allocate (table, sizeof *ret); if (ret == NULL) return NULL; @@ -3095,7 +3101,7 @@ _bfd_generic_section_already_linked (bfd *abfd, asection *sec, /* This is the first section with this name. Record it. */ if (! bfd_section_already_linked_table_insert (already_linked_list, sec)) - info->callbacks->einfo (_("%F%P: already_linked_table: %E")); + info->callbacks->einfo (_("%F%P: already_linked_table: %E\n")); } /* Convert symbols in excluded output sections to use a kept section. */ @@ -3149,10 +3155,16 @@ fix_syms (struct bfd_link_hash_entry *h, void *data) else if (op == NULL) op = op1; else if (((op1->flags ^ op->flags) - & (SEC_ALLOC | SEC_THREAD_LOCAL)) != 0) + & (SEC_ALLOC | SEC_THREAD_LOCAL | SEC_LOAD)) != 0) { if (((op->flags ^ s->flags) - & (SEC_ALLOC | SEC_THREAD_LOCAL)) != 0) + & (SEC_ALLOC | SEC_THREAD_LOCAL)) != 0 + /* We prefer to choose a loaded section. Section S + doesn't have SEC_LOAD set (it being excluded, that + part of the flag processing didn't happen) so we + can't compare that flag to those of OP and OP1. */ + || ((op1->flags & SEC_LOAD) != 0 + && (op->flags & SEC_LOAD) == 0)) op = op1; } else if (((op1->flags ^ op->flags) & SEC_READONLY) != 0) @@ -3186,3 +3198,169 @@ _bfd_fix_excluded_sec_syms (bfd *obfd, struct bfd_link_info *info) { bfd_link_hash_traverse (info->hash, fix_syms, obfd); } + +/* +FUNCTION + bfd_generic_define_common_symbol + +SYNOPSIS + bfd_boolean bfd_generic_define_common_symbol + (bfd *output_bfd, struct bfd_link_info *info, + struct bfd_link_hash_entry *h); + +DESCRIPTION + Convert common symbol @var{h} into a defined symbol. + Return TRUE on success and FALSE on failure. + +.#define bfd_define_common_symbol(output_bfd, info, h) \ +. BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h)) +. +*/ + +bfd_boolean +bfd_generic_define_common_symbol (bfd *output_bfd, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + struct bfd_link_hash_entry *h) +{ + unsigned int power_of_two; + bfd_vma alignment, size; + asection *section; + + BFD_ASSERT (h != NULL && h->type == bfd_link_hash_common); + + size = h->u.c.size; + power_of_two = h->u.c.p->alignment_power; + section = h->u.c.p->section; + + /* Increase the size of the section to align the common symbol. + The alignment must be a power of two. */ + alignment = bfd_octets_per_byte (output_bfd) << power_of_two; + BFD_ASSERT (alignment != 0 && (alignment & -alignment) == alignment); + section->size += alignment - 1; + section->size &= -alignment; + + /* Adjust the section's overall alignment if necessary. */ + if (power_of_two > section->alignment_power) + section->alignment_power = power_of_two; + + /* Change the symbol from common to defined. */ + h->type = bfd_link_hash_defined; + h->u.def.section = section; + h->u.def.value = section->size; + + /* Increase the size of the section. */ + section->size += size; + + /* Make sure the section is allocated in memory, and make sure that + it is no longer a common section. */ + section->flags |= SEC_ALLOC; + section->flags &= ~SEC_IS_COMMON; + return TRUE; +} + +/* +FUNCTION + bfd_find_version_for_sym + +SYNOPSIS + struct bfd_elf_version_tree * bfd_find_version_for_sym + (struct bfd_elf_version_tree *verdefs, + const char *sym_name, bfd_boolean *hide); + +DESCRIPTION + Search an elf version script tree for symbol versioning + info and export / don't-export status for a given symbol. + Return non-NULL on success and NULL on failure; also sets + the output @samp{hide} boolean parameter. + +*/ + +struct bfd_elf_version_tree * +bfd_find_version_for_sym (struct bfd_elf_version_tree *verdefs, + const char *sym_name, + bfd_boolean *hide) +{ + struct bfd_elf_version_tree *t; + struct bfd_elf_version_tree *local_ver, *global_ver, *exist_ver; + struct bfd_elf_version_tree *star_local_ver, *star_global_ver; + + local_ver = NULL; + global_ver = NULL; + star_local_ver = NULL; + star_global_ver = NULL; + exist_ver = NULL; + for (t = verdefs; t != NULL; t = t->next) + { + if (t->globals.list != NULL) + { + struct bfd_elf_version_expr *d = NULL; + + while ((d = (*t->match) (&t->globals, d, sym_name)) != NULL) + { + if (d->literal || strcmp (d->pattern, "*") != 0) + global_ver = t; + else + star_global_ver = t; + if (d->symver) + exist_ver = t; + d->script = 1; + /* If the match is a wildcard pattern, keep looking for + a more explicit, perhaps even local, match. */ + if (d->literal) + break; + } + + if (d != NULL) + break; + } + + if (t->locals.list != NULL) + { + struct bfd_elf_version_expr *d = NULL; + + while ((d = (*t->match) (&t->locals, d, sym_name)) != NULL) + { + if (d->literal || strcmp (d->pattern, "*") != 0) + local_ver = t; + else + star_local_ver = t; + /* If the match is a wildcard pattern, keep looking for + a more explicit, perhaps even global, match. */ + if (d->literal) + { + /* An exact match overrides a global wildcard. */ + global_ver = NULL; + star_global_ver = NULL; + break; + } + } + + if (d != NULL) + break; + } + } + + if (global_ver == NULL && local_ver == NULL) + global_ver = star_global_ver; + + if (global_ver != NULL) + { + /* If we already have a versioned symbol that matches the + node for this symbol, then we don't want to create a + duplicate from the unversioned symbol. Instead hide the + unversioned symbol. */ + *hide = exist_ver == global_ver; + return global_ver; + } + + if (local_ver == NULL) + local_ver = star_local_ver; + + if (local_ver != NULL) + { + *hide = TRUE; + return local_ver; + } + + return NULL; +} diff --git a/cegcc/src/binutils/bfd/lynx-core.c b/cegcc/src/binutils/bfd/lynx-core.c index 46b37d3c8..a432566a9 100644 --- a/cegcc/src/binutils/bfd/lynx-core.c +++ b/cegcc/src/binutils/bfd/lynx-core.c @@ -1,5 +1,5 @@ /* BFD back end for Lynx core files - Copyright 1993, 1994, 1995, 2001, 2002, 2004, 2006, 2007 + Copyright 1993, 1994, 1995, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Written by Stu Grossman of Cygnus Support. diff --git a/cegcc/src/binutils/bfd/m68k4knetbsd.c b/cegcc/src/binutils/bfd/m68k4knetbsd.c index 6004b844e..0722c3aa0 100644 --- a/cegcc/src/binutils/bfd/m68k4knetbsd.c +++ b/cegcc/src/binutils/bfd/m68k4knetbsd.c @@ -1,5 +1,5 @@ /* BFD back-end for NetBSD/m68k a.out-ish binaries. - Copyright 1990, 1991, 1992, 1995, 1998, 2001, 2003, 2007 + Copyright 1990, 1991, 1992, 1995, 1998, 2001, 2003, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/m68klinux.c b/cegcc/src/binutils/bfd/m68klinux.c index d56c431f7..08b001062 100644 --- a/cegcc/src/binutils/bfd/m68klinux.c +++ b/cegcc/src/binutils/bfd/m68klinux.c @@ -1,6 +1,6 @@ /* BFD back-end for linux flavored m68k a.out binaries. Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, - 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -23,7 +23,6 @@ #define ZMAGIC_DISK_BLOCK_SIZE 1024 #define SEGMENT_SIZE TARGET_PAGE_SIZE #define TEXT_START_ADDR 0x0 -#define N_SHARED_LIB(x) 0 #define MACHTYPE_OK(mtype) ((mtype) == M_68020 || (mtype) == M_UNKNOWN) diff --git a/cegcc/src/binutils/bfd/m68knetbsd.c b/cegcc/src/binutils/bfd/m68knetbsd.c index 59ad35515..8ff0bddd1 100644 --- a/cegcc/src/binutils/bfd/m68knetbsd.c +++ b/cegcc/src/binutils/bfd/m68knetbsd.c @@ -1,6 +1,6 @@ /* BFD back-end for NetBSD/m68k a.out-ish binaries. Copyright 1990, 1991, 1992, 1994, 1995, 1997, 1998, 2000, 2001, 2003, - 2007 Free Software Foundation, Inc. + 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/m88kmach3.c b/cegcc/src/binutils/bfd/m88kmach3.c index db8cb43d7..d98b4c779 100644 --- a/cegcc/src/binutils/bfd/m88kmach3.c +++ b/cegcc/src/binutils/bfd/m88kmach3.c @@ -1,5 +1,5 @@ /* BFD back-end for Motorola m88k a.out (Mach 3) binaries. - Copyright 1990, 1991, 1993, 1994, 1995, 2001, 2003, 2007 + Copyright 1990, 1991, 1993, 1994, 1995, 2001, 2003, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -23,7 +23,6 @@ #define SEGMENT_SIZE 0x20000 #define TEXT_START_ADDR 0 #define N_HEADER_IN_TEXT(x) 1 /* (N_MAGIG(x) == ZMAGIC) */ -#define N_SHARED_LIB(x) 0 #define N_TXTSIZE(x) ((x).a_text) diff --git a/cegcc/src/binutils/bfd/m88kopenbsd.c b/cegcc/src/binutils/bfd/m88kopenbsd.c index fbdf37849..8d9f03373 100644 --- a/cegcc/src/binutils/bfd/m88kopenbsd.c +++ b/cegcc/src/binutils/bfd/m88kopenbsd.c @@ -1,5 +1,5 @@ /* BFD back-end for OpenBSD/m88k a.out binaries. - Copyright 2004, 2007 Free Software Foundation, Inc. + Copyright 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/mach-o-target.c b/cegcc/src/binutils/bfd/mach-o-target.c index a435e6ed3..c3084673e 100644 --- a/cegcc/src/binutils/bfd/mach-o-target.c +++ b/cegcc/src/binutils/bfd/mach-o-target.c @@ -1,5 +1,5 @@ /* Mach-O support for BFD. - Copyright 1999, 2000, 2001, 2002, 2007 + Copyright 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -19,6 +19,62 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +/* Define generic entry points here so that we don't need to duplicate the + defines in every target. But define once as this file may be included + several times. */ +#ifndef MACH_O_TARGET_COMMON_DEFINED +#define MACH_O_TARGET_COMMON_DEFINED + +#define bfd_mach_o_mkarchive _bfd_noarchive_mkarchive +#define bfd_mach_o_read_ar_hdr _bfd_noarchive_read_ar_hdr +#define bfd_mach_o_slurp_armap _bfd_noarchive_slurp_armap +#define bfd_mach_o_slurp_extended_name_table _bfd_noarchive_slurp_extended_name_table +#define bfd_mach_o_construct_extended_name_table _bfd_noarchive_construct_extended_name_table +#define bfd_mach_o_truncate_arname _bfd_noarchive_truncate_arname +#define bfd_mach_o_write_armap _bfd_noarchive_write_armap +#define bfd_mach_o_get_elt_at_index _bfd_noarchive_get_elt_at_index +#define bfd_mach_o_generic_stat_arch_elt _bfd_noarchive_generic_stat_arch_elt +#define bfd_mach_o_update_armap_timestamp _bfd_noarchive_update_armap_timestamp +#define bfd_mach_o_close_and_cleanup _bfd_generic_close_and_cleanup +#define bfd_mach_o_bfd_free_cached_info _bfd_generic_bfd_free_cached_info +#define bfd_mach_o_new_section_hook _bfd_generic_new_section_hook +#define bfd_mach_o_get_section_contents_in_window _bfd_generic_get_section_contents_in_window +#define bfd_mach_o_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) +#define bfd_mach_o_bfd_is_local_label_name bfd_generic_is_local_label_name +#define bfd_mach_o_get_lineno _bfd_nosymbols_get_lineno +#define bfd_mach_o_find_nearest_line _bfd_nosymbols_find_nearest_line +#define bfd_mach_o_find_inliner_info _bfd_nosymbols_find_inliner_info +#define bfd_mach_o_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol +#define bfd_mach_o_read_minisymbols _bfd_generic_read_minisymbols +#define bfd_mach_o_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol +#define bfd_mach_o_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents +#define bfd_mach_o_bfd_relax_section bfd_generic_relax_section +#define bfd_mach_o_bfd_link_hash_table_create _bfd_generic_link_hash_table_create +#define bfd_mach_o_bfd_link_hash_table_free _bfd_generic_link_hash_table_free +#define bfd_mach_o_bfd_link_add_symbols _bfd_generic_link_add_symbols +#define bfd_mach_o_bfd_link_just_syms _bfd_generic_link_just_syms +#define bfd_mach_o_bfd_final_link _bfd_generic_final_link +#define bfd_mach_o_bfd_link_split_section _bfd_generic_link_split_section +#define bfd_mach_o_set_arch_mach bfd_default_set_arch_mach +#define bfd_mach_o_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data +#define bfd_mach_o_bfd_set_private_flags _bfd_generic_bfd_set_private_flags +#define bfd_mach_o_get_section_contents _bfd_generic_get_section_contents +#define bfd_mach_o_bfd_gc_sections bfd_generic_gc_sections +#define bfd_mach_o_bfd_merge_sections bfd_generic_merge_sections +#define bfd_mach_o_bfd_is_group_section bfd_generic_is_group_section +#define bfd_mach_o_bfd_discard_group bfd_generic_discard_group +#define bfd_mach_o_section_already_linked _bfd_generic_section_already_linked +#define bfd_mach_o_bfd_define_common_symbol bfd_generic_define_common_symbol +#define bfd_mach_o_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data +#define bfd_mach_o_core_file_matches_executable_p generic_core_file_matches_executable_p + +#define bfd_mach_o_get_dynamic_symtab_upper_bound bfd_mach_o_get_symtab_upper_bound +#define bfd_mach_o_canonicalize_dynamic_symtab bfd_mach_o_canonicalize_symtab + +#define TARGET_NAME_BACKEND XCONCAT2(TARGET_NAME,_backend) + +#endif /* MACH_O_TARGET_COMMON_DEFINED */ + #ifndef TARGET_NAME #error TARGET_NAME must be defined #endif /* TARGET_NAME */ @@ -39,6 +95,13 @@ #error Mach-O fat files must always be big-endian. #endif /* ((TARGET_ARCHIVE) && (! TARGET_BIG_ENDIAN)) */ +static const bfd_mach_o_backend_data TARGET_NAME_BACKEND = +{ + bfd_mach_o_swap_reloc_in, + bfd_mach_o_swap_reloc_out, + bfd_mach_o_print_thread +}; + const bfd_target TARGET_NAME = { TARGET_STRING, /* Name. */ @@ -110,13 +173,15 @@ const bfd_target TARGET_NAME = BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd), #endif BFD_JUMP_TABLE_SYMBOLS (bfd_mach_o), - BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), + BFD_JUMP_TABLE_RELOCS (bfd_mach_o), BFD_JUMP_TABLE_WRITE (bfd_mach_o), BFD_JUMP_TABLE_LINK (bfd_mach_o), - BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), + BFD_JUMP_TABLE_DYNAMIC (bfd_mach_o), + /* Alternative endian target. */ NULL, - NULL + /* Back-end data. */ + &TARGET_NAME_BACKEND }; diff --git a/cegcc/src/binutils/bfd/mach-o.c b/cegcc/src/binutils/bfd/mach-o.c index e0a6fa477..641fd9bd4 100644 --- a/cegcc/src/binutils/bfd/mach-o.c +++ b/cegcc/src/binutils/bfd/mach-o.c @@ -1,5 +1,5 @@ /* Mach-O support for BFD. - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -27,61 +27,22 @@ #include "aout/stab_gnu.h" #include -#ifndef BFD_IO_FUNCS -#define BFD_IO_FUNCS 0 -#endif - -#define bfd_mach_o_mkarchive _bfd_noarchive_mkarchive -#define bfd_mach_o_read_ar_hdr _bfd_noarchive_read_ar_hdr -#define bfd_mach_o_slurp_armap _bfd_noarchive_slurp_armap -#define bfd_mach_o_slurp_extended_name_table _bfd_noarchive_slurp_extended_name_table -#define bfd_mach_o_construct_extended_name_table _bfd_noarchive_construct_extended_name_table -#define bfd_mach_o_truncate_arname _bfd_noarchive_truncate_arname -#define bfd_mach_o_write_armap _bfd_noarchive_write_armap -#define bfd_mach_o_get_elt_at_index _bfd_noarchive_get_elt_at_index -#define bfd_mach_o_generic_stat_arch_elt _bfd_noarchive_generic_stat_arch_elt -#define bfd_mach_o_update_armap_timestamp _bfd_noarchive_update_armap_timestamp -#define bfd_mach_o_close_and_cleanup _bfd_generic_close_and_cleanup -#define bfd_mach_o_bfd_free_cached_info _bfd_generic_bfd_free_cached_info -#define bfd_mach_o_new_section_hook _bfd_generic_new_section_hook -#define bfd_mach_o_get_section_contents_in_window _bfd_generic_get_section_contents_in_window -#define bfd_mach_o_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name -#define bfd_mach_o_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) -#define bfd_mach_o_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name -#define bfd_mach_o_get_lineno _bfd_nosymbols_get_lineno -#define bfd_mach_o_find_nearest_line _bfd_nosymbols_find_nearest_line -#define bfd_mach_o_find_inliner_info _bfd_nosymbols_find_inliner_info -#define bfd_mach_o_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol -#define bfd_mach_o_read_minisymbols _bfd_generic_read_minisymbols -#define bfd_mach_o_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol -#define bfd_mach_o_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents -#define bfd_mach_o_bfd_relax_section bfd_generic_relax_section -#define bfd_mach_o_bfd_link_hash_table_create _bfd_generic_link_hash_table_create -#define bfd_mach_o_bfd_link_hash_table_free _bfd_generic_link_hash_table_free -#define bfd_mach_o_bfd_link_add_symbols _bfd_generic_link_add_symbols -#define bfd_mach_o_bfd_link_just_syms _bfd_generic_link_just_syms -#define bfd_mach_o_bfd_final_link _bfd_generic_final_link -#define bfd_mach_o_bfd_link_split_section _bfd_generic_link_split_section -#define bfd_mach_o_set_arch_mach bfd_default_set_arch_mach -#define bfd_mach_o_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data -#define bfd_mach_o_bfd_set_private_flags _bfd_generic_bfd_set_private_flags -#define bfd_mach_o_get_section_contents _bfd_generic_get_section_contents -#define bfd_mach_o_set_section_contents _bfd_generic_set_section_contents -#define bfd_mach_o_bfd_gc_sections bfd_generic_gc_sections -#define bfd_mach_o_bfd_merge_sections bfd_generic_merge_sections -#define bfd_mach_o_bfd_is_group_section bfd_generic_is_group_section -#define bfd_mach_o_bfd_discard_group bfd_generic_discard_group -#define bfd_mach_o_section_already_linked _bfd_generic_section_already_linked -#define bfd_mach_o_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data -#define bfd_mach_o_core_file_matches_executable_p generic_core_file_matches_executable_p - -static unsigned int +#define bfd_mach_o_object_p bfd_mach_o_gen_object_p +#define bfd_mach_o_core_p bfd_mach_o_gen_core_p +#define bfd_mach_o_mkobject bfd_false + +#define FILE_ALIGN(off, algn) \ + (((off) + ((file_ptr) 1 << (algn)) - 1) & ((file_ptr) -1 << (algn))) + +static int bfd_mach_o_read_symtab_symbols (bfd *); + +unsigned int bfd_mach_o_version (bfd *abfd) { bfd_mach_o_data_struct *mdata = NULL; BFD_ASSERT (bfd_mach_o_valid (abfd)); - mdata = abfd->tdata.mach_o_data; + mdata = bfd_mach_o_get_data (abfd); return mdata->header.version; } @@ -90,22 +51,250 @@ bfd_boolean bfd_mach_o_valid (bfd *abfd) { if (abfd == NULL || abfd->xvec == NULL) - return 0; + return FALSE; - if (! ((abfd->xvec == &mach_o_be_vec) - || (abfd->xvec == &mach_o_le_vec) - || (abfd->xvec == &mach_o_fat_vec))) - return 0; + if (abfd->xvec->flavour != bfd_target_mach_o_flavour) + return FALSE; + + if (bfd_mach_o_get_data (abfd) == NULL) + return FALSE; + return TRUE; +} + +static INLINE bfd_boolean +mach_o_wide_p (bfd_mach_o_header *header) +{ + switch (header->version) + { + case 1: + return FALSE; + case 2: + return TRUE; + default: + BFD_FAIL (); + return FALSE; + } +} + +static INLINE bfd_boolean +bfd_mach_o_wide_p (bfd *abfd) +{ + return mach_o_wide_p (&bfd_mach_o_get_data (abfd)->header); +} + +/* Tables to translate well known Mach-O segment/section names to bfd + names. Use of canonical names (such as .text or .debug_frame) is required + by gdb. */ + +struct mach_o_section_name_xlat +{ + const char *bfd_name; + const char *mach_o_name; +}; + +static const struct mach_o_section_name_xlat dwarf_section_names_xlat[] = + { + { ".debug_frame", "__debug_frame" }, + { ".debug_info", "__debug_info" }, + { ".debug_abbrev", "__debug_abbrev" }, + { ".debug_aranges", "__debug_aranges" }, + { ".debug_macinfo", "__debug_macinfo" }, + { ".debug_line", "__debug_line" }, + { ".debug_loc", "__debug_loc" }, + { ".debug_pubnames", "__debug_pubnames" }, + { ".debug_pubtypes", "__debug_pubtypes" }, + { ".debug_str", "__debug_str" }, + { ".debug_ranges", "__debug_ranges" }, + { NULL, NULL} + }; + +static const struct mach_o_section_name_xlat text_section_names_xlat[] = + { + { ".text", "__text" }, + { ".const", "__const" }, + { ".cstring", "__cstring" }, + { ".eh_frame", "__eh_frame" }, + { NULL, NULL} + }; + +static const struct mach_o_section_name_xlat data_section_names_xlat[] = + { + { ".data", "__data" }, + { ".bss", "__bss" }, + { NULL, NULL} + }; + +struct mach_o_segment_name_xlat +{ + const char *segname; + const struct mach_o_section_name_xlat *sections; +}; + +static const struct mach_o_segment_name_xlat segsec_names_xlat[] = + { + { "__DWARF", dwarf_section_names_xlat }, + { "__TEXT", text_section_names_xlat }, + { "__DATA", data_section_names_xlat }, + { NULL, NULL } + }; + + +/* Mach-O to bfd names. */ + +static char * +bfd_mach_o_convert_section_name_to_bfd (bfd *abfd, bfd_mach_o_section *section) +{ + const struct mach_o_segment_name_xlat *seg; + char *res; + unsigned int len; + const char *pfx = ""; + + for (seg = segsec_names_xlat; seg->segname; seg++) + { + if (strcmp (seg->segname, section->segname) == 0) + { + const struct mach_o_section_name_xlat *sec; + + for (sec = seg->sections; sec->mach_o_name; sec++) + { + if (strcmp (sec->mach_o_name, section->sectname) == 0) + { + len = strlen (sec->bfd_name); + res = bfd_alloc (abfd, len + 1); + + if (res == NULL) + return NULL; + strcpy (res, sec->bfd_name); + return res; + } + } + } + } + + len = strlen (section->segname) + 1 + + strlen (section->sectname) + 1; + + /* Put "LC_SEGMENT." prefix if the segment name is weird (ie doesn't start + with an underscore. */ + if (section->segname[0] != '_') + { + static const char seg_pfx[] = "LC_SEGMENT."; + + pfx = seg_pfx; + len += sizeof (seg_pfx) - 1; + } + + res = bfd_alloc (abfd, len); + if (res == NULL) + return NULL; + snprintf (res, len, "%s%s.%s", pfx, section->segname, section->sectname); + return res; +} + +/* Convert a bfd section name to a Mach-O segment + section name. */ + +static void +bfd_mach_o_convert_section_name_to_mach_o (bfd *abfd ATTRIBUTE_UNUSED, + asection *sect, + bfd_mach_o_section *section) +{ + const struct mach_o_segment_name_xlat *seg; + const char *name = bfd_get_section_name (abfd, sect); + const char *dot; + unsigned int len; + unsigned int seglen; + unsigned int seclen; + + /* List of well known names. They all start with a dot. */ + if (name[0] == '.') + for (seg = segsec_names_xlat; seg->segname; seg++) + { + const struct mach_o_section_name_xlat *sec; + + for (sec = seg->sections; sec->mach_o_name; sec++) + { + if (strcmp (sec->bfd_name, name) == 0) + { + strcpy (section->segname, seg->segname); + strcpy (section->sectname, sec->mach_o_name); + return; + } + } + } + + /* Strip LC_SEGMENT. prefix. */ + if (strncmp (name, "LC_SEGMENT.", 11) == 0) + name += 11; + + /* Find a dot. */ + dot = strchr (name, '.'); + len = strlen (name); + + /* Try to split name into segment and section names. */ + if (dot && dot != name) + { + seglen = dot - name; + seclen = len - (dot + 1 - name); + + if (seglen < 16 && seclen < 16) + { + memcpy (section->segname, name, seglen); + section->segname[seglen] = 0; + memcpy (section->sectname, dot + 1, seclen); + section->sectname[seclen] = 0; + return; + } + } + + if (len > 16) + len = 16; + memcpy (section->segname, name, len); + section->segname[len] = 0; + memcpy (section->sectname, name, len); + section->sectname[len] = 0; +} + +/* Return the size of an entry for section SEC. + Must be called only for symbol pointer section and symbol stubs + sections. */ + +static unsigned int +bfd_mach_o_section_get_entry_size (bfd *abfd, bfd_mach_o_section *sec) +{ + switch (sec->flags & BFD_MACH_O_SECTION_TYPE_MASK) + { + case BFD_MACH_O_S_NON_LAZY_SYMBOL_POINTERS: + case BFD_MACH_O_S_LAZY_SYMBOL_POINTERS: + return bfd_mach_o_wide_p (abfd) ? 8 : 4; + case BFD_MACH_O_S_SYMBOL_STUBS: + return sec->reserved2; + default: + BFD_FAIL (); + return 0; + } +} + +/* Return the number of indirect symbols for a section. + Must be called only for symbol pointer section and symbol stubs + sections. */ + +static unsigned int +bfd_mach_o_section_get_nbr_indirect (bfd *abfd, bfd_mach_o_section *sec) +{ + unsigned int elsz; - if (abfd->tdata.mach_o_data == NULL) + elsz = bfd_mach_o_section_get_entry_size (abfd, sec); + if (elsz == 0) return 0; - return 1; + else + return sec->size / elsz; } + /* Copy any private info we understand from the input symbol to the output symbol. */ -static bfd_boolean +bfd_boolean bfd_mach_o_bfd_copy_private_symbol_data (bfd *ibfd ATTRIBUTE_UNUSED, asymbol *isymbol ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, @@ -117,7 +306,7 @@ bfd_mach_o_bfd_copy_private_symbol_data (bfd *ibfd ATTRIBUTE_UNUSED, /* Copy any private info we understand from the input section to the output section. */ -static bfd_boolean +bfd_boolean bfd_mach_o_bfd_copy_private_section_data (bfd *ibfd ATTRIBUTE_UNUSED, asection *isection ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, @@ -129,87 +318,169 @@ bfd_mach_o_bfd_copy_private_section_data (bfd *ibfd ATTRIBUTE_UNUSED, /* Copy any private info we understand from the input bfd to the output bfd. */ -static bfd_boolean +bfd_boolean bfd_mach_o_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { + if (bfd_get_flavour (ibfd) != bfd_target_mach_o_flavour + || bfd_get_flavour (obfd) != bfd_target_mach_o_flavour) + return TRUE; + BFD_ASSERT (bfd_mach_o_valid (ibfd)); BFD_ASSERT (bfd_mach_o_valid (obfd)); - obfd->tdata.mach_o_data = ibfd->tdata.mach_o_data; - obfd->tdata.mach_o_data->ibfd = ibfd; + /* FIXME: copy commands. */ + return TRUE; } +/* Count the total number of symbols. */ + static long bfd_mach_o_count_symbols (bfd *abfd) { - bfd_mach_o_data_struct *mdata = NULL; - long nsyms = 0; - unsigned long i; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); - BFD_ASSERT (bfd_mach_o_valid (abfd)); - mdata = abfd->tdata.mach_o_data; - - for (i = 0; i < mdata->header.ncmds; i++) - if (mdata->commands[i].type == BFD_MACH_O_LC_SYMTAB) - { - bfd_mach_o_symtab_command *sym = &mdata->commands[i].command.symtab; - nsyms += sym->nsyms; - } - - return nsyms; + if (mdata->symtab == NULL) + return 0; + return mdata->symtab->nsyms; } -static long +long bfd_mach_o_get_symtab_upper_bound (bfd *abfd) { long nsyms = bfd_mach_o_count_symbols (abfd); - if (nsyms < 0) - return nsyms; - return ((nsyms + 1) * sizeof (asymbol *)); } -static long +long bfd_mach_o_canonicalize_symtab (bfd *abfd, asymbol **alocation) { - bfd_mach_o_data_struct *mdata = abfd->tdata.mach_o_data; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); long nsyms = bfd_mach_o_count_symbols (abfd); - asymbol **csym = alocation; - unsigned long i, j; + bfd_mach_o_symtab_command *sym = mdata->symtab; + unsigned long j; if (nsyms < 0) return nsyms; - for (i = 0; i < mdata->header.ncmds; i++) + if (bfd_mach_o_read_symtab_symbols (abfd) != 0) { - if (mdata->commands[i].type == BFD_MACH_O_LC_SYMTAB) - { - bfd_mach_o_symtab_command *sym = &mdata->commands[i].command.symtab; + fprintf (stderr, + "bfd_mach_o_canonicalize_symtab: unable to load symbols\n"); + return 0; + } - if (bfd_mach_o_scan_read_symtab_symbols (abfd, &mdata->commands[i].command.symtab) != 0) - { - fprintf (stderr, "bfd_mach_o_canonicalize_symtab: unable to load symbols for section %lu\n", i); - return 0; - } + BFD_ASSERT (sym->symbols != NULL); - BFD_ASSERT (sym->symbols != NULL); + for (j = 0; j < sym->nsyms; j++) + alocation[j] = &sym->symbols[j].symbol; - for (j = 0; j < sym->nsyms; j++) - { - BFD_ASSERT (csym < (alocation + nsyms)); - *csym++ = &sym->symbols[j]; - } - } + alocation[j] = NULL; + + return nsyms; +} + +long +bfd_mach_o_get_synthetic_symtab (bfd *abfd, + long symcount ATTRIBUTE_UNUSED, + asymbol **syms ATTRIBUTE_UNUSED, + long dynsymcount ATTRIBUTE_UNUSED, + asymbol **dynsyms ATTRIBUTE_UNUSED, + asymbol **ret) +{ + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + bfd_mach_o_dysymtab_command *dysymtab = mdata->dysymtab; + bfd_mach_o_symtab_command *symtab = mdata->symtab; + asymbol *s; + unsigned long count, i, j, n; + size_t size; + char *names; + char *nul_name; + + *ret = NULL; + + if (dysymtab == NULL || symtab == NULL || symtab->symbols == NULL) + return 0; + + if (dysymtab->nindirectsyms == 0) + return 0; + + count = dysymtab->nindirectsyms; + size = count * sizeof (asymbol) + 1; + + for (j = 0; j < count; j++) + { + unsigned int isym = dysymtab->indirect_syms[j]; + + if (isym < symtab->nsyms && symtab->symbols[isym].symbol.name) + size += strlen (symtab->symbols[isym].symbol.name) + sizeof ("$stub"); } - *csym++ = NULL; + s = *ret = (asymbol *) bfd_malloc (size); + if (s == NULL) + return -1; + names = (char *) (s + count); + nul_name = names; + *names++ = 0; + + n = 0; + for (i = 0; i < mdata->nsects; i++) + { + bfd_mach_o_section *sec = mdata->sections[i]; + unsigned int j, first, last; + bfd_mach_o_symtab_command *symtab = mdata->symtab; + bfd_vma addr; + bfd_vma entry_size; + + switch (sec->flags & BFD_MACH_O_SECTION_TYPE_MASK) + { + case BFD_MACH_O_S_NON_LAZY_SYMBOL_POINTERS: + case BFD_MACH_O_S_LAZY_SYMBOL_POINTERS: + case BFD_MACH_O_S_SYMBOL_STUBS: + first = sec->reserved1; + last = first + bfd_mach_o_section_get_nbr_indirect (abfd, sec); + addr = sec->addr; + entry_size = bfd_mach_o_section_get_entry_size (abfd, sec); + for (j = first; j < last; j++) + { + unsigned int isym = dysymtab->indirect_syms[j]; + + s->flags = BSF_GLOBAL | BSF_SYNTHETIC; + s->section = sec->bfdsection; + s->value = addr - sec->addr; + s->udata.p = NULL; + + if (isym < symtab->nsyms + && symtab->symbols[isym].symbol.name) + { + const char *sym = symtab->symbols[isym].symbol.name; + size_t len; + + s->name = names; + len = strlen (sym); + memcpy (names, sym, len); + names += len; + memcpy (names, "$stub", sizeof ("$stub")); + names += sizeof ("$stub"); + } + else + s->name = nul_name; + + addr += entry_size; + s++; + n++; + } + break; + default: + break; + } + } - return nsyms; + return n; } -static void +void bfd_mach_o_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED, asymbol *symbol, symbol_info *ret) @@ -217,17 +488,15 @@ bfd_mach_o_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED, bfd_symbol_info (symbol, ret); } -static void +void bfd_mach_o_print_symbol (bfd *abfd, PTR afile, asymbol *symbol, bfd_print_symbol_type how) { FILE *file = (FILE *) afile; - unsigned char ntype; - unsigned char nsect; - unsigned int ndesc; const char *name; + bfd_mach_o_asymbol *asym = (bfd_mach_o_asymbol *)symbol; switch (how) { @@ -236,13 +505,10 @@ bfd_mach_o_print_symbol (bfd *abfd, break; default: bfd_print_symbol_vandf (abfd, (PTR) file, symbol); - ntype = BFD_MACH_O_SYM_NTYPE (symbol); - nsect = BFD_MACH_O_SYM_NSECT (symbol); - ndesc = BFD_MACH_O_SYM_NDESC (symbol); - if (ntype & BFD_MACH_O_N_STAB) - name = bfd_get_stab_name (ntype); + if (asym->n_type & BFD_MACH_O_N_STAB) + name = bfd_get_stab_name (asym->n_type); else - switch (ntype & BFD_MACH_O_N_TYPE) + switch (asym->n_type & BFD_MACH_O_N_TYPE) { case BFD_MACH_O_N_UNDF: name = "UND"; @@ -265,9 +531,10 @@ bfd_mach_o_print_symbol (bfd *abfd, } if (name == NULL) name = ""; - fprintf (file, " %02x %-6s %02x %04x", ntype, name, nsect, ndesc); - if ((ntype & BFD_MACH_O_N_STAB) == 0 - && (ntype & BFD_MACH_O_N_TYPE) == BFD_MACH_O_N_SECT) + fprintf (file, " %02x %-6s %02x %04x", + asym->n_type, name, asym->n_sect, asym->n_desc); + if ((asym->n_type & BFD_MACH_O_N_STAB) == 0 + && (asym->n_type & BFD_MACH_O_N_TYPE) == BFD_MACH_O_N_SECT) fprintf (file, " %-5s", symbol->section->name); fprintf (file, " %s", symbol->name); } @@ -306,11 +573,11 @@ bfd_mach_o_convert_architecture (bfd_mach_o_cpu_type mtype, case BFD_MACH_O_CPU_TYPE_ALPHA: *type = bfd_arch_alpha; break; case BFD_MACH_O_CPU_TYPE_POWERPC: *type = bfd_arch_powerpc; - *subtype = bfd_mach_ppc; + *subtype = bfd_mach_ppc; break; case BFD_MACH_O_CPU_TYPE_POWERPC_64: *type = bfd_arch_powerpc; - *subtype = bfd_mach_ppc64; + *subtype = bfd_mach_ppc64; break; default: *type = bfd_arch_unknown; @@ -318,13 +585,14 @@ bfd_mach_o_convert_architecture (bfd_mach_o_cpu_type mtype, } } -static int +static bfd_boolean bfd_mach_o_write_header (bfd *abfd, bfd_mach_o_header *header) { unsigned char buf[32]; unsigned int size; - size = (header->version == 2) ? 32 : 28; + size = mach_o_wide_p (header) ? + BFD_MACH_O_HEADER_64_SIZE : BFD_MACH_O_HEADER_SIZE; bfd_h_put_32 (abfd, header->magic, buf + 0); bfd_h_put_32 (abfd, header->cputype, buf + 4); @@ -334,23 +602,23 @@ bfd_mach_o_write_header (bfd *abfd, bfd_mach_o_header *header) bfd_h_put_32 (abfd, header->sizeofcmds, buf + 20); bfd_h_put_32 (abfd, header->flags, buf + 24); - if (header->version == 2) + if (mach_o_wide_p (header)) bfd_h_put_32 (abfd, header->reserved, buf + 28); - bfd_seek (abfd, 0, SEEK_SET); - if (bfd_bwrite ((PTR) buf, size, abfd) != size) - return -1; + if (bfd_seek (abfd, 0, SEEK_SET) != 0 + || bfd_bwrite ((PTR) buf, size, abfd) != size) + return FALSE; - return 0; + return TRUE; } static int -bfd_mach_o_scan_write_thread (bfd *abfd, bfd_mach_o_load_command *command) +bfd_mach_o_write_thread (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_thread_command *cmd = &command->command.thread; unsigned int i; unsigned char buf[8]; - bfd_vma offset; + unsigned int offset; unsigned int nflavours; BFD_ASSERT ((command->type == BFD_MACH_O_LC_THREAD) @@ -366,8 +634,8 @@ bfd_mach_o_scan_write_thread (bfd *abfd, bfd_mach_o_load_command *command) bfd_h_put_32 (abfd, cmd->flavours[i].flavour, buf); bfd_h_put_32 (abfd, (cmd->flavours[i].size / 4), buf + 4); - bfd_seek (abfd, command->offset + offset, SEEK_SET); - if (bfd_bwrite ((PTR) buf, 8, abfd) != 8) + if (bfd_seek (abfd, command->offset + offset, SEEK_SET) != 0 + || bfd_bwrite ((PTR) buf, 8, abfd) != 8) return -1; offset += cmd->flavours[i].size + 8; @@ -376,12 +644,273 @@ bfd_mach_o_scan_write_thread (bfd *abfd, bfd_mach_o_load_command *command) return 0; } +long +bfd_mach_o_get_reloc_upper_bound (bfd *abfd ATTRIBUTE_UNUSED, + asection *asect) +{ + return (asect->reloc_count + 1) * sizeof (arelent *); +} + +static int +bfd_mach_o_canonicalize_one_reloc (bfd *abfd, char *buf, + arelent *res, asymbol **syms) +{ + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + bfd_mach_o_backend_data *bed = bfd_mach_o_get_backend_data (abfd); + bfd_mach_o_reloc_info reloc; + bfd_vma addr; + bfd_vma symnum; + asymbol **sym; + + addr = bfd_get_32 (abfd, buf + 0); + symnum = bfd_get_32 (abfd, buf + 4); + + if (addr & BFD_MACH_O_SR_SCATTERED) + { + unsigned int j; + + /* Scattered relocation. + Extract section and offset from r_value. */ + res->sym_ptr_ptr = NULL; + res->addend = 0; + for (j = 0; j < mdata->nsects; j++) + { + bfd_mach_o_section *sect = mdata->sections[j]; + if (symnum >= sect->addr && symnum < sect->addr + sect->size) + { + res->sym_ptr_ptr = sect->bfdsection->symbol_ptr_ptr; + res->addend = symnum - sect->addr; + break; + } + } + res->address = BFD_MACH_O_GET_SR_ADDRESS (addr); + reloc.r_type = BFD_MACH_O_GET_SR_TYPE (addr); + reloc.r_length = BFD_MACH_O_GET_SR_LENGTH (addr); + reloc.r_pcrel = addr & BFD_MACH_O_SR_PCREL; + reloc.r_scattered = 1; + } + else + { + unsigned int num = BFD_MACH_O_GET_R_SYMBOLNUM (symnum); + res->addend = 0; + res->address = addr; + if (symnum & BFD_MACH_O_R_EXTERN) + sym = syms + num; + else + { + BFD_ASSERT (num != 0); + BFD_ASSERT (num <= mdata->nsects); + sym = mdata->sections[num - 1]->bfdsection->symbol_ptr_ptr; + } + res->sym_ptr_ptr = sym; + reloc.r_type = BFD_MACH_O_GET_R_TYPE (symnum); + reloc.r_length = BFD_MACH_O_GET_R_LENGTH (symnum); + reloc.r_pcrel = (symnum & BFD_MACH_O_R_PCREL) ? 1 : 0; + reloc.r_scattered = 0; + } + + if (!(*bed->_bfd_mach_o_swap_reloc_in)(res, &reloc)) + return -1; + return 0; +} + +static int +bfd_mach_o_canonicalize_relocs (bfd *abfd, unsigned long filepos, + unsigned long count, + arelent *res, asymbol **syms) +{ + unsigned long i; + char *native_relocs; + bfd_size_type native_size; + + /* Allocate and read relocs. */ + native_size = count * BFD_MACH_O_RELENT_SIZE; + native_relocs = bfd_malloc (native_size); + if (native_relocs == NULL) + return -1; + + if (bfd_seek (abfd, filepos, SEEK_SET) != 0 + || bfd_bread (native_relocs, native_size, abfd) != native_size) + goto err; + + for (i = 0; i < count; i++) + { + char *buf = native_relocs + BFD_MACH_O_RELENT_SIZE * i; + + if (bfd_mach_o_canonicalize_one_reloc (abfd, buf, &res[i], syms) < 0) + goto err; + } + free (native_relocs); + return i; + err: + free (native_relocs); + return -1; +} + +long +bfd_mach_o_canonicalize_reloc (bfd *abfd, asection *asect, + arelent **rels, asymbol **syms) +{ + bfd_mach_o_backend_data *bed = bfd_mach_o_get_backend_data (abfd); + unsigned long i; + arelent *res; + + if (asect->reloc_count == 0) + return 0; + + /* No need to go further if we don't know how to read relocs. */ + if (bed->_bfd_mach_o_swap_reloc_in == NULL) + return 0; + + res = bfd_malloc (asect->reloc_count * sizeof (arelent)); + if (res == NULL) + return -1; + + if (bfd_mach_o_canonicalize_relocs (abfd, asect->rel_filepos, + asect->reloc_count, res, syms) < 0) + { + free (res); + return -1; + } + + for (i = 0; i < asect->reloc_count; i++) + rels[i] = &res[i]; + rels[i] = NULL; + asect->relocation = res; + + return i; +} + +long +bfd_mach_o_get_dynamic_reloc_upper_bound (bfd *abfd) +{ + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + + if (mdata->dysymtab == NULL) + return 1; + return (mdata->dysymtab->nextrel + mdata->dysymtab->nlocrel) + * sizeof (arelent *); +} + +long +bfd_mach_o_canonicalize_dynamic_reloc (bfd *abfd, arelent **rels, + struct bfd_symbol **syms) +{ + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + bfd_mach_o_dysymtab_command *dysymtab = mdata->dysymtab; + bfd_mach_o_backend_data *bed = bfd_mach_o_get_backend_data (abfd); + unsigned long i; + arelent *res; + + if (dysymtab == NULL) + return 0; + if (dysymtab->nextrel == 0 && dysymtab->nlocrel == 0) + return 0; + + /* No need to go further if we don't know how to read relocs. */ + if (bed->_bfd_mach_o_swap_reloc_in == NULL) + return 0; + + res = bfd_malloc ((dysymtab->nextrel + dysymtab->nlocrel) * sizeof (arelent)); + if (res == NULL) + return -1; + + if (bfd_mach_o_canonicalize_relocs (abfd, dysymtab->extreloff, + dysymtab->nextrel, res, syms) < 0) + { + free (res); + return -1; + } + + if (bfd_mach_o_canonicalize_relocs (abfd, dysymtab->locreloff, + dysymtab->nlocrel, + res + dysymtab->nextrel, syms) < 0) + { + free (res); + return -1; + } + + for (i = 0; i < dysymtab->nextrel + dysymtab->nlocrel; i++) + rels[i] = &res[i]; + rels[i] = NULL; + return i; +} + +static bfd_boolean +bfd_mach_o_write_relocs (bfd *abfd, bfd_mach_o_section *section) +{ + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + unsigned int i; + arelent **entries; + asection *sec; + bfd_mach_o_backend_data *bed = bfd_mach_o_get_backend_data (abfd); + + sec = section->bfdsection; + if (sec->reloc_count == 0) + return TRUE; + + if (bed->_bfd_mach_o_swap_reloc_out == NULL) + return TRUE; + + /* Allocate relocation room. */ + mdata->filelen = FILE_ALIGN(mdata->filelen, 2); + section->nreloc = sec->reloc_count; + sec->rel_filepos = mdata->filelen; + section->reloff = sec->rel_filepos; + mdata->filelen += sec->reloc_count * BFD_MACH_O_RELENT_SIZE; + + if (bfd_seek (abfd, section->reloff, SEEK_SET) != 0) + return FALSE; + + /* Convert and write. */ + entries = section->bfdsection->orelocation; + for (i = 0; i < section->nreloc; i++) + { + arelent *rel = entries[i]; + char buf[8]; + bfd_mach_o_reloc_info info, *pinfo = &info; + + /* Convert relocation to an intermediate representation. */ + if (!(*bed->_bfd_mach_o_swap_reloc_out) (rel, pinfo)) + return FALSE; + + /* Lower the relocation info. */ + if (pinfo->r_scattered) + { + unsigned long v; + + v = BFD_MACH_O_SR_SCATTERED + | (pinfo->r_pcrel ? BFD_MACH_O_SR_PCREL : 0) + | BFD_MACH_O_SET_SR_LENGTH(pinfo->r_length) + | BFD_MACH_O_SET_SR_TYPE(pinfo->r_type) + | BFD_MACH_O_SET_SR_ADDRESS(pinfo->r_address); + bfd_put_32 (abfd, v, buf); + bfd_put_32 (abfd, pinfo->r_value, buf + 4); + } + else + { + unsigned long v; + + bfd_put_32 (abfd, pinfo->r_address, buf); + v = BFD_MACH_O_SET_R_SYMBOLNUM (pinfo->r_value) + | (pinfo->r_pcrel ? BFD_MACH_O_R_PCREL : 0) + | BFD_MACH_O_SET_R_LENGTH (pinfo->r_length) + | (pinfo->r_extern ? BFD_MACH_O_R_EXTERN : 0) + | BFD_MACH_O_SET_R_TYPE (pinfo->r_type); + bfd_put_32 (abfd, v, buf + 4); + } + + if (bfd_bwrite ((PTR) buf, BFD_MACH_O_RELENT_SIZE, abfd) + != BFD_MACH_O_RELENT_SIZE) + return FALSE; + } + return TRUE; +} + static int -bfd_mach_o_scan_write_section_32 (bfd *abfd, - bfd_mach_o_section *section, - bfd_vma offset) +bfd_mach_o_write_section_32 (bfd *abfd, bfd_mach_o_section *section) { - unsigned char buf[68]; + unsigned char buf[BFD_MACH_O_SECTION_SIZE]; memcpy (buf, section->sectname, 16); memcpy (buf + 16, section->segname, 16); @@ -395,19 +924,17 @@ bfd_mach_o_scan_write_section_32 (bfd *abfd, bfd_h_put_32 (abfd, section->reserved1, buf + 60); bfd_h_put_32 (abfd, section->reserved2, buf + 64); - bfd_seek (abfd, offset, SEEK_SET); - if (bfd_bwrite ((PTR) buf, 68, abfd) != 68) + if (bfd_bwrite ((PTR) buf, BFD_MACH_O_SECTION_SIZE, abfd) + != BFD_MACH_O_SECTION_SIZE) return -1; return 0; } static int -bfd_mach_o_scan_write_section_64 (bfd *abfd, - bfd_mach_o_section *section, - bfd_vma offset) +bfd_mach_o_write_section_64 (bfd *abfd, bfd_mach_o_section *section) { - unsigned char buf[80]; + unsigned char buf[BFD_MACH_O_SECTION_64_SIZE]; memcpy (buf, section->sectname, 16); memcpy (buf + 16, section->segname, 16); @@ -422,205 +949,235 @@ bfd_mach_o_scan_write_section_64 (bfd *abfd, bfd_h_put_32 (abfd, section->reserved2, buf + 72); bfd_h_put_32 (abfd, section->reserved3, buf + 76); - bfd_seek (abfd, offset, SEEK_SET); - if (bfd_bwrite ((PTR) buf, 80, abfd) != 80) + if (bfd_bwrite ((PTR) buf, BFD_MACH_O_SECTION_64_SIZE, abfd) + != BFD_MACH_O_SECTION_64_SIZE) return -1; return 0; } static int -bfd_mach_o_scan_write_section (bfd *abfd, - bfd_mach_o_section *section, - bfd_vma offset, - unsigned int wide) +bfd_mach_o_write_segment_32 (bfd *abfd, bfd_mach_o_load_command *command) { - if (wide) - return bfd_mach_o_scan_write_section_64 (abfd, section, offset); - else - return bfd_mach_o_scan_write_section_32 (abfd, section, offset); -} - -static int -bfd_mach_o_scan_write_segment (bfd *abfd, - bfd_mach_o_load_command *command, - unsigned int wide) -{ - unsigned char buf[64]; + unsigned char buf[BFD_MACH_O_LC_SEGMENT_SIZE]; bfd_mach_o_segment_command *seg = &command->command.segment; unsigned long i; - if (wide) - { - BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT_64); - - memcpy (buf, seg->segname, 16); - - bfd_h_put_64 (abfd, seg->vmaddr, buf + 16); - bfd_h_put_64 (abfd, seg->vmsize, buf + 24); - bfd_h_put_64 (abfd, seg->fileoff, buf + 32); - bfd_h_put_64 (abfd, seg->filesize, buf + 40); - bfd_h_put_32 (abfd, seg->maxprot, buf + 48); - bfd_h_put_32 (abfd, seg->initprot, buf + 52); - bfd_h_put_32 (abfd, seg->nsects, buf + 56); - bfd_h_put_32 (abfd, seg->flags, buf + 60); - - bfd_seek (abfd, command->offset + 8, SEEK_SET); - if (bfd_bwrite ((PTR) buf, 64, abfd) != 64) - return -1; - } - else - { - BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT); - - memcpy (buf, seg->segname, 16); - - bfd_h_put_32 (abfd, seg->vmaddr, buf + 16); - bfd_h_put_32 (abfd, seg->vmsize, buf + 20); - bfd_h_put_32 (abfd, seg->fileoff, buf + 24); - bfd_h_put_32 (abfd, seg->filesize, buf + 28); - bfd_h_put_32 (abfd, seg->maxprot, buf + 32); - bfd_h_put_32 (abfd, seg->initprot, buf + 36); - bfd_h_put_32 (abfd, seg->nsects, buf + 40); - bfd_h_put_32 (abfd, seg->flags, buf + 44); - - bfd_seek (abfd, command->offset + 8, SEEK_SET); - if (bfd_bwrite ((PTR) buf, 48, abfd) != 48) - return -1; - } - - { - char buf[1024]; - bfd_vma nbytes = seg->filesize; - bfd_vma curoff = seg->fileoff; - - while (nbytes > 0) - { - bfd_vma thiswrite = nbytes; - - if (thiswrite > 1024) - thiswrite = 1024; - - bfd_seek (abfd, curoff, SEEK_SET); - if (bfd_bread ((PTR) buf, thiswrite, abfd) != thiswrite) - return -1; - - bfd_seek (abfd, curoff, SEEK_SET); - if (bfd_bwrite ((PTR) buf, thiswrite, abfd) != thiswrite) - return -1; - - nbytes -= thiswrite; - curoff += thiswrite; - } - } + BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT); for (i = 0; i < seg->nsects; i++) - { - bfd_vma segoff; - if (wide) - segoff = command->offset + 64 + 8 + (i * 80); - else - segoff = command->offset + 48 + 8 + (i * 68); - - if (bfd_mach_o_scan_write_section - (abfd, &seg->sections[i], segoff, wide) != 0) - return -1; - } + if (!bfd_mach_o_write_relocs (abfd, &seg->sections[i])) + return -1; - return 0; -} + memcpy (buf, seg->segname, 16); + bfd_h_put_32 (abfd, seg->vmaddr, buf + 16); + bfd_h_put_32 (abfd, seg->vmsize, buf + 20); + bfd_h_put_32 (abfd, seg->fileoff, buf + 24); + bfd_h_put_32 (abfd, seg->filesize, buf + 28); + bfd_h_put_32 (abfd, seg->maxprot, buf + 32); + bfd_h_put_32 (abfd, seg->initprot, buf + 36); + bfd_h_put_32 (abfd, seg->nsects, buf + 40); + bfd_h_put_32 (abfd, seg->flags, buf + 44); + + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || (bfd_bwrite ((PTR) buf, BFD_MACH_O_LC_SEGMENT_SIZE - 8, abfd) + != BFD_MACH_O_LC_SEGMENT_SIZE - 8)) + return -1; -static int -bfd_mach_o_scan_write_segment_32 (bfd *abfd, bfd_mach_o_load_command *command) -{ - return bfd_mach_o_scan_write_segment (abfd, command, 0); -} + for (i = 0; i < seg->nsects; i++) + if (bfd_mach_o_write_section_32 (abfd, &seg->sections[i])) + return -1; -static int -bfd_mach_o_scan_write_segment_64 (bfd *abfd, bfd_mach_o_load_command *command) -{ - return bfd_mach_o_scan_write_segment (abfd, command, 1); + return 0; } static int -bfd_mach_o_scan_write_symtab_symbols (bfd *abfd, bfd_mach_o_load_command *command) +bfd_mach_o_write_segment_64 (bfd *abfd, bfd_mach_o_load_command *command) { - bfd_mach_o_symtab_command *sym = &command->command.symtab; - asymbol *s = NULL; + unsigned char buf[BFD_MACH_O_LC_SEGMENT_64_SIZE]; + bfd_mach_o_segment_command *seg = &command->command.segment; unsigned long i; - for (i = 0; i < sym->nsyms; i++) - { - unsigned char buf[12]; - bfd_vma symoff = sym->symoff + (i * 12); - unsigned char ntype = 0; - unsigned char nsect = 0; - short ndesc = 0; - - s = &sym->symbols[i]; + BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT_64); - /* Instead just set from the stored values. */ - ntype = BFD_MACH_O_SYM_NTYPE (s); - nsect = BFD_MACH_O_SYM_NSECT (s); - ndesc = BFD_MACH_O_SYM_NDESC (s); + for (i = 0; i < seg->nsects; i++) + if (!bfd_mach_o_write_relocs (abfd, &seg->sections[i])) + return -1; - bfd_h_put_32 (abfd, s->name - sym->strtab, buf); - bfd_h_put_8 (abfd, ntype, buf + 4); - bfd_h_put_8 (abfd, nsect, buf + 5); - bfd_h_put_16 (abfd, ndesc, buf + 6); - bfd_h_put_32 (abfd, s->section->vma + s->value, buf + 8); + memcpy (buf, seg->segname, 16); + bfd_h_put_64 (abfd, seg->vmaddr, buf + 16); + bfd_h_put_64 (abfd, seg->vmsize, buf + 24); + bfd_h_put_64 (abfd, seg->fileoff, buf + 32); + bfd_h_put_64 (abfd, seg->filesize, buf + 40); + bfd_h_put_32 (abfd, seg->maxprot, buf + 48); + bfd_h_put_32 (abfd, seg->initprot, buf + 52); + bfd_h_put_32 (abfd, seg->nsects, buf + 56); + bfd_h_put_32 (abfd, seg->flags, buf + 60); + + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || (bfd_bwrite ((PTR) buf, BFD_MACH_O_LC_SEGMENT_64_SIZE - 8, abfd) + != BFD_MACH_O_LC_SEGMENT_64_SIZE - 8)) + return -1; - bfd_seek (abfd, symoff, SEEK_SET); - if (bfd_bwrite ((PTR) buf, 12, abfd) != 12) - { - fprintf (stderr, "bfd_mach_o_scan_write_symtab_symbols: unable to write %d bytes at %lu\n", - 12, (unsigned long) symoff); - return -1; - } - } + for (i = 0; i < seg->nsects; i++) + if (bfd_mach_o_write_section_64 (abfd, &seg->sections[i])) + return -1; return 0; } -static int -bfd_mach_o_scan_write_symtab (bfd *abfd, bfd_mach_o_load_command *command) +static bfd_boolean +bfd_mach_o_write_symtab (bfd *abfd, bfd_mach_o_load_command *command) { - bfd_mach_o_symtab_command *seg = &command->command.symtab; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + bfd_mach_o_symtab_command *sym = &command->command.symtab; unsigned char buf[16]; + unsigned long i; + unsigned int wide = bfd_mach_o_wide_p (abfd); + unsigned int symlen = wide ? BFD_MACH_O_NLIST_64_SIZE : BFD_MACH_O_NLIST_SIZE; + struct bfd_strtab_hash *strtab; + asymbol **symbols = bfd_get_outsymbols (abfd); BFD_ASSERT (command->type == BFD_MACH_O_LC_SYMTAB); - bfd_h_put_32 (abfd, seg->symoff, buf); - bfd_h_put_32 (abfd, seg->nsyms, buf + 4); - bfd_h_put_32 (abfd, seg->stroff, buf + 8); - bfd_h_put_32 (abfd, seg->strsize, buf + 12); + /* Write the symbols first. */ + mdata->filelen = FILE_ALIGN(mdata->filelen, wide ? 3 : 2); + sym->symoff = mdata->filelen; + if (bfd_seek (abfd, sym->symoff, SEEK_SET) != 0) + return FALSE; - bfd_seek (abfd, command->offset + 8, SEEK_SET); - if (bfd_bwrite ((PTR) buf, 16, abfd) != 16) - return -1; + sym->nsyms = bfd_get_symcount (abfd); + mdata->filelen += sym->nsyms * symlen; - if (bfd_mach_o_scan_write_symtab_symbols (abfd, command) != 0) - return -1; + strtab = _bfd_stringtab_init (); + if (strtab == NULL) + return FALSE; - return 0; + for (i = 0; i < sym->nsyms; i++) + { + unsigned char buf[16]; + bfd_size_type index; + bfd_mach_o_asymbol *s = (bfd_mach_o_asymbol *)symbols[i]; + + /* Compute name index. */ + /* An index of 0 always means the empty string. */ + if (s->symbol.name == 0 || s->symbol.name[0] == '\0') + index = 0; + else + { + index = _bfd_stringtab_add (strtab, s->symbol.name, TRUE, FALSE); + if (index == (bfd_size_type) -1) + goto err; + } + bfd_h_put_32 (abfd, index, buf); + bfd_h_put_8 (abfd, s->n_type, buf + 4); + bfd_h_put_8 (abfd, s->n_sect, buf + 5); + bfd_h_put_16 (abfd, s->n_desc, buf + 6); + if (wide) + bfd_h_put_64 (abfd, s->symbol.section->vma + s->symbol.value, buf + 8); + else + bfd_h_put_32 (abfd, s->symbol.section->vma + s->symbol.value, buf + 8); + + if (bfd_bwrite ((PTR) buf, symlen, abfd) != symlen) + goto err; + } + sym->strsize = _bfd_stringtab_size (strtab); + sym->stroff = mdata->filelen; + mdata->filelen += sym->strsize; + + if (_bfd_stringtab_emit (abfd, strtab) != TRUE) + goto err; + _bfd_stringtab_free (strtab); + + /* The command. */ + bfd_h_put_32 (abfd, sym->symoff, buf); + bfd_h_put_32 (abfd, sym->nsyms, buf + 4); + bfd_h_put_32 (abfd, sym->stroff, buf + 8); + bfd_h_put_32 (abfd, sym->strsize, buf + 12); + + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bwrite ((PTR) buf, 16, abfd) != 16) + return FALSE; + + return TRUE; + + err: + _bfd_stringtab_free (strtab); + return FALSE; } +/* Process the symbols and generate Mach-O specific fields. + Number them. */ + static bfd_boolean -bfd_mach_o_write_contents (bfd *abfd) +bfd_mach_o_mangle_symbols (bfd *abfd) { - unsigned int i; - asection *s; + unsigned long i; + asymbol **symbols = bfd_get_outsymbols (abfd); + + for (i = 0; i < bfd_get_symcount (abfd); i++) + { + bfd_mach_o_asymbol *s = (bfd_mach_o_asymbol *)symbols[i]; + + if (s->n_type == BFD_MACH_O_N_UNDF && !(s->symbol.flags & BSF_DEBUGGING)) + { + /* As genuine Mach-O symbols type shouldn't be N_UNDF (undefined + symbols should be N_UNDEF | N_EXT), we suppose the back-end + values haven't been set. */ + if (s->symbol.section == bfd_abs_section_ptr) + s->n_type = BFD_MACH_O_N_ABS; + else if (s->symbol.section == bfd_und_section_ptr) + { + s->n_type = BFD_MACH_O_N_UNDF; + if (s->symbol.flags & BSF_WEAK) + s->n_desc |= BFD_MACH_O_N_WEAK_REF; + } + else if (s->symbol.section == bfd_com_section_ptr) + s->n_type = BFD_MACH_O_N_UNDF | BFD_MACH_O_N_EXT; + else + s->n_type = BFD_MACH_O_N_SECT; + + if (s->symbol.flags & BSF_GLOBAL) + s->n_type |= BFD_MACH_O_N_EXT; + } - bfd_mach_o_data_struct *mdata = abfd->tdata.mach_o_data; + /* Compute section index. */ + if (s->symbol.section != bfd_abs_section_ptr + && s->symbol.section != bfd_und_section_ptr + && s->symbol.section != bfd_com_section_ptr) + s->n_sect = s->symbol.section->target_index; - /* Write data sections first in case they overlap header data to be - written later. */ + /* Number symbols. */ + s->symbol.udata.i = i; + } + return TRUE; +} + +bfd_boolean +bfd_mach_o_write_contents (bfd *abfd) +{ + unsigned int i; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); - for (s = abfd->sections; s != (asection *) NULL; s = s->next) - ; + if (mdata->header.ncmds == 0) + if (!bfd_mach_o_build_commands (abfd)) + return FALSE; /* Now write header information. */ - if (bfd_mach_o_write_header (abfd, &mdata->header) != 0) + if (mdata->header.filetype == 0) + { + if (abfd->flags & EXEC_P) + mdata->header.filetype = BFD_MACH_O_MH_EXECUTE; + else if (abfd->flags & DYNAMIC) + mdata->header.filetype = BFD_MACH_O_MH_DYLIB; + else + mdata->header.filetype = BFD_MACH_O_MH_OBJECT; + } + if (!bfd_mach_o_write_header (abfd, &mdata->header)) + return FALSE; + + /* Assign a number to each symbols. */ + if (!bfd_mach_o_mangle_symbols (abfd)) return FALSE; for (i = 0; i < mdata->header.ncmds; i++) @@ -629,34 +1186,34 @@ bfd_mach_o_write_contents (bfd *abfd) bfd_mach_o_load_command *cur = &mdata->commands[i]; unsigned long typeflag; - typeflag = cur->type_required ? cur->type & BFD_MACH_O_LC_REQ_DYLD : cur->type; + typeflag = cur->type | (cur->type_required ? BFD_MACH_O_LC_REQ_DYLD : 0); bfd_h_put_32 (abfd, typeflag, buf); bfd_h_put_32 (abfd, cur->len, buf + 4); - bfd_seek (abfd, cur->offset, SEEK_SET); - if (bfd_bwrite ((PTR) buf, 8, abfd) != 8) + if (bfd_seek (abfd, cur->offset, SEEK_SET) != 0 + || bfd_bwrite ((PTR) buf, 8, abfd) != 8) return FALSE; switch (cur->type) { case BFD_MACH_O_LC_SEGMENT: - if (bfd_mach_o_scan_write_segment_32 (abfd, cur) != 0) + if (bfd_mach_o_write_segment_32 (abfd, cur) != 0) return FALSE; break; case BFD_MACH_O_LC_SEGMENT_64: - if (bfd_mach_o_scan_write_segment_64 (abfd, cur) != 0) + if (bfd_mach_o_write_segment_64 (abfd, cur) != 0) return FALSE; break; case BFD_MACH_O_LC_SYMTAB: - if (bfd_mach_o_scan_write_symtab (abfd, cur) != 0) + if (!bfd_mach_o_write_symtab (abfd, cur)) return FALSE; break; case BFD_MACH_O_LC_SYMSEG: break; case BFD_MACH_O_LC_THREAD: case BFD_MACH_O_LC_UNIXTHREAD: - if (bfd_mach_o_scan_write_thread (abfd, cur) != 0) + if (bfd_mach_o_write_thread (abfd, cur) != 0) return FALSE; break; case BFD_MACH_O_LC_LOADFVMLIB: @@ -668,6 +1225,7 @@ bfd_mach_o_write_contents (bfd *abfd) case BFD_MACH_O_LC_LOAD_DYLIB: case BFD_MACH_O_LC_LOAD_WEAK_DYLIB: case BFD_MACH_O_LC_ID_DYLIB: + case BFD_MACH_O_LC_REEXPORT_DYLIB: case BFD_MACH_O_LC_LOAD_DYLINKER: case BFD_MACH_O_LC_ID_DYLINKER: case BFD_MACH_O_LC_PREBOUND_DYLIB: @@ -685,7 +1243,142 @@ bfd_mach_o_write_contents (bfd *abfd) return TRUE; } -static int +/* Build Mach-O load commands from the sections. */ + +bfd_boolean +bfd_mach_o_build_commands (bfd *abfd) +{ + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + unsigned int wide = mach_o_wide_p (&mdata->header); + bfd_mach_o_segment_command *seg; + bfd_mach_o_section *sections; + asection *sec; + bfd_mach_o_load_command *cmd; + bfd_mach_o_load_command *symtab_cmd; + int target_index; + + /* Return now if commands are already built. */ + if (mdata->header.ncmds) + return FALSE; + + /* Very simple version: 1 command (segment) containing all sections. */ + mdata->header.ncmds = 2; + mdata->commands = bfd_alloc (abfd, mdata->header.ncmds + * sizeof (bfd_mach_o_load_command)); + if (mdata->commands == NULL) + return FALSE; + cmd = &mdata->commands[0]; + seg = &cmd->command.segment; + + seg->nsects = bfd_count_sections (abfd); + sections = bfd_alloc (abfd, seg->nsects * sizeof (bfd_mach_o_section)); + if (sections == NULL) + return FALSE; + seg->sections = sections; + + /* Set segment command. */ + if (wide) + { + cmd->type = BFD_MACH_O_LC_SEGMENT_64; + cmd->offset = BFD_MACH_O_HEADER_64_SIZE; + cmd->len = BFD_MACH_O_LC_SEGMENT_64_SIZE + + BFD_MACH_O_SECTION_64_SIZE * seg->nsects; + } + else + { + cmd->type = BFD_MACH_O_LC_SEGMENT; + cmd->offset = BFD_MACH_O_HEADER_SIZE; + cmd->len = BFD_MACH_O_LC_SEGMENT_SIZE + + BFD_MACH_O_SECTION_SIZE * seg->nsects; + } + cmd->type_required = FALSE; + mdata->header.sizeofcmds = cmd->len; + mdata->filelen = cmd->offset + cmd->len; + + /* Set symtab command. */ + symtab_cmd = &mdata->commands[1]; + + symtab_cmd->type = BFD_MACH_O_LC_SYMTAB; + symtab_cmd->offset = cmd->offset + cmd->len; + symtab_cmd->len = 6 * 4; + symtab_cmd->type_required = FALSE; + + mdata->header.sizeofcmds += symtab_cmd->len; + mdata->filelen += symtab_cmd->len; + + /* Fill segment command. */ + memset (seg->segname, 0, sizeof (seg->segname)); + seg->vmaddr = 0; + seg->fileoff = mdata->filelen; + seg->filesize = 0; + seg->maxprot = BFD_MACH_O_PROT_READ | BFD_MACH_O_PROT_WRITE + | BFD_MACH_O_PROT_EXECUTE; + seg->initprot = seg->maxprot; + seg->flags = 0; + + /* Create Mach-O sections. */ + target_index = 0; + for (sec = abfd->sections; sec; sec = sec->next) + { + sections->bfdsection = sec; + bfd_mach_o_convert_section_name_to_mach_o (abfd, sec, sections); + sections->addr = bfd_get_section_vma (abfd, sec); + sections->size = bfd_get_section_size (sec); + sections->align = bfd_get_section_alignment (abfd, sec); + + if (sections->size != 0) + { + mdata->filelen = FILE_ALIGN (mdata->filelen, sections->align); + sections->offset = mdata->filelen; + } + else + sections->offset = 0; + sections->reloff = 0; + sections->nreloc = 0; + sections->reserved1 = 0; + sections->reserved2 = 0; + sections->reserved3 = 0; + + sec->filepos = sections->offset; + sec->target_index = ++target_index; + + mdata->filelen += sections->size; + sections++; + } + seg->filesize = mdata->filelen - seg->fileoff; + seg->vmsize = seg->filesize; + + return TRUE; +} + +/* Set the contents of a section. */ + +bfd_boolean +bfd_mach_o_set_section_contents (bfd *abfd, + asection *section, + const void * location, + file_ptr offset, + bfd_size_type count) +{ + file_ptr pos; + + /* This must be done first, because bfd_set_section_contents is + going to set output_has_begun to TRUE. */ + if (! abfd->output_has_begun && ! bfd_mach_o_build_commands (abfd)) + return FALSE; + + if (count == 0) + return TRUE; + + pos = section->filepos + offset; + if (bfd_seek (abfd, pos, SEEK_SET) != 0 + || bfd_bwrite (location, count, abfd) != count) + return FALSE; + + return TRUE; +} + +int bfd_mach_o_sizeof_headers (bfd *a ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED) { @@ -695,71 +1388,72 @@ bfd_mach_o_sizeof_headers (bfd *a ATTRIBUTE_UNUSED, /* Make an empty symbol. This is required only because bfd_make_section_anyway wants to create a symbol for the section. */ -static asymbol * +asymbol * bfd_mach_o_make_empty_symbol (bfd *abfd) { - asymbol *new; + asymbol *new_symbol; - new = bfd_zalloc (abfd, sizeof (* new)); - if (new == NULL) - return new; - new->the_bfd = abfd; - return new; + new_symbol = bfd_zalloc (abfd, sizeof (bfd_mach_o_asymbol)); + if (new_symbol == NULL) + return new_symbol; + new_symbol->the_bfd = abfd; + new_symbol->udata.i = 0; + return new_symbol; } -static int +static bfd_boolean bfd_mach_o_read_header (bfd *abfd, bfd_mach_o_header *header) { unsigned char buf[32]; unsigned int size; bfd_vma (*get32) (const void *) = NULL; - bfd_seek (abfd, 0, SEEK_SET); - /* Just read the magic number. */ - if (bfd_bread ((PTR) buf, 4, abfd) != 4) - return -1; + if (bfd_seek (abfd, 0, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 4, abfd) != 4) + return FALSE; - if (bfd_getb32 (buf) == 0xfeedface) + if (bfd_getb32 (buf) == BFD_MACH_O_MH_MAGIC) { header->byteorder = BFD_ENDIAN_BIG; - header->magic = 0xfeedface; + header->magic = BFD_MACH_O_MH_MAGIC; header->version = 1; get32 = bfd_getb32; } - else if (bfd_getl32 (buf) == 0xfeedface) + else if (bfd_getl32 (buf) == BFD_MACH_O_MH_MAGIC) { header->byteorder = BFD_ENDIAN_LITTLE; - header->magic = 0xfeedface; + header->magic = BFD_MACH_O_MH_MAGIC; header->version = 1; get32 = bfd_getl32; } - else if (bfd_getb32 (buf) == 0xfeedfacf) + else if (bfd_getb32 (buf) == BFD_MACH_O_MH_MAGIC_64) { header->byteorder = BFD_ENDIAN_BIG; - header->magic = 0xfeedfacf; + header->magic = BFD_MACH_O_MH_MAGIC_64; header->version = 2; get32 = bfd_getb32; } - else if (bfd_getl32 (buf) == 0xfeedfacf) + else if (bfd_getl32 (buf) == BFD_MACH_O_MH_MAGIC_64) { header->byteorder = BFD_ENDIAN_LITTLE; - header->magic = 0xfeedfacf; + header->magic = BFD_MACH_O_MH_MAGIC_64; header->version = 2; get32 = bfd_getl32; } else { header->byteorder = BFD_ENDIAN_UNKNOWN; - return -1; + return FALSE; } /* Once the size of the header is known, read the full header. */ - size = (header->version == 2) ? 32 : 28; + size = mach_o_wide_p (header) ? + BFD_MACH_O_HEADER_64_SIZE : BFD_MACH_O_HEADER_SIZE; - bfd_seek (abfd, 0, SEEK_SET); - if (bfd_bread ((PTR) buf, size, abfd) != size) - return -1; + if (bfd_seek (abfd, 0, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, size, abfd) != size) + return FALSE; header->cputype = (*get32) (buf + 4); header->cpusubtype = (*get32) (buf + 8); @@ -768,10 +1462,10 @@ bfd_mach_o_read_header (bfd *abfd, bfd_mach_o_header *header) header->sizeofcmds = (*get32) (buf + 20); header->flags = (*get32) (buf + 24); - if (header->version == 2) + if (mach_o_wide_p (header)) header->reserved = (*get32) (buf + 28); - return 0; + return TRUE; } static asection * @@ -780,41 +1474,12 @@ bfd_mach_o_make_bfd_section (bfd *abfd, bfd_mach_o_section *section, { asection *bfdsec; char *sname; - const char *prefix = "LC_SEGMENT"; - unsigned int snamelen; flagword flags; - snamelen = strlen (prefix) + 1 - + strlen (section->segname) + 1 - + strlen (section->sectname) + 1; - - sname = bfd_alloc (abfd, snamelen); + sname = bfd_mach_o_convert_section_name_to_bfd (abfd, section); if (sname == NULL) return NULL; - /* Use canonical dwarf section names for dwarf sections. */ - if (strcmp (section->segname, "__DWARF") == 0 - && strncmp (section->sectname, "__", 2) == 0) - sprintf (sname, ".%s", section->sectname + 2); - else if (strcmp (section->segname, "__TEXT") == 0) - { - if (strcmp (section->sectname, "__eh_frame") == 0) - strcpy (sname, ".eh_frame"); - else if (section->sectname[0]) - sprintf (sname, "%s.%s", section->segname, section->sectname); - else - strcpy (sname, section->segname); - } - else if (strcmp (section->segname, "__DATA") == 0) - { - if (section->sectname[0]) - sprintf (sname, "%s.%s", section->segname, section->sectname); - else - strcpy (sname, section->segname); - } - else - sprintf (sname, "%s.%s.%s", prefix, section->segname, section->sectname); - if (section->flags & BFD_MACH_O_S_ATTR_DEBUG) flags = SEC_HAS_CONTENTS | SEC_DEBUGGING; else @@ -832,6 +1497,9 @@ bfd_mach_o_make_bfd_section (bfd *abfd, bfd_mach_o_section *section, flags |= SEC_READONLY; } } + if (section->nreloc != 0) + flags |= SEC_RELOC; + bfdsec = bfd_make_section_anyway_with_flags (abfd, sname, flags); if (bfdsec == NULL) return NULL; @@ -842,20 +1510,23 @@ bfd_mach_o_make_bfd_section (bfd *abfd, bfd_mach_o_section *section, bfdsec->filepos = section->offset; bfdsec->alignment_power = section->align; bfdsec->segment_mark = 0; + bfdsec->reloc_count = section->nreloc; + bfdsec->rel_filepos = section->reloff; return bfdsec; } static int -bfd_mach_o_scan_read_section_32 (bfd *abfd, - bfd_mach_o_section *section, - bfd_vma offset, - unsigned long prot) +bfd_mach_o_read_section_32 (bfd *abfd, + bfd_mach_o_section *section, + unsigned int offset, + unsigned long prot) { - unsigned char buf[68]; + unsigned char buf[BFD_MACH_O_SECTION_SIZE]; - bfd_seek (abfd, offset, SEEK_SET); - if (bfd_bread ((PTR) buf, 68, abfd) != 68) + if (bfd_seek (abfd, offset, SEEK_SET) != 0 + || (bfd_bread ((PTR) buf, BFD_MACH_O_SECTION_SIZE, abfd) + != BFD_MACH_O_SECTION_SIZE)) return -1; memcpy (section->sectname, buf, 16); @@ -881,15 +1552,16 @@ bfd_mach_o_scan_read_section_32 (bfd *abfd, } static int -bfd_mach_o_scan_read_section_64 (bfd *abfd, - bfd_mach_o_section *section, - bfd_vma offset, - unsigned long prot) +bfd_mach_o_read_section_64 (bfd *abfd, + bfd_mach_o_section *section, + unsigned int offset, + unsigned long prot) { - unsigned char buf[80]; + unsigned char buf[BFD_MACH_O_SECTION_64_SIZE]; - bfd_seek (abfd, offset, SEEK_SET); - if (bfd_bread ((PTR) buf, 80, abfd) != 80) + if (bfd_seek (abfd, offset, SEEK_SET) != 0 + || (bfd_bread ((PTR) buf, BFD_MACH_O_SECTION_64_SIZE, abfd) + != BFD_MACH_O_SECTION_64_SIZE)) return -1; memcpy (section->sectname, buf, 16); @@ -915,28 +1587,29 @@ bfd_mach_o_scan_read_section_64 (bfd *abfd, } static int -bfd_mach_o_scan_read_section (bfd *abfd, - bfd_mach_o_section *section, - bfd_vma offset, - unsigned long prot, - unsigned int wide) +bfd_mach_o_read_section (bfd *abfd, + bfd_mach_o_section *section, + unsigned int offset, + unsigned long prot, + unsigned int wide) { if (wide) - return bfd_mach_o_scan_read_section_64 (abfd, section, offset, prot); + return bfd_mach_o_read_section_64 (abfd, section, offset, prot); else - return bfd_mach_o_scan_read_section_32 (abfd, section, offset, prot); + return bfd_mach_o_read_section_32 (abfd, section, offset, prot); } -int -bfd_mach_o_scan_read_symtab_symbol (bfd *abfd, - bfd_mach_o_symtab_command *sym, - asymbol *s, - unsigned long i) -{ - bfd_mach_o_data_struct *mdata = abfd->tdata.mach_o_data; - unsigned int wide = (mdata->header.version == 2); - unsigned int symwidth = wide ? 16 : 12; - bfd_vma symoff = sym->symoff + (i * symwidth); +static int +bfd_mach_o_read_symtab_symbol (bfd *abfd, + bfd_mach_o_symtab_command *sym, + bfd_mach_o_asymbol *s, + unsigned long i) +{ + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + unsigned int wide = mach_o_wide_p (&mdata->header); + unsigned int symwidth = + wide ? BFD_MACH_O_NLIST_64_SIZE : BFD_MACH_O_NLIST_SIZE; + unsigned int symoff = sym->symoff + (i * symwidth); unsigned char buf[16]; unsigned char type = -1; unsigned char section = -1; @@ -947,17 +1620,17 @@ bfd_mach_o_scan_read_symtab_symbol (bfd *abfd, BFD_ASSERT (sym->strtab != NULL); - bfd_seek (abfd, symoff, SEEK_SET); - if (bfd_bread ((PTR) buf, symwidth, abfd) != symwidth) + if (bfd_seek (abfd, symoff, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, symwidth, abfd) != symwidth) { - fprintf (stderr, "bfd_mach_o_scan_read_symtab_symbol: unable to read %d bytes at %lu\n", + fprintf (stderr, "bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu\n", symwidth, (unsigned long) symoff); return -1; } stroff = bfd_h_get_32 (abfd, buf); type = bfd_h_get_8 (abfd, buf + 4); - symtype = (type & 0x0e); + symtype = type & BFD_MACH_O_N_TYPE; section = bfd_h_get_8 (abfd, buf + 5); desc = bfd_h_get_16 (abfd, buf + 6); if (wide) @@ -967,21 +1640,24 @@ bfd_mach_o_scan_read_symtab_symbol (bfd *abfd, if (stroff >= sym->strsize) { - fprintf (stderr, "bfd_mach_o_scan_read_symtab_symbol: symbol name out of range (%lu >= %lu)\n", + fprintf (stderr, "bfd_mach_o_read_symtab_symbol: symbol name out of range (%lu >= %lu)\n", (unsigned long) stroff, (unsigned long) sym->strsize); return -1; } - s->the_bfd = abfd; - s->name = sym->strtab + stroff; - s->value = value; - s->udata.i = (type << 24) | (section << 16) | desc; - s->flags = 0x0; + s->symbol.the_bfd = abfd; + s->symbol.name = sym->strtab + stroff; + s->symbol.value = value; + s->symbol.flags = 0x0; + s->symbol.udata.i = 0; + s->n_type = type; + s->n_sect = section; + s->n_desc = desc; if (type & BFD_MACH_O_N_STAB) { - s->flags |= BSF_DEBUGGING; - s->section = bfd_und_section_ptr; + s->symbol.flags |= BSF_DEBUGGING; + s->symbol.section = bfd_und_section_ptr; switch (type) { case N_FUN: @@ -995,8 +1671,9 @@ bfd_mach_o_scan_read_symtab_symbol (bfd *abfd, case N_GSYM: if ((section > 0) && (section <= mdata->nsects)) { - s->section = mdata->sections[section - 1]->bfdsection; - s->value = s->value - mdata->sections[section - 1]->addr; + s->symbol.section = mdata->sections[section - 1]->bfdsection; + s->symbol.value = + s->symbol.value - mdata->sections[section - 1]->addr; } break; } @@ -1004,54 +1681,67 @@ bfd_mach_o_scan_read_symtab_symbol (bfd *abfd, else { if (type & BFD_MACH_O_N_PEXT) - s->flags |= BSF_GLOBAL; - + s->symbol.flags |= BSF_GLOBAL; + if (type & BFD_MACH_O_N_EXT) - s->flags |= BSF_GLOBAL; + s->symbol.flags |= BSF_GLOBAL; if (!(type & (BFD_MACH_O_N_PEXT | BFD_MACH_O_N_EXT))) - s->flags |= BSF_LOCAL; + s->symbol.flags |= BSF_LOCAL; switch (symtype) { case BFD_MACH_O_N_UNDF: - s->section = bfd_und_section_ptr; + if (type == (BFD_MACH_O_N_UNDF | BFD_MACH_O_N_EXT) + && s->symbol.value != 0) + { + /* A common symbol. */ + s->symbol.section = bfd_com_section_ptr; + s->symbol.flags = BSF_NO_FLAGS; + } + else + { + s->symbol.section = bfd_und_section_ptr; + if (s->n_desc & BFD_MACH_O_N_WEAK_REF) + s->symbol.flags |= BSF_WEAK; + } break; case BFD_MACH_O_N_PBUD: - s->section = bfd_und_section_ptr; + s->symbol.section = bfd_und_section_ptr; break; case BFD_MACH_O_N_ABS: - s->section = bfd_abs_section_ptr; + s->symbol.section = bfd_abs_section_ptr; break; case BFD_MACH_O_N_SECT: if ((section > 0) && (section <= mdata->nsects)) { - s->section = mdata->sections[section - 1]->bfdsection; - s->value = s->value - mdata->sections[section - 1]->addr; + s->symbol.section = mdata->sections[section - 1]->bfdsection; + s->symbol.value = + s->symbol.value - mdata->sections[section - 1]->addr; } else { /* Mach-O uses 0 to mean "no section"; not an error. */ if (section != 0) { - fprintf (stderr, "bfd_mach_o_scan_read_symtab_symbol: " + fprintf (stderr, "bfd_mach_o_read_symtab_symbol: " "symbol \"%s\" specified invalid section %d (max %lu): setting to undefined\n", - s->name, section, mdata->nsects); + s->symbol.name, section, mdata->nsects); } - s->section = bfd_und_section_ptr; + s->symbol.section = bfd_und_section_ptr; } break; case BFD_MACH_O_N_INDR: - fprintf (stderr, "bfd_mach_o_scan_read_symtab_symbol: " + fprintf (stderr, "bfd_mach_o_read_symtab_symbol: " "symbol \"%s\" is unsupported 'indirect' reference: setting to undefined\n", - s->name); - s->section = bfd_und_section_ptr; + s->symbol.name); + s->symbol.section = bfd_und_section_ptr; break; default: - fprintf (stderr, "bfd_mach_o_scan_read_symtab_symbol: " + fprintf (stderr, "bfd_mach_o_read_symtab_symbol: " "symbol \"%s\" specified invalid type field 0x%x: setting to undefined\n", - s->name, symtype); - s->section = bfd_und_section_ptr; + s->symbol.name, symtype); + s->symbol.section = bfd_und_section_ptr; break; } } @@ -1059,11 +1749,19 @@ bfd_mach_o_scan_read_symtab_symbol (bfd *abfd, return 0; } -int -bfd_mach_o_scan_read_symtab_strtab (bfd *abfd, - bfd_mach_o_symtab_command *sym) +static int +bfd_mach_o_read_symtab_strtab (bfd *abfd) { - BFD_ASSERT (sym->strtab == NULL); + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + bfd_mach_o_symtab_command *sym = mdata->symtab; + + /* Fail if there is no symtab. */ + if (sym == NULL) + return -1; + + /* Success if already loaded. */ + if (sym->strtab) + return 0; if (abfd->flags & BFD_IN_MEMORY) { @@ -1077,47 +1775,50 @@ bfd_mach_o_scan_read_symtab_strtab (bfd *abfd, return -1; } sym->strtab = (char *) b->buffer + sym->stroff; - return 0; } - - sym->strtab = bfd_alloc (abfd, sym->strsize); - if (sym->strtab == NULL) - return -1; - - bfd_seek (abfd, sym->stroff, SEEK_SET); - if (bfd_bread ((PTR) sym->strtab, sym->strsize, abfd) != sym->strsize) + else { - fprintf (stderr, "bfd_mach_o_scan_read_symtab_strtab: unable to read %lu bytes at %lu\n", - sym->strsize, sym->stroff); - return -1; + sym->strtab = bfd_alloc (abfd, sym->strsize); + if (sym->strtab == NULL) + return -1; + + if (bfd_seek (abfd, sym->stroff, SEEK_SET) != 0 + || bfd_bread ((PTR) sym->strtab, sym->strsize, abfd) != sym->strsize) + { + bfd_set_error (bfd_error_file_truncated); + return -1; + } } return 0; } -int -bfd_mach_o_scan_read_symtab_symbols (bfd *abfd, - bfd_mach_o_symtab_command *sym) +static int +bfd_mach_o_read_symtab_symbols (bfd *abfd) { + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + bfd_mach_o_symtab_command *sym = mdata->symtab; unsigned long i; int ret; - BFD_ASSERT (sym->symbols == NULL); - sym->symbols = bfd_alloc (abfd, sym->nsyms * sizeof (asymbol)); + if (sym->symbols) + return 0; + + sym->symbols = bfd_alloc (abfd, sym->nsyms * sizeof (bfd_mach_o_asymbol)); if (sym->symbols == NULL) { - fprintf (stderr, "bfd_mach_o_scan_read_symtab_symbols: unable to allocate memory for symbols\n"); + fprintf (stderr, "bfd_mach_o_read_symtab_symbols: unable to allocate memory for symbols\n"); return -1; } - ret = bfd_mach_o_scan_read_symtab_strtab (abfd, sym); + ret = bfd_mach_o_read_symtab_strtab (abfd); if (ret != 0) return ret; for (i = 0; i < sym->nsyms; i++) { - ret = bfd_mach_o_scan_read_symtab_symbol (abfd, sym, &sym->symbols[i], i); + ret = bfd_mach_o_read_symtab_symbol (abfd, sym, &sym->symbols[i], i); if (ret != 0) return ret; } @@ -1126,11 +1827,11 @@ bfd_mach_o_scan_read_symtab_symbols (bfd *abfd, } int -bfd_mach_o_scan_read_dysymtab_symbol (bfd *abfd, - bfd_mach_o_dysymtab_command *dysym, - bfd_mach_o_symtab_command *sym, - asymbol *s, - unsigned long i) +bfd_mach_o_read_dysymtab_symbol (bfd *abfd, + bfd_mach_o_dysymtab_command *dysym, + bfd_mach_o_symtab_command *sym, + bfd_mach_o_asymbol *s, + unsigned long i) { unsigned long isymoff = dysym->indirectsymoff + (i * 4); unsigned long symindex; @@ -1138,16 +1839,16 @@ bfd_mach_o_scan_read_dysymtab_symbol (bfd *abfd, BFD_ASSERT (i < dysym->nindirectsyms); - bfd_seek (abfd, isymoff, SEEK_SET); - if (bfd_bread ((PTR) buf, 4, abfd) != 4) + if (bfd_seek (abfd, isymoff, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 4, abfd) != 4) { - fprintf (stderr, "bfd_mach_o_scan_read_dysymtab_symbol: unable to read %lu bytes at %lu\n", + fprintf (stderr, "bfd_mach_o_read_dysymtab_symbol: unable to read %lu bytes at %lu\n", (unsigned long) 4, isymoff); return -1; } symindex = bfd_h_get_32 (abfd, buf); - return bfd_mach_o_scan_read_symtab_symbol (abfd, sym, s, symindex); + return bfd_mach_o_read_symtab_symbol (abfd, sym, s, symindex); } static const char * @@ -1167,7 +1868,7 @@ bfd_mach_o_i386_flavour_string (unsigned int flavour) case BFD_MACH_O_x86_DEBUG_STATE32: return "x86_DEBUG_STATE32"; case BFD_MACH_O_x86_DEBUG_STATE64: return "x86_DEBUG_STATE64"; case BFD_MACH_O_x86_DEBUG_STATE: return "x86_DEBUG_STATE"; - case BFD_MACH_O_THREAD_STATE_NONE: return "THREAD_STATE_NONE"; + case BFD_MACH_O_x86_THREAD_STATE_NONE: return "x86_THREAD_STATE_NONE"; default: return "UNKNOWN"; } } @@ -1177,80 +1878,64 @@ bfd_mach_o_ppc_flavour_string (unsigned int flavour) { switch ((int) flavour) { - case BFD_MACH_O_PPC_THREAD_STATE: return "PPC_THREAD_STATE"; - case BFD_MACH_O_PPC_FLOAT_STATE: return "PPC_FLOAT_STATE"; - case BFD_MACH_O_PPC_EXCEPTION_STATE: return "PPC_EXCEPTION_STATE"; - case BFD_MACH_O_PPC_VECTOR_STATE: return "PPC_VECTOR_STATE"; + case BFD_MACH_O_PPC_THREAD_STATE: return "PPC_THREAD_STATE"; + case BFD_MACH_O_PPC_FLOAT_STATE: return "PPC_FLOAT_STATE"; + case BFD_MACH_O_PPC_EXCEPTION_STATE: return "PPC_EXCEPTION_STATE"; + case BFD_MACH_O_PPC_VECTOR_STATE: return "PPC_VECTOR_STATE"; + case BFD_MACH_O_PPC_THREAD_STATE64: return "PPC_THREAD_STATE64"; + case BFD_MACH_O_PPC_EXCEPTION_STATE64: return "PPC_EXCEPTION_STATE64"; default: return "UNKNOWN"; } } static int -bfd_mach_o_scan_read_dylinker (bfd *abfd, - bfd_mach_o_load_command *command) +bfd_mach_o_read_dylinker (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_dylinker_command *cmd = &command->command.dylinker; unsigned char buf[4]; unsigned int nameoff; - asection *bfdsec; - char *sname; - const char *prefix; BFD_ASSERT ((command->type == BFD_MACH_O_LC_ID_DYLINKER) || (command->type == BFD_MACH_O_LC_LOAD_DYLINKER)); - bfd_seek (abfd, command->offset + 8, SEEK_SET); - if (bfd_bread ((PTR) buf, 4, abfd) != 4) + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 4, abfd) != 4) return -1; nameoff = bfd_h_get_32 (abfd, buf + 0); cmd->name_offset = command->offset + nameoff; cmd->name_len = command->len - nameoff; - - if (command->type == BFD_MACH_O_LC_LOAD_DYLINKER) - prefix = "LC_LOAD_DYLINKER"; - else if (command->type == BFD_MACH_O_LC_ID_DYLINKER) - prefix = "LC_ID_DYLINKER"; - else - abort (); - - sname = bfd_alloc (abfd, strlen (prefix) + 1); - if (sname == NULL) + cmd->name_str = bfd_alloc (abfd, cmd->name_len); + if (cmd->name_str == NULL) return -1; - strcpy (sname, prefix); - - bfdsec = bfd_make_section_anyway_with_flags (abfd, sname, SEC_HAS_CONTENTS); - if (bfdsec == NULL) + if (bfd_seek (abfd, cmd->name_offset, SEEK_SET) != 0 + || bfd_bread (cmd->name_str, cmd->name_len, abfd) != cmd->name_len) return -1; - - bfdsec->vma = 0; - bfdsec->lma = 0; - bfdsec->size = command->len - nameoff; - bfdsec->filepos = command->offset + nameoff; - bfdsec->alignment_power = 0; - - cmd->section = bfdsec; - return 0; } static int -bfd_mach_o_scan_read_dylib (bfd *abfd, bfd_mach_o_load_command *command) +bfd_mach_o_read_dylib (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_dylib_command *cmd = &command->command.dylib; unsigned char buf[16]; unsigned int nameoff; - asection *bfdsec; - char *sname; - const char *prefix; - BFD_ASSERT ((command->type == BFD_MACH_O_LC_ID_DYLIB) - || (command->type == BFD_MACH_O_LC_LOAD_DYLIB) - || (command->type == BFD_MACH_O_LC_LOAD_WEAK_DYLIB)); + switch (command->type) + { + case BFD_MACH_O_LC_LOAD_DYLIB: + case BFD_MACH_O_LC_LOAD_WEAK_DYLIB: + case BFD_MACH_O_LC_ID_DYLIB: + case BFD_MACH_O_LC_REEXPORT_DYLIB: + break; + default: + BFD_FAIL (); + return -1; + } - bfd_seek (abfd, command->offset + 8, SEEK_SET); - if (bfd_bread ((PTR) buf, 16, abfd) != 16) + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 16, abfd) != 16) return -1; nameoff = bfd_h_get_32 (abfd, buf + 0); @@ -1260,39 +1945,18 @@ bfd_mach_o_scan_read_dylib (bfd *abfd, bfd_mach_o_load_command *command) cmd->name_offset = command->offset + nameoff; cmd->name_len = command->len - nameoff; - - if (command->type == BFD_MACH_O_LC_LOAD_DYLIB) - prefix = "LC_LOAD_DYLIB"; - else if (command->type == BFD_MACH_O_LC_LOAD_WEAK_DYLIB) - prefix = "LC_LOAD_WEAK_DYLIB"; - else if (command->type == BFD_MACH_O_LC_ID_DYLIB) - prefix = "LC_ID_DYLIB"; - else - abort (); - - sname = bfd_alloc (abfd, strlen (prefix) + 1); - if (sname == NULL) + cmd->name_str = bfd_alloc (abfd, cmd->name_len); + if (cmd->name_str == NULL) return -1; - strcpy (sname, prefix); - - bfdsec = bfd_make_section_anyway_with_flags (abfd, sname, SEC_HAS_CONTENTS); - if (bfdsec == NULL) + if (bfd_seek (abfd, cmd->name_offset, SEEK_SET) != 0 + || bfd_bread (cmd->name_str, cmd->name_len, abfd) != cmd->name_len) return -1; - - bfdsec->vma = 0; - bfdsec->lma = 0; - bfdsec->size = command->len - 8; - bfdsec->filepos = command->offset + 8; - bfdsec->alignment_power = 0; - - cmd->section = bfdsec; - return 0; } static int -bfd_mach_o_scan_read_prebound_dylib (bfd *abfd ATTRIBUTE_UNUSED, - bfd_mach_o_load_command *command ATTRIBUTE_UNUSED) +bfd_mach_o_read_prebound_dylib (bfd *abfd ATTRIBUTE_UNUSED, + bfd_mach_o_load_command *command ATTRIBUTE_UNUSED) { /* bfd_mach_o_prebound_dylib_command *cmd = &command->command.prebound_dylib; */ @@ -1301,21 +1965,19 @@ bfd_mach_o_scan_read_prebound_dylib (bfd *abfd ATTRIBUTE_UNUSED, } static int -bfd_mach_o_scan_read_thread (bfd *abfd, bfd_mach_o_load_command *command) +bfd_mach_o_read_thread (bfd *abfd, bfd_mach_o_load_command *command) { - bfd_mach_o_data_struct *mdata = NULL; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); bfd_mach_o_thread_command *cmd = &command->command.thread; unsigned char buf[8]; - bfd_vma offset; + unsigned int offset; unsigned int nflavours; unsigned int i; BFD_ASSERT ((command->type == BFD_MACH_O_LC_THREAD) || (command->type == BFD_MACH_O_LC_UNIXTHREAD)); - BFD_ASSERT (bfd_mach_o_valid (abfd)); - mdata = abfd->tdata.mach_o_data; - + /* Count the number of threads. */ offset = 8; nflavours = 0; while (offset != command->len) @@ -1323,16 +1985,17 @@ bfd_mach_o_scan_read_thread (bfd *abfd, bfd_mach_o_load_command *command) if (offset >= command->len) return -1; - bfd_seek (abfd, command->offset + offset, SEEK_SET); - - if (bfd_bread ((PTR) buf, 8, abfd) != 8) + if (bfd_seek (abfd, command->offset + offset, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 8, abfd) != 8) return -1; offset += 8 + bfd_h_get_32 (abfd, buf + 4) * 4; nflavours++; } - cmd->flavours = bfd_alloc (abfd, nflavours * sizeof (bfd_mach_o_thread_flavour)); + /* Allocate threads. */ + cmd->flavours = bfd_alloc + (abfd, nflavours * sizeof (bfd_mach_o_thread_flavour)); if (cmd->flavours == NULL) return -1; cmd->nflavours = nflavours; @@ -1347,9 +2010,8 @@ bfd_mach_o_scan_read_thread (bfd *abfd, bfd_mach_o_load_command *command) if (nflavours >= cmd->nflavours) return -1; - bfd_seek (abfd, command->offset + offset, SEEK_SET); - - if (bfd_bread ((PTR) buf, 8, abfd) != 8) + if (bfd_seek (abfd, command->offset + offset, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 8, abfd) != 8) return -1; cmd->flavours[nflavours].flavour = bfd_h_get_32 (abfd, buf); @@ -1411,105 +2073,212 @@ bfd_mach_o_scan_read_thread (bfd *abfd, bfd_mach_o_load_command *command) } static int -bfd_mach_o_scan_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) +bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) { - bfd_mach_o_dysymtab_command *seg = &command->command.dysymtab; + bfd_mach_o_dysymtab_command *cmd = &command->command.dysymtab; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); unsigned char buf[72]; BFD_ASSERT (command->type == BFD_MACH_O_LC_DYSYMTAB); - bfd_seek (abfd, command->offset + 8, SEEK_SET); - if (bfd_bread ((PTR) buf, 72, abfd) != 72) + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 72, abfd) != 72) return -1; - seg->ilocalsym = bfd_h_get_32 (abfd, buf + 0); - seg->nlocalsym = bfd_h_get_32 (abfd, buf + 4); - seg->iextdefsym = bfd_h_get_32 (abfd, buf + 8); - seg->nextdefsym = bfd_h_get_32 (abfd, buf + 12); - seg->iundefsym = bfd_h_get_32 (abfd, buf + 16); - seg->nundefsym = bfd_h_get_32 (abfd, buf + 20); - seg->tocoff = bfd_h_get_32 (abfd, buf + 24); - seg->ntoc = bfd_h_get_32 (abfd, buf + 28); - seg->modtaboff = bfd_h_get_32 (abfd, buf + 32); - seg->nmodtab = bfd_h_get_32 (abfd, buf + 36); - seg->extrefsymoff = bfd_h_get_32 (abfd, buf + 40); - seg->nextrefsyms = bfd_h_get_32 (abfd, buf + 44); - seg->indirectsymoff = bfd_h_get_32 (abfd, buf + 48); - seg->nindirectsyms = bfd_h_get_32 (abfd, buf + 52); - seg->extreloff = bfd_h_get_32 (abfd, buf + 56); - seg->nextrel = bfd_h_get_32 (abfd, buf + 60); - seg->locreloff = bfd_h_get_32 (abfd, buf + 64); - seg->nlocrel = bfd_h_get_32 (abfd, buf + 68); + cmd->ilocalsym = bfd_h_get_32 (abfd, buf + 0); + cmd->nlocalsym = bfd_h_get_32 (abfd, buf + 4); + cmd->iextdefsym = bfd_h_get_32 (abfd, buf + 8); + cmd->nextdefsym = bfd_h_get_32 (abfd, buf + 12); + cmd->iundefsym = bfd_h_get_32 (abfd, buf + 16); + cmd->nundefsym = bfd_h_get_32 (abfd, buf + 20); + cmd->tocoff = bfd_h_get_32 (abfd, buf + 24); + cmd->ntoc = bfd_h_get_32 (abfd, buf + 28); + cmd->modtaboff = bfd_h_get_32 (abfd, buf + 32); + cmd->nmodtab = bfd_h_get_32 (abfd, buf + 36); + cmd->extrefsymoff = bfd_h_get_32 (abfd, buf + 40); + cmd->nextrefsyms = bfd_h_get_32 (abfd, buf + 44); + cmd->indirectsymoff = bfd_h_get_32 (abfd, buf + 48); + cmd->nindirectsyms = bfd_h_get_32 (abfd, buf + 52); + cmd->extreloff = bfd_h_get_32 (abfd, buf + 56); + cmd->nextrel = bfd_h_get_32 (abfd, buf + 60); + cmd->locreloff = bfd_h_get_32 (abfd, buf + 64); + cmd->nlocrel = bfd_h_get_32 (abfd, buf + 68); + + if (cmd->nmodtab != 0) + { + char buf[56]; + unsigned int i; + int wide = bfd_mach_o_wide_p (abfd); + unsigned int module_len = wide ? 56 : 52; - return 0; -} + cmd->dylib_module = + bfd_alloc (abfd, cmd->nmodtab * sizeof (bfd_mach_o_dylib_module)); + if (cmd->dylib_module == NULL) + return -1; -static int -bfd_mach_o_scan_read_symtab (bfd *abfd, bfd_mach_o_load_command *command) -{ - bfd_mach_o_symtab_command *seg = &command->command.symtab; - unsigned char buf[16]; - asection *bfdsec; - char *sname; - const char *prefix = "LC_SYMTAB.stabs"; - int nlist_size = (bfd_mach_o_version (abfd) > 1) ? 16 : 12; + if (bfd_seek (abfd, cmd->modtaboff, SEEK_SET) != 0) + return -1; - BFD_ASSERT (command->type == BFD_MACH_O_LC_SYMTAB); + for (i = 0; i < cmd->nmodtab; i++) + { + bfd_mach_o_dylib_module *module = &cmd->dylib_module[i]; + unsigned long v; - bfd_seek (abfd, command->offset + 8, SEEK_SET); - if (bfd_bread ((PTR) buf, 16, abfd) != 16) - return -1; + if (bfd_bread ((PTR) buf, module_len, abfd) != module_len) + return -1; - seg->symoff = bfd_h_get_32 (abfd, buf); - seg->nsyms = bfd_h_get_32 (abfd, buf + 4); - seg->stroff = bfd_h_get_32 (abfd, buf + 8); - seg->strsize = bfd_h_get_32 (abfd, buf + 12); - seg->symbols = NULL; - seg->strtab = NULL; + module->module_name_idx = bfd_h_get_32 (abfd, buf + 0); + module->iextdefsym = bfd_h_get_32 (abfd, buf + 4); + module->nextdefsym = bfd_h_get_32 (abfd, buf + 8); + module->irefsym = bfd_h_get_32 (abfd, buf + 12); + module->nrefsym = bfd_h_get_32 (abfd, buf + 16); + module->ilocalsym = bfd_h_get_32 (abfd, buf + 20); + module->nlocalsym = bfd_h_get_32 (abfd, buf + 24); + module->iextrel = bfd_h_get_32 (abfd, buf + 28); + module->nextrel = bfd_h_get_32 (abfd, buf + 32); + v = bfd_h_get_32 (abfd, buf +36); + module->iinit = v & 0xffff; + module->iterm = (v >> 16) & 0xffff; + v = bfd_h_get_32 (abfd, buf + 40); + module->ninit = v & 0xffff; + module->nterm = (v >> 16) & 0xffff; + if (wide) + { + module->objc_module_info_size = bfd_h_get_32 (abfd, buf + 44); + module->objc_module_info_addr = bfd_h_get_64 (abfd, buf + 48); + } + else + { + module->objc_module_info_addr = bfd_h_get_32 (abfd, buf + 44); + module->objc_module_info_size = bfd_h_get_32 (abfd, buf + 48); + } + } + } + + if (cmd->ntoc != 0) + { + char buf[8]; + unsigned int i; - sname = bfd_alloc (abfd, strlen (prefix) + 1); - if (sname == NULL) - return -1; - strcpy (sname, prefix); + cmd->dylib_toc = bfd_alloc + (abfd, cmd->ntoc * sizeof (bfd_mach_o_dylib_table_of_content)); + if (cmd->dylib_toc == NULL) + return -1; - bfdsec = bfd_make_section_anyway_with_flags (abfd, sname, SEC_HAS_CONTENTS); - if (bfdsec == NULL) - return -1; + if (bfd_seek (abfd, cmd->tocoff, SEEK_SET) != 0) + return -1; - bfdsec->vma = 0; - bfdsec->lma = 0; - bfdsec->size = seg->nsyms * nlist_size; - bfdsec->filepos = seg->symoff; - bfdsec->alignment_power = 0; + for (i = 0; i < cmd->ntoc; i++) + { + bfd_mach_o_dylib_table_of_content *toc = &cmd->dylib_toc[i]; + + if (bfd_bread ((PTR) buf, 8, abfd) != 8) + return -1; + + toc->symbol_index = bfd_h_get_32 (abfd, buf + 0); + toc->module_index = bfd_h_get_32 (abfd, buf + 4); + } + } + + if (cmd->nindirectsyms != 0) + { + char buf[4]; + unsigned int i; + + cmd->indirect_syms = bfd_alloc + (abfd, cmd->nindirectsyms * sizeof (unsigned int)); + if (cmd->indirect_syms == NULL) + return -1; + + if (bfd_seek (abfd, cmd->indirectsymoff, SEEK_SET) != 0) + return -1; + + for (i = 0; i < cmd->nindirectsyms; i++) + { + unsigned int *is = &cmd->indirect_syms[i]; + + if (bfd_bread ((PTR) buf, 4, abfd) != 4) + return -1; + + *is = bfd_h_get_32 (abfd, buf + 0); + } + } + + if (cmd->nextrefsyms != 0) + { + char buf[4]; + unsigned long v; + unsigned int i; + + cmd->ext_refs = bfd_alloc + (abfd, cmd->nextrefsyms * sizeof (bfd_mach_o_dylib_reference)); + if (cmd->ext_refs == NULL) + return -1; + + if (bfd_seek (abfd, cmd->extrefsymoff, SEEK_SET) != 0) + return -1; + + for (i = 0; i < cmd->nextrefsyms; i++) + { + bfd_mach_o_dylib_reference *ref = &cmd->ext_refs[i]; - seg->stabs_segment = bfdsec; + if (bfd_bread ((PTR) buf, 4, abfd) != 4) + return -1; + + /* Fields isym and flags are written as bit-fields, thus we need + a specific processing for endianness. */ + v = bfd_h_get_32 (abfd, buf + 0); + if (bfd_big_endian (abfd)) + { + ref->isym = (v >> 8) & 0xffffff; + ref->flags = v & 0xff; + } + else + { + ref->isym = v & 0xffffff; + ref->flags = (v >> 24) & 0xff; + } + } + } + + if (mdata->dysymtab) + return -1; + mdata->dysymtab = cmd; + + return 0; +} - if (seg->nsyms != 0) - abfd->flags |= HAS_SYMS; +static int +bfd_mach_o_read_symtab (bfd *abfd, bfd_mach_o_load_command *command) +{ + bfd_mach_o_symtab_command *symtab = &command->command.symtab; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + unsigned char buf[16]; - prefix = "LC_SYMTAB.stabstr"; - sname = bfd_alloc (abfd, strlen (prefix) + 1); - if (sname == NULL) - return -1; - strcpy (sname, prefix); + BFD_ASSERT (command->type == BFD_MACH_O_LC_SYMTAB); - bfdsec = bfd_make_section_anyway_with_flags (abfd, sname, SEC_HAS_CONTENTS); - if (bfdsec == NULL) + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 16, abfd) != 16) return -1; - bfdsec->vma = 0; - bfdsec->lma = 0; - bfdsec->size = seg->strsize; - bfdsec->filepos = seg->stroff; - bfdsec->alignment_power = 0; + symtab->symoff = bfd_h_get_32 (abfd, buf); + symtab->nsyms = bfd_h_get_32 (abfd, buf + 4); + symtab->stroff = bfd_h_get_32 (abfd, buf + 8); + symtab->strsize = bfd_h_get_32 (abfd, buf + 12); + symtab->symbols = NULL; + symtab->strtab = NULL; - seg->stabstr_segment = bfdsec; + if (symtab->nsyms != 0) + abfd->flags |= HAS_SYMS; + if (mdata->symtab) + return -1; + mdata->symtab = symtab; return 0; } static int -bfd_mach_o_scan_read_uuid (bfd *abfd, bfd_mach_o_load_command *command) +bfd_mach_o_read_uuid (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_uuid_command *cmd = &command->command.uuid; asection *bfdsec; @@ -1518,8 +2287,8 @@ bfd_mach_o_scan_read_uuid (bfd *abfd, bfd_mach_o_load_command *command) BFD_ASSERT (command->type == BFD_MACH_O_LC_UUID); - bfd_seek (abfd, command->offset + 8, SEEK_SET); - if (bfd_bread ((PTR) cmd->uuid, 16, abfd) != 16) + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bread ((PTR) cmd->uuid, 16, abfd) != 16) return -1; sname = bfd_alloc (abfd, strlen (prefix) + 1); @@ -1543,24 +2312,81 @@ bfd_mach_o_scan_read_uuid (bfd *abfd, bfd_mach_o_load_command *command) } static int -bfd_mach_o_scan_read_segment (bfd *abfd, - bfd_mach_o_load_command *command, - unsigned int wide) +bfd_mach_o_read_linkedit (bfd *abfd, bfd_mach_o_load_command *command) +{ + bfd_mach_o_linkedit_command *cmd = &command->command.linkedit; + char buf[8]; + + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 8, abfd) != 8) + return -1; + + cmd->dataoff = bfd_get_32 (abfd, buf + 0); + cmd->datasize = bfd_get_32 (abfd, buf + 4); + return 0; +} + +static int +bfd_mach_o_read_str (bfd *abfd, bfd_mach_o_load_command *command) +{ + bfd_mach_o_str_command *cmd = &command->command.str; + char buf[4]; + unsigned long off; + + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 4, abfd) != 4) + return -1; + + off = bfd_get_32 (abfd, buf + 0); + cmd->stroff = command->offset + off; + cmd->str_len = command->len - off; + cmd->str = bfd_alloc (abfd, cmd->str_len); + if (cmd->str == NULL) + return -1; + if (bfd_seek (abfd, cmd->stroff, SEEK_SET) != 0 + || bfd_bread ((PTR) cmd->str, cmd->str_len, abfd) != cmd->str_len) + return -1; + return 0; +} + +static int +bfd_mach_o_read_dyld_info (bfd *abfd, bfd_mach_o_load_command *command) +{ + bfd_mach_o_dyld_info_command *cmd = &command->command.dyld_info; + char buf[40]; + + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, sizeof (buf), abfd) != sizeof (buf)) + return -1; + + cmd->rebase_off = bfd_get_32 (abfd, buf + 0); + cmd->rebase_size = bfd_get_32 (abfd, buf + 4); + cmd->bind_off = bfd_get_32 (abfd, buf + 8); + cmd->bind_size = bfd_get_32 (abfd, buf + 12); + cmd->weak_bind_off = bfd_get_32 (abfd, buf + 16); + cmd->weak_bind_size = bfd_get_32 (abfd, buf + 20); + cmd->lazy_bind_off = bfd_get_32 (abfd, buf + 24); + cmd->lazy_bind_size = bfd_get_32 (abfd, buf + 28); + cmd->export_off = bfd_get_32 (abfd, buf + 32); + cmd->export_size = bfd_get_32 (abfd, buf + 36); + return 0; +} + +static int +bfd_mach_o_read_segment (bfd *abfd, + bfd_mach_o_load_command *command, + unsigned int wide) { unsigned char buf[64]; bfd_mach_o_segment_command *seg = &command->command.segment; unsigned long i; - asection *bfdsec; - char *sname; - const char *prefix = "LC_SEGMENT"; - unsigned int snamelen; if (wide) { BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT_64); - bfd_seek (abfd, command->offset + 8, SEEK_SET); - if (bfd_bread ((PTR) buf, 64, abfd) != 64) + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 64, abfd) != 64) return -1; memcpy (seg->segname, buf, 16); @@ -1579,8 +2405,8 @@ bfd_mach_o_scan_read_segment (bfd *abfd, { BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT); - bfd_seek (abfd, command->offset + 8, SEEK_SET); - if (bfd_bread ((PTR) buf, 48, abfd) != 48) + if (bfd_seek (abfd, command->offset + 8, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 48, abfd) != 48) return -1; memcpy (seg->segname, buf, 16); @@ -1596,47 +2422,24 @@ bfd_mach_o_scan_read_segment (bfd *abfd, seg->flags = bfd_h_get_32 (abfd, buf + 44); } - snamelen = strlen (prefix) + 1 + strlen (seg->segname) + 1; - sname = bfd_alloc (abfd, snamelen); - if (sname == NULL) - return -1; - if (strcmp (seg->segname, "__TEXT") == 0 - || strcmp (seg->segname, "__DATA") == 0 - || strcmp (seg->segname, "__IMPORT") == 0 - || strcmp (seg->segname, "__LINKEDIT") == 0) - strcpy (sname, seg->segname); - else - sprintf (sname, "%s.%s", prefix, seg->segname); - - bfdsec = bfd_make_section_anyway (abfd, sname); - if (bfdsec == NULL) - return -1; - - bfdsec->vma = seg->vmaddr; - bfdsec->lma = seg->vmaddr; - bfdsec->size = seg->filesize; - bfdsec->filepos = seg->fileoff; - bfdsec->alignment_power = 0x0; - bfdsec->flags = SEC_HAS_CONTENTS; - bfdsec->segment_mark = 1; - - seg->segment = bfdsec; - if (seg->nsects != 0) { - seg->sections = bfd_alloc (abfd, seg->nsects * sizeof (bfd_mach_o_section)); + seg->sections = bfd_alloc (abfd, seg->nsects + * sizeof (bfd_mach_o_section)); if (seg->sections == NULL) return -1; for (i = 0; i < seg->nsects; i++) { bfd_vma segoff; - if (wide) - segoff = command->offset + 64 + 8 + (i * 80); - else - segoff = command->offset + 48 + 8 + (i * 68); - - if (bfd_mach_o_scan_read_section + if (wide) + segoff = command->offset + BFD_MACH_O_LC_SEGMENT_64_SIZE + + (i * BFD_MACH_O_SECTION_64_SIZE); + else + segoff = command->offset + BFD_MACH_O_LC_SEGMENT_SIZE + + (i * BFD_MACH_O_SECTION_SIZE); + + if (bfd_mach_o_read_section (abfd, &seg->sections[i], segoff, seg->initprot, wide) != 0) return -1; } @@ -1646,65 +2449,67 @@ bfd_mach_o_scan_read_segment (bfd *abfd, } static int -bfd_mach_o_scan_read_segment_32 (bfd *abfd, bfd_mach_o_load_command *command) +bfd_mach_o_read_segment_32 (bfd *abfd, bfd_mach_o_load_command *command) { - return bfd_mach_o_scan_read_segment (abfd, command, 0); + return bfd_mach_o_read_segment (abfd, command, 0); } static int -bfd_mach_o_scan_read_segment_64 (bfd *abfd, bfd_mach_o_load_command *command) +bfd_mach_o_read_segment_64 (bfd *abfd, bfd_mach_o_load_command *command) { - return bfd_mach_o_scan_read_segment (abfd, command, 1); + return bfd_mach_o_read_segment (abfd, command, 1); } static int -bfd_mach_o_scan_read_command (bfd *abfd, bfd_mach_o_load_command *command) +bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command) { unsigned char buf[8]; - bfd_seek (abfd, command->offset, SEEK_SET); - if (bfd_bread ((PTR) buf, 8, abfd) != 8) + /* Read command type and length. */ + if (bfd_seek (abfd, command->offset, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 8, abfd) != 8) return -1; - command->type = (bfd_h_get_32 (abfd, buf) & ~BFD_MACH_O_LC_REQ_DYLD); + command->type = bfd_h_get_32 (abfd, buf) & ~BFD_MACH_O_LC_REQ_DYLD; command->type_required = (bfd_h_get_32 (abfd, buf) & BFD_MACH_O_LC_REQ_DYLD - ? 1 : 0); + ? TRUE : FALSE); command->len = bfd_h_get_32 (abfd, buf + 4); switch (command->type) { case BFD_MACH_O_LC_SEGMENT: - if (bfd_mach_o_scan_read_segment_32 (abfd, command) != 0) + if (bfd_mach_o_read_segment_32 (abfd, command) != 0) return -1; break; case BFD_MACH_O_LC_SEGMENT_64: - if (bfd_mach_o_scan_read_segment_64 (abfd, command) != 0) + if (bfd_mach_o_read_segment_64 (abfd, command) != 0) return -1; break; case BFD_MACH_O_LC_SYMTAB: - if (bfd_mach_o_scan_read_symtab (abfd, command) != 0) + if (bfd_mach_o_read_symtab (abfd, command) != 0) return -1; break; case BFD_MACH_O_LC_SYMSEG: break; case BFD_MACH_O_LC_THREAD: case BFD_MACH_O_LC_UNIXTHREAD: - if (bfd_mach_o_scan_read_thread (abfd, command) != 0) + if (bfd_mach_o_read_thread (abfd, command) != 0) return -1; break; case BFD_MACH_O_LC_LOAD_DYLINKER: case BFD_MACH_O_LC_ID_DYLINKER: - if (bfd_mach_o_scan_read_dylinker (abfd, command) != 0) + if (bfd_mach_o_read_dylinker (abfd, command) != 0) return -1; break; case BFD_MACH_O_LC_LOAD_DYLIB: case BFD_MACH_O_LC_ID_DYLIB: case BFD_MACH_O_LC_LOAD_WEAK_DYLIB: - if (bfd_mach_o_scan_read_dylib (abfd, command) != 0) + case BFD_MACH_O_LC_REEXPORT_DYLIB: + if (bfd_mach_o_read_dylib (abfd, command) != 0) return -1; break; case BFD_MACH_O_LC_PREBOUND_DYLIB: - if (bfd_mach_o_scan_read_prebound_dylib (abfd, command) != 0) + if (bfd_mach_o_read_prebound_dylib (abfd, command) != 0) return -1; break; case BFD_MACH_O_LC_LOADFVMLIB: @@ -1713,25 +2518,34 @@ bfd_mach_o_scan_read_command (bfd *abfd, bfd_mach_o_load_command *command) case BFD_MACH_O_LC_FVMFILE: case BFD_MACH_O_LC_PREPAGE: case BFD_MACH_O_LC_ROUTINES: + break; case BFD_MACH_O_LC_SUB_FRAMEWORK: + case BFD_MACH_O_LC_SUB_UMBRELLA: + case BFD_MACH_O_LC_SUB_LIBRARY: + case BFD_MACH_O_LC_SUB_CLIENT: + case BFD_MACH_O_LC_RPATH: + if (bfd_mach_o_read_str (abfd, command) != 0) + return -1; break; case BFD_MACH_O_LC_DYSYMTAB: - if (bfd_mach_o_scan_read_dysymtab (abfd, command) != 0) + if (bfd_mach_o_read_dysymtab (abfd, command) != 0) return -1; break; - case BFD_MACH_O_LC_SUB_UMBRELLA: - case BFD_MACH_O_LC_SUB_CLIENT: - case BFD_MACH_O_LC_SUB_LIBRARY: case BFD_MACH_O_LC_TWOLEVEL_HINTS: case BFD_MACH_O_LC_PREBIND_CKSUM: break; case BFD_MACH_O_LC_UUID: - if (bfd_mach_o_scan_read_uuid (abfd, command) != 0) + if (bfd_mach_o_read_uuid (abfd, command) != 0) return -1; break; case BFD_MACH_O_LC_CODE_SIGNATURE: case BFD_MACH_O_LC_SEGMENT_SPLIT_INFO: - case BFD_MACH_O_LC_REEXPORT_DYLIB: + if (bfd_mach_o_read_linkedit (abfd, command) != 0) + return -1; + break; + case BFD_MACH_O_LC_DYLD_INFO: + if (bfd_mach_o_read_dyld_info (abfd, command) != 0) + return -1; break; default: fprintf (stderr, "unable to read unknown load command 0x%lx\n", @@ -1745,7 +2559,7 @@ bfd_mach_o_scan_read_command (bfd *abfd, bfd_mach_o_load_command *command) static void bfd_mach_o_flatten_sections (bfd *abfd) { - bfd_mach_o_data_struct *mdata = abfd->tdata.mach_o_data; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); long csect = 0; unsigned long i, j; @@ -1790,7 +2604,7 @@ bfd_mach_o_flatten_sections (bfd *abfd) int bfd_mach_o_scan_start_address (bfd *abfd) { - bfd_mach_o_data_struct *mdata = abfd->tdata.mach_o_data; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); bfd_mach_o_thread_command *cmd = NULL; unsigned long i; @@ -1817,9 +2631,8 @@ bfd_mach_o_scan_start_address (bfd *abfd) { unsigned char buf[4]; - bfd_seek (abfd, cmd->flavours[i].offset + 40, SEEK_SET); - - if (bfd_bread (buf, 4, abfd) != 4) + if (bfd_seek (abfd, cmd->flavours[i].offset + 40, SEEK_SET) != 0 + || bfd_bread (buf, 4, abfd) != 4) return -1; abfd->start_address = bfd_h_get_32 (abfd, buf); @@ -1829,21 +2642,19 @@ bfd_mach_o_scan_start_address (bfd *abfd) { unsigned char buf[4]; - bfd_seek (abfd, cmd->flavours[i].offset + 0, SEEK_SET); - - if (bfd_bread (buf, 4, abfd) != 4) + if (bfd_seek (abfd, cmd->flavours[i].offset + 0, SEEK_SET) != 0 + || bfd_bread (buf, 4, abfd) != 4) return -1; abfd->start_address = bfd_h_get_32 (abfd, buf); } else if ((mdata->header.cputype == BFD_MACH_O_CPU_TYPE_POWERPC_64) - && (cmd->flavours[i].flavour == BFD_MACH_O_PPC_THREAD_STATE_64)) + && (cmd->flavours[i].flavour == BFD_MACH_O_PPC_THREAD_STATE64)) { unsigned char buf[8]; - bfd_seek (abfd, cmd->flavours[i].offset + 0, SEEK_SET); - - if (bfd_bread (buf, 8, abfd) != 8) + if (bfd_seek (abfd, cmd->flavours[i].offset + 0, SEEK_SET) != 0 + || bfd_bread (buf, 8, abfd) != 8) return -1; abfd->start_address = bfd_h_get_64 (abfd, buf); @@ -1853,9 +2664,8 @@ bfd_mach_o_scan_start_address (bfd *abfd) { unsigned char buf[8]; - bfd_seek (abfd, cmd->flavours[i].offset + (16 * 8), SEEK_SET); - - if (bfd_bread (buf, 8, abfd) != 8) + if (bfd_seek (abfd, cmd->flavours[i].offset + (16 * 8), SEEK_SET) != 0 + || bfd_bread (buf, 8, abfd) != 8) return -1; abfd->start_address = bfd_h_get_64 (abfd, buf); @@ -1875,12 +2685,12 @@ bfd_mach_o_scan (bfd *abfd, unsigned long cpusubtype; unsigned int hdrsize; - hdrsize = (header->version == 2) ? 32 : 28; + hdrsize = mach_o_wide_p (header) ? + BFD_MACH_O_HEADER_64_SIZE : BFD_MACH_O_HEADER_SIZE; mdata->header = *header; - mdata->symbols = NULL; - abfd->flags = abfd->flags & (BFD_IN_MEMORY | BFD_IO_FUNCS); + abfd->flags = abfd->flags & BFD_IN_MEMORY; switch (header->filetype) { case BFD_MACH_O_MH_OBJECT: @@ -1910,7 +2720,8 @@ bfd_mach_o_scan (bfd *abfd, if (header->ncmds != 0) { - mdata->commands = bfd_alloc (abfd, header->ncmds * sizeof (bfd_mach_o_load_command)); + mdata->commands = bfd_alloc + (abfd, header->ncmds * sizeof (bfd_mach_o_load_command)); if (mdata->commands == NULL) return -1; @@ -1926,7 +2737,7 @@ bfd_mach_o_scan (bfd *abfd, cur->offset = prev->offset + prev->len; } - if (bfd_mach_o_scan_read_command (abfd, cur) < 0) + if (bfd_mach_o_read_command (abfd, cur) < 0) return -1; } } @@ -1939,7 +2750,7 @@ bfd_mach_o_scan (bfd *abfd, } bfd_boolean -bfd_mach_o_mkobject (bfd *abfd) +bfd_mach_o_mkobject_init (bfd *abfd) { bfd_mach_o_data_struct *mdata = NULL; @@ -1957,23 +2768,22 @@ bfd_mach_o_mkobject (bfd *abfd) mdata->header.flags = 0; mdata->header.byteorder = BFD_ENDIAN_UNKNOWN; mdata->commands = NULL; - mdata->nsymbols = 0; - mdata->symbols = NULL; mdata->nsects = 0; mdata->sections = NULL; - mdata->ibfd = NULL; return TRUE; } const bfd_target * -bfd_mach_o_object_p (bfd *abfd) +bfd_mach_o_header_p (bfd *abfd, + bfd_mach_o_filetype filetype, + bfd_mach_o_cpu_type cputype) { struct bfd_preserve preserve; bfd_mach_o_header header; preserve.marker = NULL; - if (bfd_mach_o_read_header (abfd, &header) != 0) + if (!bfd_mach_o_read_header (abfd, &header)) goto wrong; if (! (header.byteorder == BFD_ENDIAN_BIG @@ -1992,6 +2802,42 @@ bfd_mach_o_object_p (bfd *abfd) && abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE))) goto wrong; + /* Check cputype and filetype. + In case of wildcard, do not accept magics that are handled by existing + targets. */ + if (cputype) + { + if (header.cputype != cputype) + goto wrong; + } + else + { + switch (header.cputype) + { + case BFD_MACH_O_CPU_TYPE_I386: + /* Handled by mach-o-i386 */ + goto wrong; + default: + break; + } + } + if (filetype) + { + if (header.filetype != filetype) + goto wrong; + } + else + { + switch (header.filetype) + { + case BFD_MACH_O_MH_CORE: + /* Handled by core_p */ + goto wrong; + default: + break; + } + } + preserve.marker = bfd_zalloc (abfd, sizeof (bfd_mach_o_data_struct)); if (preserve.marker == NULL || !bfd_preserve_save (abfd, &preserve)) @@ -2013,54 +2859,16 @@ bfd_mach_o_object_p (bfd *abfd) return NULL; } -const bfd_target * -bfd_mach_o_core_p (bfd *abfd) +static const bfd_target * +bfd_mach_o_gen_object_p (bfd *abfd) { - struct bfd_preserve preserve; - bfd_mach_o_header header; - - preserve.marker = NULL; - if (bfd_mach_o_read_header (abfd, &header) != 0) - goto wrong; - - if (! (header.byteorder == BFD_ENDIAN_BIG - || header.byteorder == BFD_ENDIAN_LITTLE)) - { - fprintf (stderr, "unknown header byte-order value 0x%lx\n", - (unsigned long) header.byteorder); - abort (); - } - - if (! ((header.byteorder == BFD_ENDIAN_BIG - && abfd->xvec->byteorder == BFD_ENDIAN_BIG - && abfd->xvec->header_byteorder == BFD_ENDIAN_BIG) - || (header.byteorder == BFD_ENDIAN_LITTLE - && abfd->xvec->byteorder == BFD_ENDIAN_LITTLE - && abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE))) - goto wrong; - - if (header.filetype != BFD_MACH_O_MH_CORE) - goto wrong; - - preserve.marker = bfd_zalloc (abfd, sizeof (bfd_mach_o_data_struct)); - if (preserve.marker == NULL - || !bfd_preserve_save (abfd, &preserve)) - goto fail; - - if (bfd_mach_o_scan (abfd, &header, - (bfd_mach_o_data_struct *) preserve.marker) != 0) - goto wrong; - - bfd_preserve_finish (abfd, &preserve); - return abfd->xvec; - - wrong: - bfd_set_error (bfd_error_wrong_format); + return bfd_mach_o_header_p (abfd, 0, 0); +} - fail: - if (preserve.marker != NULL) - bfd_preserve_restore (abfd, &preserve); - return NULL; +static const bfd_target * +bfd_mach_o_gen_core_p (bfd *abfd) +{ + return bfd_mach_o_header_p (abfd, BFD_MACH_O_MH_CORE, 0); } typedef struct mach_o_fat_archentry @@ -2086,8 +2894,8 @@ bfd_mach_o_archive_p (bfd *abfd) unsigned char buf[20]; unsigned long i; - bfd_seek (abfd, 0, SEEK_SET); - if (bfd_bread ((PTR) buf, 8, abfd) != 8) + if (bfd_seek (abfd, 0, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 8, abfd) != 8) goto error; adata = bfd_alloc (abfd, sizeof (mach_o_fat_data_struct)); @@ -2104,16 +2912,15 @@ bfd_mach_o_archive_p (bfd *abfd) if (adata->nfat_arch > 30) goto error; - adata->archentries = + adata->archentries = bfd_alloc (abfd, adata->nfat_arch * sizeof (mach_o_fat_archentry)); if (adata->archentries == NULL) goto error; for (i = 0; i < adata->nfat_arch; i++) { - bfd_seek (abfd, 8 + 20 * i, SEEK_SET); - - if (bfd_bread ((PTR) buf, 20, abfd) != 20) + if (bfd_seek (abfd, 8 + 20 * i, SEEK_SET) != 0 + || bfd_bread ((PTR) buf, 20, abfd) != 20) goto error; adata->archentries[i].cputype = bfd_getb32 (buf); adata->archentries[i].cpusubtype = bfd_getb32 (buf + 4); @@ -2225,7 +3032,7 @@ bfd_mach_o_fat_extract (bfd *abfd, if (!bfd_check_format (abfd, bfd_archive) || abfd->xvec != &mach_o_fat_vec) return NULL; - + /* This is a Mach-O fat image. */ adata = (mach_o_fat_data_struct *) abfd->tdata.mach_o_fat_data; BFD_ASSERT (adata != NULL); @@ -2269,7 +3076,7 @@ bfd_mach_o_lookup_section (bfd *abfd, bfd_mach_o_load_command **mcommand, bfd_mach_o_section **msection) { - struct mach_o_data_struct *md = abfd->tdata.mach_o_data; + struct mach_o_data_struct *md = bfd_mach_o_get_data (abfd); unsigned int i, j, num; bfd_mach_o_load_command *ncmd = NULL; @@ -2289,13 +3096,6 @@ bfd_mach_o_lookup_section (bfd *abfd, continue; seg = &cmd->command.segment; - if (seg->segment == section) - { - if (num == 0) - ncmd = cmd; - num++; - } - for (j = 0; j < seg->nsects; j++) { struct bfd_mach_o_section *sect = &seg->sections[j]; @@ -2303,7 +3103,10 @@ bfd_mach_o_lookup_section (bfd *abfd, if (sect->bfdsection == section) { if (num == 0) - nsect = sect; + { + nsect = sect; + ncmd = cmd; + } num++; } } @@ -2319,12 +3122,10 @@ bfd_mach_o_lookup_command (bfd *abfd, bfd_mach_o_load_command_type type, bfd_mach_o_load_command **mcommand) { - struct mach_o_data_struct *md = NULL; + struct mach_o_data_struct *md = bfd_mach_o_get_data (abfd); bfd_mach_o_load_command *ncmd = NULL; unsigned int i, num; - md = abfd->tdata.mach_o_data; - BFD_ASSERT (md != NULL); BFD_ASSERT (mcommand != NULL); @@ -2369,16 +3170,220 @@ bfd_mach_o_stack_addr (enum bfd_mach_o_cpu_type type) } } -static bfd_boolean -bfd_mach_o_bfd_print_private_bfd_data (bfd *abfd, PTR ptr) +typedef struct bfd_mach_o_xlat_name { - bfd_mach_o_data_struct *mdata = abfd->tdata.mach_o_data; - FILE *file = (FILE *) ptr; + const char *name; + unsigned long val; +} +bfd_mach_o_xlat_name; + +static void +bfd_mach_o_print_flags (const bfd_mach_o_xlat_name *table, + unsigned long val, + FILE *file) +{ + int first = 1; + + for (; table->name; table++) + { + if (table->val & val) + { + if (!first) + fprintf (file, "+"); + fprintf (file, "%s", table->name); + val &= ~table->val; + first = 0; + } + } + if (val) + { + if (!first) + fprintf (file, "+"); + fprintf (file, "0x%lx", val); + return; + } + if (first) + fprintf (file, "-"); +} + +static const char * +bfd_mach_o_get_name (const bfd_mach_o_xlat_name *table, unsigned long val) +{ + for (; table->name; table++) + if (table->val == val) + return table->name; + return "*UNKNOWN*"; +} + +static bfd_mach_o_xlat_name bfd_mach_o_cpu_name[] = +{ + { "vax", BFD_MACH_O_CPU_TYPE_VAX }, + { "mc680x0", BFD_MACH_O_CPU_TYPE_MC680x0 }, + { "i386", BFD_MACH_O_CPU_TYPE_I386 }, + { "mips", BFD_MACH_O_CPU_TYPE_MIPS }, + { "mc98000", BFD_MACH_O_CPU_TYPE_MC98000 }, + { "hppa", BFD_MACH_O_CPU_TYPE_HPPA }, + { "arm", BFD_MACH_O_CPU_TYPE_ARM }, + { "mc88000", BFD_MACH_O_CPU_TYPE_MC88000 }, + { "sparc", BFD_MACH_O_CPU_TYPE_SPARC }, + { "i860", BFD_MACH_O_CPU_TYPE_I860 }, + { "alpha", BFD_MACH_O_CPU_TYPE_ALPHA }, + { "powerpc", BFD_MACH_O_CPU_TYPE_POWERPC }, + { "powerpc_64", BFD_MACH_O_CPU_TYPE_POWERPC_64 }, + { "x86_64", BFD_MACH_O_CPU_TYPE_X86_64 }, + { NULL, 0} +}; + +static bfd_mach_o_xlat_name bfd_mach_o_filetype_name[] = +{ + { "object", BFD_MACH_O_MH_OBJECT }, + { "execute", BFD_MACH_O_MH_EXECUTE }, + { "fvmlib", BFD_MACH_O_MH_FVMLIB }, + { "core", BFD_MACH_O_MH_CORE }, + { "preload", BFD_MACH_O_MH_PRELOAD }, + { "dylib", BFD_MACH_O_MH_DYLIB }, + { "dylinker", BFD_MACH_O_MH_DYLINKER }, + { "bundle", BFD_MACH_O_MH_BUNDLE }, + { "dylib_stub", BFD_MACH_O_MH_DYLIB_STUB }, + { "dym", BFD_MACH_O_MH_DSYM }, + { "kext_bundle", BFD_MACH_O_MH_KEXT_BUNDLE }, + { NULL, 0} +}; + +static bfd_mach_o_xlat_name bfd_mach_o_header_flags_name[] = +{ + { "noundefs", BFD_MACH_O_MH_NOUNDEFS }, + { "incrlink", BFD_MACH_O_MH_INCRLINK }, + { "dyldlink", BFD_MACH_O_MH_DYLDLINK }, + { "bindatload", BFD_MACH_O_MH_BINDATLOAD }, + { "prebound", BFD_MACH_O_MH_PREBOUND }, + { "split_segs", BFD_MACH_O_MH_SPLIT_SEGS }, + { "lazy_init", BFD_MACH_O_MH_LAZY_INIT }, + { "twolevel", BFD_MACH_O_MH_TWOLEVEL }, + { "force_flat", BFD_MACH_O_MH_FORCE_FLAT }, + { "nomultidefs", BFD_MACH_O_MH_NOMULTIDEFS }, + { "nofixprebinding", BFD_MACH_O_MH_NOFIXPREBINDING }, + { "prebindable", BFD_MACH_O_MH_PREBINDABLE }, + { "allmodsbound", BFD_MACH_O_MH_ALLMODSBOUND }, + { "subsections_via_symbols", BFD_MACH_O_MH_SUBSECTIONS_VIA_SYMBOLS }, + { "canonical", BFD_MACH_O_MH_CANONICAL }, + { "weak_defines", BFD_MACH_O_MH_WEAK_DEFINES }, + { "binds_to_weak", BFD_MACH_O_MH_BINDS_TO_WEAK }, + { "allow_stack_execution", BFD_MACH_O_MH_ALLOW_STACK_EXECUTION }, + { "root_safe", BFD_MACH_O_MH_ROOT_SAFE }, + { "setuid_safe", BFD_MACH_O_MH_SETUID_SAFE }, + { "no_reexported_dylibs", BFD_MACH_O_MH_NO_REEXPORTED_DYLIBS }, + { "pie", BFD_MACH_O_MH_PIE }, + { NULL, 0} +}; + +static bfd_mach_o_xlat_name bfd_mach_o_section_type_name[] = +{ + { "regular", BFD_MACH_O_S_REGULAR}, + { "zerofill", BFD_MACH_O_S_ZEROFILL}, + { "cstring_literals", BFD_MACH_O_S_CSTRING_LITERALS}, + { "4byte_literals", BFD_MACH_O_S_4BYTE_LITERALS}, + { "8byte_literals", BFD_MACH_O_S_8BYTE_LITERALS}, + { "literal_pointers", BFD_MACH_O_S_LITERAL_POINTERS}, + { "non_lazy_symbol_pointers", BFD_MACH_O_S_NON_LAZY_SYMBOL_POINTERS}, + { "lazy_symbol_pointers", BFD_MACH_O_S_LAZY_SYMBOL_POINTERS}, + { "symbol_stubs", BFD_MACH_O_S_SYMBOL_STUBS}, + { "mod_init_func_pointers", BFD_MACH_O_S_MOD_INIT_FUNC_POINTERS}, + { "mod_fini_func_pointers", BFD_MACH_O_S_MOD_FINI_FUNC_POINTERS}, + { "coalesced", BFD_MACH_O_S_COALESCED}, + { "gb_zerofill", BFD_MACH_O_S_GB_ZEROFILL}, + { "interposing", BFD_MACH_O_S_INTERPOSING}, + { "16byte_literals", BFD_MACH_O_S_16BYTE_LITERALS}, + { "dtrace_dof", BFD_MACH_O_S_DTRACE_DOF}, + { "lazy_dylib_symbol_pointers", BFD_MACH_O_S_LAZY_DYLIB_SYMBOL_POINTERS}, + { NULL, 0} +}; + +static bfd_mach_o_xlat_name bfd_mach_o_section_attribute_name[] = +{ + { "loc_reloc", BFD_MACH_O_S_ATTR_LOC_RELOC }, + { "ext_reloc", BFD_MACH_O_S_ATTR_EXT_RELOC }, + { "some_instructions", BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS }, + { "debug", BFD_MACH_O_S_ATTR_DEBUG }, + { "modifying_code", BFD_MACH_O_S_SELF_MODIFYING_CODE }, + { "live_support", BFD_MACH_O_S_ATTR_LIVE_SUPPORT }, + { "no_dead_strip", BFD_MACH_O_S_ATTR_NO_DEAD_STRIP }, + { "strip_static_syms", BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS }, + { "no_toc", BFD_MACH_O_S_ATTR_NO_TOC }, + { "pure_instructions", BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS }, + { NULL, 0} +}; + +static bfd_mach_o_xlat_name bfd_mach_o_load_command_name[] = +{ + { "segment", BFD_MACH_O_LC_SEGMENT}, + { "symtab", BFD_MACH_O_LC_SYMTAB}, + { "symseg", BFD_MACH_O_LC_SYMSEG}, + { "thread", BFD_MACH_O_LC_THREAD}, + { "unixthread", BFD_MACH_O_LC_UNIXTHREAD}, + { "loadfvmlib", BFD_MACH_O_LC_LOADFVMLIB}, + { "idfvmlib", BFD_MACH_O_LC_IDFVMLIB}, + { "ident", BFD_MACH_O_LC_IDENT}, + { "fvmfile", BFD_MACH_O_LC_FVMFILE}, + { "prepage", BFD_MACH_O_LC_PREPAGE}, + { "dysymtab", BFD_MACH_O_LC_DYSYMTAB}, + { "load_dylib", BFD_MACH_O_LC_LOAD_DYLIB}, + { "id_dylib", BFD_MACH_O_LC_ID_DYLIB}, + { "load_dylinker", BFD_MACH_O_LC_LOAD_DYLINKER}, + { "id_dylinker", BFD_MACH_O_LC_ID_DYLINKER}, + { "prebound_dylib", BFD_MACH_O_LC_PREBOUND_DYLIB}, + { "routines", BFD_MACH_O_LC_ROUTINES}, + { "sub_framework", BFD_MACH_O_LC_SUB_FRAMEWORK}, + { "sub_umbrella", BFD_MACH_O_LC_SUB_UMBRELLA}, + { "sub_client", BFD_MACH_O_LC_SUB_CLIENT}, + { "sub_library", BFD_MACH_O_LC_SUB_LIBRARY}, + { "twolevel_hints", BFD_MACH_O_LC_TWOLEVEL_HINTS}, + { "prebind_cksum", BFD_MACH_O_LC_PREBIND_CKSUM}, + { "load_weak_dylib", BFD_MACH_O_LC_LOAD_WEAK_DYLIB}, + { "segment_64", BFD_MACH_O_LC_SEGMENT_64}, + { "routines_64", BFD_MACH_O_LC_ROUTINES_64}, + { "uuid", BFD_MACH_O_LC_UUID}, + { "rpath", BFD_MACH_O_LC_RPATH}, + { "code_signature", BFD_MACH_O_LC_CODE_SIGNATURE}, + { "segment_split_info", BFD_MACH_O_LC_SEGMENT_SPLIT_INFO}, + { "reexport_dylib", BFD_MACH_O_LC_REEXPORT_DYLIB}, + { "lazy_load_dylib", BFD_MACH_O_LC_LAZY_LOAD_DYLIB}, + { "encryption_info", BFD_MACH_O_LC_ENCRYPTION_INFO}, + { "dyld_info", BFD_MACH_O_LC_DYLD_INFO}, + { NULL, 0} +}; + +static void +bfd_mach_o_print_private_header (bfd *abfd, FILE *file) +{ + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + bfd_mach_o_header *h = &mdata->header; + + fputs (_("Mach-O header:\n"), file); + fprintf (file, _(" magic : %08lx\n"), h->magic); + fprintf (file, _(" cputype : %08lx (%s)\n"), h->cputype, + bfd_mach_o_get_name (bfd_mach_o_cpu_name, h->cputype)); + fprintf (file, _(" cpusubtype: %08lx\n"), h->cpusubtype); + fprintf (file, _(" filetype : %08lx (%s)\n"), + h->filetype, + bfd_mach_o_get_name (bfd_mach_o_filetype_name, h->filetype)); + fprintf (file, _(" ncmds : %08lx (%lu)\n"), h->ncmds, h->ncmds); + fprintf (file, _(" sizeofcmds: %08lx\n"), h->sizeofcmds); + fprintf (file, _(" flags : %08lx ("), h->flags); + bfd_mach_o_print_flags (bfd_mach_o_header_flags_name, h->flags, file); + fputs (_(")\n"), file); + fprintf (file, _(" reserved : %08x\n"), h->reserved); +} + +static void +bfd_mach_o_print_section_map (bfd *abfd, FILE *file) +{ + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); unsigned int i, j; unsigned int sec_nbr = 0; - fprintf (file, _("Segments and Sections:\n")); - fprintf (file, _(" #: Segment name Section name Address\n")); + fputs (_("Segments and Sections:\n"), file); + fputs (_(" #: Segment name Section name Address\n"), file); for (i = 0; i < mdata->header.ncmds; i++) { @@ -2410,103 +3415,430 @@ bfd_mach_o_bfd_print_private_bfd_data (bfd *abfd, PTR ptr) fprintf (file, " %08lx\n", sec->flags); } } +} + +static void +bfd_mach_o_print_section (bfd *abfd ATTRIBUTE_UNUSED, + bfd_mach_o_section *sec, FILE *file) +{ + fprintf (file, " Section: %-16s %-16s (bfdname: %s)\n", + sec->sectname, sec->segname, sec->bfdsection->name); + fprintf (file, " addr: "); + fprintf_vma (file, sec->addr); + fprintf (file, " size: "); + fprintf_vma (file, sec->size); + fprintf (file, " offset: "); + fprintf_vma (file, sec->offset); + fprintf (file, "\n"); + fprintf (file, " align: %ld", sec->align); + fprintf (file, " nreloc: %lu reloff: ", sec->nreloc); + fprintf_vma (file, sec->reloff); + fprintf (file, "\n"); + fprintf (file, " flags: %08lx (type: %s", sec->flags, + bfd_mach_o_get_name (bfd_mach_o_section_type_name, + sec->flags & BFD_MACH_O_SECTION_TYPE_MASK)); + fprintf (file, " attr: "); + bfd_mach_o_print_flags (bfd_mach_o_section_attribute_name, + sec->flags & BFD_MACH_O_SECTION_ATTRIBUTES_MASK, + file); + fprintf (file, ")\n"); + switch (sec->flags & BFD_MACH_O_SECTION_TYPE_MASK) + { + case BFD_MACH_O_S_NON_LAZY_SYMBOL_POINTERS: + case BFD_MACH_O_S_LAZY_SYMBOL_POINTERS: + case BFD_MACH_O_S_SYMBOL_STUBS: + fprintf (file, " first indirect sym: %lu", sec->reserved1); + fprintf (file, " (%u entries)", + bfd_mach_o_section_get_nbr_indirect (abfd, sec)); + break; + default: + fprintf (file, " reserved1: 0x%lx", sec->reserved1); + break; + } + switch (sec->flags & BFD_MACH_O_SECTION_TYPE_MASK) + { + case BFD_MACH_O_S_SYMBOL_STUBS: + fprintf (file, " stub size: %lu", sec->reserved2); + break; + default: + fprintf (file, " reserved2: 0x%lx", sec->reserved2); + break; + } + fprintf (file, " reserved3: 0x%lx\n", sec->reserved3); +} + +static void +bfd_mach_o_print_segment (bfd *abfd ATTRIBUTE_UNUSED, + bfd_mach_o_load_command *cmd, FILE *file) +{ + bfd_mach_o_segment_command *seg = &cmd->command.segment; + unsigned int i; + + fprintf (file, " name: %s\n", *seg->segname ? seg->segname : "*none*"); + fprintf (file, " vmaddr: "); + fprintf_vma (file, seg->vmaddr); + fprintf (file, " vmsize: "); + fprintf_vma (file, seg->vmsize); + fprintf (file, "\n"); + fprintf (file, " fileoff: "); + fprintf_vma (file, seg->fileoff); + fprintf (file, " filesize: "); + fprintf_vma (file, (bfd_vma)seg->filesize); + fprintf (file, " endoff: "); + fprintf_vma (file, (bfd_vma)(seg->fileoff + seg->filesize)); + fprintf (file, "\n"); + fprintf (file, " nsects: %lu ", seg->nsects); + fprintf (file, " flags: %lx\n", seg->flags); + for (i = 0; i < seg->nsects; i++) + bfd_mach_o_print_section (abfd, &seg->sections[i], file); +} + +static void +bfd_mach_o_print_dysymtab (bfd *abfd ATTRIBUTE_UNUSED, + bfd_mach_o_load_command *cmd, FILE *file) +{ + bfd_mach_o_dysymtab_command *dysymtab = &cmd->command.dysymtab; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + unsigned int i; + + fprintf (file, " local symbols: idx: %10lu num: %-8lu", + dysymtab->ilocalsym, dysymtab->nlocalsym); + fprintf (file, " (nxtidx: %lu)\n", + dysymtab->ilocalsym + dysymtab->nlocalsym); + fprintf (file, " external symbols: idx: %10lu num: %-8lu", + dysymtab->iextdefsym, dysymtab->nextdefsym); + fprintf (file, " (nxtidx: %lu)\n", + dysymtab->iextdefsym + dysymtab->nextdefsym); + fprintf (file, " undefined symbols: idx: %10lu num: %-8lu", + dysymtab->iundefsym, dysymtab->nundefsym); + fprintf (file, " (nxtidx: %lu)\n", + dysymtab->iundefsym + dysymtab->nundefsym); + fprintf (file, " table of content: off: 0x%08lx num: %-8lu", + dysymtab->tocoff, dysymtab->ntoc); + fprintf (file, " (endoff: 0x%08lx)\n", + dysymtab->tocoff + + dysymtab->ntoc * BFD_MACH_O_TABLE_OF_CONTENT_SIZE); + fprintf (file, " module table: off: 0x%08lx num: %-8lu", + dysymtab->modtaboff, dysymtab->nmodtab); + fprintf (file, " (endoff: 0x%08lx)\n", + dysymtab->modtaboff + dysymtab->nmodtab + * (mach_o_wide_p (&mdata->header) ? + BFD_MACH_O_DYLIB_MODULE_64_SIZE : BFD_MACH_O_DYLIB_MODULE_SIZE)); + fprintf (file, " external reference table: off: 0x%08lx num: %-8lu", + dysymtab->extrefsymoff, dysymtab->nextrefsyms); + fprintf (file, " (endoff: 0x%08lx)\n", + dysymtab->extrefsymoff + + dysymtab->nextrefsyms * BFD_MACH_O_REFERENCE_SIZE); + fprintf (file, " indirect symbol table: off: 0x%08lx num: %-8lu", + dysymtab->indirectsymoff, dysymtab->nindirectsyms); + fprintf (file, " (endoff: 0x%08lx)\n", + dysymtab->indirectsymoff + + dysymtab->nindirectsyms * BFD_MACH_O_INDIRECT_SYMBOL_SIZE); + fprintf (file, " external relocation table: off: 0x%08lx num: %-8lu", + dysymtab->extreloff, dysymtab->nextrel); + fprintf (file, " (endoff: 0x%08lx)\n", + dysymtab->extreloff + dysymtab->nextrel * BFD_MACH_O_RELENT_SIZE); + fprintf (file, " local relocation table: off: 0x%08lx num: %-8lu", + dysymtab->locreloff, dysymtab->nlocrel); + fprintf (file, " (endoff: 0x%08lx)\n", + dysymtab->locreloff + dysymtab->nlocrel * BFD_MACH_O_RELENT_SIZE); + + if (dysymtab->ntoc > 0 + || dysymtab->nindirectsyms > 0 + || dysymtab->nextrefsyms > 0) + { + /* Try to read the symbols to display the toc or indirect symbols. */ + bfd_mach_o_read_symtab_symbols (abfd); + } + else if (dysymtab->nmodtab > 0) + { + /* Try to read the strtab to display modules name. */ + bfd_mach_o_read_symtab_strtab (abfd); + } + + for (i = 0; i < dysymtab->nmodtab; i++) + { + bfd_mach_o_dylib_module *module = &dysymtab->dylib_module[i]; + fprintf (file, " module %u:\n", i); + fprintf (file, " name: %lu", module->module_name_idx); + if (mdata->symtab && mdata->symtab->strtab) + fprintf (file, ": %s", + mdata->symtab->strtab + module->module_name_idx); + fprintf (file, "\n"); + fprintf (file, " extdefsym: idx: %8lu num: %lu\n", + module->iextdefsym, module->nextdefsym); + fprintf (file, " refsym: idx: %8lu num: %lu\n", + module->irefsym, module->nrefsym); + fprintf (file, " localsym: idx: %8lu num: %lu\n", + module->ilocalsym, module->nlocalsym); + fprintf (file, " extrel: idx: %8lu num: %lu\n", + module->iextrel, module->nextrel); + fprintf (file, " init: idx: %8u num: %u\n", + module->iinit, module->ninit); + fprintf (file, " term: idx: %8u num: %u\n", + module->iterm, module->nterm); + fprintf (file, " objc_module_info: addr: "); + fprintf_vma (file, module->objc_module_info_addr); + fprintf (file, " size: %lu\n", module->objc_module_info_size); + } + + if (dysymtab->ntoc > 0) + { + bfd_mach_o_symtab_command *symtab = mdata->symtab; + + fprintf (file, " table of content: (symbol/module)\n"); + for (i = 0; i < dysymtab->ntoc; i++) + { + bfd_mach_o_dylib_table_of_content *toc = &dysymtab->dylib_toc[i]; + + fprintf (file, " %4u: ", i); + if (symtab && symtab->symbols && toc->symbol_index < symtab->nsyms) + { + const char *name = symtab->symbols[toc->symbol_index].symbol.name; + fprintf (file, "%s (%lu)", name ? name : "*invalid*", + toc->symbol_index); + } + else + fprintf (file, "%lu", toc->symbol_index); + + fprintf (file, " / "); + if (symtab && symtab->strtab + && toc->module_index < dysymtab->nmodtab) + { + bfd_mach_o_dylib_module *mod; + mod = &dysymtab->dylib_module[toc->module_index]; + fprintf (file, "%s (%lu)", + symtab->strtab + mod->module_name_idx, + toc->module_index); + } + else + fprintf (file, "%lu", toc->module_index); + + fprintf (file, "\n"); + } + } + + if (dysymtab->nindirectsyms != 0) + { + fprintf (file, " indirect symbols:\n"); + + for (i = 0; i < mdata->nsects; i++) + { + bfd_mach_o_section *sec = mdata->sections[i]; + unsigned int j, first, last; + bfd_mach_o_symtab_command *symtab = mdata->symtab; + bfd_vma addr; + bfd_vma entry_size; + + switch (sec->flags & BFD_MACH_O_SECTION_TYPE_MASK) + { + case BFD_MACH_O_S_NON_LAZY_SYMBOL_POINTERS: + case BFD_MACH_O_S_LAZY_SYMBOL_POINTERS: + case BFD_MACH_O_S_SYMBOL_STUBS: + first = sec->reserved1; + last = first + bfd_mach_o_section_get_nbr_indirect (abfd, sec); + addr = sec->addr; + entry_size = bfd_mach_o_section_get_entry_size (abfd, sec); + fprintf (file, " for section %s.%s:\n", + sec->segname, sec->sectname); + for (j = first; j < last; j++) + { + unsigned int isym = dysymtab->indirect_syms[j]; + + fprintf (file, " "); + fprintf_vma (file, addr); + fprintf (file, " %5u: 0x%08x", j, isym); + if (isym & BFD_MACH_O_INDIRECT_SYMBOL_LOCAL) + fprintf (file, " LOCAL"); + if (isym & BFD_MACH_O_INDIRECT_SYMBOL_ABS) + fprintf (file, " ABSOLUTE"); + if (symtab && symtab->symbols + && isym < symtab->nsyms + && symtab->symbols[isym].symbol.name) + fprintf (file, " %s", symtab->symbols[isym].symbol.name); + fprintf (file, "\n"); + addr += entry_size; + } + break; + default: + break; + } + } + } + if (dysymtab->nextrefsyms > 0) + { + bfd_mach_o_symtab_command *symtab = mdata->symtab; + + fprintf (file, " external reference table: (symbol flags)\n"); + for (i = 0; i < dysymtab->nextrefsyms; i++) + { + bfd_mach_o_dylib_reference *ref = &dysymtab->ext_refs[i]; + + fprintf (file, " %4u: %5lu 0x%02lx", i, ref->isym, ref->flags); + if (symtab && symtab->symbols + && ref->isym < symtab->nsyms + && symtab->symbols[ref->isym].symbol.name) + fprintf (file, " %s", symtab->symbols[ref->isym].symbol.name); + fprintf (file, "\n"); + } + } + +} + +static void +bfd_mach_o_print_dyld_info (bfd *abfd ATTRIBUTE_UNUSED, + bfd_mach_o_load_command *cmd, FILE *file) +{ + bfd_mach_o_dyld_info_command *info = &cmd->command.dyld_info; + + fprintf (file, " rebase: off: 0x%08x size: %-8u\n", + info->rebase_off, info->rebase_size); + fprintf (file, " bind: off: 0x%08x size: %-8u\n", + info->bind_off, info->bind_size); + fprintf (file, " weak bind: off: 0x%08x size: %-8u\n", + info->weak_bind_off, info->weak_bind_size); + fprintf (file, " lazy bind: off: 0x%08x size: %-8u\n", + info->lazy_bind_off, info->lazy_bind_size); + fprintf (file, " export: off: 0x%08x size: %-8u\n", + info->export_off, info->export_size); +} + +bfd_boolean +bfd_mach_o_bfd_print_private_bfd_data (bfd *abfd, PTR ptr) +{ + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); + FILE *file = (FILE *) ptr; + unsigned int i; + + bfd_mach_o_print_private_header (abfd, file); + fputc ('\n', file); for (i = 0; i < mdata->header.ncmds; i++) { bfd_mach_o_load_command *cmd = &mdata->commands[i]; - + + fprintf (file, "Load command %s:", + bfd_mach_o_get_name (bfd_mach_o_load_command_name, cmd->type)); switch (cmd->type) { case BFD_MACH_O_LC_SEGMENT: case BFD_MACH_O_LC_SEGMENT_64: + bfd_mach_o_print_segment (abfd, cmd, file); break; case BFD_MACH_O_LC_UUID: { bfd_mach_o_uuid_command *uuid = &cmd->command.uuid; unsigned int i; - fprintf (file, "\n" - "UUID:"); for (i = 0; i < sizeof (uuid->uuid); i++) fprintf (file, " %02x", uuid->uuid[i]); fputc ('\n', file); } break; case BFD_MACH_O_LC_LOAD_DYLIB: + case BFD_MACH_O_LC_LOAD_WEAK_DYLIB: + case BFD_MACH_O_LC_REEXPORT_DYLIB: + case BFD_MACH_O_LC_ID_DYLIB: { bfd_mach_o_dylib_command *dylib = &cmd->command.dylib; - bfd_byte *data = NULL; - - if (! bfd_malloc_and_get_section (abfd, dylib->section, &data)) - { - if (data != NULL) - free (data); - break; - } - fprintf (file, "\n" - "LOAD_DYLIB: %s\n", - data + dylib->name_offset - cmd->offset - 8); + fprintf (file, " %s\n", dylib->name_str); fprintf (file, " time stamp: 0x%08lx\n", dylib->timestamp); fprintf (file, " current version: 0x%08lx\n", dylib->current_version); fprintf (file, " comptibility version: 0x%08lx\n", dylib->compatibility_version); - free (data); break; } case BFD_MACH_O_LC_LOAD_DYLINKER: - { - bfd_mach_o_dylinker_command *linker = &cmd->command.dylinker; - bfd_byte *data = NULL; - - if (! bfd_malloc_and_get_section (abfd, linker->section, &data)) - { - if (data != NULL) - free (data); - break; - } - fprintf (file, "\n" - "LOAD_DYLINKER: %s\n", - data + linker->name_offset - cmd->offset - 8); - free (data); - break; - } + case BFD_MACH_O_LC_ID_DYLINKER: + fprintf (file, " %s\n", cmd->command.dylinker.name_str); + break; case BFD_MACH_O_LC_SYMTAB: { bfd_mach_o_symtab_command *symtab = &cmd->command.symtab; - fprintf (file, "\n" - "LC_SYMTAB: nsyms: %lu, strsize: %lu\n", - symtab->nsyms, symtab->strsize); - break; - } - case BFD_MACH_O_LC_DYSYMTAB: - { - bfd_mach_o_dysymtab_command *dysymtab = &cmd->command.dysymtab; - fprintf (file, "\n" - "LC_DYSYMTAB:\n" - " local symbols: index: %lu number: %lu\n", - dysymtab->ilocalsym, dysymtab->nlocalsym); - fprintf (file, - " external symbols: index: %lu number: %lu\n", - dysymtab->iextdefsym, dysymtab->nextdefsym); fprintf (file, - " undefined symbols: index: %lu number: %lu\n", - dysymtab->iundefsym, dysymtab->nundefsym); + "\n" + " symoff: 0x%08x nsyms: %8u (endoff: 0x%08x)\n", + symtab->symoff, symtab->nsyms, + symtab->symoff + symtab->nsyms + * (mach_o_wide_p (&mdata->header) + ? BFD_MACH_O_NLIST_64_SIZE : BFD_MACH_O_NLIST_SIZE)); fprintf (file, - " ntoc: offset: %lu number: %lu\n", - dysymtab->tocoff, dysymtab->ntoc); - fprintf (file, - " module table: offset: %lu number: %lu\n", - dysymtab->modtaboff, dysymtab->nmodtab); + " stroff: 0x%08x strsize: %8u (endoff: 0x%08x)\n", + symtab->stroff, symtab->strsize, + symtab->stroff + symtab->strsize); break; } + case BFD_MACH_O_LC_DYSYMTAB: + fprintf (file, "\n"); + bfd_mach_o_print_dysymtab (abfd, cmd, file); + break; + case BFD_MACH_O_LC_CODE_SIGNATURE: + case BFD_MACH_O_LC_SEGMENT_SPLIT_INFO: + { + bfd_mach_o_linkedit_command *linkedit = &cmd->command.linkedit; + fprintf + (file, "\n" + " dataoff: 0x%08lx datasize: 0x%08lx (endoff: 0x%08lx)\n", + linkedit->dataoff, linkedit->datasize, + linkedit->dataoff + linkedit->datasize); + break; + } + case BFD_MACH_O_LC_SUB_FRAMEWORK: + case BFD_MACH_O_LC_SUB_UMBRELLA: + case BFD_MACH_O_LC_SUB_LIBRARY: + case BFD_MACH_O_LC_SUB_CLIENT: + case BFD_MACH_O_LC_RPATH: + { + bfd_mach_o_str_command *str = &cmd->command.str; + fprintf (file, " %s\n", str->str); + break; + } + case BFD_MACH_O_LC_THREAD: + case BFD_MACH_O_LC_UNIXTHREAD: + { + bfd_mach_o_thread_command *thread = &cmd->command.thread; + unsigned int j; + bfd_mach_o_backend_data *bed = bfd_mach_o_get_backend_data (abfd); + + fprintf (file, " nflavours: %lu\n", thread->nflavours); + for (j = 0; j < thread->nflavours; j++) + { + bfd_mach_o_thread_flavour *flavour = &thread->flavours[j]; + + fprintf (file, " %2u: flavour: 0x%08lx offset: 0x%08lx" + " size: 0x%08lx\n", + j, flavour->flavour, flavour->offset, + flavour->size); + if (bed->_bfd_mach_o_print_thread) + { + char *buf = bfd_malloc (flavour->size); + + if (buf + && bfd_seek (abfd, flavour->offset, SEEK_SET) == 0 + && (bfd_bread (buf, flavour->size, abfd) + == flavour->size)) + (*bed->_bfd_mach_o_print_thread)(abfd, flavour, + file, buf); + free (buf); + } + } + break; + } + case BFD_MACH_O_LC_DYLD_INFO: + fprintf (file, "\n"); + bfd_mach_o_print_dyld_info (abfd, cmd, file); + break; default: - fprintf (file, "LC_%d\n", cmd->type); + fprintf (file, "\n"); break; } + fputc ('\n', file); } + bfd_mach_o_print_section_map (abfd, file); + return TRUE; } @@ -2515,7 +3847,7 @@ bfd_mach_o_core_fetch_environment (bfd *abfd, unsigned char **rbuf, unsigned int *rlen) { - bfd_mach_o_data_struct *mdata = abfd->tdata.mach_o_data; + bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); unsigned long stackaddr = bfd_mach_o_stack_addr (mdata->header.cputype); unsigned int i = 0; @@ -2548,8 +3880,13 @@ bfd_mach_o_core_fetch_environment (bfd *abfd, buf = bfd_realloc_or_free (buf, size); if (buf == NULL) return -1; - - bfd_seek (abfd, end - size, SEEK_SET); + + if (bfd_seek (abfd, end - size, SEEK_SET) != 0) + { + free (buf); + return -1; + } + nread = bfd_bread (buf, size, abfd); if (nread != size) @@ -2617,11 +3954,17 @@ bfd_mach_o_core_file_failing_signal (bfd *abfd ATTRIBUTE_UNUSED) return 0; } +#define bfd_mach_o_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup +#define bfd_mach_o_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup + +#define bfd_mach_o_swap_reloc_in NULL +#define bfd_mach_o_swap_reloc_out NULL +#define bfd_mach_o_print_thread NULL + #define TARGET_NAME mach_o_be_vec #define TARGET_STRING "mach-o-be" #define TARGET_BIG_ENDIAN 1 #define TARGET_ARCHIVE 0 - #include "mach-o-target.c" #undef TARGET_NAME diff --git a/cegcc/src/binutils/bfd/mach-o.h b/cegcc/src/binutils/bfd/mach-o.h index 615a4b3ed..a59714209 100644 --- a/cegcc/src/binutils/bfd/mach-o.h +++ b/cegcc/src/binutils/bfd/mach-o.h @@ -1,5 +1,5 @@ /* Mach-O support for BFD. - Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008 + Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -24,6 +24,7 @@ #include "bfd.h" +/* Symbol n_type values. */ #define BFD_MACH_O_N_STAB 0xe0 /* If any of these bits set, a symbolic debugging entry. */ #define BFD_MACH_O_N_PEXT 0x10 /* Private external symbol bit. */ #define BFD_MACH_O_N_TYPE 0x0e /* Mask for the type bits. */ @@ -34,38 +35,60 @@ #define BFD_MACH_O_N_PBUD 0x0c /* Prebound undefined (defined in a dylib). */ #define BFD_MACH_O_N_SECT 0x0e /* Defined in section number n_sect. */ -#define BFD_MACH_O_NO_SECT 0 +#define BFD_MACH_O_NO_SECT 0 /* Symbol not in any section of the image. */ -#define BFD_MACH_O_SYM_NTYPE(SYM) (((SYM)->udata.i >> 24) & 0xff) -#define BFD_MACH_O_SYM_NSECT(SYM) (((SYM)->udata.i >> 16) & 0xff) -#define BFD_MACH_O_SYM_NDESC(SYM) ((SYM)->udata.i & 0xffff) +/* Symbol n_desc reference flags. */ +#define BFD_MACH_O_REFERENCE_MASK 0x0f +#define BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY 0x00 +#define BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY 0x01 +#define BFD_MACH_O_REFERENCE_FLAG_DEFINED 0x02 +#define BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED 0x03 +#define BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY 0x04 +#define BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY 0x05 + +#define BFD_MACH_O_REFERENCED_DYNAMICALLY 0x10 +#define BFD_MACH_O_N_DESC_DISCARDED 0x20 +#define BFD_MACH_O_N_NO_DEAD_STRIP 0x20 +#define BFD_MACH_O_N_WEAK_REF 0x40 +#define BFD_MACH_O_N_WEAK_DEF 0x80 + +typedef enum bfd_mach_o_mach_header_magic +{ + BFD_MACH_O_MH_MAGIC = 0xfeedface, + BFD_MACH_O_MH_CIGAM = 0xcefaedfe, + BFD_MACH_O_MH_MAGIC_64 = 0xfeedfacf, + BFD_MACH_O_MH_CIGAM_64 = 0xcffaedfe +} +bfd_mach_o_mach_header_magic; typedef enum bfd_mach_o_ppc_thread_flavour { - BFD_MACH_O_PPC_THREAD_STATE = 1, - BFD_MACH_O_PPC_FLOAT_STATE = 2, - BFD_MACH_O_PPC_EXCEPTION_STATE = 3, - BFD_MACH_O_PPC_VECTOR_STATE = 4, - BFD_MACH_O_PPC_THREAD_STATE_64 = 5 + BFD_MACH_O_PPC_THREAD_STATE = 1, + BFD_MACH_O_PPC_FLOAT_STATE = 2, + BFD_MACH_O_PPC_EXCEPTION_STATE = 3, + BFD_MACH_O_PPC_VECTOR_STATE = 4, + BFD_MACH_O_PPC_THREAD_STATE64 = 5, + BFD_MACH_O_PPC_EXCEPTION_STATE64 = 6, + BFD_MACH_O_PPC_THREAD_STATE_NONE = 7 } bfd_mach_o_ppc_thread_flavour; /* Defined in */ typedef enum bfd_mach_o_i386_thread_flavour { - BFD_MACH_O_x86_THREAD_STATE32 = 1, - BFD_MACH_O_x86_FLOAT_STATE32 = 2, + BFD_MACH_O_x86_THREAD_STATE32 = 1, + BFD_MACH_O_x86_FLOAT_STATE32 = 2, BFD_MACH_O_x86_EXCEPTION_STATE32 = 3, - BFD_MACH_O_x86_THREAD_STATE64 = 4, - BFD_MACH_O_x86_FLOAT_STATE64 = 5, + BFD_MACH_O_x86_THREAD_STATE64 = 4, + BFD_MACH_O_x86_FLOAT_STATE64 = 5, BFD_MACH_O_x86_EXCEPTION_STATE64 = 6, - BFD_MACH_O_x86_THREAD_STATE = 7, - BFD_MACH_O_x86_FLOAT_STATE = 8, - BFD_MACH_O_x86_EXCEPTION_STATE = 9, - BFD_MACH_O_x86_DEBUG_STATE32 = 10, - BFD_MACH_O_x86_DEBUG_STATE64 = 11, - BFD_MACH_O_x86_DEBUG_STATE = 12, - BFD_MACH_O_THREAD_STATE_NONE = 13 + BFD_MACH_O_x86_THREAD_STATE = 7, + BFD_MACH_O_x86_FLOAT_STATE = 8, + BFD_MACH_O_x86_EXCEPTION_STATE = 9, + BFD_MACH_O_x86_DEBUG_STATE32 = 10, + BFD_MACH_O_x86_DEBUG_STATE64 = 11, + BFD_MACH_O_x86_DEBUG_STATE = 12, + BFD_MACH_O_x86_THREAD_STATE_NONE = 13 } bfd_mach_o_i386_thread_flavour; @@ -109,7 +132,8 @@ typedef enum bfd_mach_o_load_command_type BFD_MACH_O_LC_SEGMENT_SPLIT_INFO = 0x1e, /* Local of info to split seg. */ BFD_MACH_O_LC_REEXPORT_DYLIB = 0x1f, /* Load and re-export lib. */ BFD_MACH_O_LC_LAZY_LOAD_DYLIB = 0x20, /* Delay load of lib until use. */ - BFD_MACH_O_LC_ENCRYPTION_INFO = 0x21 /* Encrypted segment info. */ + BFD_MACH_O_LC_ENCRYPTION_INFO = 0x21, /* Encrypted segment info. */ + BFD_MACH_O_LC_DYLD_INFO = 0x22 /* Compressed dyld information. */ } bfd_mach_o_load_command_type; @@ -134,19 +158,55 @@ typedef enum bfd_mach_o_cpu_type } bfd_mach_o_cpu_type; +typedef enum bfd_mach_o_cpu_subtype +{ + BFD_MACH_O_CPU_SUBTYPE_X86_ALL = 3 +} +bfd_mach_o_cpu_subtype; + typedef enum bfd_mach_o_filetype { - BFD_MACH_O_MH_OBJECT = 1, - BFD_MACH_O_MH_EXECUTE = 2, - BFD_MACH_O_MH_FVMLIB = 3, - BFD_MACH_O_MH_CORE = 4, - BFD_MACH_O_MH_PRELOAD = 5, - BFD_MACH_O_MH_DYLIB = 6, - BFD_MACH_O_MH_DYLINKER = 7, - BFD_MACH_O_MH_BUNDLE = 8 + BFD_MACH_O_MH_OBJECT = 0x01, + BFD_MACH_O_MH_EXECUTE = 0x02, + BFD_MACH_O_MH_FVMLIB = 0x03, + BFD_MACH_O_MH_CORE = 0x04, + BFD_MACH_O_MH_PRELOAD = 0x05, + BFD_MACH_O_MH_DYLIB = 0x06, + BFD_MACH_O_MH_DYLINKER = 0x07, + BFD_MACH_O_MH_BUNDLE = 0x08, + BFD_MACH_O_MH_DYLIB_STUB = 0x09, + BFD_MACH_O_MH_DSYM = 0x0a, + BFD_MACH_O_MH_KEXT_BUNDLE = 0x0b } bfd_mach_o_filetype; +typedef enum bfd_mach_o_header_flags +{ + BFD_MACH_O_MH_NOUNDEFS = 0x000001, + BFD_MACH_O_MH_INCRLINK = 0x000002, + BFD_MACH_O_MH_DYLDLINK = 0x000004, + BFD_MACH_O_MH_BINDATLOAD = 0x000008, + BFD_MACH_O_MH_PREBOUND = 0x000010, + BFD_MACH_O_MH_SPLIT_SEGS = 0x000020, + BFD_MACH_O_MH_LAZY_INIT = 0x000040, + BFD_MACH_O_MH_TWOLEVEL = 0x000080, + BFD_MACH_O_MH_FORCE_FLAT = 0x000100, + BFD_MACH_O_MH_NOMULTIDEFS = 0x000200, + BFD_MACH_O_MH_NOFIXPREBINDING = 0x000400, + BFD_MACH_O_MH_PREBINDABLE = 0x000800, + BFD_MACH_O_MH_ALLMODSBOUND = 0x001000, + BFD_MACH_O_MH_SUBSECTIONS_VIA_SYMBOLS = 0x002000, + BFD_MACH_O_MH_CANONICAL = 0x004000, + BFD_MACH_O_MH_WEAK_DEFINES = 0x008000, + BFD_MACH_O_MH_BINDS_TO_WEAK = 0x010000, + BFD_MACH_O_MH_ALLOW_STACK_EXECUTION = 0x020000, + BFD_MACH_O_MH_ROOT_SAFE = 0x040000, + BFD_MACH_O_MH_SETUID_SAFE = 0x080000, + BFD_MACH_O_MH_NO_REEXPORTED_DYLIBS = 0x100000, + BFD_MACH_O_MH_PIE = 0x200000 +} +bfd_mach_o_header_flags; + /* Constants for the type of a section. */ typedef enum bfd_mach_o_section_type @@ -188,11 +248,33 @@ typedef enum bfd_mach_o_section_type /* Section with only lazy symbol pointers. */ BFD_MACH_O_S_LAZY_SYMBOL_POINTERS = 0x7, - /* Section with only symbol stubs, byte size of stub in the reserved2 field. */ + /* Section with only symbol stubs, byte size of stub in the reserved2 + field. */ BFD_MACH_O_S_SYMBOL_STUBS = 0x8, /* Section with only function pointers for initialization. */ - BFD_MACH_O_S_MOD_INIT_FUNC_POINTERS = 0x9 + BFD_MACH_O_S_MOD_INIT_FUNC_POINTERS = 0x9, + + /* Section with only function pointers for termination. */ + BFD_MACH_O_S_MOD_FINI_FUNC_POINTERS = 0xa, + + /* Section contains symbols that are coalesced by the linkers. */ + BFD_MACH_O_S_COALESCED = 0xb, + + /* Zero fill on demand section (possibly larger than 4 GB). */ + BFD_MACH_O_S_GB_ZEROFILL = 0xc, + + /* Section with only pairs of function pointers for interposing. */ + BFD_MACH_O_S_INTERPOSING = 0xd, + + /* Section with only 16 byte literals. */ + BFD_MACH_O_S_16BYTE_LITERALS = 0xe, + + /* Section contains DTrace Object Format. */ + BFD_MACH_O_S_DTRACE_DOF = 0xf, + + /* Section with only lazy symbol pointers to lazy loaded dylibs. */ + BFD_MACH_O_S_LAZY_DYLIB_SYMBOL_POINTERS = 0x10 } bfd_mach_o_section_type; @@ -211,21 +293,40 @@ bfd_mach_o_section_type; /* User attributes. */ #define BFD_MACH_O_SECTION_ATTRIBUTES_USR 0xff000000 -/* Section has local relocation entries. */ -#define BFD_MACH_O_S_ATTR_LOC_RELOC 0x00000100 +typedef enum bfd_mach_o_section_attribute +{ + /* Section has local relocation entries. */ + BFD_MACH_O_S_ATTR_LOC_RELOC = 0x00000100, -/* Section has external relocation entries. */ -#define BFD_MACH_O_S_ATTR_EXT_RELOC 0x00000200 + /* Section has external relocation entries. */ + BFD_MACH_O_S_ATTR_EXT_RELOC = 0x00000200, -/* Section contains some machine instructions. */ -#define BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS 0x00004000 + /* Section contains some machine instructions. */ + BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS = 0x00000400, -#define BFD_MACH_O_S_ATTR_DEBUG 0x02000000 + /* A debug section. */ + BFD_MACH_O_S_ATTR_DEBUG = 0x02000000, -/* Section contains only true machine instructions. */ -#define BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS 0x80000000 + /* Used with i386 stubs. */ + BFD_MACH_O_S_SELF_MODIFYING_CODE = 0x04000000, + + /* Blocks are live if they reference live blocks. */ + BFD_MACH_O_S_ATTR_LIVE_SUPPORT = 0x08000000, -typedef unsigned long bfd_mach_o_cpu_subtype; + /* No dead stripping. */ + BFD_MACH_O_S_ATTR_NO_DEAD_STRIP = 0x10000000, + + /* Section symbols can be stripped in files with MH_DYLDLINK flag. */ + BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS = 0x20000000, + + /* Section contains coalesced symbols that are not to be in the TOC of an + archive. */ + BFD_MACH_O_S_ATTR_NO_TOC = 0x40000000, + + /* Section contains only true machine instructions. */ + BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS = 0x80000000 +} +bfd_mach_o_section_attribute; typedef struct bfd_mach_o_header { @@ -243,6 +344,9 @@ typedef struct bfd_mach_o_header } bfd_mach_o_header; +#define BFD_MACH_O_HEADER_SIZE 28 +#define BFD_MACH_O_HEADER_64_SIZE 32 + typedef struct bfd_mach_o_section { asection *bfdsection; @@ -260,6 +364,8 @@ typedef struct bfd_mach_o_section unsigned long reserved3; } bfd_mach_o_section; +#define BFD_MACH_O_SECTION_SIZE 68 +#define BFD_MACH_O_SECTION_64_SIZE 80 typedef struct bfd_mach_o_segment_command { @@ -273,25 +379,81 @@ typedef struct bfd_mach_o_segment_command unsigned long nsects; unsigned long flags; bfd_mach_o_section *sections; - asection *segment; } bfd_mach_o_segment_command; +#define BFD_MACH_O_LC_SEGMENT_SIZE 56 +#define BFD_MACH_O_LC_SEGMENT_64_SIZE 72 /* Protection flags. */ #define BFD_MACH_O_PROT_READ 0x01 #define BFD_MACH_O_PROT_WRITE 0x02 #define BFD_MACH_O_PROT_EXECUTE 0x04 +/* Generic relocation types (used by i386). */ +#define BFD_MACH_O_GENERIC_RELOC_VANILLA 0 +#define BFD_MACH_O_GENERIC_RELOC_PAIR 1 +#define BFD_MACH_O_GENERIC_RELOC_SECTDIFF 2 +#define BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR 3 +#define BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF 4 + +/* Size of a relocation entry. */ +#define BFD_MACH_O_RELENT_SIZE 8 + +/* Fields for a normal (non-scattered) entry. */ +#define BFD_MACH_O_R_PCREL 0x01000000 +#define BFD_MACH_O_GET_R_LENGTH(s) (((s) >> 25) & 0x3) +#define BFD_MACH_O_R_EXTERN 0x08000000 +#define BFD_MACH_O_GET_R_TYPE(s) (((s) >> 28) & 0x0f) +#define BFD_MACH_O_GET_R_SYMBOLNUM(s) ((s) & 0x00ffffff) +#define BFD_MACH_O_SET_R_LENGTH(l) (((l) & 0x3) << 25) +#define BFD_MACH_O_SET_R_TYPE(t) (((t) & 0xf) << 28) +#define BFD_MACH_O_SET_R_SYMBOLNUM(s) ((s) & 0x00ffffff) + +/* Fields for a scattered entry. */ +#define BFD_MACH_O_SR_SCATTERED 0x80000000 +#define BFD_MACH_O_SR_PCREL 0x40000000 +#define BFD_MACH_O_GET_SR_LENGTH(s) (((s) >> 28) & 0x3) +#define BFD_MACH_O_GET_SR_TYPE(s) (((s) >> 24) & 0x0f) +#define BFD_MACH_O_GET_SR_ADDRESS(s) ((s) & 0x00ffffff) +#define BFD_MACH_O_SET_SR_LENGTH(l) (((l) & 0x3) << 28) +#define BFD_MACH_O_SET_SR_TYPE(t) (((t) & 0xf) << 24) +#define BFD_MACH_O_SET_SR_ADDRESS(s) ((s) & 0x00ffffff) + +/* Expanded internal representation of a relocation entry. */ +typedef struct bfd_mach_o_reloc_info +{ + bfd_vma r_address; + bfd_vma r_value; + unsigned int r_scattered : 1; + unsigned int r_type : 4; + unsigned int r_pcrel : 1; + unsigned int r_length : 2; + unsigned int r_extern : 1; +} +bfd_mach_o_reloc_info; + +typedef struct bfd_mach_o_asymbol +{ + /* The actual symbol which the rest of BFD works with. */ + asymbol symbol; + + /* Fields from Mach-O symbol. */ + unsigned char n_type; + unsigned char n_sect; + unsigned short n_desc; +} +bfd_mach_o_asymbol; +#define BFD_MACH_O_NLIST_SIZE 12 +#define BFD_MACH_O_NLIST_64_SIZE 16 + typedef struct bfd_mach_o_symtab_command { - unsigned long symoff; - unsigned long nsyms; - unsigned long stroff; - unsigned long strsize; - asymbol *symbols; + unsigned int symoff; + unsigned int nsyms; + unsigned int stroff; + unsigned int strsize; + bfd_mach_o_asymbol *symbols; char *strtab; - asection *stabs_segment; - asection *stabstr_segment; } bfd_mach_o_symtab_command; @@ -332,6 +494,88 @@ bfd_mach_o_symtab_command; For executable and object modules the relocation entries continue to hang off the section structures. */ +typedef struct bfd_mach_o_dylib_module +{ + /* Index into the string table indicating the name of the module. */ + unsigned long module_name_idx; + char *module_name; + + /* Index into the symbol table of the first defined external symbol provided + by the module. */ + unsigned long iextdefsym; + + /* Number of external symbols provided by this module. */ + unsigned long nextdefsym; + + /* Index into the external reference table of the first entry + provided by this module. */ + unsigned long irefsym; + + /* Number of external reference entries provided by this module. */ + unsigned long nrefsym; + + /* Index into the symbol table of the first local symbol provided by this + module. */ + unsigned long ilocalsym; + + /* Number of local symbols provided by this module. */ + unsigned long nlocalsym; + + /* Index into the external relocation table of the first entry provided + by this module. */ + unsigned long iextrel; + + /* Number of external relocation entries provided by this module. */ + unsigned long nextrel; + + /* Index in the module initialization section to the pointers for this + module. */ + unsigned short iinit; + + /* Index in the module termination section to the pointers for this + module. */ + unsigned short iterm; + + /* Number of pointers in the module initialization for this module. */ + unsigned short ninit; + + /* Number of pointers in the module termination for this module. */ + unsigned short nterm; + + /* Number of data byte for this module that are used in the __module_info + section of the __OBJC segment. */ + unsigned long objc_module_info_size; + + /* Statically linked address of the start of the data for this module + in the __module_info section of the __OBJC_segment. */ + bfd_vma objc_module_info_addr; +} +bfd_mach_o_dylib_module; +#define BFD_MACH_O_DYLIB_MODULE_SIZE 52 +#define BFD_MACH_O_DYLIB_MODULE_64_SIZE 56 + +typedef struct bfd_mach_o_dylib_table_of_content +{ + /* Index into the symbol table to the defined external symbol. */ + unsigned long symbol_index; + + /* Index into the module table to the module for this entry. */ + unsigned long module_index; +} +bfd_mach_o_dylib_table_of_content; +#define BFD_MACH_O_TABLE_OF_CONTENT_SIZE 8 + +typedef struct bfd_mach_o_dylib_reference +{ + /* Index into the symbol table for the symbol being referenced. */ + unsigned long isym; + + /* Type of the reference being made (use REFERENCE_FLAGS constants). */ + unsigned long flags; +} +bfd_mach_o_dylib_reference; +#define BFD_MACH_O_REFERENCE_SIZE 4 + typedef struct bfd_mach_o_dysymtab_command { /* The symbols indicated by symoff and nsyms of the LC_SYMTAB load command @@ -432,22 +676,30 @@ typedef struct bfd_mach_o_dysymtab_command unsigned long locreloff; /* Offset to local relocation entries. */ unsigned long nlocrel; /* Number of local relocation entries. */ + + bfd_mach_o_dylib_module *dylib_module; + bfd_mach_o_dylib_table_of_content *dylib_toc; + unsigned int *indirect_syms; + bfd_mach_o_dylib_reference *ext_refs; } bfd_mach_o_dysymtab_command; /* An indirect symbol table entry is simply a 32bit index into the symbol table to the symbol that the pointer or stub is refering to. Unless it is for a - non-lazy symbol pointer section for a defined symbol which strip(1) as + non-lazy symbol pointer section for a defined symbol which strip(1) has removed. In which case it has the value INDIRECT_SYMBOL_LOCAL. If the symbol was also absolute INDIRECT_SYMBOL_ABS is or'ed with that. */ #define BFD_MACH_O_INDIRECT_SYMBOL_LOCAL 0x80000000 #define BFD_MACH_O_INDIRECT_SYMBOL_ABS 0x40000000 +#define BFD_MACH_O_INDIRECT_SYMBOL_SIZE 4 + +/* For LC_THREAD or LC_UNIXTHREAD. */ typedef struct bfd_mach_o_thread_flavour { unsigned long flavour; - bfd_vma offset; + unsigned long offset; unsigned long size; } bfd_mach_o_thread_flavour; @@ -460,55 +712,96 @@ typedef struct bfd_mach_o_thread_command } bfd_mach_o_thread_command; +/* For LC_LOAD_DYLINKER and LC_ID_DYLINKER. */ + typedef struct bfd_mach_o_dylinker_command { - unsigned long cmd; /* LC_ID_DYLINKER or LC_LOAD_DYLINKER. */ - unsigned long cmdsize; /* Includes pathname string. */ unsigned long name_offset; /* Offset to library's path name. */ unsigned long name_len; /* Offset to library's path name. */ - asection *section; + char *name_str; } bfd_mach_o_dylinker_command; +/* For LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, LC_ID_DYLIB + or LC_REEXPORT_DYLIB. */ + typedef struct bfd_mach_o_dylib_command { - unsigned long cmd; /* LC_ID_DYLIB or LC_LOAD_DYLIB. */ - unsigned long cmdsize; /* Includes pathname string. */ unsigned long name_offset; /* Offset to library's path name. */ unsigned long name_len; /* Offset to library's path name. */ unsigned long timestamp; /* Library's build time stamp. */ unsigned long current_version; /* Library's current version number. */ unsigned long compatibility_version; /* Library's compatibility vers number. */ - asection *section; + char *name_str; } bfd_mach_o_dylib_command; +/* For LC_PREBOUND_DYLIB. */ + typedef struct bfd_mach_o_prebound_dylib_command { - unsigned long cmd; /* LC_PREBOUND_DYLIB. */ - unsigned long cmdsize; /* Includes strings. */ unsigned long name; /* Library's path name. */ unsigned long nmodules; /* Number of modules in library. */ unsigned long linked_modules; /* Bit vector of linked modules. */ - asection *section; } bfd_mach_o_prebound_dylib_command; +/* For LC_UUID. */ + typedef struct bfd_mach_o_uuid_command { - unsigned long cmd; /* LC_PREBOUND_DYLIB. */ - unsigned long cmdsize; /* Includes uuid. */ - unsigned char uuid[16]; /* Uuid. */ + unsigned char uuid[16]; asection *section; } bfd_mach_o_uuid_command; +/* For LC_CODE_SIGNATURE or LC_SEGMENT_SPLIT_INFO. */ + +typedef struct bfd_mach_o_linkedit_command +{ + unsigned long dataoff; + unsigned long datasize; +} +bfd_mach_o_linkedit_command; + +typedef struct bfd_mach_o_str_command +{ + unsigned long stroff; + unsigned long str_len; + char *str; +} +bfd_mach_o_str_command; + +typedef struct bfd_mach_o_dyld_info_command +{ + /* File offset and size to rebase info. */ + unsigned int rebase_off; + unsigned int rebase_size; + + /* File offset and size of binding info. */ + unsigned int bind_off; + unsigned int bind_size; + + /* File offset and size of weak binding info. */ + unsigned int weak_bind_off; + unsigned int weak_bind_size; + + /* File offset and size of lazy binding info. */ + unsigned int lazy_bind_off; + unsigned int lazy_bind_size; + + /* File offset and size of export info. */ + unsigned int export_off; + unsigned int export_size; +} +bfd_mach_o_dyld_info_command; + typedef struct bfd_mach_o_load_command { bfd_mach_o_load_command_type type; - unsigned int type_required; - bfd_vma offset; - bfd_vma len; + bfd_boolean type_required; + unsigned int offset; + unsigned int len; union { bfd_mach_o_segment_command segment; @@ -519,6 +812,9 @@ typedef struct bfd_mach_o_load_command bfd_mach_o_dylinker_command dylinker; bfd_mach_o_prebound_dylib_command prebound_dylib; bfd_mach_o_uuid_command uuid; + bfd_mach_o_linkedit_command linkedit; + bfd_mach_o_str_command str; + bfd_mach_o_dyld_info_command dyld_info; } command; } @@ -526,43 +822,84 @@ bfd_mach_o_load_command; typedef struct mach_o_data_struct { + /* Mach-O header. */ bfd_mach_o_header header; + /* Array of load commands (length is given by header.ncmds). */ bfd_mach_o_load_command *commands; - unsigned long nsymbols; - asymbol *symbols; + + /* Flatten array of sections. The array is 0-based. */ unsigned long nsects; bfd_mach_o_section **sections; - bfd *ibfd; -} -mach_o_data_struct; - -#define bfd_get_mach_o_data(abfd) ((abfd)->tdata.mach_o_data) - -typedef struct mach_o_data_struct bfd_mach_o_data_struct; - -bfd_boolean bfd_mach_o_valid (bfd *); -int bfd_mach_o_scan_read_symtab_symbol (bfd *, bfd_mach_o_symtab_command *, asymbol *, unsigned long); -int bfd_mach_o_scan_read_symtab_strtab (bfd *, bfd_mach_o_symtab_command *); -int bfd_mach_o_scan_read_symtab_symbols (bfd *, bfd_mach_o_symtab_command *); -int bfd_mach_o_scan_read_dysymtab_symbol (bfd *, bfd_mach_o_dysymtab_command *, bfd_mach_o_symtab_command *, asymbol *, unsigned long); -int bfd_mach_o_scan_start_address (bfd *); -int bfd_mach_o_scan (bfd *, bfd_mach_o_header *, bfd_mach_o_data_struct *); -bfd_boolean bfd_mach_o_mkobject (bfd *); -const bfd_target * bfd_mach_o_object_p (bfd *); -const bfd_target * bfd_mach_o_core_p (bfd *); -const bfd_target * bfd_mach_o_archive_p (bfd *); -bfd * bfd_mach_o_openr_next_archived_file (bfd *, bfd *); -int bfd_mach_o_lookup_section (bfd *, asection *, bfd_mach_o_load_command **, bfd_mach_o_section **); -int bfd_mach_o_lookup_command (bfd *, bfd_mach_o_load_command_type, bfd_mach_o_load_command **); -unsigned long bfd_mach_o_stack_addr (enum bfd_mach_o_cpu_type); -int bfd_mach_o_core_fetch_environment (bfd *, unsigned char **, unsigned int *); -char * bfd_mach_o_core_file_failing_command (bfd *); -int bfd_mach_o_core_file_failing_signal (bfd *); -bfd_boolean bfd_mach_o_core_file_matches_executable_p (bfd *, bfd *); + + /* Used while writting: current length of the output file. This is used + to allocate space in the file. */ + ufile_ptr filelen; + + /* As symtab is referenced by other load command, it is handy to have + a direct access to it. Also it is not clearly stated, only one symtab + is expected. */ + bfd_mach_o_symtab_command *symtab; + bfd_mach_o_dysymtab_command *dysymtab; +} +bfd_mach_o_data_struct; + +/* Target specific routines. */ +typedef struct bfd_mach_o_backend_data +{ + bfd_boolean (*_bfd_mach_o_swap_reloc_in)(arelent *, bfd_mach_o_reloc_info *); + bfd_boolean (*_bfd_mach_o_swap_reloc_out)(arelent *, bfd_mach_o_reloc_info *); + bfd_boolean (*_bfd_mach_o_print_thread)(bfd *, bfd_mach_o_thread_flavour *, + void *, char *); +} +bfd_mach_o_backend_data; + +#define bfd_mach_o_get_data(abfd) ((abfd)->tdata.mach_o_data) +#define bfd_mach_o_get_backend_data(abfd) \ + ((bfd_mach_o_backend_data*)(abfd)->xvec->backend_data) + +bfd_boolean bfd_mach_o_valid (bfd *); +int bfd_mach_o_read_dysymtab_symbol (bfd *, bfd_mach_o_dysymtab_command *, bfd_mach_o_symtab_command *, bfd_mach_o_asymbol *, unsigned long); +int bfd_mach_o_scan_start_address (bfd *); +int bfd_mach_o_scan (bfd *, bfd_mach_o_header *, bfd_mach_o_data_struct *); +bfd_boolean bfd_mach_o_mkobject_init (bfd *); +const bfd_target *bfd_mach_o_object_p (bfd *); +const bfd_target *bfd_mach_o_core_p (bfd *); +const bfd_target *bfd_mach_o_archive_p (bfd *); +bfd *bfd_mach_o_openr_next_archived_file (bfd *, bfd *); +int bfd_mach_o_lookup_section (bfd *, asection *, bfd_mach_o_load_command **, bfd_mach_o_section **); +int bfd_mach_o_lookup_command (bfd *, bfd_mach_o_load_command_type, bfd_mach_o_load_command **); +bfd_boolean bfd_mach_o_write_contents (bfd *); +bfd_boolean bfd_mach_o_bfd_copy_private_symbol_data (bfd *, asymbol *, + bfd *, asymbol *); +bfd_boolean bfd_mach_o_bfd_copy_private_section_data (bfd *, asection *, + bfd *, asection *); +bfd_boolean bfd_mach_o_bfd_copy_private_bfd_data (bfd *, bfd *); +long bfd_mach_o_get_symtab_upper_bound (bfd *); +long bfd_mach_o_canonicalize_symtab (bfd *, asymbol **); +long bfd_mach_o_get_synthetic_symtab (bfd *, long, asymbol **, long, + asymbol **, asymbol **ret); +long bfd_mach_o_get_reloc_upper_bound (bfd *, asection *); +long bfd_mach_o_canonicalize_reloc (bfd *, asection *, arelent **, asymbol **); +long bfd_mach_o_get_dynamic_reloc_upper_bound (bfd *); +long bfd_mach_o_canonicalize_dynamic_reloc (bfd *, arelent **, asymbol **); +asymbol *bfd_mach_o_make_empty_symbol (bfd *); +void bfd_mach_o_get_symbol_info (bfd *, asymbol *, symbol_info *); +void bfd_mach_o_print_symbol (bfd *, PTR, asymbol *, bfd_print_symbol_type); +bfd_boolean bfd_mach_o_bfd_print_private_bfd_data (bfd *, PTR); +int bfd_mach_o_sizeof_headers (bfd *, struct bfd_link_info *); +unsigned long bfd_mach_o_stack_addr (enum bfd_mach_o_cpu_type); +int bfd_mach_o_core_fetch_environment (bfd *, unsigned char **, unsigned int *); +char *bfd_mach_o_core_file_failing_command (bfd *); +int bfd_mach_o_core_file_failing_signal (bfd *); +bfd_boolean bfd_mach_o_core_file_matches_executable_p (bfd *, bfd *); bfd *bfd_mach_o_fat_extract (bfd *, bfd_format , const bfd_arch_info_type *); +const bfd_target *bfd_mach_o_header_p (bfd *, bfd_mach_o_filetype, + bfd_mach_o_cpu_type); +bfd_boolean bfd_mach_o_build_commands (bfd *); +bfd_boolean bfd_mach_o_set_section_contents (bfd *, asection *, const void *, + file_ptr, bfd_size_type); +unsigned int bfd_mach_o_version (bfd *); -extern const bfd_target mach_o_be_vec; -extern const bfd_target mach_o_le_vec; extern const bfd_target mach_o_fat_vec; #endif /* _BFD_MACH_O_H_ */ diff --git a/cegcc/src/binutils/bfd/makefile.vms b/cegcc/src/binutils/bfd/makefile.vms dissimilarity index 74% index 963441a62..836909858 100644 --- a/cegcc/src/binutils/bfd/makefile.vms +++ b/cegcc/src/binutils/bfd/makefile.vms @@ -1,76 +1,57 @@ -# -# Makefile for bfd library under openVMS (Alpha and Vax) -# -# For use with gnu-make for vms -# -# Created by Klaus K"ampf, kkaempf@rmi.de -# -# - -CC=cc - -ifeq ($(ARCH),ALPHA) -HOSTFILE=alphavms.h -TARGETOBJS = cpu-alpha.obj -else -HOSTFILE=vaxvms.h -TARGETOBJS = cpu-vax.obj -endif - - -OBJS=archive.obj,archive64.obj,archures.obj,bfd.obj,bfdio.obj,binary.obj,\ - cache.obj,coffgen.obj,compress.obj,corefile.obj,dwarf2.obj,elf.obj,\ - format.obj,hash.obj,ihex.obj,init.obj,libbfd.obj,linker.obj,opncls.obj,\ - reloc.obj,section.obj,simple.obj,srec.obj,stab-syms.obj,syms.obj,\ - targets.obj,tekhex.obj,\ - vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,vms-misc.obj,$(TARGETOBJS) - -ifeq ($(CC),gcc) -ifeq ($(ARCH),ALPHA) -DEFS=/define=(SELECT_VECS="&vms_alpha_vec",SELECT_ARCHITECTURES="&bfd_alpha_arch",\ -"HAVE_vms_alpha_vec=1") -else -DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\ -"HAVE_vms_vax_vec=1") -endif -CFLAGS=/include=([],[-.include])$(DEFS) -else -ifeq ($(ARCH),ALPHA) -DEFS=/define=(SELECT_VECS="&vms_alpha_vec",SELECT_ARCHITECTURES="&bfd_alpha_arch",\ -"HAVE_vms_alpha_vec=1","unlink=remove","DEBUGDIR=NULL") -else -DEFS=/define=(SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch",\ -"HAVE_vms_vax_vec=1","unlink=remove","const=") -endif -CFLAGS=/noopt/debug/show=incl/name=(as_is,shortened)/include=([],[-.include])$(DEFS)/warnings=disable=(missingreturn,longextern) -endif - - -libbfd.olb: sysdep.h bfd.h $(OBJS) - purge - lib/create libbfd $(OBJS) - -sysdep.h: [.hosts]$(HOSTFILE) config.h - $(CP) $< $@ - -bfd.h: bfd-in2.h - $$ @configure - -targmatch.h: bfd.h -config.h: bfd.h - -vms.c: vms.h -vms-mhd.c: vms.h -vms-gsd.c: vms.h -vms-tir.c: vms.h -vms-misc.c: vms.h -targets.c: targmatch.h - -clean: - $$ purge - $(RM) libbfd.olb; - $(RM) sysdep.h; - $(RM) bfd.h; - $(RM) targmatch.h; - $(RM) config.h; - $(RM) *.obj; +# +# Makefile for bfd library under openVMS +# +# For use with gnu-make for vms +# +# Created by Klaus K"ampf, kkaempf@rmi.de +# +# + +ifeq ($(ARCH),IA64) +HOSTFILE=alphavms.h +OBJS:=cpu-ia64.obj,elf64-ia64.obj,elf-strtab.obj,corefile.obj,stabs.obj,\ + merge.obj,elf-eh-frame.obj,elflink.obj,elf-attrs.obj,dwarf1.obj,elf64.obj +DEFS=SELECT_VECS="&bfd_elf64_ia64_vms_vec",SELECT_ARCHITECTURES="&bfd_ia64_arch" +endif +ifeq ($(ARCH),ALPHA) +HOSTFILE=alphavms.h +OBJS:=vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,vms-misc.obj,cpu-alpha.obj +DEFS=SELECT_VECS="&vms_alpha_vec",SELECT_ARCHITECTURES="&bfd_alpha_arch" +endif +ifeq ($(ARCH),VAX) +HOSTFILE=vaxvms.h +OBJS:=vms.obj,vms-hdr.obj,vms-gsd.obj,vms-tir.obj,vms-misc.obj,cpu-vax.obj +DEFS=SELECT_VECS="&vms_vax_vec",SELECT_ARCHITECTURES="&bfd_vax_arch" +endif + +OBJS:=$(OBJS),archive.obj,archive64.obj,archures.obj,bfd.obj,bfdio.obj,\ + binary.obj,cache.obj,coffgen.obj,compress.obj,corefile.obj,dwarf2.obj,\ + elf.obj,format.obj,hash.obj,ihex.obj,init.obj,libbfd.obj,linker.obj,\ + opncls.obj,reloc.obj,section.obj,simple.obj,srec.obj,stab-syms.obj,\ + syms.obj,targets.obj,tekhex.obj,verilog.obj + +ifeq ($(CC),gcc) +CFLAGS=/include=([],[-.include])$(DEFS) +else +OPT=/noopt/debug +CFLAGS=/name=(as_is,shortened)/include=([],"../include")\ + /define=("unlink=remove",DEBUGDIR="""GNU$$DEBUGDIR:""",$(DEFS))$(OPT) +endif + +libbfd.olb: $(OBJS) + purge + lib/create libbfd $(OBJS) + +targmatch.h: bfd.h +config.h: bfd.h +vms.c: vms.h +vms-mhd.c: vms.h +vms-gsd.c: vms.h +vms-tir.c: vms.h +vms-misc.c: vms.h +targets.c: targmatch.h + +clean: + $$ purge + $(RM) libbfd.olb; + $(RM) *.obj; diff --git a/cegcc/src/binutils/bfd/merge.c b/cegcc/src/binutils/bfd/merge.c index de1e95108..80f80b83a 100644 --- a/cegcc/src/binutils/bfd/merge.c +++ b/cegcc/src/binutils/bfd/merge.c @@ -1,5 +1,5 @@ /* SEC_MERGE support. - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Jakub Jelinek . @@ -108,7 +108,8 @@ sec_merge_hash_newfunc (struct bfd_hash_entry *entry, /* Allocate the structure if it has not already been allocated by a subclass. */ if (entry == NULL) - entry = bfd_hash_allocate (table, sizeof (struct sec_merge_hash_entry)); + entry = (struct bfd_hash_entry *) + bfd_hash_allocate (table, sizeof (struct sec_merge_hash_entry)); if (entry == NULL) return NULL; @@ -235,7 +236,7 @@ sec_merge_init (unsigned int entsize, bfd_boolean strings) { struct sec_merge_hash *table; - table = bfd_malloc (sizeof (struct sec_merge_hash)); + table = (struct sec_merge_hash *) bfd_malloc (sizeof (struct sec_merge_hash)); if (table == NULL) return NULL; @@ -293,7 +294,7 @@ sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry) if (alignment_power) { - pad = bfd_zmalloc ((bfd_size_type) 1 << alignment_power); + pad = (char *) bfd_zmalloc ((bfd_size_type) 1 << alignment_power); if (pad == NULL) return FALSE; } @@ -390,7 +391,8 @@ _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec, if (sinfo == NULL) { /* Initialize the information we need to keep track of. */ - sinfo = bfd_alloc (abfd, sizeof (struct sec_merge_info)); + sinfo = (struct sec_merge_info *) + bfd_alloc (abfd, sizeof (struct sec_merge_info)); if (sinfo == NULL) goto error_return; sinfo->next = (struct sec_merge_info *) *psinfo; @@ -601,7 +603,7 @@ merge_strings (struct sec_merge_info *sinfo) /* Now sort the strings */ amt = sinfo->htab->size * sizeof (struct sec_merge_hash_entry *); - array = bfd_malloc (amt); + array = (struct sec_merge_hash_entry **) bfd_malloc (amt); if (array == NULL) goto alloc_failure; @@ -792,6 +794,7 @@ _bfd_write_merged_section (bfd *output_bfd, asection *sec, void *psecinfo) if (secinfo->first_str == NULL) return TRUE; + /* FIXME: octets_per_byte. */ pos = sec->output_section->filepos + sec->output_offset; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0) return FALSE; diff --git a/cegcc/src/binutils/bfd/mipsbsd.c b/cegcc/src/binutils/bfd/mipsbsd.c index ea51b181f..004ef6e75 100644 --- a/cegcc/src/binutils/bfd/mipsbsd.c +++ b/cegcc/src/binutils/bfd/mipsbsd.c @@ -1,6 +1,6 @@ /* BFD backend for MIPS BSD (a.out) binaries. Copyright 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2007 Free Software Foundation, Inc. + 2005, 2007, 2009 Free Software Foundation, Inc. Written by Ralph Campbell. This file is part of BFD, the Binary File Descriptor library. @@ -23,7 +23,6 @@ /* #define ENTRY_CAN_BE_ZERO */ #define N_HEADER_IN_TEXT(x) 1 -#define N_SHARED_LIB(x) 0 #define N_TXTADDR(x) \ (N_MAGIC(x) != ZMAGIC ? (x).a_entry : /* object file or NMAGIC */\ TEXT_START_ADDR + EXEC_BYTES_SIZE /* no padding */\ diff --git a/cegcc/src/binutils/bfd/mmo.c b/cegcc/src/binutils/bfd/mmo.c index c0e808282..39cc2699e 100644 --- a/cegcc/src/binutils/bfd/mmo.c +++ b/cegcc/src/binutils/bfd/mmo.c @@ -1,5 +1,5 @@ /* BFD back-end for mmo objects (MMIX-specific object-format). - Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Written by Hans-Peter Nilsson (hp@bitrange.com). Infrastructure and other bits originally copied from srec.c and @@ -3211,6 +3211,7 @@ mmo_write_object_contents (bfd *abfd) #define mmo_bfd_discard_group bfd_generic_discard_group #define mmo_section_already_linked \ _bfd_generic_section_already_linked +#define mmo_bfd_define_common_symbol bfd_generic_define_common_symbol /* We want to copy time of creation, otherwise we'd use BFD_JUMP_TABLE_COPY (_bfd_generic). */ diff --git a/cegcc/src/binutils/bfd/newsos3.c b/cegcc/src/binutils/bfd/newsos3.c index c29416470..650901c8f 100644 --- a/cegcc/src/binutils/bfd/newsos3.c +++ b/cegcc/src/binutils/bfd/newsos3.c @@ -1,5 +1,5 @@ /* BFD back-end for NewsOS3 (Sony, 68k) binaries. - Copyright 1990, 1991, 1994, 1995, 2000, 2001, 2003, 2007 + Copyright 1990, 1991, 1994, 1995, 2000, 2001, 2003, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -29,7 +29,6 @@ #define MY(OP) CONCAT2 (newsos3_,OP) #define TARGETNAME "a.out-newsos3" #define ENTRY_CAN_BE_ZERO -#define N_SHARED_LIB(x) 0 /* Avoids warning when compiled with -Wall. */ #define DEFAULT_ARCH bfd_arch_m68k #define TARGET_IS_BIG_ENDIAN_P #define N_HEADER_IN_TEXT(x) 0 diff --git a/cegcc/src/binutils/bfd/nlm-target.h b/cegcc/src/binutils/bfd/nlm-target.h index d346dc5a1..809019066 100644 --- a/cegcc/src/binutils/bfd/nlm-target.h +++ b/cegcc/src/binutils/bfd/nlm-target.h @@ -1,6 +1,6 @@ /* Target definitions for 32/64-bit NLM (NetWare Loadable Module) Copyright 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2007 Free Software Foundation, Inc. + 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -49,6 +49,7 @@ #define nlm_bfd_is_group_section bfd_generic_is_group_section #define nlm_bfd_discard_group bfd_generic_discard_group #define nlm_section_already_linked _bfd_generic_section_already_linked +#define nlm_bfd_define_common_symbol bfd_generic_define_common_symbol #define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define nlm_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/nlm.c b/cegcc/src/binutils/bfd/nlm.c index 5cb8ac12e..eb25ab6aa 100644 --- a/cegcc/src/binutils/bfd/nlm.c +++ b/cegcc/src/binutils/bfd/nlm.c @@ -1,5 +1,5 @@ /* NLM (NetWare Loadable Module) executable support for BFD. - Copyright 1993, 1994, 2001, 2002, 2003, 2005, 2007 + Copyright 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/nlm32.c b/cegcc/src/binutils/bfd/nlm32.c index d0132b9b4..99f4b0061 100644 --- a/cegcc/src/binutils/bfd/nlm32.c +++ b/cegcc/src/binutils/bfd/nlm32.c @@ -1,5 +1,5 @@ /* NLM (NetWare Loadable Module) 32-bit executable support for BFD. - Copyright 1993, 2007 Free Software Foundation, Inc. + Copyright 1993, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/nlm64.c b/cegcc/src/binutils/bfd/nlm64.c index 6fc845c95..02d361362 100644 --- a/cegcc/src/binutils/bfd/nlm64.c +++ b/cegcc/src/binutils/bfd/nlm64.c @@ -1,5 +1,5 @@ /* NLM (NetWare Loadable Module) 64-bit executable support for BFD. - Copyright 1993, 2007 Free Software Foundation, Inc. + Copyright 1993, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/oasys.c b/cegcc/src/binutils/bfd/oasys.c index b1ca5271a..aad22a12f 100644 --- a/cegcc/src/binutils/bfd/oasys.c +++ b/cegcc/src/binutils/bfd/oasys.c @@ -1,6 +1,6 @@ /* BFD back-end for oasys objects. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001, - 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support, . This file is part of BFD, the Binary File Descriptor library. @@ -1084,12 +1084,12 @@ static asymbol * oasys_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (oasys_symbol_type); - oasys_symbol_type *new = bfd_zalloc (abfd, amt); + oasys_symbol_type *new_symbol_type = bfd_zalloc (abfd, amt); - if (!new) + if (!new_symbol_type) return NULL; - new->symbol.the_bfd = abfd; - return &new->symbol; + new_symbol_type->symbol.the_bfd = abfd; + return &new_symbol_type->symbol; } /* User should have checked the file flags; perhaps we should return @@ -1198,6 +1198,7 @@ oasys_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, #define oasys_bfd_is_group_section bfd_generic_is_group_section #define oasys_bfd_discard_group bfd_generic_discard_group #define oasys_section_already_linked _bfd_generic_section_already_linked +#define oasys_bfd_define_common_symbol bfd_generic_define_common_symbol #define oasys_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define oasys_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define oasys_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/opncls.c b/cegcc/src/binutils/bfd/opncls.c index 7be82b219..3337efe0e 100644 --- a/cegcc/src/binutils/bfd/opncls.c +++ b/cegcc/src/binutils/bfd/opncls.c @@ -1,6 +1,6 @@ /* opncls.c -- open and close a BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -52,7 +52,7 @@ _bfd_new_bfd (void) { bfd *nbfd; - nbfd = bfd_zmalloc (sizeof (bfd)); + nbfd = (bfd *) bfd_zmalloc (sizeof (bfd)); if (nbfd == NULL) return NULL; @@ -342,7 +342,7 @@ DESCRIPTION bfd * bfd_openstreamr (const char *filename, const char *target, void *streamarg) { - FILE *stream = streamarg; + FILE *stream = (FILE *) streamarg; bfd *nbfd; const bfd_target *target_vec; @@ -438,14 +438,14 @@ struct opncls static file_ptr opncls_btell (struct bfd *abfd) { - struct opncls *vec = abfd->iostream; + struct opncls *vec = (struct opncls *) abfd->iostream; return vec->where; } static int opncls_bseek (struct bfd *abfd, file_ptr offset, int whence) { - struct opncls *vec = abfd->iostream; + struct opncls *vec = (struct opncls *) abfd->iostream; switch (whence) { case SEEK_SET: vec->where = offset; break; @@ -458,7 +458,7 @@ opncls_bseek (struct bfd *abfd, file_ptr offset, int whence) static file_ptr opncls_bread (struct bfd *abfd, void *buf, file_ptr nbytes) { - struct opncls *vec = abfd->iostream; + struct opncls *vec = (struct opncls *) abfd->iostream; file_ptr nread = (vec->pread) (abfd, vec->stream, buf, nbytes, vec->where); if (nread < 0) return nread; @@ -477,7 +477,7 @@ opncls_bwrite (struct bfd *abfd ATTRIBUTE_UNUSED, static int opncls_bclose (struct bfd *abfd) { - struct opncls *vec = abfd->iostream; + struct opncls *vec = (struct opncls *) abfd->iostream; /* Since the VEC's memory is bound to the bfd deleting the bfd will free it. */ int status = 0; @@ -496,7 +496,7 @@ opncls_bflush (struct bfd *abfd ATTRIBUTE_UNUSED) static int opncls_bstat (struct bfd *abfd, struct stat *sb) { - struct opncls *vec = abfd->iostream; + struct opncls *vec = (struct opncls *) abfd->iostream; memset (sb, 0, sizeof (*sb)); if (vec->stat == NULL) @@ -505,9 +505,20 @@ opncls_bstat (struct bfd *abfd, struct stat *sb) return (vec->stat) (abfd, vec->stream, sb); } +static void * +opncls_bmmap (struct bfd *abfd ATTRIBUTE_UNUSED, + void *addr ATTRIBUTE_UNUSED, + bfd_size_type len ATTRIBUTE_UNUSED, + int prot ATTRIBUTE_UNUSED, + int flags ATTRIBUTE_UNUSED, + file_ptr offset ATTRIBUTE_UNUSED) +{ + return (void *) -1; +} + static const struct bfd_iovec opncls_iovec = { &opncls_bread, &opncls_bwrite, &opncls_btell, &opncls_bseek, - &opncls_bclose, &opncls_bflush, &opncls_bstat + &opncls_bclose, &opncls_bflush, &opncls_bstat, &opncls_bmmap }; bfd * @@ -553,7 +564,7 @@ bfd_openr_iovec (const char *filename, const char *target, return NULL; } - vec = bfd_zalloc (nbfd, sizeof (struct opncls)); + vec = (struct opncls *) bfd_zalloc (nbfd, sizeof (struct opncls)); vec->stream = stream; vec->pread = pread; vec->close = close; @@ -618,6 +629,32 @@ bfd_openw (const char *filename, const char *target) return nbfd; } +static inline void +_maybe_make_executable (bfd * abfd) +{ + /* If the file was open for writing and is now executable, + make it so. */ + if (abfd->direction == write_direction + && abfd->flags & EXEC_P) + { + struct stat buf; + + if (stat (abfd->filename, &buf) == 0 + /* Do not attempt to change non-regular files. This is + here especially for configure scripts and kernel builds + which run tests with "ld [...] -o /dev/null". */ + && S_ISREG(buf.st_mode)) + { + unsigned int mask = umask (0); + + umask (mask); + chmod (abfd->filename, + (0777 + & (buf.st_mode | ((S_IXUSR | S_IXGRP | S_IXOTH) &~ mask)))); + } + } +} + /* FUNCTION @@ -666,31 +703,23 @@ bfd_close (bfd *abfd) if (! BFD_SEND (abfd, _close_and_cleanup, (abfd))) return FALSE; - /* FIXME: cagney/2004-02-15: Need to implement a BFD_IN_MEMORY io - vector. */ - if (!(abfd->flags & BFD_IN_MEMORY)) - ret = abfd->iovec->bclose (abfd); - else - ret = TRUE; - - /* If the file was open for writing and is now executable, - make it so. */ - if (ret - && abfd->direction == write_direction - && abfd->flags & EXEC_P) + if ((abfd->flags & BFD_IN_MEMORY) != 0) { - struct stat buf; - - if (stat (abfd->filename, &buf) == 0) - { - unsigned int mask = umask (0); - - umask (mask); - chmod (abfd->filename, - (0777 - & (buf.st_mode | ((S_IXUSR | S_IXGRP | S_IXOTH) &~ mask)))); - } + /* FIXME: cagney/2004-02-15: Need to implement a BFD_IN_MEMORY io + vector. + Until that's done, at least don't leak memory. */ + struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream; + + if (bim->buffer != NULL) + free (bim->buffer); + free (bim); + ret = TRUE; } + else + ret = abfd->iovec->bclose (abfd); + + if (ret) + _maybe_make_executable (abfd); _bfd_delete_bfd (abfd); @@ -726,24 +755,8 @@ bfd_close_all_done (bfd *abfd) ret = bfd_cache_close (abfd); - /* If the file was open for writing and is now executable, - make it so. */ - if (ret - && abfd->direction == write_direction - && abfd->flags & EXEC_P) - { - struct stat buf; - - if (stat (abfd->filename, &buf) == 0) - { - unsigned int mask = umask (0); - - umask (mask); - chmod (abfd->filename, - (0777 - & (buf.st_mode | ((S_IXUSR | S_IXGRP | S_IXOTH) &~ mask)))); - } - } + if (ret) + _maybe_make_executable (abfd); _bfd_delete_bfd (abfd); @@ -808,7 +821,7 @@ bfd_make_writable (bfd *abfd) return FALSE; } - bim = bfd_malloc (sizeof (struct bfd_in_memory)); + bim = (struct bfd_in_memory *) bfd_malloc (sizeof (struct bfd_in_memory)); if (bim == NULL) return FALSE; /* bfd_error already set. */ abfd->iostream = bim; @@ -906,7 +919,7 @@ bfd_alloc (bfd *abfd, bfd_size_type size) return NULL; } - ret = objalloc_alloc (abfd->memory, (unsigned long) size); + ret = objalloc_alloc ((struct objalloc *) abfd->memory, (unsigned long) size); if (ret == NULL) bfd_set_error (bfd_error_no_memory); return ret; @@ -945,7 +958,7 @@ bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size) return NULL; } - ret = objalloc_alloc (abfd->memory, (unsigned long) size); + ret = objalloc_alloc ((struct objalloc *) abfd->memory, (unsigned long) size); if (ret == NULL) bfd_set_error (bfd_error_no_memory); return ret; @@ -1255,7 +1268,7 @@ find_separate_debug_file (bfd *abfd, const char *debug_file_directory) if (IS_DIR_SEPARATOR (abfd->filename[dirlen - 1])) break; - dir = bfd_malloc (dirlen + 1); + dir = (char *) bfd_malloc (dirlen + 1); if (dir == NULL) { free (basename); @@ -1272,11 +1285,12 @@ find_separate_debug_file (bfd *abfd, const char *debug_file_directory) break; canon_dir[canon_dirlen] = '\0'; - debugfile = bfd_malloc (strlen (debug_file_directory) + 1 - + (canon_dirlen > dirlen ? canon_dirlen : dirlen) - + strlen (".debug/") - + strlen (basename) - + 1); + debugfile = (char *) + bfd_malloc (strlen (debug_file_directory) + 1 + + (canon_dirlen > dirlen ? canon_dirlen : dirlen) + + strlen (".debug/") + + strlen (basename) + + 1); if (debugfile == NULL) { free (basename); @@ -1496,7 +1510,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd, debuglink_size &= ~3; debuglink_size += 4; - contents = bfd_malloc (debuglink_size); + contents = (char *) bfd_malloc (debuglink_size); if (contents == NULL) { /* XXX Should we delete the section from the bfd ? */ diff --git a/cegcc/src/binutils/bfd/osf-core.c b/cegcc/src/binutils/bfd/osf-core.c index c76e4475a..513e52afc 100644 --- a/cegcc/src/binutils/bfd/osf-core.c +++ b/cegcc/src/binutils/bfd/osf-core.c @@ -1,5 +1,5 @@ /* BFD back-end for OSF/1 core files. - Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002, 2003, 2004, 2006, + Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/pc532-mach.c b/cegcc/src/binutils/bfd/pc532-mach.c index f9dd3427c..b4720066d 100644 --- a/cegcc/src/binutils/bfd/pc532-mach.c +++ b/cegcc/src/binutils/bfd/pc532-mach.c @@ -1,5 +1,5 @@ /* BFD back-end for Mach3/532 a.out-ish binaries. - Copyright 1990, 1991, 1992, 1994, 1995, 2000, 2001, 2002, 2007 + Copyright 1990, 1991, 1992, 1994, 1995, 2000, 2001, 2002, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -46,7 +46,6 @@ #define SEGMENT_SIZE TARGET_PAGE_SIZE -#define N_SHARED_LIB(x) 0 #define SEGMENT_SIZE TARGET_PAGE_SIZE #define DEFAULT_ARCH bfd_arch_ns32k diff --git a/cegcc/src/binutils/bfd/pdp11.c b/cegcc/src/binutils/bfd/pdp11.c index faf7a689e..e4096f32c 100644 --- a/cegcc/src/binutils/bfd/pdp11.c +++ b/cegcc/src/binutils/bfd/pdp11.c @@ -58,9 +58,6 @@ /* The header is not included in the text segment. */ #define N_HEADER_IN_TEXT(x) 0 -/* There are no shared libraries. */ -#define N_SHARED_LIB(x) 0 - /* There is no flags field. */ #define N_FLAGS(exec) 0 @@ -1433,13 +1430,13 @@ asymbol * NAME (aout, make_empty_symbol) (bfd *abfd) { bfd_size_type amt = sizeof (aout_symbol_type); - aout_symbol_type *new = bfd_zalloc (abfd, amt); + aout_symbol_type *new_symbol_type = bfd_zalloc (abfd, amt); - if (!new) + if (!new_symbol_type) return NULL; - new->symbol.the_bfd = abfd; + new_symbol_type->symbol.the_bfd = abfd; - return &new->symbol; + return &new_symbol_type->symbol; } /* Translate a set of internal symbols into external symbols. */ diff --git a/cegcc/src/binutils/bfd/pe-arm.c b/cegcc/src/binutils/bfd/pe-arm.c index ce282fd82..4c46a7a01 100644 --- a/cegcc/src/binutils/bfd/pe-arm.c +++ b/cegcc/src/binutils/bfd/pe-arm.c @@ -1,5 +1,5 @@ /* BFD back-end for ARM PECOFF files. - Copyright 1995, 1996, 1999, 2000, 2001, 2002, 2007 + Copyright 1995, 1996, 1999, 2000, 2001, 2002, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/pe-i386.c b/cegcc/src/binutils/bfd/pe-i386.c index ec5b43e50..9da641345 100644 --- a/cegcc/src/binutils/bfd/pe-i386.c +++ b/cegcc/src/binutils/bfd/pe-i386.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 PECOFF files. - Copyright 1995, 1996, 1999, 2001, 2002, 2004, 2007 + Copyright 1995, 1996, 1999, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/pe-mcore.c b/cegcc/src/binutils/bfd/pe-mcore.c index 7b466c2f1..32791c369 100644 --- a/cegcc/src/binutils/bfd/pe-mcore.c +++ b/cegcc/src/binutils/bfd/pe-mcore.c @@ -1,5 +1,5 @@ /* BFD back-end for MCore PECOFF files. - Copyright 1999, 2002, 2007, 2008 Free Software Foundation, Inc. + Copyright 1999, 2002, 2005, 2007, 2008 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/pe-mips.c b/cegcc/src/binutils/bfd/pe-mips.c index f28a2c218..31b87f42e 100644 --- a/cegcc/src/binutils/bfd/pe-mips.c +++ b/cegcc/src/binutils/bfd/pe-mips.c @@ -1,6 +1,6 @@ /* BFD back-end for MIPS PE COFF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Modified from coff-i386.c by DJ Delorie, dj@cygnus.com @@ -22,7 +22,13 @@ MA 02110-1301, USA. */ #define COFF_WITH_PE +/* pei-mips.c may have defined this to default off (0) before + including this file, so don't redefine if that's the case. + Otherwise we're generating objects, not executable images, + so we want to define it to default on. */ +#ifndef COFF_LONG_SECTION_NAMES #define COFF_LONG_SECTION_NAMES +#endif /* COFF_LONG_SECTION_NAMES */ #define PCRELOFFSET TRUE #include "sysdep.h" diff --git a/cegcc/src/binutils/bfd/pe-ppc.c b/cegcc/src/binutils/bfd/pe-ppc.c index 8758d4490..d36fbfb91 100644 --- a/cegcc/src/binutils/bfd/pe-ppc.c +++ b/cegcc/src/binutils/bfd/pe-ppc.c @@ -1,5 +1,5 @@ /* BFD back-end for PowerPC PECOFF files. - Copyright 1995, 1996, 1999, 2001, 2007, 2008 + Copyright 1995, 1996, 1999, 2001, 2005, 2007, 2008 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/pe-sh.c b/cegcc/src/binutils/bfd/pe-sh.c index 5c3574336..dabc3fff6 100644 --- a/cegcc/src/binutils/bfd/pe-sh.c +++ b/cegcc/src/binutils/bfd/pe-sh.c @@ -1,5 +1,5 @@ /* BFD back-end for SH PECOFF files. - Copyright 1995, 2000, 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 1995, 2000, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/peXXigen.c b/cegcc/src/binutils/bfd/peXXigen.c index 0c56067c2..6ee03a758 100644 --- a/cegcc/src/binutils/bfd/peXXigen.c +++ b/cegcc/src/binutils/bfd/peXXigen.c @@ -1,6 +1,6 @@ /* Support for the generic parts of PE/PEI; the common executable parts. Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Solutions. This file is part of BFD, the Binary File Descriptor library. @@ -129,6 +129,9 @@ _bfd_XXi_swap_sym_in (bfd * abfd, void * ext1, void * in1) they will be handled somewhat correctly in the bfd code. */ if (in->n_sclass == C_SECTION) { + char namebuf[SYMNMLEN + 1]; + const char *name = NULL; + in->n_value = 0x0; /* Create synthetic empty sections as needed. DJ */ @@ -136,33 +139,38 @@ _bfd_XXi_swap_sym_in (bfd * abfd, void * ext1, void * in1) { asection *sec; - for (sec = abfd->sections; sec; sec = sec->next) - { - if (strcmp (sec->name, in->n_name) == 0) - { - in->n_scnum = sec->target_index; - break; - } - } + name = _bfd_coff_internal_syment_name (abfd, in, namebuf); + if (name == NULL) + /* FIXME: Return error. */ + abort (); + sec = bfd_get_section_by_name (abfd, name); + if (sec != NULL) + in->n_scnum = sec->target_index; } if (in->n_scnum == 0) { int unused_section_number = 0; asection *sec; - char *name; flagword flags; for (sec = abfd->sections; sec; sec = sec->next) if (unused_section_number <= sec->target_index) unused_section_number = sec->target_index + 1; - name = bfd_alloc (abfd, (bfd_size_type) strlen (in->n_name) + 10); - if (name == NULL) - return; - strcpy (name, in->n_name); + if (name == namebuf) + { + name = (const char *) bfd_alloc (abfd, strlen (namebuf) + 1); + if (name == NULL) + /* FIXME: Return error. */ + abort (); + strcpy ((char *) name, namebuf); + } flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_DATA | SEC_LOAD; sec = bfd_make_section_anyway_with_flags (abfd, name, flags); + if (sec == NULL) + /* FIXME: Return error. */ + abort (); sec->vma = 0; sec->lma = 0; @@ -223,7 +231,7 @@ void _bfd_XXi_swap_aux_in (bfd * abfd, void * ext1, int type, - int class, + int in_class, int indx ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED, void * in1) @@ -231,7 +239,7 @@ _bfd_XXi_swap_aux_in (bfd * abfd, AUXENT *ext = (AUXENT *) ext1; union internal_auxent *in = (union internal_auxent *) in1; - switch (class) + switch (in_class) { case C_FILE: if (ext->x_file.x_fname[0] == 0) @@ -262,7 +270,8 @@ _bfd_XXi_swap_aux_in (bfd * abfd, in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx); in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx); - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext); in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext); @@ -294,7 +303,7 @@ unsigned int _bfd_XXi_swap_aux_out (bfd * abfd, void * inp, int type, - int class, + int in_class, int indx ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED, void * extp) @@ -304,7 +313,7 @@ _bfd_XXi_swap_aux_out (bfd * abfd, memset (ext, 0, AUXESZ); - switch (class) + switch (in_class) { case C_FILE: if (in->x_file.x_fname[0] == 0) @@ -336,7 +345,8 @@ _bfd_XXi_swap_aux_out (bfd * abfd, H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx); H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx); - if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class)) + if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type) + || ISTAG (in_class)) { PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext); @@ -540,17 +550,6 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out) bfd_vma sa, fa, ib; IMAGE_DATA_DIRECTORY idata2, idata5, tls; - if (pe->force_minimum_alignment) - { - if (!extra->FileAlignment) - extra->FileAlignment = PE_DEF_FILE_ALIGNMENT; - if (!extra->SectionAlignment) - extra->SectionAlignment = PE_DEF_SECTION_ALIGNMENT; - } - - if (extra->Subsystem == IMAGE_SUBSYSTEM_UNKNOWN) - extra->Subsystem = pe->target_subsystem; - sa = extra->SectionAlignment; fa = extra->FileAlignment; ib = extra->ImageBase; @@ -879,7 +878,7 @@ _bfd_XXi_swap_scnhdr_out (bfd * abfd, void * in, void * out) sometimes). */ if ((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0) { - if (bfd_pe_executable_p (abfd)) + if (bfd_pei_p (abfd)) { ps = scnhdr_int->s_size; ss = 0; @@ -892,7 +891,7 @@ _bfd_XXi_swap_scnhdr_out (bfd * abfd, void * in, void * out) } else { - if (bfd_pe_executable_p (abfd)) + if (bfd_pei_p (abfd)) ps = scnhdr_int->s_paddr; else ps = 0; @@ -1264,7 +1263,7 @@ pe_print_idata (bfd * abfd, void * vfile) else { ft_idx = first_thunk - (ft_section->vma - extra->ImageBase); - ft_data = bfd_malloc (datasize); + ft_data = (bfd_byte *) bfd_malloc (datasize); if (ft_data == NULL) continue; @@ -1433,7 +1432,7 @@ pe_print_edata (bfd * abfd, void * vfile) fprintf (file, _("\nThere is an export table in %s at 0x%lx\n"), section->name, (unsigned long) addr); - data = bfd_malloc (datasize); + data = (bfd_byte *) bfd_malloc (datasize); if (data == NULL) return FALSE; @@ -1472,7 +1471,7 @@ pe_print_edata (bfd * abfd, void * vfile) fprintf (file, _("Name \t\t\t\t")); - fprintf_vma (file, edt.name); + bfd_fprintf_vma (abfd, file, edt.name); fprintf (file, " %s\n", data + edt.name - adj); @@ -1494,17 +1493,17 @@ pe_print_edata (bfd * abfd, void * vfile) fprintf (file, _("\tExport Address Table \t\t")); - fprintf_vma (file, edt.eat_addr); + bfd_fprintf_vma (abfd, file, edt.eat_addr); fprintf (file, "\n"); fprintf (file, _("\tName Pointer Table \t\t")); - fprintf_vma (file, edt.npt_addr); + bfd_fprintf_vma (abfd, file, edt.npt_addr); fprintf (file, "\n"); fprintf (file, _("\tOrdinal Table \t\t\t")); - fprintf_vma (file, edt.ot_addr); + bfd_fprintf_vma (abfd, file, edt.ot_addr); fprintf (file, "\n"); /* The next table to find is the Export Address Table. It's basically @@ -1669,14 +1668,14 @@ pe_print_pdata (bfd * abfd, void * vfile) prolog_end_addr &= ~(bfd_vma) 0x3; fputc (' ', file); - fprintf_vma (file, i + section->vma); fputc ('\t', file); - fprintf_vma (file, begin_addr); fputc (' ', file); - fprintf_vma (file, end_addr); fputc (' ', file); - fprintf_vma (file, eh_handler); + bfd_fprintf_vma (abfd, file, i + section->vma); fputc ('\t', file); + bfd_fprintf_vma (abfd, file, begin_addr); fputc (' ', file); + bfd_fprintf_vma (abfd, file, end_addr); fputc (' ', file); + bfd_fprintf_vma (abfd, file, eh_handler); #if !defined(COFF_WITH_pep) || defined(COFF_WITH_pex64) fputc (' ', file); - fprintf_vma (file, eh_data); fputc (' ', file); - fprintf_vma (file, prolog_end_addr); + bfd_fprintf_vma (abfd, file, eh_data); fputc (' ', file); + bfd_fprintf_vma (abfd, file, prolog_end_addr); fprintf (file, " %x", em_data); #endif @@ -1737,7 +1736,7 @@ slurp_symtab (bfd *abfd, sym_cache *psc) if (storage < 0) return NULL; if (storage) - sy = bfd_malloc (storage); + sy = (asymbol **) bfd_malloc (storage); psc->symcount = bfd_canonicalize_symtab (abfd, sy); if (psc->symcount < 0) @@ -1841,10 +1840,10 @@ _bfd_XX_print_ce_compressed_pdata (bfd * abfd, void * vfile) exception_flag = (int)((other_data & 0x80000000) >> 31); fputc (' ', file); - fprintf_vma (file, i + section->vma); fputc ('\t', file); - fprintf_vma (file, begin_addr); fputc (' ', file); - fprintf_vma (file, prolog_length); fputc (' ', file); - fprintf_vma (file, function_length); fputc (' ', file); + bfd_fprintf_vma (abfd, file, i + section->vma); fputc ('\t', file); + bfd_fprintf_vma (abfd, file, begin_addr); fputc (' ', file); + bfd_fprintf_vma (abfd, file, prolog_length); fputc (' ', file); + bfd_fprintf_vma (abfd, file, function_length); fputc (' ', file); fprintf (file, "%2d %2d ", flag32bit, exception_flag); /* Get the exception handler's address and the data passed from the @@ -1858,7 +1857,7 @@ _bfd_XX_print_ce_compressed_pdata (bfd * abfd, void * vfile) { int xx = (begin_addr - 8) - tsection->vma; - tdata = bfd_malloc (8); + tdata = (bfd_byte *) bfd_malloc (8); if (bfd_get_section_contents (abfd, tsection, tdata, (bfd_vma) xx, 8)) { bfd_vma eh, eh_data; @@ -1894,6 +1893,7 @@ _bfd_XX_print_ce_compressed_pdata (bfd * abfd, void * vfile) return TRUE; #undef PDATA_ROW_SIZE } + #define IMAGE_REL_BASED_HIGHADJ 4 static const char * const tbl[] = @@ -2070,21 +2070,21 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile) fprintf (file, "SizeOfUninitializedData\t%08lx\n", (unsigned long) i->SizeOfUninitializedData); fprintf (file, "AddressOfEntryPoint\t"); - fprintf_vma (file, i->AddressOfEntryPoint); + bfd_fprintf_vma (abfd, file, i->AddressOfEntryPoint); fprintf (file, "\nBaseOfCode\t\t"); - fprintf_vma (file, i->BaseOfCode); + bfd_fprintf_vma (abfd, file, i->BaseOfCode); #if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64) /* PE32+ does not have BaseOfData member! */ fprintf (file, "\nBaseOfData\t\t"); - fprintf_vma (file, i->BaseOfData); + bfd_fprintf_vma (abfd, file, i->BaseOfData); #endif fprintf (file, "\nImageBase\t\t"); - fprintf_vma (file, i->ImageBase); + bfd_fprintf_vma (abfd, file, i->ImageBase); fprintf (file, "\nSectionAlignment\t"); - fprintf_vma (file, i->SectionAlignment); + bfd_fprintf_vma (abfd, file, i->SectionAlignment); fprintf (file, "\nFileAlignment\t\t"); - fprintf_vma (file, i->FileAlignment); + bfd_fprintf_vma (abfd, file, i->FileAlignment); fprintf (file, "\nMajorOSystemVersion\t%d\n", i->MajorOperatingSystemVersion); fprintf (file, "MinorOSystemVersion\t%d\n", i->MinorOperatingSystemVersion); fprintf (file, "MajorImageVersion\t%d\n", i->MajorImageVersion); @@ -2116,6 +2116,7 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile) case IMAGE_SUBSYSTEM_WINDOWS_CE_GUI: subsystem_name = "Wince CUI"; break; + // These are from UEFI Platform Initialization Specification 1.1. case IMAGE_SUBSYSTEM_EFI_APPLICATION: subsystem_name = "EFI application"; break; @@ -2125,10 +2126,10 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile) case IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER: subsystem_name = "EFI runtime driver"; break; - // These are from revision 8.0 of the MS PE/COFF spec - case IMAGE_SUBSYSTEM_EFI_ROM: - subsystem_name = "EFI ROM"; + case IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER: + subsystem_name = "SAL runtime driver"; break; + // This is from revision 8.0 of the MS PE/COFF spec case IMAGE_SUBSYSTEM_XBOX: subsystem_name = "XBOX"; break; @@ -2142,13 +2143,13 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile) fprintf (file, "\t(%s)", subsystem_name); fprintf (file, "\nDllCharacteristics\t%08x\n", i->DllCharacteristics); fprintf (file, "SizeOfStackReserve\t"); - fprintf_vma (file, i->SizeOfStackReserve); + bfd_fprintf_vma (abfd, file, i->SizeOfStackReserve); fprintf (file, "\nSizeOfStackCommit\t"); - fprintf_vma (file, i->SizeOfStackCommit); + bfd_fprintf_vma (abfd, file, i->SizeOfStackCommit); fprintf (file, "\nSizeOfHeapReserve\t"); - fprintf_vma (file, i->SizeOfHeapReserve); + bfd_fprintf_vma (abfd, file, i->SizeOfHeapReserve); fprintf (file, "\nSizeOfHeapCommit\t"); - fprintf_vma (file, i->SizeOfHeapCommit); + bfd_fprintf_vma (abfd, file, i->SizeOfHeapCommit); fprintf (file, "\nLoaderFlags\t\t%08lx\n", (unsigned long) i->LoaderFlags); fprintf (file, "NumberOfRvaAndSizes\t%08lx\n", (unsigned long) i->NumberOfRvaAndSizes); @@ -2157,7 +2158,7 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile) for (j = 0; j < IMAGE_NUMBEROF_DIRECTORY_ENTRIES; j++) { fprintf (file, "Entry %1x ", j); - fprintf_vma (file, i->DataDirectory[j].VirtualAddress); + bfd_fprintf_vma (abfd, file, i->DataDirectory[j].VirtualAddress); fprintf (file, " %08lx ", (unsigned long) i->DataDirectory[j].Size); fprintf (file, "%s\n", dir_names[j]); } @@ -2189,7 +2190,7 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd) ipe = pe_data (ibfd); ope = pe_data (obfd); - ope->pe_opthdr = ipe->pe_opthdr; + /* pe_opthdr is copied in copy_object. */ ope->dll = ipe->dll; /* Don't copy input subsystem if output is different from input. */ @@ -2277,7 +2278,9 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) /* PR ld/2729: We cannot rely upon all the output sections having been created properly, so check before referencing them. Issue a warning message for any sections tht could not be found. */ - if (h1->root.u.def.section != NULL + if ((h1->root.type == bfd_link_hash_defined + || h1->root.type == bfd_link_hash_defweak) + && h1->root.u.def.section != NULL && h1->root.u.def.section->output_section != NULL) pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_TABLE].VirtualAddress = (h1->root.u.def.value @@ -2294,6 +2297,8 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) h1 = coff_link_hash_lookup (coff_hash_table (info), ".idata$4", FALSE, FALSE, TRUE); if (h1 != NULL + && (h1->root.type == bfd_link_hash_defined + || h1->root.type == bfd_link_hash_defweak) && h1->root.u.def.section != NULL && h1->root.u.def.section->output_section != NULL) pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_TABLE].Size = @@ -2314,6 +2319,8 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) h1 = coff_link_hash_lookup (coff_hash_table (info), ".idata$5", FALSE, FALSE, TRUE); if (h1 != NULL + && (h1->root.type == bfd_link_hash_defined + || h1->root.type == bfd_link_hash_defweak) && h1->root.u.def.section != NULL && h1->root.u.def.section->output_section != NULL) pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_ADDRESS_TABLE].VirtualAddress = @@ -2331,6 +2338,8 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) h1 = coff_link_hash_lookup (coff_hash_table (info), ".idata$6", FALSE, FALSE, TRUE); if (h1 != NULL + && (h1->root.type == bfd_link_hash_defined + || h1->root.type == bfd_link_hash_defweak) && h1->root.u.def.section != NULL && h1->root.u.def.section->output_section != NULL) pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_ADDRESS_TABLE].Size = @@ -2351,7 +2360,9 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) "__tls_used", FALSE, FALSE, TRUE); if (h1 != NULL) { - if (h1->root.u.def.section != NULL + if ((h1->root.type == bfd_link_hash_defined + || h1->root.type == bfd_link_hash_defweak) + && h1->root.u.def.section != NULL && h1->root.u.def.section->output_section != NULL) pe_data (abfd)->pe_opthdr.DataDirectory[PE_TLS_TABLE].VirtualAddress = (h1->root.u.def.value diff --git a/cegcc/src/binutils/bfd/pef.c b/cegcc/src/binutils/bfd/pef.c index b83909514..4fcae1e54 100644 --- a/cegcc/src/binutils/bfd/pef.c +++ b/cegcc/src/binutils/bfd/pef.c @@ -1,5 +1,5 @@ /* PEF support for BFD. - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -52,6 +52,7 @@ #define bfd_pef_bfd_is_group_section bfd_generic_is_group_section #define bfd_pef_bfd_discard_group bfd_generic_discard_group #define bfd_pef_section_already_linked _bfd_generic_section_already_linked +#define bfd_pef_bfd_define_common_symbol bfd_generic_define_common_symbol #define bfd_pef_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define bfd_pef_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define bfd_pef_bfd_link_add_symbols _bfd_generic_link_add_symbols @@ -360,7 +361,7 @@ bfd_pef_parse_imported_symbol (bfd *abfd ATTRIBUTE_UNUSED, BFD_ASSERT (len == 4); value = bfd_getb32 (buf); - symbol->class = value >> 24; + symbol->symbol_class = value >> 24; symbol->name = value & 0x00ffffff; return 0; diff --git a/cegcc/src/binutils/bfd/pef.h b/cegcc/src/binutils/bfd/pef.h index 4d80648cc..db8d18cfe 100644 --- a/cegcc/src/binutils/bfd/pef.h +++ b/cegcc/src/binutils/bfd/pef.h @@ -1,5 +1,5 @@ /* PEF support for BFD. - Copyright 1999, 2000, 2001, 2002, 2007 + Copyright 1999, 2000, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -79,7 +79,7 @@ enum bfd_pef_imported_library_options struct bfd_pef_imported_symbol { - unsigned char class; + unsigned char symbol_class; unsigned long name; }; typedef struct bfd_pef_imported_symbol bfd_pef_imported_symbol; diff --git a/cegcc/src/binutils/bfd/pei-arm.c b/cegcc/src/binutils/bfd/pei-arm.c index 0b56bcbbc..21c37a3c2 100644 --- a/cegcc/src/binutils/bfd/pei-arm.c +++ b/cegcc/src/binutils/bfd/pei-arm.c @@ -1,5 +1,6 @@ /* BFD back-end for arm PE IMAGE COFF files. - Copyright 1995, 1996, 1999, 2002, 2007 Free Software Foundation, Inc. + Copyright 1995, 1996, 1999, 2002, 2005, 2006, 2007, 2009 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -31,7 +32,8 @@ #define COFF_IMAGE_WITH_PE #define COFF_WITH_PE #define PCRELOFFSET TRUE -#define COFF_LONG_SECTION_NAMES +/* Long section names not allowed in executable images, only object files. */ +#define COFF_LONG_SECTION_NAMES 0 #define COFF_SECTION_ALIGNMENT_ENTRIES \ { COFF_SECTION_NAME_EXACT_MATCH (".bss"), \ diff --git a/cegcc/src/binutils/bfd/pei-i386.c b/cegcc/src/binutils/bfd/pei-i386.c index 35e9f69f6..d17dd65ff 100644 --- a/cegcc/src/binutils/bfd/pei-i386.c +++ b/cegcc/src/binutils/bfd/pei-i386.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 PE IMAGE COFF files. - Copyright 1995, 1996, 1999, 2002, 2004, 2007 + Copyright 1995, 1996, 1999, 2002, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -28,7 +28,8 @@ #define COFF_WITH_PE #define PCRELOFFSET TRUE #define TARGET_UNDERSCORE '_' -#define COFF_LONG_SECTION_NAMES +/* Long section names not allowed in executable images, only object files. */ +#define COFF_LONG_SECTION_NAMES 0 #define COFF_SUPPORT_GNU_LINKONCE #define COFF_LONG_FILENAMES diff --git a/cegcc/src/binutils/bfd/pei-mcore.c b/cegcc/src/binutils/bfd/pei-mcore.c index 209c9fa3a..bad8108f5 100644 --- a/cegcc/src/binutils/bfd/pei-mcore.c +++ b/cegcc/src/binutils/bfd/pei-mcore.c @@ -1,5 +1,6 @@ /* BFD back-end for MCore PECOFF files. - Copyright 1999, 2002, 2007, 2008 Free Software Foundation, Inc. + Copyright 1999, 2002, 2005, 2007, 2008, 2009 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -31,7 +32,8 @@ #define COFF_IMAGE_WITH_PE #define COFF_WITH_PE #define PCRELOFFSET TRUE -#define COFF_LONG_SECTION_NAMES +/* Long section names not allowed in executable images, only object files. */ +#define COFF_LONG_SECTION_NAMES 0 #define MCORE_PE diff --git a/cegcc/src/binutils/bfd/pei-mips.c b/cegcc/src/binutils/bfd/pei-mips.c index 809d75481..cb5e96219 100644 --- a/cegcc/src/binutils/bfd/pei-mips.c +++ b/cegcc/src/binutils/bfd/pei-mips.c @@ -1,5 +1,6 @@ /* BFD back-end for MIPS PE IMAGE COFF files. - Copyright 1995, 2000, 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 1995, 2000, 2001, 2002, 2005, 2007, 2009 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -25,7 +26,8 @@ #define TARGET_NAME "pei-mips" #define COFF_IMAGE_WITH_PE #define PCRELOFFSET TRUE -#define COFF_LONG_SECTION_NAMES +/* Long section names not allowed in executable images, only object files. */ +#define COFF_LONG_SECTION_NAMES 0 #include "pe-mips.c" diff --git a/cegcc/src/binutils/bfd/pei-ppc.c b/cegcc/src/binutils/bfd/pei-ppc.c index 420e33e3a..671b2ceaf 100644 --- a/cegcc/src/binutils/bfd/pei-ppc.c +++ b/cegcc/src/binutils/bfd/pei-ppc.c @@ -1,5 +1,6 @@ /* BFD back-end for PowerPC PE IMAGE COFF files. - Copyright 1995, 1996, 1999, 2007, 2008 Free Software Foundation, Inc. + Copyright 1995, 1996, 1999, 2005, 2007, 2008, 2009 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -35,7 +36,8 @@ #define COFF_IMAGE_WITH_PE #define COFF_WITH_PE -#define COFF_LONG_SECTION_NAMES +/* Long section names not allowed in executable images, only object files. */ +#define COFF_LONG_SECTION_NAMES 0 /* FIXME: Verify PCRELOFFSET is always false */ diff --git a/cegcc/src/binutils/bfd/pei-sh.c b/cegcc/src/binutils/bfd/pei-sh.c index 56c9b18ef..a7975d8f0 100644 --- a/cegcc/src/binutils/bfd/pei-sh.c +++ b/cegcc/src/binutils/bfd/pei-sh.c @@ -1,5 +1,6 @@ /* BFD back-end for SH PE IMAGE COFF files. - Copyright 1995, 2000, 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 1995, 2000, 2001, 2002, 2005, 2007, 2009 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -28,7 +29,8 @@ #define COFF_WITH_PE #define PCRELOFFSET TRUE #define TARGET_UNDERSCORE '_' -#define COFF_LONG_SECTION_NAMES +/* Long section names not allowed in executable images, only object files. */ +#define COFF_LONG_SECTION_NAMES 0 #include "coff-sh.c" diff --git a/cegcc/src/binutils/bfd/pei-x86_64.c b/cegcc/src/binutils/bfd/pei-x86_64.c index f4dd3e17e..f5b8abdc8 100644 --- a/cegcc/src/binutils/bfd/pei-x86_64.c +++ b/cegcc/src/binutils/bfd/pei-x86_64.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 PE IMAGE COFF files. - Copyright 2006, 2007 Free Software Foundation, Inc. + Copyright 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -30,9 +30,11 @@ #define COFF_WITH_pex64 #define PCRELOFFSET TRUE #define TARGET_UNDERSCORE '_' -#define COFF_LONG_SECTION_NAMES +/* Long section names not allowed in executable images, only object files. */ +#define COFF_LONG_SECTION_NAMES 0 #define COFF_SUPPORT_GNU_LINKONCE #define COFF_LONG_FILENAMES +#define PDATA_ROW_SIZE (3 * 4) #define COFF_SECTION_ALIGNMENT_ENTRIES \ { COFF_SECTION_NAME_EXACT_MATCH (".bss"), \ @@ -52,4 +54,478 @@ { COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 } +/* Note we have to make sure not to include headers twice. + Not all headers are wrapped in #ifdef guards, so we define + PEI_HEADERS to prevent double including in coff-x86_64.c */ +#define PEI_HEADERS +#include "sysdep.h" +#include "bfd.h" +#include "libbfd.h" +#include "coff/x86_64.h" +#include "coff/internal.h" +#include "coff/pe.h" +#include "libcoff.h" +#include "libpei.h" +#include "libiberty.h" + +#undef AOUTSZ +#define AOUTSZ PEPAOUTSZ +#define PEAOUTHDR PEPAOUTHDR + +static const char *pex_regs[16] = { + "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", + "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" +}; + +static void +pex64_get_runtime_function (bfd *abfd, struct pex64_runtime_function *rf, + const void *data) +{ + const struct external_pex64_runtime_function *ex_rf = + (const struct external_pex64_runtime_function *) data; + rf->rva_BeginAddress = bfd_get_32 (abfd, ex_rf->rva_BeginAddress); + rf->rva_EndAddress = bfd_get_32 (abfd, ex_rf->rva_EndAddress); + rf->rva_UnwindData = bfd_get_32 (abfd, ex_rf->rva_UnwindData); + rf->isChained = PEX64_IS_RUNTIME_FUNCTION_CHAINED (rf); + rf->rva_UnwindData = PEX64_GET_UNWINDDATA_UNIFIED_RVA (rf); +} + +static void +pex64_get_unwind_info (bfd *abfd, struct pex64_unwind_info *ui, void *data) +{ + struct external_pex64_unwind_info *ex_ui = + (struct external_pex64_unwind_info *) data; + bfd_byte *ex_dta = (bfd_byte *) data; + + memset (ui, 0, sizeof (struct pex64_unwind_info)); + ui->Version = PEX64_UWI_VERSION (ex_ui->Version_Flags); + ui->Flags = PEX64_UWI_FLAGS (ex_ui->Version_Flags); + ui->SizeOfPrologue = (bfd_vma) ex_ui->SizeOfPrologue; + ui->CountOfCodes = (bfd_vma) ex_ui->CountOfCodes; + ui->FrameRegister = PEX64_UWI_FRAMEREG (ex_ui->FrameRegisterOffset); + ui->FrameOffset = PEX64_UWI_FRAMEOFF (ex_ui->FrameRegisterOffset); + ui->sizeofUnwindCodes = PEX64_UWI_SIZEOF_UWCODE_ARRAY (ui->CountOfCodes); + ui->SizeOfBlock = ui->sizeofUnwindCodes + 4; + ui->rawUnwindCodes = &ex_dta[4]; + ex_dta += ui->SizeOfBlock; + switch (ui->Flags) + { + case UNW_FLAG_EHANDLER: + ui->rva_ExceptionHandler = bfd_get_32 (abfd, ex_dta); + break; + case UNW_FLAG_UHANDLER: + ui->rva_TerminationHandler = bfd_get_32 (abfd, ex_dta); + break; + case UNW_FLAG_FHANDLER: + ui->rva_FrameHandler = bfd_get_32 (abfd, ex_dta); + ui->FrameHandlerArgument = bfd_get_32 (abfd, ex_dta + 4); + ui->SizeOfBlock += 8; + return; + case UNW_FLAG_CHAININFO: + ui->rva_FunctionEntry = bfd_get_32 (abfd, ex_dta); + ui->SizeOfBlock += 4; + return; + default: + return; + } + ex_dta += 4; + ui->SizeOfBlock += 8; + ui->CountOfScopes = bfd_get_32 (abfd, ex_dta); + ex_dta += 4; + ui->rawScopeEntries = ex_dta; + ui->SizeOfBlock += (ui->CountOfScopes * PEX64_SCOPE_ENTRY_SIZE); +} + +static void +pex64_get_scope_entry (bfd *abfd, struct pex64_scope_entry *se, + bfd_vma idx, const bfd_byte *x) +{ + const struct external_pex64_scope_entry *ex_se; + x += (idx * PEX64_SCOPE_ENTRY_SIZE); + ex_se = (const struct external_pex64_scope_entry *) x; + memset (se, 0, sizeof (struct pex64_scope_entry)); + se->rva_BeginAddress = bfd_get_32 (abfd, ex_se->rva_BeginAddress); + se->rva_EndAddress = bfd_get_32 (abfd, ex_se->rva_EndAddress); + se->rva_HandlerAddress = bfd_get_32 (abfd, ex_se->rva_HandlerAddress); + se->rva_JumpAddress = bfd_get_32 (abfd, ex_se->rva_JumpAddress); +} + +static void +pex64_xdata_print_uwd_codes (FILE *file, struct pex64_unwind_info *ui, + bfd_vma pc_addr) +{ + bfd_vma i; + bfd_vma tmp = 0; + const bfd_byte *insns[256]; + bfd_vma insns_count = 0; + const bfd_byte *dta = ui->rawUnwindCodes; + + if (ui->CountOfCodes == 0 || !dta) + return; + + /* Sort array ascending. Note: it is stored in reversed order. */ + for (i = 0; i < ui->CountOfCodes; i++) + { + const bfd_byte *t; + + t = insns[insns_count++] = &dta[i * 2]; + switch (PEX64_UNWCODE_CODE (t[1])) + { + case UWOP_PUSH_NONVOL: + case UWOP_ALLOC_SMALL: + case UWOP_SET_FPREG: + case UWOP_PUSH_MACHFRAME: + break; + case UWOP_ALLOC_LARGE: + if (PEX64_UNWCODE_INFO (t[1]) == 0) + { + i += 1; + break; + } + else if (PEX64_UNWCODE_INFO (t[1]) == 1) + { + i += 2; + break; + } + /* fall through. */ + default: + fprintf (file, "\t contains unknown code (%u).\n", + (unsigned int) PEX64_UNWCODE_CODE (t[1])); + return; + case UWOP_SAVE_NONVOL: + case UWOP_SAVE_XMM: + case UWOP_SAVE_XMM128: + i++; + break; + case UWOP_SAVE_NONVOL_FAR: + case UWOP_SAVE_XMM_FAR: + case UWOP_SAVE_XMM128_FAR: + i += 2; + break; + } + } + fprintf (file, "\t At pc 0x"); + fprintf_vma (file, pc_addr); + fprintf (file, " there are the following saves (in logical order).\n"); + for (i = insns_count; i > 0;) + { + --i; + dta = insns[i]; + fprintf (file, "\t insn ends at pc+0x%02x: ", (unsigned int) dta[0]); + switch (PEX64_UNWCODE_CODE (dta[1])) + { + case UWOP_PUSH_NONVOL: + fprintf (file, "push %s.\n", pex_regs[PEX64_UNWCODE_INFO (dta[1])]); + break; + case UWOP_ALLOC_LARGE: + if (PEX64_UNWCODE_INFO (dta[1]) == 0) + { + tmp = (bfd_vma) (*((unsigned short *) &dta[2])); + tmp *= 8; + } + else + tmp = (bfd_vma) (*((unsigned int *)&dta[2])); + fprintf (file, "save stack region of size 0x"); + fprintf_vma (file, tmp); + fprintf (file,".\n"); + break; + case UWOP_ALLOC_SMALL: + tmp = (bfd_vma) PEX64_UNWCODE_INFO (dta[1]); + tmp += 1; + tmp *= 8; + fprintf (file, "save stack region of size 0x"); + fprintf_vma (file, tmp); + fprintf (file,".\n"); + break; + case UWOP_SET_FPREG: + tmp = (bfd_vma) PEX64_UNWCODE_INFO (dta[1]); + tmp *= 16; + fprintf (file, "FPReg = (FrameReg) + 0x"); + fprintf_vma (file, tmp); + fprintf (file, ".\n"); + break; + case UWOP_SAVE_NONVOL: + fprintf (file, "mov %s at 0x", + pex_regs[PEX64_UNWCODE_INFO (dta[1])]); + tmp = (bfd_vma) (*((unsigned short *) &dta[2])); + tmp *= 8; + fprintf_vma (file, tmp); + fprintf (file, ".\n"); + break; + case UWOP_SAVE_NONVOL_FAR: + fprintf (file, "mov %s at 0x", + pex_regs[PEX64_UNWCODE_INFO (dta[1])]); + tmp = (bfd_vma) (*((unsigned int *) &dta[2])); + fprintf_vma (file, tmp); + fprintf (file, ".\n"); + break; + case UWOP_SAVE_XMM: + tmp = (bfd_vma) (*((unsigned short *) &dta[2])); + tmp *= 8; + fprintf (file, "mov mm%u at 0x", + (unsigned int) PEX64_UNWCODE_INFO (dta[1])); + fprintf_vma (file, tmp); + fprintf (file, ".\n"); + break; + case UWOP_SAVE_XMM_FAR: + tmp = (bfd_vma) (*((unsigned int *) &dta[2])); + fprintf (file, "mov mm%u at 0x", + (unsigned int) PEX64_UNWCODE_INFO (dta[1])); + fprintf_vma (file, tmp); + fprintf (file, ".\n"); + break; + case UWOP_SAVE_XMM128: + tmp = (bfd_vma) (*((unsigned short *) &dta[2])); + tmp *= 16; + fprintf (file, "mov xmm%u at 0x", + (unsigned int) PEX64_UNWCODE_INFO ( dta[1])); + fprintf_vma (file, tmp); + fprintf (file, ".\n"); + break; + case UWOP_SAVE_XMM128_FAR: + tmp = (bfd_vma) (*((unsigned int *) &dta[2])); + fprintf (file, "mov xmm%u at 0x", + (unsigned int) PEX64_UNWCODE_INFO (dta[1])); + fprintf_vma (file, tmp); + fprintf (file, ".\n"); + break; + case UWOP_PUSH_MACHFRAME: + fprintf (file, "interrupt entry (SS, old RSP, EFLAGS, CS, RIP"); + if (PEX64_UNWCODE_INFO (dta[1]) == 0) + { + fprintf (file, ")"); + } + else if (PEX64_UNWCODE_INFO (dta[1]) == 1) + { + fprintf (file, ",ErrorCode)"); + } + else + fprintf (file, ", unknown(%u))", + (unsigned int) PEX64_UNWCODE_INFO (dta[1])); + fprintf (file,".\n"); + break; + default: + fprintf (file, "unknown code %u.\n", + (unsigned int) PEX64_UNWCODE_INFO (dta[1])); + break; + } + } +} + +static asection * +pex64_get_section_by_rva (bfd *abfd, bfd_vma addr, const char *sec_name) +{ + asection *section = bfd_get_section_by_name (abfd, sec_name); + bfd_vma vsize; + bfd_size_type datasize = 0; + + if (section == NULL + || coff_section_data (abfd, section) == NULL + || pei_section_data (abfd, section) == NULL) + return NULL; + vsize = section->vma - pe_data (abfd)->pe_opthdr.ImageBase; + datasize = section->size; + if (!datasize || vsize > addr || (vsize + datasize) < addr) + return NULL; + return section; +} + +static void +pex64_dump_xdata (FILE *file, bfd *abfd, bfd_vma addr, bfd_vma pc_addr) +{ + asection *section = pex64_get_section_by_rva (abfd, addr, ".rdata"); + bfd_vma vsize; + bfd_byte *data = NULL; + bfd_vma i; + + if (!section) + section = pex64_get_section_by_rva (abfd, addr, ".data"); + if (!section) + section = pex64_get_section_by_rva (abfd, addr, ".xdata"); + if (!section) + { + section = pex64_get_section_by_rva (abfd, addr, ".pdata"); + if (section) + { + fprintf (file, "\t Shares information with pdata element at 0x"); + fprintf_vma (file, addr + pe_data (abfd)->pe_opthdr.ImageBase); + fprintf (file, ".\n"); + } + } + if (!section) + return; + vsize = section->vma - pe_data (abfd)->pe_opthdr.ImageBase; + addr -= vsize; + if (bfd_malloc_and_get_section (abfd, section, &data)) + { + struct pex64_unwind_info ui; + + if (!data) + return; + + pex64_get_unwind_info (abfd, &ui, &data[addr]); + + if (ui.Version != 1) + { + fprintf (file, "\tVersion %u (unknown).\n", (unsigned int) ui.Version); + return; + } + + fprintf (file, "\tFlags: "); + switch (ui.Flags) + { + case UNW_FLAG_NHANDLER: + fprintf (file, "UNW_FLAG_NHANDLER"); + break; + case UNW_FLAG_EHANDLER: + fprintf (file, "UNW_FLAG_EHANDLER"); + break; + case UNW_FLAG_UHANDLER: + fprintf (file, "UNW_FLAG_UHANDLER"); + break; + case UNW_FLAG_FHANDLER: + fprintf (file, "UNW_FLAG_FHANDLER = (UNW_FLAG_EHANDLER | UNW_FLAG_UHANDLER)"); + break; + case UNW_FLAG_CHAININFO: + fprintf (file, "UNW_FLAG_CHAININFO"); + break; + default: + fprintf (file, "unknown flags value 0x%x", (unsigned int) ui.Flags); + break; + } + fprintf (file, ".\n"); + if (ui.CountOfCodes != 0) + fprintf (file, "\tEntry has %u codes.", (unsigned int) ui.CountOfCodes); + fprintf (file, "\tPrologue size: %u, Frame offset = 0x%x.\n", + (unsigned int) ui.SizeOfPrologue, (unsigned int) ui.FrameOffset); + fprintf (file, "\tFrame register is %s.\n", + ui.FrameRegister == 0 ? "CFA" + : pex_regs[(unsigned int) ui.FrameRegister]); + + pex64_xdata_print_uwd_codes (file, &ui, pc_addr); + + switch (ui.Flags) + { + case UNW_FLAG_NHANDLER: + return; + case UNW_FLAG_EHANDLER: + fprintf (file, "\texception_handler at 0x%x.\n", (unsigned int) ui.rva_ExceptionHandler); + break; + case UNW_FLAG_UHANDLER: + fprintf (file, "\ttermination_handler at 0x%x.\n", (unsigned int) ui.rva_TerminationHandler); + case UNW_FLAG_FHANDLER: + fprintf (file, "\tframe_handler at 0x%x.\n", (unsigned int) ui.rva_FrameHandler); + fprintf (file, "\t Argument for FrameHandler: 0x%x.\n", + (unsigned int) ui.FrameHandlerArgument); + return; + case UNW_FLAG_CHAININFO: + fprintf (file, "\t Function Entry: 0x%x\n", (unsigned int) ui.rva_FunctionEntry); + return; + default: + fprintf (file, "\t Unknown flag value of 0x%x\n", (unsigned int) ui.Flags); + return; + } + fprintf (file, "\t 0x%x # of scope(s)\n", (unsigned int) ui.CountOfScopes); + for (i = 0; i < ui.CountOfScopes; i++) + { + struct pex64_scope_entry se; + pex64_get_scope_entry (abfd, &se, i, ui.rawScopeEntries); + fprintf (file, "\t scope #%u: BeginAddress: 0x%x, EndAddress: 0x%x," + "\n\t\tHandlerAddress:0x%x, JumpTarget:0x%x\n", + (unsigned int) (i + 1), + (unsigned int) se.rva_BeginAddress, + (unsigned int) se.rva_EndAddress, + (unsigned int) se.rva_HandlerAddress, + (unsigned int) se.rva_JumpAddress); + } + } + if (data != NULL) + free (data); +} + +static bfd_boolean +pex64_bfd_print_pdata (bfd *abfd, void *vfile) +{ + FILE *file = (FILE *) vfile; + bfd_byte *data = NULL; + asection *section = bfd_get_section_by_name (abfd, ".pdata"); + bfd_size_type datasize = 0; + bfd_size_type i; + bfd_size_type start, stop; + int onaline = PDATA_ROW_SIZE; + + if (section == NULL + || coff_section_data (abfd, section) == NULL + || pei_section_data (abfd, section) == NULL) + return TRUE; + + stop = pei_section_data (abfd, section)->virt_size; + if ((stop % onaline) != 0) + fprintf (file, + _("warning: .pdata section size (%ld) is not a multiple of %d\n"), + (long) stop, onaline); + + fprintf (file, + _("\nThe Function Table (interpreted .pdata section contents)\n")); + + fprintf (file, _("vma:\t\t\tBeginAddress\t EndAddress\t UnwindData\n")); + + datasize = section->size; + if (datasize == 0) + return TRUE; + + if (!bfd_malloc_and_get_section (abfd, section, &data)) + { + if (data != NULL) + free (data); + return FALSE; + } + + start = 0; + + for (i = start; i < stop; i += onaline) + { + struct pex64_runtime_function rf; + + if (i + PDATA_ROW_SIZE > stop) + break; + pex64_get_runtime_function (abfd, &rf, &data[i]); + + if (rf.rva_BeginAddress == 0 && rf.rva_EndAddress == 0 + && rf.rva_UnwindData == 0) + /* We are probably into the padding of the section now. */ + break; + + fputc (' ', file); + fprintf_vma (file, i + section->vma); + fprintf (file, ":\t"); + rf.rva_BeginAddress += pe_data (abfd)->pe_opthdr.ImageBase; + fprintf_vma (file, rf.rva_BeginAddress); + fputc (' ', file); + rf.rva_EndAddress += pe_data (abfd)->pe_opthdr.ImageBase; + fprintf_vma (file, rf.rva_EndAddress); + fputc (' ', file); + fprintf_vma (file, rf.rva_UnwindData); + fprintf (file, "\n"); + + if (rf.rva_UnwindData != 0) + { + if (rf.isChained) + { + fprintf (file, "\t shares information with pdata element at 0x"); + fprintf_vma (file, rf.rva_UnwindData + pe_data (abfd)->pe_opthdr.ImageBase); + fprintf (file, ".\n"); + } + else + pex64_dump_xdata (file, abfd, rf.rva_UnwindData, rf.rva_BeginAddress); + } + } + + free (data); + + return TRUE; +} + +#define bfd_pe_print_pdata pex64_bfd_print_pdata + #include "coff-x86_64.c" diff --git a/cegcc/src/binutils/bfd/peicode.h b/cegcc/src/binutils/bfd/peicode.h index 357d1c881..8f25ef9b3 100644 --- a/cegcc/src/binutils/bfd/peicode.h +++ b/cegcc/src/binutils/bfd/peicode.h @@ -1,6 +1,6 @@ /* Support for the generic parts of PE/PEI, for BFD. Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Solutions. This file is part of BFD, the Binary File Descriptor library. @@ -236,8 +236,8 @@ coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in) use the virtual size (stored in s_paddr) instead. */ if (scnhdr_int->s_paddr > 0 && (((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0 - && (! bfd_pe_executable_p (abfd) || scnhdr_int->s_size == 0)) - || (bfd_pe_executable_p (abfd) && (scnhdr_int->s_size > scnhdr_int->s_paddr)))) + && (! bfd_pei_p (abfd) || scnhdr_int->s_size == 0)) + || (bfd_pei_p (abfd) && (scnhdr_int->s_size > scnhdr_int->s_paddr)))) /* This code used to set scnhdr_int->s_paddr to 0. However, coff_set_alignment_hook stores s_paddr in virt_size, which only works if it correctly holds the virtual size of the @@ -264,13 +264,6 @@ pe_mkobject (bfd * abfd) /* in_reloc_p is architecture dependent. */ pe->in_reloc_p = in_reloc_p; -#ifdef PEI_FORCE_MINIMUM_ALIGNMENT - pe->force_minimum_alignment = 1; -#endif -#ifdef PEI_TARGET_SUBSYSTEM - pe->target_subsystem = PEI_TARGET_SUBSYSTEM; -#endif - return TRUE; } @@ -429,7 +422,6 @@ pe_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) #define SIZEOF_ILF_SECTIONS (NUM_ILF_SECTIONS * sizeof (struct coff_section_tdata)) #define ILF_DATA_SIZE \ - sizeof (* vars.bim) \ + SIZEOF_ILF_SYMS \ + SIZEOF_ILF_SYM_TABLE \ + SIZEOF_ILF_NATIVE_SYMS \ @@ -787,15 +779,16 @@ pe_ILF_build_a_bfd (bfd * abfd, We are going to construct the contents of the BFD in memory, so allocate all the space that we will need right now. */ - ptr = bfd_zalloc (abfd, (bfd_size_type) ILF_DATA_SIZE); - if (ptr == NULL) + vars.bim + = (struct bfd_in_memory *) bfd_malloc ((bfd_size_type) sizeof (*vars.bim)); + if (vars.bim == NULL) return FALSE; - /* Create a bfd_in_memory structure. */ - vars.bim = (struct bfd_in_memory *) ptr; + ptr = (bfd_byte *) bfd_zmalloc ((bfd_size_type) ILF_DATA_SIZE); vars.bim->buffer = ptr; vars.bim->size = ILF_DATA_SIZE; - ptr += sizeof (* vars.bim); + if (ptr == NULL) + goto error_return; /* Initialise the pointers to regions of the memory and the other contents of the pe_ILF_vars structure as well. */ @@ -849,7 +842,7 @@ pe_ILF_build_a_bfd (bfd * abfd, id4 = pe_ILF_make_a_section (& vars, ".idata$4", SIZEOF_IDATA4, 0); id5 = pe_ILF_make_a_section (& vars, ".idata$5", SIZEOF_IDATA5, 0); if (id4 == NULL || id5 == NULL) - return FALSE; + goto error_return; /* Fill in the contents of these sections. */ if (import_name_type == IMPORT_ORDINAL) @@ -876,7 +869,7 @@ pe_ILF_build_a_bfd (bfd * abfd, /* Create .idata$6 - the Hint Name Table. */ id6 = pe_ILF_make_a_section (& vars, ".idata$6", SIZEOF_IDATA6, 0); if (id6 == NULL) - return FALSE; + goto error_return; /* If necessary, trim the import symbol name. */ symbol = symbol_name; @@ -943,7 +936,7 @@ pe_ILF_build_a_bfd (bfd * abfd, /* Create the .text section. */ text = pe_ILF_make_a_section (& vars, ".text", jtab[i].size, SEC_CODE); if (text == NULL) - return FALSE; + goto error_return; /* Copy in the jump code. */ memcpy (text->contents, jtab[i].data, jtab[i].size); @@ -992,10 +985,10 @@ pe_ILF_build_a_bfd (bfd * abfd, if ( ! bfd_set_start_address (abfd, (bfd_vma) 0) || ! bfd_coff_set_arch_mach_hook (abfd, & internal_f)) - return FALSE; + goto error_return; if (bfd_coff_mkobject_hook (abfd, (void *) & internal_f, NULL) == NULL) - return FALSE; + goto error_return; coff_data (abfd)->pe = 1; #ifdef THUMBPEMAGIC @@ -1057,6 +1050,12 @@ pe_ILF_build_a_bfd (bfd * abfd, abfd->flags |= HAS_SYMS; return TRUE; + + error_return: + if (vars.bim->buffer != NULL) + free (vars.bim->buffer); + free (vars.bim); + return FALSE; } /* We have detected a Image Library Format archive element. @@ -1201,7 +1200,7 @@ pe_ILF_object_p (bfd * abfd) /* ptr += 2; */ /* Now read in the two strings that follow. */ - ptr = bfd_alloc (abfd, size); + ptr = (bfd_byte *) bfd_alloc (abfd, size); if (ptr == NULL) return NULL; @@ -1236,25 +1235,6 @@ pe_ILF_object_p (bfd * abfd) return abfd->xvec; } -enum arch_type -{ - arch_type_unknown, - arch_type_i386, - arch_type_x86_64 -}; - -static enum arch_type -pe_arch (const char *arch) -{ - if (strcmp (arch, "i386") == 0 || strcmp (arch, "ia32") == 0) - return arch_type_i386; - - if (strcmp (arch, "x86_64") == 0 || strcmp (arch, "x86-64") == 0) - return arch_type_x86_64; - - return arch_type_unknown; -} - static const bfd_target * pe_bfd_object_p (bfd * abfd) { @@ -1262,8 +1242,6 @@ pe_bfd_object_p (bfd * abfd) struct external_PEI_DOS_hdr dos_hdr; struct external_PEI_IMAGE_hdr image_hdr; file_ptr offset; - const bfd_target *target; - struct bfd_preserve preserve; /* Detect if this a Microsoft Import Library Format element. */ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 @@ -1328,110 +1306,7 @@ pe_bfd_object_p (bfd * abfd) return NULL; } - preserve.marker = NULL; - if (! bfd_preserve_save (abfd, &preserve)) - return NULL; - - target = coff_object_p (abfd); - if (target) - { - pe_data_type *pe = pe_data (abfd); - struct internal_extra_pe_aouthdr *i = &pe->pe_opthdr; - bfd_boolean efi = i->Subsystem == IMAGE_SUBSYSTEM_EFI_APPLICATION - || i->Subsystem == IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER - || i->Subsystem == IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER; - enum arch_type arch; - const bfd_target * const *target_ptr; - - /* Get the machine. */ - if (bfd_target_efi_app_p (abfd->xvec)) - arch = pe_arch (bfd_target_efi_app_arch (abfd->xvec)); - else if (bfd_target_efi_bsdrv_p (abfd->xvec)) - arch = pe_arch (bfd_target_efi_bsdrv_arch (abfd->xvec)); - else if (bfd_target_efi_rtdrv_p (abfd->xvec)) - arch = pe_arch (bfd_target_efi_rtdrv_arch (abfd->xvec)); - else - arch = pe_arch (bfd_target_pei_arch (abfd->xvec)); - - /* Don't check PE vs. EFI if arch is unknown. */ - if (arch == arch_type_unknown) - { - bfd_preserve_finish (abfd, &preserve); - return target; - } - - for (target_ptr = bfd_target_vector; *target_ptr != NULL; - target_ptr++) - { - if (*target_ptr == target - || (*target_ptr)->flavour != bfd_target_coff_flavour) - continue; - - if (bfd_target_efi_app_p (*target_ptr)) - { - /* Skip incompatible arch. */ - if (pe_arch (bfd_target_efi_app_arch (*target_ptr)) != arch) - continue; - - if (efi) - { - /* TARGET_PTR is an EFI backend. Don't match - TARGET with a EFI file. */ - bfd_set_error (bfd_error_wrong_format); - return NULL; - } - } - else if (bfd_target_efi_bsdrv_p (*target_ptr)) - { - /* Skip incompatible arch. */ - if (pe_arch (bfd_target_efi_bsdrv_arch (*target_ptr)) != arch) - continue; - - if (efi) - { - /* TARGET_PTR is an EFI backend. Don't match - TARGET with a EFI file. */ - bfd_set_error (bfd_error_wrong_format); - return NULL; - } - } - else if (bfd_target_efi_rtdrv_p (*target_ptr)) - { - /* Skip incompatible arch. */ - if (pe_arch (bfd_target_efi_rtdrv_arch (*target_ptr)) != arch) - continue; - - if (efi) - { -no_match: - /* TARGET_PTR is an EFI backend. Don't match - TARGET with a EFI file. */ - bfd_preserve_restore (abfd, &preserve); - bfd_set_error (bfd_error_wrong_format); - return NULL; - } - } - else if (bfd_target_pei_p (*target_ptr)) - { - /* Skip incompatible arch. */ - if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch) - continue; - - if (!efi) - { - /* TARGET_PTR is a PE backend. Don't match - TARGET with a PE file. */ - goto no_match; - } - } - } - - bfd_preserve_finish (abfd, &preserve); - } - else - bfd_preserve_restore (abfd, &preserve); - - return target; + return coff_object_p (abfd); } #define coff_object_p pe_bfd_object_p diff --git a/cegcc/src/binutils/bfd/po/CVS/Entries b/cegcc/src/binutils/bfd/po/CVS/Entries dissimilarity index 99% index 33b7d2c2b..7ca99928d 100644 --- a/cegcc/src/binutils/bfd/po/CVS/Entries +++ b/cegcc/src/binutils/bfd/po/CVS/Entries @@ -1,18 +1,19 @@ -/.cvsignore/1.1/Fri Feb 8 14:23:06 2008// -/BLD-POTFILES.in/1.4/Fri Feb 8 14:23:06 2008// -/Make-in/1.13/Wed Feb 4 22:28:33 2009// -/SRC-POTFILES.in/1.48/Wed Feb 4 22:28:33 2009// -/bfd.pot/1.63/Fri Feb 8 14:23:06 2008// -/da.po/1.4/Fri Feb 8 14:23:06 2008// -/es.po/1.9/Fri Feb 8 14:23:06 2008// -/fi.po/1.1/Fri Feb 8 14:23:06 2008// -/fr.po/1.11/Fri Feb 8 14:23:06 2008// -/id.po/1.1/Wed Oct 8 15:58:23 2008// -/ja.po/1.2/Fri Feb 8 14:23:06 2008// -/ro.po/1.2/Fri Feb 8 14:23:06 2008// -/rw.po/1.1/Fri Feb 8 14:23:06 2008// -/sv.po/1.11/Fri Feb 8 14:23:06 2008// -/tr.po/1.6/Fri Feb 8 14:23:06 2008// -/vi.po/1.3/Wed Feb 4 22:28:34 2009// -/zh_CN.po/1.1/Fri Feb 8 14:23:06 2008// -D +/.cvsignore/1.1/Fri Oct 16 21:38:34 2009// +/BLD-POTFILES.in/1.4/Fri Oct 16 21:38:34 2009// +/Make-in/1.14/Fri Oct 16 21:49:23 2009// +/SRC-POTFILES.in/1.51/Fri Oct 16 21:49:23 2009// +/bfd.pot/1.66/Fri Oct 16 21:49:24 2009// +/da.po/1.4/Fri Oct 16 21:38:34 2009// +/es.po/1.11/Fri Oct 16 21:49:24 2009// +/fi.po/1.3/Fri Oct 16 21:49:24 2009// +/fr.po/1.11/Fri Oct 16 21:38:34 2009// +/id.po/1.2/Fri Oct 16 21:49:24 2009// +/ja.po/1.2/Fri Oct 16 21:38:34 2009// +/ro.po/1.2/Fri Oct 16 21:38:34 2009// +/ru.po/1.1/Mon Jun 15 08:52:20 2009// +/rw.po/1.1/Fri Oct 16 21:38:34 2009// +/sv.po/1.11/Fri Oct 16 21:38:34 2009// +/tr.po/1.6/Fri Oct 16 21:38:34 2009// +/vi.po/1.4/Fri Oct 16 21:49:24 2009// +/zh_CN.po/1.1/Fri Oct 16 21:38:34 2009// +D diff --git a/cegcc/src/binutils/bfd/po/Make-in b/cegcc/src/binutils/bfd/po/Make-in index 59ed39eb8..a9d3aeaab 100644 --- a/cegcc/src/binutils/bfd/po/Make-in +++ b/cegcc/src/binutils/bfd/po/Make-in @@ -1,6 +1,6 @@ # Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper -# Copyright 2001, 2003, 2006 Free Software Foundation, Inc. +# Copyright 2001, 2003, 2006, 2007, 2009 Free Software Foundation, Inc. # # This file may be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License diff --git a/cegcc/src/binutils/bfd/po/SRC-POTFILES.in b/cegcc/src/binutils/bfd/po/SRC-POTFILES.in index 6fbc49e71..8f39698db 100644 --- a/cegcc/src/binutils/bfd/po/SRC-POTFILES.in +++ b/cegcc/src/binutils/bfd/po/SRC-POTFILES.in @@ -86,6 +86,7 @@ cpu-i960.c cpu-ia64.c cpu-ip2k.c cpu-iq2000.c +cpu-l1om.c cpu-lm32.c cpu-m10200.c cpu-m10300.c @@ -98,8 +99,10 @@ cpu-m88k.c cpu-maxq.c cpu-mcore.c cpu-mep.c +cpu-microblaze.c cpu-mips.c cpu-mmix.c +cpu-moxie.c cpu-msp430.c cpu-mt.c cpu-ns32k.c @@ -107,6 +110,7 @@ cpu-openrisc.c cpu-or32.c cpu-pdp11.c cpu-pj.c +cpu-plugin.c cpu-powerpc.c cpu-rs6000.c cpu-s390.c @@ -133,19 +137,11 @@ dwarf2.c ecoff.c ecofflink.c ecoffswap.h -efi-app-ia32.c -efi-app-ia64.c -efi-app-x86_64.c -efi-bsdrv-ia32.c -efi-bsdrv-ia64.c -efi-bsdrv-x86_64.c -efi-rtdrv-ia32.c -efi-rtdrv-ia64.c -efi-rtdrv-x86_64.c elf-attrs.c elf-bfd.h elf-eh-frame.c elf-hppa.h +elf-ifunc.c elf-m10200.c elf-m10300.c elf-strtab.c @@ -185,7 +181,9 @@ elf32-m68k.c elf32-m88k.c elf32-mcore.c elf32-mep.c +elf32-microblaze.c elf32-mips.c +elf32-moxie.c elf32-msp430.c elf32-mt.c elf32-openrisc.c @@ -194,6 +192,7 @@ elf32-pj.c elf32-ppc.c elf32-s390.c elf32-score.c +elf32-score7.c elf32-sh-symbian.c elf32-sh.c elf32-sh64-com.c @@ -266,6 +265,7 @@ m68klinux.c m68knetbsd.c m88kmach3.c m88kopenbsd.c +mach-o-i386.c mach-o.c mach-o.h merge.c @@ -304,12 +304,14 @@ pef.h pei-arm-wince.c pei-arm.c pei-i386.c +pei-ia64.c pei-mcore.c pei-mips.c pei-ppc.c pei-sh.c pei-x86_64.c peicode.h +plugin.c ppcboot.c reloc.c reloc16.c @@ -333,6 +335,7 @@ trad-core.c vax1knetbsd.c vaxbsd.c vaxnetbsd.c +verilog.c versados.c version.h vms-gsd.c @@ -341,7 +344,6 @@ vms-misc.c vms-tir.c vms.c vms.h -vmsutil.c xcoff-target.h xcofflink.c xsym.c diff --git a/cegcc/src/binutils/bfd/po/bfd.pot b/cegcc/src/binutils/bfd/po/bfd.pot index 81d7dba31..5f0021132 100644 --- a/cegcc/src/binutils/bfd/po/bfd.pot +++ b/cegcc/src/binutils/bfd/po/bfd.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n" -"POT-Creation-Date: 2007-09-17 15:01+0100\n" +"POT-Creation-Date: 2009-09-07 14:05+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,152 +33,152 @@ msgstr "" msgid "%B: Bad relocation record imported: %d" msgstr "" -#: aoutx.h:1268 aoutx.h:1604 +#: aoutx.h:1271 aoutx.h:1609 #, c-format msgid "%s: can not represent section `%s' in a.out object file format" msgstr "" -#: aoutx.h:1570 +#: aoutx.h:1575 #, c-format msgid "" "%s: can not represent section for symbol `%s' in a.out object file format" msgstr "" -#: aoutx.h:1572 +#: aoutx.h:1577 msgid "*unknown*" msgstr "" -#: aoutx.h:3989 aoutx.h:4315 +#: aoutx.h:3994 aoutx.h:4320 msgid "%P: %B: unexpected relocation type\n" msgstr "" -#: aoutx.h:5349 +#: aoutx.h:5354 #, c-format msgid "%s: relocatable link from %s to %s not supported" msgstr "" -#: archive.c:1766 +#: archive.c:2056 msgid "Warning: writing archive was slow: rewriting timestamp\n" msgstr "" -#: archive.c:2029 +#: archive.c:2342 msgid "Reading archive file mod timestamp" msgstr "" -#: archive.c:2053 +#: archive.c:2366 msgid "Writing updated armap timestamp" msgstr "" -#: bfd.c:289 +#: bfd.c:375 msgid "No error" msgstr "" -#: bfd.c:290 +#: bfd.c:376 msgid "System call error" msgstr "" -#: bfd.c:291 +#: bfd.c:377 msgid "Invalid bfd target" msgstr "" -#: bfd.c:292 +#: bfd.c:378 msgid "File in wrong format" msgstr "" -#: bfd.c:293 +#: bfd.c:379 msgid "Archive object file in wrong format" msgstr "" -#: bfd.c:294 +#: bfd.c:380 msgid "Invalid operation" msgstr "" -#: bfd.c:295 +#: bfd.c:381 msgid "Memory exhausted" msgstr "" -#: bfd.c:296 +#: bfd.c:382 msgid "No symbols" msgstr "" -#: bfd.c:297 +#: bfd.c:383 msgid "Archive has no index; run ranlib to add one" msgstr "" -#: bfd.c:298 +#: bfd.c:384 msgid "No more archived files" msgstr "" -#: bfd.c:299 +#: bfd.c:385 msgid "Malformed archive" msgstr "" -#: bfd.c:300 +#: bfd.c:386 msgid "File format not recognized" msgstr "" -#: bfd.c:301 +#: bfd.c:387 msgid "File format is ambiguous" msgstr "" -#: bfd.c:302 +#: bfd.c:388 msgid "Section has no contents" msgstr "" -#: bfd.c:303 +#: bfd.c:389 msgid "Nonrepresentable section on output" msgstr "" -#: bfd.c:304 +#: bfd.c:390 msgid "Symbol needs debug section which does not exist" msgstr "" -#: bfd.c:305 +#: bfd.c:391 msgid "Bad value" msgstr "" -#: bfd.c:306 +#: bfd.c:392 msgid "File truncated" msgstr "" -#: bfd.c:307 +#: bfd.c:393 msgid "File too big" msgstr "" -#: bfd.c:308 +#: bfd.c:394 #, c-format msgid "Error reading %s: %s" msgstr "" -#: bfd.c:309 +#: bfd.c:395 msgid "#" msgstr "" -#: bfd.c:833 +#: bfd.c:919 #, c-format msgid "BFD %s assertion fail %s:%d" msgstr "" -#: bfd.c:845 +#: bfd.c:931 #, c-format msgid "BFD %s internal error, aborting at %s line %d in %s\n" msgstr "" -#: bfd.c:849 +#: bfd.c:935 #, c-format msgid "BFD %s internal error, aborting at %s line %d\n" msgstr "" -#: bfd.c:851 +#: bfd.c:937 msgid "Please report this bug.\n" msgstr "" -#: bfdwin.c:208 +#: bfdwin.c:206 #, c-format msgid "not mapping: data=%lx mapped=%d\n" msgstr "" -#: bfdwin.c:211 +#: bfdwin.c:209 #, c-format msgid "not mapping: env var not set\n" msgstr "" @@ -188,12 +188,14 @@ msgstr "" msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx." msgstr "" -#: cache.c:238 -msgid "reopening %B: %s\n" +#: bout.c:1150 elf-m10300.c:2078 elf32-avr.c:1639 elf32-frv.c:5743 +#: elf32-xtensa.c:6639 elfxx-sparc.c:2456 reloc.c:5386 reloc16.c:162 +#: vms.c:1918 elf32-ia64.c:788 elf64-ia64.c:788 +msgid "%P%F: --relax and -r may not be used together\n" msgstr "" -#: coff64-rs6000.c:2126 coff-rs6000.c:3624 -msgid "%B: symbol `%s' has unrecognized smclas %d" +#: cache.c:226 +msgid "reopening %B: %s\n" msgstr "" #: coff-alpha.c:490 @@ -206,7 +208,7 @@ msgstr "" msgid "%B: unknown/unsupported relocation type %d" msgstr "" -#: coff-alpha.c:899 coff-alpha.c:936 coff-alpha.c:2024 coff-mips.c:1002 +#: coff-alpha.c:899 coff-alpha.c:936 coff-alpha.c:2024 coff-mips.c:1003 msgid "GP relative relocation used when GP not defined" msgstr "" @@ -222,29 +224,29 @@ msgstr "" msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW" msgstr "" -#: coff-alpha.c:1574 elf32-m32r.c:2487 elf64-alpha.c:3953 elf64-alpha.c:4106 -#: elf32-ia64.c:4468 elf64-ia64.c:4468 +#: coff-alpha.c:1574 elf32-m32r.c:2477 elf64-alpha.c:3943 elf64-alpha.c:4098 +#: elf32-ia64.c:4462 elf64-ia64.c:4462 msgid "%B: unknown relocation type %d" msgstr "" -#: coff-arm.c:1036 +#: coff-arm.c:1039 #, c-format msgid "%B: unable to find THUMB glue '%s' for `%s'" msgstr "" -#: coff-arm.c:1065 +#: coff-arm.c:1068 #, c-format msgid "%B: unable to find ARM glue '%s' for `%s'" msgstr "" -#: coff-arm.c:1367 elf32-arm.c:4167 +#: coff-arm.c:1370 elf32-arm.c:6372 #, c-format msgid "" "%B(%s): warning: interworking not enabled.\n" " first occurrence: %B: arm call to thumb" msgstr "" -#: coff-arm.c:1457 +#: coff-arm.c:1460 #, c-format msgid "" "%B(%s): warning: interworking not enabled.\n" @@ -252,258 +254,266 @@ msgid "" " consider relinking with --support-old-code enabled" msgstr "" -#: coff-arm.c:1750 cofflink.c:3018 coff-tic80.c:695 +#: coff-arm.c:1755 coff-tic80.c:695 cofflink.c:3027 msgid "%B: bad reloc address 0x%lx in section `%A'" msgstr "" -#: coff-arm.c:2075 +#: coff-arm.c:2080 msgid "%B: illegal symbol index in reloc: %d" msgstr "" -#: coff-arm.c:2206 +#: coff-arm.c:2211 #, c-format -msgid "ERROR: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d" +msgid "error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d" msgstr "" -#: coff-arm.c:2222 elf32-arm.c:7072 +#: coff-arm.c:2227 elf32-arm.c:10327 #, c-format msgid "" -"ERROR: %B passes floats in float registers, whereas %B passes them in " +"error: %B passes floats in float registers, whereas %B passes them in " "integer registers" msgstr "" -#: coff-arm.c:2225 elf32-arm.c:7076 +#: coff-arm.c:2230 elf32-arm.c:10331 #, c-format msgid "" -"ERROR: %B passes floats in integer registers, whereas %B passes them in " +"error: %B passes floats in integer registers, whereas %B passes them in " "float registers" msgstr "" -#: coff-arm.c:2239 +#: coff-arm.c:2244 #, c-format msgid "" -"ERROR: %B is compiled as position independent code, whereas target %B is " +"error: %B is compiled as position independent code, whereas target %B is " "absolute position" msgstr "" -#: coff-arm.c:2242 +#: coff-arm.c:2247 #, c-format msgid "" -"ERROR: %B is compiled as absolute position code, whereas target %B is " +"error: %B is compiled as absolute position code, whereas target %B is " "position independent" msgstr "" -#: coff-arm.c:2270 elf32-arm.c:7141 +#: coff-arm.c:2275 elf32-arm.c:10396 #, c-format msgid "Warning: %B supports interworking, whereas %B does not" msgstr "" -#: coff-arm.c:2273 elf32-arm.c:7147 +#: coff-arm.c:2278 elf32-arm.c:10402 #, c-format msgid "Warning: %B does not support interworking, whereas %B does" msgstr "" -#: coff-arm.c:2297 +#: coff-arm.c:2302 #, c-format msgid "private flags = %x:" msgstr "" -#: coff-arm.c:2305 elf32-arm.c:7198 +#: coff-arm.c:2310 elf32-arm.c:10453 #, c-format msgid " [floats passed in float registers]" msgstr "" -#: coff-arm.c:2307 +#: coff-arm.c:2312 #, c-format msgid " [floats passed in integer registers]" msgstr "" -#: coff-arm.c:2310 elf32-arm.c:7201 +#: coff-arm.c:2315 elf32-arm.c:10456 #, c-format msgid " [position independent]" msgstr "" -#: coff-arm.c:2312 +#: coff-arm.c:2317 #, c-format msgid " [absolute position]" msgstr "" -#: coff-arm.c:2316 +#: coff-arm.c:2321 #, c-format msgid " [interworking flag not initialised]" msgstr "" -#: coff-arm.c:2318 +#: coff-arm.c:2323 #, c-format msgid " [interworking supported]" msgstr "" -#: coff-arm.c:2320 +#: coff-arm.c:2325 #, c-format msgid " [interworking not supported]" msgstr "" -#: coff-arm.c:2366 elf32-arm.c:6578 +#: coff-arm.c:2371 elf32-arm.c:9360 #, c-format msgid "" "Warning: Not setting interworking flag of %B since it has already been " "specified as non-interworking" msgstr "" -#: coff-arm.c:2370 elf32-arm.c:6582 +#: coff-arm.c:2375 elf32-arm.c:9364 #, c-format msgid "Warning: Clearing the interworking flag of %B due to outside request" msgstr "" -#: coffcode.h:850 -msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'" +#: coff-h8300.c:1122 +#, c-format +msgid "cannot handle R_MEM_INDIRECT reloc when using %s output" msgstr "" -#. Generate a warning message rather using the 'unhandled' -#. variable as this will allow some .sys files generate by -#. other toolchains to be processed. See bugzilla issue 196. -#: coffcode.h:1062 -msgid "" -"%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s" +#: coff-i860.c:147 +#, c-format +msgid "Relocation `%s' not yet implemented\n" msgstr "" -#: coffcode.h:1117 -msgid "%B (%s): Section flag %s (0x%x) ignored" +#: coff-i860.c:605 coff-tic54x.c:398 coffcode.h:5143 +msgid "%B: warning: illegal symbol index %ld in relocs" msgstr "" -#: coffcode.h:2236 -#, c-format -msgid "Unrecognized TI COFF target id '0x%x'" +#: coff-i960.c:143 coff-i960.c:506 +msgid "uncertain calling convention for non-COFF symbol" msgstr "" -#: coffcode.h:2551 -msgid "%B: reloc against a non-existant symbol index: %ld" +#: coff-m68k.c:506 elf32-bfin.c:5693 elf32-cr16.c:2965 elf32-m68k.c:4615 +msgid "unsupported reloc type" msgstr "" -#: coffcode.h:4296 -msgid "%B: warning: line number table read failed" +#: coff-maxq.c:126 +msgid "Can't Make it a Short Jump" msgstr "" -#: coffcode.h:4329 -msgid "%B: warning: illegal symbol index %ld in line numbers" +#: coff-maxq.c:191 +msgid "Exceeds Long Jump Range" msgstr "" -#: coffcode.h:4343 -msgid "%B: warning: duplicate line number information for `%s'" +#: coff-maxq.c:202 coff-maxq.c:276 +msgid "Absolute address Exceeds 16 bit Range" msgstr "" -#: coffcode.h:4735 -msgid "%B: Unrecognized storage class %d for %s symbol `%s'" +#: coff-maxq.c:240 +msgid "Absolute address Exceeds 8 bit Range" msgstr "" -#: coffcode.h:4861 -msgid "warning: %B: local symbol `%s' has no section" +#: coff-maxq.c:333 +msgid "Unrecognized Reloc Type" msgstr "" -#: coffcode.h:4966 coff-i860.c:601 coff-tic54x.c:393 -msgid "%B: warning: illegal symbol index %ld in relocs" +#: coff-mips.c:688 elf32-mips.c:1014 elf32-score.c:441 elf32-score7.c:341 +#: elf64-mips.c:2018 elfn32-mips.c:1832 +msgid "GP relative relocation when _gp not defined" msgstr "" -#: coffcode.h:5004 -msgid "%B: illegal relocation type %d at address 0x%lx" +#: coff-or32.c:229 +msgid "Unrecognized reloc" msgstr "" -#: coffgen.c:1518 -msgid "%B: bad string table size %lu" +#: coff-rs6000.c:2787 +#, c-format +msgid "%s: unsupported relocation type 0x%02x" msgstr "" -#: coff-h8300.c:1122 +#: coff-rs6000.c:2880 #, c-format -msgid "cannot handle R_MEM_INDIRECT reloc when using %s output" +msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry" +msgstr "" + +#: coff-rs6000.c:3646 coff64-rs6000.c:2168 +msgid "%B: symbol `%s' has unrecognized smclas %d" msgstr "" -#: coff-i860.c:143 +#: coff-tic4x.c:195 coff-tic54x.c:299 coff-tic80.c:458 #, c-format -msgid "Relocation `%s' not yet implemented\n" +msgid "Unrecognized reloc type 0x%x" msgstr "" -#: coff-i960.c:138 coff-i960.c:501 -msgid "uncertain calling convention for non-COFF symbol" +#: coff-tic4x.c:240 +#, c-format +msgid "%s: warning: illegal symbol index %ld in relocs" msgstr "" -#: cofflink.c:513 elflink.c:4175 -msgid "Warning: type of symbol `%s' changed from %d to %d in %B" +#: coff-w65.c:367 +#, c-format +msgid "ignoring reloc %s\n" msgstr "" -#: cofflink.c:2296 -msgid "%B: relocs in section `%A', but it has no contents" +#: coffcode.h:960 +msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'" msgstr "" -#: cofflink.c:2627 coffswap.h:824 -#, c-format -msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" +#. Generate a warning message rather using the 'unhandled' +#. variable as this will allow some .sys files generate by +#. other toolchains to be processed. See bugzilla issue 196. +#: coffcode.h:1176 +msgid "" +"%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s" msgstr "" -#: cofflink.c:2636 coffswap.h:810 +#: coffcode.h:1240 +msgid "%B (%s): Section flag %s (0x%x) ignored" +msgstr "" + +#: coffcode.h:2382 #, c-format -msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" +msgid "Unrecognized TI COFF target id '0x%x'" msgstr "" -#: coff-m68k.c:506 elf32-bfin.c:5434 elf32-m68k.c:2400 -msgid "unsupported reloc type" +#: coffcode.h:2696 +msgid "%B: reloc against a non-existant symbol index: %ld" msgstr "" -#: coff-maxq.c:126 -msgid "Can't Make it a Short Jump" +#: coffcode.h:3669 +msgid "%B: section %s: string table overflow at offset %ld" msgstr "" -#: coff-maxq.c:191 -msgid "Exceeds Long Jump Range" +#: coffcode.h:4477 +msgid "%B: warning: line number table read failed" msgstr "" -#: coff-maxq.c:202 coff-maxq.c:276 -msgid "Absolute address Exceeds 16 bit Range" +#: coffcode.h:4507 +msgid "%B: warning: illegal symbol index %ld in line numbers" msgstr "" -#: coff-maxq.c:240 -msgid "Absolute address Exceeds 8 bit Range" +#: coffcode.h:4521 +msgid "%B: warning: duplicate line number information for `%s'" msgstr "" -#: coff-maxq.c:333 -msgid "Unrecognized Reloc Type" +#: coffcode.h:4912 +msgid "%B: Unrecognized storage class %d for %s symbol `%s'" msgstr "" -#: coff-mips.c:687 elf32-mips.c:958 elf32-score.c:345 elf64-mips.c:1911 -#: elfn32-mips.c:1752 -msgid "GP relative relocation when _gp not defined" +#: coffcode.h:5038 +msgid "warning: %B: local symbol `%s' has no section" msgstr "" -#: coff-or32.c:228 -msgid "Unrecognized reloc" +#: coffcode.h:5181 +msgid "%B: illegal relocation type %d at address 0x%lx" msgstr "" -#: coff-rs6000.c:2799 -#, c-format -msgid "%s: unsupported relocation type 0x%02x" +#: coffgen.c:1571 +msgid "%B: bad string table size %lu" msgstr "" -#: coff-rs6000.c:2892 -#, c-format -msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry" +#: cofflink.c:513 elflink.c:4307 +msgid "Warning: type of symbol `%s' changed from %d to %d in %B" msgstr "" -#: coff-tic4x.c:191 coff-tic54x.c:299 coff-tic80.c:458 -#, c-format -msgid "Unrecognized reloc type 0x%x" +#: cofflink.c:2305 +msgid "%B: relocs in section `%A', but it has no contents" msgstr "" -#: coff-tic4x.c:236 +#: cofflink.c:2636 coffswap.h:826 #, c-format -msgid "%s: warning: illegal symbol index %ld in relocs" +msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" msgstr "" -#: coff-w65.c:367 +#: cofflink.c:2645 coffswap.h:812 #, c-format -msgid "ignoring reloc %s\n" +msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" msgstr "" #: cpu-arm.c:189 cpu-arm.c:200 -msgid "ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale" +msgid "error: %B is compiled for the EP9312, whereas %B is compiled for XScale" msgstr "" #: cpu-arm.c:332 @@ -511,729 +521,975 @@ msgstr "" msgid "warning: unable to update contents of %s section in %s" msgstr "" -#: dwarf2.c:481 -msgid "Dwarf Error: Can't find .debug_str section." -msgstr "" - -#: dwarf2.c:499 +#: dwarf2.c:430 #, c-format -msgid "" -"Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str " -"size (%lu)." +msgid "Dwarf Error: Can't find %s section." msgstr "" -#: dwarf2.c:592 -msgid "Dwarf Error: Can't find .debug_abbrev section." +#: dwarf2.c:457 +#, c-format +msgid "Dwarf Error: unable to decompress %s section." msgstr "" -#: dwarf2.c:607 +#: dwarf2.c:468 #, c-format -msgid "" -"Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size " -"(%lu)." +msgid "Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu)." msgstr "" -#: dwarf2.c:822 +#: dwarf2.c:865 #, c-format msgid "Dwarf Error: Invalid or unhandled FORM value: %u." msgstr "" -#: dwarf2.c:1036 +#: dwarf2.c:1079 msgid "Dwarf Error: mangled line number section (bad file number)." msgstr "" -#: dwarf2.c:1148 -msgid "Dwarf Error: Can't find .debug_line section." -msgstr "" - -#: dwarf2.c:1165 -#, c-format -msgid "" -"Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%" -"lu)." -msgstr "" - -#: dwarf2.c:1391 +#: dwarf2.c:1413 msgid "Dwarf Error: mangled line number section." msgstr "" -#: dwarf2.c:1579 -msgid "Dwarf Error: Can't find .debug_ranges section." -msgstr "" - -#: dwarf2.c:1742 dwarf2.c:1858 dwarf2.c:2130 +#: dwarf2.c:1760 dwarf2.c:1867 dwarf2.c:2139 #, c-format msgid "Dwarf Error: Could not find abbrev number %u." msgstr "" -#: dwarf2.c:2091 +#: dwarf2.c:2100 #, c-format msgid "" "Dwarf Error: found dwarf version '%u', this reader only handles version 2 " -"information." +"and 3 information." msgstr "" -#: dwarf2.c:2098 +#: dwarf2.c:2107 #, c-format msgid "" "Dwarf Error: found address size '%u', this reader can not handle sizes " "greater than '%u'." msgstr "" -#: dwarf2.c:2121 +#: dwarf2.c:2130 #, c-format msgid "Dwarf Error: Bad abbrev number: %u." msgstr "" -#: ecoff.c:1227 +#: ecoff.c:1238 #, c-format msgid "Unknown basic type %d" msgstr "" -#: ecoff.c:1484 +#: ecoff.c:1495 #, c-format msgid "" "\n" " End+1 symbol: %ld" msgstr "" -#: ecoff.c:1491 ecoff.c:1494 +#: ecoff.c:1502 ecoff.c:1505 #, c-format msgid "" "\n" " First symbol: %ld" msgstr "" -#: ecoff.c:1506 +#: ecoff.c:1517 #, c-format msgid "" "\n" " End+1 symbol: %-7ld Type: %s" msgstr "" -#: ecoff.c:1513 +#: ecoff.c:1524 #, c-format msgid "" "\n" " Local symbol: %ld" msgstr "" -#: ecoff.c:1521 +#: ecoff.c:1532 #, c-format msgid "" "\n" " struct; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1526 +#: ecoff.c:1537 #, c-format msgid "" "\n" " union; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1531 +#: ecoff.c:1542 #, c-format msgid "" "\n" " enum; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1537 +#: ecoff.c:1548 #, c-format msgid "" "\n" " Type: %s" msgstr "" -#: elf32-arm.c:2524 +#: elf-attrs.c:567 +msgid "error: %B: Must be processed by '%s' toolchain" +msgstr "" + +#: elf-attrs.c:575 +msgid "error: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'" +msgstr "" + +#: elf-eh-frame.c:884 +msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n" +msgstr "" + +#: elf-eh-frame.c:1122 +msgid "" +"%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n" +msgstr "" + +#: elf-ifunc.c:179 +msgid "" +"%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can " +"not be used when making an executable; recompile with -fPIE and relink with -" +"pie\n" +msgstr "" + +#: elf-m10200.c:456 elf-m10300.c:1575 elf32-avr.c:1251 elf32-bfin.c:3200 +#: elf32-cr16.c:1517 elf32-cr16c.c:790 elf32-cris.c:2089 elf32-crx.c:933 +#: elf32-d10v.c:516 elf32-fr30.c:616 elf32-frv.c:4114 elf32-h8300.c:516 +#: elf32-i860.c:1218 elf32-ip2k.c:1499 elf32-iq2000.c:691 elf32-lm32.c:1171 +#: elf32-m32c.c:560 elf32-m32r.c:3102 elf32-m68hc1x.c:1136 elf32-mep.c:541 +#: elf32-microblaze.c:1226 elf32-moxie.c:291 elf32-msp430.c:493 elf32-mt.c:402 +#: elf32-openrisc.c:411 elf32-score.c:2752 elf32-score7.c:2591 +#: elf32-spu.c:5045 elf32-v850.c:1701 elf32-xstormy16.c:948 elf64-mmix.c:1533 +msgid "internal error: out of range error" +msgstr "" + +#: elf-m10200.c:460 elf-m10300.c:1579 elf32-avr.c:1255 elf32-bfin.c:3204 +#: elf32-cr16.c:1521 elf32-cr16c.c:794 elf32-cris.c:2093 elf32-crx.c:937 +#: elf32-d10v.c:520 elf32-fr30.c:620 elf32-frv.c:4118 elf32-h8300.c:520 +#: elf32-i860.c:1222 elf32-iq2000.c:695 elf32-lm32.c:1175 elf32-m32c.c:564 +#: elf32-m32r.c:3106 elf32-m68hc1x.c:1140 elf32-mep.c:545 +#: elf32-microblaze.c:1230 elf32-moxie.c:295 elf32-msp430.c:497 +#: elf32-openrisc.c:415 elf32-score.c:2756 elf32-score7.c:2595 +#: elf32-spu.c:5049 elf32-v850.c:1705 elf32-xstormy16.c:952 elf64-mmix.c:1537 +#: elfxx-mips.c:9103 +msgid "internal error: unsupported relocation error" +msgstr "" + +#: elf-m10200.c:464 elf32-cr16.c:1525 elf32-cr16c.c:798 elf32-crx.c:941 +#: elf32-d10v.c:524 elf32-h8300.c:524 elf32-lm32.c:1179 elf32-m32r.c:3110 +#: elf32-m68hc1x.c:1144 elf32-microblaze.c:1234 elf32-score.c:2760 +#: elf32-score7.c:2599 elf32-spu.c:5053 +msgid "internal error: dangerous error" +msgstr "" + +#: elf-m10200.c:468 elf-m10300.c:1592 elf32-avr.c:1263 elf32-bfin.c:3212 +#: elf32-cr16.c:1529 elf32-cr16c.c:802 elf32-cris.c:2101 elf32-crx.c:945 +#: elf32-d10v.c:528 elf32-fr30.c:628 elf32-frv.c:4126 elf32-h8300.c:528 +#: elf32-i860.c:1230 elf32-ip2k.c:1514 elf32-iq2000.c:703 elf32-lm32.c:1183 +#: elf32-m32c.c:572 elf32-m32r.c:3114 elf32-m68hc1x.c:1148 elf32-mep.c:553 +#: elf32-microblaze.c:1238 elf32-moxie.c:303 elf32-msp430.c:505 elf32-mt.c:410 +#: elf32-openrisc.c:423 elf32-score.c:2769 elf32-score7.c:2603 +#: elf32-spu.c:5057 elf32-v850.c:1725 elf32-xstormy16.c:960 elf64-mmix.c:1545 +msgid "internal error: unknown error" +msgstr "" + +#: elf-m10300.c:1512 elf32-arm.c:8963 elf32-i386.c:3984 elf32-m32r.c:2588 +#: elf32-m68k.c:4099 elf32-ppc.c:7906 elf32-s390.c:3015 elf32-sh.c:3429 +#: elf32-xtensa.c:3027 elf64-ppc.c:12063 elf64-s390.c:2974 elf64-sh64.c:1648 +#: elf64-x86-64.c:3657 elfxx-sparc.c:3317 +msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'" +msgstr "" + +#: elf-m10300.c:1584 +msgid "" +"error: inappropriate relocation type for shared library (did you forget -" +"fpic?)" +msgstr "" + +#: elf-m10300.c:1587 +msgid "internal error: suspicious relocation type used in shared library" +msgstr "" + +#: elf-m10300.c:4385 elf32-arm.c:11346 elf32-cr16.c:2519 elf32-cris.c:3030 +#: elf32-hppa.c:1891 elf32-i370.c:506 elf32-i386.c:1975 elf32-lm32.c:1873 +#: elf32-m32r.c:1921 elf32-m68k.c:3188 elf32-ppc.c:4953 elf32-s390.c:1650 +#: elf32-sh.c:2574 elf32-vax.c:1052 elf64-ppc.c:6348 elf64-s390.c:1623 +#: elf64-sh64.c:3396 elf64-x86-64.c:1821 elfxx-sparc.c:1802 +#, c-format +msgid "dynamic variable `%s' is zero size" +msgstr "" + +#: elf.c:329 +msgid "%B: invalid string offset %u >= %lu for section `%s'" +msgstr "" + +#: elf.c:439 +msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section" +msgstr "" + +#: elf.c:595 +msgid "%B: Corrupt size field in group section header: 0x%lx" +msgstr "" + +#: elf.c:631 +msgid "%B: invalid SHT_GROUP entry" +msgstr "" + +#: elf.c:701 +msgid "%B: no group info for section %A" +msgstr "" + +#: elf.c:730 elf.c:2960 elflink.c:9912 +msgid "%B: warning: sh_link not set for section `%A'" +msgstr "" + +#: elf.c:749 +msgid "%B: sh_link [%d] in section `%A' is incorrect" +msgstr "" + +#: elf.c:784 +msgid "%B: unknown [%d] section `%s' in group [%s]" +msgstr "" + +#: elf.c:1104 +#, c-format +msgid "" +"\n" +"Program Header:\n" +msgstr "" + +#: elf.c:1146 +#, c-format +msgid "" +"\n" +"Dynamic Section:\n" +msgstr "" + +#: elf.c:1282 +#, c-format +msgid "" +"\n" +"Version definitions:\n" +msgstr "" + +#: elf.c:1307 +#, c-format +msgid "" +"\n" +"Version References:\n" +msgstr "" + +#: elf.c:1312 +#, c-format +msgid " required from %s:\n" +msgstr "" + +#: elf.c:1702 +msgid "%B: invalid link %lu for reloc section %s (index %u)" +msgstr "" + +#: elf.c:1870 +msgid "" +"%B: don't know how to handle allocated, application specific section `%s' [0x" +"%8x]" +msgstr "" + +#: elf.c:1882 +msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]" +msgstr "" + +#: elf.c:1893 +msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]" +msgstr "" + +#: elf.c:1903 +msgid "%B: don't know how to handle section `%s' [0x%8x]" +msgstr "" + +#: elf.c:2500 +#, c-format +msgid "warning: section `%A' type changed to PROGBITS" +msgstr "" + +#: elf.c:2917 +msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'" +msgstr "" + +#: elf.c:2940 +msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'" +msgstr "" + +#: elf.c:4311 +msgid "" +"%B: The first section in the PT_DYNAMIC segment is not the .dynamic section" +msgstr "" + +#: elf.c:4338 +msgid "%B: Not enough room for program headers, try linking with -N" +msgstr "" + +#: elf.c:4420 +msgid "%B: section %A vma 0x%lx overlaps previous sections" +msgstr "" + +#: elf.c:4515 +msgid "%B: section `%A' can't be allocated in segment %d" +msgstr "" + +#: elf.c:4565 +msgid "%B: warning: allocated section `%s' not in segment" +msgstr "" + +#: elf.c:5065 +msgid "%B: symbol `%s' required but not present" +msgstr "" + +#: elf.c:5404 +msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n" +msgstr "" + +#: elf.c:6370 +#, c-format +msgid "" +"Unable to find equivalent output section for symbol '%s' from section '%s'" +msgstr "" + +#: elf.c:7356 +msgid "%B: unsupported relocation type %s" +msgstr "" + +#: elf32-arm.c:3149 +msgid "" +"%B(%s): warning: interworking not enabled.\n" +" first occurrence: %B: Thumb call to ARM" +msgstr "" + +#: elf32-arm.c:3190 +msgid "" +"%B(%s): warning: interworking not enabled.\n" +" first occurrence: %B: ARM call to Thumb" +msgstr "" + +#: elf32-arm.c:3387 elf32-arm.c:4692 +#, c-format +msgid "%s: cannot create stub entry %s" +msgstr "" + +#: elf32-arm.c:4804 #, c-format msgid "unable to find THUMB glue '%s' for '%s'" msgstr "" -#: elf32-arm.c:2557 +#: elf32-arm.c:4838 #, c-format msgid "unable to find ARM glue '%s' for '%s'" msgstr "" -#: elf32-arm.c:3127 +#: elf32-arm.c:5365 msgid "%B: BE8 images only valid in big-endian mode." msgstr "" #. Give a warning, but do as the user requests anyway. -#: elf32-arm.c:3331 +#: elf32-arm.c:5590 msgid "" "%B: warning: selected VFP11 erratum workaround is not necessary for target " "architecture" msgstr "" -#: elf32-arm.c:3865 elf32-arm.c:3885 +#: elf32-arm.c:6130 elf32-arm.c:6150 msgid "%B: unable to find VFP11 veneer `%s'" msgstr "" -#: elf32-arm.c:3930 +#: elf32-arm.c:6196 #, c-format msgid "Invalid TARGET2 relocation type '%s'." msgstr "" -#: elf32-arm.c:4071 +#: elf32-arm.c:6281 msgid "" "%B(%s): warning: interworking not enabled.\n" " first occurrence: %B: thumb call to arm" msgstr "" -#: elf32-arm.c:4759 +#: elf32-arm.c:7003 msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'." msgstr "" -#: elf32-arm.c:5059 +#: elf32-arm.c:7405 msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'." msgstr "" -#: elf32-arm.c:5689 +#: elf32-arm.c:8085 msgid "%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object" msgstr "" -#: elf32-arm.c:5890 +#: elf32-arm.c:8300 msgid "" "%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group " "relocations" msgstr "" -#: elf32-arm.c:5930 elf32-arm.c:6017 elf32-arm.c:6100 elf32-arm.c:6185 +#: elf32-arm.c:8340 elf32-arm.c:8427 elf32-arm.c:8510 elf32-arm.c:8595 msgid "%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s" msgstr "" -#: elf32-arm.c:6369 elf32-sh.c:3304 elf64-sh64.c:1556 +#: elf32-arm.c:8821 elf32-sh.c:3325 elf64-sh64.c:1556 msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section" msgstr "" -#: elf32-arm.c:6458 elf64-ppc.c:10050 +#: elf32-arm.c:8939 elf32-m68k.c:4134 elf32-xtensa.c:2765 elf64-ppc.c:10743 msgid "%B(%A+0x%lx): %s used with TLS symbol %s" msgstr "" -#: elf32-arm.c:6459 elf64-ppc.c:10051 +#: elf32-arm.c:8940 elf32-m68k.c:4135 elf32-xtensa.c:2766 elf64-ppc.c:10744 msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s" msgstr "" -#: elf32-arm.c:6482 elf32-i386.c:3492 elf32-m32r.c:2598 elf32-m68k.c:1989 -#: elf32-ppc.c:6796 elf32-s390.c:3048 elf32-sh.c:3408 elf32-xtensa.c:2290 -#: elf64-ppc.c:11215 elf64-s390.c:3009 elf64-sh64.c:1648 elf64-x86-64.c:3168 -#: elf-hppa.h:2194 elf-m10300.c:1460 elfxx-sparc.c:3256 -msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'" -msgstr "" - -#: elf32-arm.c:6516 +#: elf32-arm.c:8997 msgid "out of range" msgstr "" -#: elf32-arm.c:6520 +#: elf32-arm.c:9001 msgid "unsupported relocation" msgstr "" -#: elf32-arm.c:6528 +#: elf32-arm.c:9009 msgid "unknown error" msgstr "" -#: elf32-arm.c:6628 +#: elf32-arm.c:9409 msgid "" "Warning: Clearing the interworking flag of %B because non-interworking code " "in %B has been linked with it" msgstr "" -#: elf32-arm.c:6730 -msgid "ERROR: %B uses VFP register arguments, %B does not" +#: elf32-arm.c:9652 +msgid "error: %B: Unknown CPU architecture" +msgstr "" + +#: elf32-arm.c:9690 +msgid "error: %B: Conflicting CPU architectures %d/%d" msgstr "" -#: elf32-arm.c:6780 -msgid "ERROR: %B: Conflicting architecture profiles %c/%c" +#: elf32-arm.c:9747 +msgid "error: %B uses VFP register arguments, %B does not" msgstr "" -#: elf32-arm.c:6795 +#: elf32-arm.c:9897 +msgid "error: %B: Conflicting architecture profiles %c/%c" +msgstr "" + +#: elf32-arm.c:9921 msgid "Warning: %B: Conflicting platform configuration" msgstr "" -#: elf32-arm.c:6804 -msgid "ERROR: %B: Conflicting use of R9" +#: elf32-arm.c:9930 +msgid "error: %B: Conflicting use of R9" msgstr "" -#: elf32-arm.c:6816 -msgid "ERROR: %B: SB relative addressing conflicts with use of R9" +#: elf32-arm.c:9942 +msgid "error: %B: SB relative addressing conflicts with use of R9" msgstr "" -#: elf32-arm.c:6838 -msgid "ERROR: %B: Conflicting definitions of wchar_t" +#: elf32-arm.c:9955 +msgid "" +"warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; " +"use of wchar_t values across objects may fail" msgstr "" -#: elf32-arm.c:6867 +#: elf32-arm.c:9986 msgid "" "warning: %B uses %s enums yet the output is to use %s enums; use of enum " "values across objects may fail" msgstr "" -#: elf32-arm.c:6880 -msgid "ERROR: %B uses iWMMXt register arguments, %B does not" +#: elf32-arm.c:9998 +msgid "error: %B uses iWMMXt register arguments, %B does not" msgstr "" -#: elf32-arm.c:6920 +#: elf32-arm.c:10020 +msgid "error: fp16 format mismatch between %B and %B" +msgstr "" + +#: elf32-arm.c:10063 elf32-arm.c:10156 +msgid "%B: Unknown mandatory EABI object attribute %d" +msgstr "" + +#: elf32-arm.c:10071 elf32-arm.c:10164 msgid "Warning: %B: Unknown EABI object attribute %d" msgstr "" -#: elf32-arm.c:7045 +#: elf32-arm.c:10224 +msgid "error: %B is already in final BE8 format" +msgstr "" + +#: elf32-arm.c:10300 msgid "" -"ERROR: Source object %B has EABI version %d, but target %B has EABI version %" +"error: Source object %B has EABI version %d, but target %B has EABI version %" "d" msgstr "" -#: elf32-arm.c:7061 -msgid "ERROR: %B is compiled for APCS-%d, whereas target %B uses APCS-%d" +#: elf32-arm.c:10316 +msgid "error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d" msgstr "" -#: elf32-arm.c:7086 -msgid "ERROR: %B uses VFP instructions, whereas %B does not" +#: elf32-arm.c:10341 +msgid "error: %B uses VFP instructions, whereas %B does not" msgstr "" -#: elf32-arm.c:7090 -msgid "ERROR: %B uses FPA instructions, whereas %B does not" +#: elf32-arm.c:10345 +msgid "error: %B uses FPA instructions, whereas %B does not" msgstr "" -#: elf32-arm.c:7100 -msgid "ERROR: %B uses Maverick instructions, whereas %B does not" +#: elf32-arm.c:10355 +msgid "error: %B uses Maverick instructions, whereas %B does not" msgstr "" -#: elf32-arm.c:7104 -msgid "ERROR: %B does not use Maverick instructions, whereas %B does" +#: elf32-arm.c:10359 +msgid "error: %B does not use Maverick instructions, whereas %B does" msgstr "" -#: elf32-arm.c:7123 -msgid "ERROR: %B uses software FP, whereas %B uses hardware FP" +#: elf32-arm.c:10378 +msgid "error: %B uses software FP, whereas %B uses hardware FP" msgstr "" -#: elf32-arm.c:7127 -msgid "ERROR: %B uses hardware FP, whereas %B uses software FP" +#: elf32-arm.c:10382 +msgid "error: %B uses hardware FP, whereas %B uses software FP" msgstr "" #. Ignore init flag - it may not be set, despite the flags field #. containing valid data. #. Ignore init flag - it may not be set, despite the flags field containing valid data. -#: elf32-arm.c:7174 elf32-bfin.c:4795 elf32-cris.c:3234 elf32-m68hc1x.c:1277 -#: elf32-m68k.c:623 elf32-score.c:3753 elf32-vax.c:538 elfxx-mips.c:11351 +#: elf32-arm.c:10429 elf32-bfin.c:5082 elf32-cris.c:4110 elf32-m68hc1x.c:1280 +#: elf32-m68k.c:1169 elf32-score.c:4039 elf32-score7.c:3876 elf32-vax.c:540 +#: elfxx-mips.c:12755 #, c-format msgid "private flags = %lx:" msgstr "" -#: elf32-arm.c:7183 +#: elf32-arm.c:10438 #, c-format msgid " [interworking enabled]" msgstr "" -#: elf32-arm.c:7191 +#: elf32-arm.c:10446 #, c-format msgid " [VFP float format]" msgstr "" -#: elf32-arm.c:7193 +#: elf32-arm.c:10448 #, c-format msgid " [Maverick float format]" msgstr "" -#: elf32-arm.c:7195 +#: elf32-arm.c:10450 #, c-format msgid " [FPA float format]" msgstr "" -#: elf32-arm.c:7204 +#: elf32-arm.c:10459 #, c-format msgid " [new ABI]" msgstr "" -#: elf32-arm.c:7207 +#: elf32-arm.c:10462 #, c-format msgid " [old ABI]" msgstr "" -#: elf32-arm.c:7210 +#: elf32-arm.c:10465 #, c-format msgid " [software FP]" msgstr "" -#: elf32-arm.c:7219 +#: elf32-arm.c:10474 #, c-format msgid " [Version1 EABI]" msgstr "" -#: elf32-arm.c:7222 elf32-arm.c:7233 +#: elf32-arm.c:10477 elf32-arm.c:10488 #, c-format msgid " [sorted symbol table]" msgstr "" -#: elf32-arm.c:7224 elf32-arm.c:7235 +#: elf32-arm.c:10479 elf32-arm.c:10490 #, c-format msgid " [unsorted symbol table]" msgstr "" -#: elf32-arm.c:7230 +#: elf32-arm.c:10485 #, c-format msgid " [Version2 EABI]" msgstr "" -#: elf32-arm.c:7238 +#: elf32-arm.c:10493 #, c-format msgid " [dynamic symbols use segment index]" msgstr "" -#: elf32-arm.c:7241 +#: elf32-arm.c:10496 #, c-format msgid " [mapping symbols precede others]" msgstr "" -#: elf32-arm.c:7248 +#: elf32-arm.c:10503 #, c-format msgid " [Version3 EABI]" msgstr "" -#: elf32-arm.c:7252 +#: elf32-arm.c:10507 #, c-format msgid " [Version4 EABI]" msgstr "" -#: elf32-arm.c:7256 +#: elf32-arm.c:10511 #, c-format msgid " [Version5 EABI]" msgstr "" -#: elf32-arm.c:7259 +#: elf32-arm.c:10514 #, c-format msgid " [BE8]" msgstr "" -#: elf32-arm.c:7262 +#: elf32-arm.c:10517 #, c-format msgid " [LE8]" msgstr "" -#: elf32-arm.c:7268 +#: elf32-arm.c:10523 #, c-format msgid " " msgstr "" -#: elf32-arm.c:7275 +#: elf32-arm.c:10530 #, c-format msgid " [relocatable executable]" msgstr "" -#: elf32-arm.c:7278 +#: elf32-arm.c:10533 #, c-format msgid " [has entry point]" msgstr "" -#: elf32-arm.c:7283 +#: elf32-arm.c:10538 #, c-format msgid "" msgstr "" -#: elf32-arm.c:7522 elf32-i386.c:1231 elf32-s390.c:1003 elf32-xtensa.c:814 -#: elf64-s390.c:958 elf64-x86-64.c:1011 elfxx-sparc.c:1115 +#: elf32-arm.c:10783 elf32-i386.c:1300 elf32-s390.c:998 elf32-xtensa.c:1000 +#: elf64-s390.c:952 elf64-x86-64.c:1082 elfxx-sparc.c:1121 msgid "%B: bad symbol index: %d" msgstr "" -#: elf32-arm.c:8080 elf32-cris.c:2400 elf32-hppa.c:1906 elf32-i370.c:506 -#: elf32-i386.c:1801 elf32-m32r.c:1931 elf32-m68k.c:1338 elf32-ppc.c:4314 -#: elf32-s390.c:1679 elf32-sh.c:2584 elf32-vax.c:1050 elf64-ppc.c:5906 -#: elf64-s390.c:1654 elf64-sh64.c:3438 elf64-x86-64.c:1631 elf-m10300.c:4207 -#: elfxx-sparc.c:1797 -#, c-format -msgid "dynamic variable `%s' is zero size" +#: elf32-arm.c:10904 elf64-x86-64.c:1242 elf64-x86-64.c:1411 elfxx-mips.c:7870 +msgid "" +"%B: relocation %s against `%s' can not be used when making a shared object; " +"recompile with -fPIC" msgstr "" -#: elf32-arm.c:8603 +#: elf32-arm.c:11893 #, c-format msgid "Errors encountered processing file %s" msgstr "" -#: elf32-arm.c:9853 elf32-arm.c:9875 -msgid "%B: error: VFP11 veneer out of range" +#: elf32-arm.c:13339 +msgid "%B: error: Cortex-A8 erratum stub is allocated in unsafe location" msgstr "" -#: elf32-avr.c:1253 elf32-bfin.c:2795 elf32-cr16.c:887 elf32-cr16c.c:790 -#: elf32-cris.c:1538 elf32-crx.c:933 elf32-d10v.c:517 elf32-fr30.c:616 -#: elf32-frv.c:4129 elf32-h8300.c:516 elf32-i860.c:1218 elf32-ip2k.c:1499 -#: elf32-iq2000.c:647 elf32-m32c.c:560 elf32-m32r.c:3124 elf32-m68hc1x.c:1133 -#: elf32-mep.c:642 elf32-msp430.c:497 elf32-mt.c:402 elf32-openrisc.c:411 -#: elf32-score.c:2456 elf32-spu.c:2813 elf32-v850.c:1701 elf32-xstormy16.c:946 -#: elf64-mmix.c:1533 elf-m10200.c:456 elf-m10300.c:1523 -msgid "internal error: out of range error" +#. There's not much we can do apart from complain if this +#. happens. +#: elf32-arm.c:13366 +msgid "%B: error: Cortex-A8 erratum stub out of range (input file too large)" msgstr "" -#: elf32-avr.c:1257 elf32-bfin.c:2799 elf32-cr16.c:891 elf32-cr16c.c:794 -#: elf32-cris.c:1542 elf32-crx.c:937 elf32-d10v.c:521 elf32-fr30.c:620 -#: elf32-frv.c:4133 elf32-h8300.c:520 elf32-i860.c:1222 elf32-iq2000.c:651 -#: elf32-m32c.c:564 elf32-m32r.c:3128 elf32-m68hc1x.c:1137 elf32-mep.c:646 -#: elf32-msp430.c:501 elf32-openrisc.c:415 elf32-score.c:2460 elf32-spu.c:2817 -#: elf32-v850.c:1705 elf32-xstormy16.c:950 elf64-mmix.c:1537 elf-m10200.c:460 -#: elf-m10300.c:1527 elfxx-mips.c:8032 -msgid "internal error: unsupported relocation error" +#: elf32-arm.c:13457 elf32-arm.c:13479 +msgid "%B: error: VFP11 veneer out of range" msgstr "" -#: elf32-avr.c:1261 elf32-bfin.c:2803 elf32-cris.c:1546 elf32-fr30.c:624 -#: elf32-frv.c:4137 elf32-i860.c:1226 elf32-ip2k.c:1510 elf32-iq2000.c:655 -#: elf32-m32c.c:568 elf32-mep.c:650 elf32-msp430.c:505 elf32-mt.c:406 -#: elf32-openrisc.c:419 elf32-v850.c:1709 elf32-xstormy16.c:954 +#: elf32-avr.c:1259 elf32-bfin.c:3208 elf32-cris.c:2097 elf32-fr30.c:624 +#: elf32-frv.c:4122 elf32-i860.c:1226 elf32-ip2k.c:1510 elf32-iq2000.c:699 +#: elf32-m32c.c:568 elf32-mep.c:549 elf32-moxie.c:299 elf32-msp430.c:501 +#: elf32-mt.c:406 elf32-openrisc.c:419 elf32-v850.c:1709 elf32-xstormy16.c:956 #: elf64-mmix.c:1541 msgid "internal error: dangerous relocation" msgstr "" -#: elf32-avr.c:1265 elf32-bfin.c:2807 elf32-cr16.c:899 elf32-cr16c.c:802 -#: elf32-cris.c:1550 elf32-crx.c:945 elf32-d10v.c:529 elf32-fr30.c:628 -#: elf32-frv.c:4141 elf32-h8300.c:528 elf32-i860.c:1230 elf32-ip2k.c:1514 -#: elf32-iq2000.c:659 elf32-m32c.c:572 elf32-m32r.c:3136 elf32-m68hc1x.c:1145 -#: elf32-mep.c:654 elf32-msp430.c:509 elf32-mt.c:410 elf32-openrisc.c:423 -#: elf32-score.c:2468 elf32-spu.c:2825 elf32-v850.c:1725 elf32-xstormy16.c:958 -#: elf64-mmix.c:1545 elf-m10200.c:468 elf-m10300.c:1540 -msgid "internal error: unknown error" +#: elf32-avr.c:2409 elf32-hppa.c:605 elf32-m68hc1x.c:165 elf64-ppc.c:4141 +msgid "%B: cannot create stub entry %s" msgstr "" -#: elf32-avr.c:2369 elf32-hppa.c:595 elf32-m68hc1x.c:164 elf64-ppc.c:3808 -msgid "%B: cannot create stub entry %s" +#: elf32-bfin.c:1581 +msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'" +msgstr "" + +#: elf32-bfin.c:1614 elf32-i386.c:4026 elf32-m68k.c:4176 elf32-s390.c:3067 +#: elf64-s390.c:3026 elf64-x86-64.c:3697 +msgid "%B(%A+0x%lx): reloc against `%s': error %d" msgstr "" -#: elf32-bfin.c:2274 +#: elf32-bfin.c:2714 msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend" msgstr "" -#: elf32-bfin.c:2288 elf32-frv.c:2919 +#: elf32-bfin.c:2728 elf32-frv.c:2904 msgid "relocation references symbol not defined in the module" msgstr "" -#: elf32-bfin.c:2385 +#: elf32-bfin.c:2825 msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend" msgstr "" -#: elf32-bfin.c:2424 elf32-bfin.c:2547 elf32-frv.c:3656 elf32-frv.c:3777 +#: elf32-bfin.c:2866 elf32-bfin.c:2989 elf32-frv.c:3641 elf32-frv.c:3762 msgid "cannot emit fixups in read-only section" msgstr "" -#: elf32-bfin.c:2452 elf32-bfin.c:2587 elf32-frv.c:3687 elf32-frv.c:3821 +#: elf32-bfin.c:2897 elf32-bfin.c:3027 elf32-frv.c:3672 elf32-frv.c:3806 +#: elf32-lm32.c:1104 msgid "cannot emit dynamic relocations in read-only section" msgstr "" -#: elf32-bfin.c:2505 +#: elf32-bfin.c:2947 msgid "R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend" msgstr "" -#: elf32-bfin.c:2673 +#: elf32-bfin.c:3112 msgid "relocations between different segments are not supported" msgstr "" -#: elf32-bfin.c:2674 +#: elf32-bfin.c:3113 msgid "warning: relocation references a different segment" msgstr "" -#: elf32-bfin.c:3083 -msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'" -msgstr "" - -#: elf32-bfin.c:3116 elf32-i386.c:3533 elf32-m68k.c:2030 elf32-s390.c:3100 -#: elf64-s390.c:3061 elf64-x86-64.c:3207 -msgid "%B(%A+0x%lx): reloc against `%s': error %d" -msgstr "" - -#: elf32-bfin.c:4687 elf32-frv.c:6423 +#: elf32-bfin.c:4974 elf32-frv.c:6408 msgid "%B: unsupported relocation type %i" msgstr "" -#: elf32-bfin.c:4868 elf32-frv.c:6831 +#: elf32-bfin.c:5127 elf32-frv.c:6816 #, c-format msgid "%s: cannot link non-fdpic object file into fdpic executable" msgstr "" -#: elf32-bfin.c:4872 elf32-frv.c:6835 +#: elf32-bfin.c:5131 elf32-frv.c:6820 #, c-format msgid "%s: cannot link fdpic object file into non-fdpic executable" msgstr "" -#: elf32-cr16.c:895 elf32-cr16c.c:798 elf32-crx.c:941 elf32-d10v.c:525 -#: elf32-h8300.c:524 elf32-m32r.c:3132 elf32-m68hc1x.c:1141 elf32-score.c:2464 -#: elf32-spu.c:2821 elf-m10200.c:464 -msgid "internal error: dangerous error" -msgstr "" - -#: elf32-cris.c:1060 +#: elf32-cris.c:1169 msgid "%B, section %A: unresolvable relocation %s against symbol `%s'" msgstr "" -#: elf32-cris.c:1129 +#: elf32-cris.c:1238 msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'" msgstr "" -#: elf32-cris.c:1131 +#: elf32-cris.c:1240 msgid "%B, section %A: No PLT for relocation %s against symbol `%s'" msgstr "" -#: elf32-cris.c:1137 elf32-cris.c:1269 +#: elf32-cris.c:1246 elf32-cris.c:1379 elf32-cris.c:1641 elf32-cris.c:1730 +#: elf32-cris.c:1883 msgid "[whose name is lost]" msgstr "" -#: elf32-cris.c:1255 +#: elf32-cris.c:1365 msgid "" "%B, section %A: relocation %s with non-zero addend %d against local symbol" msgstr "" -#: elf32-cris.c:1263 +#: elf32-cris.c:1373 elf32-cris.c:1724 elf32-cris.c:1877 msgid "" "%B, section %A: relocation %s with non-zero addend %d against symbol `%s'" msgstr "" -#: elf32-cris.c:1289 +#: elf32-cris.c:1399 msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'" msgstr "" -#: elf32-cris.c:1305 +#: elf32-cris.c:1415 msgid "%B, section %A: relocation %s with no GOT created" msgstr "" -#: elf32-cris.c:1423 -msgid "%B: Internal inconsistency; no relocation section %s" +#. We shouldn't get here for GCC-emitted code. +#: elf32-cris.c:1632 +msgid "" +"%B, section %A: relocation %s has an undefined reference to `%s', perhaps a " +"declaration mixup?" msgstr "" -#: elf32-cris.c:2511 +#: elf32-cris.c:2010 +msgid "" +"%B, section %A: relocation %s is not allowed for symbol: `%s' which is " +"defined outside the program, perhaps a declaration mixup?" +msgstr "" + +#: elf32-cris.c:2063 +msgid "(too many global variables for -fpic: recompile with -fPIC)" +msgstr "" + +#: elf32-cris.c:2070 +msgid "" +"(thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or " +"-mno-small-tls)" +msgstr "" + +#: elf32-cris.c:3204 msgid "" "%B, section %A:\n" " v10/v32 compatible object %s must not contain a PIC relocation" msgstr "" -#: elf32-cris.c:2698 elf32-cris.c:2766 +#: elf32-cris.c:3309 +msgid "" +"%B, section %A:\n" +" relocation %s not valid in a shared object; typically an option mixup, " +"recompile with -fPIC" +msgstr "" + +#: elf32-cris.c:3523 msgid "" "%B, section %A:\n" " relocation %s should not be used in a shared object; recompile with -fPIC" msgstr "" -#: elf32-cris.c:3183 +#: elf32-cris.c:3940 +msgid "" +"%B, section `%A', to symbol `%s':\n" +" relocation %s should not be used in a shared object; recompile with -fPIC" +msgstr "" + +#: elf32-cris.c:4059 msgid "Unexpected machine number" msgstr "" -#: elf32-cris.c:3237 +#: elf32-cris.c:4113 #, c-format msgid " [symbols have a _ prefix]" msgstr "" -#: elf32-cris.c:3240 +#: elf32-cris.c:4116 #, c-format msgid " [v10 and v32]" msgstr "" -#: elf32-cris.c:3243 +#: elf32-cris.c:4119 #, c-format msgid " [v32]" msgstr "" -#: elf32-cris.c:3288 +#: elf32-cris.c:4164 msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols" msgstr "" -#: elf32-cris.c:3289 +#: elf32-cris.c:4165 msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols" msgstr "" -#: elf32-cris.c:3308 +#: elf32-cris.c:4184 msgid "%B contains CRIS v32 code, incompatible with previous objects" msgstr "" -#: elf32-cris.c:3310 +#: elf32-cris.c:4186 msgid "%B contains non-CRIS-v32 code, incompatible with previous objects" msgstr "" -#: elf32-frv.c:1523 elf32-frv.c:1672 +#: elf32-frv.c:1507 elf32-frv.c:1656 msgid "relocation requires zero addend" msgstr "" -#: elf32-frv.c:2906 +#: elf32-frv.c:2891 msgid "%B(%A+0x%x): relocation to `%s+%x' may have caused the error above" msgstr "" -#: elf32-frv.c:2995 +#: elf32-frv.c:2980 msgid "R_FRV_GETTLSOFF not applied to a call instruction" msgstr "" -#: elf32-frv.c:3037 +#: elf32-frv.c:3022 msgid "R_FRV_GOTTLSDESC12 not applied to an lddi instruction" msgstr "" -#: elf32-frv.c:3108 +#: elf32-frv.c:3093 msgid "R_FRV_GOTTLSDESCHI not applied to a sethi instruction" msgstr "" -#: elf32-frv.c:3145 +#: elf32-frv.c:3130 msgid "R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction" msgstr "" -#: elf32-frv.c:3193 +#: elf32-frv.c:3178 msgid "R_FRV_TLSDESC_RELAX not applied to an ldd instruction" msgstr "" -#: elf32-frv.c:3277 +#: elf32-frv.c:3262 msgid "R_FRV_GETTLSOFF_RELAX not applied to a calll instruction" msgstr "" -#: elf32-frv.c:3332 +#: elf32-frv.c:3317 msgid "R_FRV_GOTTLSOFF12 not applied to an ldi instruction" msgstr "" -#: elf32-frv.c:3362 +#: elf32-frv.c:3347 msgid "R_FRV_GOTTLSOFFHI not applied to a sethi instruction" msgstr "" -#: elf32-frv.c:3391 +#: elf32-frv.c:3376 msgid "R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction" msgstr "" -#: elf32-frv.c:3422 +#: elf32-frv.c:3407 msgid "R_FRV_TLSOFF_RELAX not applied to an ld instruction" msgstr "" -#: elf32-frv.c:3467 +#: elf32-frv.c:3452 msgid "R_FRV_TLSMOFFHI not applied to a sethi instruction" msgstr "" -#: elf32-frv.c:3494 +#: elf32-frv.c:3479 msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction" msgstr "" -#: elf32-frv.c:3615 +#: elf32-frv.c:3600 msgid "R_FRV_FUNCDESC references dynamic symbol with nonzero addend" msgstr "" -#: elf32-frv.c:3735 +#: elf32-frv.c:3720 msgid "R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend" msgstr "" -#: elf32-frv.c:3992 elf32-frv.c:4148 +#: elf32-frv.c:3977 elf32-frv.c:4133 msgid "%B(%A+0x%lx): reloc against `%s': %s" msgstr "" -#: elf32-frv.c:3994 elf32-frv.c:3998 +#: elf32-frv.c:3979 elf32-frv.c:3983 msgid "relocation references a different segment" msgstr "" -#: elf32-frv.c:6745 +#: elf32-frv.c:6730 #, c-format msgid "" "%s: compiled with %s and linked with modules that use non-pic relocations" msgstr "" -#: elf32-frv.c:6798 elf32-iq2000.c:808 elf32-m32c.c:819 +#: elf32-frv.c:6783 elf32-iq2000.c:852 elf32-m32c.c:814 #, c-format msgid "%s: compiled with %s and linked with modules compiled with %s" msgstr "" -#: elf32-frv.c:6810 +#: elf32-frv.c:6795 #, c-format msgid "" "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%" "lx)" msgstr "" -#: elf32-frv.c:6860 elf32-iq2000.c:845 elf32-m32c.c:855 elf32-mt.c:587 +#: elf32-frv.c:6845 elf32-iq2000.c:889 elf32-m32c.c:850 elf32-mt.c:583 #, c-format msgid "private flags = 0x%lx:" msgstr "" @@ -1242,63 +1498,79 @@ msgstr "" msgid "%B: Relocations in generic ELF (EM: %d)" msgstr "" -#: elf32-hppa.c:844 elf32-hppa.c:3577 +#: elf32-hppa.c:854 elf32-hppa.c:3570 msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections" msgstr "" -#: elf32-hppa.c:1253 +#: elf32-hppa.c:1286 msgid "" "%B: relocation %s can not be used when making a shared object; recompile " "with -fPIC" msgstr "" -#: elf32-hppa.c:1506 -#, c-format -msgid "Could not find relocation section for %s" -msgstr "" - -#: elf32-hppa.c:2795 +#: elf32-hppa.c:2780 msgid "%B: duplicate export stub %s" msgstr "" -#: elf32-hppa.c:3413 +#: elf32-hppa.c:3406 msgid "" "%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link" msgstr "" -#: elf32-hppa.c:4267 +#: elf32-hppa.c:4260 msgid "%B(%A+0x%lx): cannot handle %s for %s" msgstr "" -#: elf32-hppa.c:4574 +#: elf32-hppa.c:4567 msgid ".got section not immediately after .plt section" msgstr "" -#: elf32-i386.c:362 elf32-ppc.c:1616 elf32-s390.c:379 elf64-ppc.c:2152 -#: elf64-s390.c:403 elf64-x86-64.c:222 +#: elf32-i386.c:371 elf32-ppc.c:1666 elf32-s390.c:379 elf64-ppc.c:2283 +#: elf64-s390.c:403 elf64-x86-64.c:234 msgid "%B: invalid relocation type %d" msgstr "" -#: elf32-i386.c:1180 elf64-x86-64.c:961 +#: elf32-i386.c:1246 elf64-x86-64.c:1029 msgid "" "%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed" msgstr "" -#: elf32-i386.c:1359 elf32-s390.c:1185 elf32-sh.c:5063 elf64-s390.c:1149 -#: elfxx-sparc.c:1243 -msgid "%B: `%s' accessed both as normal and thread local symbol" +#: elf32-i386.c:1387 elf32-i386.c:2970 elf64-x86-64.c:1171 elf64-x86-64.c:2680 +msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s" msgstr "" -#: elf32-i386.c:1474 elf32-s390.c:1294 elf64-ppc.c:4870 elf64-s390.c:1261 -#: elf64-x86-64.c:1294 -msgid "%B: bad relocation section name `%s'" +#: elf32-i386.c:1548 elf32-s390.c:1180 elf32-sh.c:5065 elf32-xtensa.c:1173 +#: elf64-s390.c:1143 elfxx-sparc.c:1257 +msgid "%B: `%s' accessed both as normal and thread local symbol" msgstr "" -#: elf32-i386.c:2536 +#: elf32-i386.c:2805 msgid "%B: unrecognized relocation (0x%x) in section `%A'" msgstr "" -#: elf32-i386.c:2758 +#: elf32-i386.c:3219 elf64-x86-64.c:3081 +msgid "hidden symbol" +msgstr "" + +#: elf32-i386.c:3222 elf64-x86-64.c:3084 +msgid "internal symbol" +msgstr "" + +#: elf32-i386.c:3225 elf64-x86-64.c:3087 +msgid "protected symbol" +msgstr "" + +#: elf32-i386.c:3228 elf64-x86-64.c:3090 +msgid "symbol" +msgstr "" + +#: elf32-i386.c:3233 +msgid "" +"%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when " +"making a shared object" +msgstr "" + +#: elf32-i386.c:3243 msgid "" "%B: relocation R_386_GOTOFF against protected function `%s' can not be used " "when making a shared object" @@ -1328,133 +1600,157 @@ msgstr "" msgid "unsupported relocation between data/insn address spaces" msgstr "" -#: elf32-iq2000.c:821 elf32-m32c.c:831 +#: elf32-iq2000.c:865 elf32-m32c.c:826 #, c-format msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "" +#: elf32-lm32.c:698 +msgid "global pointer relative relocation when _gp not defined" +msgstr "" + +#: elf32-lm32.c:753 +msgid "global pointer relative address out of range" +msgstr "" + +#: elf32-lm32.c:1058 +msgid "internal error: addend should be zero for R_LM32_16_GOT" +msgstr "" + #: elf32-m32r.c:1453 msgid "SDA relocation when _SDA_BASE_ not defined" msgstr "" -#: elf32-m32r.c:3061 +#: elf32-m32r.c:3039 msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)" msgstr "" -#: elf32-m32r.c:3589 +#: elf32-m32r.c:3567 msgid "%B: Instruction set mismatch with previous modules" msgstr "" -#: elf32-m32r.c:3610 +#: elf32-m32r.c:3588 #, c-format msgid "private flags = %lx" msgstr "" -#: elf32-m32r.c:3615 +#: elf32-m32r.c:3593 #, c-format msgid ": m32r instructions" msgstr "" -#: elf32-m32r.c:3616 +#: elf32-m32r.c:3594 #, c-format msgid ": m32rx instructions" msgstr "" -#: elf32-m32r.c:3617 +#: elf32-m32r.c:3595 #, c-format msgid ": m32r2 instructions" msgstr "" -#: elf32-m68hc1x.c:1045 +#: elf32-m68hc1x.c:1048 #, c-format msgid "" "Reference to the far symbol `%s' using a wrong relocation may result in " "incorrect execution" msgstr "" -#: elf32-m68hc1x.c:1068 +#: elf32-m68hc1x.c:1071 #, c-format msgid "" "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked " "address [%lx:%04lx] (%lx)" msgstr "" -#: elf32-m68hc1x.c:1087 +#: elf32-m68hc1x.c:1090 #, c-format msgid "" "reference to a banked address [%lx:%04lx] in the normal address space at %" "04lx" msgstr "" -#: elf32-m68hc1x.c:1220 +#: elf32-m68hc1x.c:1223 msgid "" "%B: linking files compiled for 16-bit integers (-mshort) and others for 32-" "bit integers" msgstr "" -#: elf32-m68hc1x.c:1227 +#: elf32-m68hc1x.c:1230 msgid "" "%B: linking files compiled for 32-bit double (-fshort-double) and others for " "64-bit double" msgstr "" -#: elf32-m68hc1x.c:1236 +#: elf32-m68hc1x.c:1239 msgid "%B: linking files compiled for HCS12 with others compiled for HC12" msgstr "" -#: elf32-m68hc1x.c:1252 elf32-ppc.c:3734 elf64-sparc.c:697 elfxx-mips.c:11312 +#: elf32-m68hc1x.c:1255 elf32-ppc.c:4255 elf64-sparc.c:698 elfxx-mips.c:12617 msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "" -#: elf32-m68hc1x.c:1280 +#: elf32-m68hc1x.c:1283 #, c-format msgid "[abi=32-bit int, " msgstr "" -#: elf32-m68hc1x.c:1282 +#: elf32-m68hc1x.c:1285 #, c-format msgid "[abi=16-bit int, " msgstr "" -#: elf32-m68hc1x.c:1285 +#: elf32-m68hc1x.c:1288 #, c-format msgid "64-bit double, " msgstr "" -#: elf32-m68hc1x.c:1287 +#: elf32-m68hc1x.c:1290 #, c-format msgid "32-bit double, " msgstr "" -#: elf32-m68hc1x.c:1290 +#: elf32-m68hc1x.c:1293 #, c-format msgid "cpu=HC11]" msgstr "" -#: elf32-m68hc1x.c:1292 +#: elf32-m68hc1x.c:1295 #, c-format msgid "cpu=HCS12]" msgstr "" -#: elf32-m68hc1x.c:1294 +#: elf32-m68hc1x.c:1297 #, c-format msgid "cpu=HC12]" msgstr "" -#: elf32-m68hc1x.c:1297 +#: elf32-m68hc1x.c:1300 #, c-format msgid " [memory=bank-model]" msgstr "" -#: elf32-m68hc1x.c:1299 +#: elf32-m68hc1x.c:1302 #, c-format msgid " [memory=flat]" msgstr "" -#: elf32-m68k.c:638 elf32-m68k.c:639 +#: elf32-m68k.c:1184 elf32-m68k.c:1185 msgid "unknown" msgstr "" +#: elf32-m68k.c:1645 +msgid "%B: GOT overflow: Number of relocations with 8-bit offset > %d" +msgstr "" + +#: elf32-m68k.c:1651 +msgid "%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d" +msgstr "" + +#: elf32-m68k.c:3902 +msgid "%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object" +msgstr "" + #: elf32-mcore.c:99 elf32-mcore.c:442 msgid "%B: Relocation %s (%d) is not currently supported.\n" msgstr "" @@ -1463,190 +1759,213 @@ msgstr "" msgid "%B: Unknown relocation type %d\n" msgstr "" -#: elf32-mep.c:812 +#: elf32-mep.c:654 msgid "%B and %B are for different cores" msgstr "" -#: elf32-mep.c:829 +#: elf32-mep.c:671 msgid "%B and %B are for different configurations" msgstr "" -#: elf32-mep.c:867 +#: elf32-mep.c:708 #, c-format msgid "private flags = 0x%lx" msgstr "" -#: elf32-mips.c:989 elf64-mips.c:1976 elfn32-mips.c:1808 +#: elf32-microblaze.c:737 +#, c-format +msgid "%s: unknown relocation type %d" +msgstr "" + +#: elf32-microblaze.c:862 elf32-microblaze.c:907 +#, c-format +msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)" +msgstr "" + +#: elf32-microblaze.c:1150 elfxx-sparc.c:2957 +msgid "%B: probably compiled without -fPIC?" +msgstr "" + +#: elf32-microblaze.c:2086 elflink.c:12444 +msgid "%B: bad relocation section name `%s'" +msgstr "" + +#: elf32-mips.c:1045 elf64-mips.c:2083 elfn32-mips.c:1888 msgid "literal relocation occurs for an external symbol" msgstr "" -#: elf32-mips.c:1029 elf32-score.c:484 elf64-mips.c:2019 elfn32-mips.c:1849 +#: elf32-mips.c:1085 elf32-score.c:580 elf32-score7.c:480 elf64-mips.c:2126 +#: elfn32-mips.c:1929 msgid "32bits gp relative relocation occurs for an external symbol" msgstr "" -#: elf32-ppc.c:1681 +#: elf32-ppc.c:1731 #, c-format msgid "generic linker can't handle %s" msgstr "" -#: elf32-ppc.c:2163 +#: elf32-ppc.c:2211 msgid "corrupt or empty %s section in %B" msgstr "" -#: elf32-ppc.c:2170 +#: elf32-ppc.c:2218 msgid "unable to read in %s section from %B" msgstr "" -#: elf32-ppc.c:2176 +#: elf32-ppc.c:2224 msgid "corrupt %s section in %B" msgstr "" -#: elf32-ppc.c:2219 +#: elf32-ppc.c:2267 msgid "warning: unable to set size of %s section in %B" msgstr "" -#: elf32-ppc.c:2267 +#: elf32-ppc.c:2315 msgid "failed to allocate space for new APUinfo section." msgstr "" -#: elf32-ppc.c:2286 +#: elf32-ppc.c:2334 msgid "failed to compute new APUinfo section." msgstr "" -#: elf32-ppc.c:2289 +#: elf32-ppc.c:2337 msgid "failed to install new APUinfo section." msgstr "" -#: elf32-ppc.c:3022 +#: elf32-ppc.c:3364 msgid "%B: relocation %s cannot be used when making a shared object" msgstr "" -#. It does not make sense to have a procedure linkage -#. table entry for a local symbol. -#: elf32-ppc.c:3292 -msgid "%B(%A+0x%lx): %s reloc against local symbol" +#. It does not make sense to have a procedure linkage +#. table entry for a local symbol. +#: elf32-ppc.c:3723 +msgid "%B(%A+0x%lx): %s reloc against local symbol" +msgstr "" + +#: elf32-ppc.c:4067 elf32-ppc.c:4082 elfxx-mips.c:12324 elfxx-mips.c:12350 +#: elfxx-mips.c:12372 elfxx-mips.c:12398 +msgid "Warning: %B uses hard float, %B uses soft float" +msgstr "" + +#: elf32-ppc.c:4070 elf32-ppc.c:4074 +msgid "" +"Warning: %B uses double-precision hard float, %B uses single-precision hard " +"float" +msgstr "" + +#: elf32-ppc.c:4078 +msgid "Warning: %B uses soft float, %B uses single-precision hard float" +msgstr "" + +#: elf32-ppc.c:4085 elf32-ppc.c:4089 elfxx-mips.c:12304 elfxx-mips.c:12308 +msgid "Warning: %B uses unknown floating point ABI %d" +msgstr "" + +#: elf32-ppc.c:4131 elf32-ppc.c:4135 +msgid "Warning: %B uses unknown vector ABI %d" +msgstr "" + +#: elf32-ppc.c:4139 +msgid "Warning: %B uses vector ABI \"%s\", %B uses \"%s\"" msgstr "" -#: elf32-ppc.c:3633 elf32-ppc.c:3637 elfxx-mips.c:11056 elfxx-mips.c:11075 -#: elfxx-mips.c:11090 -msgid "Warning: %B uses hard float, %B uses soft float" +#: elf32-ppc.c:4156 elf32-ppc.c:4159 +msgid "Warning: %B uses r3/r4 for small structure returns, %B uses memory" msgstr "" -#: elf32-ppc.c:3640 elf32-ppc.c:3644 elfxx-mips.c:11037 elfxx-mips.c:11041 -msgid "Warning: %B uses unknown floating point ABI %d" +#: elf32-ppc.c:4162 elf32-ppc.c:4166 +msgid "Warning: %B uses unknown small structure return convention %d" msgstr "" -#: elf32-ppc.c:3699 +#: elf32-ppc.c:4220 msgid "" "%B: compiled with -mrelocatable and linked with modules compiled normally" msgstr "" -#: elf32-ppc.c:3707 +#: elf32-ppc.c:4228 msgid "" "%B: compiled normally and linked with modules compiled with -mrelocatable" msgstr "" -#: elf32-ppc.c:3793 +#: elf32-ppc.c:4314 msgid "Using bss-plt due to %B" msgstr "" -#: elf32-ppc.c:6002 elf64-ppc.c:10567 +#: elf32-ppc.c:7056 elf64-ppc.c:11364 msgid "%B: unknown relocation type %d for symbol %s" msgstr "" -#: elf32-ppc.c:6252 +#: elf32-ppc.c:7316 msgid "%B(%A+0x%lx): non-zero addend on %s reloc against `%s'" msgstr "" -#: elf32-ppc.c:6597 elf32-ppc.c:6623 elf32-ppc.c:6682 +#: elf32-ppc.c:7499 elf64-ppc.c:11854 +msgid "%B(%A+0x%lx): relocation %s for indirect function %s unsupported" +msgstr "" + +#: elf32-ppc.c:7709 elf32-ppc.c:7736 elf32-ppc.c:7787 msgid "" "%B: the target (%s) of a %s relocation is in the wrong output section (%s)" msgstr "" -#: elf32-ppc.c:6737 +#: elf32-ppc.c:7847 msgid "%B: relocation %s is not yet supported for symbol %s." msgstr "" -#: elf32-ppc.c:6845 elf64-ppc.c:11262 +#: elf32-ppc.c:7955 elf64-ppc.c:12110 msgid "%B(%A+0x%lx): %s reloc against `%s': error %d" msgstr "" -#: elf32-s390.c:2238 elf64-s390.c:2212 +#: elf32-ppc.c:8423 +#, c-format +msgid "%s not defined in linker created %s" +msgstr "" + +#: elf32-s390.c:2207 elf64-s390.c:2179 msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s" msgstr "" -#: elf32-score.c:1418 elfxx-mips.c:2701 +#: elf32-score.c:1533 elf32-score7.c:1424 elfxx-mips.c:3299 msgid "not enough GOT space for local GOT entries" msgstr "" -#: elf32-score.c:2550 +#: elf32-score.c:2765 +msgid "address not word align" +msgstr "" + +#: elf32-score.c:2850 elf32-score7.c:2685 #, c-format msgid "%s: Malformed reloc detected for section %s" msgstr "" -#: elf32-score.c:2601 +#: elf32-score.c:2901 elf32-score7.c:2736 msgid "%B: CALL15 reloc at 0x%lx not against global symbol" msgstr "" -#: elf32-score.c:3756 +#: elf32-score.c:4042 elf32-score7.c:3879 #, c-format msgid " [pic]" msgstr "" -#: elf32-score.c:3760 +#: elf32-score.c:4046 elf32-score7.c:3883 #, c-format msgid " [fix dep]" msgstr "" -#: elf32-score.c:3802 elfxx-mips.c:11221 +#: elf32-score.c:4088 elf32-score7.c:3925 msgid "%B: warning: linking PIC files with non-PIC files" msgstr "" -#: elf32-sh64.c:222 elf64-sh64.c:2350 -#, c-format -msgid "%s: compiled as 32-bit object and %s is 64-bit" -msgstr "" - -#: elf32-sh64.c:225 elf64-sh64.c:2353 -#, c-format -msgid "%s: compiled as 64-bit object and %s is 32-bit" -msgstr "" - -#: elf32-sh64.c:227 elf64-sh64.c:2355 -#, c-format -msgid "%s: object size does not match that of target %s" -msgstr "" - -#: elf32-sh64.c:450 elf64-sh64.c:2894 -#, c-format -msgid "%s: encountered datalabel symbol in input" -msgstr "" - -#: elf32-sh64.c:527 -msgid "PTB mismatch: a SHmedia address (bit 0 == 1)" -msgstr "" - -#: elf32-sh64.c:530 -msgid "PTA mismatch: a SHcompact address (bit 0 == 0)" -msgstr "" - -#: elf32-sh64.c:548 -#, c-format -msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16" -msgstr "" - -#: elf32-sh64.c:597 -msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n" +#: elf32-sh-symbian.c:130 +msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS" msgstr "" -#: elf32-sh64.c:673 -#, c-format -msgid "%s: could not write out added .cranges entries" +#: elf32-sh-symbian.c:383 +msgid "%B: Unrecognised .directive command: %s" msgstr "" -#: elf32-sh64.c:733 -#, c-format -msgid "%s: could not write out sorted .cranges entries" +#: elf32-sh-symbian.c:503 +msgid "%B: Failed to add renamed symbol %s" msgstr "" #: elf32-sh.c:533 @@ -1681,40 +2000,75 @@ msgstr "" msgid "%B: 0x%lx: fatal: reloc overflow while relaxing" msgstr "" -#: elf32-sh.c:3249 elf64-sh64.c:1526 +#: elf32-sh.c:3270 elf64-sh64.c:1526 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled" msgstr "" -#: elf32-sh.c:3486 +#: elf32-sh.c:3507 msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation" msgstr "" -#: elf32-sh.c:3519 elf32-sh.c:3534 +#: elf32-sh.c:3540 elf32-sh.c:3555 msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx" msgstr "" -#: elf32-sh.c:3548 +#: elf32-sh.c:3569 msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32" msgstr "" -#: elf32-sh.c:3562 +#: elf32-sh.c:3583 msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32" msgstr "" -#: elf32-sh.c:5275 elf64-alpha.c:4533 +#: elf32-sh.c:5256 elf64-alpha.c:4525 msgid "%B: TLS local exec code cannot be linked into shared objects" msgstr "" -#: elf32-sh-symbian.c:130 -msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS" +#: elf32-sh64.c:222 elf64-sh64.c:2333 +#, c-format +msgid "%s: compiled as 32-bit object and %s is 64-bit" msgstr "" -#: elf32-sh-symbian.c:383 -msgid "%B: Unrecognised .directive command: %s" +#: elf32-sh64.c:225 elf64-sh64.c:2336 +#, c-format +msgid "%s: compiled as 64-bit object and %s is 32-bit" msgstr "" -#: elf32-sh-symbian.c:504 -msgid "%B: Failed to add renamed symbol %s" +#: elf32-sh64.c:227 elf64-sh64.c:2338 +#, c-format +msgid "%s: object size does not match that of target %s" +msgstr "" + +#: elf32-sh64.c:450 elf64-sh64.c:2852 +#, c-format +msgid "%s: encountered datalabel symbol in input" +msgstr "" + +#: elf32-sh64.c:527 +msgid "PTB mismatch: a SHmedia address (bit 0 == 1)" +msgstr "" + +#: elf32-sh64.c:530 +msgid "PTA mismatch: a SHcompact address (bit 0 == 0)" +msgstr "" + +#: elf32-sh64.c:548 +#, c-format +msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16" +msgstr "" + +#: elf32-sh64.c:597 +msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n" +msgstr "" + +#: elf32-sh64.c:673 +#, c-format +msgid "%s: could not write out added .cranges entries" +msgstr "" + +#: elf32-sh64.c:733 +#, c-format +msgid "%s: could not write out sorted .cranges entries" msgstr "" #: elf32-sparc.c:89 @@ -1725,84 +2079,135 @@ msgstr "" msgid "%B: linking little endian files with big endian files" msgstr "" -#: elf32-spu.c:995 +#: elf32-spu.c:723 +msgid "%X%P: overlay section %A does not start on a cache line.\n" +msgstr "" + +#: elf32-spu.c:731 +msgid "%X%P: overlay section %A is larger than a cache line.\n" +msgstr "" + +#: elf32-spu.c:751 +msgid "%X%P: overlay section %A is not in cache area.\n" +msgstr "" + +#: elf32-spu.c:791 +msgid "%X%P: overlay sections %A and %A do not start at the same address.\n" +msgstr "" + +#: elf32-spu.c:1015 msgid "warning: call to non-function symbol %s defined in %B" msgstr "" -#: elf32-spu.c:1315 +#: elf32-spu.c:1365 +msgid "%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)\n" +msgstr "" + +#: elf32-spu.c:1884 msgid "%B is not allowed to define %s" msgstr "" -#: elf32-spu.c:1352 +#: elf32-spu.c:1892 +#, c-format +msgid "you are not allowed to define %s in a script" +msgstr "" + +#: elf32-spu.c:1926 #, c-format msgid "%s in overlay section" msgstr "" -#: elf32-spu.c:1363 +#: elf32-spu.c:1955 msgid "overlay stub relocation overflow" msgstr "" -#: elf32-spu.c:1820 +#: elf32-spu.c:1964 elf64-ppc.c:10441 +msgid "stubs don't match calculated size" +msgstr "" + +#: elf32-spu.c:2546 #, c-format msgid "warning: %s overlaps %s\n" msgstr "" -#: elf32-spu.c:1836 +#: elf32-spu.c:2562 #, c-format msgid "warning: %s exceeds section size\n" msgstr "" -#: elf32-spu.c:1867 +#: elf32-spu.c:2593 msgid "%A:0x%v not found in function table\n" msgstr "" -#: elf32-spu.c:1958 -msgid "" -"%B(%A+0x%v): call to non-code section %B(%A), stack analysis incomplete\n" +#: elf32-spu.c:2740 +msgid "%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete\n" msgstr "" -#: elf32-spu.c:2079 +#: elf32-spu.c:3297 #, c-format -msgid "%A link_order not found\n" +msgid "Stack analysis will ignore the call from %s to %s\n" msgstr "" -#: elf32-spu.c:2358 -#, c-format -msgid "Stack analysis will ignore the call from %s to %s\n" +#: elf32-spu.c:3988 +msgid " %s: 0x%v\n" msgstr "" -#: elf32-spu.c:2513 +#: elf32-spu.c:3989 msgid "%s: 0x%v 0x%v\n" msgstr "" -#: elf32-spu.c:2517 +#: elf32-spu.c:3994 msgid " calls:\n" msgstr "" -#: elf32-spu.c:2524 +#: elf32-spu.c:4002 #, c-format msgid " %s%s %s\n" msgstr "" -#: elf32-spu.c:2585 +#: elf32-spu.c:4304 +#, c-format +msgid "%s duplicated in %s\n" +msgstr "" + +#: elf32-spu.c:4308 +#, c-format +msgid "%s duplicated\n" +msgstr "" + +#: elf32-spu.c:4315 +msgid "sorry, no support for duplicate object files in auto-overlay script\n" +msgstr "" + +#: elf32-spu.c:4356 +msgid "" +"non-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local " +"store\n" +msgstr "" + +#: elf32-spu.c:4512 +msgid "%B:%A%s exceeds overlay size\n" +msgstr "" + +#: elf32-spu.c:4669 msgid "Stack size for call graph root nodes.\n" msgstr "" -#: elf32-spu.c:2586 +#: elf32-spu.c:4670 msgid "" "\n" "Stack size for functions. Annotations: '*' max stack, 't' tail call\n" msgstr "" -#: elf32-spu.c:2615 -msgid " %s: 0x%v\n" +#: elf32-spu.c:4680 +msgid "Maximum stack required is 0x%v\n" msgstr "" -#: elf32-spu.c:2625 -msgid "Maximum stack required is 0x%v\n" +#: elf32-spu.c:4771 +msgid "fatal error while creating .fixup" msgstr "" -#: elf32-spu.c:2751 +#: elf32-spu.c:5009 msgid "%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'" msgstr "" @@ -1876,143 +2281,151 @@ msgstr "" msgid "v850e1 architecture" msgstr "" -#: elf32-vax.c:541 +#: elf32-vax.c:543 #, c-format msgid " [nonpic]" msgstr "" -#: elf32-vax.c:544 +#: elf32-vax.c:546 #, c-format msgid " [d-float]" msgstr "" -#: elf32-vax.c:547 +#: elf32-vax.c:549 #, c-format msgid " [g-float]" msgstr "" -#: elf32-vax.c:657 +#: elf32-vax.c:666 #, c-format msgid "" "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of " "%ld" msgstr "" -#: elf32-vax.c:1584 +#: elf32-vax.c:1608 #, c-format msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored" msgstr "" -#: elf32-vax.c:1721 +#: elf32-vax.c:1735 #, c-format msgid "%s: warning: %s relocation against symbol `%s' from %s section" msgstr "" -#: elf32-vax.c:1727 +#: elf32-vax.c:1741 #, c-format msgid "%s: warning: %s relocation to 0x%x from %s section" msgstr "" -#: elf32-xstormy16.c:451 elf32-ia64.c:2794 elf64-ia64.c:2794 +#: elf32-xstormy16.c:451 elf32-ia64.c:2791 elf64-ia64.c:2791 msgid "non-zero addend in @fptr reloc" msgstr "" -#: elf32-xtensa.c:733 +#: elf32-xtensa.c:912 msgid "%B(%A): invalid property table" msgstr "" -#: elf32-xtensa.c:2177 +#: elf32-xtensa.c:2740 msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)" msgstr "" -#: elf32-xtensa.c:2234 +#: elf32-xtensa.c:2819 elf32-xtensa.c:2940 msgid "dynamic relocation in read-only section" msgstr "" -#: elf32-xtensa.c:2407 +#: elf32-xtensa.c:2916 +msgid "TLS relocation invalid without dynamic sections" +msgstr "" + +#: elf32-xtensa.c:3133 msgid "internal inconsistency in size of .got.loc section" msgstr "" -#: elf32-xtensa.c:2714 +#: elf32-xtensa.c:3443 msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x" msgstr "" -#: elf32-xtensa.c:3920 elf32-xtensa.c:3928 +#: elf32-xtensa.c:4672 elf32-xtensa.c:4680 msgid "Attempt to convert L32R/CALLX to CALL failed" msgstr "" -#: elf32-xtensa.c:5522 elf32-xtensa.c:5598 elf32-xtensa.c:6714 +#: elf32-xtensa.c:6290 elf32-xtensa.c:6366 elf32-xtensa.c:7486 msgid "" "%B(%A+0x%lx): could not decode instruction; possible configuration mismatch" msgstr "" -#: elf32-xtensa.c:6454 +#: elf32-xtensa.c:7226 msgid "" "%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY " "relocation; possible configuration mismatch" msgstr "" -#: elf32-xtensa.c:8168 +#: elf32-xtensa.c:8987 msgid "invalid relocation address" msgstr "" -#: elf32-xtensa.c:8217 +#: elf32-xtensa.c:9036 msgid "overflow after relaxation" msgstr "" -#: elf32-xtensa.c:9343 +#: elf32-xtensa.c:10167 msgid "%B(%A+0x%lx): unexpected fix for %s relocation" msgstr "" -#: elf64-alpha.c:453 +#: elf64-alpha.c:452 msgid "GPDISP relocation did not find ldah and lda instructions" msgstr "" -#: elf64-alpha.c:2404 +#: elf64-alpha.c:2389 msgid "%B: .got subsegment exceeds 64K (size %d)" msgstr "" -#: elf64-alpha.c:4277 elf64-alpha.c:4289 +#: elf64-alpha.c:4269 elf64-alpha.c:4281 msgid "%B: gp-relative relocation against dynamic symbol %s" msgstr "" -#: elf64-alpha.c:4315 elf64-alpha.c:4450 +#: elf64-alpha.c:4307 elf64-alpha.c:4442 msgid "%B: pc-relative relocation against dynamic symbol %s" msgstr "" -#: elf64-alpha.c:4343 +#: elf64-alpha.c:4335 msgid "%B: change in gp: BRSGP %s" msgstr "" -#: elf64-alpha.c:4368 +#: elf64-alpha.c:4360 msgid "" msgstr "" -#: elf64-alpha.c:4373 +#: elf64-alpha.c:4365 msgid "%B: !samegp reloc against symbol without .prologue: %s" msgstr "" -#: elf64-alpha.c:4425 +#: elf64-alpha.c:4417 msgid "%B: unhandled dynamic relocation against %s" msgstr "" -#: elf64-alpha.c:4457 +#: elf64-alpha.c:4449 msgid "%B: pc-relative relocation against undefined weak symbol %s" msgstr "" -#: elf64-alpha.c:4517 +#: elf64-alpha.c:4509 msgid "%B: dtp-relative relocation against dynamic symbol %s" msgstr "" -#: elf64-alpha.c:4540 +#: elf64-alpha.c:4532 msgid "%B: tp-relative relocation against dynamic symbol %s" msgstr "" -#: elf64-hppa.c:2040 +#: elf64-hppa.c:2091 #, c-format msgid "stub entry for %s cannot load .plt, dp offset = %ld" msgstr "" +#: elf64-hppa.c:3273 +msgid "%B(%A+0x%lx): cannot reach %s" +msgstr "" + #: elf64-mmix.c:1177 #, c-format msgid "" @@ -2054,89 +2467,85 @@ msgid "" "register is $%ld." msgstr "" -#: elf64-mmix.c:2202 +#: elf64-mmix.c:2201 #, c-format msgid "" "%s: Error: multiple definition of `%s'; start of %s is set in a earlier " "linked file\n" msgstr "" -#: elf64-mmix.c:2260 +#: elf64-mmix.c:2259 msgid "Register section has contents\n" msgstr "" -#: elf64-mmix.c:2452 +#: elf64-mmix.c:2451 #, c-format msgid "" "Internal inconsistency: remaining %u != max %u.\n" " Please report this bug." msgstr "" -#: elf64-ppc.c:2573 libbfd.c:950 +#: elf64-ppc.c:2691 libbfd.c:978 msgid "%B: compiled for a big endian system and target is little endian" msgstr "" -#: elf64-ppc.c:2576 libbfd.c:952 +#: elf64-ppc.c:2694 libbfd.c:980 msgid "%B: compiled for a little endian system and target is big endian" msgstr "" -#: elf64-ppc.c:5896 +#: elf64-ppc.c:6338 #, c-format msgid "" "copy reloc against `%s' requires lazy plt linking; avoid setting " "LD_BIND_NOW=1 or upgrade gcc" msgstr "" -#: elf64-ppc.c:6324 +#: elf64-ppc.c:6767 msgid "dynreloc miscount for %B, section %A" msgstr "" -#: elf64-ppc.c:6428 +#: elf64-ppc.c:6851 msgid "%B: .opd is not a regular array of opd entries" msgstr "" -#: elf64-ppc.c:6437 +#: elf64-ppc.c:6860 msgid "%B: unexpected reloc type %u in .opd section" msgstr "" -#: elf64-ppc.c:6458 +#: elf64-ppc.c:6881 msgid "%B: undefined sym `%s' in .opd section" msgstr "" -#: elf64-ppc.c:7165 elf64-ppc.c:7545 +#: elf64-ppc.c:7640 elf64-ppc.c:8017 #, c-format msgid "%s defined in removed toc entry" msgstr "" -#: elf64-ppc.c:8299 +#: elf64-ppc.c:8910 #, c-format msgid "long branch stub `%s' offset overflow" msgstr "" -#: elf64-ppc.c:8374 +#: elf64-ppc.c:8969 #, c-format msgid "can't find branch stub `%s'" msgstr "" -#: elf64-ppc.c:8440 elf64-ppc.c:8538 +#: elf64-ppc.c:9031 elf64-ppc.c:9169 #, c-format msgid "linkage table error against `%s'" msgstr "" -#: elf64-ppc.c:8676 +#: elf64-ppc.c:9326 #, c-format msgid "can't build branch stub `%s'" msgstr "" -#: elf64-ppc.c:9147 +#: elf64-ppc.c:9799 msgid "%B section %A exceeds stub group size" msgstr "" -#: elf64-ppc.c:9759 -msgid "stubs don't match calculated size" -msgstr "" - -#: elf64-ppc.c:9771 +#: elf64-ppc.c:10453 #, c-format msgid "" "linker stubs in %u group%s\n" @@ -2147,562 +2556,432 @@ msgid "" " plt call %lu" msgstr "" -#: elf64-ppc.c:10455 +#: elf64-ppc.c:11252 msgid "" "%B(%A+0x%lx): automatic multiple TOCs not supported using your crt files; " "recompile with -mminimal-toc or upgrade gcc" msgstr "" -#: elf64-ppc.c:10463 +#: elf64-ppc.c:11260 msgid "" "%B(%A+0x%lx): sibling call optimization to `%s' does not allow automatic " -"multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, " -"or make `%s' extern" -msgstr "" - -#: elf64-ppc.c:11114 -msgid "%B: relocation %s is not supported for symbol %s." -msgstr "" - -#: elf64-ppc.c:11196 -msgid "%B: error: relocation %s not a multiple of %d" -msgstr "" - -#: elf64-sh64.c:1701 -#, c-format -msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n" -msgstr "" - -#: elf64-sparc.c:439 -msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER" -msgstr "" - -#: elf64-sparc.c:459 -msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B" -msgstr "" - -#: elf64-sparc.c:482 -msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B" -msgstr "" - -#: elf64-sparc.c:527 -msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B" -msgstr "" - -#: elf64-sparc.c:678 -msgid "%B: linking UltraSPARC specific with HAL specific code" -msgstr "" - -#: elf64-x86-64.c:1042 elf64-x86-64.c:1202 elf64-x86-64.c:2609 -msgid "" -"%B: relocation %s against `%s' can not be used when making a shared object; " -"recompile with -fPIC" -msgstr "" - -#: elf64-x86-64.c:1133 -msgid "%B: %s' accessed both as normal and thread local symbol" -msgstr "" - -#: elf64-x86-64.c:2521 -msgid "" -"%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be " -"used when making a shared object" -msgstr "" - -#: elf64-x86-64.c:2605 -msgid "" -"%B: relocation R_X86_64_PC32 against protected function `%s' can not be used " -"when making a shared object" -msgstr "" - -#: elf-attrs.c:582 -msgid "ERROR: %B: Must be processed by '%s' toolchain" -msgstr "" - -#: elf-attrs.c:602 elf-attrs.c:621 -msgid "ERROR: %B: Incompatible object tag '%s':%d" -msgstr "" - -#: elf.c:314 -msgid "%B: invalid string offset %u >= %lu for section `%s'" -msgstr "" - -#: elf.c:416 -msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section" -msgstr "" - -#: elf.c:569 -msgid "%B: Corrupt size field in group section header: 0x%lx" -msgstr "" - -#: elf.c:605 -msgid "%B: invalid SHT_GROUP entry" -msgstr "" - -#: elf.c:675 -msgid "%B: no group info for section %A" -msgstr "" - -#: elf.c:705 elf.c:2941 elflink.c:9858 -msgid "%B: warning: sh_link not set for section `%A'" -msgstr "" - -#: elf.c:721 -msgid "%B: sh_link [%d] in section `%A' is incorrect" -msgstr "" - -#: elf.c:756 -msgid "%B: unknown [%d] section `%s' in group [%s]" -msgstr "" - -#: elf.c:1132 -#, c-format -msgid "" -"\n" -"Program Header:\n" -msgstr "" - -#: elf.c:1174 -#, c-format -msgid "" -"\n" -"Dynamic Section:\n" -msgstr "" - -#: elf.c:1300 -#, c-format -msgid "" -"\n" -"Version definitions:\n" -msgstr "" - -#: elf.c:1325 -#, c-format -msgid "" -"\n" -"Version References:\n" -msgstr "" - -#: elf.c:1330 -#, c-format -msgid " required from %s:\n" -msgstr "" - -#: elf.c:1714 -msgid "%B: invalid link %lu for reloc section %s (index %u)" -msgstr "" - -#: elf.c:1882 -msgid "" -"%B: don't know how to handle allocated, application specific section `%s' [0x" -"%8x]" -msgstr "" - -#: elf.c:1894 -msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]" +"multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, " +"or make `%s' extern" msgstr "" -#: elf.c:1905 -msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]" +#: elf64-ppc.c:11961 +msgid "%B: relocation %s is not supported for symbol %s." msgstr "" -#: elf.c:1915 -msgid "%B: don't know how to handle section `%s' [0x%8x]" +#: elf64-ppc.c:12044 +msgid "%B: error: relocation %s not a multiple of %d" msgstr "" -#: elf.c:2498 +#: elf64-sh64.c:1701 #, c-format -msgid "section `%A' type changed to PROGBITS" +msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n" msgstr "" -#: elf.c:2898 -msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'" +#: elf64-sparc.c:439 +msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER" msgstr "" -#: elf.c:2921 -msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'" +#: elf64-sparc.c:459 +msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B" msgstr "" -#: elf.c:4226 -msgid "" -"%B: The first section in the PT_DYNAMIC segment is not the .dynamic section" +#: elf64-sparc.c:482 +msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B" msgstr "" -#: elf.c:4249 -msgid "%B: Not enough room for program headers, try linking with -N" +#: elf64-sparc.c:527 +msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B" msgstr "" -#: elf.c:4327 -msgid "%B: section %A lma 0x%lx overlaps previous sections" +#: elf64-sparc.c:679 +msgid "%B: linking UltraSPARC specific with HAL specific code" msgstr "" -#: elf.c:4425 -msgid "%B: section `%A' can't be allocated in segment %d" +#: elf64-x86-64.c:1337 +msgid "%B: '%s' accessed both as normal and thread local symbol" msgstr "" -#: elf.c:4475 -msgid "%B: warning: allocated section `%s' not in segment" +#: elf64-x86-64.c:2701 +msgid "" +"%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d" msgstr "" -#: elf.c:4971 -msgid "%B: symbol `%s' required but not present" +#: elf64-x86-64.c:2980 +msgid "" +"%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be " +"used when making a shared object" msgstr "" -#: elf.c:5284 -msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n" +#: elf64-x86-64.c:3091 +msgid "; recompile with -fPIC" msgstr "" -#: elf.c:6190 -#, c-format +#: elf64-x86-64.c:3096 msgid "" -"Unable to find equivalent output section for symbol '%s' from section '%s'" +"%B: relocation %s against %s `%s' can not be used when making a shared object" +"%s" msgstr "" -#: elf.c:7164 -msgid "%B: unsupported relocation type %s" +#: elf64-x86-64.c:3098 +msgid "" +"%B: relocation %s against undefined %s `%s' can not be used when making a " +"shared object%s" msgstr "" -#: elfcode.h:813 +#: elfcode.h:795 #, c-format msgid "warning: %s has a corrupt string table index - ignoring" msgstr "" -#: elfcode.h:1226 +#: elfcode.h:1201 #, c-format msgid "%s: version count (%ld) does not match symbol count (%ld)" msgstr "" -#: elfcode.h:1459 +#: elfcode.h:1441 #, c-format msgid "%s(%s): relocation %d has invalid symbol index %ld" msgstr "" -#: elf-eh-frame.c:823 -msgid "" -"%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n" -msgstr "" - -#: elf-eh-frame.c:974 -msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n" -msgstr "" - -#: elf-hppa.h:2219 elf-hppa.h:2233 -msgid "%B(%A): warning: unresolvable relocation against symbol `%s'" +#: elfcore.h:251 +msgid "Warning: %B is truncated: expected core file size >= %lu, found: %lu." msgstr "" -#: elflink.c:1028 +#: elflink.c:1113 msgid "" "%s: TLS definition in %B section %A mismatches non-TLS definition in %B " "section %A" msgstr "" -#: elflink.c:1032 +#: elflink.c:1117 msgid "%s: TLS reference in %B mismatches non-TLS reference in %B" msgstr "" -#: elflink.c:1036 +#: elflink.c:1121 msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B" msgstr "" -#: elflink.c:1040 +#: elflink.c:1125 msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A" msgstr "" -#: elflink.c:1654 +#: elflink.c:1764 msgid "%B: unexpected redefinition of indirect versioned symbol `%s'" msgstr "" -#: elflink.c:1974 +#: elflink.c:2077 msgid "%B: version node not found for symbol %s" msgstr "" -#: elflink.c:2122 +#: elflink.c:2167 msgid "" "%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'" msgstr "" -#: elflink.c:2314 +#: elflink.c:2178 +msgid "" +"%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the " +"object file has no symbol table" +msgstr "" + +#: elflink.c:2375 msgid "%B: relocation size mismatch in %B section %A" msgstr "" -#: elflink.c:2616 +#: elflink.c:2678 #, c-format msgid "warning: type and size of dynamic symbol `%s' are not defined" msgstr "" -#: elflink.c:3910 +#: elflink.c:3424 +msgid "%P: alternate ELF machine code found (%d) in %B, expecting %d\n" +msgstr "" + +#: elflink.c:4032 msgid "%B: %s: invalid version %u (max %d)" msgstr "" -#: elflink.c:3946 +#: elflink.c:4068 msgid "%B: %s: invalid needed version %d" msgstr "" -#: elflink.c:4129 +#: elflink.c:4253 msgid "" "Warning: alignment %u of common symbol `%s' in %B is greater than the " "alignment (%u) of its section %A" msgstr "" -#: elflink.c:4135 +#: elflink.c:4259 msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B" msgstr "" -#: elflink.c:4150 +#: elflink.c:4274 msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B" msgstr "" -#: elflink.c:4326 +#: elflink.c:4438 #, c-format msgid "%s: invalid DSO for symbol `%s' definition" msgstr "" -#: elflink.c:5552 +#: elflink.c:5688 #, c-format msgid "%s: undefined version: %s" msgstr "" -#: elflink.c:5620 +#: elflink.c:5756 msgid "%B: .preinit_array section is not allowed in DSO" msgstr "" -#: elflink.c:7359 +#: elflink.c:7484 #, c-format msgid "undefined %s reference in complex symbol: %s" msgstr "" -#: elflink.c:7514 +#: elflink.c:7638 #, c-format msgid "unknown operator '%c' in complex symbol" msgstr "" -#: elflink.c:8053 elflink.c:8070 elflink.c:8107 elflink.c:8124 +#: elflink.c:7976 elflink.c:7993 elflink.c:8030 elflink.c:8047 msgid "%B: Unable to sort relocs - they are in more than one size" msgstr "" -#: elflink.c:8084 elflink.c:8138 +#: elflink.c:8007 elflink.c:8061 msgid "%B: Unable to sort relocs - they are of an unknown size" msgstr "" -#: elflink.c:8187 +#: elflink.c:8112 msgid "Not enough memory to sort relocations" msgstr "" -#: elflink.c:8374 +#: elflink.c:8304 msgid "%B: Too many sections: %d (>= %d)" msgstr "" -#: elflink.c:8608 +#: elflink.c:8540 msgid "%B: %s symbol `%s' in %B is referenced by DSO" msgstr "" -#: elflink.c:8691 +#: elflink.c:8625 msgid "%B: could not find output section %A for input section %A" msgstr "" -#: elflink.c:8788 +#: elflink.c:8745 msgid "%B: %s symbol `%s' isn't defined" msgstr "" -#: elflink.c:9284 +#: elflink.c:9301 msgid "" "error: %B contains a reloc (0x%s) for section %A that references a non-" "existent global symbol" msgstr "" -#: elflink.c:9318 +#: elflink.c:9366 msgid "" "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' " "of %B\n" msgstr "" -#: elflink.c:9936 +#: elflink.c:9991 msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections" msgstr "" -#: elflink.c:9941 +#: elflink.c:9996 #, c-format msgid "%A has both ordered and unordered sections" msgstr "" -#: elflink.c:10828 elflink.c:10872 +#: elflink.c:10872 elflink.c:10916 msgid "%B: could not find output section %s" msgstr "" -#: elflink.c:10833 +#: elflink.c:10877 #, c-format msgid "warning: %s section has zero size" msgstr "" -#: elflink.c:10937 +#: elflink.c:10982 msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n" msgstr "" -#: elflink.c:11305 -msgid "Removing unused section '%s' in file '%B'" +#: elflink.c:11165 +msgid "%P%X: can not read symbols: %E\n" msgstr "" -#: elflink.c:11496 -msgid "Warning: gc-sections option ignored" +#: elflink.c:11483 +msgid "Removing unused section '%s' in file '%B'" msgstr "" -#: elflink.c:11987 -msgid "%P%X: can not read symbols: %E\n" +#: elflink.c:11695 +msgid "Warning: gc-sections option ignored" msgstr "" -#: elflink.c:12129 +#: elflink.c:12242 msgid "%B: ignoring duplicate section `%A'" msgstr "" -#: elflink.c:12136 elflink.c:12143 +#: elflink.c:12249 elflink.c:12256 msgid "%B: duplicate section `%A' has different size" msgstr "" -#: elflink.c:12151 elflink.c:12156 +#: elflink.c:12264 elflink.c:12269 msgid "%B: warning: could not read contents of section `%A'" msgstr "" -#: elflink.c:12160 +#: elflink.c:12273 msgid "%B: warning: duplicate section `%A' has different contents" msgstr "" -#: elflink.c:12239 linker.c:3081 -msgid "%F%P: already_linked_table: %E" -msgstr "" - -#: elf-m10300.c:1532 -msgid "" -"error: inappropriate relocation type for shared library (did you forget -" -"fpic?)" -msgstr "" - -#: elf-m10300.c:1535 -msgid "internal error: suspicious relocation type used in shared library" +#: elflink.c:12374 linker.c:3098 +msgid "%F%P: already_linked_table: %E\n" msgstr "" -#: elfxx-mips.c:992 +#: elfxx-mips.c:1222 msgid "static procedure (no name)" msgstr "" -#: elfxx-mips.c:4669 +#: elfxx-mips.c:5588 msgid "%B: %A+0x%lx: jump to stub routine which is not jal" msgstr "" -#: elfxx-mips.c:5332 elfxx-mips.c:5552 +#: elfxx-mips.c:6235 elfxx-mips.c:6458 msgid "%B: Warning: bad `%s' option size %u smaller than its header" msgstr "" -#: elfxx-mips.c:6411 +#: elfxx-mips.c:7205 elfxx-mips.c:7330 +msgid "%B: Warning: cannot determine the target function for stub section `%s'" +msgstr "" + +#: elfxx-mips.c:7459 msgid "%B: Malformed reloc detected for section %s" msgstr "" -#: elfxx-mips.c:6453 +#: elfxx-mips.c:7499 msgid "%B: GOT reloc at 0x%lx not expected in executables" msgstr "" -#: elfxx-mips.c:6523 +#: elfxx-mips.c:7602 msgid "%B: CALL16 reloc at 0x%lx not against global symbol" msgstr "" -#: elfxx-mips.c:7887 +#: elfxx-mips.c:8280 +#, c-format +msgid "non-dynamic relocations refer to dynamic symbol %s" +msgstr "" + +#: elfxx-mips.c:8985 msgid "" "%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%" "A'" msgstr "" -#: elfxx-mips.c:8053 +#: elfxx-mips.c:9124 msgid "" "small-data section exceeds 64KB; lower small-data size limit (see option -G)" msgstr "" -#: elfxx-mips.c:10681 +#: elfxx-mips.c:11940 #, c-format msgid "%s: illegal section name `%s'" msgstr "" -#: elfxx-mips.c:11051 elfxx-mips.c:11070 +#: elfxx-mips.c:12318 elfxx-mips.c:12344 msgid "Warning: %B uses -msingle-float, %B uses -mdouble-float" msgstr "" -#: elfxx-mips.c:11126 +#: elfxx-mips.c:12330 elfxx-mips.c:12386 +msgid "Warning: %B uses -msingle-float, %B uses -mips32r2 -mfp64" +msgstr "" + +#: elfxx-mips.c:12356 elfxx-mips.c:12392 +msgid "Warning: %B uses -mdouble-float, %B uses -mips32r2 -mfp64" +msgstr "" + +#: elfxx-mips.c:12434 msgid "%B: endianness incompatible with that of the selected emulation" msgstr "" -#: elfxx-mips.c:11138 +#: elfxx-mips.c:12445 msgid "%B: ABI is incompatible with that of the selected emulation" msgstr "" -#: elfxx-mips.c:11238 +#: elfxx-mips.c:12526 +msgid "%B: warning: linking abicalls files with non-abicalls files" +msgstr "" + +#: elfxx-mips.c:12543 msgid "%B: linking 32-bit code with 64-bit code" msgstr "" -#: elfxx-mips.c:11266 +#: elfxx-mips.c:12571 msgid "%B: linking %s module with previous %s modules" msgstr "" -#: elfxx-mips.c:11289 +#: elfxx-mips.c:12594 msgid "%B: ABI mismatch: linking %s module with previous %s modules" msgstr "" -#: elfxx-mips.c:11354 +#: elfxx-mips.c:12758 #, c-format msgid " [abi=O32]" msgstr "" -#: elfxx-mips.c:11356 +#: elfxx-mips.c:12760 #, c-format msgid " [abi=O64]" msgstr "" -#: elfxx-mips.c:11358 +#: elfxx-mips.c:12762 #, c-format msgid " [abi=EABI32]" msgstr "" -#: elfxx-mips.c:11360 +#: elfxx-mips.c:12764 #, c-format msgid " [abi=EABI64]" msgstr "" -#: elfxx-mips.c:11362 +#: elfxx-mips.c:12766 #, c-format msgid " [abi unknown]" msgstr "" -#: elfxx-mips.c:11364 +#: elfxx-mips.c:12768 #, c-format msgid " [abi=N32]" msgstr "" -#: elfxx-mips.c:11366 +#: elfxx-mips.c:12770 #, c-format msgid " [abi=64]" msgstr "" -#: elfxx-mips.c:11368 +#: elfxx-mips.c:12772 #, c-format msgid " [no abi set]" msgstr "" -#: elfxx-mips.c:11389 +#: elfxx-mips.c:12793 #, c-format msgid " [unknown ISA]" msgstr "" -#: elfxx-mips.c:11400 +#: elfxx-mips.c:12804 #, c-format msgid " [not 32bitmode]" msgstr "" -#: elfxx-sparc.c:430 +#: elfxx-sparc.c:440 #, c-format msgid "invalid relocation type %d" msgstr "" -#: elfxx-sparc.c:2901 -msgid "%B: probably compiled without -fPIC?" -msgstr "" - #: i386linux.c:455 m68klinux.c:459 sparclinux.c:453 #, c-format msgid "Output file requires shared library `%s'\n" @@ -2786,34 +3065,94 @@ msgstr "" msgid "%s: address 0x%s out of range for Intel Hex file" msgstr "" -#: libbfd.c:980 +#: libbfd.c:1008 #, c-format msgid "Deprecated %s called at %s line %d in %s\n" msgstr "" -#: libbfd.c:983 +#: libbfd.c:1011 #, c-format msgid "Deprecated %s called\n" msgstr "" -#: linker.c:1875 +#: linker.c:1874 msgid "%B: indirect symbol `%s' to `%s' is a loop" msgstr "" -#: linker.c:2741 +#: linker.c:2740 #, c-format msgid "Attempt to do relocatable link with %s input and %s output" msgstr "" -#: linker.c:3048 +#: linker.c:3065 msgid "%B: warning: ignoring duplicate section `%A'\n" msgstr "" -#: linker.c:3062 +#: linker.c:3079 msgid "%B: warning: duplicate section `%A' has different size\n" msgstr "" -#: merge.c:820 +#: mach-o.c:3195 +#, c-format +msgid "Mach-O header:\n" +msgstr "" + +#: mach-o.c:3196 +#, c-format +msgid " magic : %08lx\n" +msgstr "" + +#: mach-o.c:3197 +#, c-format +msgid " cputype : %08lx (%s)\n" +msgstr "" + +#: mach-o.c:3199 +#, c-format +msgid " cpusubtype: %08lx\n" +msgstr "" + +#: mach-o.c:3200 +#, c-format +msgid " filetype : %08lx (%s)\n" +msgstr "" + +#: mach-o.c:3203 +#, c-format +msgid " ncmds : %08lx\n" +msgstr "" + +#: mach-o.c:3204 +#, c-format +msgid " sizeofcmds: %08lx\n" +msgstr "" + +#: mach-o.c:3205 +#, c-format +msgid " flags : %08lx (" +msgstr "" + +#: mach-o.c:3207 +#, c-format +msgid ")\n" +msgstr "" + +#: mach-o.c:3208 +#, c-format +msgid " reserved : %08x\n" +msgstr "" + +#: mach-o.c:3218 +#, c-format +msgid "Segments and Sections:\n" +msgstr "" + +#: mach-o.c:3219 +#, c-format +msgid " #: Segment name Section name Address\n" +msgstr "" + +#: merge.c:829 #, c-format msgid "%s: access beyond end of merged section (%ld)" msgstr "" @@ -2970,57 +3309,75 @@ msgstr "" msgid "Unhandled OSF/1 core file section type %d\n" msgstr "" +#: pe-mips.c:613 +msgid "%B: `ld -r' not supported with PE MIPS objects\n" +msgstr "" + +#. OK, at this point the following variables are set up: +#. src = VMA of the memory we're fixing up +#. mem = pointer to memory we're fixing up +#. val = VMA of what we need to refer to. +#: pe-mips.c:729 +msgid "%B: unimplemented %s\n" +msgstr "" + +#: pe-mips.c:755 +msgid "%B: jump too far away\n" +msgstr "" + +#: pe-mips.c:781 +msgid "%B: bad pair/reflo after refhi\n" +msgstr "" + +#: pei-x86_64.c:465 +#, c-format +msgid "warning: .pdata section size (%ld) is not a multiple of %d\n" +msgstr "" + +#: pei-x86_64.c:469 peigen.c:1620 peigen.c:1799 pepigen.c:1620 pepigen.c:1799 +#: pex64igen.c:1620 pex64igen.c:1799 +#, c-format +msgid "" +"\n" +"The Function Table (interpreted .pdata section contents)\n" +msgstr "" + +#: pei-x86_64.c:471 +#, c-format +msgid "vma:\t\t\tBeginAddress\t EndAddress\t UnwindData\n" +msgstr "" + #. XXX code yet to be written. -#: peicode.h:759 +#: peicode.h:752 msgid "%B: Unhandled import type; %x" msgstr "" -#: peicode.h:764 +#: peicode.h:757 msgid "%B: Unrecognised import type; %x" msgstr "" -#: peicode.h:778 +#: peicode.h:771 msgid "%B: Unrecognised import name type; %x" msgstr "" -#: peicode.h:1161 +#: peicode.h:1154 msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive" msgstr "" -#: peicode.h:1173 +#: peicode.h:1166 msgid "" "%B: Recognised but unhandled machine type (0x%x) in Import Library Format " "archive" msgstr "" -#: peicode.h:1191 +#: peicode.h:1184 msgid "%B: size field is zero in Import Library Format header" msgstr "" -#: peicode.h:1222 +#: peicode.h:1215 msgid "%B: string not null terminated in ILF object file." msgstr "" -#: pe-mips.c:606 -msgid "%B: `ld -r' not supported with PE MIPS objects\n" -msgstr "" - -#. OK, at this point the following variables are set up: -#. src = VMA of the memory we're fixing up -#. mem = pointer to memory we're fixing up -#. val = VMA of what we need to refer to. -#: pe-mips.c:722 -msgid "%B: unimplemented %s\n" -msgstr "" - -#: pe-mips.c:748 -msgid "%B: jump too far away\n" -msgstr "" - -#: pe-mips.c:774 -msgid "%B: bad pair/reflo after refhi\n" -msgstr "" - #: ppcboot.c:414 #, c-format msgid "" @@ -3033,51 +3390,51 @@ msgstr "" msgid "Entry offset = 0x%.8lx (%ld)\n" msgstr "" -#: ppcboot.c:416 +#: ppcboot.c:417 #, c-format msgid "Length = 0x%.8lx (%ld)\n" msgstr "" -#: ppcboot.c:419 +#: ppcboot.c:421 #, c-format msgid "Flag field = 0x%.2x\n" msgstr "" -#: ppcboot.c:425 +#: ppcboot.c:427 #, c-format msgid "Partition name = \"%s\"\n" msgstr "" -#: ppcboot.c:444 +#: ppcboot.c:446 #, c-format msgid "" "\n" "Partition[%d] start = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" msgstr "" -#: ppcboot.c:450 +#: ppcboot.c:452 #, c-format msgid "Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" msgstr "" -#: ppcboot.c:456 +#: ppcboot.c:458 #, c-format msgid "Partition[%d] sector = 0x%.8lx (%ld)\n" msgstr "" -#: ppcboot.c:457 +#: ppcboot.c:460 #, c-format msgid "Partition[%d] length = 0x%.8lx (%ld)\n" msgstr "" -#: som.c:5088 +#: som.c:5114 #, c-format msgid "" "\n" "Exec Auxiliary Header\n" msgstr "" -#: som.c:5349 +#: som.c:5417 msgid "som_sizeof_headers unimplemented" msgstr "" @@ -3085,126 +3442,181 @@ msgstr "" msgid "%B:%d: Unexpected character `%s' in S-record file\n" msgstr "" +#: srec.c:567 srec.c:600 +msgid "%B:%d: Bad checksum in S-record file\n" +msgstr "" + #: stabs.c:279 msgid "%B(%A+0x%lx): Stabs entry has invalid string index." msgstr "" -#: syms.c:1057 +#: syms.c:1079 msgid "Unsupported .stab relocation" msgstr "" -#: vms-gsd.c:338 +#: vms-gsd.c:350 #, c-format msgid "bfd_make_section (%s) failed" msgstr "" -#: vms-gsd.c:353 +#: vms-gsd.c:365 #, c-format msgid "bfd_set_section_flags (%s, %x) failed" msgstr "" -#: vms-gsd.c:388 +#: vms-gsd.c:399 #, c-format msgid "Size mismatch section %s=%lx, %s=%lx" msgstr "" -#: vms-gsd.c:679 +#: vms-gsd.c:754 #, c-format -msgid "unknown gsd/egsd subtype %d" +msgid "Unknown GSD/EGSD subtype %d" msgstr "" -#: vms-hdr.c:328 +#: vms-hdr.c:364 msgid "Object module NOT error-free !\n" msgstr "" -#: vms-misc.c:474 +#: vms-hdr.c:878 +#, c-format +msgid "unknown source command %d" +msgstr "" + +#: vms-hdr.c:951 +msgid "DST_S_C_SET_LINUM_INCR not implemented" +msgstr "" + +#: vms-hdr.c:957 +msgid "DST_S_C_SET_LINUM_INCR_W not implemented" +msgstr "" + +#: vms-hdr.c:963 +msgid "DST_S_C_RESET_LINUM_INCR not implemented" +msgstr "" + +#: vms-hdr.c:969 +msgid "DST_S_C_BEG_STMT_MODE not implemented" +msgstr "" + +#: vms-hdr.c:975 +msgid "DST_S_C_END_STMT_MODE not implemented" +msgstr "" + +#: vms-hdr.c:1008 +msgid "DST_S_C_SET_PC not implemented" +msgstr "" + +#: vms-hdr.c:1014 +msgid "DST_S_C_SET_PC_W not implemented" +msgstr "" + +#: vms-hdr.c:1020 +msgid "DST_S_C_SET_PC_L not implemented" +msgstr "" + +#: vms-hdr.c:1026 +msgid "DST_S_C_SET_STMTNUM not implemented" +msgstr "" + +#: vms-hdr.c:1079 +#, c-format +msgid "unknown line command %d" +msgstr "" + +#: vms-misc.c:588 #, c-format msgid "Stack overflow (%d) in _bfd_vms_push" msgstr "" -#: vms-misc.c:489 +#: vms-misc.c:603 msgid "Stack underflow in _bfd_vms_pop" msgstr "" -#: vms-misc.c:803 +#: vms-misc.c:844 msgid "_bfd_vms_output_counted called with zero bytes" msgstr "" -#: vms-misc.c:808 +#: vms-misc.c:849 msgid "_bfd_vms_output_counted called with too many bytes" msgstr "" -#: vms-misc.c:926 +#: vms-misc.c:967 #, c-format msgid "Symbol %s replaced by %s\n" msgstr "" -#: vms-misc.c:985 +#: vms-misc.c:1026 #, c-format msgid "failed to enter %s" msgstr "" -#: vms-tir.c:57 +#: vms-tir.c:83 msgid "No Mem !" msgstr "" -#: vms-tir.c:300 +#. These names have not yet been added to this switch statement. +#: vms-tir.c:346 #, c-format -msgid "bad section index in %s" +msgid "unknown ETIR command %d" msgstr "" -#: vms-tir.c:313 +#: vms-tir.c:440 #, c-format -msgid "unsupported STA cmd %s" +msgid "bad section index in %s" msgstr "" -#: vms-tir.c:318 vms-tir.c:1120 +#: vms-tir.c:459 #, c-format -msgid "reserved STA cmd %d" +msgid "unsupported STA cmd %s" msgstr "" -#: vms-tir.c:410 vms-tir.c:432 +#: vms-tir.c:464 vms-tir.c:1304 #, c-format -msgid "%s: no symbol \"%s\"" +msgid "reserved STA cmd %d" msgstr "" #. Unsigned shift. #. Rotate. #. Redefine symbol to current location. #. Define a literal. -#: vms-tir.c:497 vms-tir.c:606 vms-tir.c:704 vms-tir.c:721 vms-tir.c:728 -#: vms-tir.c:736 vms-tir.c:1440 +#: vms-tir.c:655 vms-tir.c:774 vms-tir.c:894 vms-tir.c:1624 #, c-format msgid "%s: not supported" msgstr "" -#: vms-tir.c:502 vms-tir.c:1297 +#: vms-tir.c:661 vms-tir.c:1481 #, c-format msgid "%s: not implemented" msgstr "" -#: vms-tir.c:506 vms-tir.c:1301 +#: vms-tir.c:666 vms-tir.c:1485 #, c-format msgid "reserved STO cmd %d" msgstr "" -#: vms-tir.c:621 vms-tir.c:1445 +#: vms-tir.c:789 vms-tir.c:1629 #, c-format msgid "reserved OPR cmd %d" msgstr "" -#: vms-tir.c:681 vms-tir.c:1509 +#: vms-tir.c:852 vms-tir.c:1693 #, c-format msgid "reserved CTL cmd %d" msgstr "" +#: vms-tir.c:966 +#, c-format +msgid "reserved STC cmd %d" +msgstr "" + #. stack byte from image #. arg: none. -#: vms-tir.c:1028 +#: vms-tir.c:1212 msgid "stack-from-image not implemented" msgstr "" -#: vms-tir.c:1046 +#: vms-tir.c:1230 msgid "stack-entry-mask not fully implemented" msgstr "" @@ -3215,357 +3627,378 @@ msgstr "" #. #. compare argument descriptor with symbol argument (ARG$V_PASSMECH) #. and stack TRUE (args match) or FALSE (args dont match) value. -#: vms-tir.c:1060 +#: vms-tir.c:1244 msgid "PASSMECH not fully implemented" msgstr "" -#: vms-tir.c:1079 +#: vms-tir.c:1263 msgid "stack-local-symbol not fully implemented" msgstr "" -#: vms-tir.c:1092 +#: vms-tir.c:1276 msgid "stack-literal not fully implemented" msgstr "" -#: vms-tir.c:1113 +#: vms-tir.c:1297 msgid "stack-local-symbol-entry-point-mask not fully implemented" msgstr "" -#: vms-tir.c:1387 vms-tir.c:1399 vms-tir.c:1411 vms-tir.c:1423 vms-tir.c:1488 -#: vms-tir.c:1496 vms-tir.c:1504 +#: vms-tir.c:1571 vms-tir.c:1583 vms-tir.c:1595 vms-tir.c:1607 vms-tir.c:1672 +#: vms-tir.c:1680 vms-tir.c:1688 #, c-format msgid "%s: not fully implemented" msgstr "" -#: vms-tir.c:1562 +#: vms-tir.c:1746 #, c-format msgid "obj code %d not found" msgstr "" -#: vms-tir.c:1870 +#: vms-tir.c:2019 +#, c-format +msgid "Reloc size error in section %s" +msgstr "" + +#: vms-tir.c:2112 vms-tir.c:2129 vms-tir.c:2147 vms-tir.c:2159 vms-tir.c:2170 +#: vms-tir.c:2182 +#, c-format +msgid "Unknown reloc %s + %s" +msgstr "" + +#: vms-tir.c:2249 +#, c-format +msgid "Unknown symbol %s in command %s" +msgstr "" + +#: vms-tir.c:2504 #, c-format msgid "SEC_RELOC with no relocs in section %s" msgstr "" -#: vms-tir.c:2152 +#: vms-tir.c:2556 vms-tir.c:2783 +#, c-format +msgid "Size error in section %s" +msgstr "" + +#: vms-tir.c:2725 +msgid "Spurious ALPHA_R_BSR reloc" +msgstr "" + +#: vms-tir.c:2770 #, c-format msgid "Unhandled relocation %s" msgstr "" -#: xcofflink.c:566 +#: xcofflink.c:836 #, c-format msgid "%s: XCOFF shared object when not producing XCOFF output" msgstr "" -#: xcofflink.c:587 +#: xcofflink.c:857 #, c-format msgid "%s: dynamic object with no .loader section" msgstr "" -#: xcofflink.c:1150 +#: xcofflink.c:1415 msgid "%B: `%s' has line numbers but no enclosing section" msgstr "" -#: xcofflink.c:1202 +#: xcofflink.c:1467 msgid "%B: class %d symbol `%s' has no aux entries" msgstr "" -#: xcofflink.c:1225 +#: xcofflink.c:1489 msgid "%B: symbol `%s' has unrecognized csect type %d" msgstr "" -#: xcofflink.c:1237 +#: xcofflink.c:1501 msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d" msgstr "" -#: xcofflink.c:1273 +#: xcofflink.c:1530 msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d" msgstr "" -#: xcofflink.c:1419 +#: xcofflink.c:1676 msgid "%B: csect `%s' not in enclosing section" msgstr "" -#: xcofflink.c:1526 +#: xcofflink.c:1783 msgid "%B: misplaced XTY_LD `%s'" msgstr "" -#: xcofflink.c:1842 +#: xcofflink.c:2102 msgid "%B: reloc %s:%d not in csect" msgstr "" -#: xcofflink.c:2640 +#: xcofflink.c:3177 #, c-format msgid "%s: no such symbol" msgstr "" -#: xcofflink.c:2869 +#: xcofflink.c:3282 #, c-format msgid "warning: attempt to export undefined symbol `%s'" msgstr "" -#: xcofflink.c:3036 +#: xcofflink.c:3664 msgid "error: undefined symbol __rtinit" msgstr "" -#: xcofflink.c:3656 -#, c-format -msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" -msgstr "" - -#: xcofflink.c:4492 -msgid "%B: loader reloc in unrecognized section `%A'" +#: xcofflink.c:4041 +msgid "%B: loader reloc in unrecognized section `%s'" msgstr "" -#: xcofflink.c:4513 +#: xcofflink.c:4052 msgid "%B: `%s' in loader reloc but not loader sym" msgstr "" -#: xcofflink.c:4528 +#: xcofflink.c:4068 msgid "%B: loader reloc in read-only section %A" msgstr "" -#: xcofflink.c:4937 xcofflink.c:4999 xcofflink.c:5294 -#, c-format -msgid "%s: loader reloc in unrecognized section `%s'" -msgstr "" - -#: xcofflink.c:5305 +#: xcofflink.c:5086 #, c-format -msgid "%s: `%s' in loader reloc but not loader sym" +msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" msgstr "" -#: elf32-ia64.c:1037 elf64-ia64.c:1037 +#: elf32-ia64.c:1050 elf64-ia64.c:1050 msgid "" "%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect " "branch." msgstr "" -#: elf32-ia64.c:2742 elf64-ia64.c:2742 +#: elf32-ia64.c:2739 elf64-ia64.c:2739 msgid "@pltoff reloc against local symbol" msgstr "" -#: elf32-ia64.c:4320 elf64-ia64.c:4320 +#: elf32-ia64.c:4314 elf64-ia64.c:4314 #, c-format msgid "%s: short data segment overflowed (0x%lx >= 0x400000)" msgstr "" -#: elf32-ia64.c:4331 elf64-ia64.c:4331 +#: elf32-ia64.c:4325 elf64-ia64.c:4325 #, c-format msgid "%s: __gp does not cover short data segment" msgstr "" -#: elf32-ia64.c:4601 elf64-ia64.c:4601 +#: elf32-ia64.c:4595 elf64-ia64.c:4595 msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'" msgstr "" -#: elf32-ia64.c:4668 elf64-ia64.c:4668 +#: elf32-ia64.c:4662 elf64-ia64.c:4662 msgid "%B: @gprel relocation against dynamic symbol %s" msgstr "" -#: elf32-ia64.c:4731 elf64-ia64.c:4731 +#: elf32-ia64.c:4725 elf64-ia64.c:4725 msgid "%B: linking non-pic code in a position independent executable" msgstr "" -#: elf32-ia64.c:4868 elf64-ia64.c:4868 +#: elf32-ia64.c:4862 elf64-ia64.c:4862 msgid "%B: @internal branch to dynamic symbol %s" msgstr "" -#: elf32-ia64.c:4870 elf64-ia64.c:4870 +#: elf32-ia64.c:4864 elf64-ia64.c:4864 msgid "%B: speculation fixup to dynamic symbol %s" msgstr "" -#: elf32-ia64.c:4872 elf64-ia64.c:4872 +#: elf32-ia64.c:4866 elf64-ia64.c:4866 msgid "%B: @pcrel relocation against dynamic symbol %s" msgstr "" -#: elf32-ia64.c:5072 elf64-ia64.c:5072 +#: elf32-ia64.c:5063 elf64-ia64.c:5063 msgid "unsupported reloc" msgstr "" -#: elf32-ia64.c:5105 elf64-ia64.c:5105 +#: elf32-ia64.c:5101 elf64-ia64.c:5101 +msgid "" +"%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%" +"A'." +msgstr "" + +#: elf32-ia64.c:5116 elf64-ia64.c:5116 msgid "" "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> " "0x1000000)." msgstr "" -#: elf32-ia64.c:5361 elf64-ia64.c:5361 +#: elf32-ia64.c:5372 elf64-ia64.c:5372 msgid "%B: linking trap-on-NULL-dereference with non-trapping files" msgstr "" -#: elf32-ia64.c:5370 elf64-ia64.c:5370 +#: elf32-ia64.c:5381 elf64-ia64.c:5381 msgid "%B: linking big-endian files with little-endian files" msgstr "" -#: elf32-ia64.c:5379 elf64-ia64.c:5379 +#: elf32-ia64.c:5390 elf64-ia64.c:5390 msgid "%B: linking 64-bit files with 32-bit files" msgstr "" -#: elf32-ia64.c:5388 elf64-ia64.c:5388 +#: elf32-ia64.c:5399 elf64-ia64.c:5399 msgid "%B: linking constant-gp files with non-constant-gp files" msgstr "" -#: elf32-ia64.c:5398 elf64-ia64.c:5398 +#: elf32-ia64.c:5409 elf64-ia64.c:5409 msgid "%B: linking auto-pic files with non-auto-pic files" msgstr "" -#: peigen.c:1000 pepigen.c:1000 pex64igen.c:1000 +#: peigen.c:999 pepigen.c:999 pex64igen.c:999 #, c-format msgid "%s: line number overflow: 0x%lx > 0xffff" msgstr "" -#: peigen.c:1027 pepigen.c:1027 pex64igen.c:1027 +#: peigen.c:1026 pepigen.c:1026 pex64igen.c:1026 msgid "Export Directory [.edata (or where ever we found it)]" msgstr "" -#: peigen.c:1028 pepigen.c:1028 pex64igen.c:1028 +#: peigen.c:1027 pepigen.c:1027 pex64igen.c:1027 msgid "Import Directory [parts of .idata]" msgstr "" -#: peigen.c:1029 pepigen.c:1029 pex64igen.c:1029 +#: peigen.c:1028 pepigen.c:1028 pex64igen.c:1028 msgid "Resource Directory [.rsrc]" msgstr "" -#: peigen.c:1030 pepigen.c:1030 pex64igen.c:1030 +#: peigen.c:1029 pepigen.c:1029 pex64igen.c:1029 msgid "Exception Directory [.pdata]" msgstr "" -#: peigen.c:1031 pepigen.c:1031 pex64igen.c:1031 +#: peigen.c:1030 pepigen.c:1030 pex64igen.c:1030 msgid "Security Directory" msgstr "" -#: peigen.c:1032 pepigen.c:1032 pex64igen.c:1032 +#: peigen.c:1031 pepigen.c:1031 pex64igen.c:1031 msgid "Base Relocation Directory [.reloc]" msgstr "" -#: peigen.c:1033 pepigen.c:1033 pex64igen.c:1033 +#: peigen.c:1032 pepigen.c:1032 pex64igen.c:1032 msgid "Debug Directory" msgstr "" -#: peigen.c:1034 pepigen.c:1034 pex64igen.c:1034 +#: peigen.c:1033 pepigen.c:1033 pex64igen.c:1033 msgid "Description Directory" msgstr "" -#: peigen.c:1035 pepigen.c:1035 pex64igen.c:1035 +#: peigen.c:1034 pepigen.c:1034 pex64igen.c:1034 msgid "Special Directory" msgstr "" -#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036 +#: peigen.c:1035 pepigen.c:1035 pex64igen.c:1035 msgid "Thread Storage Directory [.tls]" msgstr "" -#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037 +#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036 msgid "Load Configuration Directory" msgstr "" -#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038 +#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037 msgid "Bound Import Directory" msgstr "" -#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039 +#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038 msgid "Import Address Table Directory" msgstr "" -#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040 +#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039 msgid "Delay Import Directory" msgstr "" -#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041 +#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040 msgid "CLR Runtime Header" msgstr "" -#: peigen.c:1042 pepigen.c:1042 pex64igen.c:1042 +#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041 msgid "Reserved" msgstr "" -#: peigen.c:1102 pepigen.c:1102 pex64igen.c:1102 +#: peigen.c:1101 pepigen.c:1101 pex64igen.c:1101 #, c-format msgid "" "\n" "There is an import table, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1107 pepigen.c:1107 pex64igen.c:1107 +#: peigen.c:1106 pepigen.c:1106 pex64igen.c:1106 #, c-format msgid "" "\n" "There is an import table in %s at 0x%lx\n" msgstr "" -#: peigen.c:1150 pepigen.c:1150 pex64igen.c:1150 +#: peigen.c:1149 pepigen.c:1149 pex64igen.c:1149 #, c-format msgid "" "\n" "Function descriptor located at the start address: %04lx\n" msgstr "" -#: peigen.c:1153 pepigen.c:1153 pex64igen.c:1153 +#: peigen.c:1152 pepigen.c:1152 pex64igen.c:1152 #, c-format msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n" msgstr "" -#: peigen.c:1161 pepigen.c:1161 pex64igen.c:1161 +#: peigen.c:1160 pepigen.c:1160 pex64igen.c:1160 #, c-format msgid "" "\n" "No reldata section! Function descriptor not decoded.\n" msgstr "" -#: peigen.c:1166 pepigen.c:1166 pex64igen.c:1166 +#: peigen.c:1165 pepigen.c:1165 pex64igen.c:1165 #, c-format msgid "" "\n" "The Import Tables (interpreted %s section contents)\n" msgstr "" -#: peigen.c:1169 pepigen.c:1169 pex64igen.c:1169 +#: peigen.c:1168 pepigen.c:1168 pex64igen.c:1168 #, c-format msgid "" " vma: Hint Time Forward DLL First\n" " Table Stamp Chain Name Thunk\n" msgstr "" -#: peigen.c:1217 pepigen.c:1217 pex64igen.c:1217 +#: peigen.c:1216 pepigen.c:1216 pex64igen.c:1216 #, c-format msgid "" "\n" "\tDLL Name: %s\n" msgstr "" -#: peigen.c:1228 pepigen.c:1228 pex64igen.c:1228 +#: peigen.c:1227 pepigen.c:1227 pex64igen.c:1227 #, c-format msgid "\tvma: Hint/Ord Member-Name Bound-To\n" msgstr "" -#: peigen.c:1253 pepigen.c:1253 pex64igen.c:1253 +#: peigen.c:1252 pepigen.c:1252 pex64igen.c:1252 #, c-format msgid "" "\n" "There is a first thunk, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1418 pepigen.c:1418 pex64igen.c:1418 +#: peigen.c:1417 pepigen.c:1417 pex64igen.c:1417 #, c-format msgid "" "\n" "There is an export table, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1427 pepigen.c:1427 pex64igen.c:1427 +#: peigen.c:1426 pepigen.c:1426 pex64igen.c:1426 #, c-format msgid "" "\n" "There is an export table in %s, but it does not fit into that section\n" msgstr "" -#: peigen.c:1433 pepigen.c:1433 pex64igen.c:1433 +#: peigen.c:1432 pepigen.c:1432 pex64igen.c:1432 #, c-format msgid "" "\n" "There is an export table in %s at 0x%lx\n" msgstr "" -#: peigen.c:1461 pepigen.c:1461 pex64igen.c:1461 +#: peigen.c:1460 pepigen.c:1460 pex64igen.c:1460 #, c-format msgid "" "\n" @@ -3573,128 +4006,129 @@ msgid "" "\n" msgstr "" -#: peigen.c:1465 pepigen.c:1465 pex64igen.c:1465 +#: peigen.c:1464 pepigen.c:1464 pex64igen.c:1464 #, c-format msgid "Export Flags \t\t\t%lx\n" msgstr "" -#: peigen.c:1468 pepigen.c:1468 pex64igen.c:1468 +#: peigen.c:1467 pepigen.c:1467 pex64igen.c:1467 #, c-format msgid "Time/Date stamp \t\t%lx\n" msgstr "" -#: peigen.c:1471 pepigen.c:1471 pex64igen.c:1471 +#: peigen.c:1470 pepigen.c:1470 pex64igen.c:1470 #, c-format msgid "Major/Minor \t\t\t%d/%d\n" msgstr "" -#: peigen.c:1474 pepigen.c:1474 pex64igen.c:1474 +#: peigen.c:1473 pepigen.c:1473 pex64igen.c:1473 #, c-format msgid "Name \t\t\t\t" msgstr "" -#: peigen.c:1480 pepigen.c:1480 pex64igen.c:1480 +#: peigen.c:1479 pepigen.c:1479 pex64igen.c:1479 #, c-format msgid "Ordinal Base \t\t\t%ld\n" msgstr "" -#: peigen.c:1483 pepigen.c:1483 pex64igen.c:1483 +#: peigen.c:1482 pepigen.c:1482 pex64igen.c:1482 #, c-format msgid "Number in:\n" msgstr "" -#: peigen.c:1486 pepigen.c:1486 pex64igen.c:1486 +#: peigen.c:1485 pepigen.c:1485 pex64igen.c:1485 #, c-format msgid "\tExport Address Table \t\t%08lx\n" msgstr "" -#: peigen.c:1490 pepigen.c:1490 pex64igen.c:1490 +#: peigen.c:1489 pepigen.c:1489 pex64igen.c:1489 #, c-format msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n" msgstr "" -#: peigen.c:1493 pepigen.c:1493 pex64igen.c:1493 +#: peigen.c:1492 pepigen.c:1492 pex64igen.c:1492 #, c-format msgid "Table Addresses\n" msgstr "" -#: peigen.c:1496 pepigen.c:1496 pex64igen.c:1496 +#: peigen.c:1495 pepigen.c:1495 pex64igen.c:1495 #, c-format msgid "\tExport Address Table \t\t" msgstr "" -#: peigen.c:1501 pepigen.c:1501 pex64igen.c:1501 +#: peigen.c:1500 pepigen.c:1500 pex64igen.c:1500 #, c-format msgid "\tName Pointer Table \t\t" msgstr "" -#: peigen.c:1506 pepigen.c:1506 pex64igen.c:1506 +#: peigen.c:1505 pepigen.c:1505 pex64igen.c:1505 #, c-format msgid "\tOrdinal Table \t\t\t" msgstr "" -#: peigen.c:1520 pepigen.c:1520 pex64igen.c:1520 +#: peigen.c:1519 pepigen.c:1519 pex64igen.c:1519 #, c-format msgid "" "\n" "Export Address Table -- Ordinal Base %ld\n" msgstr "" -#: peigen.c:1539 pepigen.c:1539 pex64igen.c:1539 +#: peigen.c:1538 pepigen.c:1538 pex64igen.c:1538 msgid "Forwarder RVA" msgstr "" -#: peigen.c:1550 pepigen.c:1550 pex64igen.c:1550 +#: peigen.c:1549 pepigen.c:1549 pex64igen.c:1549 msgid "Export RVA" msgstr "" -#: peigen.c:1557 pepigen.c:1557 pex64igen.c:1557 +#: peigen.c:1556 pepigen.c:1556 pex64igen.c:1556 #, c-format msgid "" "\n" "[Ordinal/Name Pointer] Table\n" msgstr "" -#: peigen.c:1610 pepigen.c:1610 pex64igen.c:1610 +#: peigen.c:1616 peigen.c:1795 pepigen.c:1616 pepigen.c:1795 pex64igen.c:1616 +#: pex64igen.c:1795 #, c-format msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n" msgstr "" -#: peigen.c:1614 pepigen.c:1614 pex64igen.c:1614 -#, c-format -msgid "" -"\n" -"The Function Table (interpreted .pdata section contents)\n" -msgstr "" - -#: peigen.c:1617 pepigen.c:1617 pex64igen.c:1617 +#: peigen.c:1623 pepigen.c:1623 pex64igen.c:1623 #, c-format msgid " vma:\t\t\tBegin Address End Address Unwind Info\n" msgstr "" -#: peigen.c:1619 pepigen.c:1619 pex64igen.c:1619 +#: peigen.c:1625 pepigen.c:1625 pex64igen.c:1625 #, c-format msgid "" " vma:\t\tBegin End EH EH PrologEnd Exception\n" " \t\tAddress Address Handler Data Address Mask\n" msgstr "" -#: peigen.c:1689 pepigen.c:1689 pex64igen.c:1689 +#: peigen.c:1695 pepigen.c:1695 pex64igen.c:1695 #, c-format msgid " Register save millicode" msgstr "" -#: peigen.c:1692 pepigen.c:1692 pex64igen.c:1692 +#: peigen.c:1698 pepigen.c:1698 pex64igen.c:1698 #, c-format msgid " Register restore millicode" msgstr "" -#: peigen.c:1695 pepigen.c:1695 pex64igen.c:1695 +#: peigen.c:1701 pepigen.c:1701 pex64igen.c:1701 #, c-format msgid " Glue code sequence" msgstr "" -#: peigen.c:1745 pepigen.c:1745 pex64igen.c:1745 +#: peigen.c:1801 pepigen.c:1801 pex64igen.c:1801 +#, c-format +msgid "" +" vma:\t\tBegin Prolog Function Flags Exception EH\n" +" \t\tAddress Length Length 32b exc Handler Data\n" +msgstr "" + +#: peigen.c:1933 pepigen.c:1933 pex64igen.c:1933 #, c-format msgid "" "\n" @@ -3702,14 +4136,14 @@ msgid "" "PE File Base Relocations (interpreted .reloc section contents)\n" msgstr "" -#: peigen.c:1775 pepigen.c:1775 pex64igen.c:1775 +#: peigen.c:1963 pepigen.c:1963 pex64igen.c:1963 #, c-format msgid "" "\n" "Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n" msgstr "" -#: peigen.c:1788 pepigen.c:1788 pex64igen.c:1788 +#: peigen.c:1976 pepigen.c:1976 pex64igen.c:1976 #, c-format msgid "\treloc %4d offset %4x [%4lx] %s" msgstr "" @@ -3717,31 +4151,31 @@ msgstr "" #. The MS dumpbin program reportedly ands with 0xff0f before #. printing the characteristics field. Not sure why. No reason to #. emulate it here. -#: peigen.c:1827 pepigen.c:1827 pex64igen.c:1827 +#: peigen.c:2015 pepigen.c:2015 pex64igen.c:2015 #, c-format msgid "" "\n" "Characteristics 0x%x\n" msgstr "" -#: peigen.c:2088 pepigen.c:2088 pex64igen.c:2088 +#: peigen.c:2292 pepigen.c:2292 pex64igen.c:2292 msgid "%B: unable to fill in DataDictionary[1] because .idata$2 is missing" msgstr "" -#: peigen.c:2106 pepigen.c:2106 pex64igen.c:2106 +#: peigen.c:2312 pepigen.c:2312 pex64igen.c:2312 msgid "%B: unable to fill in DataDictionary[1] because .idata$4 is missing" msgstr "" -#: peigen.c:2125 pepigen.c:2125 pex64igen.c:2125 +#: peigen.c:2333 pepigen.c:2333 pex64igen.c:2333 msgid "%B: unable to fill in DataDictionary[12] because .idata$5 is missing" msgstr "" -#: peigen.c:2143 pepigen.c:2143 pex64igen.c:2143 +#: peigen.c:2353 pepigen.c:2353 pex64igen.c:2353 msgid "" "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because ." "idata$6 is missing" msgstr "" -#: peigen.c:2163 pepigen.c:2163 pex64igen.c:2163 +#: peigen.c:2375 pepigen.c:2375 pex64igen.c:2375 msgid "%B: unable to fill in DataDictionary[9] because __tls_used is missing" msgstr "" diff --git a/cegcc/src/binutils/bfd/po/es.po b/cegcc/src/binutils/bfd/po/es.po index 9f2ec21cf..da410ee75 100644 --- a/cegcc/src/binutils/bfd/po/es.po +++ b/cegcc/src/binutils/bfd/po/es.po @@ -1,13 +1,14 @@ -# Mensajes en español para bfd 2.17.90. -# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. -# Cristian Othón Martínez Vera , 2002, 2003, 2004, 2005, 2006, 2007 +# Mensajes en español para bfd 2.19.90. +# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is distributed under the same license as the binutils package. +# Cristian Othón Martínez Vera , 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # msgid "" msgstr "" -"Project-Id-Version: bfd 2.17.90\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-08-06 16:21-0400\n" -"PO-Revision-Date: 2007-09-08 08:57-0500\n" +"Project-Id-Version: bfd 2.19.90\n" +"Report-Msgid-Bugs-To: bug-binutils@gnu.org\n" +"POT-Creation-Date: 2009-09-07 14:05+0200\n" +"PO-Revision-Date: 2009-09-12 14:44-0500\n" "Last-Translator: Cristian Othón Martínez Vera \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" @@ -21,162 +22,162 @@ msgstr "%B: Tipo de secci #: aout-cris.c:204 #, c-format msgid "%s: Invalid relocation type exported: %d" -msgstr "%s: Tipo de reubicación exportado inválido: %d" +msgstr "%s: Se exportó un tipo de reubicación inválido: %d" #: aout-cris.c:247 msgid "%B: Invalid relocation type imported: %d" -msgstr "%B: Tipo de reubicación importado inválido: %d" +msgstr "%B: Se importó un tipo de reubicación inválido: %d" #: aout-cris.c:258 msgid "%B: Bad relocation record imported: %d" -msgstr "%B: Registro de reubicación importado erróneo: %d" +msgstr "%B: Se importó un registro de reubicación erróneo: %d" -#: aoutx.h:1268 aoutx.h:1602 +#: aoutx.h:1271 aoutx.h:1609 #, c-format msgid "%s: can not represent section `%s' in a.out object file format" -msgstr "%s: no se puede representar la sección `%s' en el fichero objeto de formato a.out" +msgstr "%s: no se puede representar la sección `%s' en el formato de fichero objeto a.out" -#: aoutx.h:1568 +#: aoutx.h:1575 #, c-format msgid "%s: can not represent section for symbol `%s' in a.out object file format" -msgstr "%s: no se puede representar la sección para el símbolo `%s' en el fichero objeto de formato a.out" +msgstr "%s: no se puede representar la sección para el símbolo `%s' en el formato de fichero objeto a.out" -#: aoutx.h:1570 +#: aoutx.h:1577 msgid "*unknown*" msgstr "*desconocido*" -#: aoutx.h:3987 aoutx.h:4313 +#: aoutx.h:3994 aoutx.h:4320 msgid "%P: %B: unexpected relocation type\n" msgstr "%P: %B: tipo de reubicación inesperado\n" -#: aoutx.h:5347 +#: aoutx.h:5354 #, c-format msgid "%s: relocatable link from %s to %s not supported" msgstr "%s: no se admite el enlace reubicable de %s a %s" -#: archive.c:1766 +#: archive.c:2056 msgid "Warning: writing archive was slow: rewriting timestamp\n" msgstr "Aviso: la escritura del fichero fue lenta: se reescribe la marca de tiempo\n" # ¡Uff! Si utilizáramos file=archivo, esta traducción sería imposible. cfuga -#: archive.c:2029 +#: archive.c:2342 msgid "Reading archive file mod timestamp" -msgstr "Se lee el archivo de la modificación de marca de tiempo del fichero" +msgstr "Se lee la marca de tiempo modificada del fichero en el archivo" -#: archive.c:2053 +#: archive.c:2366 msgid "Writing updated armap timestamp" msgstr "Se escribe la marca de tiempo actualizada de armap" -#: bfd.c:289 +#: bfd.c:375 msgid "No error" msgstr "No hay error" -#: bfd.c:290 +#: bfd.c:376 msgid "System call error" msgstr "Error en la llamada al sistema" -#: bfd.c:291 +#: bfd.c:377 msgid "Invalid bfd target" msgstr "Objetivo bfd inválido" -#: bfd.c:292 +#: bfd.c:378 msgid "File in wrong format" msgstr "Fichero en formato erróneo" -#: bfd.c:293 +#: bfd.c:379 msgid "Archive object file in wrong format" msgstr "Archivo de ficheros objeto en formato erróneo" -#: bfd.c:294 +#: bfd.c:380 msgid "Invalid operation" msgstr "Operación inválida" -#: bfd.c:295 +#: bfd.c:381 msgid "Memory exhausted" msgstr "Memoria agotada" -#: bfd.c:296 +#: bfd.c:382 msgid "No symbols" msgstr "No hay símbolos" -#: bfd.c:297 +#: bfd.c:383 msgid "Archive has no index; run ranlib to add one" msgstr "El archivo no tiene índice; ejecute ranlib para agregar uno" -#: bfd.c:298 +#: bfd.c:384 msgid "No more archived files" msgstr "No hay más ficheros archivados" -#: bfd.c:299 +#: bfd.c:385 msgid "Malformed archive" msgstr "Archivo malformado" -#: bfd.c:300 +#: bfd.c:386 msgid "File format not recognized" msgstr "No se reconoce el formato del fichero" -#: bfd.c:301 +#: bfd.c:387 msgid "File format is ambiguous" msgstr "El formato del fichero es ambiguo" -#: bfd.c:302 +#: bfd.c:388 msgid "Section has no contents" -msgstr "La sección no tiene contenidos" +msgstr "La sección no tiene contenido" -#: bfd.c:303 +#: bfd.c:389 msgid "Nonrepresentable section on output" msgstr "Sección no representable en la salida" -#: bfd.c:304 +#: bfd.c:390 msgid "Symbol needs debug section which does not exist" msgstr "Un símbolo requiere de una sección de depuración, la cual no existe" -#: bfd.c:305 +#: bfd.c:391 msgid "Bad value" msgstr "Valor erróneo" -#: bfd.c:306 +#: bfd.c:392 msgid "File truncated" msgstr "Fichero truncado" -#: bfd.c:307 +#: bfd.c:393 msgid "File too big" -msgstr "Fichero demasiado grande" +msgstr "El fichero es demasiado grande" -#: bfd.c:308 +#: bfd.c:394 #, c-format msgid "Error reading %s: %s" msgstr "Error al leer %s: %s" -#: bfd.c:309 +#: bfd.c:395 msgid "#" msgstr "#" -#: bfd.c:830 +#: bfd.c:919 #, c-format msgid "BFD %s assertion fail %s:%d" msgstr "falló la aseveración BFD %s %s:%d" -#: bfd.c:842 +#: bfd.c:931 #, c-format msgid "BFD %s internal error, aborting at %s line %d in %s\n" msgstr "error interno de BFD %s, se aborta en %s línea %d en %s\n" -#: bfd.c:846 +#: bfd.c:935 #, c-format msgid "BFD %s internal error, aborting at %s line %d\n" msgstr "error interno de BFD %s, se aborta en %s línea %d\n" -#: bfd.c:848 +#: bfd.c:937 msgid "Please report this bug.\n" msgstr "Por favor reporte este bicho.\n" -#: bfdwin.c:208 +#: bfdwin.c:206 #, c-format msgid "not mapping: data=%lx mapped=%d\n" msgstr "no se mapea: datos=%lx mapeados%d\n" -#: bfdwin.c:211 +#: bfdwin.c:209 #, c-format msgid "not mapping: env var not set\n" msgstr "no se mapea: no se estableció la variable de ambiente\n" @@ -186,14 +187,16 @@ msgstr "no se mapea: no se estableci msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx." msgstr "Aviso: Se escribe la sección `%s' a un desplazamiento de fichero grande (pe negativo) 0x%lx." -#: cache.c:238 +#: bout.c:1150 elf-m10300.c:2078 elf32-avr.c:1639 elf32-frv.c:5743 +#: elf32-xtensa.c:6639 elfxx-sparc.c:2456 reloc.c:5386 reloc16.c:162 +#: vms.c:1918 elf32-ia64.c:788 elf64-ia64.c:788 +msgid "%P%F: --relax and -r may not be used together\n" +msgstr "%P%F: --relax y -r no se pueden usar juntos\n" + +#: cache.c:226 msgid "reopening %B: %s\n" msgstr "se reabre %B: %s\n" -#: coff64-rs6000.c:2126 coff-rs6000.c:3624 -msgid "%B: symbol `%s' has unrecognized smclas %d" -msgstr "%B: el símbolo `%s' tiene smclas %d que no se reconoce" - #: coff-alpha.c:490 msgid "" "%B: Cannot handle compressed Alpha binaries.\n" @@ -206,9 +209,9 @@ msgstr "" msgid "%B: unknown/unsupported relocation type %d" msgstr "%B: tipo de reubicación %d desconocida/no admitida" -#: coff-alpha.c:899 coff-alpha.c:936 coff-alpha.c:2024 coff-mips.c:1002 +#: coff-alpha.c:899 coff-alpha.c:936 coff-alpha.c:2024 coff-mips.c:1003 msgid "GP relative relocation used when GP not defined" -msgstr "se usó una reubicación GP relativa cuando GP no estaba definido" +msgstr "se usó una reubicación relativa a GP cuando GP no estaba definido" #: coff-alpha.c:1501 msgid "using multiple gp values" @@ -222,22 +225,22 @@ msgstr "%B: tipo de reubicaci msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW" msgstr "%B: tipo de reubicación no admitida: ALPHA_R_GPRELLOW" -#: coff-alpha.c:1574 elf32-m32r.c:2487 elf64-alpha.c:3953 elf64-alpha.c:4106 -#: elf32-ia64.c:4675 elf64-ia64.c:4675 +#: coff-alpha.c:1574 elf32-m32r.c:2477 elf64-alpha.c:3943 elf64-alpha.c:4098 +#: elf32-ia64.c:4462 elf64-ia64.c:4462 msgid "%B: unknown relocation type %d" msgstr "%B: tipo de reubicación %d desconocido" -#: coff-arm.c:1036 +#: coff-arm.c:1039 #, c-format msgid "%B: unable to find THUMB glue '%s' for `%s'" msgstr "%B: no se puede encontrar el pegamento THUMB '%s' para `%s'" -#: coff-arm.c:1065 +#: coff-arm.c:1068 #, c-format msgid "%B: unable to find ARM glue '%s' for `%s'" msgstr "%B: no se puede encontrar el pegamento ARM '%s' para `%s'" -#: coff-arm.c:1367 elf32-arm.c:4167 +#: coff-arm.c:1370 elf32-arm.c:6372 #, c-format msgid "" "%B(%s): warning: interworking not enabled.\n" @@ -246,7 +249,7 @@ msgstr "" "%B(%s): aviso: no se activó la interoperabilidad.\n" " primer suceso: %B: llamada arm a thumb" -#: coff-arm.c:1457 +#: coff-arm.c:1460 #, c-format msgid "" "%B(%s): warning: interworking not enabled.\n" @@ -254,191 +257,121 @@ msgid "" " consider relinking with --support-old-code enabled" msgstr "" "%B(%s): aviso: no se activó la interoperabilidad.\n" -" primer suceso: %B: llamada arm a thumb\n" +" primer suceso: %B: llamada thumb a arm\n" " considere reenlazar con --support-old-code activado" -#: coff-arm.c:1750 cofflink.c:3018 coff-tic80.c:695 +#: coff-arm.c:1755 coff-tic80.c:695 cofflink.c:3027 msgid "%B: bad reloc address 0x%lx in section `%A'" msgstr "%B: dirección de reubicación 0x%lx errónea en la sección `%A'" -#: coff-arm.c:2075 +#: coff-arm.c:2080 msgid "%B: illegal symbol index in reloc: %d" msgstr "%B: índice de símbolos ilegal en la reubicación: %d" -#: coff-arm.c:2206 +#: coff-arm.c:2211 #, c-format -msgid "ERROR: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d" -msgstr "ERROR: %B está compilado para APCS-%d, mientras que %B está compilado para APCS-%d" +msgid "error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d" +msgstr "error: %B está compilado para APCS-%d, mientras que %B está compilado para APCS-%d" -#: coff-arm.c:2222 elf32-arm.c:7072 +#: coff-arm.c:2227 elf32-arm.c:10327 #, c-format -msgid "ERROR: %B passes floats in float registers, whereas %B passes them in integer registers" -msgstr "ERROR: %B pasa números de coma flotante en registros de coma flotante, mientras que %B los pasa en registros enteros" +msgid "error: %B passes floats in float registers, whereas %B passes them in integer registers" +msgstr "error: %B pasa números de coma flotante en registros de coma flotante, mientras que %B los pasa en registros enteros" -#: coff-arm.c:2225 elf32-arm.c:7076 +#: coff-arm.c:2230 elf32-arm.c:10331 #, c-format -msgid "ERROR: %B passes floats in integer registers, whereas %B passes them in float registers" -msgstr "ERROR: %B pasa números de coma flotante en registros enteros, mientras que %B los pasa en registros de coma flotante" +msgid "error: %B passes floats in integer registers, whereas %B passes them in float registers" +msgstr "error: %B pasa números de coma flotante en registros enteros, mientras que %B los pasa en registros de coma flotante" -#: coff-arm.c:2239 +#: coff-arm.c:2244 #, c-format -msgid "ERROR: %B is compiled as position independent code, whereas target %B is absolute position" -msgstr "ERROR: %B está compilado como código independiente de posición, mientras que el objetivo %B es de posición absoluta" +msgid "error: %B is compiled as position independent code, whereas target %B is absolute position" +msgstr "error: %B está compilado como código independiente de posición, mientras que el objetivo %B es de posición absoluta" -#: coff-arm.c:2242 +#: coff-arm.c:2247 #, c-format -msgid "ERROR: %B is compiled as absolute position code, whereas target %B is position independent" -msgstr "ERROR: %B está compilado como código de posición absoluta, mientras que el objetivo %B es independiente de posición" +msgid "error: %B is compiled as absolute position code, whereas target %B is position independent" +msgstr "error: %B está compilado como código de posición absoluta, mientras que el objetivo %B es independiente de posición" -#: coff-arm.c:2270 elf32-arm.c:7141 +#: coff-arm.c:2275 elf32-arm.c:10396 #, c-format msgid "Warning: %B supports interworking, whereas %B does not" msgstr "Aviso: %B admite interoperabilidad, mientras que %B no" -#: coff-arm.c:2273 elf32-arm.c:7147 +#: coff-arm.c:2278 elf32-arm.c:10402 #, c-format msgid "Warning: %B does not support interworking, whereas %B does" msgstr "Aviso: %B no admite interoperabilidad, mientras que %B sí" -#: coff-arm.c:2297 +#: coff-arm.c:2302 #, c-format msgid "private flags = %x:" msgstr "opciones privadas = %x:" -#: coff-arm.c:2305 elf32-arm.c:7198 +#: coff-arm.c:2310 elf32-arm.c:10453 #, c-format msgid " [floats passed in float registers]" msgstr "[números de coma flotante pasados en registros de coma flotante]" -#: coff-arm.c:2307 +#: coff-arm.c:2312 #, c-format msgid " [floats passed in integer registers]" msgstr "[números de coma flotante pasados en registros enteros]" -#: coff-arm.c:2310 elf32-arm.c:7201 +#: coff-arm.c:2315 elf32-arm.c:10456 #, c-format msgid " [position independent]" msgstr "[independiente de posición]" -#: coff-arm.c:2312 +#: coff-arm.c:2317 #, c-format msgid " [absolute position]" msgstr "[posición absoluta]" -#: coff-arm.c:2316 +#: coff-arm.c:2321 #, c-format msgid " [interworking flag not initialised]" msgstr "[no se inicializó la opción de interoperabilidad]" -#: coff-arm.c:2318 +#: coff-arm.c:2323 #, c-format msgid " [interworking supported]" msgstr "[admite interoperabilidad]" -#: coff-arm.c:2320 +#: coff-arm.c:2325 #, c-format msgid " [interworking not supported]" msgstr "[no admite interoperabilidad]" -#: coff-arm.c:2366 elf32-arm.c:6578 +#: coff-arm.c:2371 elf32-arm.c:9360 #, c-format msgid "Warning: Not setting interworking flag of %B since it has already been specified as non-interworking" msgstr "Aviso: No se establece la opción de interoperabilidad de %B ya que se había especificado con anterioridad como no interoperable" -#: coff-arm.c:2370 elf32-arm.c:6582 +#: coff-arm.c:2375 elf32-arm.c:9364 #, c-format msgid "Warning: Clearing the interworking flag of %B due to outside request" msgstr "Aviso: Se limpia la opción de interoperabilidad de %B debido a una petición externa" -#: coffcode.h:850 -msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'" -msgstr "%B: aviso: el símbolo COMDAT '%s' no coincide con el nombre de sección '%s'" - -#. Generate a warning message rather using the 'unhandled' -#. variable as this will allow some .sys files generate by -#. other toolchains to be processed. See bugzilla issue 196. -#: coffcode.h:1062 -msgid "%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s" -msgstr "%B: Aviso: Se descarta la opción de sección IMAGE_SCN_MEM_NOT_PAGED en la sección %s" - -#: coffcode.h:1117 -msgid "%B (%s): Section flag %s (0x%x) ignored" -msgstr "%B (%s): Se descarta la opción de sección %s (0x%x)" - -#: coffcode.h:2236 -#, c-format -msgid "Unrecognized TI COFF target id '0x%x'" -msgstr "No se reconoce el id de objetivo TI COFF '0x%x'" - -#: coffcode.h:2551 -msgid "%B: reloc against a non-existant symbol index: %ld" -msgstr "%B: reubicación contra un índice símbolo que no existe: %ld" - -#: coffcode.h:4296 -msgid "%B: warning: line number table read failed" -msgstr "%B: aviso: falló la lectura de tabla de números de línea" - -#: coffcode.h:4329 -msgid "%B: warning: illegal symbol index %ld in line numbers" -msgstr "%B: aviso: índice de símbolos %ld ilegal en los números de línea" - -#: coffcode.h:4343 -msgid "%B: warning: duplicate line number information for `%s'" -msgstr "%B: aviso: información duplicada de números de línea para `%s'" - -#: coffcode.h:4735 -msgid "%B: Unrecognized storage class %d for %s symbol `%s'" -msgstr "%B: Clase de almacenamiento %d no reconocida para %s símbolo `%s'" - -#: coffcode.h:4861 -msgid "warning: %B: local symbol `%s' has no section" -msgstr "aviso: %B: el símbolo local `%s' no tiene sección" - -#: coffcode.h:4966 coff-i860.c:601 coff-tic54x.c:393 -msgid "%B: warning: illegal symbol index %ld in relocs" -msgstr "%B: aviso: índice de símbolos %ld ilegal en reubicaciones" - -#: coffcode.h:5004 -msgid "%B: illegal relocation type %d at address 0x%lx" -msgstr "%B: tipo de reubicación %d ilegal en la dirección 0x%lx" - -#: coffgen.c:1518 -msgid "%B: bad string table size %lu" -msgstr "%B: tamaño de tabla de cadenas %lu erróneo" - #: coff-h8300.c:1122 #, c-format msgid "cannot handle R_MEM_INDIRECT reloc when using %s output" msgstr "no se puede manejar la reubicación R_MEM_INDIRECT cuando se utiliza la salida %s" -#: coff-i860.c:143 +#: coff-i860.c:147 #, c-format msgid "Relocation `%s' not yet implemented\n" msgstr "La reubicación `%s' aún no está implementada\n" -#: coff-i960.c:138 coff-i960.c:501 +#: coff-i860.c:605 coff-tic54x.c:398 coffcode.h:5143 +msgid "%B: warning: illegal symbol index %ld in relocs" +msgstr "%B: aviso: índice de símbolos %ld ilegal en reubicaciones" + +#: coff-i960.c:143 coff-i960.c:506 msgid "uncertain calling convention for non-COFF symbol" msgstr "convención de llamada incierta para un símbolo que no es COFF" -#: cofflink.c:513 elflink.c:4175 -msgid "Warning: type of symbol `%s' changed from %d to %d in %B" -msgstr "Aviso: el tipo del símbolo `%s' cambió de %d a %d en %B" - -#: cofflink.c:2296 -msgid "%B: relocs in section `%A', but it has no contents" -msgstr "%B: reubicaciones en la sección `%A', pero no tiene contenido" - -#: cofflink.c:2627 coffswap.h:824 -#, c-format -msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" -msgstr "%s: %s: desbordamiento de reubicación: 0x%lx > 0xffff" - -#: cofflink.c:2636 coffswap.h:810 -#, c-format -msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" -msgstr "%s: aviso: %s: desbordamiento de número de línea: 0x%lx > 0xffff" - -#: coff-m68k.c:506 elf32-bfin.c:5434 elf32-m68k.c:2393 +#: coff-m68k.c:506 elf32-bfin.c:5693 elf32-cr16.c:2965 elf32-m68k.c:4615 msgid "unsupported reloc type" msgstr "no se admite el tipo de reubicación" @@ -460,121 +393,183 @@ msgstr "La direcci #: coff-maxq.c:333 msgid "Unrecognized Reloc Type" -msgstr "Tipo de Reubicación no Reconocida" +msgstr "No se reconoce el Tipo de Reubicación" -#: coff-mips.c:687 elf32-mips.c:958 elf32-score.c:345 elf64-mips.c:1911 -#: elfn32-mips.c:1752 +#: coff-mips.c:688 elf32-mips.c:1014 elf32-score.c:441 elf32-score7.c:341 +#: elf64-mips.c:2018 elfn32-mips.c:1832 msgid "GP relative relocation when _gp not defined" -msgstr "reubicación GP relativa cuando _gp no está definido" +msgstr "reubicación relativa a GP cuando _gp no está definido" -#: coff-or32.c:228 +#: coff-or32.c:229 msgid "Unrecognized reloc" -msgstr "Reubicación no reconocida" +msgstr "No se reconoce la reubicación" -#: coff-rs6000.c:2799 +#: coff-rs6000.c:2787 #, c-format msgid "%s: unsupported relocation type 0x%02x" msgstr "%s: no se admite el tipo de reubicación 0x%02x" -#: coff-rs6000.c:2892 +#: coff-rs6000.c:2880 #, c-format msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry" msgstr "%s: reubicación de TOC en 0x%x al símbolo `%s' sin entrada TOC" -#: coff-tic4x.c:191 coff-tic54x.c:299 coff-tic80.c:458 +#: coff-rs6000.c:3646 coff64-rs6000.c:2168 +msgid "%B: symbol `%s' has unrecognized smclas %d" +msgstr "%B: el símbolo `%s' tiene smclas %d que no se reconoce" + +#: coff-tic4x.c:195 coff-tic54x.c:299 coff-tic80.c:458 #, c-format msgid "Unrecognized reloc type 0x%x" -msgstr "Tipo de reubicación 0x%x no reconocida" +msgstr "No se reconoce el tipo de reubicación 0x%x" -#: coff-tic4x.c:236 +#: coff-tic4x.c:240 #, c-format msgid "%s: warning: illegal symbol index %ld in relocs" -msgstr "%s: aviso: íncide de símbolos %ld ilegal en reubicaciones" +msgstr "%s: aviso: índice de símbolos %ld ilegal en reubicaciones" #: coff-w65.c:367 #, c-format msgid "ignoring reloc %s\n" msgstr "se descarta la reubicación %s\n" +#: coffcode.h:960 +msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'" +msgstr "%B: aviso: el símbolo COMDAT '%s' no coincide con el nombre de sección '%s'" + +#. Generate a warning message rather using the 'unhandled' +#. variable as this will allow some .sys files generate by +#. other toolchains to be processed. See bugzilla issue 196. +#: coffcode.h:1176 +msgid "%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s" +msgstr "%B: Aviso: Se descarta la opción de sección IMAGE_SCN_MEM_NOT_PAGED en la sección %s" + +#: coffcode.h:1240 +msgid "%B (%s): Section flag %s (0x%x) ignored" +msgstr "%B (%s): Se descarta la opción de sección %s (0x%x)" + +#: coffcode.h:2382 +#, c-format +msgid "Unrecognized TI COFF target id '0x%x'" +msgstr "No se reconoce el id de objetivo COFF TI '0x%x'" + +#: coffcode.h:2696 +msgid "%B: reloc against a non-existant symbol index: %ld" +msgstr "%B: reubicación contra un índice de símbolo que no existe: %ld" + +#: coffcode.h:3669 +msgid "%B: section %s: string table overflow at offset %ld" +msgstr "%B: sección %s: desbordamiento de tabla de cadenas en el desplazamiento %ld" + +#: coffcode.h:4477 +msgid "%B: warning: line number table read failed" +msgstr "%B: aviso: falló la lectura de tabla de números de línea" + +#: coffcode.h:4507 +msgid "%B: warning: illegal symbol index %ld in line numbers" +msgstr "%B: aviso: índice de símbolos %ld ilegal en los números de línea" + +#: coffcode.h:4521 +msgid "%B: warning: duplicate line number information for `%s'" +msgstr "%B: aviso: información de números de línea duplicada para `%s'" + +#: coffcode.h:4912 +msgid "%B: Unrecognized storage class %d for %s symbol `%s'" +msgstr "%B: No se reconoce la clase de almacenamiento %d para %s símbolo `%s'" + +#: coffcode.h:5038 +msgid "warning: %B: local symbol `%s' has no section" +msgstr "aviso: %B: el símbolo local `%s' no tiene sección" + +#: coffcode.h:5181 +msgid "%B: illegal relocation type %d at address 0x%lx" +msgstr "%B: tipo de reubicación %d ilegal en la dirección 0x%lx" + +#: coffgen.c:1571 +msgid "%B: bad string table size %lu" +msgstr "%B: tamaño de tabla de cadenas %lu erróneo" + +#: cofflink.c:513 elflink.c:4307 +msgid "Warning: type of symbol `%s' changed from %d to %d in %B" +msgstr "Aviso: el tipo del símbolo `%s' cambió de %d a %d en %B" + +#: cofflink.c:2305 +msgid "%B: relocs in section `%A', but it has no contents" +msgstr "%B: reubicaciones en la sección `%A', pero no tiene contenido" + +#: cofflink.c:2636 coffswap.h:826 +#, c-format +msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" +msgstr "%s: %s: desbordamiento de reubicación: 0x%lx > 0xffff" + +#: cofflink.c:2645 coffswap.h:812 +#, c-format +msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" +msgstr "%s: aviso: %s: desbordamiento de número de línea: 0x%lx > 0xffff" + #: cpu-arm.c:189 cpu-arm.c:200 -msgid "ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale" -msgstr "ERROR: %B está compilado para el EP9312, mientras que %B está compilado para XScale" +msgid "error: %B is compiled for the EP9312, whereas %B is compiled for XScale" +msgstr "error: %B está compilado para el EP9312, mientras que %B está compilado para XScale" #: cpu-arm.c:332 #, c-format msgid "warning: unable to update contents of %s section in %s" msgstr "aviso: no se puede actualizar el contenido de la sección %s en %s" -#: dwarf2.c:481 -msgid "Dwarf Error: Can't find .debug_str section." -msgstr "Error de Dwarf: No se puede encontrar la sección .debug_str." - -#: dwarf2.c:499 +#: dwarf2.c:430 #, c-format -msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)." -msgstr "Error de Dwarf: El desplazamiento DW_FROM_strp (%lu) es más grande o igual que el tamaño de .debug_str (%lu)." +msgid "Dwarf Error: Can't find %s section." +msgstr "Error de Dwarf: No se puede encontrar la sección %s." -#: dwarf2.c:592 -msgid "Dwarf Error: Can't find .debug_abbrev section." -msgstr "Error de Dwarf: No se puede encontrar la sección .debug_abbrev." +#: dwarf2.c:457 +#, c-format +msgid "Dwarf Error: unable to decompress %s section." +msgstr "Error de Dwarf: no se puede descomprimir la sección %s." -#: dwarf2.c:607 +#: dwarf2.c:468 #, c-format -msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)." -msgstr "Error de Dwarf: El desplazamiento de abreviatura (%lu) es más grande o igual que el tamaño de .debug_abbrev (%lu)." +msgid "Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu)." +msgstr "Error de Dwarf: El desplazamiento (%lu) es mayor que o igual que el tamaño de %s (%lu)." -#: dwarf2.c:822 +#: dwarf2.c:865 #, c-format msgid "Dwarf Error: Invalid or unhandled FORM value: %u." -msgstr "Error de Dwarf: Valor de FORM inválido o no manejado: %u." +msgstr "Error de Dwarf: Valor de FORM sin manejar o inválido: %u." -#: dwarf2.c:1025 +#: dwarf2.c:1079 msgid "Dwarf Error: mangled line number section (bad file number)." -msgstr "Error de Dwarf: sección de números de línea revuelta (número erróneo de fichero)." +msgstr "Error de Dwarf: sección de números de línea revuelta (número de fichero erróneo)." -#: dwarf2.c:1137 -msgid "Dwarf Error: Can't find .debug_line section." -msgstr "Error de Dwarf: No se puede encontrar lan sección .debug_line." - -#: dwarf2.c:1154 -#, c-format -msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)." -msgstr "Error de Dwarf: El desplazamiento de línea (%lu) es más grande o igual que el tamaño de .debug_line (%lu)." - -#: dwarf2.c:1380 +#: dwarf2.c:1413 msgid "Dwarf Error: mangled line number section." msgstr "Error de Dwarf: sección de números de línea revuelta." -#: dwarf2.c:1568 -msgid "Dwarf Error: Can't find .debug_ranges section." -msgstr "Error de Dwarf: No se puede encontrar lan sección .debug_ranges." - -#: dwarf2.c:1731 dwarf2.c:1847 dwarf2.c:2119 +#: dwarf2.c:1760 dwarf2.c:1867 dwarf2.c:2139 #, c-format msgid "Dwarf Error: Could not find abbrev number %u." msgstr "Error de Dwarf: No se puede encontrar el número de abreviatura %u." -#: dwarf2.c:2080 +#: dwarf2.c:2100 #, c-format -msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information." -msgstr "Error de Dwarf: se encontró la versión de dwarf '%u', este lector solamente maneja información de la versión 2." +msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 and 3 information." +msgstr "Error de Dwarf: se encontró la versión de dwarf '%u', este lector solamente maneja información de las versiones 2 y 3." -#: dwarf2.c:2087 +#: dwarf2.c:2107 #, c-format msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'." msgstr "Error de Dwarf: se encontró el tamaño de dirección '%u', este lector no puede manejar tamaños más grandes que '%u'." -#: dwarf2.c:2110 +#: dwarf2.c:2130 #, c-format msgid "Dwarf Error: Bad abbrev number: %u." msgstr "Error de Dwarf: Número de abreviación erróneo: %u." -#: ecoff.c:1227 +#: ecoff.c:1238 #, c-format msgid "Unknown basic type %d" msgstr "Tipo básico %d desconocido" -#: ecoff.c:1484 +#: ecoff.c:1495 #, c-format msgid "" "\n" @@ -583,7 +578,7 @@ msgstr "" "\n" " Símbolo final+1: %ld" -#: ecoff.c:1491 ecoff.c:1494 +#: ecoff.c:1502 ecoff.c:1505 #, c-format msgid "" "\n" @@ -592,7 +587,7 @@ msgstr "" "\n" " Primer símbolo: %ld" -#: ecoff.c:1506 +#: ecoff.c:1517 #, c-format msgid "" "\n" @@ -601,7 +596,7 @@ msgstr "" "\n" " Símbolo final+1: %-7ld Tipo: %s" -#: ecoff.c:1513 +#: ecoff.c:1524 #, c-format msgid "" "\n" @@ -610,7 +605,7 @@ msgstr "" "\n" " Símbolo local: %ld" -#: ecoff.c:1521 +#: ecoff.c:1532 #, c-format msgid "" "\n" @@ -619,7 +614,7 @@ msgstr "" "\n" " struct; símbolo final+1: %ld" -#: ecoff.c:1526 +#: ecoff.c:1537 #, c-format msgid "" "\n" @@ -628,7 +623,7 @@ msgstr "" "\n" " union; símbolo final+1: %ld" -#: ecoff.c:1531 +#: ecoff.c:1542 #, c-format msgid "" "\n" @@ -637,7 +632,7 @@ msgstr "" "\n" " enum; símbolo final+1: %ld" -#: ecoff.c:1537 +#: ecoff.c:1548 #, c-format msgid "" "\n" @@ -646,447 +641,694 @@ msgstr "" "\n" " Tipo: %s" -#: elf32-arm.c:2524 +#: elf-attrs.c:567 +msgid "error: %B: Must be processed by '%s' toolchain" +msgstr "error: %B: Se debe procesar por la cadena de compilación '%s'" + +#: elf-attrs.c:575 +msgid "error: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'" +msgstr "error: %B: La etiqueta de objeto '%d, %s' es incompatible con la etiqueta '%d, %s'" + +#: elf-eh-frame.c:884 +msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n" +msgstr "%P: error en %B(%A); no se creará la tabla .eh_frame_hdr.\n" + +#: elf-eh-frame.c:1122 +msgid "%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n" +msgstr "%P: la codificación fde en %B(%A) previene la creación de la tabla .eh_frame_hdr.\n" + +#: elf-ifunc.c:179 +msgid "%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can not be used when making an executable; recompile with -fPIE and relink with -pie\n" +msgstr "%F%P: el símbolo STT_GNU_IFUNC dinámico `%s' con igualdad de puntero en `%B' no se puede usar al hacer un ejecutable; recompile con -fPIE y reenlace con -pie\n" + +#: elf-m10200.c:456 elf-m10300.c:1575 elf32-avr.c:1251 elf32-bfin.c:3200 +#: elf32-cr16.c:1517 elf32-cr16c.c:790 elf32-cris.c:2089 elf32-crx.c:933 +#: elf32-d10v.c:516 elf32-fr30.c:616 elf32-frv.c:4114 elf32-h8300.c:516 +#: elf32-i860.c:1218 elf32-ip2k.c:1499 elf32-iq2000.c:691 elf32-lm32.c:1171 +#: elf32-m32c.c:560 elf32-m32r.c:3102 elf32-m68hc1x.c:1136 elf32-mep.c:541 +#: elf32-microblaze.c:1226 elf32-moxie.c:291 elf32-msp430.c:493 elf32-mt.c:402 +#: elf32-openrisc.c:411 elf32-score.c:2752 elf32-score7.c:2591 +#: elf32-spu.c:5045 elf32-v850.c:1701 elf32-xstormy16.c:948 elf64-mmix.c:1533 +msgid "internal error: out of range error" +msgstr "error interno: error fuera de rango" + +#: elf-m10200.c:460 elf-m10300.c:1579 elf32-avr.c:1255 elf32-bfin.c:3204 +#: elf32-cr16.c:1521 elf32-cr16c.c:794 elf32-cris.c:2093 elf32-crx.c:937 +#: elf32-d10v.c:520 elf32-fr30.c:620 elf32-frv.c:4118 elf32-h8300.c:520 +#: elf32-i860.c:1222 elf32-iq2000.c:695 elf32-lm32.c:1175 elf32-m32c.c:564 +#: elf32-m32r.c:3106 elf32-m68hc1x.c:1140 elf32-mep.c:545 +#: elf32-microblaze.c:1230 elf32-moxie.c:295 elf32-msp430.c:497 +#: elf32-openrisc.c:415 elf32-score.c:2756 elf32-score7.c:2595 +#: elf32-spu.c:5049 elf32-v850.c:1705 elf32-xstormy16.c:952 elf64-mmix.c:1537 +#: elfxx-mips.c:9103 +msgid "internal error: unsupported relocation error" +msgstr "error interno: no se admite el error de reubicación" + +#: elf-m10200.c:464 elf32-cr16.c:1525 elf32-cr16c.c:798 elf32-crx.c:941 +#: elf32-d10v.c:524 elf32-h8300.c:524 elf32-lm32.c:1179 elf32-m32r.c:3110 +#: elf32-m68hc1x.c:1144 elf32-microblaze.c:1234 elf32-score.c:2760 +#: elf32-score7.c:2599 elf32-spu.c:5053 +msgid "internal error: dangerous error" +msgstr "error interno: error peligroso" + +#: elf-m10200.c:468 elf-m10300.c:1592 elf32-avr.c:1263 elf32-bfin.c:3212 +#: elf32-cr16.c:1529 elf32-cr16c.c:802 elf32-cris.c:2101 elf32-crx.c:945 +#: elf32-d10v.c:528 elf32-fr30.c:628 elf32-frv.c:4126 elf32-h8300.c:528 +#: elf32-i860.c:1230 elf32-ip2k.c:1514 elf32-iq2000.c:703 elf32-lm32.c:1183 +#: elf32-m32c.c:572 elf32-m32r.c:3114 elf32-m68hc1x.c:1148 elf32-mep.c:553 +#: elf32-microblaze.c:1238 elf32-moxie.c:303 elf32-msp430.c:505 elf32-mt.c:410 +#: elf32-openrisc.c:423 elf32-score.c:2769 elf32-score7.c:2603 +#: elf32-spu.c:5057 elf32-v850.c:1725 elf32-xstormy16.c:960 elf64-mmix.c:1545 +msgid "internal error: unknown error" +msgstr "error interno: error desconocido" + +#: elf-m10300.c:1512 elf32-arm.c:8963 elf32-i386.c:3984 elf32-m32r.c:2588 +#: elf32-m68k.c:4099 elf32-ppc.c:7906 elf32-s390.c:3015 elf32-sh.c:3429 +#: elf32-xtensa.c:3027 elf64-ppc.c:12063 elf64-s390.c:2974 elf64-sh64.c:1648 +#: elf64-x86-64.c:3657 elfxx-sparc.c:3317 +msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'" +msgstr "%B(%A+0x%lx): reubicación %s sin resolución contra el símbolo `%s'" + +#: elf-m10300.c:1584 +msgid "error: inappropriate relocation type for shared library (did you forget -fpic?)" +msgstr "error: tipo de reubicación inapropiada para la biblioteca compartida (¿olvidó -fpic?)" + +#: elf-m10300.c:1587 +msgid "internal error: suspicious relocation type used in shared library" +msgstr "error interno: se usó un tipo de reubicación sospechosa en la biblioteca compartida" + +#: elf-m10300.c:4385 elf32-arm.c:11346 elf32-cr16.c:2519 elf32-cris.c:3030 +#: elf32-hppa.c:1891 elf32-i370.c:506 elf32-i386.c:1975 elf32-lm32.c:1873 +#: elf32-m32r.c:1921 elf32-m68k.c:3188 elf32-ppc.c:4953 elf32-s390.c:1650 +#: elf32-sh.c:2574 elf32-vax.c:1052 elf64-ppc.c:6348 elf64-s390.c:1623 +#: elf64-sh64.c:3396 elf64-x86-64.c:1821 elfxx-sparc.c:1802 +#, c-format +msgid "dynamic variable `%s' is zero size" +msgstr "la variable dinámica `%s' es de tamaño cero" + +#: elf.c:329 +msgid "%B: invalid string offset %u >= %lu for section `%s'" +msgstr "%B: desplazamiento de cadena inválido %u >= %lu para la sección `%s'" + +#: elf.c:439 +msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section" +msgstr "%B el número de símbolo %lu hace referencia a la sección inexistente SHT_SYMTAB_SHNDX" + +#: elf.c:595 +msgid "%B: Corrupt size field in group section header: 0x%lx" +msgstr "%B: Campo de tamaño corrupto en el encabezado de la sección de grupo: 0x%lx" + +#: elf.c:631 +msgid "%B: invalid SHT_GROUP entry" +msgstr "%B: entrada SHT_GROUP inválida" + +#: elf.c:701 +msgid "%B: no group info for section %A" +msgstr "%B: no hay información de grupo para la sección %A" + +#: elf.c:730 elf.c:2960 elflink.c:9912 +msgid "%B: warning: sh_link not set for section `%A'" +msgstr "%B: aviso: no se estableció sh_link para la sección `%A'" + +#: elf.c:749 +msgid "%B: sh_link [%d] in section `%A' is incorrect" +msgstr "%B: sh_link [%d] en la sección `%A', es incorrecto" + +#: elf.c:784 +msgid "%B: unknown [%d] section `%s' in group [%s]" +msgstr "%B: sección [%d] desconocida `%s' en el grupo [%s]" + +#: elf.c:1104 +#, c-format +msgid "" +"\n" +"Program Header:\n" +msgstr "" +"\n" +"Encabezado del Programa:\n" + +#: elf.c:1146 +#, c-format +msgid "" +"\n" +"Dynamic Section:\n" +msgstr "" +"\n" +"Sección Dinámica:\n" + +#: elf.c:1282 +#, c-format +msgid "" +"\n" +"Version definitions:\n" +msgstr "" +"\n" +"Definiciones de versión:\n" + +#: elf.c:1307 +#, c-format +msgid "" +"\n" +"Version References:\n" +msgstr "" +"\n" +"Referencias de versión:\n" + +#: elf.c:1312 +#, c-format +msgid " required from %s:\n" +msgstr " se requere desde %s:\n" + +#: elf.c:1702 +msgid "%B: invalid link %lu for reloc section %s (index %u)" +msgstr "%B: enlace %lu inválido para la sección de reubicación %s (índice %u)" + +#: elf.c:1870 +msgid "%B: don't know how to handle allocated, application specific section `%s' [0x%8x]" +msgstr "%B: no se sabe cómo manejar la sección específica alojada de la aplicación `%s' [0x%8x]" + +#: elf.c:1882 +msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]" +msgstr "%B: no se sabe cómo manejar la sección específica de procesador `%s' [0x%8x]" + +#: elf.c:1893 +msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]" +msgstr "%B: no se sabe cómo manejar la sección específica de SO `%s' [0x%8x]" + +#: elf.c:1903 +msgid "%B: don't know how to handle section `%s' [0x%8x]" +msgstr "%B: no se sabe cómo manejar la sección `%s' [0x%8x]" + +#: elf.c:2500 +#, c-format +msgid "warning: section `%A' type changed to PROGBITS" +msgstr "aviso: el tipo de la sección `%A' cambió a PROGBITS" + +#: elf.c:2917 +msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'" +msgstr "%B: sh_link de la sección `%A' apunta a la sección descartada `%A' de `%B'" + +#: elf.c:2940 +msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'" +msgstr "%B: sh_link de la sección `%A' apunta a la sección eliminada `%A' de `%B'" + +#: elf.c:4311 +msgid "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section" +msgstr "%B: La primera sección en el segmento PT_DYNAMIC no es la sección .dynamic" + +#: elf.c:4338 +msgid "%B: Not enough room for program headers, try linking with -N" +msgstr "%B: No hay suficiente espacio para los encabezados del programa, pruebe enlazar con -N" + +#: elf.c:4420 +msgid "%B: section %A vma 0x%lx overlaps previous sections" +msgstr "%B: la sección %A vma 0x%lx traslapa las secciones anteriores" + +#: elf.c:4515 +msgid "%B: section `%A' can't be allocated in segment %d" +msgstr "%B: la sección `%A' no se puede asignar en el segmento %d" + +#: elf.c:4565 +msgid "%B: warning: allocated section `%s' not in segment" +msgstr "%B: aviso: la sección asignada `%s' no está en el segmento" + +#: elf.c:5065 +msgid "%B: symbol `%s' required but not present" +msgstr "%B: se requiere el símbolo `%s' pero no está presente" + +#: elf.c:5404 +msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n" +msgstr "%B: aviso: Se detectó un segmento cargable vacío, ¿ esto es intencional ?\n" + +#: elf.c:6370 +#, c-format +msgid "Unable to find equivalent output section for symbol '%s' from section '%s'" +msgstr "No se puede encontrar la sección de salida equivalente para el símbolo '%s' de la sección '%s'" + +#: elf.c:7356 +msgid "%B: unsupported relocation type %s" +msgstr "%B: no se admite el tipo de reubicación %s" + +#: elf32-arm.c:3149 +msgid "" +"%B(%s): warning: interworking not enabled.\n" +" first occurrence: %B: Thumb call to ARM" +msgstr "" +"%B(%s): aviso: no se activó la interoperabilidad.\n" +" primer suceso: %B: llamada Thumb a ARM" + +#: elf32-arm.c:3190 +msgid "" +"%B(%s): warning: interworking not enabled.\n" +" first occurrence: %B: ARM call to Thumb" +msgstr "" +"%B(%s): aviso: no se activó la interoperabilidad.\n" +" primer suceso: %B: llamada ARM a Thumb" + +#: elf32-arm.c:3387 elf32-arm.c:4692 +#, c-format +msgid "%s: cannot create stub entry %s" +msgstr "%s: no se puede crear la entrada de cabo %s" + +#: elf32-arm.c:4804 #, c-format msgid "unable to find THUMB glue '%s' for '%s'" msgstr "no se puede encontrar el pegamento THUMB '%s' para `%s'" -#: elf32-arm.c:2557 +#: elf32-arm.c:4838 #, c-format msgid "unable to find ARM glue '%s' for '%s'" msgstr "no se puede encontrar el pegamento ARM '%s' para `%s'" -#: elf32-arm.c:3127 +#: elf32-arm.c:5365 msgid "%B: BE8 images only valid in big-endian mode." msgstr "%B: las imágenes BE8 sólo son válidas en modo big-endian." #. Give a warning, but do as the user requests anyway. -#: elf32-arm.c:3331 +#: elf32-arm.c:5590 msgid "%B: warning: selected VFP11 erratum workaround is not necessary for target architecture" -msgstr "%B: aviso: no se necesita la alternativa para evita la errata del VFP11 seleccionado para la arquitectura objetivo" +msgstr "%B: aviso: no se necesita la alternativa para evitar la errata del VFP11 seleccionado para la arquitectura objetivo" -#: elf32-arm.c:3865 elf32-arm.c:3885 +#: elf32-arm.c:6130 elf32-arm.c:6150 msgid "%B: unable to find VFP11 veneer `%s'" msgstr "%B: no se puede encontrar la chapa de VFP11 `%s'" -#: elf32-arm.c:3930 +#: elf32-arm.c:6196 #, c-format msgid "Invalid TARGET2 relocation type '%s'." msgstr "Tipo de reubicación TARGET2 '%s' inválido." -#: elf32-arm.c:4071 +#: elf32-arm.c:6281 msgid "" "%B(%s): warning: interworking not enabled.\n" " first occurrence: %B: thumb call to arm" msgstr "" "%s(%s): aviso: no se activó la interoperabilidad.\n" -" primer suceso: %B: llamada thumb para arm" +" primer suceso: %B: llamada thumb a arm" -#: elf32-arm.c:4759 +#: elf32-arm.c:7003 msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'." msgstr "\\%B: Aviso: La instrucción Arm BLX apunta a la función Arm '%s'." -#: elf32-arm.c:5059 +#: elf32-arm.c:7405 msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'." msgstr "%B: Aviso: La instrucción Thumb BLX apunta a la función thumb '%s'." -#: elf32-arm.c:5689 +#: elf32-arm.c:8085 msgid "%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object" msgstr "%B(%A+0x%lx): la reubicación R_ARM_TLS_LE32 no se permite en objetos compartidos" -#: elf32-arm.c:5890 +#: elf32-arm.c:8300 msgid "%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations" -msgstr "%B(%A+0x%lx): Sólo se permiten las instrucciones ADD o SUB para la reubicación de grupo ALU" +msgstr "%B(%A+0x%lx): Sólo se permiten las instrucciones ADD o SUB en las reubicaciones de grupo ALU" -#: elf32-arm.c:5930 elf32-arm.c:6017 elf32-arm.c:6100 elf32-arm.c:6185 +#: elf32-arm.c:8340 elf32-arm.c:8427 elf32-arm.c:8510 elf32-arm.c:8595 msgid "%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s" msgstr "%B(%A+0x%lx): Desborde al dividirse 0x%lx para la reubicación de grupo %s" -#: elf32-arm.c:6369 elf32-sh.c:3304 elf64-sh64.c:1556 +#: elf32-arm.c:8821 elf32-sh.c:3325 elf64-sh64.c:1556 msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section" msgstr "%B(%A+0x%lx): reubicación %s contra la sección SEC_MERGE" -#: elf32-arm.c:6458 elf64-ppc.c:9973 +#: elf32-arm.c:8939 elf32-m68k.c:4134 elf32-xtensa.c:2765 elf64-ppc.c:10743 msgid "%B(%A+0x%lx): %s used with TLS symbol %s" msgstr "%B(%A+0x%lx): se usó %s con el símbolo TLS %s" -#: elf32-arm.c:6459 elf64-ppc.c:9974 +#: elf32-arm.c:8940 elf32-m68k.c:4135 elf32-xtensa.c:2766 elf64-ppc.c:10744 msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s" msgstr "%B(%A+0x%lx): se usó %s con el símbolo %s que no es TLS" -#: elf32-arm.c:6482 elf32-i386.c:3310 elf32-m32r.c:2598 elf32-m68k.c:1982 -#: elf32-ppc.c:6796 elf32-s390.c:3048 elf32-sh.c:3408 elf32-xtensa.c:2290 -#: elf64-ppc.c:11138 elf64-s390.c:3009 elf64-sh64.c:1648 elf64-x86-64.c:3002 -#: elf-hppa.h:2194 elf-m10300.c:1460 elfxx-sparc.c:3256 -msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'" -msgstr "%B(%A+0x%lx): reubicación %s sin resolución contra el símbolo `%s'" - -#: elf32-arm.c:6516 +#: elf32-arm.c:8997 msgid "out of range" msgstr "fuera de rango" -#: elf32-arm.c:6520 +#: elf32-arm.c:9001 msgid "unsupported relocation" msgstr "no se admite la reubicación" -#: elf32-arm.c:6528 +#: elf32-arm.c:9009 msgid "unknown error" msgstr "error desconocido" -#: elf32-arm.c:6628 +#: elf32-arm.c:9409 msgid "Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it" msgstr "Aviso: Se limpia la opción de interoperación en %B porque se ha enlazado con él código no interoperable en %B" -#: elf32-arm.c:6730 -msgid "ERROR: %B uses VFP register arguments, %B does not" -msgstr "ERROR: %B utiliza argumentos de registro VFP, mientras que %B no" +#: elf32-arm.c:9652 +msgid "error: %B: Unknown CPU architecture" +msgstr "error: %B: Arquitectura de CPU desconocida" + +#: elf32-arm.c:9690 +msgid "error: %B: Conflicting CPU architectures %d/%d" +msgstr "error: %B: Arquitecturas de CPU en conflicto %d/%d" -#: elf32-arm.c:6780 -msgid "ERROR: %B: Conflicting architecture profiles %c/%c" -msgstr "ERROR: %B: Perfiles de arquitecturas en conflicto %c/%c" +#: elf32-arm.c:9747 +msgid "error: %B uses VFP register arguments, %B does not" +msgstr "error: %B utiliza argumentos de registro VFP, mientras que %B no" -#: elf32-arm.c:6795 +#: elf32-arm.c:9897 +msgid "error: %B: Conflicting architecture profiles %c/%c" +msgstr "error: %B: Perfiles de arquitecturas en conflicto %c/%c" + +#: elf32-arm.c:9921 msgid "Warning: %B: Conflicting platform configuration" msgstr "Aviso: %B: Configuración de plataformas en conflicto" -#: elf32-arm.c:6804 -msgid "ERROR: %B: Conflicting use of R9" -msgstr "ERROR: %B: Uso en conflicto de R9" +#: elf32-arm.c:9930 +msgid "error: %B: Conflicting use of R9" +msgstr "error: %B: Uso en conflicto de R9" -#: elf32-arm.c:6816 -msgid "ERROR: %B: SB relative addressing conflicts with use of R9" -msgstr "ERROR: %B: El direccionamiento relativo a SB tiene conflictos con el uso de R9" +#: elf32-arm.c:9942 +msgid "error: %B: SB relative addressing conflicts with use of R9" +msgstr "error: %B: El direccionamiento relativo a SB tiene conflictos con el uso de R9" -#: elf32-arm.c:6838 -msgid "ERROR: %B: Conflicting definitions of wchar_t" -msgstr "ERROR: %B: Definiciones en conflicto de wchar_t" +#: elf32-arm.c:9955 +msgid "warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may fail" +msgstr "aviso: %B usa wchar_t de %u bytes aunque la salida usa wchar_t de %u bytes; el uso de valores wchar_t entre objetos puede fallar" -#: elf32-arm.c:6867 +#: elf32-arm.c:9986 msgid "warning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may fail" -msgstr "aviso: %B usa %s enums aunque la salida usa %s enums; el uso de valores enum entre objetos puede fallar" +msgstr "aviso: %B usa enums %s aunque la salida usa enums %s; el uso de valores enum entre objetos puede fallar" + +#: elf32-arm.c:9998 +msgid "error: %B uses iWMMXt register arguments, %B does not" +msgstr "error: %B utiliza argumentos de registro iWMMXt, mientras que %B no" -#: elf32-arm.c:6880 -msgid "ERROR: %B uses iWMMXt register arguments, %B does not" -msgstr "ERROR: %B utiliza argumentos de registro iWMMXt, mientras que %B no" +#: elf32-arm.c:10020 +msgid "error: fp16 format mismatch between %B and %B" +msgstr "error: no coincide el formato fp16 entre %B y %B" -#: elf32-arm.c:6920 +#: elf32-arm.c:10063 elf32-arm.c:10156 +msgid "%B: Unknown mandatory EABI object attribute %d" +msgstr "%B: Atributo de objeto EABI obligatorio %d desconocido" + +#: elf32-arm.c:10071 elf32-arm.c:10164 msgid "Warning: %B: Unknown EABI object attribute %d" msgstr "Aviso: %B: Atributo de objeto EABI %d desconocido" -#: elf32-arm.c:7045 -msgid "ERROR: Source object %B has EABI version %d, but target %B has EABI version %d" -msgstr "ERROR: El objeto fuente %B tiene EABI versión %d, pero el objetivo %B tiene EABI versión %d" +#: elf32-arm.c:10224 +msgid "error: %B is already in final BE8 format" +msgstr "error: %B ya está en el formato BE8 final" + +#: elf32-arm.c:10300 +msgid "error: Source object %B has EABI version %d, but target %B has EABI version %d" +msgstr "error: El objeto fuente %B tiene EABI versión %d, pero el objetivo %B tiene EABI versión %d" -#: elf32-arm.c:7061 -msgid "ERROR: %B is compiled for APCS-%d, whereas target %B uses APCS-%d" -msgstr "ERROR: %B está compilado para APCS-%d mientras que el objetivo %B usa APCS-%d" +#: elf32-arm.c:10316 +msgid "error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d" +msgstr "error: %B está compilado para APCS-%d mientras que el objetivo %B usa APCS-%d" -#: elf32-arm.c:7086 -msgid "ERROR: %B uses VFP instructions, whereas %B does not" -msgstr "ERROR: %B utiliza instrucciones VFP, mientras que %B no" +#: elf32-arm.c:10341 +msgid "error: %B uses VFP instructions, whereas %B does not" +msgstr "error: %B utiliza instrucciones VFP, mientras que %B no" -#: elf32-arm.c:7090 -msgid "ERROR: %B uses FPA instructions, whereas %B does not" -msgstr "ERROR: %B utiliza instrucciones FPA, mientras que %B no" +#: elf32-arm.c:10345 +msgid "error: %B uses FPA instructions, whereas %B does not" +msgstr "error: %B utiliza instrucciones FPA, mientras que %B no" -#: elf32-arm.c:7100 -msgid "ERROR: %B uses Maverick instructions, whereas %B does not" -msgstr "ERROR: %B utiliza instrucciones Maverick, mientras que %B no" +#: elf32-arm.c:10355 +msgid "error: %B uses Maverick instructions, whereas %B does not" +msgstr "error: %B utiliza instrucciones Maverick, mientras que %B no" -#: elf32-arm.c:7104 -msgid "ERROR: %B does not use Maverick instructions, whereas %B does" -msgstr "ERROR: %B no utiliza instrucciones Maverick, mientras que %B sí" +#: elf32-arm.c:10359 +msgid "error: %B does not use Maverick instructions, whereas %B does" +msgstr "error: %B no utiliza instrucciones Maverick, mientras que %B sí" -#: elf32-arm.c:7123 -msgid "ERROR: %B uses software FP, whereas %B uses hardware FP" -msgstr "ERROR: %B utiliza FP de software, mientras que %B utiliza FP de hardware" +#: elf32-arm.c:10378 +msgid "error: %B uses software FP, whereas %B uses hardware FP" +msgstr "error: %B utiliza FP de software, mientras que %B utiliza FP de hardware" -#: elf32-arm.c:7127 -msgid "ERROR: %B uses hardware FP, whereas %B uses software FP" -msgstr "ERROR: %B utiliza FP de hardware, mientras que %B utiliza FP de software" +#: elf32-arm.c:10382 +msgid "error: %B uses hardware FP, whereas %B uses software FP" +msgstr "error: %B utiliza FP de hardware, mientras que %B utiliza FP de software" #. Ignore init flag - it may not be set, despite the flags field #. containing valid data. #. Ignore init flag - it may not be set, despite the flags field containing valid data. -#: elf32-arm.c:7174 elf32-bfin.c:4795 elf32-cris.c:3234 elf32-m68hc1x.c:1277 -#: elf32-m68k.c:620 elf32-score.c:3753 elf32-vax.c:538 elfxx-mips.c:11331 +#: elf32-arm.c:10429 elf32-bfin.c:5082 elf32-cris.c:4110 elf32-m68hc1x.c:1280 +#: elf32-m68k.c:1169 elf32-score.c:4039 elf32-score7.c:3876 elf32-vax.c:540 +#: elfxx-mips.c:12755 #, c-format msgid "private flags = %lx:" msgstr "opciones privadas = %lx:" -#: elf32-arm.c:7183 +#: elf32-arm.c:10438 #, c-format msgid " [interworking enabled]" msgstr " [interoperabilidad activada]" -#: elf32-arm.c:7191 +#: elf32-arm.c:10446 #, c-format msgid " [VFP float format]" msgstr " [formato de coma flotante VFP]" -#: elf32-arm.c:7193 +#: elf32-arm.c:10448 #, c-format msgid " [Maverick float format]" msgstr " [formato de coma flotante Maverick]" -#: elf32-arm.c:7195 +#: elf32-arm.c:10450 #, c-format msgid " [FPA float format]" msgstr " [formato de coma flotante FPA]" -#: elf32-arm.c:7204 +#: elf32-arm.c:10459 #, c-format msgid " [new ABI]" msgstr " [ABI nuevo]" -#: elf32-arm.c:7207 +#: elf32-arm.c:10462 #, c-format msgid " [old ABI]" msgstr " [ABI antiguo]" -#: elf32-arm.c:7210 +#: elf32-arm.c:10465 #, c-format msgid " [software FP]" msgstr " [FP por software]" -#: elf32-arm.c:7219 +#: elf32-arm.c:10474 #, c-format msgid " [Version1 EABI]" msgstr " [EABI Version1]" -#: elf32-arm.c:7222 elf32-arm.c:7233 +#: elf32-arm.c:10477 elf32-arm.c:10488 #, c-format msgid " [sorted symbol table]" msgstr " [tabla de símbolos ordenados]" -#: elf32-arm.c:7224 elf32-arm.c:7235 +#: elf32-arm.c:10479 elf32-arm.c:10490 #, c-format msgid " [unsorted symbol table]" msgstr " [tabla de símbolos sin ordenar]" -#: elf32-arm.c:7230 +#: elf32-arm.c:10485 #, c-format msgid " [Version2 EABI]" msgstr " [EABI Version2]" -#: elf32-arm.c:7238 +#: elf32-arm.c:10493 #, c-format msgid " [dynamic symbols use segment index]" msgstr " [los símbolos dinámicos utilizan índices de segmento]" -#: elf32-arm.c:7241 +#: elf32-arm.c:10496 #, c-format msgid " [mapping symbols precede others]" msgstr " [el mapeo de símbolos precede a otros]" -#: elf32-arm.c:7248 +#: elf32-arm.c:10503 #, c-format msgid " [Version3 EABI]" msgstr " [EABI Version3]" -#: elf32-arm.c:7252 +#: elf32-arm.c:10507 #, c-format msgid " [Version4 EABI]" msgstr " [EABI Version4]" -#: elf32-arm.c:7256 +#: elf32-arm.c:10511 #, c-format msgid " [Version5 EABI]" msgstr " [EABI Version5]" -#: elf32-arm.c:7259 +#: elf32-arm.c:10514 #, c-format msgid " [BE8]" msgstr " [BE8]" -#: elf32-arm.c:7262 +#: elf32-arm.c:10517 #, c-format msgid " [LE8]" msgstr " [LE8]" -#: elf32-arm.c:7268 +#: elf32-arm.c:10523 #, c-format msgid " " -msgstr " " +msgstr " " -#: elf32-arm.c:7275 +#: elf32-arm.c:10530 #, c-format msgid " [relocatable executable]" msgstr " [ejecutable reubicable]" -#: elf32-arm.c:7278 +#: elf32-arm.c:10533 #, c-format msgid " [has entry point]" msgstr " [tiene punto de entrada]" -#: elf32-arm.c:7283 +#: elf32-arm.c:10538 #, c-format msgid "" -msgstr "" +msgstr "" -#: elf32-arm.c:7522 elf32-i386.c:961 elf32-s390.c:1003 elf32-xtensa.c:814 -#: elf64-s390.c:958 elf64-x86-64.c:773 elfxx-sparc.c:1115 +#: elf32-arm.c:10783 elf32-i386.c:1300 elf32-s390.c:998 elf32-xtensa.c:1000 +#: elf64-s390.c:952 elf64-x86-64.c:1082 elfxx-sparc.c:1121 msgid "%B: bad symbol index: %d" msgstr "%B: índice de símbolos erróneo: %d" -#: elf32-arm.c:8080 elf32-cris.c:2400 elf32-hppa.c:1906 elf32-i370.c:506 -#: elf32-i386.c:1522 elf32-m32r.c:1931 elf32-m68k.c:1331 elf32-ppc.c:4314 -#: elf32-s390.c:1679 elf32-sh.c:2584 elf32-vax.c:1050 elf64-ppc.c:5898 -#: elf64-s390.c:1654 elf64-sh64.c:3438 elf64-x86-64.c:1382 elf-m10300.c:4207 -#: elfxx-sparc.c:1797 -#, c-format -msgid "dynamic variable `%s' is zero size" -msgstr "la variable dinámica `%s' es de tamaño cero" +#: elf32-arm.c:10904 elf64-x86-64.c:1242 elf64-x86-64.c:1411 elfxx-mips.c:7870 +msgid "%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC" +msgstr "%B: no se puede usar la reubicación %s contra `%s' cuando se hace un objeto compartido; recompile con -fPIC" -#: elf32-arm.c:8603 +#: elf32-arm.c:11893 #, c-format msgid "Errors encountered processing file %s" msgstr "Se encontraron errores al procesar el fichero %s" -#: elf32-arm.c:9839 elf32-arm.c:9861 -msgid "%B: error: VFP11 veneer out of range" -msgstr "%B: error: la chapa VFP11 está fuera de rango" +#: elf32-arm.c:13339 +msgid "%B: error: Cortex-A8 erratum stub is allocated in unsafe location" +msgstr "%B: error: el cabo de errores Cortex-A8 se aloja en una ubicación insegura" -#: elf32-avr.c:1253 elf32-bfin.c:2795 elf32-cr16.c:887 elf32-cr16c.c:790 -#: elf32-cris.c:1538 elf32-crx.c:933 elf32-d10v.c:517 elf32-fr30.c:616 -#: elf32-frv.c:4129 elf32-h8300.c:516 elf32-i860.c:1218 elf32-ip2k.c:1499 -#: elf32-iq2000.c:647 elf32-m32c.c:560 elf32-m32r.c:3124 elf32-m68hc1x.c:1133 -#: elf32-mep.c:642 elf32-msp430.c:497 elf32-mt.c:402 elf32-openrisc.c:411 -#: elf32-score.c:2456 elf32-spu.c:2813 elf32-v850.c:1701 elf32-xstormy16.c:946 -#: elf64-mmix.c:1533 elf-m10200.c:456 elf-m10300.c:1523 -msgid "internal error: out of range error" -msgstr "error interno: error fuera de rango" +#. There's not much we can do apart from complain if this +#. happens. +#: elf32-arm.c:13366 +msgid "%B: error: Cortex-A8 erratum stub out of range (input file too large)" +msgstr "%B: error: el cabo de errores Cortex-A8 está fuera de rango (el fichero de entrada es demasiado grande)" -#: elf32-avr.c:1257 elf32-bfin.c:2799 elf32-cr16.c:891 elf32-cr16c.c:794 -#: elf32-cris.c:1542 elf32-crx.c:937 elf32-d10v.c:521 elf32-fr30.c:620 -#: elf32-frv.c:4133 elf32-h8300.c:520 elf32-i860.c:1222 elf32-iq2000.c:651 -#: elf32-m32c.c:564 elf32-m32r.c:3128 elf32-m68hc1x.c:1137 elf32-mep.c:646 -#: elf32-msp430.c:501 elf32-openrisc.c:415 elf32-score.c:2460 elf32-spu.c:2817 -#: elf32-v850.c:1705 elf32-xstormy16.c:950 elf64-mmix.c:1537 elf-m10200.c:460 -#: elf-m10300.c:1527 elfxx-mips.c:8025 -msgid "internal error: unsupported relocation error" -msgstr "error interno: error de reubicación no admitida" +#: elf32-arm.c:13457 elf32-arm.c:13479 +msgid "%B: error: VFP11 veneer out of range" +msgstr "%B: error: la chapa VFP11 está fuera de rango" -#: elf32-avr.c:1261 elf32-bfin.c:2803 elf32-cris.c:1546 elf32-fr30.c:624 -#: elf32-frv.c:4137 elf32-i860.c:1226 elf32-ip2k.c:1510 elf32-iq2000.c:655 -#: elf32-m32c.c:568 elf32-mep.c:650 elf32-msp430.c:505 elf32-mt.c:406 -#: elf32-openrisc.c:419 elf32-v850.c:1709 elf32-xstormy16.c:954 +#: elf32-avr.c:1259 elf32-bfin.c:3208 elf32-cris.c:2097 elf32-fr30.c:624 +#: elf32-frv.c:4122 elf32-i860.c:1226 elf32-ip2k.c:1510 elf32-iq2000.c:699 +#: elf32-m32c.c:568 elf32-mep.c:549 elf32-moxie.c:299 elf32-msp430.c:501 +#: elf32-mt.c:406 elf32-openrisc.c:419 elf32-v850.c:1709 elf32-xstormy16.c:956 #: elf64-mmix.c:1541 msgid "internal error: dangerous relocation" msgstr "error interno: reubicación peligrosa" -#: elf32-avr.c:1265 elf32-bfin.c:2807 elf32-cr16.c:899 elf32-cr16c.c:802 -#: elf32-cris.c:1550 elf32-crx.c:945 elf32-d10v.c:529 elf32-fr30.c:628 -#: elf32-frv.c:4141 elf32-h8300.c:528 elf32-i860.c:1230 elf32-ip2k.c:1514 -#: elf32-iq2000.c:659 elf32-m32c.c:572 elf32-m32r.c:3136 elf32-m68hc1x.c:1145 -#: elf32-mep.c:654 elf32-msp430.c:509 elf32-mt.c:410 elf32-openrisc.c:423 -#: elf32-score.c:2468 elf32-spu.c:2825 elf32-v850.c:1725 elf32-xstormy16.c:958 -#: elf64-mmix.c:1545 elf-m10200.c:468 elf-m10300.c:1540 -msgid "internal error: unknown error" -msgstr "error interno: error desconocido" - -#: elf32-avr.c:2369 elf32-hppa.c:595 elf32-m68hc1x.c:164 elf64-ppc.c:3802 +#: elf32-avr.c:2409 elf32-hppa.c:605 elf32-m68hc1x.c:165 elf64-ppc.c:4141 msgid "%B: cannot create stub entry %s" msgstr "%B: no se puede crear la entrada de cabo %s" -#: elf32-bfin.c:2274 +#: elf32-bfin.c:1581 +msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'" +msgstr "%B(%A+0x%lx): reubicación sin resolución contra el símbolo `%s'" + +#: elf32-bfin.c:1614 elf32-i386.c:4026 elf32-m68k.c:4176 elf32-s390.c:3067 +#: elf64-s390.c:3026 elf64-x86-64.c:3697 +msgid "%B(%A+0x%lx): reloc against `%s': error %d" +msgstr "%B(%A+0x%lx): reubicación contra `%s': error %d" + +#: elf32-bfin.c:2714 msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend" msgstr "%B: la reubicación en `%A+0x%x' referencía al símbolo `%s' con adición que no es cero" -#: elf32-bfin.c:2288 elf32-frv.c:2919 +#: elf32-bfin.c:2728 elf32-frv.c:2904 msgid "relocation references symbol not defined in the module" msgstr "la reubicación referencía un símbolo que no está definido en el módulo" -#: elf32-bfin.c:2385 +#: elf32-bfin.c:2825 msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend" msgstr "R_BFIN_FUNCDESC referencía un símbolo dinámico con adición que no es cero" -#: elf32-bfin.c:2424 elf32-bfin.c:2547 elf32-frv.c:3656 elf32-frv.c:3777 +#: elf32-bfin.c:2866 elf32-bfin.c:2989 elf32-frv.c:3641 elf32-frv.c:3762 msgid "cannot emit fixups in read-only section" msgstr "no se pueden emitir composturas en la sección de sólo lectura" -#: elf32-bfin.c:2452 elf32-bfin.c:2587 elf32-frv.c:3687 elf32-frv.c:3821 +#: elf32-bfin.c:2897 elf32-bfin.c:3027 elf32-frv.c:3672 elf32-frv.c:3806 +#: elf32-lm32.c:1104 msgid "cannot emit dynamic relocations in read-only section" -msgstr "no se pueden emitri reubicaciones dinámicas en la sección de sólo lectura" +msgstr "no se pueden emitir reubicaciones dinámicas en la sección de sólo lectura" -#: elf32-bfin.c:2505 +#: elf32-bfin.c:2947 msgid "R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend" msgstr "R_BFIN_FUNCDESC_VALUE referencía un símbolo dinámico con adición que no es cero" -#: elf32-bfin.c:2673 +#: elf32-bfin.c:3112 msgid "relocations between different segments are not supported" msgstr "no se admiten las reubicaciones entre segmentos diferentes" -#: elf32-bfin.c:2674 +#: elf32-bfin.c:3113 msgid "warning: relocation references a different segment" msgstr "aviso: la reubicación referencía un segmento diferente" -#: elf32-bfin.c:3083 -msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'" -msgstr "%B(%A+0x%lx): reubicación sin resolución contra el símbolo `%s'" - -#: elf32-bfin.c:3116 elf32-i386.c:3351 elf32-m68k.c:2023 elf32-s390.c:3100 -#: elf64-s390.c:3061 elf64-x86-64.c:3041 -msgid "%B(%A+0x%lx): reloc against `%s': error %d" -msgstr "%B(%A+0x%lx): reubicación contra `%s': error %d" - -#: elf32-bfin.c:4687 elf32-frv.c:6423 +#: elf32-bfin.c:4974 elf32-frv.c:6408 msgid "%B: unsupported relocation type %i" msgstr "%B: no se admite el tipo de reubicación %i" -#: elf32-bfin.c:4868 elf32-frv.c:6831 +#: elf32-bfin.c:5127 elf32-frv.c:6816 #, c-format msgid "%s: cannot link non-fdpic object file into fdpic executable" msgstr "%s: no se puede enlazar el fichero objeto que no es fdpic en un ejecutable fdpic" -#: elf32-bfin.c:4872 elf32-frv.c:6835 +#: elf32-bfin.c:5131 elf32-frv.c:6820 #, c-format msgid "%s: cannot link fdpic object file into non-fdpic executable" msgstr "%s: no se puede enlazar el fichero objeto fdpic en un ejecutable que no es fdpic" -#: elf32-cr16.c:895 elf32-cr16c.c:798 elf32-crx.c:941 elf32-d10v.c:525 -#: elf32-h8300.c:524 elf32-m32r.c:3132 elf32-m68hc1x.c:1141 elf32-score.c:2464 -#: elf32-spu.c:2821 elf-m10200.c:464 -msgid "internal error: dangerous error" -msgstr "error interno: error peligroso" - -#: elf32-cris.c:1060 +#: elf32-cris.c:1169 msgid "%B, section %A: unresolvable relocation %s against symbol `%s'" msgstr "%B, sección %A: reubicación %s sin resolución contra el símbolo `%s'" -#: elf32-cris.c:1129 +#: elf32-cris.c:1238 msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'" msgstr "%B, sección %A: No hay PLT ni GOT para la reubicación %s contra el símbolo `%s'" -#: elf32-cris.c:1131 +#: elf32-cris.c:1240 msgid "%B, section %A: No PLT for relocation %s against symbol `%s'" msgstr "%B, sección %A: No hay PLT para la reubicación %s contra el símbolo `%s'" -#: elf32-cris.c:1137 elf32-cris.c:1269 +#: elf32-cris.c:1246 elf32-cris.c:1379 elf32-cris.c:1641 elf32-cris.c:1730 +#: elf32-cris.c:1883 msgid "[whose name is lost]" -msgstr "[cuyo nombre se pierde]" +msgstr "[cuyo nombre está perdido]" -#: elf32-cris.c:1255 +#: elf32-cris.c:1365 msgid "%B, section %A: relocation %s with non-zero addend %d against local symbol" msgstr "%B, sección %A: reubicación %s con adición %d que no es cero contra el símbolo local" -#: elf32-cris.c:1263 +#: elf32-cris.c:1373 elf32-cris.c:1724 elf32-cris.c:1877 msgid "%B, section %A: relocation %s with non-zero addend %d against symbol `%s'" msgstr "%B, sección %A: reubicación %s con adición %d que no es cero contra el símbolo `%s'" -#: elf32-cris.c:1289 +#: elf32-cris.c:1399 msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'" msgstr "%B, sección %A: no se permite la reubicación %s para el símbolo global: `%s'" -#: elf32-cris.c:1305 +#: elf32-cris.c:1415 msgid "%B, section %A: relocation %s with no GOT created" msgstr "%B, sección %A: la reubicación %s sin GOT creado" -#: elf32-cris.c:1423 -msgid "%B: Internal inconsistency; no relocation section %s" -msgstr "%B: Inconsistencia interna; no se encuentra la sección de reubicación %s" +#. We shouldn't get here for GCC-emitted code. +#: elf32-cris.c:1632 +msgid "%B, section %A: relocation %s has an undefined reference to `%s', perhaps a declaration mixup?" +msgstr "%B, sección %A: la reubicación %s tiene una referencia sin definir a `%s', ¿tal vez una confusión en la declaración?" -#: elf32-cris.c:2511 +#: elf32-cris.c:2010 +msgid "%B, section %A: relocation %s is not allowed for symbol: `%s' which is defined outside the program, perhaps a declaration mixup?" +msgstr "%B, sección %A: no se permite la reubicación %s para el símbolo: `%s' el cual se define fuera del programa, ¿tal vez una confusión en la declaración?" + +#: elf32-cris.c:2063 +msgid "(too many global variables for -fpic: recompile with -fPIC)" +msgstr "(demasiadas variables globales para -fpic: recompile con -fPIC)" + +#: elf32-cris.c:2070 +msgid "(thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or -mno-small-tls)" +msgstr "(datos thread-local demasiado grandes para -fpic o -msmall-tls: recompile con -fPIC o -mno-small-tls)" + +#: elf32-cris.c:3204 msgid "" "%B, section %A:\n" " v10/v32 compatible object %s must not contain a PIC relocation" @@ -1094,7 +1336,15 @@ msgstr "" "%B, sección %A:\n" " el objeto %s compatible con v10/v32 no debe contener una reubicación PIC" -#: elf32-cris.c:2698 elf32-cris.c:2766 +#: elf32-cris.c:3309 +msgid "" +"%B, section %A:\n" +" relocation %s not valid in a shared object; typically an option mixup, recompile with -fPIC" +msgstr "" +"%B, sección %A:\n" +" la reubicación %s no es válida en un objeto compartido; es una confusión de opción típica, recompile con -fPIC" + +#: elf32-cris.c:3523 msgid "" "%B, section %A:\n" " relocation %s should not be used in a shared object; recompile with -fPIC" @@ -1102,129 +1352,137 @@ msgstr "" "%B, sección %A:\n" " la reubicación %s no se debe usar en un objeto compartido; recompile con -fPIC" -#: elf32-cris.c:3183 +#: elf32-cris.c:3940 +msgid "" +"%B, section `%A', to symbol `%s':\n" +" relocation %s should not be used in a shared object; recompile with -fPIC" +msgstr "" +"%B, sección `%A', para el símbolo `%s':\n" +" la reubicación %s no se debe usar en un objeto compartido; recompile con -fPIC" + +#: elf32-cris.c:4059 msgid "Unexpected machine number" msgstr "Número de máquina inesperado" -#: elf32-cris.c:3237 +#: elf32-cris.c:4113 #, c-format msgid " [symbols have a _ prefix]" msgstr " [los símbolos tiene un prefijo _]" -#: elf32-cris.c:3240 +#: elf32-cris.c:4116 #, c-format msgid " [v10 and v32]" msgstr " [v10 y v32]" -#: elf32-cris.c:3243 +#: elf32-cris.c:4119 #, c-format msgid " [v32]" msgstr " [v32]" -#: elf32-cris.c:3288 +#: elf32-cris.c:4164 msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols" -msgstr "%B: utiliza símbolos con prefijo _, pero escribe el fichero con símbolos sin prefijo" +msgstr "%B: se usan símbolos con prefijo _, pero se escribe el fichero con símbolos sin prefijo" -#: elf32-cris.c:3289 +#: elf32-cris.c:4165 msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols" -msgstr "%B: utiliza símbolos sin prefijo, pero escribe el fichero con símbolos con prefijo _" +msgstr "%B: se usan símbolos sin prefijo, pero se escribe el fichero con símbolos con prefijo _" -#: elf32-cris.c:3308 +#: elf32-cris.c:4184 msgid "%B contains CRIS v32 code, incompatible with previous objects" msgstr "%B contiene código CRIS v32, incompatible con objetos previos" -#: elf32-cris.c:3310 +#: elf32-cris.c:4186 msgid "%B contains non-CRIS-v32 code, incompatible with previous objects" msgstr "%B contiene código que no es CRIS v32, incompatible con objetos previos" -#: elf32-frv.c:1523 elf32-frv.c:1672 +#: elf32-frv.c:1507 elf32-frv.c:1656 msgid "relocation requires zero addend" msgstr "la reubicación requiere una adición cero" -#: elf32-frv.c:2906 +#: elf32-frv.c:2891 msgid "%B(%A+0x%x): relocation to `%s+%x' may have caused the error above" msgstr "%B(%A+0x%x): la reubicación a `%s+%x' tal vez causó el error anterior" -#: elf32-frv.c:2995 +#: elf32-frv.c:2980 msgid "R_FRV_GETTLSOFF not applied to a call instruction" msgstr "no se aplicó R_FRV_GETTLSOFF a una instrucción call" -#: elf32-frv.c:3037 +#: elf32-frv.c:3022 msgid "R_FRV_GOTTLSDESC12 not applied to an lddi instruction" msgstr "no se aplicó R_FRV_GOTTLSDESC12 a una instrucción lddi" -#: elf32-frv.c:3108 +#: elf32-frv.c:3093 msgid "R_FRV_GOTTLSDESCHI not applied to a sethi instruction" msgstr "no se aplicó R_FRV_GOTTLSDESCHI a una instrucción sethi" -#: elf32-frv.c:3145 +#: elf32-frv.c:3130 msgid "R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction" msgstr "no se aplicó R_FRV_GOTTLSDESCLO a una instrucción setlo o setlos" -#: elf32-frv.c:3193 +#: elf32-frv.c:3178 msgid "R_FRV_TLSDESC_RELAX not applied to an ldd instruction" msgstr "no se aplicó R_FRV_GOTTLSDESC_RELAX a una instrucción ldd" -#: elf32-frv.c:3277 +#: elf32-frv.c:3262 msgid "R_FRV_GETTLSOFF_RELAX not applied to a calll instruction" msgstr "no se aplicó R_FRV_GETTLSOFF_RELAX a una instrucción calll" -#: elf32-frv.c:3332 +#: elf32-frv.c:3317 msgid "R_FRV_GOTTLSOFF12 not applied to an ldi instruction" msgstr "no se aplicó R_FRV_GOTTLSOFF12 a una instrucción ldi" -#: elf32-frv.c:3362 +#: elf32-frv.c:3347 msgid "R_FRV_GOTTLSOFFHI not applied to a sethi instruction" msgstr "no se aplicó R_FRV_GOTTLSOFFHI a una instrucción sethi" -#: elf32-frv.c:3391 +#: elf32-frv.c:3376 msgid "R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction" msgstr "no se aplicó R_FRV_GOTTLSOFFLO a una instrucción setlo o setlos" -#: elf32-frv.c:3422 +#: elf32-frv.c:3407 msgid "R_FRV_TLSOFF_RELAX not applied to an ld instruction" msgstr "no se aplicó R_FRV_TLSOFF_RELAX a una instrucción ld" -#: elf32-frv.c:3467 +#: elf32-frv.c:3452 msgid "R_FRV_TLSMOFFHI not applied to a sethi instruction" msgstr "no se aplicó R_FRV_TLSMOFFHI a una instrucción sethi" -#: elf32-frv.c:3494 +#: elf32-frv.c:3479 msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction" msgstr "no se aplicó R_FRV_TLSMOFFLO a una instrucción setlo o setlos" -#: elf32-frv.c:3615 +#: elf32-frv.c:3600 msgid "R_FRV_FUNCDESC references dynamic symbol with nonzero addend" msgstr "R_FRV_FUNCDESC referencía un símbolo dinámico con adición que no es cero" -#: elf32-frv.c:3735 +#: elf32-frv.c:3720 msgid "R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend" msgstr "R_FRV_FUNCDESC_VALUE referencía un símbolo dinámico con adición que no es cero" -#: elf32-frv.c:3992 elf32-frv.c:4148 +#: elf32-frv.c:3977 elf32-frv.c:4133 msgid "%B(%A+0x%lx): reloc against `%s': %s" msgstr "%B(%A+0x%lx): reubicación contra `%s': %s" -#: elf32-frv.c:3994 elf32-frv.c:3998 +#: elf32-frv.c:3979 elf32-frv.c:3983 msgid "relocation references a different segment" msgstr "la reubicación referencía un segmento diferente" -#: elf32-frv.c:6745 +#: elf32-frv.c:6730 #, c-format msgid "%s: compiled with %s and linked with modules that use non-pic relocations" msgstr "%s: compilado con %s y enlazado con módulos que usan reubicaciones que no son pic" -#: elf32-frv.c:6798 elf32-iq2000.c:808 elf32-m32c.c:819 +#: elf32-frv.c:6783 elf32-iq2000.c:852 elf32-m32c.c:814 #, c-format msgid "%s: compiled with %s and linked with modules compiled with %s" msgstr "%s: compilado con %s y enlazado con módulos compilados con %s" -#: elf32-frv.c:6810 +#: elf32-frv.c:6795 #, c-format msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "%s: usa campos e_flags desconocidos (0x%lx) diferentes a aquéllos de los módulos previos (0x%lx)" -#: elf32-frv.c:6860 elf32-iq2000.c:845 elf32-m32c.c:855 elf32-mt.c:587 +#: elf32-frv.c:6845 elf32-iq2000.c:889 elf32-m32c.c:850 elf32-mt.c:583 #, c-format msgid "private flags = 0x%lx:" msgstr "opciones privadas = 0x%lx:" @@ -1233,55 +1491,73 @@ msgstr "opciones privadas = 0x%lx:" msgid "%B: Relocations in generic ELF (EM: %d)" msgstr "%B: Reubicaciones en ELF genérico (EM: %d)" -#: elf32-hppa.c:844 elf32-hppa.c:3577 +#: elf32-hppa.c:854 elf32-hppa.c:3570 msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections" msgstr "%B(%A+0x%lx): no se puede alcanzar %s, recompile con -ffuntion-sections" -#: elf32-hppa.c:1253 +#: elf32-hppa.c:1286 msgid "%B: relocation %s can not be used when making a shared object; recompile with -fPIC" msgstr "%B: no se puede usar la reubicación %s cuando se hace un objeto compartido; recompile con -fPIC" -#: elf32-hppa.c:1506 -#, c-format -msgid "Could not find relocation section for %s" -msgstr "No se puede encontrar la sección de reubicación para %s" - -#: elf32-hppa.c:2795 +#: elf32-hppa.c:2780 msgid "%B: duplicate export stub %s" msgstr "%B: cabo de exportación %s duplicado" -#: elf32-hppa.c:3413 +#: elf32-hppa.c:3406 msgid "%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link" msgstr "%B(%A+0x%lx): la compostura %s para la insn 0x%x no se admite en un enlazado que no es compartido" -#: elf32-hppa.c:4267 +#: elf32-hppa.c:4260 msgid "%B(%A+0x%lx): cannot handle %s for %s" msgstr "%B(%A+0x%lx): no se puede manejar %s para %s" -#: elf32-hppa.c:4574 +#: elf32-hppa.c:4567 msgid ".got section not immediately after .plt section" msgstr "la sección .got no está inmediatamente después de la sección .plt" -#: elf32-i386.c:364 elf32-ppc.c:1616 elf32-s390.c:379 elf64-ppc.c:2148 -#: elf64-s390.c:403 elf64-x86-64.c:221 +#: elf32-i386.c:371 elf32-ppc.c:1666 elf32-s390.c:379 elf64-ppc.c:2283 +#: elf64-s390.c:403 elf64-x86-64.c:234 msgid "%B: invalid relocation type %d" msgstr "%B: tipo de reubicación %d inválido" -#: elf32-i386.c:1085 elf32-s390.c:1185 elf32-sh.c:5063 elf64-s390.c:1149 -#: elfxx-sparc.c:1243 -msgid "%B: `%s' accessed both as normal and thread local symbol" -msgstr "%B: se accesó `%s' como un símbolo normal y un símbolo local de hilo" +#: elf32-i386.c:1246 elf64-x86-64.c:1029 +msgid "%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed" +msgstr "%B: falló la transición TLS de %s para %s contra `%s' en 0x%lx en la sección `%A'" -#: elf32-i386.c:1200 elf32-s390.c:1294 elf64-ppc.c:4864 elf64-s390.c:1261 -#: elf64-x86-64.c:1051 -msgid "%B: bad relocation section name `%s'" -msgstr "%B: nombre de sección de reubicación `%s' erróneo" +#: elf32-i386.c:1387 elf32-i386.c:2970 elf64-x86-64.c:1171 elf64-x86-64.c:2680 +msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s" +msgstr "%B: la reubicación %s contra el símbolo STT_GNU_IFUNC `%s' no es manejada por %s" -#: elf32-i386.c:2257 +#: elf32-i386.c:1548 elf32-s390.c:1180 elf32-sh.c:5065 elf32-xtensa.c:1173 +#: elf64-s390.c:1143 elfxx-sparc.c:1257 +msgid "%B: `%s' accessed both as normal and thread local symbol" +msgstr "%B: se accedió `%s' como un símbolo normal y un símbolo local de hilo" + +#: elf32-i386.c:2805 msgid "%B: unrecognized relocation (0x%x) in section `%A'" msgstr "%B: no se reconoce la dirección de reubicación (0x%lx) en la sección `%A'" -#: elf32-i386.c:2479 +#: elf32-i386.c:3219 elf64-x86-64.c:3081 +msgid "hidden symbol" +msgstr "símbolo oculto" + +#: elf32-i386.c:3222 elf64-x86-64.c:3084 +msgid "internal symbol" +msgstr "símbolo interno" + +#: elf32-i386.c:3225 elf64-x86-64.c:3087 +msgid "protected symbol" +msgstr "símbolo protegido" + +#: elf32-i386.c:3228 elf64-x86-64.c:3090 +msgid "symbol" +msgstr "símbolo" + +#: elf32-i386.c:3233 +msgid "%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object" +msgstr "%B: no se puede usar la reubicación R_386_GOTOFF contra %s indefinida `%s' cuando se hace un objeto compartido" + +#: elf32-i386.c:3243 msgid "%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object" msgstr "%B: no se puede usar la reubicación R_386_GOTOFF contra la función protegida `%s' cuando se hace un objeto compartido" @@ -1296,7 +1572,7 @@ msgstr "relajador ip2k: encabezado de tabla switch corrupto." #: elf32-ip2k.c:1316 #, c-format msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)." -msgstr "enlazador ip2k: instrucción de página faltante en 0x%08lx (dest = 0x%08lx)." +msgstr "enlazador ip2k: falta la instrucción de página en 0x%08lx (dest = 0x%08lx)." #: elf32-ip2k.c:1332 #, c-format @@ -1308,313 +1584,358 @@ msgstr "enlazador ip2k: instrucci msgid "unsupported relocation between data/insn address spaces" msgstr "no se admite la reubicación entre espacios de direcciones datos/insn" -#: elf32-iq2000.c:821 elf32-m32c.c:831 +#: elf32-iq2000.c:865 elf32-m32c.c:826 #, c-format msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "%s: usa campos de e_flags diferentes (0x%lx) que los módulos previos (0x%lx)" +#: elf32-lm32.c:698 +msgid "global pointer relative relocation when _gp not defined" +msgstr "reubicación relativa al puntero global cuando _gp no está definido" + +#: elf32-lm32.c:753 +msgid "global pointer relative address out of range" +msgstr "dirección relativa al puntero global fuera de rango" + +#: elf32-lm32.c:1058 +msgid "internal error: addend should be zero for R_LM32_16_GOT" +msgstr "error interno: addend debe ser cero para R_LM32_16_GOT" + #: elf32-m32r.c:1453 msgid "SDA relocation when _SDA_BASE_ not defined" msgstr "reubicación SDA cuando _SDA_BASE_ no está definido" -#: elf32-m32r.c:3061 +#: elf32-m32r.c:3039 msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)" msgstr "%B: El objetivo (%s) de una reubicación %s está en la sección errónea (%A)" -#: elf32-m32r.c:3589 +#: elf32-m32r.c:3567 msgid "%B: Instruction set mismatch with previous modules" -msgstr "%B: Conjunto de instrucciones no coincidente con módulos previos" +msgstr "%B: El conjunto de instrucciones no coincide con módulos previos" -#: elf32-m32r.c:3610 +#: elf32-m32r.c:3588 #, c-format msgid "private flags = %lx" msgstr "opciones privadas = %lx" -#: elf32-m32r.c:3615 +#: elf32-m32r.c:3593 #, c-format msgid ": m32r instructions" msgstr ": instrucciones m32r" -#: elf32-m32r.c:3616 +#: elf32-m32r.c:3594 #, c-format msgid ": m32rx instructions" msgstr ": instrucciones m32rx" -#: elf32-m32r.c:3617 +#: elf32-m32r.c:3595 #, c-format msgid ": m32r2 instructions" msgstr ": instrucciones m32r2" -#: elf32-m68hc1x.c:1045 +#: elf32-m68hc1x.c:1048 #, c-format msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution" msgstr "El referenciar al símbolo far `%s' usando una reubicación incorrecta puede resultar en una ejecución incorrecta" -#: elf32-m68hc1x.c:1068 +#: elf32-m68hc1x.c:1071 #, c-format msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)" msgstr "la dirección almacenada [%lx:%04lx] (%lx) no está en el mismo banco que la dirección almacenada actual [%lx:%04lx] (%lx)" -#: elf32-m68hc1x.c:1087 +#: elf32-m68hc1x.c:1090 #, c-format msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx" msgstr "referencia a una dirección almacenada [%lx:%04lx] en el espacio normal de direcciones en %04lx" -#: elf32-m68hc1x.c:1220 +#: elf32-m68hc1x.c:1223 msgid "%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers" msgstr "%B: se enlazan ficheros compilados con enteros de 16-bit (-mshort) y otros con enteros de 32-bit" -#: elf32-m68hc1x.c:1227 +#: elf32-m68hc1x.c:1230 msgid "%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double" msgstr "%B: se enlazan ficheros compilados con dobles de 32-bit (-fshort-double) y otros con dobles de 64-bit" -#: elf32-m68hc1x.c:1236 +#: elf32-m68hc1x.c:1239 msgid "%B: linking files compiled for HCS12 with others compiled for HC12" msgstr "%B: se enlazan ficheros compilados para HCS12, con otros compilados para HC12" -#: elf32-m68hc1x.c:1252 elf32-ppc.c:3734 elf64-sparc.c:697 elfxx-mips.c:11292 +#: elf32-m68hc1x.c:1255 elf32-ppc.c:4255 elf64-sparc.c:698 elfxx-mips.c:12617 msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "%B: usa campos de e_flags diferentes (0x%lx) que los módulos previos (0x%lx)" -#: elf32-m68hc1x.c:1280 +#: elf32-m68hc1x.c:1283 #, c-format msgid "[abi=32-bit int, " msgstr "[abi=int de 32-bit, " -#: elf32-m68hc1x.c:1282 +#: elf32-m68hc1x.c:1285 #, c-format msgid "[abi=16-bit int, " msgstr "[abi=int de 16-bit, " -#: elf32-m68hc1x.c:1285 +#: elf32-m68hc1x.c:1288 #, c-format msgid "64-bit double, " msgstr "doble de 64-bit, " -#: elf32-m68hc1x.c:1287 +#: elf32-m68hc1x.c:1290 #, c-format msgid "32-bit double, " msgstr "doble de 32-bit, " -#: elf32-m68hc1x.c:1290 +#: elf32-m68hc1x.c:1293 #, c-format msgid "cpu=HC11]" msgstr "cpu=HC11]" -#: elf32-m68hc1x.c:1292 +#: elf32-m68hc1x.c:1295 #, c-format msgid "cpu=HCS12]" msgstr "cpu=HCS12]" -#: elf32-m68hc1x.c:1294 +#: elf32-m68hc1x.c:1297 #, c-format msgid "cpu=HC12]" msgstr "cpu=HC12]" -#: elf32-m68hc1x.c:1297 +#: elf32-m68hc1x.c:1300 #, c-format msgid " [memory=bank-model]" msgstr " [memoria=modelo de bancos]" -#: elf32-m68hc1x.c:1299 +#: elf32-m68hc1x.c:1302 #, c-format msgid " [memory=flat]" msgstr " [memoria=plana]" -#: elf32-m68k.c:635 elf32-m68k.c:636 +#: elf32-m68k.c:1184 elf32-m68k.c:1185 msgid "unknown" msgstr "desconocido" +#: elf32-m68k.c:1645 +msgid "%B: GOT overflow: Number of relocations with 8-bit offset > %d" +msgstr "%B: desbordamiento de GOT: Número de reubicaciones con desplazamiento de 8-bit > %d" + +#: elf32-m68k.c:1651 +msgid "%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d" +msgstr "%B: desbordamiento de GOT: Número de reubicaciones con desplazamiento de 8 o 16-bit > %d" + +#: elf32-m68k.c:3902 +msgid "%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object" +msgstr "%B(%A+0x%lx): la reubicación R_68K_TLS_LE32 no se permite en objetos compartidos" + #: elf32-mcore.c:99 elf32-mcore.c:442 msgid "%B: Relocation %s (%d) is not currently supported.\n" -msgstr "%B: La reubicación %s (%d) actualmente no se admite.\n" +msgstr "%B: Actualmente no se admite la reubicación %s (%d).\n" #: elf32-mcore.c:428 msgid "%B: Unknown relocation type %d\n" msgstr "%B: Tipo de reubicación %d desconocido\n" -#: elf32-mep.c:812 +#: elf32-mep.c:654 msgid "%B and %B are for different cores" msgstr "%B y %B son para núcleos diferentes" -#: elf32-mep.c:829 +#: elf32-mep.c:671 msgid "%B and %B are for different configurations" msgstr "%B y %B son para configuraciones diferentes" -#: elf32-mep.c:867 +#: elf32-mep.c:708 #, c-format msgid "private flags = 0x%lx" msgstr "opciones privadas = 0x%lx" -#: elf32-mips.c:989 elf64-mips.c:1976 elfn32-mips.c:1808 +#: elf32-microblaze.c:737 +#, c-format +msgid "%s: unknown relocation type %d" +msgstr "%s: tipo de reubicación %d desconocido" + +#: elf32-microblaze.c:862 elf32-microblaze.c:907 +#, c-format +msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)" +msgstr "%s: El objetivo (%s) de una reubicación %s está en la sección errónea (%s)" + +#: elf32-microblaze.c:1150 elfxx-sparc.c:2957 +msgid "%B: probably compiled without -fPIC?" +msgstr "%B: ¿Compilado probablemente sin -fPIC?" + +#: elf32-microblaze.c:2086 elflink.c:12444 +msgid "%B: bad relocation section name `%s'" +msgstr "%B: nombre de sección de reubicación `%s' erróneo" + +#: elf32-mips.c:1045 elf64-mips.c:2083 elfn32-mips.c:1888 msgid "literal relocation occurs for an external symbol" msgstr "la reubicación literal sucede para un símbolo externo" -#: elf32-mips.c:1029 elf32-score.c:484 elf64-mips.c:2019 elfn32-mips.c:1849 +#: elf32-mips.c:1085 elf32-score.c:580 elf32-score7.c:480 elf64-mips.c:2126 +#: elfn32-mips.c:1929 msgid "32bits gp relative relocation occurs for an external symbol" -msgstr "la reubicación gp relativa de 32bits sucede para un símbolo externo" +msgstr "la reubicación relativa a gp de 32bits sucede para un símbolo externo" -#: elf32-ppc.c:1681 +#: elf32-ppc.c:1731 #, c-format msgid "generic linker can't handle %s" msgstr "el enlazador genérico no puede manejar %s" -#: elf32-ppc.c:2163 +#: elf32-ppc.c:2211 msgid "corrupt or empty %s section in %B" msgstr "sección %s corrupta o vacía en %B" -#: elf32-ppc.c:2170 +#: elf32-ppc.c:2218 msgid "unable to read in %s section from %B" msgstr "no se puede leer en la sección %s desde %B" -#: elf32-ppc.c:2176 +#: elf32-ppc.c:2224 msgid "corrupt %s section in %B" msgstr "sección %s corrupta en %B" -#: elf32-ppc.c:2219 +#: elf32-ppc.c:2267 msgid "warning: unable to set size of %s section in %B" msgstr "aviso: no se puede establecer el tamaño de la sección %s en %B" -#: elf32-ppc.c:2267 +#: elf32-ppc.c:2315 msgid "failed to allocate space for new APUinfo section." msgstr "no se puede reservar espacio para la nueva sección APUinfo." -#: elf32-ppc.c:2286 +#: elf32-ppc.c:2334 msgid "failed to compute new APUinfo section." msgstr "no se puede calcular la nueva sección APUinfo." -#: elf32-ppc.c:2289 +#: elf32-ppc.c:2337 msgid "failed to install new APUinfo section." msgstr "no se puede instalar la nueva sección APUinfo." -#: elf32-ppc.c:3022 +#: elf32-ppc.c:3364 msgid "%B: relocation %s cannot be used when making a shared object" msgstr "%B: no se puede usar la reubicación %s cuando se hace un objeto compartido" #. It does not make sense to have a procedure linkage #. table entry for a local symbol. -#: elf32-ppc.c:3292 +#: elf32-ppc.c:3723 msgid "%B(%A+0x%lx): %s reloc against local symbol" msgstr "%B(%A+0x%lx): reubicación %s contra un símbolo local" -#: elf32-ppc.c:3633 elf32-ppc.c:3637 elfxx-mips.c:11036 elfxx-mips.c:11055 -#: elfxx-mips.c:11070 +#: elf32-ppc.c:4067 elf32-ppc.c:4082 elfxx-mips.c:12324 elfxx-mips.c:12350 +#: elfxx-mips.c:12372 elfxx-mips.c:12398 msgid "Warning: %B uses hard float, %B uses soft float" msgstr "Aviso: %B usa coma flotante hard, %B usa coma flotante soft" -#: elf32-ppc.c:3640 elf32-ppc.c:3644 elfxx-mips.c:11017 elfxx-mips.c:11021 +#: elf32-ppc.c:4070 elf32-ppc.c:4074 +msgid "Warning: %B uses double-precision hard float, %B uses single-precision hard float" +msgstr "Aviso: %B usa coma flotante hard de doble precisión, %B usa coma flotante hard de precisión simple" + +#: elf32-ppc.c:4078 +msgid "Warning: %B uses soft float, %B uses single-precision hard float" +msgstr "Aviso: %B usa coma flotante soft, %B usa coma flotante hard de precisión simple" + +#: elf32-ppc.c:4085 elf32-ppc.c:4089 elfxx-mips.c:12304 elfxx-mips.c:12308 msgid "Warning: %B uses unknown floating point ABI %d" msgstr "Aviso: %B usa la ABI de coma flotante desconocida %d" -#: elf32-ppc.c:3699 +#: elf32-ppc.c:4131 elf32-ppc.c:4135 +msgid "Warning: %B uses unknown vector ABI %d" +msgstr "Aviso: %B usa la ABI de vector desconocida %d" + +#: elf32-ppc.c:4139 +msgid "Warning: %B uses vector ABI \"%s\", %B uses \"%s\"" +msgstr "Aviso: %B usa la ABI de vector \"%s\", %B usa \"%s\"" + +#: elf32-ppc.c:4156 elf32-ppc.c:4159 +msgid "Warning: %B uses r3/r4 for small structure returns, %B uses memory" +msgstr "Aviso: %B usa r3/r4 para devoluciones de estructura small, %B usa memoria" + +#: elf32-ppc.c:4162 elf32-ppc.c:4166 +msgid "Warning: %B uses unknown small structure return convention %d" +msgstr "Aviso: %B usa la convención de devolución de estructura small %d" + +#: elf32-ppc.c:4220 msgid "%B: compiled with -mrelocatable and linked with modules compiled normally" msgstr "%B: compilado con -mrelocatable y enlazado con módulos compilados de forma normal" -#: elf32-ppc.c:3707 +#: elf32-ppc.c:4228 msgid "%B: compiled normally and linked with modules compiled with -mrelocatable" msgstr "%B: compilado de forma normal y enlazado con módulos compilados con -mrelocatable" -#: elf32-ppc.c:3793 +#: elf32-ppc.c:4314 msgid "Using bss-plt due to %B" msgstr "Se usa bss-plt debido a %B" -#: elf32-ppc.c:6002 elf64-ppc.c:10490 +#: elf32-ppc.c:7056 elf64-ppc.c:11364 msgid "%B: unknown relocation type %d for symbol %s" msgstr "%B: tipo de reubicación %d desconocido para el símbolo %s" -#: elf32-ppc.c:6252 +#: elf32-ppc.c:7316 msgid "%B(%A+0x%lx): non-zero addend on %s reloc against `%s'" msgstr "%B(%A+0x%lx): adición que no es cero en la reubicación %s contra `%s'" -#: elf32-ppc.c:6597 elf32-ppc.c:6623 elf32-ppc.c:6682 +#: elf32-ppc.c:7499 elf64-ppc.c:11854 +msgid "%B(%A+0x%lx): relocation %s for indirect function %s unsupported" +msgstr "%B(%A+0x%lx): no se admite la reubicación %s para la función indirecta %s" + +#: elf32-ppc.c:7709 elf32-ppc.c:7736 elf32-ppc.c:7787 msgid "%B: the target (%s) of a %s relocation is in the wrong output section (%s)" msgstr "%B: el objetivo (%s) de una reubicación %s está en la sección de salida errónea (%s)" -#: elf32-ppc.c:6737 +#: elf32-ppc.c:7847 msgid "%B: relocation %s is not yet supported for symbol %s." msgstr "%B: la reubicación %s aún no se admite para el símbolo %s." -#: elf32-ppc.c:6845 elf64-ppc.c:11185 +#: elf32-ppc.c:7955 elf64-ppc.c:12110 msgid "%B(%A+0x%lx): %s reloc against `%s': error %d" msgstr "%B(%A+0x%lx): reubicación %s contra `%s': error %d" -#: elf32-s390.c:2238 elf64-s390.c:2212 +#: elf32-ppc.c:8423 +#, c-format +msgid "%s not defined in linker created %s" +msgstr "no se definió %s en el %s creado por el enlazador" + +#: elf32-s390.c:2207 elf64-s390.c:2179 msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s" msgstr "%B(%A+0x%lx): instrucción inválida para la reubicación TLS %s" -#: elf32-score.c:1418 elfxx-mips.c:2699 +#: elf32-score.c:1533 elf32-score7.c:1424 elfxx-mips.c:3299 msgid "not enough GOT space for local GOT entries" msgstr "no hay suficiente espacio GOT para entradas GOT locales" -#: elf32-score.c:2550 +#: elf32-score.c:2765 +msgid "address not word align" +msgstr "la dirección no está alineada a word" + +#: elf32-score.c:2850 elf32-score7.c:2685 #, c-format msgid "%s: Malformed reloc detected for section %s" msgstr "%s: Se detectó una reubicación malformada para la sección %s" -#: elf32-score.c:2601 +#: elf32-score.c:2901 elf32-score7.c:2736 msgid "%B: CALL15 reloc at 0x%lx not against global symbol" msgstr "%B: la reubicación CALL15 en 0x%lx no es contra un símbolo global" -#: elf32-score.c:3756 +#: elf32-score.c:4042 elf32-score7.c:3879 #, c-format msgid " [pic]" msgstr " [pic]" -#: elf32-score.c:3760 +#: elf32-score.c:4046 elf32-score7.c:3883 #, c-format msgid " [fix dep]" msgstr " [fix dep]" -#: elf32-score.c:3802 elfxx-mips.c:11201 +#: elf32-score.c:4088 elf32-score7.c:3925 msgid "%B: warning: linking PIC files with non-PIC files" msgstr "%B: aviso: se enlazan ficheros PIC con ficheros que no son PIC" -#: elf32-sh64.c:222 elf64-sh64.c:2350 -#, c-format -msgid "%s: compiled as 32-bit object and %s is 64-bit" -msgstr "%s: compilado como un objeto de 32-bit y %s es de 64-bit" - -#: elf32-sh64.c:225 elf64-sh64.c:2353 -#, c-format -msgid "%s: compiled as 64-bit object and %s is 32-bit" -msgstr "%s: compilado como un objeto de 64-bit y %s es de 32-bit" - -#: elf32-sh64.c:227 elf64-sh64.c:2355 -#, c-format -msgid "%s: object size does not match that of target %s" -msgstr "%s: el tamaño del objeto no coincide con el tamaño del objetivo %s" - -#: elf32-sh64.c:450 elf64-sh64.c:2894 -#, c-format -msgid "%s: encountered datalabel symbol in input" -msgstr "%s: se encontró un símbolo datalabel en la entrada" - -#: elf32-sh64.c:527 -msgid "PTB mismatch: a SHmedia address (bit 0 == 1)" -msgstr "No coincide PTB: una dirección SHmedia (bit 0 == 1)" - -#: elf32-sh64.c:530 -msgid "PTA mismatch: a SHcompact address (bit 0 == 0)" -msgstr "No coincide PTA: una dirección SHcompact (bit 0 == 0)" - -#: elf32-sh64.c:548 -#, c-format -msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16" -msgstr "%s: error de GAS: instrucción PTB inesperada con R_SH_PT_16" - -#: elf32-sh64.c:597 -msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n" -msgstr "%B: error: tipo de reubicación %d sin alinear en %08x reubicación %p\n" +#: elf32-sh-symbian.c:130 +msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS" +msgstr "%B: la directiva IMPORT AS para %s oculta un IMPORT AS previo" -#: elf32-sh64.c:673 -#, c-format -msgid "%s: could not write out added .cranges entries" -msgstr "%s: no se pueden escribir las entradas .cranges agregadas" +#: elf32-sh-symbian.c:383 +msgid "%B: Unrecognised .directive command: %s" +msgstr "%B: No se reconoce la orden .directive: %s" -#: elf32-sh64.c:733 -#, c-format -msgid "%s: could not write out sorted .cranges entries" -msgstr "%s: no se pueden escribir las entradas .cranges ordenadas" +#: elf32-sh-symbian.c:503 +msgid "%B: Failed to add renamed symbol %s" +msgstr "%B: Falló al agregar el símbolo renombrado %s" #: elf32-sh.c:533 msgid "%B: 0x%lx: warning: bad R_SH_USES offset" @@ -1648,41 +1969,76 @@ msgstr "%B: 0x%lx: aviso: cuenta err msgid "%B: 0x%lx: fatal: reloc overflow while relaxing" msgstr "%B: 0x%lx: fatal: desbordamiento de reubicación durante la relajación" -#: elf32-sh.c:3249 elf64-sh64.c:1526 +#: elf32-sh.c:3270 elf64-sh64.c:1526 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled" msgstr "No se maneja un STO_SH5_ISA32 inesperado en un símbolo local" -#: elf32-sh.c:3486 +#: elf32-sh.c:3507 msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation" msgstr "%B: 0x%lx: fatal: objetivo de ramificación sin alineación para la reubicación de soporte de relajamiento" -#: elf32-sh.c:3519 elf32-sh.c:3534 +#: elf32-sh.c:3540 elf32-sh.c:3555 msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx" msgstr "%B: 0x%lx: fatal: reubicación %s sin alineación 0x%lx" -#: elf32-sh.c:3548 +#: elf32-sh.c:3569 msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32" msgstr "%B: 0x%lx: fatal: la reubicación R_SH_PSHA %d no está en el rango -32..32" -#: elf32-sh.c:3562 +#: elf32-sh.c:3583 msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32" msgstr "%B: 0x%lx: fatal: la reubicación R_SH_PSHL %d no está en el rango -32..32" -#: elf32-sh.c:5275 elf64-alpha.c:4533 +#: elf32-sh.c:5256 elf64-alpha.c:4525 msgid "%B: TLS local exec code cannot be linked into shared objects" msgstr "%B: el código de ejecución local TLS no se puede enlazar en objetos compartidos" -#: elf32-sh-symbian.c:130 -msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS" -msgstr "%B: la directiva IMPORT AS para %s oculta un IMPORT AS previo" +#: elf32-sh64.c:222 elf64-sh64.c:2333 +#, c-format +msgid "%s: compiled as 32-bit object and %s is 64-bit" +msgstr "%s: compilado como un objeto de 32-bit y %s es de 64-bit" -#: elf32-sh-symbian.c:383 -msgid "%B: Unrecognised .directive command: %s" -msgstr "%B: Orden .directive no reconocida: %s" +#: elf32-sh64.c:225 elf64-sh64.c:2336 +#, c-format +msgid "%s: compiled as 64-bit object and %s is 32-bit" +msgstr "%s: compilado como un objeto de 64-bit y %s es de 32-bit" -#: elf32-sh-symbian.c:504 -msgid "%B: Failed to add renamed symbol %s" -msgstr "%B: Falló al agregar el símbolo renombrado %s" +#: elf32-sh64.c:227 elf64-sh64.c:2338 +#, c-format +msgid "%s: object size does not match that of target %s" +msgstr "%s: el tamaño del objeto no coincide con el tamaño del objetivo %s" + +#: elf32-sh64.c:450 elf64-sh64.c:2852 +#, c-format +msgid "%s: encountered datalabel symbol in input" +msgstr "%s: se encontró un símbolo datalabel en la entrada" + +#: elf32-sh64.c:527 +msgid "PTB mismatch: a SHmedia address (bit 0 == 1)" +msgstr "No coincide PTB: una dirección SHmedia (bit 0 == 1)" + +#: elf32-sh64.c:530 +msgid "PTA mismatch: a SHcompact address (bit 0 == 0)" +msgstr "No coincide PTA: una dirección SHcompact (bit 0 == 0)" + +#: elf32-sh64.c:548 +#, c-format +msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16" +msgstr "%s: error de GAS: insn PTB inesperada con R_SH_PT_16" + +#: elf32-sh64.c:597 +msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n" +msgstr "%B: error: tipo de reubicación %d sin alinear en %08x reubicación %p\n" + +#: elf32-sh64.c:673 +#, c-format +msgid "%s: could not write out added .cranges entries" +msgstr "%s: no se pueden escribir las entradas .cranges agregadas" + +#: elf32-sh64.c:733 +#, c-format +msgid "%s: could not write out sorted .cranges entries" +msgstr "%s: no se pueden escribir las entradas .cranges ordenadas" #: elf32-sparc.c:89 msgid "%B: compiled for a 64 bit system and target is 32 bit" @@ -1692,69 +2048,119 @@ msgstr "%B: compilado para un sistema de 64 bit y el objetivo es de 32 bit" msgid "%B: linking little endian files with big endian files" msgstr "%B: se enlazan ficheros little endian con ficheros big endian" -#: elf32-spu.c:995 +#: elf32-spu.c:723 +msgid "%X%P: overlay section %A does not start on a cache line.\n" +msgstr "%X%P: la sección de sobreescritura %A no inicia en una línea de caché.\n" + +#: elf32-spu.c:731 +msgid "%X%P: overlay section %A is larger than a cache line.\n" +msgstr "%X%P: la sección de sobreescritura %A es más grande que una línea de caché.\n" + +#: elf32-spu.c:751 +msgid "%X%P: overlay section %A is not in cache area.\n" +msgstr "%X%P: la sección de sobreescritura %A no está en el área de caché.\n" + +#: elf32-spu.c:791 +msgid "%X%P: overlay sections %A and %A do not start at the same address.\n" +msgstr "%X%P: las secciones de sobreescritura %A y %A no inician en la misma dirección.\n" + +#: elf32-spu.c:1015 msgid "warning: call to non-function symbol %s defined in %B" msgstr "aviso: se llama al símbolo %s que no es función, definido en %B" -#: elf32-spu.c:1315 +#: elf32-spu.c:1365 +msgid "%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)\n" +msgstr "%A:0x%v lrlive .brinfo (%u) difiere del análisis (%u)\n" + +#: elf32-spu.c:1884 msgid "%B is not allowed to define %s" -msgstr "%B no se permite para definir %s" +msgstr "%B no tiene permitido definir %s" + +#: elf32-spu.c:1892 +#, c-format +msgid "you are not allowed to define %s in a script" +msgstr "no se le permite definir %s en un guión" -#: elf32-spu.c:1352 +#: elf32-spu.c:1926 #, c-format msgid "%s in overlay section" msgstr "%s en la sección de sobreescritura" -#: elf32-spu.c:1363 +#: elf32-spu.c:1955 msgid "overlay stub relocation overflow" -msgstr "desbordamiento del segmento de reubicación de sobreescritura" +msgstr "desbordamiento de la reubicación de cabo de sobreescritura" + +#: elf32-spu.c:1964 elf64-ppc.c:10441 +msgid "stubs don't match calculated size" +msgstr "los cabos no coinciden con el tamaño calculado" -#: elf32-spu.c:1820 +#: elf32-spu.c:2546 #, c-format msgid "warning: %s overlaps %s\n" msgstr "aviso: %s sobreescribe %s\n" -#: elf32-spu.c:1836 +#: elf32-spu.c:2562 #, c-format msgid "warning: %s exceeds section size\n" msgstr "aviso: %s excede el tamaño de la sección\n" -#: elf32-spu.c:1867 +#: elf32-spu.c:2593 msgid "%A:0x%v not found in function table\n" msgstr "%A:0x%v no se encuentra en la tabla de función\n" -#: elf32-spu.c:1958 -msgid "%B(%A+0x%v): call to non-code section %B(%A), stack analysis incomplete\n" -msgstr "%B(%A+0x%v): se llama a la sección %B(%A) que no es de código, análisis de pila incompleto\n" - -#: elf32-spu.c:2079 -#, c-format -msgid "%A link_order not found\n" -msgstr "no se encontró link_order %A\n" +#: elf32-spu.c:2740 +msgid "%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete\n" +msgstr "%B(%A+0x%v): se llama a la sección %B(%A) que no es de código, análisis incompleto\n" -#: elf32-spu.c:2358 +#: elf32-spu.c:3297 #, c-format msgid "Stack analysis will ignore the call from %s to %s\n" msgstr "El análisis de pila descartará la llamada de %s a %s\n" -#: elf32-spu.c:2513 +#: elf32-spu.c:3988 +msgid " %s: 0x%v\n" +msgstr " %s: 0x%v\n" + +#: elf32-spu.c:3989 msgid "%s: 0x%v 0x%v\n" msgstr "%s: 0x%v 0x%v\n" -#: elf32-spu.c:2517 +#: elf32-spu.c:3994 msgid " calls:\n" msgstr " llama:\n" -#: elf32-spu.c:2524 +#: elf32-spu.c:4002 #, c-format msgid " %s%s %s\n" msgstr " %s%s %s\n" -#: elf32-spu.c:2585 +#: elf32-spu.c:4304 +#, c-format +msgid "%s duplicated in %s\n" +msgstr "%s duplicado en %s\n" + +#: elf32-spu.c:4308 +#, c-format +msgid "%s duplicated\n" +msgstr "%s duplicado\n" + +#: elf32-spu.c:4315 +msgid "sorry, no support for duplicate object files in auto-overlay script\n" +msgstr "perdón, no se admiten ficheros objeto duplicados en el guión de sobreescritura automática\n" + +#: elf32-spu.c:4356 +msgid "non-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local store\n" +msgstr "eltamaño 0x%v que no es de sobreescritura mas el tamaño de sobreescritura máximo de 0x%v excede el almacenamiento local\n" + +#: elf32-spu.c:4512 +msgid "%B:%A%s exceeds overlay size\n" +msgstr "%B:%A%s excede el tamaño de sobreescritura\n" + +#: elf32-spu.c:4669 msgid "Stack size for call graph root nodes.\n" msgstr "Tamaño de la pila para los nodos raíz del grafo de llamadas.\n" -#: elf32-spu.c:2586 +#: elf32-spu.c:4670 msgid "" "\n" "Stack size for functions. Annotations: '*' max stack, 't' tail call\n" @@ -1762,15 +2168,15 @@ msgstr "" "\n" "Tamaño de la pila para funciones. Anotaciones: '*' max de pila, 't' llamada cola\n" -#: elf32-spu.c:2615 -msgid " %s: 0x%v\n" -msgstr " %s: 0x%v\n" - -#: elf32-spu.c:2625 +#: elf32-spu.c:4680 msgid "Maximum stack required is 0x%v\n" msgstr "La pila máxima requerida es 0x%v\n" -#: elf32-spu.c:2751 +#: elf32-spu.c:4771 +msgid "fatal error while creating .fixup" +msgstr "error fatal al crear .fixup" + +#: elf32-spu.c:5009 msgid "%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'" msgstr "%B(%s+0x%lx): reubicación %s sin resolución contra el símbolo `%s'" @@ -1782,12 +2188,12 @@ msgstr "La variable `%s' no puede ocupar m #: elf32-v850.c:166 #, c-format msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions" -msgstr "La variable `%s' solamente puede estar en una de las regiones de datos small, cero, y tiny" +msgstr "La variable `%s' solamente puede estar en una de las regiones de datos small, zero, y tiny" #: elf32-v850.c:169 #, c-format msgid "Variable `%s' cannot be in both small and zero data regions simultaneously" -msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos small y cero" +msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos small y zero" #: elf32-v850.c:172 #, c-format @@ -1797,7 +2203,7 @@ msgstr "La variable `%s' no puede estar simult #: elf32-v850.c:175 #, c-format msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously" -msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos cero y tiny" +msgstr "La variable `%s' no puede estar simultáneamente en las regiones de datos zero y tiny" #: elf32-v850.c:478 #, c-format @@ -1840,138 +2246,146 @@ msgstr "arquitectura v850e" msgid "v850e1 architecture" msgstr "arquitectura v850e1" -#: elf32-vax.c:541 +#: elf32-vax.c:543 #, c-format msgid " [nonpic]" msgstr " [no pic]" -#: elf32-vax.c:544 +#: elf32-vax.c:546 #, c-format msgid " [d-float]" msgstr " [flotante-d]" -#: elf32-vax.c:547 +#: elf32-vax.c:549 #, c-format msgid " [g-float]" msgstr " [flotante-g]" -#: elf32-vax.c:657 +#: elf32-vax.c:666 #, c-format msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld" msgstr "%s: aviso: la adición GOT de %ld a `%s' no coincide con la adición previa GOT de %ld" -#: elf32-vax.c:1584 +#: elf32-vax.c:1608 #, c-format msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored" msgstr "%s: aviso: se descarta la adición PLT de %d a `%s' de la sección %s" -#: elf32-vax.c:1721 +#: elf32-vax.c:1735 #, c-format msgid "%s: warning: %s relocation against symbol `%s' from %s section" msgstr "%s: aviso: reubicación %s contra el símbolo `%s' de la sección %s" -#: elf32-vax.c:1727 +#: elf32-vax.c:1741 #, c-format msgid "%s: warning: %s relocation to 0x%x from %s section" msgstr "%s: aviso: reubicación %s a 0x%x de la sección %s" -#: elf32-xstormy16.c:451 elf32-ia64.c:2962 elf64-ia64.c:2962 +#: elf32-xstormy16.c:451 elf32-ia64.c:2791 elf64-ia64.c:2791 msgid "non-zero addend in @fptr reloc" msgstr "adición que no es cero en la reubicación @fptr" -#: elf32-xtensa.c:733 +#: elf32-xtensa.c:912 msgid "%B(%A): invalid property table" msgstr "%B(%A): tabla de propiedades inválida" -#: elf32-xtensa.c:2177 +#: elf32-xtensa.c:2740 msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)" msgstr "%B(%A+0x%lx): desplazamiento de reubicación fuera de rango (tamaño=0x%x)" -#: elf32-xtensa.c:2234 +#: elf32-xtensa.c:2819 elf32-xtensa.c:2940 msgid "dynamic relocation in read-only section" msgstr "reubicación dinámica en la sección de sólo lectura" -#: elf32-xtensa.c:2407 +#: elf32-xtensa.c:2916 +msgid "TLS relocation invalid without dynamic sections" +msgstr "reubicación TLS inválida sin secciones dinámicas" + +#: elf32-xtensa.c:3133 msgid "internal inconsistency in size of .got.loc section" msgstr "inconsistencia interna en el tamaño de la sección .got.loc" -#: elf32-xtensa.c:2714 +#: elf32-xtensa.c:3443 msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x" msgstr "%B: tipo de máquina incompatible. La salida es 0x%x. La entrada es 0x%x" -#: elf32-xtensa.c:3920 elf32-xtensa.c:3928 +#: elf32-xtensa.c:4672 elf32-xtensa.c:4680 msgid "Attempt to convert L32R/CALLX to CALL failed" msgstr "Falló el intento de convertir L32R/CALLX a CALL" -#: elf32-xtensa.c:5522 elf32-xtensa.c:5598 elf32-xtensa.c:6714 +#: elf32-xtensa.c:6290 elf32-xtensa.c:6366 elf32-xtensa.c:7486 msgid "%B(%A+0x%lx): could not decode instruction; possible configuration mismatch" msgstr "%B(%A+0x%lx): no se puede decodificar la instrucción; posible falta de coincidencia de la configuración" -#: elf32-xtensa.c:6454 +#: elf32-xtensa.c:7226 msgid "%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch" msgstr "%B(%A+0x%lx): no se puede decodificar la instrucción para la reubicación XTENSA_ASM_SIMPLIFY; posible falta de coincidencia de la configuración" -#: elf32-xtensa.c:8166 +#: elf32-xtensa.c:8987 msgid "invalid relocation address" msgstr "dirección de reubicación inválida" -#: elf32-xtensa.c:8215 +#: elf32-xtensa.c:9036 msgid "overflow after relaxation" msgstr "desbordamiento después de la relajación" -#: elf32-xtensa.c:9341 +#: elf32-xtensa.c:10167 msgid "%B(%A+0x%lx): unexpected fix for %s relocation" msgstr "%B(%A+0x%lx): compostura inesperada para la reubicación %s" -#: elf64-alpha.c:453 +#: elf64-alpha.c:452 msgid "GPDISP relocation did not find ldah and lda instructions" msgstr "la reubicación GPDISP no encontró las instrucciones ldah y lda" -#: elf64-alpha.c:2404 +#: elf64-alpha.c:2389 msgid "%B: .got subsegment exceeds 64K (size %d)" msgstr "%B: el subsegmento .got excede los 64K (tamaño %d)" -#: elf64-alpha.c:4277 elf64-alpha.c:4289 +#: elf64-alpha.c:4269 elf64-alpha.c:4281 msgid "%B: gp-relative relocation against dynamic symbol %s" -msgstr "%B: reubicación gp relativa contra el símbolo dinámico %s" +msgstr "%B: reubicación relativa a gp contra el símbolo dinámico %s" -#: elf64-alpha.c:4315 elf64-alpha.c:4450 +#: elf64-alpha.c:4307 elf64-alpha.c:4442 msgid "%B: pc-relative relocation against dynamic symbol %s" -msgstr "%B: reubicación relativa al pc contra el símbolo dinámico %s" +msgstr "%B: reubicación relativa a pc contra el símbolo dinámico %s" -#: elf64-alpha.c:4343 +#: elf64-alpha.c:4335 msgid "%B: change in gp: BRSGP %s" msgstr "%B: cambio en gp: BRSGP %s" -#: elf64-alpha.c:4368 +#: elf64-alpha.c:4360 msgid "" msgstr "" -#: elf64-alpha.c:4373 +#: elf64-alpha.c:4365 msgid "%B: !samegp reloc against symbol without .prologue: %s" msgstr "%B: reubicación !samegp contra un símbolo sin .prologue: %s" -#: elf64-alpha.c:4425 +#: elf64-alpha.c:4417 msgid "%B: unhandled dynamic relocation against %s" msgstr "%B: reubicación dinámica sin manejar contra %s" -#: elf64-alpha.c:4457 +#: elf64-alpha.c:4449 msgid "%B: pc-relative relocation against undefined weak symbol %s" -msgstr "%B: reubicación relativa al pc contra el símbolo débil sin definir %s" +msgstr "%B: reubicación relativa a pc contra el símbolo débil sin definir %s" -#: elf64-alpha.c:4517 +#: elf64-alpha.c:4509 msgid "%B: dtp-relative relocation against dynamic symbol %s" msgstr "%B: reubicación relativa a dtp contra el símbolo dinámico %s" -#: elf64-alpha.c:4540 +#: elf64-alpha.c:4532 msgid "%B: tp-relative relocation against dynamic symbol %s" msgstr "%B: reubicación relativa a tp contra el símbolo dinámico %s" -#: elf64-hppa.c:2040 +#: elf64-hppa.c:2091 #, c-format msgid "stub entry for %s cannot load .plt, dp offset = %ld" msgstr "la entrada de cabo para %s no puede cargar .plt, desplazamiento dp = %ld" +#: elf64-hppa.c:3273 +msgid "%B(%A+0x%lx): cannot reach %s" +msgstr "%B(%A+0x%lx): no se puede alcanzar %s" + #: elf64-mmix.c:1177 #, c-format msgid "" @@ -2011,16 +2425,16 @@ msgstr "%s: la directiva LOCAL s msgid "%s: LOCAL directive: Register $%ld is not a local register. First global register is $%ld." msgstr "%s: directiva LOCAL: El registro $%ld no es un registro local. El primer registro global es $%ld." -#: elf64-mmix.c:2202 +#: elf64-mmix.c:2201 #, c-format msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n" msgstr "%s: Error: definición múltiple de `%s'; el inicio de %s está definido en un fichero enlazado con anterioridad\n" -#: elf64-mmix.c:2260 +#: elf64-mmix.c:2259 msgid "Register section has contents\n" msgstr "La sección de registros no tiene contenido\n" -#: elf64-mmix.c:2452 +#: elf64-mmix.c:2451 #, c-format msgid "" "Internal inconsistency: remaining %u != max %u.\n" @@ -2029,69 +2443,65 @@ msgstr "" "Inconsistencia interna: %u restante != %u máximo.\n" " Por favor reporte este bicho." -#: elf64-ppc.c:2569 libbfd.c:950 +#: elf64-ppc.c:2691 libbfd.c:978 msgid "%B: compiled for a big endian system and target is little endian" msgstr "%B: compilado para un sistema big endian y el objetivo es little endian" -#: elf64-ppc.c:2572 libbfd.c:952 +#: elf64-ppc.c:2694 libbfd.c:980 msgid "%B: compiled for a little endian system and target is big endian" msgstr "%B: compilado para un sistema little endian y el objetivo es big endian" -#: elf64-ppc.c:5888 +#: elf64-ppc.c:6338 #, c-format msgid "copy reloc against `%s' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc" -msgstr "la reubicación de copia contra `%s' requiere de enlazado plt suelto; evite establecer LD_BIND_NOW=1 o actualice gcc" +msgstr "la reubicación de copia contra `%s' requiere de enlazado plt flojo; evite establecer LD_BIND_NOW=1 o actualice gcc" -#: elf64-ppc.c:6316 +#: elf64-ppc.c:6767 msgid "dynreloc miscount for %B, section %A" msgstr "cuenta errónea de la reubicación dinámica de %B, sección %A" -#: elf64-ppc.c:6420 +#: elf64-ppc.c:6851 msgid "%B: .opd is not a regular array of opd entries" msgstr "%B: .opd no es una matriz regular de entradas opd" -#: elf64-ppc.c:6429 +#: elf64-ppc.c:6860 msgid "%B: unexpected reloc type %u in .opd section" msgstr "%B: tipo de reubicación %u inesperado en la sección .opd" -#: elf64-ppc.c:6450 +#: elf64-ppc.c:6881 msgid "%B: undefined sym `%s' in .opd section" -msgstr "%B: símbolo `%s' indefinido en la sección .opd" +msgstr "%B: símbolo `%s' sin definir en la sección .opd" -#: elf64-ppc.c:7157 elf64-ppc.c:7537 +#: elf64-ppc.c:7640 elf64-ppc.c:8017 #, c-format msgid "%s defined in removed toc entry" msgstr "se definió %s en la entrada toc eliminada" -#: elf64-ppc.c:8272 +#: elf64-ppc.c:8910 #, c-format msgid "long branch stub `%s' offset overflow" msgstr "desbordamiento del desplazamiento de stub de ramificación long `%s'" -#: elf64-ppc.c:8347 +#: elf64-ppc.c:8969 #, c-format msgid "can't find branch stub `%s'" msgstr "no se puede encontrar la ramificación de cabo `%s'" -#: elf64-ppc.c:8413 elf64-ppc.c:8489 +#: elf64-ppc.c:9031 elf64-ppc.c:9169 #, c-format msgid "linkage table error against `%s'" msgstr "error de la tabla de enlazado contra `%s'" -#: elf64-ppc.c:8618 +#: elf64-ppc.c:9326 #, c-format msgid "can't build branch stub `%s'" msgstr "no se puede construir la ramificación de cabos `%s'" -#: elf64-ppc.c:9070 +#: elf64-ppc.c:9799 msgid "%B section %A exceeds stub group size" -msgstr "%B sección %A excede el tamaño de grupo de stub" +msgstr "%B sección %A excede el tamaño de grupo de cabos" -#: elf64-ppc.c:9682 -msgid "stubs don't match calculated size" -msgstr "los cabos no coinciden con el tamaño calculado" - -#: elf64-ppc.c:9694 +#: elf64-ppc.c:10453 #, c-format msgid "" "linker stubs in %u group%s\n" @@ -2108,535 +2518,406 @@ msgstr "" " ajuste toc long %lu\n" " llamada plt %lu" -#: elf64-ppc.c:10378 -msgid "%B(%A+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc" -msgstr "%B(%A+0x%lx): no se admiten los TOCs múltiples automáticos, utilizando sus ficheros crt; recompile con -mminimal-toc o actualice gcc" - -#: elf64-ppc.c:10386 -msgid "%B(%A+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern" -msgstr "%B(%A+0x%lx): la optimización de llamada hermana a `%s' no permite TOCs múltiples automáticos; recompile con -mminimal-toc ó -fno-optimize-sibling-calls, o vuelva `%s' externa" - -#: elf64-ppc.c:11037 -msgid "%B: relocation %s is not supported for symbol %s." -msgstr "%B: no se admite la reubicación %s para el símbolo %s." - -#: elf64-ppc.c:11119 -msgid "%B: error: relocation %s not a multiple of %d" -msgstr "%B: error: la reubicación %s no es un múltiplo de %d" - -#: elf64-sh64.c:1701 -#, c-format -msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n" -msgstr "%s: error: tipo de reubicación %d sin alinear en %08x reubicación %08x\n" - -#: elf64-sparc.c:439 -msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER" -msgstr "%B: Solamente los registros %%g[2367] se pueden declarar utilizando STT_REGISTER" - -#: elf64-sparc.c:459 -msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B" -msgstr "El registro %%g%d se usó de forma incompatible: %s en %B, previamente %s en %B" - -#: elf64-sparc.c:482 -msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B" -msgstr "El símbolo `%s' tiene tipos divergentes: REGISTER en %B, previamente %s en %B" - -#: elf64-sparc.c:527 -msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B" -msgstr "El símbolo `%s' tiene tipos divergentes: %s en %B, previamente REGISTER en %B" - -#: elf64-sparc.c:678 -msgid "%B: linking UltraSPARC specific with HAL specific code" -msgstr "%B: se enlaza código específico de UltraSPARC con código específico de HAL" - -#: elf64-x86-64.c:799 elf64-x86-64.c:959 elf64-x86-64.c:2360 -msgid "%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC" -msgstr "%B: no se puede usar la reubicación %s contra `%s' cuando se hace un objeto compartido; recompile con -fPIC" - -#: elf64-x86-64.c:890 -msgid "%B: %s' accessed both as normal and thread local symbol" -msgstr "%B: se accesó `%s' como un símbolo normal y como un símbolo local de hilo" - -#: elf64-x86-64.c:2272 -msgid "%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object" -msgstr "%B: no se puede usar la reubicación R_X86_64_GOTOFF contra la función protegida `%s' cuando se hace un objeto compartido" - -#: elf64-x86-64.c:2356 -msgid "%B: relocation R_X86_64_PC32 against protected function `%s' can not be used when making a shared object" -msgstr "%B: no se puede usar la reubicación R_X86_64_PC32 contra la función protegida `%' cuando se hace un objeto compartido" - -#: elf-attrs.c:582 -msgid "ERROR: %B: Must be processed by '%s' toolchain" -msgstr "ERROR: %B: Se debe procesar por la cadena de compilación '%s'" - -#: elf-attrs.c:602 elf-attrs.c:621 -msgid "ERROR: %B: Incompatible object tag '%s':%d" -msgstr "ERROR: %B: Etiqueta de objeto '%s' incompatible:%d" - -#: elf.c:312 -msgid "%B: invalid string offset %u >= %lu for section `%s'" -msgstr "%B: desplazamiento de cadena inválido %u >= %lu para la sección `%s'" - -#: elf.c:414 -msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section" -msgstr "%B el número de símbolo %lu hace referencia a la sección inexistente SHT_SYMTAB_SHNDX" - -#: elf.c:567 -msgid "%B: Corrupt size field in group section header: 0x%lx" -msgstr "%B: Tamaño de campo corrupto en el encabezado de la sección de grupo: 0x%lx" - -#: elf.c:603 -msgid "%B: invalid SHT_GROUP entry" -msgstr "%B: entrada SHT_GROUP inválida" - -#: elf.c:673 -msgid "%B: no group info for section %A" -msgstr "%B: no hay información de grupo para la sección %A" - -#: elf.c:703 elf.c:2886 elflink.c:9858 -msgid "%B: warning: sh_link not set for section `%A'" -msgstr "%B: aviso: no se estableción sh_link para la sección `%A'" - -#: elf.c:719 -msgid "%B: sh_link [%d] in section `%A' is incorrect" -msgstr "%B: sh_link [%d] en la sección `%A', es incorrecto" - -#: elf.c:754 -msgid "%B: unknown [%d] section `%s' in group [%s]" -msgstr "%B: sección [%d] desconocida `%s' en el grupo [%s]" - -#: elf.c:1108 -#, c-format -msgid "" -"\n" -"Program Header:\n" -msgstr "" -"\n" -"Encabezado del Programa:\n" - -#: elf.c:1150 -#, c-format -msgid "" -"\n" -"Dynamic Section:\n" -msgstr "" -"\n" -"Sección Dinámica:\n" - -#: elf.c:1276 -#, c-format -msgid "" -"\n" -"Version definitions:\n" -msgstr "" -"\n" -"Definiciones de versión:\n" - -#: elf.c:1301 -#, c-format -msgid "" -"\n" -"Version References:\n" -msgstr "" -"\n" -"Referencias de Versión:\n" - -#: elf.c:1306 -#, c-format -msgid " required from %s:\n" -msgstr " requerido desde %s:\n" - -#: elf.c:1690 -msgid "%B: invalid link %lu for reloc section %s (index %u)" -msgstr "%B: enlace %lu inválido para la sección de reubicación %s (índice %u)" - -#: elf.c:1858 -msgid "%B: don't know how to handle allocated, application specific section `%s' [0x%8x]" -msgstr "%B: no se sabe cómo manejar lo reservado, aplicación específica de la sección `%s' [0x%8x]" +#: elf64-ppc.c:11252 +msgid "%B(%A+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc" +msgstr "%B(%A+0x%lx): no se admiten los TOCs múltiples automáticos, utilizando sus ficheros crt; recompile con -mminimal-toc o actualice gcc" -#: elf.c:1870 -msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]" -msgstr "%B: no se sabe cómo manejar la sección específica de procesador `%s' [0x%8x]" +#: elf64-ppc.c:11260 +msgid "%B(%A+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern" +msgstr "%B(%A+0x%lx): la optimización de llamada hermana a `%s' no permite TOCs múltiples automáticos; recompile con -mminimal-toc ó -fno-optimize-sibling-calls, o vuelva `%s' externa" -#: elf.c:1881 -msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]" -msgstr "%B: no se sabe cómo manejar la sección específica de SO `%s' [0x%8x]" +#: elf64-ppc.c:11961 +msgid "%B: relocation %s is not supported for symbol %s." +msgstr "%B: no se admite la reubicación %s para el símbolo %s." -#: elf.c:1891 -msgid "%B: don't know how to handle section `%s' [0x%8x]" -msgstr "%B: no se sabe cómo manejar la sección `%s' [0x%8x]" +#: elf64-ppc.c:12044 +msgid "%B: error: relocation %s not a multiple of %d" +msgstr "%B: error: la reubicación %s no es un múltiplo de %d" -#: elf.c:2843 -msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'" -msgstr "%B: sh_link de la sección `%A' apunta a la sección descartada `%A' de `%B'" +#: elf64-sh64.c:1701 +#, c-format +msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n" +msgstr "%s: error: tipo de reubicación %d sin alinear en %08x reubicación %08x\n" -#: elf.c:2866 -msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'" -msgstr "%B: sh_link de la sección `%A' apunta a la sección descartada `%A' de `%B'" +#: elf64-sparc.c:439 +msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER" +msgstr "%B: Solamente los registros %%g[2367] se pueden declarar utilizando STT_REGISTER" -#: elf.c:4142 -msgid "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section" -msgstr "%B: La primera sección en el segmento PT_DYNAMIC no es la sección .dynamic" +#: elf64-sparc.c:459 +msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B" +msgstr "El registro %%g%d se usó de forma incompatible: %s en %B, previamente %s en %B" -#: elf.c:4165 -msgid "%B: Not enough room for program headers, try linking with -N" -msgstr "%B: No hay suficiente espacio para los encabezados del programa, pruebe enlazar con -N" +#: elf64-sparc.c:482 +msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B" +msgstr "El símbolo `%s' tiene tipos divergentes: REGISTER en %B, previamente %s en %B" -#: elf.c:4243 -msgid "%B: section %A lma 0x%lx overlaps previous sections" -msgstr "%B: la sección %A lma 0x%lx traslapa las secciones anteriores" +#: elf64-sparc.c:527 +msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B" +msgstr "El símbolo `%s' tiene tipos divergentes: %s en %B, previamente REGISTER en %B" -#: elf.c:4341 -msgid "%B: section `%A' can't be allocated in segment %d" -msgstr "%B: la sección `%A' no se puede asignar en el segmento %d" +#: elf64-sparc.c:679 +msgid "%B: linking UltraSPARC specific with HAL specific code" +msgstr "%B: se enlaza código específico de UltraSPARC con código específico de HAL" -#: elf.c:4390 -msgid "%B: warning: allocated section `%s' not in segment" -msgstr "%B: aviso: la sección asignada `%s' no está en el segmento" +#: elf64-x86-64.c:1337 +msgid "%B: '%s' accessed both as normal and thread local symbol" +msgstr "%B: se accedió a '%s' como un símbolo normal y como un símbolo local de hilo" -#: elf.c:4886 -msgid "%B: symbol `%s' required but not present" -msgstr "%B: se requiere el símbolo `%s' pero no está presente" +#: elf64-x86-64.c:2701 +msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d" +msgstr "%B: la reubicación %s contra el símbolo STT_GNU_IFUNC `%s' con adición que no es cero: %d" -#: elf.c:5199 -msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n" -msgstr "%B: aviso: Se detectó un segmento cargable vacío, ¿ esto es intencional ?\n" +#: elf64-x86-64.c:2980 +msgid "%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object" +msgstr "%B: no se puede usar la reubicación R_X86_64_GOTOFF contra la función protegida `%s' cuando se hace un objeto compartido" -#: elf.c:6105 -#, c-format -msgid "Unable to find equivalent output section for symbol '%s' from section '%s'" -msgstr "No se puede encontrar la sección de salida equivalente para el símbolo '%s' de la sección '%s'" +#: elf64-x86-64.c:3091 +msgid "; recompile with -fPIC" +msgstr "; recompile con -fPIC" -#: elf.c:7079 -msgid "%B: unsupported relocation type %s" -msgstr "%B: no se admite el tipo de reubicación %s" +#: elf64-x86-64.c:3096 +msgid "%B: relocation %s against %s `%s' can not be used when making a shared object%s" +msgstr "%B: no se puede usar la reubicación %s contra %s `%s' cuando se hace un objeto compartido%s" + +#: elf64-x86-64.c:3098 +msgid "%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s" +msgstr "%B: no se puede usar la reubicación %s contra %s sin definir `%s' cuando se hace un objeto compartido%s" -#: elfcode.h:813 +#: elfcode.h:795 #, c-format msgid "warning: %s has a corrupt string table index - ignoring" msgstr "aviso: %s tiene un índice de tablas de cadenas corrupto - se descarta" -#: elfcode.h:1226 +#: elfcode.h:1201 #, c-format msgid "%s: version count (%ld) does not match symbol count (%ld)" msgstr "%s: la cuenta de versión (%ld) no coincide con la cuenta de símbolos (%ld)" -#: elfcode.h:1459 +#: elfcode.h:1441 #, c-format msgid "%s(%s): relocation %d has invalid symbol index %ld" msgstr "%s(%s): la reubicación %d tiene un índice de símbolo %ld inválido" -#: elf-eh-frame.c:823 -msgid "%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n" -msgstr "%P: la codificación fde en %B(%A) previene la creación de la tabla .eh_frame_hdr.\n" - -#: elf-eh-frame.c:974 -msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n" -msgstr "%P: error en %B(%A); no se creará la tabla .eh_frame_hdr.\n" - -#: elf-hppa.h:2219 elf-hppa.h:2233 -msgid "%B(%A): warning: unresolvable relocation against symbol `%s'" -msgstr "%B(%A): aviso: reubicación sin resolución contra el símbolo `%s'" +#: elfcore.h:251 +msgid "Warning: %B is truncated: expected core file size >= %lu, found: %lu." +msgstr "Aviso: se truncó %B: se esperaba el tamaño de fichero core >= %lu, se encontró: %lu." -#: elflink.c:1028 +#: elflink.c:1113 msgid "%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A" msgstr "%s: la definición TLS en %B sección %A no coincide con la definición que no es TLS en %B sección %A" -#: elflink.c:1032 +#: elflink.c:1117 msgid "%s: TLS reference in %B mismatches non-TLS reference in %B" -msgstr "%s: la referencia TLS en %b no coincide con la referencia que no es TLS en %B" +msgstr "%s: la referencia TLS en %B no coincide con la referencia que no es TLS en %B" -#: elflink.c:1036 +#: elflink.c:1121 msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B" msgstr "%s: la definición TLS en %B sección %A no coincide con la referencia que no es TLS en %B" -#: elflink.c:1040 +#: elflink.c:1125 msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A" msgstr "%s: la referencia TLS en %B no coincide con la definición que no es TLS en %B sección %A" -#: elflink.c:1654 +#: elflink.c:1764 msgid "%B: unexpected redefinition of indirect versioned symbol `%s'" msgstr "%B: redefinición inesperada del símbolo con versión indirecta `%s'" -#: elflink.c:1974 +#: elflink.c:2077 msgid "%B: version node not found for symbol %s" msgstr "%B: no se encuentra la versión del nodo para el símbolo %s" -#: elflink.c:2122 +#: elflink.c:2167 msgid "%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'" msgstr "%B: índice de símbolos de reubicación inválido (0x%lx >= 0x%lx) erróneo para el desplazamiento 0x%lx en la sección `%A'" -#: elflink.c:2314 +#: elflink.c:2178 +msgid "%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table" +msgstr "%B: índice de símbolos que no es cero (0x%lx) para el desplazamiento 0x%lx) en la sección `%A' cuando el fichero objeto no tiene tabla de símbolos" + +#: elflink.c:2375 msgid "%B: relocation size mismatch in %B section %A" msgstr "%B: el tamaño de reubicación no coincide en %B sección %A" -#: elflink.c:2616 +#: elflink.c:2678 #, c-format msgid "warning: type and size of dynamic symbol `%s' are not defined" msgstr "aviso: el tipo y tamaño del símbolo dinámico `%s' no están definidos" -#: elflink.c:3910 +#: elflink.c:3424 +msgid "%P: alternate ELF machine code found (%d) in %B, expecting %d\n" +msgstr "%P: se encontró código máquina ELF alternativo (%d) en %B, se espera %d\n" + +#: elflink.c:4032 msgid "%B: %s: invalid version %u (max %d)" msgstr "%B: %s: versión %u inválida (máximo %d)" -#: elflink.c:3946 +#: elflink.c:4068 msgid "%B: %s: invalid needed version %d" msgstr "%B: %s: versión requerida %d inválida" -#: elflink.c:4129 +#: elflink.c:4253 msgid "Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %A" msgstr "Aviso: la alineación %u del símbolo común `%s' en %B es más grande que la alineación (%u) de su sección %A" -#: elflink.c:4135 +#: elflink.c:4259 msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B" msgstr "Aviso: la alineación %u del símbolo `%s' en %B es más pequeña que %u en %B" -#: elflink.c:4150 +#: elflink.c:4274 msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B" msgstr "Aviso: el tamaño del símbolo `%s' cambió de %lu en %B a %lu en %B" -#: elflink.c:4326 +#: elflink.c:4438 #, c-format msgid "%s: invalid DSO for symbol `%s' definition" msgstr "%s: DSO inválido para la definición del símbolo `%s'" -#: elflink.c:5552 +#: elflink.c:5688 #, c-format msgid "%s: undefined version: %s" msgstr "%s: versión sin definir: %s" -#: elflink.c:5620 +#: elflink.c:5756 msgid "%B: .preinit_array section is not allowed in DSO" msgstr "%B: no se permite la sección .preinit_array en DSO" -#: elflink.c:7359 +#: elflink.c:7484 #, c-format msgid "undefined %s reference in complex symbol: %s" -msgstr "referencia %s indefinida en el símbolo complejo: %s" +msgstr "referencia %s sin definir en el símbolo complejo: %s" -#: elflink.c:7514 +#: elflink.c:7638 #, c-format msgid "unknown operator '%c' in complex symbol" msgstr "operador desconocido '%c' en el símbolo complejo" -#: elflink.c:8053 elflink.c:8070 elflink.c:8107 elflink.c:8124 +#: elflink.c:7976 elflink.c:7993 elflink.c:8030 elflink.c:8047 msgid "%B: Unable to sort relocs - they are in more than one size" msgstr "%B: No se pueden ordenar las reubicaciones - son de tamaños diferentes" -#: elflink.c:8084 elflink.c:8138 +#: elflink.c:8007 elflink.c:8061 msgid "%B: Unable to sort relocs - they are of an unknown size" msgstr "%B: No se pueden ordenar las reubicaciones - son de tamaño desconocido" -#: elflink.c:8187 +#: elflink.c:8112 msgid "Not enough memory to sort relocations" msgstr "No hay suficiente memoria para ordenar las reubicaciones" -#: elflink.c:8374 +#: elflink.c:8304 msgid "%B: Too many sections: %d (>= %d)" msgstr "%B: Demasiadas secciones: %d (>= %d)" -#: elflink.c:8608 +#: elflink.c:8540 msgid "%B: %s symbol `%s' in %B is referenced by DSO" msgstr "%B: el símbolo %s `%s' en %B está referenciado por DSO" -#: elflink.c:8691 +#: elflink.c:8625 msgid "%B: could not find output section %A for input section %A" msgstr "%B: no se puede encontrar la sección de salida %A para la sección de entrada %A" -#: elflink.c:8788 +#: elflink.c:8745 msgid "%B: %s symbol `%s' isn't defined" msgstr "%B: el símbolo %s `%s' no está definido" -#: elflink.c:9284 +#: elflink.c:9301 msgid "error: %B contains a reloc (0x%s) for section %A that references a non-existent global symbol" msgstr "error: %B contiene una reubicación (0x%s) para la sección %A que refiere a un símbolo global que no existe" -#: elflink.c:9318 +#: elflink.c:9366 msgid "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B\n" msgstr "%X`%s' referido en la sección `%A' de %B: se definió en la sección descartada `%A' de %B\n" -#: elflink.c:9936 +#: elflink.c:9991 msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections" msgstr "%A tiene tanto secciones ordenadas [`%A' en %B] como desordenadas [`%A' en %B]" -#: elflink.c:9941 +#: elflink.c:9996 #, c-format msgid "%A has both ordered and unordered sections" -msgstr "%A tiene tanto secciones ordenadas como desordenadas" +msgstr "%A tiene secciones tanto ordenadas como desordenadas" -#: elflink.c:10828 elflink.c:10872 +#: elflink.c:10872 elflink.c:10916 msgid "%B: could not find output section %s" msgstr "%B: no se puede encontrar la sección de salida %s" -#: elflink.c:10833 +#: elflink.c:10877 #, c-format msgid "warning: %s section has zero size" msgstr "aviso: la sección %s es de tamaño cero" -#: elflink.c:10937 +#: elflink.c:10982 msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n" msgstr "%P: aviso: se crea un DT_TEXTREL en un objeto compartido.\n" -#: elflink.c:11305 +#: elflink.c:11165 +msgid "%P%X: can not read symbols: %E\n" +msgstr "%P%X: no se pueden leer símbolos: %E\n" + +#: elflink.c:11483 msgid "Removing unused section '%s' in file '%B'" msgstr "Se elimina la sección sin uso '%s' en el fichero '%B'" -#: elflink.c:11496 +#: elflink.c:11695 msgid "Warning: gc-sections option ignored" msgstr "Aviso: se descarta la opción gc-sections" -#: elflink.c:11987 -msgid "%P%X: can not read symbols: %E\n" -msgstr "%P%X: no se pueden leer símbolos: %E\n" - -#: elflink.c:12129 +#: elflink.c:12242 msgid "%B: ignoring duplicate section `%A'" msgstr "%B: se descarta la sección duplicada `%A'" -#: elflink.c:12136 elflink.c:12143 +#: elflink.c:12249 elflink.c:12256 msgid "%B: duplicate section `%A' has different size" msgstr "%B: la sección duplicada `%A' tiene tamaño diferente" -#: elflink.c:12151 elflink.c:12156 +#: elflink.c:12264 elflink.c:12269 msgid "%B: warning: could not read contents of section `%A'" msgstr "%B: aviso: no se puede leer el contenido de la sección `%A'" -#: elflink.c:12160 +#: elflink.c:12273 msgid "%B: warning: duplicate section `%A' has different contents" msgstr "%B: aviso: la sección duplicada `%A' tiene contenido diferente" -#: elflink.c:12239 linker.c:3081 -msgid "%F%P: already_linked_table: %E" -msgstr "%F%P: already_linked_table: %E" +#: elflink.c:12374 linker.c:3098 +msgid "%F%P: already_linked_table: %E\n" +msgstr "%F%P: already_linked_table: %E\n" -#: elf-m10300.c:1532 -msgid "error: inappropriate relocation type for shared library (did you forget -fpic?)" -msgstr "error: tipo de reubicación inapropiada para la biblioteca compartida (¿olvidó -fpic?)" - -#: elf-m10300.c:1535 -msgid "internal error: suspicious relocation type used in shared library" -msgstr "error interno: se usó un tipo de reubicación sospechosa en una biblioteca compartida" - -#: elfxx-mips.c:990 +#: elfxx-mips.c:1222 msgid "static procedure (no name)" msgstr "procedimiento estático (sin nombre)" -#: elfxx-mips.c:4663 +#: elfxx-mips.c:5588 msgid "%B: %A+0x%lx: jump to stub routine which is not jal" msgstr "%B: %A+0x%lx: salto a una rutina cabo la cual no es jal" -#: elfxx-mips.c:5326 elfxx-mips.c:5546 +#: elfxx-mips.c:6235 elfxx-mips.c:6458 msgid "%B: Warning: bad `%s' option size %u smaller than its header" msgstr "%B: Aviso: el tamaño de opción `%s' %u erróneo es más pequeño que su encabezado" -#: elfxx-mips.c:6405 +#: elfxx-mips.c:7205 elfxx-mips.c:7330 +msgid "%B: Warning: cannot determine the target function for stub section `%s'" +msgstr "%B: Aviso: no se puede determinar la función objetivo para la sección de cabo `%s'" + +#: elfxx-mips.c:7459 msgid "%B: Malformed reloc detected for section %s" msgstr "%B: Se detectó una reubicación malformada para la sección %s" -#: elfxx-mips.c:6447 +#: elfxx-mips.c:7499 msgid "%B: GOT reloc at 0x%lx not expected in executables" msgstr "%B: no se esperaba la reubicación GOT en 0x%lx en ejecutables" -#: elfxx-mips.c:6517 +#: elfxx-mips.c:7602 msgid "%B: CALL16 reloc at 0x%lx not against global symbol" msgstr "%B: la reubicación CALL16 en 0x%lx no es contra un símbolo global" -#: elfxx-mips.c:7880 +#: elfxx-mips.c:8280 +#, c-format +msgid "non-dynamic relocations refer to dynamic symbol %s" +msgstr "reubicaciones que no son dinámicas se refieren al símbolo dinámico %s" + +#: elfxx-mips.c:8985 msgid "%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'" msgstr "%B: No se puede encontrar una reubicación LO16 coincidente contra `%s' para %s en 0x%lx en la sección `%A'" -#: elfxx-mips.c:8046 +#: elfxx-mips.c:9124 msgid "small-data section exceeds 64KB; lower small-data size limit (see option -G)" msgstr "la sección small-data excede los 64KB; disminuya el límite de tamaño de small-data (vea la opción -G)" -#: elfxx-mips.c:10661 +#: elfxx-mips.c:11940 #, c-format msgid "%s: illegal section name `%s'" msgstr "%s: nombre de sección `%s' ilegal" -#: elfxx-mips.c:11031 elfxx-mips.c:11050 +#: elfxx-mips.c:12318 elfxx-mips.c:12344 msgid "Warning: %B uses -msingle-float, %B uses -mdouble-float" msgstr "Aviso: %B usa -msingle-float, %B usa -mdouble-float" -#: elfxx-mips.c:11106 +#: elfxx-mips.c:12330 elfxx-mips.c:12386 +msgid "Warning: %B uses -msingle-float, %B uses -mips32r2 -mfp64" +msgstr "Aviso: %B usa -msingle-float, %B usa -mips32r2 -mfp64" + +#: elfxx-mips.c:12356 elfxx-mips.c:12392 +msgid "Warning: %B uses -mdouble-float, %B uses -mips32r2 -mfp64" +msgstr "Aviso: %B usa -mdouble-float, %B usa -mips32r2 -mfp64" + +#: elfxx-mips.c:12434 msgid "%B: endianness incompatible with that of the selected emulation" msgstr "%B: la endianez es incompatible con aquella de la emulación seleccionada" -#: elfxx-mips.c:11118 +#: elfxx-mips.c:12445 msgid "%B: ABI is incompatible with that of the selected emulation" msgstr "%B: la ABI es incompatible con aquella de la emulación seleccionada" -#: elfxx-mips.c:11218 +#: elfxx-mips.c:12526 +msgid "%B: warning: linking abicalls files with non-abicalls files" +msgstr "%B: aviso: se enlazan ficheros de llamadas abi con ficheros que no son de llamadas abi" + +#: elfxx-mips.c:12543 msgid "%B: linking 32-bit code with 64-bit code" msgstr "%B: se enlaza código de 32-bit con código de 64-bit" -#: elfxx-mips.c:11246 +#: elfxx-mips.c:12571 msgid "%B: linking %s module with previous %s modules" msgstr "%B: se enlaza el módulo %s con módulos %s previos" -#: elfxx-mips.c:11269 +#: elfxx-mips.c:12594 msgid "%B: ABI mismatch: linking %s module with previous %s modules" -msgstr "%B: no coincide el ABI: se enlaza el módulo %s con módulos %s previos" +msgstr "%B: no coincide ABI: se enlaza el módulo %s con módulos %s previos" -#: elfxx-mips.c:11334 +#: elfxx-mips.c:12758 #, c-format msgid " [abi=O32]" msgstr " [abi=O32]" -#: elfxx-mips.c:11336 +#: elfxx-mips.c:12760 #, c-format msgid " [abi=O64]" msgstr " [abi=O64]" -#: elfxx-mips.c:11338 +#: elfxx-mips.c:12762 #, c-format msgid " [abi=EABI32]" msgstr " [abi=EABI32]" -#: elfxx-mips.c:11340 +#: elfxx-mips.c:12764 #, c-format msgid " [abi=EABI64]" msgstr " [abi=EABI64]" -#: elfxx-mips.c:11342 +#: elfxx-mips.c:12766 #, c-format msgid " [abi unknown]" msgstr " [abi desconocido]" -#: elfxx-mips.c:11344 +#: elfxx-mips.c:12768 #, c-format msgid " [abi=N32]" msgstr " [abi=N32]" -#: elfxx-mips.c:11346 +#: elfxx-mips.c:12770 #, c-format msgid " [abi=64]" msgstr " [abi=64]" -#: elfxx-mips.c:11348 +#: elfxx-mips.c:12772 #, c-format msgid " [no abi set]" msgstr " [no hay conjunto abi]" -#: elfxx-mips.c:11369 +#: elfxx-mips.c:12793 #, c-format msgid " [unknown ISA]" msgstr " [ISA desconocido]" -#: elfxx-mips.c:11380 +#: elfxx-mips.c:12804 #, c-format msgid " [not 32bitmode]" msgstr " [no es modo 32bit]" -#: elfxx-sparc.c:430 +#: elfxx-sparc.c:440 #, c-format msgid "invalid relocation type %d" msgstr "tipo de reubicación %d inválido" -#: elfxx-sparc.c:2901 -msgid "%B: probably compiled without -fPIC?" -msgstr "%B: ¿Compilado probablemente sin -fPIC?" - #: i386linux.c:455 m68klinux.c:459 sparclinux.c:453 #, c-format msgid "Output file requires shared library `%s'\n" @@ -2720,34 +3001,94 @@ msgstr "%B: longitud de secci msgid "%s: address 0x%s out of range for Intel Hex file" msgstr "%s: la dirección 0x%s está fuera de rango en el fichero Hexadecimal de Intel" -#: libbfd.c:980 +#: libbfd.c:1008 #, c-format msgid "Deprecated %s called at %s line %d in %s\n" msgstr "Se llamó a %s que es obsoleto en %s línea %d en %s\n" -#: libbfd.c:983 +#: libbfd.c:1011 #, c-format msgid "Deprecated %s called\n" msgstr "Se llamó a %s que es obsoleto\n" -#: linker.c:1875 +#: linker.c:1874 msgid "%B: indirect symbol `%s' to `%s' is a loop" msgstr "%B: el símbolo indirecto `%s' para `%s' es un ciclo" -#: linker.c:2741 +#: linker.c:2740 #, c-format msgid "Attempt to do relocatable link with %s input and %s output" msgstr "Se intentó hacer un enlace reubicable con entrada %s y salida %s" -#: linker.c:3048 +#: linker.c:3065 msgid "%B: warning: ignoring duplicate section `%A'\n" msgstr "%B: aviso: se descarta la sección duplicada `%A'\n" -#: linker.c:3062 +#: linker.c:3079 msgid "%B: warning: duplicate section `%A' has different size\n" msgstr "%B: aviso: la sección duplicada `%A' es de tamaño diferente\n" -#: merge.c:820 +#: mach-o.c:3195 +#, c-format +msgid "Mach-O header:\n" +msgstr "encabezado de Mach-O:\n" + +#: mach-o.c:3196 +#, c-format +msgid " magic : %08lx\n" +msgstr " magic : %08lx\n" + +#: mach-o.c:3197 +#, c-format +msgid " cputype : %08lx (%s)\n" +msgstr " tipocpu : %08lx (%s)\n" + +#: mach-o.c:3199 +#, c-format +msgid " cpusubtype: %08lx\n" +msgstr " subtipocpu: %08lx\n" + +#: mach-o.c:3200 +#, c-format +msgid " filetype : %08lx (%s)\n" +msgstr " tipofich : %08lx (%s)\n" + +#: mach-o.c:3203 +#, c-format +msgid " ncmds : %08lx\n" +msgstr " nordenes : %08lx\n" + +#: mach-o.c:3204 +#, c-format +msgid " sizeofcmds: %08lx\n" +msgstr " tamordenes: %08lx\n" + +#: mach-o.c:3205 +#, c-format +msgid " flags : %08lx (" +msgstr " opciones : %08lx (" + +#: mach-o.c:3207 +#, c-format +msgid ")\n" +msgstr ")\n" + +#: mach-o.c:3208 +#, c-format +msgid " reserved : %08x\n" +msgstr " reservado : %08x\n" + +#: mach-o.c:3218 +#, c-format +msgid "Segments and Sections:\n" +msgstr "Segmentos y Secciones:\n" + +#: mach-o.c:3219 +#, c-format +msgid " #: Segment name Section name Address\n" +msgstr " #: Nombre segmento Nombre sección Dirección\n" + +#: merge.c:829 #, c-format msgid "%s: access beyond end of merged section (%ld)" msgstr "%s: acceso más allá del final de la sección mezclada (%ld)" @@ -2805,7 +3146,7 @@ msgstr "%s: fichero mmo inv #: mmo.c:1729 #, c-format msgid "%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d for lop_fixrx\n" -msgstr "%s: fichero mmo inválido: el byte inicial de la palabra operando debe ser 0 ó 1, se obtuvo %d para lop_fixrx\n" +msgstr "%s: fichero mmo inválido: el byte inicial del operando word debe ser 0 ó 1, se obtuvo %d para lop_fixrx\n" #: mmo.c:1752 #, c-format @@ -2845,7 +3186,7 @@ msgstr "%s: tabla de s #: mmo.c:2894 #, c-format msgid "%s: Bad symbol definition: `Main' set to %s rather than the start address %s\n" -msgstr "%s: Definición de símbolo errónea: `Main' se estableción como %s en lugar de la dirección de inicio %s\n" +msgstr "%s: Definición de símbolo errónea: `Main' se estableció como %s en lugar de la dirección de inicio %s\n" #: mmo.c:2986 #, c-format @@ -2875,7 +3216,7 @@ msgstr "%s: demasiados registros iniciados: longitud de secci #: mmo.c:3145 #, c-format msgid "%s: invalid start address for initialized registers of length %ld: 0x%lx%08lx\n" -msgstr "%s: dirección de inicio inválida para los registros iniciados de longitud %ld: 0x%lx%08lx\n" +msgstr "%s: dirección de inicio inválida para los registros inicializados de longitud %ld: 0x%lx%08lx\n" #: oasys.c:881 #, c-format @@ -2887,54 +3228,74 @@ msgstr "%s: no se puede representar la secci msgid "Unhandled OSF/1 core file section type %d\n" msgstr "Tipo de sección de fichero núcleo OSF/1 %d sin manejar\n" +#: pe-mips.c:613 +msgid "%B: `ld -r' not supported with PE MIPS objects\n" +msgstr "%B: `ld -r' no se admite con objetos PE MIPS\n" + +#. OK, at this point the following variables are set up: +#. src = VMA of the memory we're fixing up +#. mem = pointer to memory we're fixing up +#. val = VMA of what we need to refer to. +#: pe-mips.c:729 +msgid "%B: unimplemented %s\n" +msgstr "%B: %s sin implementar\n" + +#: pe-mips.c:755 +msgid "%B: jump too far away\n" +msgstr "%B: salto demasiado lejos\n" + +#: pe-mips.c:781 +msgid "%B: bad pair/reflo after refhi\n" +msgstr "%B: pair/reflo erróneo después de refhi\n" + +#: pei-x86_64.c:465 +#, c-format +msgid "warning: .pdata section size (%ld) is not a multiple of %d\n" +msgstr "aviso: el tamaño de la sección .pdata (%ld) no es un múltiplo de %d\n" + +#: pei-x86_64.c:469 peigen.c:1620 peigen.c:1799 pepigen.c:1620 pepigen.c:1799 +#: pex64igen.c:1620 pex64igen.c:1799 +#, c-format +msgid "" +"\n" +"The Function Table (interpreted .pdata section contents)\n" +msgstr "" +"\n" +"La Tabla de Funciones (se interpretaron los contenidos de la sección .pdata)\n" + +#: pei-x86_64.c:471 +#, c-format +msgid "vma:\t\t\tBeginAddress\t EndAddress\t UnwindData\n" +msgstr "vma:\t\t\tDireccInicio\t DireccFin \t InformaciónDesenvuelta\n" + #. XXX code yet to be written. -#: peicode.h:759 +#: peicode.h:752 msgid "%B: Unhandled import type; %x" msgstr "%B: Tipo de importación sin manejar; %x" -#: peicode.h:764 +#: peicode.h:757 msgid "%B: Unrecognised import type; %x" -msgstr "%B: Tipo de importación no reconocida; %x" +msgstr "%B: No se reconocer el tipo de importación; %x" -#: peicode.h:778 +#: peicode.h:771 msgid "%B: Unrecognised import name type; %x" -msgstr "%B: Tipo de nombre de importación no reconocida; %x" +msgstr "%B: No se reconoce el tipo de nombre de importación; %x" -#: peicode.h:1161 +#: peicode.h:1154 msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive" -msgstr "%B: Tipo de máquina (0x%x) no reconocida en el archivo de Formato de Importación de Bibliotecas" +msgstr "%B: No se reconoce el tipo de máquina (0x%x) en el archivo de Formato de Importación de Bibliotecas" -#: peicode.h:1173 +#: peicode.h:1166 msgid "%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive" -msgstr "%B: Tipo de máquina (0x%x) reconocida pero sin manejar en el archivo de Formato de Importación de Bibliotecas" +msgstr "%B: Se reconoce el tipo de máquina (0x%x) pero no se maneja en el archivo de Formato de Importación de Bibliotecas" -#: peicode.h:1191 +#: peicode.h:1184 msgid "%B: size field is zero in Import Library Format header" msgstr "%B: el tamaño del campo es cero en el encabezado del Formato de Importación de Bibliotecas" -#: peicode.h:1222 +#: peicode.h:1215 msgid "%B: string not null terminated in ILF object file." -msgstr "%B: cadena no terminada en null en el fichero objeto ILF." - -#: pe-mips.c:606 -msgid "%B: `ld -r' not supported with PE MIPS objects\n" -msgstr "%B: `ld -r' no se admite con objetos PE MIPS\n" - -#. OK, at this point the following variables are set up: -#. src = VMA of the memory we're fixing up -#. mem = pointer to memory we're fixing up -#. val = VMA of what we need to refer to. -#: pe-mips.c:722 -msgid "%B: unimplemented %s\n" -msgstr "%B: %s sin implementar\n" - -#: pe-mips.c:748 -msgid "%B: jump too far away\n" -msgstr "%B: salto demasiado lejos\n" - -#: pe-mips.c:774 -msgid "%B: bad pair/reflo after refhi\n" -msgstr "%B: pair/reflo erróneo después de refhi\n" +msgstr "%B: cadena que no termina en null en el fichero objeto ILF." #: ppcboot.c:414 #, c-format @@ -2950,22 +3311,22 @@ msgstr "" msgid "Entry offset = 0x%.8lx (%ld)\n" msgstr "Desplazamiento de entrada = 0x%.8lx (%ld)\n" -#: ppcboot.c:416 +#: ppcboot.c:417 #, c-format msgid "Length = 0x%.8lx (%ld)\n" msgstr "Longitud = 0x%.8lx (%ld)\n" -#: ppcboot.c:419 +#: ppcboot.c:421 #, c-format msgid "Flag field = 0x%.2x\n" msgstr "Campo de opciones = 0x%.2x\n" -#: ppcboot.c:425 +#: ppcboot.c:427 #, c-format msgid "Partition name = \"%s\"\n" msgstr "Nombre de la partición = \"%s\"\n" -#: ppcboot.c:444 +#: ppcboot.c:446 #, c-format msgid "" "\n" @@ -2974,22 +3335,22 @@ msgstr "" "\n" "Partición[%d] inicio = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" -#: ppcboot.c:450 +#: ppcboot.c:452 #, c-format msgid "Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" msgstr "Partición[%d] fin = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" -#: ppcboot.c:456 +#: ppcboot.c:458 #, c-format msgid "Partition[%d] sector = 0x%.8lx (%ld)\n" msgstr "Partición[%d] sector = 0x%.8lx (%ld)\n" -#: ppcboot.c:457 +#: ppcboot.c:460 #, c-format msgid "Partition[%d] length = 0x%.8lx (%ld)\n" msgstr "Partición[%d] longitud = 0x%.8lx (%ld)\n" -#: som.c:5088 +#: som.c:5114 #, c-format msgid "" "\n" @@ -2998,134 +3359,189 @@ msgstr "" "\n" "Encabezado Auxiliar de Ejecución\n" -#: som.c:5349 +#: som.c:5417 msgid "som_sizeof_headers unimplemented" msgstr "som_sizeof_headers sin implementar" #: srec.c:261 msgid "%B:%d: Unexpected character `%s' in S-record file\n" -msgstr "%B:%d: Caractér `%s' inesperado en el fichero S-record\n" +msgstr "%B:%d: Carácter `%s' inesperado en el fichero S-record\n" + +#: srec.c:567 srec.c:600 +msgid "%B:%d: Bad checksum in S-record file\n" +msgstr "%B:%d: Suma de comprobación errónea en el fichero S-record\n" #: stabs.c:279 msgid "%B(%A+0x%lx): Stabs entry has invalid string index." msgstr "%B(%A+0x%lx): La entrada de cabos tiene una cadena índice inválida." -#: syms.c:1057 +#: syms.c:1079 msgid "Unsupported .stab relocation" msgstr "No se admite la reubicación .stab" -#: vms-gsd.c:338 +#: vms-gsd.c:350 #, c-format msgid "bfd_make_section (%s) failed" msgstr "bfd_make_section (%s) falló" -#: vms-gsd.c:353 +#: vms-gsd.c:365 #, c-format msgid "bfd_set_section_flags (%s, %x) failed" msgstr "bfd_set_section_flags (%s, %x) falló" -#: vms-gsd.c:388 +#: vms-gsd.c:399 #, c-format msgid "Size mismatch section %s=%lx, %s=%lx" msgstr "No coincide el tamaño de la sección %s=%lx, %s=%lx" -#: vms-gsd.c:679 +#: vms-gsd.c:754 #, c-format -msgid "unknown gsd/egsd subtype %d" -msgstr "subtipo de gsd/egsd %d desconocido" +msgid "Unknown GSD/EGSD subtype %d" +msgstr "Subtipo de GSD/EGSD %d desconocido" -#: vms-hdr.c:328 +#: vms-hdr.c:364 msgid "Object module NOT error-free !\n" msgstr "¡ El módulo objeto NO está libre de errores !\n" -#: vms-misc.c:474 +#: vms-hdr.c:878 +#, c-format +msgid "unknown source command %d" +msgstr "orden fuente %d desconocida" + +#: vms-hdr.c:951 +msgid "DST_S_C_SET_LINUM_INCR not implemented" +msgstr "DST_S_C_SET_LINUM_INCR sin implementar" + +#: vms-hdr.c:957 +msgid "DST_S_C_SET_LINUM_INCR_W not implemented" +msgstr "DST_S_C_SET_LINUM_INCR_W sin implementar" + +#: vms-hdr.c:963 +msgid "DST_S_C_RESET_LINUM_INCR not implemented" +msgstr "DST_S_C_RESET_LINUM_INCR sin implementar" + +#: vms-hdr.c:969 +msgid "DST_S_C_BEG_STMT_MODE not implemented" +msgstr "DST_S_C_BEG_STMT_MODE sin implementar" + +#: vms-hdr.c:975 +msgid "DST_S_C_END_STMT_MODE not implemented" +msgstr "DST_S_C_END_STMT_MODE sin implementar" + +#: vms-hdr.c:1008 +msgid "DST_S_C_SET_PC not implemented" +msgstr "DST_S_C_SET_PC sin implementar" + +#: vms-hdr.c:1014 +msgid "DST_S_C_SET_PC_W not implemented" +msgstr "DST_S_C_SET_PC_W sin implementar" + +#: vms-hdr.c:1020 +msgid "DST_S_C_SET_PC_L not implemented" +msgstr "DST_S_C_SET_PC_L sin implementar" + +#: vms-hdr.c:1026 +msgid "DST_S_C_SET_STMTNUM not implemented" +msgstr "DST_S_C_SET_STMTNUM sin implementar" + +#: vms-hdr.c:1079 +#, c-format +msgid "unknown line command %d" +msgstr "orden de línea %d desconocida" + +#: vms-misc.c:588 #, c-format msgid "Stack overflow (%d) in _bfd_vms_push" msgstr "Desbordamiento de la pila (%d) en _bfd_vms_push" -#: vms-misc.c:489 +#: vms-misc.c:603 msgid "Stack underflow in _bfd_vms_pop" msgstr "Desbordamiento por debajo de la pila en _bfd_vms_pop" -#: vms-misc.c:803 +#: vms-misc.c:844 msgid "_bfd_vms_output_counted called with zero bytes" msgstr "se llamó _bfd_vms_output_counted con cero bytes" -#: vms-misc.c:808 +#: vms-misc.c:849 msgid "_bfd_vms_output_counted called with too many bytes" msgstr "se llamó _bfd_vms_output_counted con demasiados bytes" -#: vms-misc.c:926 +#: vms-misc.c:967 #, c-format msgid "Symbol %s replaced by %s\n" -msgstr "El símbolo %s fue reemplazado por %s\n" +msgstr "Se reemplazó el símbolo %s por %s\n" -#: vms-misc.c:985 +#: vms-misc.c:1026 #, c-format msgid "failed to enter %s" msgstr "falló la introducción de %s" -#: vms-tir.c:57 +#: vms-tir.c:83 msgid "No Mem !" msgstr "¡ No hay Memoria !" -#: vms-tir.c:300 +#. These names have not yet been added to this switch statement. +#: vms-tir.c:346 +#, c-format +msgid "unknown ETIR command %d" +msgstr "orden ETIR %d desconocida" + +#: vms-tir.c:440 #, c-format msgid "bad section index in %s" -msgstr "Índice de sección erróneo en %s" +msgstr "índice de sección erróneo en %s" -#: vms-tir.c:313 +#: vms-tir.c:459 #, c-format msgid "unsupported STA cmd %s" msgstr "no se admite la orden STA %s" -#: vms-tir.c:318 vms-tir.c:1120 +#: vms-tir.c:464 vms-tir.c:1304 #, c-format msgid "reserved STA cmd %d" msgstr "orden STA %d reservada" -#: vms-tir.c:410 vms-tir.c:432 -#, c-format -msgid "%s: no symbol \"%s\"" -msgstr "%s: no existe el símbolo \"%s\"" - #. Unsigned shift. #. Rotate. #. Redefine symbol to current location. #. Define a literal. -#: vms-tir.c:497 vms-tir.c:606 vms-tir.c:704 vms-tir.c:721 vms-tir.c:728 -#: vms-tir.c:736 vms-tir.c:1440 +#: vms-tir.c:655 vms-tir.c:774 vms-tir.c:894 vms-tir.c:1624 #, c-format msgid "%s: not supported" msgstr "%s: no se admite" -#: vms-tir.c:502 vms-tir.c:1297 +#: vms-tir.c:661 vms-tir.c:1481 #, c-format msgid "%s: not implemented" msgstr "%s: sin implementar" -#: vms-tir.c:506 vms-tir.c:1301 +#: vms-tir.c:666 vms-tir.c:1485 #, c-format msgid "reserved STO cmd %d" msgstr "orden STO %d reservada" -#: vms-tir.c:621 vms-tir.c:1445 +#: vms-tir.c:789 vms-tir.c:1629 #, c-format msgid "reserved OPR cmd %d" msgstr "orden OPR %d reservada" -#: vms-tir.c:681 vms-tir.c:1509 +#: vms-tir.c:852 vms-tir.c:1693 #, c-format msgid "reserved CTL cmd %d" msgstr "orden CTL %d reservada" +#: vms-tir.c:966 +#, c-format +msgid "reserved STC cmd %d" +msgstr "orden STC %d reservada" + #. stack byte from image #. arg: none. -#: vms-tir.c:1028 +#: vms-tir.c:1212 msgid "stack-from-image not implemented" msgstr "pila-desde-imagen sin implementar" -#: vms-tir.c:1046 +#: vms-tir.c:1230 msgid "stack-entry-mask not fully implemented" msgstr "pila-máscara-entrada no está completamente implementado" @@ -3136,275 +3552,294 @@ msgstr "pila-m #. #. compare argument descriptor with symbol argument (ARG$V_PASSMECH) #. and stack TRUE (args match) or FALSE (args dont match) value. -#: vms-tir.c:1060 +#: vms-tir.c:1244 msgid "PASSMECH not fully implemented" msgstr "PASSMECH no está completamente implementado" -#: vms-tir.c:1079 +#: vms-tir.c:1263 msgid "stack-local-symbol not fully implemented" msgstr "pila-símbolo-local no está completamente implementado" -#: vms-tir.c:1092 +#: vms-tir.c:1276 msgid "stack-literal not fully implemented" msgstr "pila-literal no está completamente implementado" -#: vms-tir.c:1113 +#: vms-tir.c:1297 msgid "stack-local-symbol-entry-point-mask not fully implemented" msgstr "pila-símbolo-local-máscara-punto-entrada no está completamente implementado" -#: vms-tir.c:1387 vms-tir.c:1399 vms-tir.c:1411 vms-tir.c:1423 vms-tir.c:1488 -#: vms-tir.c:1496 vms-tir.c:1504 +#: vms-tir.c:1571 vms-tir.c:1583 vms-tir.c:1595 vms-tir.c:1607 vms-tir.c:1672 +#: vms-tir.c:1680 vms-tir.c:1688 #, c-format msgid "%s: not fully implemented" msgstr "%s: no está completamente implementado" -#: vms-tir.c:1562 +#: vms-tir.c:1746 #, c-format msgid "obj code %d not found" msgstr "no se encontró el código objeto %d" -#: vms-tir.c:1870 +#: vms-tir.c:2019 +#, c-format +msgid "Reloc size error in section %s" +msgstr "Error del tamaño de reubicación en la sección %s" + +#: vms-tir.c:2112 vms-tir.c:2129 vms-tir.c:2147 vms-tir.c:2159 vms-tir.c:2170 +#: vms-tir.c:2182 +#, c-format +msgid "Unknown reloc %s + %s" +msgstr "Reubicación %s + %s desconocida" + +#: vms-tir.c:2249 +#, c-format +msgid "Unknown symbol %s in command %s" +msgstr "Símbolo %s desconocido en la orden %s" + +#: vms-tir.c:2504 #, c-format msgid "SEC_RELOC with no relocs in section %s" msgstr "SEC_RELOC sin reubicaciones en la sección %s" -#: vms-tir.c:2152 +#: vms-tir.c:2556 vms-tir.c:2783 +#, c-format +msgid "Size error in section %s" +msgstr "Error de tamaño en la sección %s" + +#: vms-tir.c:2725 +msgid "Spurious ALPHA_R_BSR reloc" +msgstr "Reubicación ALPHA_R_BSR espuria" + +#: vms-tir.c:2770 #, c-format msgid "Unhandled relocation %s" msgstr "Reubicación %s sin manejar" -#: xcofflink.c:566 +#: xcofflink.c:836 #, c-format msgid "%s: XCOFF shared object when not producing XCOFF output" msgstr "%s: objeto compartido XCOFF cuando no se produce salida XCOFF" -#: xcofflink.c:587 +#: xcofflink.c:857 #, c-format msgid "%s: dynamic object with no .loader section" msgstr "%s: objeto dinámico sin sección .loader" -#: xcofflink.c:1150 +#: xcofflink.c:1415 msgid "%B: `%s' has line numbers but no enclosing section" msgstr "%B: `%s' tiene números de línea pero no una sección contenedora" -#: xcofflink.c:1202 +#: xcofflink.c:1467 msgid "%B: class %d symbol `%s' has no aux entries" msgstr "%B: clase %d símbolo `%s' no tiene entradas auxiliares" -#: xcofflink.c:1225 +#: xcofflink.c:1489 msgid "%B: symbol `%s' has unrecognized csect type %d" msgstr "%B: el símbolo `%s' tiene un tipo csect %d que no se reconoce" -#: xcofflink.c:1237 +#: xcofflink.c:1501 msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d" msgstr "%B: símbolo XTY_ER `%s' erróneo: clase %d scnum %d scnlen %d" -#: xcofflink.c:1273 +#: xcofflink.c:1530 msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d" msgstr "%B: símbolo XMC_TCO `%s' es clase %d scnlen %d" -#: xcofflink.c:1419 +#: xcofflink.c:1676 msgid "%B: csect `%s' not in enclosing section" msgstr "%B: csect `%s' no está contenido en una sección" -#: xcofflink.c:1526 +#: xcofflink.c:1783 msgid "%B: misplaced XTY_LD `%s'" msgstr "%B: XTY_LD `%s' mal ubicado" -#: xcofflink.c:1842 +#: xcofflink.c:2102 msgid "%B: reloc %s:%d not in csect" msgstr "%B: la reubicación %s:%d no está en csect" -#: xcofflink.c:2640 +#: xcofflink.c:3177 #, c-format msgid "%s: no such symbol" msgstr "%s: no hay tal símbolo" -#: xcofflink.c:2869 +#: xcofflink.c:3282 #, c-format msgid "warning: attempt to export undefined symbol `%s'" -msgstr "aviso: intento de exportar el símbolo sin definir `%s'" +msgstr "aviso: se intenta exportar el símbolo sin definir `%s'" -#: xcofflink.c:3036 +#: xcofflink.c:3664 msgid "error: undefined symbol __rtinit" -msgstr "error: símbolo __rtinit indefinido" - -#: xcofflink.c:3656 -#, c-format -msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" -msgstr "Desbordamiento de TOC: 0x%lx > 0x10000; pruebe -mminimal-toc al compilar" +msgstr "error: símbolo __rtinit sin definir" -#: xcofflink.c:4492 -msgid "%B: loader reloc in unrecognized section `%A'" -msgstr "%B: reubicación del cargador en la sección `%A' no reconocida" +#: xcofflink.c:4041 +msgid "%B: loader reloc in unrecognized section `%s'" +msgstr "%B: reubicación del cargador en la sección `%s' que no se reconoce" -#: xcofflink.c:4513 +#: xcofflink.c:4052 msgid "%B: `%s' in loader reloc but not loader sym" msgstr "%B: `%s' en la reubicación del cargador pero no es un símbolo del cargador" -#: xcofflink.c:4528 +#: xcofflink.c:4068 msgid "%B: loader reloc in read-only section %A" msgstr "%B: reubicación del cargador en la sección de sólo lectura %A" -#: xcofflink.c:4937 xcofflink.c:4999 xcofflink.c:5294 -#, c-format -msgid "%s: loader reloc in unrecognized section `%s'" -msgstr "%s: reubicación del cargador en la sección `%s' no reconocida" - -#: xcofflink.c:5305 +#: xcofflink.c:5086 #, c-format -msgid "%s: `%s' in loader reloc but not loader sym" -msgstr "%s: `%s' en la reubicación del cargador pero no es un símbolo del cargador" +msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" +msgstr "Desbordamiento de TOC: 0x%lx > 0x10000; pruebe -mminimal-toc al compilar" -#: elf32-ia64.c:1169 elf64-ia64.c:1169 +#: elf32-ia64.c:1050 elf64-ia64.c:1050 msgid "%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch." msgstr "%B: No se puede relajar br en 0x%lx en la sección `%A'. Por favor use brl o ramificación indirecta." -#: elf32-ia64.c:2910 elf64-ia64.c:2910 +#: elf32-ia64.c:2739 elf64-ia64.c:2739 msgid "@pltoff reloc against local symbol" msgstr "reubicación @pltoff contra un símbolo local" -#: elf32-ia64.c:4523 elf64-ia64.c:4523 +#: elf32-ia64.c:4314 elf64-ia64.c:4314 #, c-format msgid "%s: short data segment overflowed (0x%lx >= 0x400000)" msgstr "%s: segmento de datos short desbordado (0x%lx >= 0x400000)" -#: elf32-ia64.c:4534 elf64-ia64.c:4534 +#: elf32-ia64.c:4325 elf64-ia64.c:4325 #, c-format msgid "%s: __gp does not cover short data segment" msgstr "%s: __gp no cubre el segmento de datos short" -#: elf32-ia64.c:4808 elf64-ia64.c:4808 +#: elf32-ia64.c:4595 elf64-ia64.c:4595 msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'" msgstr "%B: código que no es pic con reubicación imm contra el símbolo dinámico %s" -#: elf32-ia64.c:4875 elf64-ia64.c:4875 +#: elf32-ia64.c:4662 elf64-ia64.c:4662 msgid "%B: @gprel relocation against dynamic symbol %s" msgstr "%B: reubicación @gprel contra el símbolo dinámico %s" -#: elf32-ia64.c:4938 elf64-ia64.c:4938 +#: elf32-ia64.c:4725 elf64-ia64.c:4725 msgid "%B: linking non-pic code in a position independent executable" msgstr "%B: se enlaza código que no es pic en un ejecutable independiente de posición" -#: elf32-ia64.c:5075 elf64-ia64.c:5075 +#: elf32-ia64.c:4862 elf64-ia64.c:4862 msgid "%B: @internal branch to dynamic symbol %s" msgstr "%B: ramificación @internal al símbolo dinámico %s" -#: elf32-ia64.c:5077 elf64-ia64.c:5077 +#: elf32-ia64.c:4864 elf64-ia64.c:4864 msgid "%B: speculation fixup to dynamic symbol %s" msgstr "%B: compostura de especulación al símbolo dinámico %s" -#: elf32-ia64.c:5079 elf64-ia64.c:5079 +#: elf32-ia64.c:4866 elf64-ia64.c:4866 msgid "%B: @pcrel relocation against dynamic symbol %s" msgstr "%B: reubicación @pcrel contra el símbolo dinámico %s" -#: elf32-ia64.c:5279 elf64-ia64.c:5279 +#: elf32-ia64.c:5063 elf64-ia64.c:5063 msgid "unsupported reloc" msgstr "no se admite la reubicación" -#: elf32-ia64.c:5312 elf64-ia64.c:5312 +#: elf32-ia64.c:5101 elf64-ia64.c:5101 +msgid "%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'." +msgstr "%B: falta la sección TLS para la reubicación %s contra `%s' en 0x%lx en la sección `%A'." + +#: elf32-ia64.c:5116 elf64-ia64.c:5116 msgid "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)." msgstr "%B: No se puede relajar br (%s) a `%s' en 0x%lx en la sección `%A' con tamaño 0x%lx (> 0x1000000)." -#: elf32-ia64.c:5573 elf64-ia64.c:5573 +#: elf32-ia64.c:5372 elf64-ia64.c:5372 msgid "%B: linking trap-on-NULL-dereference with non-trapping files" msgstr "%B: se enlaza deferencias-captura-en-NULL con ficheros que no son de captura" -#: elf32-ia64.c:5582 elf64-ia64.c:5582 +#: elf32-ia64.c:5381 elf64-ia64.c:5381 msgid "%B: linking big-endian files with little-endian files" msgstr "%B: se enlazan ficheros big-endian con ficheros little-endian" -#: elf32-ia64.c:5591 elf64-ia64.c:5591 +#: elf32-ia64.c:5390 elf64-ia64.c:5390 msgid "%B: linking 64-bit files with 32-bit files" msgstr "%B: se enlazan ficheros de 64-bit con ficheros de 32-bit" -#: elf32-ia64.c:5600 elf64-ia64.c:5600 +#: elf32-ia64.c:5399 elf64-ia64.c:5399 msgid "%B: linking constant-gp files with non-constant-gp files" msgstr "%B: se enlazan ficheros de gp constante con ficheros con gp no constante" -#: elf32-ia64.c:5610 elf64-ia64.c:5610 +#: elf32-ia64.c:5409 elf64-ia64.c:5409 msgid "%B: linking auto-pic files with non-auto-pic files" msgstr "%B: se enlazan ficheros de pic automático con ficheros sin pic automático" -#: peigen.c:1000 pepigen.c:1000 pex64igen.c:1000 +#: peigen.c:999 pepigen.c:999 pex64igen.c:999 #, c-format msgid "%s: line number overflow: 0x%lx > 0xffff" msgstr "%s: desbordamiento de número de línea: 0x%lx > 0xffff" -#: peigen.c:1027 pepigen.c:1027 pex64igen.c:1027 +#: peigen.c:1026 pepigen.c:1026 pex64igen.c:1026 msgid "Export Directory [.edata (or where ever we found it)]" msgstr "Directorio de Exportación [.edata (o donde quiera que se encuentre)]" -#: peigen.c:1028 pepigen.c:1028 pex64igen.c:1028 +#: peigen.c:1027 pepigen.c:1027 pex64igen.c:1027 msgid "Import Directory [parts of .idata]" msgstr "Directorio de Importación [partes de .idata]" -#: peigen.c:1029 pepigen.c:1029 pex64igen.c:1029 +#: peigen.c:1028 pepigen.c:1028 pex64igen.c:1028 msgid "Resource Directory [.rsrc]" msgstr "Directorio de Recursos [.rsrc]" -#: peigen.c:1030 pepigen.c:1030 pex64igen.c:1030 +#: peigen.c:1029 pepigen.c:1029 pex64igen.c:1029 msgid "Exception Directory [.pdata]" msgstr "Directorio de Excepciones [.pdata]" -#: peigen.c:1031 pepigen.c:1031 pex64igen.c:1031 +#: peigen.c:1030 pepigen.c:1030 pex64igen.c:1030 msgid "Security Directory" msgstr "Directorio de Seguridad" -#: peigen.c:1032 pepigen.c:1032 pex64igen.c:1032 +#: peigen.c:1031 pepigen.c:1031 pex64igen.c:1031 msgid "Base Relocation Directory [.reloc]" msgstr "Directorio de Reubicación Base [.reloc]" -#: peigen.c:1033 pepigen.c:1033 pex64igen.c:1033 +#: peigen.c:1032 pepigen.c:1032 pex64igen.c:1032 msgid "Debug Directory" msgstr "Directorio de Depuración" -#: peigen.c:1034 pepigen.c:1034 pex64igen.c:1034 +#: peigen.c:1033 pepigen.c:1033 pex64igen.c:1033 msgid "Description Directory" msgstr "Directorio de Descripciones" -#: peigen.c:1035 pepigen.c:1035 pex64igen.c:1035 +#: peigen.c:1034 pepigen.c:1034 pex64igen.c:1034 msgid "Special Directory" msgstr "Directorio Especial" -#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036 +#: peigen.c:1035 pepigen.c:1035 pex64igen.c:1035 msgid "Thread Storage Directory [.tls]" msgstr "Directorio de Almacenamiento de Hilos [.tls]" -#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037 +#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036 msgid "Load Configuration Directory" msgstr "Directorio de Carga de Configuraciones" -#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038 +#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037 msgid "Bound Import Directory" msgstr "Directorio de Importación de Relaciones" -#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039 +#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038 msgid "Import Address Table Directory" -msgstr "Directorio de Importación de Tablas de Direcciones" +msgstr "Directorio de Tablas de Direcciones de Importación" -#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040 +#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039 msgid "Delay Import Directory" msgstr "Directorio de Retardo de Importación" -#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041 +#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040 msgid "CLR Runtime Header" msgstr "Encabezado de Tiempo de Ejecución CLR" -#: peigen.c:1042 pepigen.c:1042 pex64igen.c:1042 +#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041 msgid "Reserved" msgstr "Reservado" -#: peigen.c:1102 pepigen.c:1102 pex64igen.c:1102 +#: peigen.c:1101 pepigen.c:1101 pex64igen.c:1101 #, c-format msgid "" "\n" "There is an import table, but the section containing it could not be found\n" msgstr "" "\n" -"Hay una tabla de importación, pero la sección que la contiene no se puede encontrar\n" +"Hay una tabla de importación, pero no se puede encontrar la sección que la contiene\n" -#: peigen.c:1107 pepigen.c:1107 pex64igen.c:1107 +#: peigen.c:1106 pepigen.c:1106 pex64igen.c:1106 #, c-format msgid "" "\n" @@ -3413,7 +3848,7 @@ msgstr "" "\n" "Hay una tabla de importación en %s en 0x%lx\n" -#: peigen.c:1150 pepigen.c:1150 pex64igen.c:1150 +#: peigen.c:1149 pepigen.c:1149 pex64igen.c:1149 #, c-format msgid "" "\n" @@ -3422,12 +3857,12 @@ msgstr "" "\n" "Se localizó el descriptor de función en la dirección de inicio: %04lx\n" -#: peigen.c:1153 pepigen.c:1153 pex64igen.c:1153 +#: peigen.c:1152 pepigen.c:1152 pex64igen.c:1152 #, c-format msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n" msgstr "\tcódigo-base %08lx tabla-de-contenidos (cargable/actual) %08lx/%08lx\n" -#: peigen.c:1161 pepigen.c:1161 pex64igen.c:1161 +#: peigen.c:1160 pepigen.c:1160 pex64igen.c:1160 #, c-format msgid "" "\n" @@ -3436,7 +3871,7 @@ msgstr "" "\n" "¡No está la sección reldata! No se decodificó el descriptor de función.\n" -#: peigen.c:1166 pepigen.c:1166 pex64igen.c:1166 +#: peigen.c:1165 pepigen.c:1165 pex64igen.c:1165 #, c-format msgid "" "\n" @@ -3445,7 +3880,7 @@ msgstr "" "\n" "Las Tablas de Importación (se interpretaron los contenidos de la sección %s)\n" -#: peigen.c:1169 pepigen.c:1169 pex64igen.c:1169 +#: peigen.c:1168 pepigen.c:1168 pex64igen.c:1168 #, c-format msgid "" " vma: Hint Time Forward DLL First\n" @@ -3454,7 +3889,7 @@ msgstr "" " vma: Pista Fecha Adelante DLL Primero\n" " Tabla Estampa Cadena Nombre Thunk\n" -#: peigen.c:1217 pepigen.c:1217 pex64igen.c:1217 +#: peigen.c:1216 pepigen.c:1216 pex64igen.c:1216 #, c-format msgid "" "\n" @@ -3463,30 +3898,30 @@ msgstr "" "\n" "\tNombre de la DLL: %s\n" -#: peigen.c:1228 pepigen.c:1228 pex64igen.c:1228 +#: peigen.c:1227 pepigen.c:1227 pex64igen.c:1227 #, c-format msgid "\tvma: Hint/Ord Member-Name Bound-To\n" msgstr "\tvma: Pista/Ord Nombre-Miembro Unido-A\n" -#: peigen.c:1253 pepigen.c:1253 pex64igen.c:1253 +#: peigen.c:1252 pepigen.c:1252 pex64igen.c:1252 #, c-format msgid "" "\n" "There is a first thunk, but the section containing it could not be found\n" msgstr "" "\n" -"Hay un thunk inicial, pero la sección que lo contiene no se puede encontrar\n" +"Hay un thunk inicial, pero no se puede encontrar la sección que lo contiene\n" -#: peigen.c:1418 pepigen.c:1418 pex64igen.c:1418 +#: peigen.c:1417 pepigen.c:1417 pex64igen.c:1417 #, c-format msgid "" "\n" "There is an export table, but the section containing it could not be found\n" msgstr "" "\n" -"Hay una tabla de exportación, pero la sección que la contiene no se puede encontrar\n" +"Hay una tabla de exportación, pero no se puede encontrar la sección que la contiene\n" -#: peigen.c:1427 pepigen.c:1427 pex64igen.c:1427 +#: peigen.c:1426 pepigen.c:1426 pex64igen.c:1426 #, c-format msgid "" "\n" @@ -3495,7 +3930,7 @@ msgstr "" "\n" "Hay una tabla de exportación en %s, pero no cabe en esa sección\n" -#: peigen.c:1433 pepigen.c:1433 pex64igen.c:1433 +#: peigen.c:1432 pepigen.c:1432 pex64igen.c:1432 #, c-format msgid "" "\n" @@ -3504,7 +3939,7 @@ msgstr "" "\n" "Hay una tabla de exportación en %s en 0x%lx\n" -#: peigen.c:1461 pepigen.c:1461 pex64igen.c:1461 +#: peigen.c:1460 pepigen.c:1460 pex64igen.c:1460 #, c-format msgid "" "\n" @@ -3515,68 +3950,68 @@ msgstr "" "Las Tablas de Exportación (se interpretaron los contenidos de la sección %s)\n" "\n" -#: peigen.c:1465 pepigen.c:1465 pex64igen.c:1465 +#: peigen.c:1464 pepigen.c:1464 pex64igen.c:1464 #, c-format msgid "Export Flags \t\t\t%lx\n" msgstr "Opciones de Exportación \t\t\t%lx\n" -#: peigen.c:1468 pepigen.c:1468 pex64igen.c:1468 +#: peigen.c:1467 pepigen.c:1467 pex64igen.c:1467 #, c-format msgid "Time/Date stamp \t\t%lx\n" msgstr "marca de Hora/Fecha \t\t%lx\n" -#: peigen.c:1471 pepigen.c:1471 pex64igen.c:1471 +#: peigen.c:1470 pepigen.c:1470 pex64igen.c:1470 #, c-format msgid "Major/Minor \t\t\t%d/%d\n" msgstr "Mayor/Menor \t\t\t%d/%d\n" -#: peigen.c:1474 pepigen.c:1474 pex64igen.c:1474 +#: peigen.c:1473 pepigen.c:1473 pex64igen.c:1473 #, c-format msgid "Name \t\t\t\t" msgstr "Nombre \t\t\t\t" -#: peigen.c:1480 pepigen.c:1480 pex64igen.c:1480 +#: peigen.c:1479 pepigen.c:1479 pex64igen.c:1479 #, c-format msgid "Ordinal Base \t\t\t%ld\n" msgstr "Base Ordinal \t\t\t%ld\n" -#: peigen.c:1483 pepigen.c:1483 pex64igen.c:1483 +#: peigen.c:1482 pepigen.c:1482 pex64igen.c:1482 #, c-format msgid "Number in:\n" msgstr "Número en:\n" -#: peigen.c:1486 pepigen.c:1486 pex64igen.c:1486 +#: peigen.c:1485 pepigen.c:1485 pex64igen.c:1485 #, c-format msgid "\tExport Address Table \t\t%08lx\n" msgstr "\tTabla de Exportación de Direcciones \t\t%08lx\n" -#: peigen.c:1490 pepigen.c:1490 pex64igen.c:1490 +#: peigen.c:1489 pepigen.c:1489 pex64igen.c:1489 #, c-format msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n" msgstr "\tTabla [Nombre Puntero/Ordinal]\t%08lx\n" -#: peigen.c:1493 pepigen.c:1493 pex64igen.c:1493 +#: peigen.c:1492 pepigen.c:1492 pex64igen.c:1492 #, c-format msgid "Table Addresses\n" msgstr "Direcciones de la Tabla\n" -#: peigen.c:1496 pepigen.c:1496 pex64igen.c:1496 +#: peigen.c:1495 pepigen.c:1495 pex64igen.c:1495 #, c-format msgid "\tExport Address Table \t\t" msgstr "\tTabla de Exportación de Direcciones \t\t" -#: peigen.c:1501 pepigen.c:1501 pex64igen.c:1501 +#: peigen.c:1500 pepigen.c:1500 pex64igen.c:1500 #, c-format msgid "\tName Pointer Table \t\t" msgstr "\tNombre de la Tabla de Punteros \t\t" # continuar aqui -#: peigen.c:1506 pepigen.c:1506 pex64igen.c:1506 +#: peigen.c:1505 pepigen.c:1505 pex64igen.c:1505 #, c-format msgid "\tOrdinal Table \t\t\t" msgstr "\tTabla Ordinal \t\t\t" -#: peigen.c:1520 pepigen.c:1520 pex64igen.c:1520 +#: peigen.c:1519 pepigen.c:1519 pex64igen.c:1519 #, c-format msgid "" "\n" @@ -3585,15 +4020,15 @@ msgstr "" "\n" "Tabla de Exportación de Direcciones -- Base Ordinal %ld\n" -#: peigen.c:1539 pepigen.c:1539 pex64igen.c:1539 +#: peigen.c:1538 pepigen.c:1538 pex64igen.c:1538 msgid "Forwarder RVA" msgstr "RVA Adelantador" -#: peigen.c:1550 pepigen.c:1550 pex64igen.c:1550 +#: peigen.c:1549 pepigen.c:1549 pex64igen.c:1549 msgid "Export RVA" msgstr "RVA Exportador" -#: peigen.c:1557 pepigen.c:1557 pex64igen.c:1557 +#: peigen.c:1556 pepigen.c:1556 pex64igen.c:1556 #, c-format msgid "" "\n" @@ -3602,26 +4037,18 @@ msgstr "" "\n" "Tabla [Puntero a Ordinal/Nombre]\n" -#: peigen.c:1610 pepigen.c:1610 pex64igen.c:1610 +#: peigen.c:1616 peigen.c:1795 pepigen.c:1616 pepigen.c:1795 pex64igen.c:1616 +#: pex64igen.c:1795 #, c-format msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n" msgstr "Aviso, el tamaño de la sección .pdata (%ld) no es un múltiplo de %d\n" -#: peigen.c:1614 pepigen.c:1614 pex64igen.c:1614 -#, c-format -msgid "" -"\n" -"The Function Table (interpreted .pdata section contents)\n" -msgstr "" -"\n" -"La Tabla de Funciones (se interpretaron los contenidos de la sección .pdata)\n" - -#: peigen.c:1617 pepigen.c:1617 pex64igen.c:1617 +#: peigen.c:1623 pepigen.c:1623 pex64igen.c:1623 #, c-format msgid " vma:\t\t\tBegin Address End Address Unwind Info\n" msgstr " vma:\t\t\tDirección Inicio Dirección Fin Información Desenvuelta\n" -#: peigen.c:1619 pepigen.c:1619 pex64igen.c:1619 +#: peigen.c:1625 pepigen.c:1625 pex64igen.c:1625 #, c-format msgid "" " vma:\t\tBegin End EH EH PrologEnd Exception\n" @@ -3630,22 +4057,31 @@ msgstr "" " vma:\t\tInicio Fin EH EH FinPrólogo Excepción\n" " \t\tDirecc Direcc Asa Datos Dirección Máscara\n" -#: peigen.c:1689 pepigen.c:1689 pex64igen.c:1689 +#: peigen.c:1695 pepigen.c:1695 pex64igen.c:1695 #, c-format msgid " Register save millicode" msgstr " Registro para guardar milicódigo" -#: peigen.c:1692 pepigen.c:1692 pex64igen.c:1692 +#: peigen.c:1698 pepigen.c:1698 pex64igen.c:1698 #, c-format msgid " Register restore millicode" msgstr " Registro para restaurar milicódigo" -#: peigen.c:1695 pepigen.c:1695 pex64igen.c:1695 +#: peigen.c:1701 pepigen.c:1701 pex64igen.c:1701 #, c-format msgid " Glue code sequence" msgstr " Secuencia de código pegamento" -#: peigen.c:1745 pepigen.c:1745 pex64igen.c:1745 +#: peigen.c:1801 pepigen.c:1801 pex64igen.c:1801 +#, c-format +msgid "" +" vma:\t\tBegin Prolog Function Flags Exception EH\n" +" \t\tAddress Length Length 32b exc Handler Data\n" +msgstr "" +" vma:\t\tInicio Prólogo Función Opciones Excepción EH\n" +" \t\tDirecc Longitud Longitud 32b exc Manejador Datos\n" + +#: peigen.c:1933 pepigen.c:1933 pex64igen.c:1933 #, c-format msgid "" "\n" @@ -3656,7 +4092,7 @@ msgstr "" "\n" "Reubicaciones de Fichero Base PE (se interpretaron los contenidos de la sección .reloc)\n" -#: peigen.c:1775 pepigen.c:1775 pex64igen.c:1775 +#: peigen.c:1963 pepigen.c:1963 pex64igen.c:1963 #, c-format msgid "" "\n" @@ -3665,7 +4101,7 @@ msgstr "" "\n" "Dirección Virtual: %08lx Tamaño del trozo %ld (0x%lx) Número de composturas %ld\n" -#: peigen.c:1788 pepigen.c:1788 pex64igen.c:1788 +#: peigen.c:1976 pepigen.c:1976 pex64igen.c:1976 #, c-format msgid "\treloc %4d offset %4x [%4lx] %s" msgstr "\treubicación %4d desplazamiento %4x [%4lx] %s" @@ -3673,7 +4109,7 @@ msgstr "\treubicaci #. The MS dumpbin program reportedly ands with 0xff0f before #. printing the characteristics field. Not sure why. No reason to #. emulate it here. -#: peigen.c:1827 pepigen.c:1827 pex64igen.c:1827 +#: peigen.c:2015 pepigen.c:2015 pex64igen.c:2015 #, c-format msgid "" "\n" @@ -3682,26 +4118,74 @@ msgstr "" "\n" "Características 0x%x\n" -#: peigen.c:2088 pepigen.c:2088 pex64igen.c:2088 +#: peigen.c:2292 pepigen.c:2292 pex64igen.c:2292 msgid "%B: unable to fill in DataDictionary[1] because .idata$2 is missing" msgstr "%B: no se puede llenar DataDictionary[1] porque falta .idata$2" -#: peigen.c:2106 pepigen.c:2106 pex64igen.c:2106 +#: peigen.c:2312 pepigen.c:2312 pex64igen.c:2312 msgid "%B: unable to fill in DataDictionary[1] because .idata$4 is missing" msgstr "%B: no se puede llenar DataDictionary[1] porque falta .idata$4" -#: peigen.c:2125 pepigen.c:2125 pex64igen.c:2125 +#: peigen.c:2333 pepigen.c:2333 pex64igen.c:2333 msgid "%B: unable to fill in DataDictionary[12] because .idata$5 is missing" msgstr "%B: no se puede llenar DataDictionary[12] porque falta .idata$5" -#: peigen.c:2143 pepigen.c:2143 pex64igen.c:2143 +#: peigen.c:2353 pepigen.c:2353 pex64igen.c:2353 msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing" msgstr "%B: no se puede llenar DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] porque falta .idata$6" -#: peigen.c:2163 pepigen.c:2163 pex64igen.c:2163 +#: peigen.c:2375 pepigen.c:2375 pex64igen.c:2375 msgid "%B: unable to fill in DataDictionary[9] because __tls_used is missing" msgstr "%B: no se puede llenar DataDictionary[9] porque falta __tls_used" +#~ msgid "ERROR: %B: Incompatible object tag '%s':%d" +#~ msgstr "ERROR: %B: Etiqueta de objeto '%s' incompatible:%d" + +#~ msgid "%B(%A): warning: unresolvable relocation against symbol `%s'" +#~ msgstr "%B(%A): aviso: reubicación sin resolución contra el símbolo `%s'" + +#~ msgid "%B: Internal inconsistency; no relocation section %s" +#~ msgstr "%B: Inconsistencia interna; no se encuentra la sección de reubicación %s" + +#~ msgid "Could not find relocation section for %s" +#~ msgstr "No se puede encontrar la sección de reubicación para %s" + +#~ msgid "%B: GOT overflow: Number of R_68K_GOT8O and R_68K_GOT16O relocations > %d" +#~ msgstr "%B desbordamiento de GOT: Número de reubicaciones R_68K_GOT80 Y R_68K_GOT160 > %d" + +#~ msgid "%A link_order not found\n" +#~ msgstr "no se encontró link_order %A\n" + +#~ msgid "%s: no symbol \"%s\"" +#~ msgstr "%s: no existe el símbolo \"%s\"" + +#~ msgid "%s: loader reloc in unrecognized section `%s'" +#~ msgstr "%s: reubicación del cargador en la sección `%s' no reconocida" + +#~ msgid "%s: `%s' in loader reloc but not loader sym" +#~ msgstr "%s: `%s' en la reubicación del cargador pero no es un símbolo del cargador" + +#~ msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)." +#~ msgstr "Error de Dwarf: El desplazamiento DW_FROM_strp (%lu) es más grande o igual que el tamaño de .debug_str (%lu)." + +#~ msgid "Dwarf Error: Can't find .debug_abbrev section." +#~ msgstr "Error de Dwarf: No se puede encontrar la sección .debug_abbrev." + +#~ msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)." +#~ msgstr "Error de Dwarf: El desplazamiento de abreviatura (%lu) es más grande o igual que el tamaño de .debug_abbrev (%lu)." + +#~ msgid "Dwarf Error: Can't find .debug_line section." +#~ msgstr "Error de Dwarf: No se puede encontrar lan sección .debug_line." + +#~ msgid "Dwarf Error: Can't find .debug_ranges section." +#~ msgstr "Error de Dwarf: No se puede encontrar lan sección .debug_ranges." + +#~ msgid "ERROR: %B: Conflicting definitions of wchar_t" +#~ msgstr "ERROR: %B: Definiciones en conflicto de wchar_t" + +#~ msgid "%B: relocation R_X86_64_PC32 against protected function `%s' can not be used when making a shared object" +#~ msgstr "%B: no se puede usar la reubicación R_X86_64_PC32 contra la función protegida `%' cuando se hace un objeto compartido" + #~ msgid "ERROR: %B: Conflicting enum sizes" #~ msgstr "ERROR: %B: Tamaños de enum en conflicto" @@ -3801,9 +4285,6 @@ msgstr "%B: no se puede llenar DataDictionary[9] porque falta __tls_used" #~ msgid "reloc against unsupported section" #~ msgstr "reubicación contra una sección no admitida" -#~ msgid "reloc not properly aligned" -#~ msgstr "reubicación no alineada adecuadamente" - #~ msgid "Error: First section in segment (%s) starts at 0x%x whereas the segment starts at 0x%x" #~ msgstr "Error: La primera sección en el segmento (%s) inicia en 0x%x mientras que el segmento inicia en 0x%x" @@ -3846,9 +4327,6 @@ msgstr "%B: no se puede llenar DataDictionary[9] porque falta __tls_used" #~ msgid "local symbols in discarded section %s" #~ msgstr "símbolos locales en la sección descartada %s" -#~ msgid "%s: linking abicalls files with non-abicalls files" -#~ msgstr "%s: se enlazan ficheros de llamadas abi con ficheros que no son de llamadas abi" - #~ msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)" #~ msgstr "%s: no coincide el ISA (-mips%d) con módulos previos (-mips%d)" @@ -3926,12 +4404,6 @@ msgstr "%B: no se puede llenar DataDictionary[9] porque falta __tls_used" #~ msgid "ETIR_S_C_STO_LP_PSB: Not supported" #~ msgstr "ETIR_S_C_STO_LP_PSB: No se admite" -#~ msgid "ETIR_S_C_STO_HINT_GBL: not implemented" -#~ msgstr "ETIR_S_C_STO_HINT_GBL: sin implementar" - -#~ msgid "ETIR_S_C_STO_HINT_PS: not implemented" -#~ msgstr "ETIR_S_C_STO_HINT_PS: sin implementar" - #~ msgid "ETIR_S_C_OPR_INSV: Not supported" #~ msgstr "ETIR_S_C_OPR_INSV: No se admite" diff --git a/cegcc/src/binutils/bfd/po/fi.po b/cegcc/src/binutils/bfd/po/fi.po index ce54a44b4..301f957a2 100644 --- a/cegcc/src/binutils/bfd/po/fi.po +++ b/cegcc/src/binutils/bfd/po/fi.po @@ -1,19 +1,20 @@ -# translation of bfd-2.17.90.po to Finnish -# Copyright (C) 2007 Free Software Foundation, Inc. +# translation of bfd-2.19.90.po to Finnish +# Copyright © 2007, 2009 Free Software Foundation, Inc. # This file is distributed under the same license as the binutils package. +# Jorma Karvonen , 2007, 2009. # -# Jorma Karvonen , 2007. msgid "" msgstr "" -"Project-Id-Version: bfd 2.17.90\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-08-06 16:21-0400\n" -"PO-Revision-Date: 2007-09-11 22:29+0300\n" -"Last-Translator: Jorma Karvonen \n" +"Project-Id-Version: bfd 2.19.90\n" +"Report-Msgid-Bugs-To: bug-binutils@gnu.org\n" +"POT-Creation-Date: 2009-09-07 14:05+0200\n" +"PO-Revision-Date: 2009-09-11 21:15+0200\n" +"Last-Translator: Jorma Karvonen \n" "Language-Team: Finnish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: KBabel 1.11.2\n" #: aout-adobe.c:127 @@ -33,153 +34,153 @@ msgstr "%B: Virheellinen sijoitustyyppi tuotu: %d" msgid "%B: Bad relocation record imported: %d" msgstr "%B: Väärä sijoitustietue tuotu: %d" -#: aoutx.h:1268 aoutx.h:1602 +#: aoutx.h:1271 aoutx.h:1609 #, c-format msgid "%s: can not represent section `%s' in a.out object file format" -msgstr "%s: ei voi edustaa lohkoa ”%s” ”a.out”-objektitiedostomuodossa" +msgstr "%s: ei voi edustaa lohkoa ’%s’ ”a.out”-objektitiedostomuodossa" -#: aoutx.h:1568 +#: aoutx.h:1575 #, c-format msgid "%s: can not represent section for symbol `%s' in a.out object file format" -msgstr "%s: ei voi edustaa lohkoa symbolille ”%s” ”a.out”-objektitiedostomuodossa" +msgstr "%s: ei voi edustaa lohkoa symbolille ’%s’ ”a.out”-objektitiedostomuodossa" -#: aoutx.h:1570 +#: aoutx.h:1577 msgid "*unknown*" msgstr "*tuntematon*" -#: aoutx.h:3987 aoutx.h:4313 +#: aoutx.h:3994 aoutx.h:4320 msgid "%P: %B: unexpected relocation type\n" msgstr "%P: %B: odottamaton sijoitustyyppi\n" -#: aoutx.h:5347 +#: aoutx.h:5354 #, c-format msgid "%s: relocatable link from %s to %s not supported" msgstr "%s: sijoitettava linkki kohteesta %s kohteeseen %s ei ole tuettu" -#: archive.c:1766 +#: archive.c:2056 msgid "Warning: writing archive was slow: rewriting timestamp\n" msgstr "Varoitus: arkiston kirjoitus oli hidasta: aikaleiman uudelleenkirjoitus\n" -#: archive.c:2029 +#: archive.c:2342 msgid "Reading archive file mod timestamp" msgstr "Luetaan arkistotiedoston muokkausaikaleima" # Intel coff armap -#: archive.c:2053 +#: archive.c:2366 msgid "Writing updated armap timestamp" msgstr "Kirjoitetaan päivitetty ”armap”-aikaleima" -#: bfd.c:289 +#: bfd.c:375 msgid "No error" msgstr "Ei virhettä" -#: bfd.c:290 +#: bfd.c:376 msgid "System call error" msgstr "Järjestelmäkutsuvirhe" -#: bfd.c:291 +#: bfd.c:377 msgid "Invalid bfd target" msgstr "Virheellinen bfd-kohde" -#: bfd.c:292 +#: bfd.c:378 msgid "File in wrong format" msgstr "Tiedosto väärässä muodossa" -#: bfd.c:293 +#: bfd.c:379 msgid "Archive object file in wrong format" msgstr "Arkisto-objektitiedosto väärässä muodossa" -#: bfd.c:294 +#: bfd.c:380 msgid "Invalid operation" msgstr "Virheellinen toiminta" -#: bfd.c:295 +#: bfd.c:381 msgid "Memory exhausted" msgstr "Muisti loppunut" -#: bfd.c:296 +#: bfd.c:382 msgid "No symbols" msgstr "Ei symboleja" -#: bfd.c:297 +#: bfd.c:383 msgid "Archive has no index; run ranlib to add one" -msgstr "Arkistossa ei ole hakemistoa; lisää sellainen ajamalla ranlib" +msgstr "Arkistossa ei ole hakemistoa; lisää sellainen suorittamalla ranlib" -#: bfd.c:298 +#: bfd.c:384 msgid "No more archived files" msgstr "Ei enää arkistoituja tiedostoja" -#: bfd.c:299 +#: bfd.c:385 msgid "Malformed archive" msgstr "Muodoltaan virheellinen arkisto" -#: bfd.c:300 +#: bfd.c:386 msgid "File format not recognized" msgstr "Tiedostomuotoa ei tunnistettu" -#: bfd.c:301 +#: bfd.c:387 msgid "File format is ambiguous" -msgstr "Tiedostomuoto on moniselitteinen" +msgstr "Tiedostomuoto ei ole yksiselitteinen" -#: bfd.c:302 +#: bfd.c:388 msgid "Section has no contents" msgstr "Lohkossa ei ole sisältöä" -#: bfd.c:303 +#: bfd.c:389 msgid "Nonrepresentable section on output" msgstr "Ei-edustava lohko tulosteessa" -#: bfd.c:304 +#: bfd.c:390 msgid "Symbol needs debug section which does not exist" -msgstr "Symboli tarvitsee debuggauslohkon, jota ei ole" +msgstr "Symboli tarvitsee virheenjäljityslohkon, jota ei ole" -#: bfd.c:305 +#: bfd.c:391 msgid "Bad value" msgstr "Väärä arvo" -#: bfd.c:306 +#: bfd.c:392 msgid "File truncated" msgstr "Tiedosto typistetty" -#: bfd.c:307 +#: bfd.c:393 msgid "File too big" msgstr "Tiedosto on liian iso" -#: bfd.c:308 +#: bfd.c:394 #, c-format msgid "Error reading %s: %s" msgstr "Virhe luettaessa %s: %s" -#: bfd.c:309 +#: bfd.c:395 msgid "#" msgstr "#" -#: bfd.c:830 +#: bfd.c:919 #, c-format msgid "BFD %s assertion fail %s:%d" -msgstr "BFD %s suoritusehto ei onnistunut %s:%d" +msgstr "BFD %s suoritusehto epäonnistui %s:%d" -#: bfd.c:842 +#: bfd.c:931 #, c-format msgid "BFD %s internal error, aborting at %s line %d in %s\n" -msgstr "BFD %s sisäinen virhe, virhelopetetaan tiedostossa %s rivillä %d funktiossa %s\n" +msgstr "BFD %s sisäinen virhe, lopetetaan tiedostossa %s rivillä %d funktiossa %s\n" -#: bfd.c:846 +#: bfd.c:935 #, c-format msgid "BFD %s internal error, aborting at %s line %d\n" -msgstr "BFD %s sisäinen virhe, virhelopetetaan tiedostossa %s rivillä %d\n" +msgstr "BFD %s sisäinen virhe, lopetetaan tiedostossa %s rivillä %d\n" -#: bfd.c:848 +#: bfd.c:937 msgid "Please report this bug.\n" -msgstr "Lähetä raportit ohjelmistovioista (englanniksi) osoitteeseen http://sourceware.org/bugzilla/.\n" +msgstr "Ilmoita tästä virheestä.\n" -#: bfdwin.c:208 +#: bfdwin.c:206 #, c-format msgid "not mapping: data=%lx mapped=%d\n" msgstr "ei kuvausta: data=%lx kuvattu=%d\n" # Ilmeisesti debug_windows-ympäristömuuttuja -#: bfdwin.c:211 +#: bfdwin.c:209 #, c-format msgid "not mapping: env var not set\n" msgstr "ei kuvausta: ympäristömuuttuja ei ole asetettu\n" @@ -187,16 +188,18 @@ msgstr "ei kuvausta: ympäristömuuttuja ei ole asetettu\n" #: binary.c:284 #, c-format msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx." -msgstr "Varoitus: Kirjoitetaan lohko ”%s” valtavaan (ts. negatiiviseen) tiedostosiirrokseen 0x%lx." +msgstr "Varoitus: Kirjoitetaan lohko ”%s” valtavaan (ts. negatiiviseen) tiedostosiirrososoitteeseen 0x%lx." -#: cache.c:238 +#: bout.c:1150 elf-m10300.c:2078 elf32-avr.c:1639 elf32-frv.c:5743 +#: elf32-xtensa.c:6639 elfxx-sparc.c:2456 reloc.c:5386 reloc16.c:162 +#: vms.c:1918 elf32-ia64.c:788 elf64-ia64.c:788 +msgid "%P%F: --relax and -r may not be used together\n" +msgstr "%P%F: valitsimia --relax ja -r ei saa käyttää yhdessä\n" + +#: cache.c:226 msgid "reopening %B: %s\n" msgstr "avataan uudelleen %B: %s\n" -#: coff64-rs6000.c:2126 coff-rs6000.c:3624 -msgid "%B: symbol `%s' has unrecognized smclas %d" -msgstr "%B: symbolissa ”%s” on tunnistamaton ”smclas”-arvo %d" - #: coff-alpha.c:490 msgid "" "%B: Cannot handle compressed Alpha binaries.\n" @@ -209,13 +212,13 @@ msgstr "" msgid "%B: unknown/unsupported relocation type %d" msgstr "%B: tuntematon/ei-tuettu sijoitustyyppi %d" -#: coff-alpha.c:899 coff-alpha.c:936 coff-alpha.c:2024 coff-mips.c:1002 +#: coff-alpha.c:899 coff-alpha.c:936 coff-alpha.c:2024 coff-mips.c:1003 msgid "GP relative relocation used when GP not defined" -msgstr "GP-suhteellista sijoitusta käytetty kun GP:tä ei ole määritelty" +msgstr "Yleisosoitinsuhteellista sijoitusta käytetty kun yleisosoitinta ei ole määritelty" #: coff-alpha.c:1501 msgid "using multiple gp values" -msgstr "käytetään useita gp-arvoja" +msgstr "käytetään useita yleisosoitinarvoja" #: coff-alpha.c:1560 msgid "%B: unsupported relocation: ALPHA_R_GPRELHIGH" @@ -225,225 +228,153 @@ msgstr "%B: ei-tuettu sijoitus: ALPHA_R_GPRELHIGH" msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW" msgstr "%B: ei-tuettu sijoitus: ALPHA_R_GPRELLOW" -#: coff-alpha.c:1574 elf32-m32r.c:2487 elf64-alpha.c:3953 elf64-alpha.c:4106 -#: elf32-ia64.c:4675 elf64-ia64.c:4675 +#: coff-alpha.c:1574 elf32-m32r.c:2477 elf64-alpha.c:3943 elf64-alpha.c:4098 +#: elf32-ia64.c:4462 elf64-ia64.c:4462 msgid "%B: unknown relocation type %d" msgstr "%B: tuntematon sijoitustyyppi %d" -#: coff-arm.c:1036 +#: coff-arm.c:1039 #, c-format msgid "%B: unable to find THUMB glue '%s' for `%s'" msgstr "%B: ei löydetty THUMB-vihjettä ”%s” nimelle ”%s”" -#: coff-arm.c:1065 +#: coff-arm.c:1068 #, c-format msgid "%B: unable to find ARM glue '%s' for `%s'" msgstr "%B: ei löydetty ARM-vihjettä ”%s” nimelle ”%s”" -#: coff-arm.c:1367 elf32-arm.c:4167 +#: coff-arm.c:1370 elf32-arm.c:6372 #, c-format msgid "" "%B(%s): warning: interworking not enabled.\n" " first occurrence: %B: arm call to thumb" msgstr "" -"%B(%s): varoitus: rinnankäyttö ei ole aktivoitu.\n" +"%B(%s): varoitus: yhteistoimivuus vanhan koodin kanssa ei ole käytössä.\n" " ensimmäinen esiintymä: %B: ”arm”-kutsu thumb-koodiin" -#: coff-arm.c:1457 +#: coff-arm.c:1460 #, c-format msgid "" "%B(%s): warning: interworking not enabled.\n" " first occurrence: %B: thumb call to arm\n" " consider relinking with --support-old-code enabled" msgstr "" -"%B(%s): varoitus: rinnankäyttöä ei ole aktivoitu.\n" +"%B(%s): varoitus: yhteistoimivuus vanhan koodin kanssa ei ole käytössä.\n" " ensimmäinen esiintymä: %B: thumb-kutsu arm-koodiin\n" " harkitse uudelleenlinkitystä --support-old-code aktivoituna" -#: coff-arm.c:1750 cofflink.c:3018 coff-tic80.c:695 +#: coff-arm.c:1755 coff-tic80.c:695 cofflink.c:3027 msgid "%B: bad reloc address 0x%lx in section `%A'" msgstr "%B: virheellinen reloc-tietueosoite 0x%lx lohkossa ”%A”" -#: coff-arm.c:2075 +#: coff-arm.c:2080 msgid "%B: illegal symbol index in reloc: %d" msgstr "%B: virheellinen symboli-indeksi reloc-tietueessa: %d" -#: coff-arm.c:2206 +#: coff-arm.c:2211 #, c-format -msgid "ERROR: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d" -msgstr "VIRHE: %B on käännetty APCS-%d:lle, kun taas %B on käännetty APCS-%d:lle" +msgid "error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d" +msgstr "virhe: %B on käännetty APCS-%d:lle, kun taas %B on käännetty APCS-%d:lle" -#: coff-arm.c:2222 elf32-arm.c:7072 +#: coff-arm.c:2227 elf32-arm.c:10327 #, c-format -msgid "ERROR: %B passes floats in float registers, whereas %B passes them in integer registers" -msgstr "VIRHE: %B välittää float-liukuluvut liukulukurekistereissa, kun taas %B välittää ne kokonaislukurekistereissa" +msgid "error: %B passes floats in float registers, whereas %B passes them in integer registers" +msgstr "virhe: %B välittää float-liukuluvut liukulukurekistereissa, kun taas %B välittää ne kokonaislukurekistereissa" -#: coff-arm.c:2225 elf32-arm.c:7076 +#: coff-arm.c:2230 elf32-arm.c:10331 #, c-format -msgid "ERROR: %B passes floats in integer registers, whereas %B passes them in float registers" -msgstr "VIRHE: %B välittää float-liukuluvut kokonaislukurekistereissa, kun taas %B välittää ne float-liukulukurekistereissa" +msgid "error: %B passes floats in integer registers, whereas %B passes them in float registers" +msgstr "virhe: %B välittää float-liukuluvut kokonaislukurekistereissa, kun taas %B välittää ne float-liukulukurekistereissa" -#: coff-arm.c:2239 +#: coff-arm.c:2244 #, c-format -msgid "ERROR: %B is compiled as position independent code, whereas target %B is absolute position" -msgstr "VIRHE: %B käännetään paikkariippumattomana koodina, kun taas kohde %B on absoluuttipaikkainen" +msgid "error: %B is compiled as position independent code, whereas target %B is absolute position" +msgstr "virhe: %B käännetään paikkariippumattomana koodina, kun taas kohde %B on absoluuttipaikkainen" -#: coff-arm.c:2242 +#: coff-arm.c:2247 #, c-format -msgid "ERROR: %B is compiled as absolute position code, whereas target %B is position independent" -msgstr "VIRHE: %B käännetään absoluuttisella paikkakoodilla, kun taas kohde %B on paikkariippumaton" +msgid "error: %B is compiled as absolute position code, whereas target %B is position independent" +msgstr "virhe: %B käännetään absoluuttisella paikkakoodilla, kun taas kohde %B on paikkariippumaton" -#: coff-arm.c:2270 elf32-arm.c:7141 +#: coff-arm.c:2275 elf32-arm.c:10396 #, c-format msgid "Warning: %B supports interworking, whereas %B does not" -msgstr "Varoitus: %B tukee rinnankäyttöä, kun taas %B ei tue" +msgstr "Varoitus: %B tukee yhteistoimivuutta vanhan koodin kanssa, kun taas %B ei tue" -#: coff-arm.c:2273 elf32-arm.c:7147 +#: coff-arm.c:2278 elf32-arm.c:10402 #, c-format msgid "Warning: %B does not support interworking, whereas %B does" -msgstr "Varoitus: %B ei tue rinnankäyttöä, kun taas %B tukee" +msgstr "Varoitus: %B ei tue yhteistoimivuutta vanhan koodin kanssa, kun taas %B tukee" -#: coff-arm.c:2297 +#: coff-arm.c:2302 #, c-format msgid "private flags = %x:" msgstr "yksityiset liput = %x:" -#: coff-arm.c:2305 elf32-arm.c:7198 +#: coff-arm.c:2310 elf32-arm.c:10453 #, c-format msgid " [floats passed in float registers]" msgstr " [liukuluvut välitetty liukulukurekistereissä]" -#: coff-arm.c:2307 +#: coff-arm.c:2312 #, c-format msgid " [floats passed in integer registers]" msgstr " [liukuluvut välitetty kokonaislukurekistereissä]" -#: coff-arm.c:2310 elf32-arm.c:7201 +#: coff-arm.c:2315 elf32-arm.c:10456 #, c-format msgid " [position independent]" msgstr " [paikkariippumaton]" -#: coff-arm.c:2312 +#: coff-arm.c:2317 #, c-format msgid " [absolute position]" msgstr " [absoluuttinen paikka]" -#: coff-arm.c:2316 +#: coff-arm.c:2321 #, c-format msgid " [interworking flag not initialised]" -msgstr " [rinnankäyttölippua ei ole alustettu]" +msgstr " [vanhan koodin kanssa toimimisen yhteistoimivuulippua ei ole alustettu]" -#: coff-arm.c:2318 +#: coff-arm.c:2323 #, c-format msgid " [interworking supported]" -msgstr " [rinnankäyttöä tuettu]" +msgstr " [yhteistoimivuutta vanhan koodin kanssa tuettu]" -#: coff-arm.c:2320 +#: coff-arm.c:2325 #, c-format msgid " [interworking not supported]" -msgstr " [rinnankäyttöä ei tuettu]" +msgstr " [yhteistoimivuutta vanhan koodin kanssa ei tueta]" -#: coff-arm.c:2366 elf32-arm.c:6578 +#: coff-arm.c:2371 elf32-arm.c:9360 #, c-format msgid "Warning: Not setting interworking flag of %B since it has already been specified as non-interworking" -msgstr "Varoitus: Ei aseteta %B:n rinnankäyttölippua koska se on jo määritelty ei-rinnankäyttöä-kohteena" +msgstr "Varoitus: Ei aseteta %B:n lippua yhteistoimivuudesta vanhan koodin kanssa koska se on jo määritelty ei-yhteistoimivuuskohteena" -#: coff-arm.c:2370 elf32-arm.c:6582 +#: coff-arm.c:2375 elf32-arm.c:9364 #, c-format msgid "Warning: Clearing the interworking flag of %B due to outside request" -msgstr "Varoitus: %B:n rinnankäyttölipun nollaus johtuu ulkopuolisesta pyynnöstä" - -#: coffcode.h:850 -msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'" -msgstr "%B: varoitus: COMDAT-symboli ”%s” ei täsmää lohkonimen ”%s” kanssa" - -#. Generate a warning message rather using the 'unhandled' -#. variable as this will allow some .sys files generate by -#. other toolchains to be processed. See bugzilla issue 196. -#: coffcode.h:1062 -msgid "%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s" -msgstr "%B: Varoitus: Ei oteta huomioon lohkolippua IMAGE_SCN_MEM_NOT_PAGED lohkossa %s" - -#: coffcode.h:1117 -msgid "%B (%s): Section flag %s (0x%x) ignored" -msgstr "%B (%s): Lohkolippua %s (0x%x) ei oteta huomioon" - -# TI tarkoittaa luultavasti Texas Instruments -#: coffcode.h:2236 -#, c-format -msgid "Unrecognized TI COFF target id '0x%x'" -msgstr "Tunnistamaton ”TI COFF”-kohdetunniste ”0x%x”" - -#: coffcode.h:2551 -msgid "%B: reloc against a non-existant symbol index: %ld" -msgstr "%B: reloc-tietue käyttäen ei-olemassaolevaa symboli-indeksiä: %ld" - -#: coffcode.h:4296 -msgid "%B: warning: line number table read failed" -msgstr "%B: varoitus: rivinumerotaulun lukeminen ei onnistunut" - -#: coffcode.h:4329 -msgid "%B: warning: illegal symbol index %ld in line numbers" -msgstr "%B: varoitus: virheellinen symboli-indeksi %ld rivinumeroissa" - -#: coffcode.h:4343 -msgid "%B: warning: duplicate line number information for `%s'" -msgstr "%B: varoitus: rivinumerojen kaksoiskappaleita symbolille ”%s”" - -#: coffcode.h:4735 -msgid "%B: Unrecognized storage class %d for %s symbol `%s'" -msgstr "%B: Tunnistamaton tallennusluokka: %d lohkonimi: %s symbolinimi: ”%s”" - -#: coffcode.h:4861 -msgid "warning: %B: local symbol `%s' has no section" -msgstr "varoitus: %B: paikallisessa symbolissa ”%s” ei ole lohkoa" - -#: coffcode.h:4966 coff-i860.c:601 coff-tic54x.c:393 -msgid "%B: warning: illegal symbol index %ld in relocs" -msgstr "%B: varoitus: virheellinen symboli-indeksi %ld relocs-tietueissa" - -#: coffcode.h:5004 -msgid "%B: illegal relocation type %d at address 0x%lx" -msgstr "%B: virheellinen sijoitustyyppi %d osoitteessa 0x%lx" - -#: coffgen.c:1518 -msgid "%B: bad string table size %lu" -msgstr "%B: virheellinen merkkijonotaulukoko %lu" +msgstr "Varoitus: %B:n yhteistoimivuuslipun nollaus johtuu ulkopuolisesta pyynnöstä" #: coff-h8300.c:1122 #, c-format msgid "cannot handle R_MEM_INDIRECT reloc when using %s output" msgstr "ei voi käsitellä ”R_MEM_INDIRECT reloc”-tietuetta kun käytetään %s tulostetta" -#: coff-i860.c:143 +#: coff-i860.c:147 #, c-format msgid "Relocation `%s' not yet implemented\n" msgstr "Sijoitusta ”%s” ei ole vielä toteutettu\n" -#: coff-i960.c:138 coff-i960.c:501 +#: coff-i860.c:605 coff-tic54x.c:398 coffcode.h:5143 +msgid "%B: warning: illegal symbol index %ld in relocs" +msgstr "%B: varoitus: virheellinen symboli-indeksi %ld relocs-tietueissa" + +#: coff-i960.c:143 coff-i960.c:506 msgid "uncertain calling convention for non-COFF symbol" msgstr "epävarma kutsukäytäntö ei-COFF-symbolille" -# Epäilen, että lähdekoodissa on virhe: tyypit ovat kaksi viimeistä parametriä. -#: cofflink.c:513 elflink.c:4175 -msgid "Warning: type of symbol `%s' changed from %d to %d in %B" -msgstr "Varoitus: symbolityyppi ”%s” vaihtui tyypistä %d tyyppiin %d kohteessa %B" - -#: cofflink.c:2296 -msgid "%B: relocs in section `%A', but it has no contents" -msgstr "%B: relocs-tietueet lohkossa ”%A”, mutta ilman sisältöä" - -#: cofflink.c:2627 coffswap.h:824 -#, c-format -msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" -msgstr "%s: %s: reloc-tietueylivuoto: 0x%lx > 0xffff" - -#: cofflink.c:2636 coffswap.h:810 -#, c-format -msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" -msgstr "%s: varoitus: %s: rivinumeroylivuoto: 0x%lx > 0xffff" - -#: coff-m68k.c:506 elf32-bfin.c:5434 elf32-m68k.c:2393 +#: coff-m68k.c:506 elf32-bfin.c:5693 elf32-cr16.c:2965 elf32-m68k.c:4615 msgid "unsupported reloc type" msgstr "ei-tuettu reloc-tyyppi" @@ -467,31 +398,35 @@ msgstr "Absoluuttinen osoite ylittää 8-bittialueen" msgid "Unrecognized Reloc Type" msgstr "Tunnistamaton Reloc-tyyppi" -#: coff-mips.c:687 elf32-mips.c:958 elf32-score.c:345 elf64-mips.c:1911 -#: elfn32-mips.c:1752 +#: coff-mips.c:688 elf32-mips.c:1014 elf32-score.c:441 elf32-score7.c:341 +#: elf64-mips.c:2018 elfn32-mips.c:1832 msgid "GP relative relocation when _gp not defined" -msgstr "GP-suhteellinen sijoitus kun ”_gp” ei ole määritelty" +msgstr "Yleisosoitinsuhteellinen sijoitus kun ”_gp” ei ole määritelty" -#: coff-or32.c:228 +#: coff-or32.c:229 msgid "Unrecognized reloc" msgstr "Tunnistamaton reloc-tietue" -#: coff-rs6000.c:2799 +#: coff-rs6000.c:2787 #, c-format msgid "%s: unsupported relocation type 0x%02x" msgstr "%s: ei-tuettu sijoitustyyppi 0x%02x" -#: coff-rs6000.c:2892 +#: coff-rs6000.c:2880 #, c-format msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry" msgstr "%s: ”Sisältöluettelo-reloc”-tietue osoitteessa 0x%x symboliin ”%s” ilman sisältöluettelotulokohtaa" -#: coff-tic4x.c:191 coff-tic54x.c:299 coff-tic80.c:458 +#: coff-rs6000.c:3646 coff64-rs6000.c:2168 +msgid "%B: symbol `%s' has unrecognized smclas %d" +msgstr "%B: symbolissa ”%s” on tunnistamaton ”smclas”-arvo %d" + +#: coff-tic4x.c:195 coff-tic54x.c:299 coff-tic80.c:458 #, c-format msgid "Unrecognized reloc type 0x%x" msgstr "Tunnistamaton reloc-tyyppi 0x%x" -#: coff-tic4x.c:236 +#: coff-tic4x.c:240 #, c-format msgid "%s: warning: illegal symbol index %ld in relocs" msgstr "%s: varoitus: virheellinen symboli-indeksi %ld relocs-tietueissa" @@ -501,85 +436,150 @@ msgstr "%s: varoitus: virheellinen symboli-indeksi %ld relocs-tietueissa" msgid "ignoring reloc %s\n" msgstr "ei oteta huomioon reloc-tietuetta %s\n" +# C++-kielessä on monia tilanteita, joissa kääntäjän on lähetettävä koodia tai dataa, +# mutta se ei kykenen tunnistamaan uniikkia käännösyksikköä, mihin se tulisi lähettää. +# C++ ABI-ryhmä on pyrkinyt ratkaisemaan tämän pulman sallimalla kääntäjän lähettää vaaditut +# tiedot useisiin käännösyksiköihin, mikä sallii linkkerin poistaa kaikki muuta paitsi yhden +# kopion. Tätä ominaisuutta kutsutaan useissa olemassa olevissa toteutuksissa nimellä COMDAT. +#: coffcode.h:960 +msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'" +msgstr "%B: varoitus: COMDAT-symboli ”%s” ei täsmää lohkonimen ”%s” kanssa" + +#. Generate a warning message rather using the 'unhandled' +#. variable as this will allow some .sys files generate by +#. other toolchains to be processed. See bugzilla issue 196. +#: coffcode.h:1176 +msgid "%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s" +msgstr "%B: Varoitus: Ei oteta huomioon lohkolippua IMAGE_SCN_MEM_NOT_PAGED lohkossa %s" + +#: coffcode.h:1240 +msgid "%B (%s): Section flag %s (0x%x) ignored" +msgstr "%B (%s): Lohkolippua %s (0x%x) ei oteta huomioon" + +# TI tarkoittaa luultavasti Texas Instruments +#: coffcode.h:2382 +#, c-format +msgid "Unrecognized TI COFF target id '0x%x'" +msgstr "Tunnistamaton ”TI COFF”-kohdetunniste ”0x%x”" + +#: coffcode.h:2696 +msgid "%B: reloc against a non-existant symbol index: %ld" +msgstr "%B: reloc-tietue käyttäen ei-olemassaolevaa symboli-indeksiä: %ld" + +#: coffcode.h:3669 +msgid "%B: section %s: string table overflow at offset %ld" +msgstr "%B: lohko %s: merkkijonotaulun ylitys siirrososoitteessa %ld" + +#: coffcode.h:4477 +msgid "%B: warning: line number table read failed" +msgstr "%B: varoitus: rivinumerotaulun lukeminen ei onnistunut" + +#: coffcode.h:4507 +msgid "%B: warning: illegal symbol index %ld in line numbers" +msgstr "%B: varoitus: virheellinen symboli-indeksi %ld rivinumeroissa" + +#: coffcode.h:4521 +msgid "%B: warning: duplicate line number information for `%s'" +msgstr "%B: varoitus: rivinumerojen kaksoiskappaleita symbolille ”%s”" + +#: coffcode.h:4912 +msgid "%B: Unrecognized storage class %d for %s symbol `%s'" +msgstr "%B: Tunnistamaton tallennusluokka: %d lohkonimi: %s symbolinimi: ”%s”" + +#: coffcode.h:5038 +msgid "warning: %B: local symbol `%s' has no section" +msgstr "varoitus: %B: paikallisessa symbolissa ”%s” ei ole lohkoa" + +#: coffcode.h:5181 +msgid "%B: illegal relocation type %d at address 0x%lx" +msgstr "%B: virheellinen sijoitustyyppi %d osoitteessa 0x%lx" + +#: coffgen.c:1571 +msgid "%B: bad string table size %lu" +msgstr "%B: virheellinen merkkijonotaulukoko %lu" + +# Epäilen, että lähdekoodissa on virhe: tyypit ovat kaksi viimeistä parametriä. +#: cofflink.c:513 elflink.c:4307 +msgid "Warning: type of symbol `%s' changed from %d to %d in %B" +msgstr "Varoitus: symbolityyppi ”%s” vaihtui tyypistä %d tyyppiin %d kohteessa %B" + +#: cofflink.c:2305 +msgid "%B: relocs in section `%A', but it has no contents" +msgstr "%B: relocs-tietueet lohkossa ”%A”, mutta ilman sisältöä" + +#: cofflink.c:2636 coffswap.h:826 +#, c-format +msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" +msgstr "%s: %s: reloc-tietueylivuoto: 0x%lx > 0xffff" + +#: cofflink.c:2645 coffswap.h:812 +#, c-format +msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" +msgstr "%s: varoitus: %s: rivinumeroylivuoto: 0x%lx > 0xffff" + #: cpu-arm.c:189 cpu-arm.c:200 -msgid "ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale" -msgstr "VIRHE: %B on käännetty EP9312:lle, kun taas %B on käännetty XScalelle" +msgid "error: %B is compiled for the EP9312, whereas %B is compiled for XScale" +msgstr "virhe: %B on käännetty EP9312:lle, kun taas %B on käännetty XScalelle" #: cpu-arm.c:332 #, c-format msgid "warning: unable to update contents of %s section in %s" msgstr "varoitus: ei voi päivittää %s-lohkon sisältöä kohteessa %s" -#: dwarf2.c:481 -msgid "Dwarf Error: Can't find .debug_str section." -msgstr "Dwarf-virhe: Ei löydy ”.debug_str”-lohkoa." - -#: dwarf2.c:499 +#: dwarf2.c:430 #, c-format -msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)." -msgstr "Dwarf-virhe: DW_FORM_strp siirros (%lu) suurempi tai sama kuin ”.debug_str”-koko (%lu)." +msgid "Dwarf Error: Can't find %s section." +msgstr "Dwarf-virhe: Ei löydy %s-lohkoa." -#: dwarf2.c:592 -msgid "Dwarf Error: Can't find .debug_abbrev section." -msgstr "Dwarf-virhe: Ei löydy ”.debug_abbrev”-lohkoa." +#: dwarf2.c:457 +#, c-format +msgid "Dwarf Error: unable to decompress %s section." +msgstr "Dwarf-virhe: lohkon %s pakkausta ei kyetä purkamaan." -#: dwarf2.c:607 +#: dwarf2.c:468 #, c-format -msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)." -msgstr "Dwarf-virhe: Lyhennesiirros (%lu) suurempi tai sama kuin ”.debug_abbrev”-koko (%lu)." +msgid "Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu)." +msgstr "Dwarf-virhe: Siirrososoite (%lu) suurempi tai yhtäsuuri kuin %s-koko (%lu)." -#: dwarf2.c:822 +#: dwarf2.c:865 #, c-format msgid "Dwarf Error: Invalid or unhandled FORM value: %u." msgstr "Dwarf-virhe: Virheellinen tai käsittelemätön FORM-arvo: %u." -#: dwarf2.c:1025 +#: dwarf2.c:1079 msgid "Dwarf Error: mangled line number section (bad file number)." msgstr "Dwarf-virhe: runneltu rivinumerolohko (virheellinen tiedostonumero)." -#: dwarf2.c:1137 -msgid "Dwarf Error: Can't find .debug_line section." -msgstr "Dwarf-virhe: Ei löydy ”.debug_line”-lohkoa." - -#: dwarf2.c:1154 -#, c-format -msgid "Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%lu)." -msgstr "Dwarf-virhe: Rivisiirros (%lu) suurempi tai sama kuin ”.debug_line”-koko (%lu)." - -#: dwarf2.c:1380 +#: dwarf2.c:1413 msgid "Dwarf Error: mangled line number section." msgstr "Dwarf-virhe: runneltu rivinumerolohko." -#: dwarf2.c:1568 -msgid "Dwarf Error: Can't find .debug_ranges section." -msgstr "Dwarf-virhe: Ei löydy ”.debug_ranges”-lohkoa." - -#: dwarf2.c:1731 dwarf2.c:1847 dwarf2.c:2119 +#: dwarf2.c:1760 dwarf2.c:1867 dwarf2.c:2139 #, c-format msgid "Dwarf Error: Could not find abbrev number %u." msgstr "Dwarf-virhe: Ei löytynyt lyhennenumeroa %u." -#: dwarf2.c:2080 +#: dwarf2.c:2100 #, c-format -msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information." -msgstr "Dwarf-virhe: löytyi dwarf-versio ”%u”, tämä lukija käsittelee vain version 2 tietoja." +msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 and 3 information." +msgstr "Dwarf-virhe: löytyi dwarf-versio ”%u”, tämä lukija käsittelee vain version 2 ja 3 tietoja." -#: dwarf2.c:2087 +#: dwarf2.c:2107 #, c-format msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'." msgstr "Dwarf-virhe: löytyi osoitekoko ”%u”, tämä lukija ei voi käsitellä kokoja, jotka ovat suurempia kuin ”%u”." -#: dwarf2.c:2110 +#: dwarf2.c:2130 #, c-format msgid "Dwarf Error: Bad abbrev number: %u." msgstr "Dwarf-virhe: Väärä lyhennenumero: %u." -#: ecoff.c:1227 +#: ecoff.c:1238 #, c-format msgid "Unknown basic type %d" msgstr "Tuntematon perustyyppi %d" -#: ecoff.c:1484 +#: ecoff.c:1495 #, c-format msgid "" "\n" @@ -588,7 +588,7 @@ msgstr "" "\n" " Loppu+1 symboli: %ld" -#: ecoff.c:1491 ecoff.c:1494 +#: ecoff.c:1502 ecoff.c:1505 #, c-format msgid "" "\n" @@ -597,7 +597,7 @@ msgstr "" "\n" " Ensimmäinen symboli: %ld" -#: ecoff.c:1506 +#: ecoff.c:1517 #, c-format msgid "" "\n" @@ -606,7 +606,7 @@ msgstr "" "\n" " Loppu+1 symboli: %-7ld Tyyppi: %s" -#: ecoff.c:1513 +#: ecoff.c:1524 #, c-format msgid "" "\n" @@ -615,7 +615,7 @@ msgstr "" "\n" " Paikallinen symboli: %ld" -#: ecoff.c:1521 +#: ecoff.c:1532 #, c-format msgid "" "\n" @@ -624,7 +624,7 @@ msgstr "" "\n" " struct; Loppu+1 symboli: %ld" -#: ecoff.c:1526 +#: ecoff.c:1537 #, c-format msgid "" "\n" @@ -633,7 +633,7 @@ msgstr "" "\n" " union; Loppu+1 symboli: %ld" -#: ecoff.c:1531 +#: ecoff.c:1542 #, c-format msgid "" "\n" @@ -642,7 +642,7 @@ msgstr "" "\n" " enum; Loppu+1 symboli: %ld" -#: ecoff.c:1537 +#: ecoff.c:1548 #, c-format msgid "" "\n" @@ -651,455 +651,702 @@ msgstr "" "\n" " Tyyppi: %s" -#: elf32-arm.c:2524 +#: elf-attrs.c:567 +msgid "error: %B: Must be processed by '%s' toolchain" +msgstr "virhe: %B: Tämän on ”%s”-työkaluketjun käsiteltävä" + +#: elf-attrs.c:575 +msgid "error: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'" +msgstr "virhe: %B: Objektitunniste ”%d, %s” ei ole yhteensopiva tunnisteen ”%d, %s” kanssa" + +#: elf-eh-frame.c:884 +msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n" +msgstr "%P: virhe kohteessa %B(%A); ”.eh_frame_hdr”-taulua ei luotu.\n" + +#: elf-eh-frame.c:1122 +msgid "%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n" +msgstr "%P: fde-koodaus kohteessa %B(%A) estää ”.eh_frame_hdr”-taulun luomisen.\n" + +#: elf-ifunc.c:179 +msgid "%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can not be used when making an executable; recompile with -fPIE and relink with -pie\n" +msgstr "%F%P: dynaamista STT_GNU_IFUNC symbolia ”%s” osoitinyhtäläisyydellä kohteessa ”%B” ei voida käyttää tekemään suoritettavaa tiedostoa; käännä uudelleen valitsimella -fPIE ja linkitä uudelleen valitsemella -pie\n" + +#: elf-m10200.c:456 elf-m10300.c:1575 elf32-avr.c:1251 elf32-bfin.c:3200 +#: elf32-cr16.c:1517 elf32-cr16c.c:790 elf32-cris.c:2089 elf32-crx.c:933 +#: elf32-d10v.c:516 elf32-fr30.c:616 elf32-frv.c:4114 elf32-h8300.c:516 +#: elf32-i860.c:1218 elf32-ip2k.c:1499 elf32-iq2000.c:691 elf32-lm32.c:1171 +#: elf32-m32c.c:560 elf32-m32r.c:3102 elf32-m68hc1x.c:1136 elf32-mep.c:541 +#: elf32-microblaze.c:1226 elf32-moxie.c:291 elf32-msp430.c:493 elf32-mt.c:402 +#: elf32-openrisc.c:411 elf32-score.c:2752 elf32-score7.c:2591 +#: elf32-spu.c:5045 elf32-v850.c:1701 elf32-xstormy16.c:948 elf64-mmix.c:1533 +msgid "internal error: out of range error" +msgstr "sisäinen virhe: ”lukualueen ulkopuolella”-virhe" + +#: elf-m10200.c:460 elf-m10300.c:1579 elf32-avr.c:1255 elf32-bfin.c:3204 +#: elf32-cr16.c:1521 elf32-cr16c.c:794 elf32-cris.c:2093 elf32-crx.c:937 +#: elf32-d10v.c:520 elf32-fr30.c:620 elf32-frv.c:4118 elf32-h8300.c:520 +#: elf32-i860.c:1222 elf32-iq2000.c:695 elf32-lm32.c:1175 elf32-m32c.c:564 +#: elf32-m32r.c:3106 elf32-m68hc1x.c:1140 elf32-mep.c:545 +#: elf32-microblaze.c:1230 elf32-moxie.c:295 elf32-msp430.c:497 +#: elf32-openrisc.c:415 elf32-score.c:2756 elf32-score7.c:2595 +#: elf32-spu.c:5049 elf32-v850.c:1705 elf32-xstormy16.c:952 elf64-mmix.c:1537 +#: elfxx-mips.c:9103 +msgid "internal error: unsupported relocation error" +msgstr "sisäinen virhe: ei-tuettu sijoitusvirhe" + +#: elf-m10200.c:464 elf32-cr16.c:1525 elf32-cr16c.c:798 elf32-crx.c:941 +#: elf32-d10v.c:524 elf32-h8300.c:524 elf32-lm32.c:1179 elf32-m32r.c:3110 +#: elf32-m68hc1x.c:1144 elf32-microblaze.c:1234 elf32-score.c:2760 +#: elf32-score7.c:2599 elf32-spu.c:5053 +msgid "internal error: dangerous error" +msgstr "sisäinen virhe: vaarallinen virhe" + +#: elf-m10200.c:468 elf-m10300.c:1592 elf32-avr.c:1263 elf32-bfin.c:3212 +#: elf32-cr16.c:1529 elf32-cr16c.c:802 elf32-cris.c:2101 elf32-crx.c:945 +#: elf32-d10v.c:528 elf32-fr30.c:628 elf32-frv.c:4126 elf32-h8300.c:528 +#: elf32-i860.c:1230 elf32-ip2k.c:1514 elf32-iq2000.c:703 elf32-lm32.c:1183 +#: elf32-m32c.c:572 elf32-m32r.c:3114 elf32-m68hc1x.c:1148 elf32-mep.c:553 +#: elf32-microblaze.c:1238 elf32-moxie.c:303 elf32-msp430.c:505 elf32-mt.c:410 +#: elf32-openrisc.c:423 elf32-score.c:2769 elf32-score7.c:2603 +#: elf32-spu.c:5057 elf32-v850.c:1725 elf32-xstormy16.c:960 elf64-mmix.c:1545 +msgid "internal error: unknown error" +msgstr "sisäinen virhe: tuntematon virhe" + +#: elf-m10300.c:1512 elf32-arm.c:8963 elf32-i386.c:3984 elf32-m32r.c:2588 +#: elf32-m68k.c:4099 elf32-ppc.c:7906 elf32-s390.c:3015 elf32-sh.c:3429 +#: elf32-xtensa.c:3027 elf64-ppc.c:12063 elf64-s390.c:2974 elf64-sh64.c:1648 +#: elf64-x86-64.c:3657 elfxx-sparc.c:3317 +msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'" +msgstr "%B(%A+0x%lx): ratkaisematon %s sijoitus symbolia ”%s” varten" + +#: elf-m10300.c:1584 +msgid "error: inappropriate relocation type for shared library (did you forget -fpic?)" +msgstr "virhe: sopimaton sijoitustyyppi jaetulle kirjastolle (unohtuiko -fpic?)" + +#: elf-m10300.c:1587 +msgid "internal error: suspicious relocation type used in shared library" +msgstr "sisäinen virhe: epäilyttävää sijoitustyyppiä käytetään jaetussa kirjastossa" + +#: elf-m10300.c:4385 elf32-arm.c:11346 elf32-cr16.c:2519 elf32-cris.c:3030 +#: elf32-hppa.c:1891 elf32-i370.c:506 elf32-i386.c:1975 elf32-lm32.c:1873 +#: elf32-m32r.c:1921 elf32-m68k.c:3188 elf32-ppc.c:4953 elf32-s390.c:1650 +#: elf32-sh.c:2574 elf32-vax.c:1052 elf64-ppc.c:6348 elf64-s390.c:1623 +#: elf64-sh64.c:3396 elf64-x86-64.c:1821 elfxx-sparc.c:1802 +#, c-format +msgid "dynamic variable `%s' is zero size" +msgstr "dynaaminen muuttuja ”%s” on nollakokoinen" + +#: elf.c:329 +msgid "%B: invalid string offset %u >= %lu for section `%s'" +msgstr "%B: virheellinen merkkijonosiirrososoite %u >= %lu lohkolle ”%s”" + +#: elf.c:439 +msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section" +msgstr "%B symbolinumero %lu viittaa puuttuvaan SHT_SYMTAB_SHNDX-lohkoon" + +#: elf.c:595 +msgid "%B: Corrupt size field in group section header: 0x%lx" +msgstr "%B: Rikkinäinen kokokenttä ryhmälohko-otsakkeessa: 0x%lx" + +#: elf.c:631 +msgid "%B: invalid SHT_GROUP entry" +msgstr "%B: virheellinen SHT_GROUP-tulokohta" + +#: elf.c:701 +msgid "%B: no group info for section %A" +msgstr "%B: ei ryhmätietoja lohkolle %A" + +#: elf.c:730 elf.c:2960 elflink.c:9912 +msgid "%B: warning: sh_link not set for section `%A'" +msgstr "%B: varoitus: sh_link-kenttää ei aseteta lohkolle ”%A”" + +#: elf.c:749 +msgid "%B: sh_link [%d] in section `%A' is incorrect" +msgstr "%B: sh_link [%d]-kenttä lohkossa ”%A” on virheellinen" + +#: elf.c:784 +msgid "%B: unknown [%d] section `%s' in group [%s]" +msgstr "%B: tuntematon [%d] lohko ”%s” ryhmässä [%s]" + +#: elf.c:1104 +#, c-format +msgid "" +"\n" +"Program Header:\n" +msgstr "" +"\n" +"Ohjelmaotsake:\n" + +#: elf.c:1146 +#, c-format +msgid "" +"\n" +"Dynamic Section:\n" +msgstr "" +"\n" +"Dynaaminen lohko:\n" + +#: elf.c:1282 +#, c-format +msgid "" +"\n" +"Version definitions:\n" +msgstr "" +"\n" +"Versiomäärittelyt:\n" + +#: elf.c:1307 +#, c-format +msgid "" +"\n" +"Version References:\n" +msgstr "" +"\n" +"Versioviitteet:\n" + +#: elf.c:1312 +#, c-format +msgid " required from %s:\n" +msgstr " kysytty kohteesta %s:\n" + +#: elf.c:1702 +msgid "%B: invalid link %lu for reloc section %s (index %u)" +msgstr "%B: virheellinen linkki %lu reloc-tietueelle %s (indeksi %u)" + +#: elf.c:1870 +msgid "%B: don't know how to handle allocated, application specific section `%s' [0x%8x]" +msgstr "%B: ei tiedä kuinka käsitellä varattua, sovelluskohtaista lohkoa ”%s” [0x%8x]" + +#: elf.c:1882 +msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]" +msgstr "%B: ei tiedä, kuinka käsitellä prosessorikohtaista lohkoa ”%s” [0x%8x]" + +#: elf.c:1893 +msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]" +msgstr "%B: ei tiedä, kuinka käsitellä käyttöjärjestelmäkohtaista lohkoa ”%s” [0x%8x]" + +#: elf.c:1903 +msgid "%B: don't know how to handle section `%s' [0x%8x]" +msgstr "%B: ei tiedä kuinka käsitellä lohkoa ”%s” [0x%8x]" + +#: elf.c:2500 +#, c-format +msgid "warning: section `%A' type changed to PROGBITS" +msgstr "varoitus: lohkon ”%A” tyyppi vaihtunut tyypiksi PROGBITS" + +#: elf.c:2917 +msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'" +msgstr "%B: sh_link-lohko ”%A” osoittaa hylättyyn lohkoon ”%A” kohteessa ”%B”" + +#: elf.c:2940 +msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'" +msgstr "%B: sh_link-lohko ”%A” osoittaa poistettuun lohkoon ”%A” kohteessa ”%B”" + +#: elf.c:4311 +msgid "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section" +msgstr "%B: Ensimmäinen lohko PT_DYNAMIC-segmentissä ei ole ”.dynamic”-lohko" + +#: elf.c:4338 +msgid "%B: Not enough room for program headers, try linking with -N" +msgstr "%B: Ei tarpeeksi tilaa ohjelmaotsakkeille, yritä linkittää ”-N”-argumentilla" + +#: elf.c:4420 +msgid "%B: section %A vma 0x%lx overlaps previous sections" +msgstr "%B: lohkon %A vma 0x%lx menee päällekkäin edellisten lohkojen kanssa" + +#: elf.c:4515 +msgid "%B: section `%A' can't be allocated in segment %d" +msgstr "%B: lohkoa ”%A” ei voida varata segmentissä %d" + +#: elf.c:4565 +msgid "%B: warning: allocated section `%s' not in segment" +msgstr "%B: varoitus: varattu lohko ”%s” ei ole segmentissä" + +#: elf.c:5065 +msgid "%B: symbol `%s' required but not present" +msgstr "%B: symboli ”%s” vaadittu, mutta ei ole annettu" + +#: elf.c:5404 +msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n" +msgstr "%B: varoitus: Tyhjä ladattava segmentti havaittu, onko tämä tarkoituksellinen ?\n" + +#: elf.c:6370 +#, c-format +msgid "Unable to find equivalent output section for symbol '%s' from section '%s'" +msgstr "Ei löydy samanlaista tulostelohkoa symbolille ”%s” lohkosta ”%s”" + +#: elf.c:7356 +msgid "%B: unsupported relocation type %s" +msgstr "%B: ei-tuettu sijoitustyyppi %s" + +#: elf32-arm.c:3149 +msgid "" +"%B(%s): warning: interworking not enabled.\n" +" first occurrence: %B: Thumb call to ARM" +msgstr "" +"%B(%s): varoitus: yhteistoimivuus vanhan koodin kanssa ei ole käytössä.\n" +" ensimmäinen esiintymä: %B: Thumb-kutsu ARM-koodiin" + +#: elf32-arm.c:3190 +msgid "" +"%B(%s): warning: interworking not enabled.\n" +" first occurrence: %B: ARM call to Thumb" +msgstr "" +"%B(%s): varoitus: yhteistoimivuus vanhan koodin kanssa ei ole käytössä.\n" +" ensimmäinen esiintymä: %B: ARM-kutsu Thumb-koodiin" + +#: elf32-arm.c:3387 elf32-arm.c:4692 +#, c-format +msgid "%s: cannot create stub entry %s" +msgstr "%s: ei voi luoda stub-tulokohtaa %s" + +#: elf32-arm.c:4804 #, c-format msgid "unable to find THUMB glue '%s' for '%s'" msgstr "ei löydy THUMB-vihjettä ”%s” kohteelle ”%s”" -#: elf32-arm.c:2557 +#: elf32-arm.c:4838 #, c-format msgid "unable to find ARM glue '%s' for '%s'" msgstr "ei löydy ARM-vihjettä ”%s” kohteelle ”%s”" -#: elf32-arm.c:3127 +#: elf32-arm.c:5365 msgid "%B: BE8 images only valid in big-endian mode." msgstr "%B: BE8-vedokset ovat oikeita vain big-endian-tavujärjestyksessä." # Vector Floating Point (VFP) #. Give a warning, but do as the user requests anyway. -#: elf32-arm.c:3331 +#: elf32-arm.c:5590 msgid "%B: warning: selected VFP11 erratum workaround is not necessary for target architecture" msgstr "%B: varoitus: valittu VFP11-virheenkiertotapa ei ole välttämätön kohdearkkitehtuurille" -#: elf32-arm.c:3865 elf32-arm.c:3885 +#: elf32-arm.c:6130 elf32-arm.c:6150 msgid "%B: unable to find VFP11 veneer `%s'" msgstr "%B: ei löydy VFP11-julkisivua ”%s”" -#: elf32-arm.c:3930 +#: elf32-arm.c:6196 #, c-format msgid "Invalid TARGET2 relocation type '%s'." msgstr "Virheellinen TARGET2-sijoitustyyppi ”%s”." -#: elf32-arm.c:4071 +#: elf32-arm.c:6281 msgid "" "%B(%s): warning: interworking not enabled.\n" " first occurrence: %B: thumb call to arm" msgstr "" -"%B(%s): varoitus: rinnankäyttö ei ole aktivoitu.\n" +"%B(%s): varoitus: yhteistoimivuus vanhan koodin kanssa ei ole käytössä.\n" " ensimmäinen esiintymä: %B: thumb-kutsu arm-koodiin" -#: elf32-arm.c:4759 +#: elf32-arm.c:7003 msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'." msgstr "\\%B: Varoitus: ”Arm BLX”-käskykohteet Arm-funktiossa ”%s”." -#: elf32-arm.c:5059 +#: elf32-arm.c:7405 msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'." msgstr "%B: Varoitus: ”Thumb BLX”-käskykohteet thumb-funktiossa ”%s”." -#: elf32-arm.c:5689 +#: elf32-arm.c:8085 msgid "%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object" msgstr "%B(%A+0x%lx): R_ARM_TLS_LE32-sijoitukset eivät ole sallittuja jaetuissa objekteissa" -#: elf32-arm.c:5890 +#: elf32-arm.c:8300 msgid "%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations" msgstr "%B(%A+0x%lx): Vain ADD- tai SUB-käskyt ovat sallittuja ALU-ryhmän sijoituksille" -#: elf32-arm.c:5930 elf32-arm.c:6017 elf32-arm.c:6100 elf32-arm.c:6185 +#: elf32-arm.c:8340 elf32-arm.c:8427 elf32-arm.c:8510 elf32-arm.c:8595 msgid "%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s" msgstr "%B(%A+0x%lx): Ylivuoto, kun halkaistaan 0x%lx ryhmäsijoitukselle %s" -#: elf32-arm.c:6369 elf32-sh.c:3304 elf64-sh64.c:1556 +#: elf32-arm.c:8821 elf32-sh.c:3325 elf64-sh64.c:1556 msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section" msgstr "%B(%A+0x%lx): %s sijoitus SEC_MERGE-lohkoa varten" # TLS: transport layer security -#: elf32-arm.c:6458 elf64-ppc.c:9973 +#: elf32-arm.c:8939 elf32-m68k.c:4134 elf32-xtensa.c:2765 elf64-ppc.c:10743 msgid "%B(%A+0x%lx): %s used with TLS symbol %s" msgstr "%B(%A+0x%lx): %s käytetään TLS-symbolin %s kanssa" -#: elf32-arm.c:6459 elf64-ppc.c:9974 +#: elf32-arm.c:8940 elf32-m68k.c:4135 elf32-xtensa.c:2766 elf64-ppc.c:10744 msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s" msgstr "%B(%A+0x%lx): %s käytetään ei-TLS-symbolin %s kanssa" -#: elf32-arm.c:6482 elf32-i386.c:3310 elf32-m32r.c:2598 elf32-m68k.c:1982 -#: elf32-ppc.c:6796 elf32-s390.c:3048 elf32-sh.c:3408 elf32-xtensa.c:2290 -#: elf64-ppc.c:11138 elf64-s390.c:3009 elf64-sh64.c:1648 elf64-x86-64.c:3002 -#: elf-hppa.h:2194 elf-m10300.c:1460 elfxx-sparc.c:3256 -msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'" -msgstr "%B(%A+0x%lx): ratkaisematon %s sijoitus symbolia ”%s” varten" - -#: elf32-arm.c:6516 +#: elf32-arm.c:8997 msgid "out of range" msgstr "lukualueen ulkopuolella" -#: elf32-arm.c:6520 +#: elf32-arm.c:9001 msgid "unsupported relocation" msgstr "ei-tuettu sijoitus" -#: elf32-arm.c:6528 +#: elf32-arm.c:9009 msgid "unknown error" msgstr "tuntematon virhe" -#: elf32-arm.c:6628 +#: elf32-arm.c:9409 msgid "Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it" -msgstr "Varoitus: Nollataan %B:n rinnankäyttölippu, koska se on linkitetty ”ei-rinnankäyttöä”-koodiin %B:ssa" +msgstr "Varoitus: Nollataan %B:n vanhan koodin kanssa toimimisen yhteistoimivuuslippu, koska se on linkitetty ei-yhteistoimivuuskoodiin %B:ssa" -#: elf32-arm.c:6730 -msgid "ERROR: %B uses VFP register arguments, %B does not" -msgstr "VIRHE: %B käyttää VFP-rekisteriargumentteja, %B ei käytä" +#: elf32-arm.c:9652 +msgid "error: %B: Unknown CPU architecture" +msgstr "virhe: %B: Tuntematon prosessoriarkkitehtuuri" -#: elf32-arm.c:6780 -msgid "ERROR: %B: Conflicting architecture profiles %c/%c" -msgstr "VIRHE: %B: Ristiriitaisia arkkitehtuuriprofiileja %c/%c" +#: elf32-arm.c:9690 +msgid "error: %B: Conflicting CPU architectures %d/%d" +msgstr "virhe: %B: Ristiriitaisia prosessoriarkkitehtuureja %d/%d" -#: elf32-arm.c:6795 +#: elf32-arm.c:9747 +msgid "error: %B uses VFP register arguments, %B does not" +msgstr "virhe: %B käyttää VFP-rekisteriargumentteja, %B ei käytä" + +#: elf32-arm.c:9897 +msgid "error: %B: Conflicting architecture profiles %c/%c" +msgstr "virhe: %B: Ristiriitaisia arkkitehtuuriprofiileja %c/%c" + +#: elf32-arm.c:9921 msgid "Warning: %B: Conflicting platform configuration" -msgstr "Varoitus: %B: Ristiriitainen alustakonfiguraatio" +msgstr "Varoitus: %B: Ristiriitainen käyttöjärjestemäkonfiguraatio" -#: elf32-arm.c:6804 -msgid "ERROR: %B: Conflicting use of R9" -msgstr "VIRHE: %B: Ristiriitainen R9:n käyttö" +#: elf32-arm.c:9930 +msgid "error: %B: Conflicting use of R9" +msgstr "virhe: %B: Ristiriitainen R9:n käyttö" -#: elf32-arm.c:6816 -msgid "ERROR: %B: SB relative addressing conflicts with use of R9" -msgstr "VIRHE: %B: SB suhteellinen osoitteitus on ristiriidassa R9:n käytön kanssa" +#: elf32-arm.c:9942 +msgid "error: %B: SB relative addressing conflicts with use of R9" +msgstr "virhe: %B: SB-suhteellinen osoitteitus on ristiriidassa R9:n käytön kanssa" -#: elf32-arm.c:6838 -msgid "ERROR: %B: Conflicting definitions of wchar_t" -msgstr "VIRHE: %B: Ristiriitaisia wchar_t-määrittelyjä" +#: elf32-arm.c:9955 +msgid "warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may fail" +msgstr "varoitus: %B käyttää %u-tavuista wchar_t-merkkiä vaikka tuloste käyttää %u-tavuista wchar_t-merkkiä; wchart_t-käyttöarvot objekteissa saattavat olla virheellisiä" -#: elf32-arm.c:6867 +#: elf32-arm.c:9986 msgid "warning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may fail" -msgstr "varoitus: %B käyttää %s enums-alkioita vaikka tuloste käyttää %s enums-alkioita; enum-arvojen käyttö kaikissa objekteissa saattaa epäonnistua" +msgstr "varoitus: %B käyttää %s enums-alkioita vaikka tuloste käyttää %s enums-alkioita; enum-arvojen käyttö objekteissa saattaa olla virheellinen" + +#: elf32-arm.c:9998 +msgid "error: %B uses iWMMXt register arguments, %B does not" +msgstr "virhe: %B käyttää iWMMXt-rekisteriargumentteja, %B ei käytä" -#: elf32-arm.c:6880 -msgid "ERROR: %B uses iWMMXt register arguments, %B does not" -msgstr "VIRHE: %B käyttää iWMMXt-rekisteriargumentteja, %B ei käytä" +#: elf32-arm.c:10020 +msgid "error: fp16 format mismatch between %B and %B" +msgstr "virhe: fp16-muototäsmäämättömyys kohteiden %B ja %B välillä" -#: elf32-arm.c:6920 +#: elf32-arm.c:10063 elf32-arm.c:10156 +msgid "%B: Unknown mandatory EABI object attribute %d" +msgstr "%B: Tuntematon pakollinen EABI-objektiattribuutti %d" + +#: elf32-arm.c:10071 elf32-arm.c:10164 msgid "Warning: %B: Unknown EABI object attribute %d" msgstr "Varoitus: %B: Tuntematon EABI-objektiattribuutti %d" -#: elf32-arm.c:7045 -msgid "ERROR: Source object %B has EABI version %d, but target %B has EABI version %d" -msgstr "VIRHE: Lähdeobjektissa %B on EABI-versio %d, mutta kohteessa %B on EABI-versio %d" +#: elf32-arm.c:10224 +msgid "error: %B is already in final BE8 format" +msgstr "virhe: %B on jo lopullisessa BE8-muodossa" + +#: elf32-arm.c:10300 +msgid "error: Source object %B has EABI version %d, but target %B has EABI version %d" +msgstr "virhe: Lähdeobjektissa %B on EABI-versio %d, mutta kohteessa %B on EABI-versio %d" -#: elf32-arm.c:7061 -msgid "ERROR: %B is compiled for APCS-%d, whereas target %B uses APCS-%d" -msgstr "VIRHE: %B on käännetty APCS-%d:lle, kun taas kohde %B käyttää APCS-%d:ta" +#: elf32-arm.c:10316 +msgid "error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d" +msgstr "virhe: %B on käännetty APCS-%d:lle, kun taas kohde %B käyttää APCS-%d:ta" # Vector floating point (coprosessor) -#: elf32-arm.c:7086 -msgid "ERROR: %B uses VFP instructions, whereas %B does not" -msgstr "VIRHE: %B käyttää vektoriliukulukukäskyjä, kun taas %B ei käytä" +#: elf32-arm.c:10341 +msgid "error: %B uses VFP instructions, whereas %B does not" +msgstr "virhe: %B käyttää vektoriliukulukukäskyjä, kun taas %B ei käytä" # Floating Point Accelerator (chip) -#: elf32-arm.c:7090 -msgid "ERROR: %B uses FPA instructions, whereas %B does not" -msgstr "VIRHE: %B käyttää liukulukukiihdytinkäskyjä, kun taas %B ei käytä" +#: elf32-arm.c:10345 +msgid "error: %B uses FPA instructions, whereas %B does not" +msgstr "virhe: %B käyttää liukulukukiihdytinkäskyjä, kun taas %B ei käytä" -#: elf32-arm.c:7100 -msgid "ERROR: %B uses Maverick instructions, whereas %B does not" -msgstr "VIRHE: %B käyttää Maverick-käskyjä, kun taas %B ei käytä" +#: elf32-arm.c:10355 +msgid "error: %B uses Maverick instructions, whereas %B does not" +msgstr "virhe: %B käyttää Maverick-käskyjä, kun taas %B ei käytä" -#: elf32-arm.c:7104 -msgid "ERROR: %B does not use Maverick instructions, whereas %B does" -msgstr "VIRHE: %B ei käytä Maverick-käskyjä, kun taas %B käyttää" +#: elf32-arm.c:10359 +msgid "error: %B does not use Maverick instructions, whereas %B does" +msgstr "virhe: %B ei käytä Maverick-käskyjä, kun taas %B käyttää" -#: elf32-arm.c:7123 -msgid "ERROR: %B uses software FP, whereas %B uses hardware FP" -msgstr "VIRHE: %B käyttää ohjelmistoliukulukuja, kun taas %B käyttää laitteistoliukulukuja" +#: elf32-arm.c:10378 +msgid "error: %B uses software FP, whereas %B uses hardware FP" +msgstr "virhe: %B käyttää ohjelmistoliukulukuja, kun taas %B käyttää laitteistoliukulukuja" -#: elf32-arm.c:7127 -msgid "ERROR: %B uses hardware FP, whereas %B uses software FP" -msgstr "VIRHE: %B käyttää laitteistoliukulukuja, kun taas %B käyttää ohjelmistoliukulukuja" +#: elf32-arm.c:10382 +msgid "error: %B uses hardware FP, whereas %B uses software FP" +msgstr "virhe: %B käyttää laitteistoliukulukuja, kun taas %B käyttää ohjelmistoliukulukuja" #. Ignore init flag - it may not be set, despite the flags field #. containing valid data. #. Ignore init flag - it may not be set, despite the flags field containing valid data. -#: elf32-arm.c:7174 elf32-bfin.c:4795 elf32-cris.c:3234 elf32-m68hc1x.c:1277 -#: elf32-m68k.c:620 elf32-score.c:3753 elf32-vax.c:538 elfxx-mips.c:11331 +#: elf32-arm.c:10429 elf32-bfin.c:5082 elf32-cris.c:4110 elf32-m68hc1x.c:1280 +#: elf32-m68k.c:1169 elf32-score.c:4039 elf32-score7.c:3876 elf32-vax.c:540 +#: elfxx-mips.c:12755 #, c-format msgid "private flags = %lx:" msgstr "yksityiset liput = %lx:" -#: elf32-arm.c:7183 +#: elf32-arm.c:10438 #, c-format msgid " [interworking enabled]" -msgstr " [rinnankäyttö aktivoitu]" +msgstr " [yhteistoimivuus vanhan koodin kanssa on käytössä]" -#: elf32-arm.c:7191 +#: elf32-arm.c:10446 #, c-format msgid " [VFP float format]" msgstr " [vektoriliukulukumuoto]" -#: elf32-arm.c:7193 +#: elf32-arm.c:10448 #, c-format msgid " [Maverick float format]" msgstr " [Maverick-liukulukumuoto]" -#: elf32-arm.c:7195 +#: elf32-arm.c:10450 #, c-format msgid " [FPA float format]" msgstr " [Liukulukukiihdytin-liukulukumuoto]" -#: elf32-arm.c:7204 +#: elf32-arm.c:10459 #, c-format msgid " [new ABI]" msgstr " [uusi ABI]" -#: elf32-arm.c:7207 +#: elf32-arm.c:10462 #, c-format msgid " [old ABI]" msgstr " [vanha ABI]" -#: elf32-arm.c:7210 +#: elf32-arm.c:10465 #, c-format msgid " [software FP]" msgstr " [ohjelmistoliukuluku]" -#: elf32-arm.c:7219 +#: elf32-arm.c:10474 #, c-format msgid " [Version1 EABI]" msgstr " [Versio 1 EABI]" -#: elf32-arm.c:7222 elf32-arm.c:7233 +#: elf32-arm.c:10477 elf32-arm.c:10488 #, c-format msgid " [sorted symbol table]" msgstr " [lajiteltu symbolitaulu]" -#: elf32-arm.c:7224 elf32-arm.c:7235 +#: elf32-arm.c:10479 elf32-arm.c:10490 #, c-format msgid " [unsorted symbol table]" msgstr " [lajittelematon symbolitaulu]" -#: elf32-arm.c:7230 +#: elf32-arm.c:10485 #, c-format msgid " [Version2 EABI]" msgstr " [Versio 2 EABI]" -#: elf32-arm.c:7238 +#: elf32-arm.c:10493 #, c-format msgid " [dynamic symbols use segment index]" msgstr " [dynaamiset symbolit käyttävät segmentti-indeksiä]" -#: elf32-arm.c:7241 +#: elf32-arm.c:10496 #, c-format msgid " [mapping symbols precede others]" msgstr " [kuvaussymbolit ylittävät tärkeydessä muut]" -#: elf32-arm.c:7248 +#: elf32-arm.c:10503 #, c-format msgid " [Version3 EABI]" msgstr " [Versio 3 EABI]" -#: elf32-arm.c:7252 +#: elf32-arm.c:10507 #, c-format msgid " [Version4 EABI]" msgstr " [Versio 4 EABI]" -#: elf32-arm.c:7256 +#: elf32-arm.c:10511 #, c-format msgid " [Version5 EABI]" msgstr " [Versio 5 EABI]" -#: elf32-arm.c:7259 +#: elf32-arm.c:10514 #, c-format msgid " [BE8]" msgstr " [BE8]" -#: elf32-arm.c:7262 +#: elf32-arm.c:10517 #, c-format msgid " [LE8]" msgstr " [LE8]" -#: elf32-arm.c:7268 +#: elf32-arm.c:10523 #, c-format msgid " " msgstr " " -#: elf32-arm.c:7275 +#: elf32-arm.c:10530 #, c-format msgid " [relocatable executable]" msgstr " [sijoitettava suoritettava tiedosto]" -#: elf32-arm.c:7278 +#: elf32-arm.c:10533 #, c-format msgid " [has entry point]" msgstr " [on tulokohta]" -#: elf32-arm.c:7283 +#: elf32-arm.c:10538 #, c-format msgid "" msgstr "" -#: elf32-arm.c:7522 elf32-i386.c:961 elf32-s390.c:1003 elf32-xtensa.c:814 -#: elf64-s390.c:958 elf64-x86-64.c:773 elfxx-sparc.c:1115 +#: elf32-arm.c:10783 elf32-i386.c:1300 elf32-s390.c:998 elf32-xtensa.c:1000 +#: elf64-s390.c:952 elf64-x86-64.c:1082 elfxx-sparc.c:1121 msgid "%B: bad symbol index: %d" msgstr "%B: virheellinen symboli-indeksi: %d" -#: elf32-arm.c:8080 elf32-cris.c:2400 elf32-hppa.c:1906 elf32-i370.c:506 -#: elf32-i386.c:1522 elf32-m32r.c:1931 elf32-m68k.c:1331 elf32-ppc.c:4314 -#: elf32-s390.c:1679 elf32-sh.c:2584 elf32-vax.c:1050 elf64-ppc.c:5898 -#: elf64-s390.c:1654 elf64-sh64.c:3438 elf64-x86-64.c:1382 elf-m10300.c:4207 -#: elfxx-sparc.c:1797 -#, c-format -msgid "dynamic variable `%s' is zero size" -msgstr "dynaaminen muuttuja ”%s” on nollakokoinen" +#: elf32-arm.c:10904 elf64-x86-64.c:1242 elf64-x86-64.c:1411 elfxx-mips.c:7870 +msgid "%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC" +msgstr "%B: sijoitusta %s kohdetta ”%s” varten ei voida käyttää kun tehdään jaettua objektia; käännä uudelleen -fPIC-argumentilla" -#: elf32-arm.c:8603 +#: elf32-arm.c:11893 #, c-format msgid "Errors encountered processing file %s" msgstr "Kohdattiin virheitä prosessoitaessa tiedostoa %s" -#: elf32-arm.c:9839 elf32-arm.c:9861 -msgid "%B: error: VFP11 veneer out of range" -msgstr "%B: virhe: VFP11-julkisivu lukualueen ulkopuolella" +#: elf32-arm.c:13339 +msgid "%B: error: Cortex-A8 erratum stub is allocated in unsafe location" +msgstr "%B: virhe: Cortex-A8 virhe-stub on varattu turvattomaan paikkaan" -#: elf32-avr.c:1253 elf32-bfin.c:2795 elf32-cr16.c:887 elf32-cr16c.c:790 -#: elf32-cris.c:1538 elf32-crx.c:933 elf32-d10v.c:517 elf32-fr30.c:616 -#: elf32-frv.c:4129 elf32-h8300.c:516 elf32-i860.c:1218 elf32-ip2k.c:1499 -#: elf32-iq2000.c:647 elf32-m32c.c:560 elf32-m32r.c:3124 elf32-m68hc1x.c:1133 -#: elf32-mep.c:642 elf32-msp430.c:497 elf32-mt.c:402 elf32-openrisc.c:411 -#: elf32-score.c:2456 elf32-spu.c:2813 elf32-v850.c:1701 elf32-xstormy16.c:946 -#: elf64-mmix.c:1533 elf-m10200.c:456 elf-m10300.c:1523 -msgid "internal error: out of range error" -msgstr "sisäinen virhe: ”lukualueen ulkopuolella”-virhe" +#. There's not much we can do apart from complain if this +#. happens. +#: elf32-arm.c:13366 +msgid "%B: error: Cortex-A8 erratum stub out of range (input file too large)" +msgstr "%B: virhe: Cortex-A8 virhe-stub lukualueen ulkopuolella (syötetiedoston on liian iso)" -#: elf32-avr.c:1257 elf32-bfin.c:2799 elf32-cr16.c:891 elf32-cr16c.c:794 -#: elf32-cris.c:1542 elf32-crx.c:937 elf32-d10v.c:521 elf32-fr30.c:620 -#: elf32-frv.c:4133 elf32-h8300.c:520 elf32-i860.c:1222 elf32-iq2000.c:651 -#: elf32-m32c.c:564 elf32-m32r.c:3128 elf32-m68hc1x.c:1137 elf32-mep.c:646 -#: elf32-msp430.c:501 elf32-openrisc.c:415 elf32-score.c:2460 elf32-spu.c:2817 -#: elf32-v850.c:1705 elf32-xstormy16.c:950 elf64-mmix.c:1537 elf-m10200.c:460 -#: elf-m10300.c:1527 elfxx-mips.c:8025 -msgid "internal error: unsupported relocation error" -msgstr "sisäinen virhe: ei-tuettu sijoitusvirhe" +#: elf32-arm.c:13457 elf32-arm.c:13479 +msgid "%B: error: VFP11 veneer out of range" +msgstr "%B: virhe: VFP11-julkisivu lukualueen ulkopuolella" -#: elf32-avr.c:1261 elf32-bfin.c:2803 elf32-cris.c:1546 elf32-fr30.c:624 -#: elf32-frv.c:4137 elf32-i860.c:1226 elf32-ip2k.c:1510 elf32-iq2000.c:655 -#: elf32-m32c.c:568 elf32-mep.c:650 elf32-msp430.c:505 elf32-mt.c:406 -#: elf32-openrisc.c:419 elf32-v850.c:1709 elf32-xstormy16.c:954 +#: elf32-avr.c:1259 elf32-bfin.c:3208 elf32-cris.c:2097 elf32-fr30.c:624 +#: elf32-frv.c:4122 elf32-i860.c:1226 elf32-ip2k.c:1510 elf32-iq2000.c:699 +#: elf32-m32c.c:568 elf32-mep.c:549 elf32-moxie.c:299 elf32-msp430.c:501 +#: elf32-mt.c:406 elf32-openrisc.c:419 elf32-v850.c:1709 elf32-xstormy16.c:956 #: elf64-mmix.c:1541 msgid "internal error: dangerous relocation" msgstr "sisäinen virhe: vaarallinen sijoitus" -#: elf32-avr.c:1265 elf32-bfin.c:2807 elf32-cr16.c:899 elf32-cr16c.c:802 -#: elf32-cris.c:1550 elf32-crx.c:945 elf32-d10v.c:529 elf32-fr30.c:628 -#: elf32-frv.c:4141 elf32-h8300.c:528 elf32-i860.c:1230 elf32-ip2k.c:1514 -#: elf32-iq2000.c:659 elf32-m32c.c:572 elf32-m32r.c:3136 elf32-m68hc1x.c:1145 -#: elf32-mep.c:654 elf32-msp430.c:509 elf32-mt.c:410 elf32-openrisc.c:423 -#: elf32-score.c:2468 elf32-spu.c:2825 elf32-v850.c:1725 elf32-xstormy16.c:958 -#: elf64-mmix.c:1545 elf-m10200.c:468 elf-m10300.c:1540 -msgid "internal error: unknown error" -msgstr "sisäinen virhe: tuntematon virhe" - -#: elf32-avr.c:2369 elf32-hppa.c:595 elf32-m68hc1x.c:164 elf64-ppc.c:3802 +#: elf32-avr.c:2409 elf32-hppa.c:605 elf32-m68hc1x.c:165 elf64-ppc.c:4141 msgid "%B: cannot create stub entry %s" msgstr "%B: ei voi luoda stub-tulokohtaa %s" -#: elf32-bfin.c:2274 +#: elf32-bfin.c:1581 +msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'" +msgstr "%B(%A+0x%lx): ratkaisematon sijoitus symboliin ”%s”" + +#: elf32-bfin.c:1614 elf32-i386.c:4026 elf32-m68k.c:4176 elf32-s390.c:3067 +#: elf64-s390.c:3026 elf64-x86-64.c:3697 +msgid "%B(%A+0x%lx): reloc against `%s': error %d" +msgstr "%B(%A+0x%lx): reloc-tietue kohdetta ”%s” varten: virhe %d" + +#: elf32-bfin.c:2714 msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend" msgstr "%B: sijoitus kohteessa ”%A+0x%x” viittaa symboliin ”%s”, jossa on ei-nolla-yhteenlaskettava" -#: elf32-bfin.c:2288 elf32-frv.c:2919 +#: elf32-bfin.c:2728 elf32-frv.c:2904 msgid "relocation references symbol not defined in the module" msgstr "sijoitusviitteet-symboli ei ole määritelty modulissa" -#: elf32-bfin.c:2385 +#: elf32-bfin.c:2825 msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend" msgstr "R_BFIN_FUNCDESC viittaa dynaamiseen symboliin, jossa on ei-nolla-yhteenlaskettava" -#: elf32-bfin.c:2424 elf32-bfin.c:2547 elf32-frv.c:3656 elf32-frv.c:3777 +#: elf32-bfin.c:2866 elf32-bfin.c:2989 elf32-frv.c:3641 elf32-frv.c:3762 msgid "cannot emit fixups in read-only section" msgstr "ei voi lähettää korjauksia kirjoitussuojattuun lohkoon" -#: elf32-bfin.c:2452 elf32-bfin.c:2587 elf32-frv.c:3687 elf32-frv.c:3821 +#: elf32-bfin.c:2897 elf32-bfin.c:3027 elf32-frv.c:3672 elf32-frv.c:3806 +#: elf32-lm32.c:1104 msgid "cannot emit dynamic relocations in read-only section" msgstr "ei voi lähettää dynaamisia sijoituksia kirjoitussuojattussa lohkossa" -#: elf32-bfin.c:2505 +#: elf32-bfin.c:2947 msgid "R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend" msgstr "R_BFIN_FUNCDESC_VALUE viittaa dynaamiseen symboliin, jossa on ei-nolla-yhteenlaskettava" -#: elf32-bfin.c:2673 +#: elf32-bfin.c:3112 msgid "relocations between different segments are not supported" msgstr "sijoituksia eri segmenttien välillä ei tueta" -#: elf32-bfin.c:2674 +#: elf32-bfin.c:3113 msgid "warning: relocation references a different segment" msgstr "varoitus: sijoitus viittaa eri segmenttiin" -#: elf32-bfin.c:3083 -msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'" -msgstr "%B(%A+0x%lx): ratkaisematon sijoitus symboliin ”%s”" - -#: elf32-bfin.c:3116 elf32-i386.c:3351 elf32-m68k.c:2023 elf32-s390.c:3100 -#: elf64-s390.c:3061 elf64-x86-64.c:3041 -msgid "%B(%A+0x%lx): reloc against `%s': error %d" -msgstr "%B(%A+0x%lx): reloc-tietue kohdetta ”%s” varten: virhe %d" - -#: elf32-bfin.c:4687 elf32-frv.c:6423 +#: elf32-bfin.c:4974 elf32-frv.c:6408 msgid "%B: unsupported relocation type %i" msgstr "%B: ei-tuettu sijoitustyyppi %i" # The FR-V FDPIC ABI: The FDPIC register is used as a base register for accessing the global offset table (GOT) and function descriptors. # Yksi prosessorin rekistereistä on nimetty fdpic-rekisteriksi milloin data- ja tekstilohkot ovat sijoitettavia (eli niiden siirros ei ole vakio). -#: elf32-bfin.c:4868 elf32-frv.c:6831 +#: elf32-bfin.c:5127 elf32-frv.c:6816 #, c-format msgid "%s: cannot link non-fdpic object file into fdpic executable" msgstr "%s: ei voi linkittää objektitiedostoa ilman fdpic-rekisteriä suoritettavaan tiedostoon, joka käyttää fdpic-rekisteriä" -#: elf32-bfin.c:4872 elf32-frv.c:6835 +#: elf32-bfin.c:5131 elf32-frv.c:6820 #, c-format msgid "%s: cannot link fdpic object file into non-fdpic executable" msgstr "%s: ei voi linkittää fdpic-rekisteriä käyttävää objektitiedostoa suoritettavaan tiedostoon, joka ei käytä fdpic-rekisteriä" -#: elf32-cr16.c:895 elf32-cr16c.c:798 elf32-crx.c:941 elf32-d10v.c:525 -#: elf32-h8300.c:524 elf32-m32r.c:3132 elf32-m68hc1x.c:1141 elf32-score.c:2464 -#: elf32-spu.c:2821 elf-m10200.c:464 -msgid "internal error: dangerous error" -msgstr "sisäinen virhe: vaarallinen virhe" - -#: elf32-cris.c:1060 +#: elf32-cris.c:1169 msgid "%B, section %A: unresolvable relocation %s against symbol `%s'" msgstr "%B, lohko %A: ratkaisematon sijoitus %s symbolia ”%s” varten" # Procedure Linkage Table (PLT) and Global Offset Table (GOT) -#: elf32-cris.c:1129 +#: elf32-cris.c:1238 msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'" msgstr "%B, lohko %A: Ei proseduurilinkitystaulua eikä yleissiirrostaulua sijoitukselle %s symbolia ”%s” varten" -#: elf32-cris.c:1131 +#: elf32-cris.c:1240 msgid "%B, section %A: No PLT for relocation %s against symbol `%s'" msgstr "%B, lohko %A: Ei proseduurilinkitystaulua sijoituksille %s symbolia ”%s” varten" -#: elf32-cris.c:1137 elf32-cris.c:1269 +#: elf32-cris.c:1246 elf32-cris.c:1379 elf32-cris.c:1641 elf32-cris.c:1730 +#: elf32-cris.c:1883 msgid "[whose name is lost]" msgstr "[jonka nimi on kadonnut]" -#: elf32-cris.c:1255 +#: elf32-cris.c:1365 msgid "%B, section %A: relocation %s with non-zero addend %d against local symbol" msgstr "%B, lohko %A: sijoitus %s ei-nolla-yhteenlaskettavalla %d paikallista symbolia varten" -#: elf32-cris.c:1263 +#: elf32-cris.c:1373 elf32-cris.c:1724 elf32-cris.c:1877 msgid "%B, section %A: relocation %s with non-zero addend %d against symbol `%s'" msgstr "%B, lohko %A: sijoitus %s ei-nolla-yhteenlaskettavalla %d symbolia ”%s” varten" -#: elf32-cris.c:1289 +#: elf32-cris.c:1399 msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'" msgstr "%B, lohko %A: sijoitusta %s ei sallita yleissymbolille: ”%s”" -#: elf32-cris.c:1305 +#: elf32-cris.c:1415 msgid "%B, section %A: relocation %s with no GOT created" msgstr "%B, lohko %A: sijoitus %s ilman yleissiirrostaulun luontia" -#: elf32-cris.c:1423 -msgid "%B: Internal inconsistency; no relocation section %s" -msgstr "%B: Sisäinen epäjohdonmukaisuus; ei sijoituslohkoa %s" +#. We shouldn't get here for GCC-emitted code. +#: elf32-cris.c:1632 +msgid "%B, section %A: relocation %s has an undefined reference to `%s', perhaps a declaration mixup?" +msgstr "%B, lohkon %A: sijoituksella %s on määrittelemätön viite ”%s”, ehkä esittelysekaannus?" + +#: elf32-cris.c:2010 +msgid "%B, section %A: relocation %s is not allowed for symbol: `%s' which is defined outside the program, perhaps a declaration mixup?" +msgstr "%B, lohko %A: sijoitusta %s ei sallita symbolille: ”%s”, joka määritellään ohjelman ulkopuolella, ehkä esittelysekaannus?" + +#: elf32-cris.c:2063 +msgid "(too many global variables for -fpic: recompile with -fPIC)" +msgstr "(liian monta yleismuuttujaa valitsimelle -fpic: käännä uudelleen valitsimella -fPIC)" + +#: elf32-cris.c:2070 +msgid "(thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or -mno-small-tls)" +msgstr "(säikeen paikallinen data liian iso valitsimelle -fpic tai -msmall-tls: käännä uudelleen valitsimella -fPIC tai -mno-small-tls)" # position-independent code (PIC) -#: elf32-cris.c:2511 +#: elf32-cris.c:3204 msgid "" "%B, section %A:\n" " v10/v32 compatible object %s must not contain a PIC relocation" @@ -1107,7 +1354,15 @@ msgstr "" "%B, lohko %A:\n" " v10/v32 yhteensopiva objekti %s ei saa sisältää sijaintiriippumatonta koodisijoitusta" -#: elf32-cris.c:2698 elf32-cris.c:2766 +#: elf32-cris.c:3309 +msgid "" +"%B, section %A:\n" +" relocation %s not valid in a shared object; typically an option mixup, recompile with -fPIC" +msgstr "" +"%B, lohko %A:\n" +" sijoitusta %s ei pitäisi käyttää jaetussa objektissa; tyypillisesti valitsinsekaannus, käännä uudelleen argumentilla -fPIC" + +#: elf32-cris.c:3523 msgid "" "%B, section %A:\n" " relocation %s should not be used in a shared object; recompile with -fPIC" @@ -1115,131 +1370,139 @@ msgstr "" "%B, lohko %A:\n" " sijoitusta %s ei pitäisi käyttää jaettussa objektissa; käännä uudelleen argumentilla -fPIC" -#: elf32-cris.c:3183 +#: elf32-cris.c:3940 +msgid "" +"%B, section `%A', to symbol `%s':\n" +" relocation %s should not be used in a shared object; recompile with -fPIC" +msgstr "" +"%B, lohko ”%A”, symboliin ”%s”:\n" +" sijoitusta %s ei pitäisi käyttää jaettussa objektissa; käännä uudelleen argumentilla -fPIC" + +#: elf32-cris.c:4059 msgid "Unexpected machine number" msgstr "Odottamaton konenumero" -#: elf32-cris.c:3237 +#: elf32-cris.c:4113 #, c-format msgid " [symbols have a _ prefix]" -msgstr " [symboleissa on ”_”-prefiksi]" +msgstr " [symboleissa on ”_”-etuliite]" -#: elf32-cris.c:3240 +#: elf32-cris.c:4116 #, c-format msgid " [v10 and v32]" msgstr " [v10 ja v32]" -#: elf32-cris.c:3243 +#: elf32-cris.c:4119 #, c-format msgid " [v32]" msgstr " [v32]" -#: elf32-cris.c:3288 +#: elf32-cris.c:4164 msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols" -msgstr "%B: käyttää ”_”-prefiksisymboleja, mutta kirjoittaa tiedoston ilman prefiksisymboleja" +msgstr "%B: käyttää ”_”-etuliitesymboleja, mutta kirjoittaa tiedoston ilman etuliitesymboleja" -#: elf32-cris.c:3289 +#: elf32-cris.c:4165 msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols" -msgstr "%B: käyttää ilman prefiksisymboleja, mutta kirjoittaa tiedoston ”_”-prefiksisymboleilla" +msgstr "%B: käyttää ilman etuliitesymboleja, mutta kirjoittaa tiedoston ”_”-etuliitesymboleilla" # CRIS v32 info: The chip with the CRIS v32 core. -#: elf32-cris.c:3308 +#: elf32-cris.c:4184 msgid "%B contains CRIS v32 code, incompatible with previous objects" msgstr "%B sisältää ”CRIS v32”-koodia, ei ole yhteensopiva aiempien objektien kanssa" -#: elf32-cris.c:3310 +#: elf32-cris.c:4186 msgid "%B contains non-CRIS-v32 code, incompatible with previous objects" msgstr "%B ei sisällä ”CRIS-v32”-koodia, yhteensopimaton aiempien objektien kanssa" -#: elf32-frv.c:1523 elf32-frv.c:1672 +#: elf32-frv.c:1507 elf32-frv.c:1656 msgid "relocation requires zero addend" msgstr "sijoitus vaatii nolla-yhteenlaskettavan" -#: elf32-frv.c:2906 +#: elf32-frv.c:2891 msgid "%B(%A+0x%x): relocation to `%s+%x' may have caused the error above" msgstr "%B(%A+0x%x): sijoitus kohteeseen ”%s+%x” saatta olla yläpuolella olevan virheen aiheuttama" -#: elf32-frv.c:2995 +#: elf32-frv.c:2980 msgid "R_FRV_GETTLSOFF not applied to a call instruction" msgstr "R_FRV_GETTLSOFF ei sovelleta kutsukäskyyn" -#: elf32-frv.c:3037 +#: elf32-frv.c:3022 msgid "R_FRV_GOTTLSDESC12 not applied to an lddi instruction" msgstr "R_FRV_GOTTLSDESC12 ei sovelleta ”lddi”-käskyyn" -#: elf32-frv.c:3108 +#: elf32-frv.c:3093 msgid "R_FRV_GOTTLSDESCHI not applied to a sethi instruction" msgstr "R_FRV_GOTTLSDESCHI ei sovelleta ”sethi”-käskyyn" -#: elf32-frv.c:3145 +#: elf32-frv.c:3130 msgid "R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction" msgstr "R_FRV_GOTTLSDESCLO ei sovelleta ”setlo”- tai ”setlos”-käskyyn" -#: elf32-frv.c:3193 +#: elf32-frv.c:3178 msgid "R_FRV_TLSDESC_RELAX not applied to an ldd instruction" msgstr "R_FRV_TLSDESC_RELAX ei sovelleta ”ldd”-käskyyn" # msgid-virhe: calll, eli yksi ällä liikaa -#: elf32-frv.c:3277 +#: elf32-frv.c:3262 msgid "R_FRV_GETTLSOFF_RELAX not applied to a calll instruction" msgstr "R_FRV_GETTLSOFF_RELAX ei sovelleta kutsukäskyyn" -#: elf32-frv.c:3332 +#: elf32-frv.c:3317 msgid "R_FRV_GOTTLSOFF12 not applied to an ldi instruction" msgstr "R_FRV_GOTTLSOFF12 ei sovelleta ”ldi”-käskyyn" -#: elf32-frv.c:3362 +#: elf32-frv.c:3347 msgid "R_FRV_GOTTLSOFFHI not applied to a sethi instruction" msgstr "R_FRV_GOTTLSOFFHI ei sovelleta ”sethi”-käskyyn" -#: elf32-frv.c:3391 +#: elf32-frv.c:3376 msgid "R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction" msgstr "R_FRV_GOTTLSOFFLO ei sovelleta ”setlo”- tai ”setlos”-käskyyn" -#: elf32-frv.c:3422 +#: elf32-frv.c:3407 msgid "R_FRV_TLSOFF_RELAX not applied to an ld instruction" msgstr "R_FRV_TLSOFF_RELAX ei sovelleta ”ld”-käskyyn" -#: elf32-frv.c:3467 +#: elf32-frv.c:3452 msgid "R_FRV_TLSMOFFHI not applied to a sethi instruction" msgstr "R_FRV_TLSMOFFHI ei sovelleta ”sethi”-käskyyn" -#: elf32-frv.c:3494 +#: elf32-frv.c:3479 msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction" msgstr "R_FRV_TLSMOFFLO ei sovelleta ”setlo”- tai ”setlos”-käskyyn" -#: elf32-frv.c:3615 +#: elf32-frv.c:3600 msgid "R_FRV_FUNCDESC references dynamic symbol with nonzero addend" msgstr "R_FRV_FUNCDESC viittaa dynaamiseen symboliin ei-nolla-yhteenlaskettavalla" -#: elf32-frv.c:3735 +#: elf32-frv.c:3720 msgid "R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend" msgstr "R_FRV_FUNCDESC_VALUE viittaa dynaamiseen symboliin ei-nolla-yhteenlaskettavalla" -#: elf32-frv.c:3992 elf32-frv.c:4148 +#: elf32-frv.c:3977 elf32-frv.c:4133 msgid "%B(%A+0x%lx): reloc against `%s': %s" msgstr "%B(%A+0x%lx): reloc-tietue ”%s”: %s varten" -#: elf32-frv.c:3994 elf32-frv.c:3998 +#: elf32-frv.c:3979 elf32-frv.c:3983 msgid "relocation references a different segment" msgstr "sijoitus viittaa eri segmenttiin" -#: elf32-frv.c:6745 +#: elf32-frv.c:6730 #, c-format msgid "%s: compiled with %s and linked with modules that use non-pic relocations" msgstr "%s: käännetty %s:n kanssa ja linkitetty paikkariippuvaisia koodisijoituksia käyttävien modulien kanssa" -#: elf32-frv.c:6798 elf32-iq2000.c:808 elf32-m32c.c:819 +#: elf32-frv.c:6783 elf32-iq2000.c:852 elf32-m32c.c:814 #, c-format msgid "%s: compiled with %s and linked with modules compiled with %s" msgstr "%s: käännetty %s:n kanssa ja linkitetty moduleihin, jotka on käännetty %s:n kanssa" -#: elf32-frv.c:6810 +#: elf32-frv.c:6795 #, c-format msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "%s: käyttää erilaisia tuntemattomia ”e_flags (0x%lx)”-kenttiä kuin edelliset modulit (0x%lx)" -#: elf32-frv.c:6860 elf32-iq2000.c:845 elf32-m32c.c:855 elf32-mt.c:587 +#: elf32-frv.c:6845 elf32-iq2000.c:889 elf32-m32c.c:850 elf32-mt.c:583 #, c-format msgid "private flags = 0x%lx:" msgstr "yksityiset liput = 0x%lx:" @@ -1248,62 +1511,90 @@ msgstr "yksityiset liput = 0x%lx:" msgid "%B: Relocations in generic ELF (EM: %d)" msgstr "%B: Sijoituksia geneerisessä ELF (EM: %d):ssa" -#: elf32-hppa.c:844 elf32-hppa.c:3577 +#: elf32-hppa.c:854 elf32-hppa.c:3570 msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections" msgstr "%B(%A+0x%lx): ei tavoita kohdetta %s, käännä uudelleen ”-ffunction-sections”-valitsimilla" -#: elf32-hppa.c:1253 +#: elf32-hppa.c:1286 msgid "%B: relocation %s can not be used when making a shared object; recompile with -fPIC" msgstr "%B: sijoitusta %s ei voi käyttää kun tehdään jaettua objektia; käännä uudelleen ”-fPIC”-argumentilla" -#: elf32-hppa.c:1506 -#, c-format -msgid "Could not find relocation section for %s" -msgstr "Ei löytynyt sijoituslohkoa kohteelle %s" - -#: elf32-hppa.c:2795 +#: elf32-hppa.c:2780 msgid "%B: duplicate export stub %s" msgstr "%B: vienti-stubin %s kaksoiskappale" -#: elf32-hppa.c:3413 +#: elf32-hppa.c:3406 msgid "%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link" msgstr "%B(%A+0x%lx): %s korjaus käskylle 0x%x ei ole tuettu ei-jaetussa linkissä" -#: elf32-hppa.c:4267 +#: elf32-hppa.c:4260 msgid "%B(%A+0x%lx): cannot handle %s for %s" msgstr "%B(%A+0x%lx): ei voi käsitellä %s kohteelle %s" -#: elf32-hppa.c:4574 +#: elf32-hppa.c:4567 msgid ".got section not immediately after .plt section" msgstr "”.got”-alilohko ei ole välittömästi ”.plt”-lohkon jälkeen" -#: elf32-i386.c:364 elf32-ppc.c:1616 elf32-s390.c:379 elf64-ppc.c:2148 -#: elf64-s390.c:403 elf64-x86-64.c:221 +#: elf32-i386.c:371 elf32-ppc.c:1666 elf32-s390.c:379 elf64-ppc.c:2283 +#: elf64-s390.c:403 elf64-x86-64.c:234 msgid "%B: invalid relocation type %d" msgstr "%B: virheellinen sijoitustyyppi %d" -#: elf32-i386.c:1085 elf32-s390.c:1185 elf32-sh.c:5063 elf64-s390.c:1149 -#: elfxx-sparc.c:1243 +#: elf32-i386.c:1246 elf64-x86-64.c:1029 +msgid "%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed" +msgstr "%B: TLS-siirros kohteesta %s kohteeseen %s kohdetta ”%s” varten osoitteessa 0x%lx lohkossa ”%A” epäonnistui" + +#: elf32-i386.c:1387 elf32-i386.c:2970 elf64-x86-64.c:1171 elf64-x86-64.c:2680 +msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s" +msgstr "%B: sijoitusta %s kohteen STT_GNU_IFUNC-symbolia `%s' varten ei käsittele %s" + +#: elf32-i386.c:1548 elf32-s390.c:1180 elf32-sh.c:5065 elf32-xtensa.c:1173 +#: elf64-s390.c:1143 elfxx-sparc.c:1257 msgid "%B: `%s' accessed both as normal and thread local symbol" msgstr "%B: ”%s” haettu sekä normaalina että säikeisenä paikallissymbolina" -#: elf32-i386.c:1200 elf32-s390.c:1294 elf64-ppc.c:4864 elf64-s390.c:1261 -#: elf64-x86-64.c:1051 -msgid "%B: bad relocation section name `%s'" -msgstr "%B: virheellinen sijoituslohkonimi ”%s”" - -#: elf32-i386.c:2257 +#: elf32-i386.c:2805 msgid "%B: unrecognized relocation (0x%x) in section `%A'" msgstr "%B: tunnistamaton sijoitus (0x%x) lohkossa ”%A”" -#: elf32-i386.c:2479 +#: elf32-i386.c:3219 elf64-x86-64.c:3081 +msgid "hidden symbol" +msgstr "piilotettu symboli" + +#: elf32-i386.c:3222 elf64-x86-64.c:3084 +msgid "internal symbol" +msgstr "sisäinen symboli" + +#: elf32-i386.c:3225 elf64-x86-64.c:3087 +msgid "protected symbol" +msgstr "suojattu symboli" + +#: elf32-i386.c:3228 elf64-x86-64.c:3090 +msgid "symbol" +msgstr "symboli" + +#: elf32-i386.c:3233 +msgid "%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object" +msgstr "%B: R_386_GOTOFF-sijoitusta määrittelemätöntä %s ”%s” varten ei voida käyttää kun tehdään jaettua objektia" + +#: elf32-i386.c:3243 msgid "%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object" msgstr "%B: R_386_GOTOFF-sijoitusta suojattua funktiota ”%s” varten ei voida käyttää kun tehdään jaettua objektia" +# Kun käskykohdemuuttuja on sen lukualueen ulkopuolella, joka sallitaan kullekin käskykentälle, +# assembler voi muuntaa koodin käyttämään toiminnallisesti samanlaista käskyä tai käskysekvenssiä. +# Tämä prosessi tunnetaan nimellä relaxation. Tätä tehdään tyypillisesti haarautumiskäskyissä, koska +# haarautumiskohteen etäisyyttä ei tunneta ennen linkitystä. Tavallaan tällä tavalla kumotaan lukualueen +# rajoitteet (constraints). Siksi olen suomentanut sen termillä avartaminen. #: elf32-ip2k.c:868 elf32-ip2k.c:874 elf32-ip2k.c:941 elf32-ip2k.c:947 msgid "ip2k relaxer: switch table without complete matching relocation information." msgstr "ip2k-avartaja: kytkintaulu ilman täydellisesti täsmääviä sijoitustietoja." +# Kun käskykohdemuuttuja on sen lukualueen ulkopuolella, joka sallitaan kullekin käskykentälle, +# assembler voi muuntaa koodin käyttämään toiminnallisesti samanlaista käskyä tai käskysekvenssiä. +# Tämä prosessi tunnetaan nimellä relaxation. Tätä tehdään tyypillisesti haarautumiskäskyissä, koska +# haarautumiskohteen etäisyyttä ei tunneta ennen linkitystä. Tavallaan tällä tavalla kumotaan lukualueen +# rajoitteet (constraints). Siksi olen suomentanut sen termillä avartaminen. #: elf32-ip2k.c:891 elf32-ip2k.c:974 msgid "ip2k relaxer: switch table header corrupt." msgstr "ip2k-avartaja: kytkintauluotsake rikkinäinen." @@ -1323,124 +1614,148 @@ msgstr "ip2k-linkkeri: redundanssisivukäsky kohteessa 0x%08lx (kohde = 0x%08lx) msgid "unsupported relocation between data/insn address spaces" msgstr "ei-tuettu sijoitus data/käskyosoitetilojen välillä" -#: elf32-iq2000.c:821 elf32-m32c.c:831 +#: elf32-iq2000.c:865 elf32-m32c.c:826 #, c-format msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "%s: käyttää eri ”e_flags (0x%lx)”-kenttiä kuin edelliset modulit (0x%lx)" +#: elf32-lm32.c:698 +msgid "global pointer relative relocation when _gp not defined" +msgstr "yleisosoitinsuhteellinen sijoitus kun ”_gp” ei ole määritelty" + +#: elf32-lm32.c:753 +msgid "global pointer relative address out of range" +msgstr "yleisosoittimen suhteellinen osoite lukualueen ulkopuolella" + +#: elf32-lm32.c:1058 +msgid "internal error: addend should be zero for R_LM32_16_GOT" +msgstr "sisäinen virhe: yhteenlaskettavan pitäisi olla nolla kohteelle R_LM32_16_GOT" + #: elf32-m32r.c:1453 msgid "SDA relocation when _SDA_BASE_ not defined" msgstr "SDA-sijoitus kun ”_SDA_BASE_” ei ole määritelty" -#: elf32-m32r.c:3061 +#: elf32-m32r.c:3039 msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)" msgstr "%B: Kohteen (%s) sijoitus %s on väärässä lohkossa (%A)" -#: elf32-m32r.c:3589 +#: elf32-m32r.c:3567 msgid "%B: Instruction set mismatch with previous modules" msgstr "%B: Käskyjoukko ei täsmää edellisten modulien kanssa" -#: elf32-m32r.c:3610 +#: elf32-m32r.c:3588 #, c-format msgid "private flags = %lx" msgstr "yksityiset liput = %lx" -#: elf32-m32r.c:3615 +#: elf32-m32r.c:3593 #, c-format msgid ": m32r instructions" msgstr ": m32r-käskyt" -#: elf32-m32r.c:3616 +#: elf32-m32r.c:3594 #, c-format msgid ": m32rx instructions" msgstr ": m32rx-käskyt" -#: elf32-m32r.c:3617 +#: elf32-m32r.c:3595 #, c-format msgid ": m32r2 instructions" msgstr ": m32r2-käskyt" -#: elf32-m68hc1x.c:1045 +#: elf32-m68hc1x.c:1048 #, c-format msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution" -msgstr "Viite etäsymboliin ”%s” käyttäen väärää sijoitus saattaa aiheuttaa virheellisen suorituksen" +msgstr "Viite etäsymboliin ”%s” väärää sijoitusta käyttäen saattaa aiheuttaa virheellisen suorituksen" # memory bank: A physical section of memory. -#: elf32-m68hc1x.c:1068 +#: elf32-m68hc1x.c:1071 #, c-format msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)" msgstr "muistilohkottu osoite [%lx:%04lx] (%lx) ei ole samassa muistilohkossa kuin nykyinen muistilohkottu osoite [%lx:%04lx] (%lx)" -#: elf32-m68hc1x.c:1087 +#: elf32-m68hc1x.c:1090 #, c-format msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx" msgstr "viite muistilohkottuun osoitteeseen [%lx:%04lx] tavallisessa osoitetilassa osoitteessa %04lx" -#: elf32-m68hc1x.c:1220 +#: elf32-m68hc1x.c:1223 msgid "%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers" msgstr "%B: linkitystiedostot käännetty 16-bittisille kokonaisluvuille (-mshort) ja muut 32-bittisille kokonaisluvuille" -#: elf32-m68hc1x.c:1227 +#: elf32-m68hc1x.c:1230 msgid "%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double" msgstr "%B: linkitystiedostot käännetty 32-bittiselle double-liukuluvulle (-fshort-double) ja muut 64-bittiselle double-liukuluvulle" -#: elf32-m68hc1x.c:1236 +#: elf32-m68hc1x.c:1239 msgid "%B: linking files compiled for HCS12 with others compiled for HC12" msgstr "%B: linkitystiedostot käännetty HCS12:lle, muut käännetty HC12:lle" -#: elf32-m68hc1x.c:1252 elf32-ppc.c:3734 elf64-sparc.c:697 elfxx-mips.c:11292 +#: elf32-m68hc1x.c:1255 elf32-ppc.c:4255 elf64-sparc.c:698 elfxx-mips.c:12617 msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "%B: käyttää eri ”e_flags (0x%lx)”-kenttiä kuin edelliset modulit (0x%lx)" -#: elf32-m68hc1x.c:1280 +#: elf32-m68hc1x.c:1283 #, c-format msgid "[abi=32-bit int, " msgstr "[abi=32-bittinen kokonaisluku, " -#: elf32-m68hc1x.c:1282 +#: elf32-m68hc1x.c:1285 #, c-format msgid "[abi=16-bit int, " msgstr "[abi=16-bittinen kokonaisluku, " -#: elf32-m68hc1x.c:1285 +#: elf32-m68hc1x.c:1288 #, c-format msgid "64-bit double, " msgstr "64-bittinen double-liukuluku, " -#: elf32-m68hc1x.c:1287 +#: elf32-m68hc1x.c:1290 #, c-format msgid "32-bit double, " msgstr "32-bittinen double-liukuluku, " -#: elf32-m68hc1x.c:1290 +#: elf32-m68hc1x.c:1293 #, c-format msgid "cpu=HC11]" -msgstr "cpu=HC11]" +msgstr "prosessori=HC11]" -#: elf32-m68hc1x.c:1292 +#: elf32-m68hc1x.c:1295 #, c-format msgid "cpu=HCS12]" -msgstr "cpu=HCS12]" +msgstr "prosessori=HCS12]" -#: elf32-m68hc1x.c:1294 +#: elf32-m68hc1x.c:1297 #, c-format msgid "cpu=HC12]" -msgstr "cpu=HC12]" +msgstr "prosessori=HC12]" -#: elf32-m68hc1x.c:1297 +#: elf32-m68hc1x.c:1300 #, c-format msgid " [memory=bank-model]" msgstr " [muisti=muistilohkomalli]" -#: elf32-m68hc1x.c:1299 +#: elf32-m68hc1x.c:1302 #, c-format msgid " [memory=flat]" msgstr " [muisti=litteä]" -#: elf32-m68k.c:635 elf32-m68k.c:636 +#: elf32-m68k.c:1184 elf32-m68k.c:1185 msgid "unknown" msgstr "tuntematon" +#: elf32-m68k.c:1645 +msgid "%B: GOT overflow: Number of relocations with 8-bit offset > %d" +msgstr "%B: Yleissiirrostaulun ylivuoto: 8-bittisellä siirrososoitteella varustettujen sijoitusten lukumäärä > %d" + +#: elf32-m68k.c:1651 +msgid "%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d" +msgstr "%B: Yleissiirrostaulun ylivuoto: 8-bittisellä tai 16-bittisellä siirrososoitteella varustettujen sijoitusten lukumäärä > %d" + +#: elf32-m68k.c:3902 +msgid "%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object" +msgstr "%B(%A+0x%lx): R_68K_TLS_LE32-sijoitukset eivät ole sallittuja jaetuissa objekteissa" + #: elf32-mcore.c:99 elf32-mcore.c:442 msgid "%B: Relocation %s (%d) is not currently supported.\n" msgstr "%B: Sijoitusta %s (%d) ei tällä hetkellä tueta.\n" @@ -1449,194 +1764,216 @@ msgstr "%B: Sijoitusta %s (%d) ei tällä hetkellä tueta.\n" msgid "%B: Unknown relocation type %d\n" msgstr "%B: Tuntematon sijoitustyyppi %d\n" -#: elf32-mep.c:812 +#: elf32-mep.c:654 msgid "%B and %B are for different cores" -msgstr "%B ja %B ovat eri ytimille" +msgstr "%B ja %B ovat eri käyttöjärjestelmäytimille" -#: elf32-mep.c:829 +#: elf32-mep.c:671 msgid "%B and %B are for different configurations" msgstr "%B ja %B ovat eri konfiguraatioille" -#: elf32-mep.c:867 +#: elf32-mep.c:708 #, c-format msgid "private flags = 0x%lx" msgstr "yksityiset liput = 0x%lx" -#: elf32-mips.c:989 elf64-mips.c:1976 elfn32-mips.c:1808 +#: elf32-microblaze.c:737 +#, c-format +msgid "%s: unknown relocation type %d" +msgstr "%s: tuntematon sijoitustyyppi %d" + +#: elf32-microblaze.c:862 elf32-microblaze.c:907 +#, c-format +msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)" +msgstr "%s: Kohteen (%s) sijoitus %s on väärässä lohkossa (%s)" + +#: elf32-microblaze.c:1150 elfxx-sparc.c:2957 +msgid "%B: probably compiled without -fPIC?" +msgstr "%B: luultavasti käännetty ilman -fPIC-argumenttia?" + +#: elf32-microblaze.c:2086 elflink.c:12444 +msgid "%B: bad relocation section name `%s'" +msgstr "%B: virheellinen sijoituslohkonimi ”%s”" + +#: elf32-mips.c:1045 elf64-mips.c:2083 elfn32-mips.c:1888 msgid "literal relocation occurs for an external symbol" msgstr "literaali sijoitus tapahtuu ulkoiselle symbolille" -#: elf32-mips.c:1029 elf32-score.c:484 elf64-mips.c:2019 elfn32-mips.c:1849 +#: elf32-mips.c:1085 elf32-score.c:580 elf32-score7.c:480 elf64-mips.c:2126 +#: elfn32-mips.c:1929 msgid "32bits gp relative relocation occurs for an external symbol" -msgstr "32-bittinen gp-suhteellinen sijoitus tapahtuu ulkoiselle symbolille" +msgstr "32-bittinen yleisosoitinsuhteellinen sijoitus tapahtuu ulkoiselle symbolille" -#: elf32-ppc.c:1681 +#: elf32-ppc.c:1731 #, c-format msgid "generic linker can't handle %s" msgstr "geneerinen linkkeri ei voi käsitellä kohdetta %s" -#: elf32-ppc.c:2163 +#: elf32-ppc.c:2211 msgid "corrupt or empty %s section in %B" msgstr "rikkinäinen tai tyhjä %s-lohko kohteessa %B" -#: elf32-ppc.c:2170 +#: elf32-ppc.c:2218 msgid "unable to read in %s section from %B" msgstr "ei voi lukea %s-lohkoon kohteesta %B" -#: elf32-ppc.c:2176 +#: elf32-ppc.c:2224 msgid "corrupt %s section in %B" msgstr "rikkinäinen %s-lohko kohteessa %B" -#: elf32-ppc.c:2219 +#: elf32-ppc.c:2267 msgid "warning: unable to set size of %s section in %B" msgstr "varoitus: ei voi asettaa %s-lohkon kokoa kohteessa %B" -#: elf32-ppc.c:2267 +#: elf32-ppc.c:2315 msgid "failed to allocate space for new APUinfo section." msgstr "ei onnistuttu varaamaan muistitilaa uudelle APUinfo-lohkolle." -#: elf32-ppc.c:2286 +#: elf32-ppc.c:2334 msgid "failed to compute new APUinfo section." msgstr "ei onnistuttu laskemaan uutta APUinfo-lohkoa" -#: elf32-ppc.c:2289 +#: elf32-ppc.c:2337 msgid "failed to install new APUinfo section." msgstr "ei onnistuttu asentamaan uutta APUinfo-lohkoa" -#: elf32-ppc.c:3022 +#: elf32-ppc.c:3364 msgid "%B: relocation %s cannot be used when making a shared object" msgstr "%B: sijoitusta %s ei voi käyttää kun tehdään jaettua objektia" #. It does not make sense to have a procedure linkage #. table entry for a local symbol. -#: elf32-ppc.c:3292 +#: elf32-ppc.c:3723 msgid "%B(%A+0x%lx): %s reloc against local symbol" msgstr "%B(%A+0x%lx): %s reloc-tietue paikallista symbolia varten" # Otaksun tässä että hard float tarkoittaa tässä muistipaikkaa (esim. rekisteriä), joka on varattu float-tyyppisille liukuluvuille -#: elf32-ppc.c:3633 elf32-ppc.c:3637 elfxx-mips.c:11036 elfxx-mips.c:11055 -#: elfxx-mips.c:11070 +#: elf32-ppc.c:4067 elf32-ppc.c:4082 elfxx-mips.c:12324 elfxx-mips.c:12350 +#: elfxx-mips.c:12372 elfxx-mips.c:12398 msgid "Warning: %B uses hard float, %B uses soft float" msgstr "Varoitus: %B käyttää laitteistoliukulukua, %B käyttää ohjelmistoliukulukua" -#: elf32-ppc.c:3640 elf32-ppc.c:3644 elfxx-mips.c:11017 elfxx-mips.c:11021 +# Otaksun tässä että hard float tarkoittaa tässä muistipaikkaa (esim. rekisteriä), joka on varattu float-tyyppisille liukuluvuille +#: elf32-ppc.c:4070 elf32-ppc.c:4074 +msgid "Warning: %B uses double-precision hard float, %B uses single-precision hard float" +msgstr "Varoitus: %B käyttää kaksoistarkkuuden laitteistoliukulukua, %B käyttää yksittäistarkkuuden laitteistoliukulukua" + +# Otaksun tässä että hard float tarkoittaa tässä muistipaikkaa (esim. rekisteriä), joka on varattu float-tyyppisille liukuluvuille +#: elf32-ppc.c:4078 +msgid "Warning: %B uses soft float, %B uses single-precision hard float" +msgstr "Varoitus: %B käyttää ohjelmistoliukulukua, %B käyttää yksittäistarkkuuden laitteistoliukulukua" + +#: elf32-ppc.c:4085 elf32-ppc.c:4089 elfxx-mips.c:12304 elfxx-mips.c:12308 msgid "Warning: %B uses unknown floating point ABI %d" msgstr "Varoitus: %B käyttää tuntematonta liukuluku-ABI:a %d" -#: elf32-ppc.c:3699 +#: elf32-ppc.c:4131 elf32-ppc.c:4135 +msgid "Warning: %B uses unknown vector ABI %d" +msgstr "Varoitus: %B käyttää tuntematonta vektori-ABI:a %d" + +#: elf32-ppc.c:4139 +msgid "Warning: %B uses vector ABI \"%s\", %B uses \"%s\"" +msgstr "Varoitus: %B käyttää vektori-ABI:a ”%s”, %B käyttää ”%s”" + +#: elf32-ppc.c:4156 elf32-ppc.c:4159 +msgid "Warning: %B uses r3/r4 for small structure returns, %B uses memory" +msgstr "Varoitus: %B käyttää r3/r4 pienille rakennepaluille, %B käyttää muistia" + +#: elf32-ppc.c:4162 elf32-ppc.c:4166 +msgid "Warning: %B uses unknown small structure return convention %d" +msgstr "Varoitus: %B käyttää tuntematonta pientä rakennepaluusopimusta %d" + +#: elf32-ppc.c:4220 msgid "%B: compiled with -mrelocatable and linked with modules compiled normally" msgstr "%B: käännetty ”-mrelocatable”-argumentilla ja linkitetty tavallisesti käännetyillä moduleilla" -#: elf32-ppc.c:3707 +#: elf32-ppc.c:4228 msgid "%B: compiled normally and linked with modules compiled with -mrelocatable" msgstr "%B: käännetty tavallisesti ja linkitetty moduleilla, jotka on käännetty ”-mrelocatable”-argumentilla" -#: elf32-ppc.c:3793 +#: elf32-ppc.c:4314 msgid "Using bss-plt due to %B" msgstr "Käytetään bss-plt-argumenttia %B:n vuoksi" -#: elf32-ppc.c:6002 elf64-ppc.c:10490 +#: elf32-ppc.c:7056 elf64-ppc.c:11364 msgid "%B: unknown relocation type %d for symbol %s" msgstr "%B: tuntematon sijoitustyyppi %d symbolille %s" -#: elf32-ppc.c:6252 +#: elf32-ppc.c:7316 msgid "%B(%A+0x%lx): non-zero addend on %s reloc against `%s'" msgstr "%B(%A+0x%lx): ei-nolla-yhteenlaskettava %s reloc-tietueessa symbolia ”%s” varten" -#: elf32-ppc.c:6597 elf32-ppc.c:6623 elf32-ppc.c:6682 +#: elf32-ppc.c:7499 elf64-ppc.c:11854 +msgid "%B(%A+0x%lx): relocation %s for indirect function %s unsupported" +msgstr "%B(%A+0x%lx): sijoitusta %s epäsuoralle funktiolle %s ei tueta" + +#: elf32-ppc.c:7709 elf32-ppc.c:7736 elf32-ppc.c:7787 msgid "%B: the target (%s) of a %s relocation is in the wrong output section (%s)" msgstr "%B: kohde (%s) sijoituksessa %s on väärässä tulostelohkossa (%s)" -#: elf32-ppc.c:6737 +#: elf32-ppc.c:7847 msgid "%B: relocation %s is not yet supported for symbol %s." msgstr "%B: sijoitus %s ei ole vielä tuettu symbolille %s." -#: elf32-ppc.c:6845 elf64-ppc.c:11185 +#: elf32-ppc.c:7955 elf64-ppc.c:12110 msgid "%B(%A+0x%lx): %s reloc against `%s': error %d" msgstr "%B(%A+0x%lx): %s reloc-tietuetta ”%s” varten: virhe %d" -#: elf32-s390.c:2238 elf64-s390.c:2212 +#: elf32-ppc.c:8423 +#, c-format +msgid "%s not defined in linker created %s" +msgstr "%s ei ole määritelty linkkerissä luodussa %s" + +#: elf32-s390.c:2207 elf64-s390.c:2179 msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s" msgstr "%B(%A+0x%lx): virheellinen käsky TLS-sijoitukselle %s" -#: elf32-score.c:1418 elfxx-mips.c:2699 +#: elf32-score.c:1533 elf32-score7.c:1424 elfxx-mips.c:3299 msgid "not enough GOT space for local GOT entries" msgstr "ei tarpeeksi yleissiirrostaulutilaa paikallisille yleissiirrostaulutulokohdille" -#: elf32-score.c:2550 +#: elf32-score.c:2765 +msgid "address not word align" +msgstr "osoite ei ole word-tasattu" + +#: elf32-score.c:2850 elf32-score7.c:2685 #, c-format msgid "%s: Malformed reloc detected for section %s" msgstr "%s: Väärän muotoinen reloc-tietue havaittu lohkolle %s" -#: elf32-score.c:2601 +#: elf32-score.c:2901 elf32-score7.c:2736 msgid "%B: CALL15 reloc at 0x%lx not against global symbol" msgstr "%B: CALL15 reloc-tietue kohteessa 0x%lx ei ole yleissymbolia varten" -#: elf32-score.c:3756 +#: elf32-score.c:4042 elf32-score7.c:3879 #, c-format msgid " [pic]" msgstr " [sijaintiriippumaton koodi]" -#: elf32-score.c:3760 +#: elf32-score.c:4046 elf32-score7.c:3883 #, c-format msgid " [fix dep]" msgstr " [korjaussyvyys]" -#: elf32-score.c:3802 elfxx-mips.c:11201 +#: elf32-score.c:4088 elf32-score7.c:3925 msgid "%B: warning: linking PIC files with non-PIC files" msgstr "%B: varoitus: linkitetään sijaintiriippumattomia kooditiedostoja sijaintiriippuvaisten kooditiedostojen kanssa" -#: elf32-sh64.c:222 elf64-sh64.c:2350 -#, c-format -msgid "%s: compiled as 32-bit object and %s is 64-bit" -msgstr "%s: käännetty 32-bittisenä objektina ja %s on 64-bittinen" - -#: elf32-sh64.c:225 elf64-sh64.c:2353 -#, c-format -msgid "%s: compiled as 64-bit object and %s is 32-bit" -msgstr "%s: käännetty 64-bittisenä objektina ja %s on 32-bittinen" - -#: elf32-sh64.c:227 elf64-sh64.c:2355 -#, c-format -msgid "%s: object size does not match that of target %s" -msgstr "%s: objektikoko ei täsmää kohteen %s objektikoon kanssa" - -#: elf32-sh64.c:450 elf64-sh64.c:2894 -#, c-format -msgid "%s: encountered datalabel symbol in input" -msgstr "%s: kohdattiin datalabel-symboli syötteessä" - -# prepare-to-branch (PTB) instruction -#: elf32-sh64.c:527 -msgid "PTB mismatch: a SHmedia address (bit 0 == 1)" -msgstr "PTB-täsmäämättömyys: SHmedia-osoite (bitti 0 == 1)" - -#: elf32-sh64.c:530 -msgid "PTA mismatch: a SHcompact address (bit 0 == 0)" -msgstr "PTA-täsmäämättömyys: SHcompact-osoite (bitti 0 == 0)" - -#: elf32-sh64.c:548 -#, c-format -msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16" -msgstr "%s: GAS-virhe: odottamaton PTB-käsky R_SH_PT_16-tyypillä" - -#: elf32-sh64.c:597 -msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n" -msgstr "%B: virhe: tasaamaton sijoitustyyppi %d siirroksessa %08x reloc-tietue %p\n" +#: elf32-sh-symbian.c:130 +msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS" +msgstr "%B: ”IMPORT AS”-direktiivi kohteelle %s kätkee edellisen ”IMPORT AS”-direktiivin" -#: elf32-sh64.c:673 -#, c-format -msgid "%s: could not write out added .cranges entries" -msgstr "%s: ei voitu kirjoittaa lisättyjä ”.cranges”-tulokohtia kokonaisuudessaan" +#: elf32-sh-symbian.c:383 +msgid "%B: Unrecognised .directive command: %s" +msgstr "%B: Tunnistamaton ”.directive”-komento: %s" -#: elf32-sh64.c:733 -#, c-format -msgid "%s: could not write out sorted .cranges entries" -msgstr "%s: ei voitu kirjoittaa lajiteltuja ”.cranges”-tulokohtia kokonaisuudessaan" +#: elf32-sh-symbian.c:503 +msgid "%B: Failed to add renamed symbol %s" +msgstr "%B: Ei onnistuttu lisäämään uudelleennimettyä symbolia %s" #: elf32-sh.c:533 msgid "%B: 0x%lx: warning: bad R_SH_USES offset" -msgstr "%B: 0x%lx: varoitus: virheellinen R_SH_USES-siirros" +msgstr "%B: 0x%lx: varoitus: virheellinen R_SH_USES-siirrososoite" #: elf32-sh.c:545 msgid "%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x" @@ -1644,7 +1981,7 @@ msgstr "%B: 0x%lx: varoitus: R_SH_USES osoittaa tunnistamattomaan käskyyn 0x%x" #: elf32-sh.c:562 msgid "%B: 0x%lx: warning: bad R_SH_USES load offset" -msgstr "%B: 0x%lx: varoitus: virheellinen R_SH_USES lataussiirros" +msgstr "%B: 0x%lx: varoitus: virheellinen R_SH_USES lataussiirrososoite" #: elf32-sh.c:577 msgid "%B: 0x%lx: warning: could not find expected reloc" @@ -1662,45 +1999,91 @@ msgstr "%B: 0x%lx: varoitus: ei voitu löytää odotettua ”COUNT reloc”-tiet msgid "%B: 0x%lx: warning: bad count" msgstr "%B: 0x%lx: varoitus: virheellinen lukumäärä" +# Kun käskykohdemuuttuja on sen lukualueen ulkopuolella, joka sallitaan kullekin käskykentälle, +# assembler voi muuntaa koodin käyttämään toiminnallisesti samanlaista käskyä tai käskysekvenssiä. +# Tämä prosessi tunnetaan nimellä relaxation. Tätä tehdään tyypillisesti haarautumiskäskyissä, koska +# haarautumiskohteen etäisyyttä ei tunneta ennen linkitystä. Tavallaan tällä tavalla kumotaan lukualueen +# rajoitteet (constraints). Siksi olen suomentanut sen termillä avartaminen. #: elf32-sh.c:1144 elf32-sh.c:1514 msgid "%B: 0x%lx: fatal: reloc overflow while relaxing" -msgstr "%B: 0x%lx: kohtalokas: reloc-tietue ylivuoto avartamisen aikana" +msgstr "%B: 0x%lx: vakava: reloc-tietue ylivuoto avartamisen aikana" -#: elf32-sh.c:3249 elf64-sh64.c:1526 +#: elf32-sh.c:3270 elf64-sh64.c:1526 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled" msgstr "Odottamatonta STO_SH5_ISA32 paikallisessa symbolissa ei käsitellä" -#: elf32-sh.c:3486 +# Kun käskykohdemuuttuja on sen lukualueen ulkopuolella, joka sallitaan kullekin käskykentälle, +# assembler voi muuntaa koodin käyttämään toiminnallisesti samanlaista käskyä tai käskysekvenssiä. +# Tämä prosessi tunnetaan nimellä relaxation. Tätä tehdään tyypillisesti haarautumiskäskyissä, koska +# haarautumiskohteen etäisyyttä ei tunneta ennen linkitystä. Tavallaan tällä tavalla kumotaan lukualueen +# rajoitteet (constraints). Siksi olen suomentanut sen termillä avartaminen. +#: elf32-sh.c:3507 msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation" -msgstr "%B: 0x%lx: kohtalokas: tasaamaton haarautumiskohde avarrustukisijoitukselle" +msgstr "%B: 0x%lx: vakava: tasaamaton haarautumiskohde avarrustuetulle sijoitukselle" -#: elf32-sh.c:3519 elf32-sh.c:3534 +#: elf32-sh.c:3540 elf32-sh.c:3555 msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx" -msgstr "%B: 0x%lx: kohtalokas: tasaamaton %s sijoitus 0x%lx" +msgstr "%B: 0x%lx: vakava: tasaamaton %s sijoitus 0x%lx" -#: elf32-sh.c:3548 +#: elf32-sh.c:3569 msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32" -msgstr "%B: 0x%lx: kohtalokas: R_SH_PSHA-sijoitus %d ei ole lukualueella -32..32" +msgstr "%B: 0x%lx: vakava: R_SH_PSHA-sijoitus %d ei ole lukualueella -32..32" -#: elf32-sh.c:3562 +#: elf32-sh.c:3583 msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32" -msgstr "%B: 0x%lx: kohtalokas: R_SH_PSHL-sijoitus %d ei ole lukualueella -32..32" +msgstr "%B: 0x%lx: vakava: R_SH_PSHL-sijoitus %d ei ole lukualueella -32..32" -#: elf32-sh.c:5275 elf64-alpha.c:4533 +#: elf32-sh.c:5256 elf64-alpha.c:4525 msgid "%B: TLS local exec code cannot be linked into shared objects" msgstr "%B: TLS-tyyppistä paikallista suoritettavaa koodia ei voida linkittää jaettuihin objekteihin" -#: elf32-sh-symbian.c:130 -msgid "%B: IMPORT AS directive for %s conceals previous IMPORT AS" -msgstr "%B: ”IMPORT AS”-direktiivi kohteelle %s kätkee edellisen ”IMPORT AS”-direktiivin" +#: elf32-sh64.c:222 elf64-sh64.c:2333 +#, c-format +msgid "%s: compiled as 32-bit object and %s is 64-bit" +msgstr "%s: käännetty 32-bittisenä objektina ja %s on 64-bittinen" -#: elf32-sh-symbian.c:383 -msgid "%B: Unrecognised .directive command: %s" -msgstr "%B: Tunnistamaton ”.directive”-komento: %s" +#: elf32-sh64.c:225 elf64-sh64.c:2336 +#, c-format +msgid "%s: compiled as 64-bit object and %s is 32-bit" +msgstr "%s: käännetty 64-bittisenä objektina ja %s on 32-bittinen" -#: elf32-sh-symbian.c:504 -msgid "%B: Failed to add renamed symbol %s" -msgstr "%B: Ei onnistuttu lisäämään uudelleennimettyä symbolia %s" +#: elf32-sh64.c:227 elf64-sh64.c:2338 +#, c-format +msgid "%s: object size does not match that of target %s" +msgstr "%s: objektikoko ei täsmää kohteen %s objektikoon kanssa" + +#: elf32-sh64.c:450 elf64-sh64.c:2852 +#, c-format +msgid "%s: encountered datalabel symbol in input" +msgstr "%s: kohdattiin datalabel-symboli syötteessä" + +# prepare-to-branch (PTB) instruction +#: elf32-sh64.c:527 +msgid "PTB mismatch: a SHmedia address (bit 0 == 1)" +msgstr "PTB-täsmäämättömyys: SHmedia-osoite (bitti 0 == 1)" + +#: elf32-sh64.c:530 +msgid "PTA mismatch: a SHcompact address (bit 0 == 0)" +msgstr "PTA-täsmäämättömyys: SHcompact-osoite (bitti 0 == 0)" + +#: elf32-sh64.c:548 +#, c-format +msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16" +msgstr "%s: GAS-virhe: odottamaton PTB-käsky R_SH_PT_16-tyypillä" + +#: elf32-sh64.c:597 +msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n" +msgstr "%B: virhe: tasaamaton sijoitustyyppi %d siirroksessa %08x reloc-tietue %p\n" + +#: elf32-sh64.c:673 +#, c-format +msgid "%s: could not write out added .cranges entries" +msgstr "%s: ei voitu kirjoittaa lisättyjä ”.cranges”-tulokohtia kokonaisuudessaan" + +#: elf32-sh64.c:733 +#, c-format +msgid "%s: could not write out sorted .cranges entries" +msgstr "%s: ei voitu kirjoittaa lajiteltuja ”.cranges”-tulokohtia kokonaisuudessaan" #: elf32-sparc.c:89 msgid "%B: compiled for a 64 bit system and target is 32 bit" @@ -1710,70 +2093,120 @@ msgstr "%B: käännetty 64-bittiselle järjestelmälle ja kohde on 32-bittinen" msgid "%B: linking little endian files with big endian files" msgstr "%B: linkitetty ”little endian”-tiedostoja ”big endian”-tiedostojen kanssa" -#: elf32-spu.c:995 +#: elf32-spu.c:723 +msgid "%X%P: overlay section %A does not start on a cache line.\n" +msgstr "%X%P: päällyslohko %A ei ala välimuistissa olevalta riviltä.\n" + +#: elf32-spu.c:731 +msgid "%X%P: overlay section %A is larger than a cache line.\n" +msgstr "%X%P: päällyslohko %A on laajempi kuin välimuistissa oleva rivi.\n" + +#: elf32-spu.c:751 +msgid "%X%P: overlay section %A is not in cache area.\n" +msgstr "%X%P: päällyslohko %A ei ole välimuistialueella.\n" + +#: elf32-spu.c:791 +msgid "%X%P: overlay sections %A and %A do not start at the same address.\n" +msgstr "%X%P: päällyslohkot %A ja %A eivät ala samasta osoitteesta.\n" + +#: elf32-spu.c:1015 msgid "warning: call to non-function symbol %s defined in %B" msgstr "varoitus: kutsu ei-funktiosymboliin %s määritelty kohteessa %B" -#: elf32-spu.c:1315 +#: elf32-spu.c:1365 +msgid "%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)\n" +msgstr "%A:0x%v lrlive .brinfo (%u) eroaa analyysistä (%u)\n" + +#: elf32-spu.c:1884 msgid "%B is not allowed to define %s" -msgstr "%B ei ole sallittu määritellä %s" +msgstr "%B ei saa määritellä kohdetta %s" -#: elf32-spu.c:1352 +#: elf32-spu.c:1892 +#, c-format +msgid "you are not allowed to define %s in a script" +msgstr "et saa määritellä kohdetta %s skriptissä" + +#: elf32-spu.c:1926 #, c-format msgid "%s in overlay section" msgstr "%s päällyslohkossa" -#: elf32-spu.c:1363 +#: elf32-spu.c:1955 msgid "overlay stub relocation overflow" msgstr "päällys-stub-sijoitusylivuoto" -#: elf32-spu.c:1820 +#: elf32-spu.c:1964 elf64-ppc.c:10441 +msgid "stubs don't match calculated size" +msgstr "stubit ei täsmää lasketun koon kanssa" + +#: elf32-spu.c:2546 #, c-format msgid "warning: %s overlaps %s\n" msgstr "varoitus: %s menee päällekkäin %s:n kanssa\n" -#: elf32-spu.c:1836 +#: elf32-spu.c:2562 #, c-format msgid "warning: %s exceeds section size\n" msgstr "varoitus: %s ylittää lohkokoon\n" -#: elf32-spu.c:1867 +#: elf32-spu.c:2593 msgid "%A:0x%v not found in function table\n" msgstr "%A:0x%v ei löytynyt funktiotaulusta\n" -#: elf32-spu.c:1958 -msgid "%B(%A+0x%v): call to non-code section %B(%A), stack analysis incomplete\n" -msgstr "%B(%A+0x%v): kutsu ei-koodilohkoon %B(%A), pinoanalyysi ei ole täydellinen\n" - -#: elf32-spu.c:2079 -#, c-format -msgid "%A link_order not found\n" -msgstr "%A link_order ei löytynyt\n" +#: elf32-spu.c:2740 +msgid "%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete\n" +msgstr "%B(%A+0x%v): kutsu ei-koodilohkoon %B(%A), analyysi ei ole täydellinen\n" -#: elf32-spu.c:2358 +#: elf32-spu.c:3297 #, c-format msgid "Stack analysis will ignore the call from %s to %s\n" msgstr "Pinoanalyysi ei ota huomioon kutsua kohteesta %s kohteeseen %s\n" -#: elf32-spu.c:2513 +#: elf32-spu.c:3988 +msgid " %s: 0x%v\n" +msgstr " %s: 0x%v\n" + +#: elf32-spu.c:3989 msgid "%s: 0x%v 0x%v\n" msgstr "%s: 0x%v 0x%v\n" -#: elf32-spu.c:2517 +#: elf32-spu.c:3994 msgid " calls:\n" msgstr " kutsut:\n" -#: elf32-spu.c:2524 +#: elf32-spu.c:4002 #, c-format msgid " %s%s %s\n" msgstr " %s%s %s\n" -#: elf32-spu.c:2585 +#: elf32-spu.c:4304 +#, c-format +msgid "%s duplicated in %s\n" +msgstr "%s kaksoiskappale kohteessa %s\n" + +#: elf32-spu.c:4308 +#, c-format +msgid "%s duplicated\n" +msgstr "%s on tehty kahteen kertaan\n" + +#: elf32-spu.c:4315 +msgid "sorry, no support for duplicate object files in auto-overlay script\n" +msgstr "ei tukea objektitiedostojen kaksoiskappaleille automaattisessa päällysskriptissä\n" + +#: elf32-spu.c:4356 +msgid "non-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local store\n" +msgstr "ei-päällyksen koko 0x%v plus päällyksen maksimikoko 0x%v ylittävät paikallisen varaston\n" + +#: elf32-spu.c:4512 +msgid "%B:%A%s exceeds overlay size\n" +msgstr "%B:%A%s ylittää päällyskoon\n" + +#: elf32-spu.c:4669 msgid "Stack size for call graph root nodes.\n" msgstr "Pinokoko kutsugraafijuurinodeille.\n" # Wikipedia: A tail call is a subroutine call just before the end of a subroutine. -#: elf32-spu.c:2586 +#: elf32-spu.c:4670 msgid "" "\n" "Stack size for functions. Annotations: '*' max stack, 't' tail call\n" @@ -1781,15 +2214,15 @@ msgstr "" "\n" "Pinokoko funktioille. Sivuhuomautukset: ”*” maksimipino, ”t” alikutsu\n" -#: elf32-spu.c:2615 -msgid " %s: 0x%v\n" -msgstr " %s: 0x%v\n" - -#: elf32-spu.c:2625 +#: elf32-spu.c:4680 msgid "Maximum stack required is 0x%v\n" msgstr "Vaadittu maksimipino on 0x%v\n" -#: elf32-spu.c:2751 +#: elf32-spu.c:4771 +msgid "fatal error while creating .fixup" +msgstr "vakava virhe kun luodaan .fixup" + +#: elf32-spu.c:5009 msgid "%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'" msgstr "%B(%s+0x%lx): ratkaisematon %s sijoitus symbolia ”%s” varten" @@ -1861,143 +2294,156 @@ msgstr "v850e-arkkitehtuuri" msgid "v850e1 architecture" msgstr "v850e1-arkkitehtuuri" -#: elf32-vax.c:541 +#: elf32-vax.c:543 #, c-format msgid " [nonpic]" msgstr " [sijaintiriippuvaisen koodin lippu]" -#: elf32-vax.c:544 +#: elf32-vax.c:546 #, c-format msgid " [d-float]" msgstr " [d-float-liukulukulippu]" -#: elf32-vax.c:547 +#: elf32-vax.c:549 #, c-format msgid " [g-float]" msgstr " [g-float-liukulukulippu]" -#: elf32-vax.c:657 +#: elf32-vax.c:666 #, c-format msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld" -msgstr "%s: varoitus: Yleissiirrostaulun %ld-yhteenlaskettava kohteelle ”%s”ei täsmää edellisen yleissiirrostaulun %ld-yhteenlaskettavan kanssa " +msgstr "%s: varoitus: Yleissiirrostaulun %ld-yhteenlaskettava kohteelle ”%s” ei täsmää edellisen yleissiirrostaulun %ld-yhteenlaskettavan kanssa" -#: elf32-vax.c:1584 +#: elf32-vax.c:1608 #, c-format msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored" msgstr "%s: varoitus: %d:n PLT-yhteenlaskettavaa kohteelle ”%s” lohkosta %s ei oteta huomioon" -#: elf32-vax.c:1721 +#: elf32-vax.c:1735 #, c-format msgid "%s: warning: %s relocation against symbol `%s' from %s section" msgstr "%s: varoitus: %s sijoitus symbolia ”%s” varten %s-lohkosta" -#: elf32-vax.c:1727 +#: elf32-vax.c:1741 #, c-format msgid "%s: warning: %s relocation to 0x%x from %s section" msgstr "%s: varoitus: %s sijoitus kohteeseen 0x%x ”%s”-lohkosta" -#: elf32-xstormy16.c:451 elf32-ia64.c:2962 elf64-ia64.c:2962 +#: elf32-xstormy16.c:451 elf32-ia64.c:2791 elf64-ia64.c:2791 msgid "non-zero addend in @fptr reloc" msgstr "ei-nolla-yhteenlaskettava ”@fptr reloc”-tietueessa" -#: elf32-xtensa.c:733 +#: elf32-xtensa.c:912 msgid "%B(%A): invalid property table" msgstr "%B(%A): virheellinen ominaisuustaulu" -#: elf32-xtensa.c:2177 +#: elf32-xtensa.c:2740 msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)" -msgstr "%B(%A+0x%lx): sijoitussiirros lukualueen (koko=0x%x) ulkopuolella" +msgstr "%B(%A+0x%lx): sijoitussiirrososoite lukualueen (koko=0x%x) ulkopuolella" -#: elf32-xtensa.c:2234 +#: elf32-xtensa.c:2819 elf32-xtensa.c:2940 msgid "dynamic relocation in read-only section" msgstr "dynaaminen sijoitus kirjoitussuojatussa lohkossa" -#: elf32-xtensa.c:2407 +#: elf32-xtensa.c:2916 +msgid "TLS relocation invalid without dynamic sections" +msgstr "TLS-siirros virheellinen ilman dynaamisia lohkoja" + +#: elf32-xtensa.c:3133 msgid "internal inconsistency in size of .got.loc section" msgstr "sisäinen epäjohdonmukaisuus ”.got.loc”-alilohkokoossa" -#: elf32-xtensa.c:2714 +#: elf32-xtensa.c:3443 msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x" msgstr "%B: yhteensopimaton konetyyppi. Tuloste on 0x%x. Syöte on 0x%x" -#: elf32-xtensa.c:3920 elf32-xtensa.c:3928 +#: elf32-xtensa.c:4672 elf32-xtensa.c:4680 msgid "Attempt to convert L32R/CALLX to CALL failed" msgstr "Yritys muuttaa ”L32R/CALLX”-kutsu ”CALL”-kutsuksi ei onnistunut" -#: elf32-xtensa.c:5522 elf32-xtensa.c:5598 elf32-xtensa.c:6714 +#: elf32-xtensa.c:6290 elf32-xtensa.c:6366 elf32-xtensa.c:7486 msgid "%B(%A+0x%lx): could not decode instruction; possible configuration mismatch" msgstr "%B(%A+0x%lx): ei voitu avata käskyä; mahdollinen konfiguraatiotäsmäämättömyys" -#: elf32-xtensa.c:6454 +#: elf32-xtensa.c:7226 msgid "%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch" msgstr "%B(%A+0x%lx): ei voitu avata käskyä XTENSA_ASM_SIMPLIFY-sijoitukselle; mahdollinen konfiguraatiotäsmäämättömyys" -#: elf32-xtensa.c:8166 +#: elf32-xtensa.c:8987 msgid "invalid relocation address" msgstr "virheellinen sijoitusosoite" -# Kun käskyoperandi on sen lukualueen ulkopuolella, joka sallitaan kullekin käskykentälle, +# Kun käskykohdemuuttuja on sen lukualueen ulkopuolella, joka sallitaan kullekin käskykentälle, # assembler voi muuntaa koodin käyttämään toiminnallisesti samanlaista käskyä tai käskysekvenssiä. # Tämä prosessi tunnetaan nimellä relaxation. Tätä tehdään tyypillisesti haarautumiskäskyissä, koska # haarautumiskohteen etäisyyttä ei tunneta ennen linkitystä. Tavallaan tällä tavalla kumotaan lukualueen # rajoitteet (constraints). Siksi olen suomentanut sen termillä avartaminen. -#: elf32-xtensa.c:8215 +#: elf32-xtensa.c:9036 msgid "overflow after relaxation" msgstr "ylivuoto avartamisen jälkeen" -#: elf32-xtensa.c:9341 +#: elf32-xtensa.c:10167 msgid "%B(%A+0x%lx): unexpected fix for %s relocation" msgstr "%B(%A+0x%lx): odottamaton korjaus %s-sijoitukselle" -#: elf64-alpha.c:453 +#: elf64-alpha.c:452 msgid "GPDISP relocation did not find ldah and lda instructions" msgstr "GPDISP-sijoitus ei löytänyt ”ldah”- ja ”lda”-käskyjä" -#: elf64-alpha.c:2404 +#: elf64-alpha.c:2389 msgid "%B: .got subsegment exceeds 64K (size %d)" msgstr "%B: ”.got”-alisegmentti ylittää 64kilotavun rajan (koko %d)" -#: elf64-alpha.c:4277 elf64-alpha.c:4289 +#: elf64-alpha.c:4269 elf64-alpha.c:4281 msgid "%B: gp-relative relocation against dynamic symbol %s" -msgstr "%B: gp-suhteellinen sijoitus dynaamista symbolia %s varten" +msgstr "%B: yleisosoitinsuhteellinen sijoitus dynaamista symbolia %s varten" -#: elf64-alpha.c:4315 elf64-alpha.c:4450 +#: elf64-alpha.c:4307 elf64-alpha.c:4442 msgid "%B: pc-relative relocation against dynamic symbol %s" -msgstr "%B: pc-suhteellinen sijoitus dynaamista symbolia %s varten" +msgstr "%B: ohjelmalaskurisuhteellinen sijoitus dynaamista symbolia %s varten" -#: elf64-alpha.c:4343 +#: elf64-alpha.c:4335 msgid "%B: change in gp: BRSGP %s" -msgstr "%B: vaihto gp:ssä: BRSGP %s" +msgstr "%B: vaihto yleisosoittimessa: BRSGP %s" -#: elf64-alpha.c:4368 +#: elf64-alpha.c:4360 msgid "" msgstr "" -#: elf64-alpha.c:4373 +#: elf64-alpha.c:4365 msgid "%B: !samegp reloc against symbol without .prologue: %s" msgstr "%B: ”!samegp reloc”-tietue symbolia varten ilman ”.prologue”-lohkoa: %s" -#: elf64-alpha.c:4425 +#: elf64-alpha.c:4417 msgid "%B: unhandled dynamic relocation against %s" msgstr "%B: käsittelemätön dynaaminen sijoitus %s:ta varten" -#: elf64-alpha.c:4457 +#: elf64-alpha.c:4449 msgid "%B: pc-relative relocation against undefined weak symbol %s" -msgstr "%B: pc-suhteellinen sijoitus määrittelemätöntä heikkoa symbolia %s varten" +msgstr "%B: ohjelmalaskurisuhteellinen sijoitus määrittelemätöntä heikkoa symbolia %s varten" -#: elf64-alpha.c:4517 +#: elf64-alpha.c:4509 msgid "%B: dtp-relative relocation against dynamic symbol %s" msgstr "%B: dtp-suhteellinen sijoitus dynaamista symbolia %s varten" -#: elf64-alpha.c:4540 +#: elf64-alpha.c:4532 msgid "%B: tp-relative relocation against dynamic symbol %s" msgstr "%B: tp-suhteellinen sijoitus dynaamista symbolia %s varten" -#: elf64-hppa.c:2040 +#: elf64-hppa.c:2091 #, c-format msgid "stub entry for %s cannot load .plt, dp offset = %ld" -msgstr "stub-tulokohta kohteelle %s ei voi ladata ”.plt”, dp-siirros = %ld" +msgstr "stub-tulokohta kohteelle %s ei voi ladata ”.plt”, dp-siirrososoite = %ld" +#: elf64-hppa.c:3273 +msgid "%B(%A+0x%lx): cannot reach %s" +msgstr "%B(%A+0x%lx): kohdetta %s ei voi tavoittaa" + +# Kun käskykohdemuuttuja on sen lukualueen ulkopuolella, joka sallitaan kullekin käskykentälle, +# assembler voi muuntaa koodin käyttämään toiminnallisesti samanlaista käskyä tai käskysekvenssiä. +# Tämä prosessi tunnetaan nimellä relaxation. Tätä tehdään tyypillisesti haarautumiskäskyissä, koska +# haarautumiskohteen etäisyyttä ei tunneta ennen linkitystä. Tavallaan tällä tavalla kumotaan lukualueen +# rajoitteet (constraints). Siksi olen suomentanut sen termillä avartaminen. #: elf64-mmix.c:1177 #, c-format msgid "" @@ -2005,7 +2451,7 @@ msgid "" " linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n" msgstr "" "%s: Sisäinen yhteensopimattomuusvirhe linkkerin varaamalle\n" -" yleisrekisteriarvolle: 0x%lx%08lx != avarrettu: 0x%lx%08lx\n" +" yleisrekisteriarvolle: linkitetty: 0x%lx%08lx != avarrettu: 0x%lx%08lx\n" #: elf64-mmix.c:1618 #, c-format @@ -2037,16 +2483,16 @@ msgstr "%s: direktiivi LOCAL on oikea vain rekisterissä tai absoluuttiarvona" msgid "%s: LOCAL directive: Register $%ld is not a local register. First global register is $%ld." msgstr "%s: LOCAL-direktiivi: Rekisteri $%ld ei ole paikallinen rekisteri. Ensimmäinen yleisrekisteri on $%ld." -#: elf64-mmix.c:2202 +#: elf64-mmix.c:2201 #, c-format msgid "%s: Error: multiple definition of `%s'; start of %s is set in a earlier linked file\n" msgstr "%s: Virhe: useita ”%s”-määrittelyjä; %s-alku on asetettu aiemmin linkitetyssä tiedostossa\n" -#: elf64-mmix.c:2260 +#: elf64-mmix.c:2259 msgid "Register section has contents\n" msgstr "Rekisterilohkossa on sisältö\n" -#: elf64-mmix.c:2452 +#: elf64-mmix.c:2451 #, c-format msgid "" "Internal inconsistency: remaining %u != max %u.\n" @@ -2055,69 +2501,65 @@ msgstr "" "Sisäinen yhteensopimattomuus: jäljelle jäävä %u != maksimi %u.\n" " Lähetä raportit ohjelmistovioista (englanniksi) osoitteeseen http://sourceware.org/bugzilla/." -#: elf64-ppc.c:2569 libbfd.c:950 +#: elf64-ppc.c:2691 libbfd.c:978 msgid "%B: compiled for a big endian system and target is little endian" msgstr "%B: käännetty ”big endian”-järjestelmälle ja kohde on ”little endian”" -#: elf64-ppc.c:2572 libbfd.c:952 +#: elf64-ppc.c:2694 libbfd.c:980 msgid "%B: compiled for a little endian system and target is big endian" msgstr "%B: käännetty ”little endian”-järjestelmälle ja kohde on ”big endian”" -#: elf64-ppc.c:5888 +#: elf64-ppc.c:6338 #, c-format msgid "copy reloc against `%s' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc" msgstr "kopio-reloc-tietue ”%s”:ta varten vaatii laiskan plt-linkityksen; vältä asettamasta LD_BIND_NOW=1 tai päivitä gcc" -#: elf64-ppc.c:6316 +#: elf64-ppc.c:6767 msgid "dynreloc miscount for %B, section %A" msgstr "dynreloc-väärinlaskenta kohteelle %B, lohko %A" -#: elf64-ppc.c:6420 +#: elf64-ppc.c:6851 msgid "%B: .opd is not a regular array of opd entries" msgstr "%B: ”.opd” ei ole säännönmukainen opd-tulokohtien taulukko" -#: elf64-ppc.c:6429 +#: elf64-ppc.c:6860 msgid "%B: unexpected reloc type %u in .opd section" msgstr "%B: odottamaton reloc-tyyppi %u ”.opd”-lohkossa" -#: elf64-ppc.c:6450 +#: elf64-ppc.c:6881 msgid "%B: undefined sym `%s' in .opd section" msgstr "%B: määrittelemätön symboli ”%s” ”.opd”-lohkossa" -#: elf64-ppc.c:7157 elf64-ppc.c:7537 +#: elf64-ppc.c:7640 elf64-ppc.c:8017 #, c-format msgid "%s defined in removed toc entry" msgstr "%s määritelty poistetussa ”sisällysluettelo”-tulokohdassa" -#: elf64-ppc.c:8272 +#: elf64-ppc.c:8910 #, c-format msgid "long branch stub `%s' offset overflow" -msgstr "pitkä haarautumis-stub ”%s” siirrosylivuoto" +msgstr "pitkä haarautumis-stub ”%s” siirrososoitteen ylivuoto" -#: elf64-ppc.c:8347 +#: elf64-ppc.c:8969 #, c-format msgid "can't find branch stub `%s'" msgstr "ei löydy haarautumis-stub-kohdetta ”%s”" -#: elf64-ppc.c:8413 elf64-ppc.c:8489 +#: elf64-ppc.c:9031 elf64-ppc.c:9169 #, c-format msgid "linkage table error against `%s'" msgstr "linkitystauluvirhe ”%s”:ta varten" -#: elf64-ppc.c:8618 +#: elf64-ppc.c:9326 #, c-format msgid "can't build branch stub `%s'" msgstr "ei voi muodostaa haaroitus-stub-kohdetta ”%s”" -#: elf64-ppc.c:9070 +#: elf64-ppc.c:9799 msgid "%B section %A exceeds stub group size" msgstr "%B lohko %A ylittää stub-ryhmäkoon" -#: elf64-ppc.c:9682 -msgid "stubs don't match calculated size" -msgstr "stubit ei täsmää lasketun koon kanssa" - -#: elf64-ppc.c:9694 +#: elf64-ppc.c:10453 #, c-format msgid "" "linker stubs in %u group%s\n" @@ -2128,543 +2570,413 @@ msgid "" " plt call %lu" msgstr "" "linkkeristubit %u-ryhmä%s:ssä\n" -" haarautuminen %lu\n" -" sisältöluettelosäätö %lu\n" -" pitkä haarautuminen %lu\n" +" haarautuminen %lu\n" +" sisältöluettelosäätö %lu\n" +" pitkä haarautuminen %lu\n" " pitkä sisältöluettelosäätö %lu\n" -" plt-kutsu %lu" +" plt-kutsu %lu" -#: elf64-ppc.c:10378 +#: elf64-ppc.c:11252 msgid "%B(%A+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc" msgstr "%B(%A+0x%lx): automaattisia useita sisältöluettelotauluja ei ole tuettu crt-tiedostoissasi; käännä uudelleen ”-mminimal-toc”-argumentilla tai päivitä gcc" -#: elf64-ppc.c:10386 +#: elf64-ppc.c:11260 msgid "%B(%A+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern" -msgstr "%B(%A+0x%lx): sisarruskutsuoptimointi kohteeseen ”%s” ei salli automaattisia useita sisällysluettelotauluja; käännä uudelleen ”-mminimal-toc”-argumentilla tai ”-fno-optimize-sibling-calls”-argumentilla, tai tee kohteesta ”%s” ulkoinen" - -#: elf64-ppc.c:11037 -msgid "%B: relocation %s is not supported for symbol %s." -msgstr "%B: sijoitus %s ei ole tuettu symbolille %s." - -#: elf64-ppc.c:11119 -msgid "%B: error: relocation %s not a multiple of %d" -msgstr "%B: virhe: sijoitus %s ei ole %d:n kerrannainen" - -#: elf64-sh64.c:1701 -#, c-format -msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n" -msgstr "%s: virhe: tasaamaton sijoitustyyppi %d kohteessa %08x reloc-tietue %08x\n" - -#: elf64-sparc.c:439 -msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER" -msgstr "%B: Vain rekisterit %%g[2367] voidaan esitellä käyttäen STT_REGISTER-symbolia" - -#: elf64-sparc.c:459 -msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B" -msgstr "Rekisteriä %%g%d käytetty yhteensopimattomasti: %s kohteessa %B, aikaisemmin %s kohteessa %B" - -#: elf64-sparc.c:482 -msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B" -msgstr "Symbolissa ”%s” on eri tyyppejä: REGISTER kohteessa %B, aiemmin %s kohteessa %B" - -#: elf64-sparc.c:527 -msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B" -msgstr "Symbolissa ”%s” on eri tyyppejä: %s kohteessa %B, aiemmin REGISTER kohteessa %B" - -#: elf64-sparc.c:678 -msgid "%B: linking UltraSPARC specific with HAL specific code" -msgstr "%B: linkitetään UltraSPARC-kohtainen HAL-kohtaisella koodilla" - -#: elf64-x86-64.c:799 elf64-x86-64.c:959 elf64-x86-64.c:2360 -msgid "%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC" -msgstr "%B: sijoitusta %s kohdetta ”%s” varten ei voida käyttää kun tehdään jaettua objektia; käännä uudelleen -fPIC-argumentilla" - -# tässä on ehkä virhe msgid-koodissa ja kaksoispisteen jälkeen pitäisi ehkä olla lainausmerkki. -#: elf64-x86-64.c:890 -msgid "%B: %s' accessed both as normal and thread local symbol" -msgstr "%B: %s” kutsuttu sekä normaalina että säikeisenä paikallissymbolina" - -#: elf64-x86-64.c:2272 -msgid "%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object" -msgstr "%B: sijoitusta R_X86_64_GOTOFF64 suojattua funktiota ”%s” varten ei voida käyttää kun tehdään jaettua objektia" - -#: elf64-x86-64.c:2356 -msgid "%B: relocation R_X86_64_PC32 against protected function `%s' can not be used when making a shared object" -msgstr "%B: sijoitusta R_X86_64_PC32 suojattua funktiota ”%s” varten ei voida käyttää kun tehdään jaettua objektia" - -#: elf-attrs.c:582 -msgid "ERROR: %B: Must be processed by '%s' toolchain" -msgstr "VIRHE: %B: ”%s”-työkaluketjun on prosessoitava" - -#: elf-attrs.c:602 elf-attrs.c:621 -msgid "ERROR: %B: Incompatible object tag '%s':%d" -msgstr "VIRHE: %B: Yhteensopimaton objektitunnus ”%s”:%d" - -#: elf.c:312 -msgid "%B: invalid string offset %u >= %lu for section `%s'" -msgstr "%B: virheellinen merkkijonosiirros %u >= %lu lohkolle ”%s”" - -#: elf.c:414 -msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section" -msgstr "%B symbolinumero %lu viittaa puuttuvaan SHT_SYMTAB_SHNDX-lohkoon" - -#: elf.c:567 -msgid "%B: Corrupt size field in group section header: 0x%lx" -msgstr "%B: Rikkinäinen kokokenttä ryhmälohko-otsakkeessa: 0x%lx" - -#: elf.c:603 -msgid "%B: invalid SHT_GROUP entry" -msgstr "%B: virheellinen SHT_GROUP-tulokohta" - -#: elf.c:673 -msgid "%B: no group info for section %A" -msgstr "%B: ei ryhmätietoja lohkolle %A" - -#: elf.c:703 elf.c:2886 elflink.c:9858 -msgid "%B: warning: sh_link not set for section `%A'" -msgstr "%B: varoitus: sh_link-kenttää ei aseteta lohkolle ”%A”" - -#: elf.c:719 -msgid "%B: sh_link [%d] in section `%A' is incorrect" -msgstr "%B: sh_link [%d]-kenttä lohkossa ”%A” on virheellinen" - -#: elf.c:754 -msgid "%B: unknown [%d] section `%s' in group [%s]" -msgstr "%B: tuntematon [%d] lohko ”%s” ryhmässä [%s]" - -#: elf.c:1108 -#, c-format -msgid "" -"\n" -"Program Header:\n" -msgstr "" -"\n" -"Ohjelmaotsake:\n" - -#: elf.c:1150 -#, c-format -msgid "" -"\n" -"Dynamic Section:\n" -msgstr "" -"\n" -"Dynaaminen lohko:\n" - -#: elf.c:1276 -#, c-format -msgid "" -"\n" -"Version definitions:\n" -msgstr "" -"\n" -"Versiomäärittelyt:\n" - -#: elf.c:1301 -#, c-format -msgid "" -"\n" -"Version References:\n" -msgstr "" -"\n" -"Versioviitteet:\n" - -#: elf.c:1306 -#, c-format -msgid " required from %s:\n" -msgstr " kysytty kohteesta %s:\n" - -#: elf.c:1690 -msgid "%B: invalid link %lu for reloc section %s (index %u)" -msgstr "%B: virheellinen linkki %lu reloc-tietueelle %s (indeksi %u)" - -#: elf.c:1858 -msgid "%B: don't know how to handle allocated, application specific section `%s' [0x%8x]" -msgstr "%B: ei tiedä kuinka käsitellä varattua, sovelluskohtaista lohkoa ”%s” [0x%8x]" +msgstr "%B(%A+0x%lx): sisarruskutsuoptimointi kohteeseen ”%s” ei salli automaattisia useita sisällysluettelotauluja; käännä uudelleen ”-mminimal-toc”-argumentilla tai ”-fno-optimize-sibling-calls”-argumentilla, tai tee kohteesta ”%s” ulkoinen" -#: elf.c:1870 -msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]" -msgstr "%B: ei tiedä, kuinka käsitellä prosessorikohtaista lohkoa ”%s” [0x%8x]" +#: elf64-ppc.c:11961 +msgid "%B: relocation %s is not supported for symbol %s." +msgstr "%B: sijoitus %s ei ole tuettu symbolille %s." -#: elf.c:1881 -msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]" -msgstr "%B: ei tiedä, kuinka käsitellä käyttöjärjestelmäkohtaista lohkoa ”%s” [0x%8x]" +#: elf64-ppc.c:12044 +msgid "%B: error: relocation %s not a multiple of %d" +msgstr "%B: virhe: sijoitus %s ei ole %d:n kerrannainen" -#: elf.c:1891 -msgid "%B: don't know how to handle section `%s' [0x%8x]" -msgstr "%B: ei tiedä kuinka käsitellä lohkoa ”%s” [0x%8x]" +#: elf64-sh64.c:1701 +#, c-format +msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n" +msgstr "%s: virhe: tasaamaton sijoitustyyppi %d kohteessa %08x reloc-tietue %08x\n" -#: elf.c:2843 -msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'" -msgstr "%B: sh_link-lohko ”%A” osoittaa hylättyyn lohkoon ”%A” kohteessa ”%B”" +#: elf64-sparc.c:439 +msgid "%B: Only registers %%g[2367] can be declared using STT_REGISTER" +msgstr "%B: Vain rekisterit %%g[2367] voidaan esitellä käyttäen STT_REGISTER-symbolia" -#: elf.c:2866 -msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'" -msgstr "%B: sh_link-lohko ”%A” osoittaa poistettuun lohkoon ”%A” kohteessa ”%B”" +#: elf64-sparc.c:459 +msgid "Register %%g%d used incompatibly: %s in %B, previously %s in %B" +msgstr "Rekisteriä %%g%d käytetty yhteensopimattomasti: %s kohteessa %B, aikaisemmin %s kohteessa %B" -#: elf.c:4142 -msgid "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section" -msgstr "%B: Ensimmäinen lohko PT_DYNAMIC-segmentissä ei ole ”.dynamic”-lohko" +#: elf64-sparc.c:482 +msgid "Symbol `%s' has differing types: REGISTER in %B, previously %s in %B" +msgstr "Symbolissa ”%s” on eri tyyppejä: REGISTER kohteessa %B, aiemmin %s kohteessa %B" -#: elf.c:4165 -msgid "%B: Not enough room for program headers, try linking with -N" -msgstr "%B: Ei tarpeeksi tilaa ohjelmaotsakkeille, yritä linkittää ”-N”-argumentilla" +#: elf64-sparc.c:527 +msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B" +msgstr "Symbolissa ”%s” on eri tyyppejä: %s kohteessa %B, aiemmin REGISTER kohteessa %B" -# Lightspeed Memory Architecture (rekisteröity tavaramerkki) eli LMA -#: elf.c:4243 -msgid "%B: section %A lma 0x%lx overlaps previous sections" -msgstr "%B: lohko %A lma 0x%lx menee päällekkäin edellisten lohkojen kanssa" +#: elf64-sparc.c:679 +msgid "%B: linking UltraSPARC specific with HAL specific code" +msgstr "%B: linkitetään UltraSPARC-kohtainen HAL-kohtaisella koodilla" -#: elf.c:4341 -msgid "%B: section `%A' can't be allocated in segment %d" -msgstr "%B: lohkoa ”%A” ei voida varata segmentissä %d" +#: elf64-x86-64.c:1337 +msgid "%B: '%s' accessed both as normal and thread local symbol" +msgstr "%B: ”%s” kutsuttu sekä normaalina että säikeisenä paikallissymbolina" -#: elf.c:4390 -msgid "%B: warning: allocated section `%s' not in segment" -msgstr "%B: varoitus: varattu lohko ”%s” ei ole segmentissä" +#: elf64-x86-64.c:2701 +msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d" +msgstr "%B: sijoituksella %s kohteen STT_GNU_IFUNC-symbolia ”%s” varten on ei-nolla-yhteenlaskettava: %d" -#: elf.c:4886 -msgid "%B: symbol `%s' required but not present" -msgstr "%B: symboli ”%s” vaadittu, mutta ei ole annettu" +#: elf64-x86-64.c:2980 +msgid "%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object" +msgstr "%B: sijoitusta R_X86_64_GOTOFF64 suojattua funktiota ”%s” varten ei voida käyttää kun tehdään jaettua objektia" -#: elf.c:5199 -msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n" -msgstr "%B: varoitus: Tyhjä ladattava segmentti havaittu, onko tämä tarkoituksellinen ?\n" +#: elf64-x86-64.c:3091 +msgid "; recompile with -fPIC" +msgstr "; käännetty uudelleen -fPIC-parametrillä" -#: elf.c:6105 -#, c-format -msgid "Unable to find equivalent output section for symbol '%s' from section '%s'" -msgstr "Ei löydy samanlaista tulostelohkoa symbolille ”%s” lohkosta ”%s”" +#: elf64-x86-64.c:3096 +msgid "%B: relocation %s against %s `%s' can not be used when making a shared object%s" +msgstr "%B: sijoitusta %s kohteeseen %s ”%s” ei voi käyttää kun tehdään jaettua objektia %s" -#: elf.c:7079 -msgid "%B: unsupported relocation type %s" -msgstr "%B: ei-tuettu sijoitustyyppi %s" +#: elf64-x86-64.c:3098 +msgid "%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s" +msgstr "%B: sijoitusta %s kohteeseen %s ”%s” ei voi käyttää kun tehdään jaettua objektia %s" -#: elfcode.h:813 +#: elfcode.h:795 #, c-format msgid "warning: %s has a corrupt string table index - ignoring" msgstr "varoitus: %s:ssa on rikkinäinen merkkijonotauluindeksi - ei oteta huomioon" -#: elfcode.h:1226 +#: elfcode.h:1201 #, c-format msgid "%s: version count (%ld) does not match symbol count (%ld)" msgstr "%s: versiolukumäärä (%ld) ei täsmää symbolilukumäärän (%ld) kanssa" -#: elfcode.h:1459 +#: elfcode.h:1441 #, c-format msgid "%s(%s): relocation %d has invalid symbol index %ld" msgstr "%s(%s): sijoituksessa %d on virheellinen symboli-indeksi %ld" -#: elf-eh-frame.c:823 -msgid "%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n" -msgstr "%P: fde-koodaus kohteessa %B(%A) estää ”.eh_frame_hdr”-taulun luomisen.\n" - -#: elf-eh-frame.c:974 -msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n" -msgstr "%P: virhe kohteessa %B(%A); ”.eh_frame_hdr”-taulua ei luotu.\n" +#: elfcore.h:251 +msgid "Warning: %B is truncated: expected core file size >= %lu, found: %lu." +msgstr "Varoitus: %B typistettiin: odotettu käyttöjärjestelmäydintiedoston koko >= %lu, löytyi: %lu." -#: elf-hppa.h:2219 elf-hppa.h:2233 -msgid "%B(%A): warning: unresolvable relocation against symbol `%s'" -msgstr "%B(%A): varoitus: ratkaisematon sijoitus symbolia ”%s” varten" - -#: elflink.c:1028 +#: elflink.c:1113 msgid "%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A" msgstr "%s: TLS-määrittely kohteessa %B lohko %A ei täsmää ei-TLS-määrittelyn kanssa kohteessa %B lohko %A" -#: elflink.c:1032 +#: elflink.c:1117 msgid "%s: TLS reference in %B mismatches non-TLS reference in %B" msgstr "%s: TLS-viite kohteessa %B ei täsmää ei-TLS-viitteen kanssa kohteessa %B" -#: elflink.c:1036 +#: elflink.c:1121 msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B" msgstr "%s: TLS-määrittely kohteessa %B lohko %A ei täsmää ei-TLS-viitteen kanssa kohteessa %B" -#: elflink.c:1040 +#: elflink.c:1125 msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A" msgstr "%s: TLS-viite kohteessa %B ei täsmää ei-TLS-määrittelyn kanssa kohteessa %B lohko %A" -#: elflink.c:1654 +#: elflink.c:1764 msgid "%B: unexpected redefinition of indirect versioned symbol `%s'" msgstr "%B: epäsuoran versioidun symbolin ”%s” odottamaton uudelleenmäärittely" -#: elflink.c:1974 +#: elflink.c:2077 msgid "%B: version node not found for symbol %s" msgstr "%B: versiosolmua ei löydetty symbolille %s" -#: elflink.c:2122 +#: elflink.c:2167 msgid "%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'" -msgstr "%B: virheellinen reloc-tietuesymboli-indeksi (0x%lx >= 0x%lx) siirrokselle 0x%lx lohkossa ”%A”" +msgstr "%B: virheellinen reloc-tietuesymboli-indeksi (0x%lx >= 0x%lx) siirrososoitteelle 0x%lx lohkossa ”%A”" + +#: elflink.c:2178 +msgid "%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table" +msgstr "%B: ei-nolla symboli-indeksi (0x%lx) siirrososoitetta 0x%lx varten lohkossa ”%A” kun objektitiedostolla ei ole symbolitaulua" -#: elflink.c:2314 +#: elflink.c:2375 msgid "%B: relocation size mismatch in %B section %A" -msgstr "%B: sijoituskokotäsmäämättömyys %B:n tulolohkossa %A" +msgstr "%B: sijoituskokotäsmäämättömyys %B:n tulolohkossa %A" -#: elflink.c:2616 +#: elflink.c:2678 #, c-format msgid "warning: type and size of dynamic symbol `%s' are not defined" msgstr "varoitus: dynaamisen symbolin ”%s” tyyppi ja koko ei ole määritelty" -#: elflink.c:3910 +# USA:ssa alternate-sanaa käytetään yleisesti, kun tarkoitetaan alternative. +#: elflink.c:3424 +msgid "%P: alternate ELF machine code found (%d) in %B, expecting %d\n" +msgstr "%P: vaihtoehtoinen ELF-konekoodi löydetty (%d) kohteessa %B, otetaan %d\n" + +#: elflink.c:4032 msgid "%B: %s: invalid version %u (max %d)" msgstr "%B: %s: virheellinen versio %u (maksimi %d)" -#: elflink.c:3946 +#: elflink.c:4068 msgid "%B: %s: invalid needed version %d" msgstr "%B: %s: virheellinen tarvittu versio %d" -#: elflink.c:4129 +#: elflink.c:4253 msgid "Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %A" msgstr "Varoitus: tasaus %u yhteissymbolissa ”%s” kohteessa %B on suurempi kuin tasaus (%u) sen lohkossa %A" -#: elflink.c:4135 +#: elflink.c:4259 msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B" msgstr "Varoitus: tasaus %u symbolissa ”%s” kohteessa %B on pienempi kuin %u kohteessa %B" -#: elflink.c:4150 +#: elflink.c:4274 msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B" msgstr "Varoitus: symbolin ”%s” koko vaihtui koosta %lu kohteessa %B kokoon %lu kohteessa %B" -#: elflink.c:4326 +#: elflink.c:4438 #, c-format msgid "%s: invalid DSO for symbol `%s' definition" msgstr "%s: virheellinen DSO symbolin ”%s” määrittelylle" -#: elflink.c:5552 +#: elflink.c:5688 #, c-format msgid "%s: undefined version: %s" msgstr "%s: määrittelemätön versio: %s" -#: elflink.c:5620 +#: elflink.c:5756 msgid "%B: .preinit_array section is not allowed in DSO" msgstr "%B: ”.preinit_array”-lohkoa ei sallita kohteessa DSO" -#: elflink.c:7359 +#: elflink.c:7484 #, c-format msgid "undefined %s reference in complex symbol: %s" msgstr "määrittelemätön %s-viite kompleksisymbolissa: %s" -#: elflink.c:7514 +#: elflink.c:7638 #, c-format msgid "unknown operator '%c' in complex symbol" msgstr "tuntematon operaattori ”%c” kompleksisymbolissa" -#: elflink.c:8053 elflink.c:8070 elflink.c:8107 elflink.c:8124 +#: elflink.c:7976 elflink.c:7993 elflink.c:8030 elflink.c:8047 msgid "%B: Unable to sort relocs - they are in more than one size" msgstr "%B: Ei voi lajitella relocs-tietueita - niitä on useampia kuin yhtä kokoa" -#: elflink.c:8084 elflink.c:8138 +#: elflink.c:8007 elflink.c:8061 msgid "%B: Unable to sort relocs - they are of an unknown size" msgstr "%B: Ei voi lajitella relocs-tietueita - niiden koko on tuntematon" -#: elflink.c:8187 +#: elflink.c:8112 msgid "Not enough memory to sort relocations" msgstr "Ei tarpeeksi muistia sijoitusten lajittelemiseen" -#: elflink.c:8374 +#: elflink.c:8304 msgid "%B: Too many sections: %d (>= %d)" msgstr "%B: Liian monia lohkoja: %d (>= %d)" -#: elflink.c:8608 +#: elflink.c:8540 msgid "%B: %s symbol `%s' in %B is referenced by DSO" msgstr "%B: %s symboli ”%s” kohteessa %B on DSO:n viitteenä" -#: elflink.c:8691 +#: elflink.c:8625 msgid "%B: could not find output section %A for input section %A" msgstr "%B: ei löytynyt tulostelohkoa %A syötelohkolle %A" -#: elflink.c:8788 +#: elflink.c:8745 msgid "%B: %s symbol `%s' isn't defined" msgstr "%B: %s symbolia ”%s” ei ole määritelty" -#: elflink.c:9284 +#: elflink.c:9301 msgid "error: %B contains a reloc (0x%s) for section %A that references a non-existent global symbol" msgstr "virhe: %B sisältää reloc-tietueen (0x%s) lohkolle %A, joka viittaa puuttuvaan yleissymboliin" -#: elflink.c:9318 +#: elflink.c:9366 msgid "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B\n" msgstr "%X”%s” viitattu lohkossa ”%A” kohteessa %B: määritelty hylätyssä lohkossa ”%A” / %B\n" -#: elflink.c:9936 +#: elflink.c:9991 msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections" msgstr "%A:ssa on sekä järjestettyjä [”%A” kohteessa %B] että järjestämättömiä [”%A” kohteessa %B] lohkoja" -#: elflink.c:9941 +#: elflink.c:9996 #, c-format msgid "%A has both ordered and unordered sections" msgstr "%A:ssa on sekä järjestettyjä että järjestämättömiä lohkoja" -#: elflink.c:10828 elflink.c:10872 +#: elflink.c:10872 elflink.c:10916 msgid "%B: could not find output section %s" msgstr "%B: ei löytynyt tulostelohkoa %s" -#: elflink.c:10833 +#: elflink.c:10877 #, c-format msgid "warning: %s section has zero size" msgstr "varoitus: %s-lohkossa on nollakoko" -#: elflink.c:10937 +#: elflink.c:10982 msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n" msgstr "%P: varoitus: luodaan DT_TEXTREL-tunniste jaettussa objektissa.\n" -#: elflink.c:11305 +#: elflink.c:11165 +msgid "%P%X: can not read symbols: %E\n" +msgstr "%P%X: ei voi lukea symboleja: %E\n" + +#: elflink.c:11483 msgid "Removing unused section '%s' in file '%B'" msgstr "Poistetaan käyttämätön lohko ”%s” tiedostossa ”%B”" -#: elflink.c:11496 +#: elflink.c:11695 msgid "Warning: gc-sections option ignored" msgstr "Varoitus: ”gc-sections”-valitsinta ei oteta huomioon" -#: elflink.c:11987 -msgid "%P%X: can not read symbols: %E\n" -msgstr "%P%X: ei voi lukea symboleja: %E\n" - -#: elflink.c:12129 +#: elflink.c:12242 msgid "%B: ignoring duplicate section `%A'" msgstr "%B: ei oteta huomioon lohkon ”%A” kaksoiskappaletta" -#: elflink.c:12136 elflink.c:12143 +#: elflink.c:12249 elflink.c:12256 msgid "%B: duplicate section `%A' has different size" msgstr "%B: lohkon ”%A” kaksoiskappaleessa on eri koko" -#: elflink.c:12151 elflink.c:12156 +#: elflink.c:12264 elflink.c:12269 msgid "%B: warning: could not read contents of section `%A'" msgstr "%B: varoitus: ei voitu lukea lohkon ”%A” sisältöä" -#: elflink.c:12160 +#: elflink.c:12273 msgid "%B: warning: duplicate section `%A' has different contents" msgstr "%B: varoitus: lohkon ”%A” kaksoiskappaleella on erilainen sisältö" -#: elflink.c:12239 linker.c:3081 -msgid "%F%P: already_linked_table: %E" -msgstr "%F%P: already_linked_table: %E" - -#: elf-m10300.c:1532 -msgid "error: inappropriate relocation type for shared library (did you forget -fpic?)" -msgstr "virhe: sopimaton sijoitustyyppi jaetulle kirjastolle (unohtuiko -fpic?)" - -#: elf-m10300.c:1535 -msgid "internal error: suspicious relocation type used in shared library" -msgstr "sisäinen virhe: epäilyttävää sijoitustyyppiä käytetään jaetussa kirjastossa" +#: elflink.c:12374 linker.c:3098 +msgid "%F%P: already_linked_table: %E\n" +msgstr "%F%P: already_linked_table: %E\n" -#: elfxx-mips.c:990 +#: elfxx-mips.c:1222 msgid "static procedure (no name)" msgstr "staattinen proseduuri (ei nimeä)" -#: elfxx-mips.c:4663 +#: elfxx-mips.c:5588 msgid "%B: %A+0x%lx: jump to stub routine which is not jal" msgstr "%B: %A+0x%lx: hyppää stub-rutiiniin, joka ei ole jal-käsky" -#: elfxx-mips.c:5326 elfxx-mips.c:5546 +#: elfxx-mips.c:6235 elfxx-mips.c:6458 msgid "%B: Warning: bad `%s' option size %u smaller than its header" msgstr "%B: Varoitus: virheellinen ”%s”-valitsinkoko %u pienempi kuin sen otsake" -#: elfxx-mips.c:6405 +#: elfxx-mips.c:7205 elfxx-mips.c:7330 +msgid "%B: Warning: cannot determine the target function for stub section `%s'" +msgstr "%B: varoitus: ei voi määritellä stub-lohkon ”%s” kohdefunktiota" + +#: elfxx-mips.c:7459 msgid "%B: Malformed reloc detected for section %s" msgstr "%B: Muodoltaan virheellinen reloc-tietue havaittu lohkossa %s" -#: elfxx-mips.c:6447 +#: elfxx-mips.c:7499 msgid "%B: GOT reloc at 0x%lx not expected in executables" -msgstr "%B: Yleissiirrostaulu-reloc-tietue siirroksessa 0x%lx ei odotettu suoritettavissa tiedostoissa" +msgstr "%B: Yleissiirrostaulu-reloc-tietue siirroksessa 0x%lx ei ole odotettu suoritettavissa tiedostoissa" -#: elfxx-mips.c:6517 +#: elfxx-mips.c:7602 msgid "%B: CALL16 reloc at 0x%lx not against global symbol" -msgstr "%B: ”CALL16 reloc”-tietue siirroksessa 0x%lx ei yleissymbolia varten" +msgstr "%B: ”CALL16 reloc”-tietue siirroksessa 0x%lx ei ole yleissymbolia varten" + +#: elfxx-mips.c:8280 +#, c-format +msgid "non-dynamic relocations refer to dynamic symbol %s" +msgstr "ei-dynaaminen sijoitus viittaa dynaamiseen symboliin %s" -#: elfxx-mips.c:7880 +#: elfxx-mips.c:8985 msgid "%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'" msgstr "%B: Ei löydy täsmäävää ”LO16 reloc”-tietuetta tulolohkoa ”%s” varten symbolinimelle %s kohteessa 0x%lx lohkossa ”%A”" -#: elfxx-mips.c:8046 +#: elfxx-mips.c:9124 msgid "small-data section exceeds 64KB; lower small-data size limit (see option -G)" msgstr "”small”-datalohko ylittää 64 kilotavua; alenna ”small”-datalohkon kokorajaa (katso valitsin -G)" -#: elfxx-mips.c:10661 +#: elfxx-mips.c:11940 #, c-format msgid "%s: illegal section name `%s'" msgstr "%s: virheellinen lohkonimi ”%s”" -#: elfxx-mips.c:11031 elfxx-mips.c:11050 +#: elfxx-mips.c:12318 elfxx-mips.c:12344 msgid "Warning: %B uses -msingle-float, %B uses -mdouble-float" msgstr "Varoitus: %B käyttää ”-msingle-float”-valitsinta, %B käyttää ”-mdouble-float”-valitsinta" -#: elfxx-mips.c:11106 +#: elfxx-mips.c:12330 elfxx-mips.c:12386 +msgid "Warning: %B uses -msingle-float, %B uses -mips32r2 -mfp64" +msgstr "Varoitus: %B käyttää ”-msingle-float”-valitsinta, %B käyttää ”-mips32r2 -mfp64”-valitsimia" + +#: elfxx-mips.c:12356 elfxx-mips.c:12392 +msgid "Warning: %B uses -mdouble-float, %B uses -mips32r2 -mfp64" +msgstr "Varoitus: %B käyttää ”-mdouble-float”-valitsinta, %B käyttää ”-mips32r2 -mfp64”-valitsimia" + +#: elfxx-mips.c:12434 msgid "%B: endianness incompatible with that of the selected emulation" msgstr "%B: tavujärjestys tyypiltään sopimaton valitun emuloinnin tavujärjestystyypin kanssa" -#: elfxx-mips.c:11118 +#: elfxx-mips.c:12445 msgid "%B: ABI is incompatible with that of the selected emulation" msgstr "%B: ABI ei ole yhteensopiva valitun emuloinnin ABIn kanssa" -#: elfxx-mips.c:11218 +#: elfxx-mips.c:12526 +msgid "%B: warning: linking abicalls files with non-abicalls files" +msgstr "%B: varoitus: linkitetään abi-kutsutiedostoja ei-abi-kutsutiedostoihin" + +#: elfxx-mips.c:12543 msgid "%B: linking 32-bit code with 64-bit code" msgstr "%B: linkitetään 32-bittinen koodi 64-bittisen koodin kanssa" -#: elfxx-mips.c:11246 +#: elfxx-mips.c:12571 msgid "%B: linking %s module with previous %s modules" msgstr "%B: linkitetään %s-moduli edellisten %s-modulien kanssa" -#: elfxx-mips.c:11269 +#: elfxx-mips.c:12594 msgid "%B: ABI mismatch: linking %s module with previous %s modules" msgstr "%B: ABI-täsmäämättömyys: linkitetään %s-moduli edellisten %s-modulien kanssa" -#: elfxx-mips.c:11334 +#: elfxx-mips.c:12758 #, c-format msgid " [abi=O32]" msgstr " [abi=O32]" -#: elfxx-mips.c:11336 +#: elfxx-mips.c:12760 #, c-format msgid " [abi=O64]" msgstr " [abi=O64]" -#: elfxx-mips.c:11338 +#: elfxx-mips.c:12762 #, c-format msgid " [abi=EABI32]" msgstr " [abi=EABI32]" -#: elfxx-mips.c:11340 +#: elfxx-mips.c:12764 #, c-format msgid " [abi=EABI64]" msgstr " [abi=EABI64]" -#: elfxx-mips.c:11342 +#: elfxx-mips.c:12766 #, c-format msgid " [abi unknown]" msgstr " [abi tuntematon]" -#: elfxx-mips.c:11344 +#: elfxx-mips.c:12768 #, c-format msgid " [abi=N32]" msgstr " [abi=N32]" -#: elfxx-mips.c:11346 +#: elfxx-mips.c:12770 #, c-format msgid " [abi=64]" msgstr " [abi=64]" -#: elfxx-mips.c:11348 +#: elfxx-mips.c:12772 #, c-format msgid " [no abi set]" msgstr " [ei abia asetettu]" -#: elfxx-mips.c:11369 +#: elfxx-mips.c:12793 #, c-format msgid " [unknown ISA]" msgstr " [tuntematon ISA]" -#: elfxx-mips.c:11380 +#: elfxx-mips.c:12804 #, c-format msgid " [not 32bitmode]" msgstr " [ei 32-bittitila]" -#: elfxx-sparc.c:430 +#: elfxx-sparc.c:440 #, c-format msgid "invalid relocation type %d" msgstr "virheellinen sijoitustyyppi %d" -#: elfxx-sparc.c:2901 -msgid "%B: probably compiled without -fPIC?" -msgstr "%B: luultavasti käännetty ilman -fPIC-argumenttia?" - #: i386linux.c:455 m68klinux.c:459 sparclinux.c:453 #, c-format msgid "Output file requires shared library `%s'\n" @@ -2748,34 +3060,94 @@ msgstr "%B: virheellinen lohkopituus ”ihex_read_section”-lohkossa" msgid "%s: address 0x%s out of range for Intel Hex file" msgstr "%s: osoite 0x%s lukualueen ulkopuolella Intel-heksatiedostolle" -#: libbfd.c:980 +#: libbfd.c:1008 #, c-format msgid "Deprecated %s called at %s line %d in %s\n" msgstr "Käytöstä poistettu %s kutsuttiin tiedostossa %s rivillä %d funktiossa %s\n" -#: libbfd.c:983 +#: libbfd.c:1011 #, c-format msgid "Deprecated %s called\n" msgstr "Käytöstä poistettu %s kutsuttu\n" -#: linker.c:1875 +#: linker.c:1874 msgid "%B: indirect symbol `%s' to `%s' is a loop" msgstr "%B: epäsuora symboli ”%s” kohteeseen ”%s” on silmukka" -#: linker.c:2741 +#: linker.c:2740 #, c-format msgid "Attempt to do relocatable link with %s input and %s output" msgstr "Yritettiin tehdä sijoitettava linkki %s-syötteellä ja %s-tulosteella" -#: linker.c:3048 +#: linker.c:3065 msgid "%B: warning: ignoring duplicate section `%A'\n" msgstr "%B: varoitus: ei oteta huomioon lohkon ”%A” kaksoiskappaletta\n" -#: linker.c:3062 +#: linker.c:3079 msgid "%B: warning: duplicate section `%A' has different size\n" msgstr "%B: varoitus: lohkon ”%A” kaksoiskappaleessa on eri koko\n" -#: merge.c:820 +#: mach-o.c:3195 +#, c-format +msgid "Mach-O header:\n" +msgstr "Mach-O otsake:\n" + +#: mach-o.c:3196 +#, c-format +msgid " magic : %08lx\n" +msgstr " maaginen : %08lx\n" + +#: mach-o.c:3197 +#, c-format +msgid " cputype : %08lx (%s)\n" +msgstr " prosessorityyppi : %08lx (%s)\n" + +#: mach-o.c:3199 +#, c-format +msgid " cpusubtype: %08lx\n" +msgstr " prosessorialityyppi : %08lx\n" + +#: mach-o.c:3200 +#, c-format +msgid " filetype : %08lx (%s)\n" +msgstr " tiedostotyyppi : %08lx (%s)\n" + +#: mach-o.c:3203 +#, c-format +msgid " ncmds : %08lx\n" +msgstr " ncmds : %08lx\n" + +#: mach-o.c:3204 +#, c-format +msgid " sizeofcmds: %08lx\n" +msgstr " komentojenkoko : %08lx\n" + +#: mach-o.c:3205 +#, c-format +msgid " flags : %08lx (" +msgstr " liput : %08lx (" + +#: mach-o.c:3207 +#, c-format +msgid ")\n" +msgstr ")\n" + +#: mach-o.c:3208 +#, c-format +msgid " reserved : %08x\n" +msgstr " varattu : %08x\n" + +#: mach-o.c:3218 +#, c-format +msgid "Segments and Sections:\n" +msgstr "Segmentit ja lohkot:\n" + +#: mach-o.c:3219 +#, c-format +msgid " #: Segment name Section name Address\n" +msgstr " #: Segmenttinimi Lohkonnimi Osoite\n" + +#: merge.c:829 #, c-format msgid "%s: access beyond end of merged section (%ld)" msgstr "%s: pääsy lomitetun lohkon (%ld) lopun yli" @@ -2783,12 +3155,12 @@ msgstr "%s: pääsy lomitetun lohkon (%ld) lopun yli" #: mmo.c:456 #, c-format msgid "%s: No core to allocate section name %s\n" -msgstr "%s: Ei ydintä lohkonimen %s varaamiseen\n" +msgstr "%s: Ei käyttöjärjestelmäydintä lohkonimen %s varaamiseen\n" #: mmo.c:531 #, c-format msgid "%s: No core to allocate a symbol %d bytes long\n" -msgstr "%s: Ei ydintä symbolin varaamiseksi %d tavua pitkänä\n" +msgstr "%s: Ei käyttöjärjestelmäydintä symbolin varaamiseksi %d tavua pitkänä\n" #: mmo.c:1187 #, c-format @@ -2913,57 +3285,77 @@ msgstr "%s: ei voi edustaa lohkoa ”%s” oasys-lohkossa" #: osf-core.c:139 #, c-format msgid "Unhandled OSF/1 core file section type %d\n" -msgstr "Käsittelemätön OSF/1 ydintiedostolohkotyyppi %d\n" +msgstr "Käsittelemätön OSF/1-käyttöjärjestelmäydintiedoston lohkotyyppi %d\n" + +#: pe-mips.c:613 +msgid "%B: `ld -r' not supported with PE MIPS objects\n" +msgstr "%B: ”ld -r” ei tuettu ”PE MIPS”-objekteilla\n" + +#. OK, at this point the following variables are set up: +#. src = VMA of the memory we're fixing up +#. mem = pointer to memory we're fixing up +#. val = VMA of what we need to refer to. +#: pe-mips.c:729 +msgid "%B: unimplemented %s\n" +msgstr "%B: toteuttamaton %s\n" + +#: pe-mips.c:755 +msgid "%B: jump too far away\n" +msgstr "%B: hyppy liian kauas\n" + +#: pe-mips.c:781 +msgid "%B: bad pair/reflo after refhi\n" +msgstr "%B: virheellinen pari/reflo refhi:n jälkeen\n" + +#: pei-x86_64.c:465 +#, c-format +msgid "warning: .pdata section size (%ld) is not a multiple of %d\n" +msgstr "varoitus: ”.pdata”-lohkokoko (%ld) ei ole %d:n monikerta\n" + +#: pei-x86_64.c:469 peigen.c:1620 peigen.c:1799 pepigen.c:1620 pepigen.c:1799 +#: pex64igen.c:1620 pex64igen.c:1799 +#, c-format +msgid "" +"\n" +"The Function Table (interpreted .pdata section contents)\n" +msgstr "" +"\n" +"Funktiotaulu (tulkittu ”.pdata”-lohkosisältö)\n" + +#: pei-x86_64.c:471 +#, c-format +msgid "vma:\t\t\tBeginAddress\t EndAddress\t UnwindData\n" +msgstr "vma:\t\t\tAlkuosoite\t Loppuosoite\t Unwind-tiedot\n" #. XXX code yet to be written. -#: peicode.h:759 +#: peicode.h:752 msgid "%B: Unhandled import type; %x" msgstr "%B: Käsittelemätön tuontityyppi; %x" -#: peicode.h:764 +#: peicode.h:757 msgid "%B: Unrecognised import type; %x" msgstr "%B: Tunnistamaton tuontityyppi; %x" -#: peicode.h:778 +#: peicode.h:771 msgid "%B: Unrecognised import name type; %x" msgstr "%B: Tunnistamaton tuontinimityyppi; %x" -#: peicode.h:1161 +#: peicode.h:1154 msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive" msgstr "%B: Tunnistamaton konetyyppi (0x%x) ”Import Library Format”-arkistossa" -#: peicode.h:1173 +#: peicode.h:1166 msgid "%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive" msgstr "%B: Tunnistettu, mutta käsittelemätön konetyyppi (0x%x) ”Import Library Format”-arkistossa" -#: peicode.h:1191 +#: peicode.h:1184 msgid "%B: size field is zero in Import Library Format header" msgstr "%B: kokokenttä on nolla ”Import Library Format”-otsakkeessa" -#: peicode.h:1222 +#: peicode.h:1215 msgid "%B: string not null terminated in ILF object file." msgstr "%B: merkkijonoa ei ole päätetty nollaan ILF-objektitiedostossa." -#: pe-mips.c:606 -msgid "%B: `ld -r' not supported with PE MIPS objects\n" -msgstr "%B: ”ld -r” ei tuettu ”PE MIPS”-objekteilla\n" - -#. OK, at this point the following variables are set up: -#. src = VMA of the memory we're fixing up -#. mem = pointer to memory we're fixing up -#. val = VMA of what we need to refer to. -#: pe-mips.c:722 -msgid "%B: unimplemented %s\n" -msgstr "%B: toteuttamaton %s\n" - -#: pe-mips.c:748 -msgid "%B: jump too far away\n" -msgstr "%B: hyppy liian kauas\n" - -#: pe-mips.c:774 -msgid "%B: bad pair/reflo after refhi\n" -msgstr "%B: virheellinen pari/reflo refhi:n jälkeen\n" - #: ppcboot.c:414 #, c-format msgid "" @@ -2976,48 +3368,48 @@ msgstr "" #: ppcboot.c:415 #, c-format msgid "Entry offset = 0x%.8lx (%ld)\n" -msgstr "Tulokohtasiirros = 0x%.8lx (%ld)\n" +msgstr "Tulokohtasiirrososoite = 0x%.8lx (%ld)\n" -#: ppcboot.c:416 +#: ppcboot.c:417 #, c-format msgid "Length = 0x%.8lx (%ld)\n" -msgstr "Pituus = 0x%.8lx (%ld)\n" +msgstr "Pituus = 0x%.8lx (%ld)\n" -#: ppcboot.c:419 +#: ppcboot.c:421 #, c-format msgid "Flag field = 0x%.2x\n" -msgstr "Lippukenttä = 0x%.2x\n" +msgstr "Lippukenttä = 0x%.2x\n" -#: ppcboot.c:425 +#: ppcboot.c:427 #, c-format msgid "Partition name = \"%s\"\n" -msgstr "Osionimi = ”%s”\n" +msgstr "Osionimi = ”%s”\n" -#: ppcboot.c:444 +#: ppcboot.c:446 #, c-format msgid "" "\n" "Partition[%d] start = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" msgstr "" "\n" -"Osio[%d] alku = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" +"Osio[%d] alku = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" -#: ppcboot.c:450 +#: ppcboot.c:452 #, c-format msgid "Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" -msgstr "Osio[%d] loppu = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" +msgstr "Osio[%d] loppu = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" -#: ppcboot.c:456 +#: ppcboot.c:458 #, c-format msgid "Partition[%d] sector = 0x%.8lx (%ld)\n" -msgstr "Osio[%d] sektori = 0x%.8lx (%ld)\n" +msgstr "Osio[%d] sektori = 0x%.8lx (%ld)\n" -#: ppcboot.c:457 +#: ppcboot.c:460 #, c-format msgid "Partition[%d] length = 0x%.8lx (%ld)\n" -msgstr "Osio[%d] pituus = 0x%.8lx (%ld)\n" +msgstr "Osio[%d] pituus = 0x%.8lx (%ld)\n" -#: som.c:5088 +#: som.c:5114 #, c-format msgid "" "\n" @@ -3026,7 +3418,7 @@ msgstr "" "\n" "Suoritettavan tiedoston apuotsake\n" -#: som.c:5349 +#: som.c:5417 msgid "som_sizeof_headers unimplemented" msgstr "som_sizeof_headers ei ole toteutettu" @@ -3034,126 +3426,181 @@ msgstr "som_sizeof_headers ei ole toteutettu" msgid "%B:%d: Unexpected character `%s' in S-record file\n" msgstr "%B:%d: Odottamaton merkki ”%s” S-tietuetiedostossa\n" +#: srec.c:567 srec.c:600 +msgid "%B:%d: Bad checksum in S-record file\n" +msgstr "%B:%d: Virheellinen tarkistussumma S-tietuetiedostossa\n" + #: stabs.c:279 msgid "%B(%A+0x%lx): Stabs entry has invalid string index." msgstr "%B(%A+0x%lx): Stabs-tulokohdassa on virheellinen merkkijonoindeksi." -#: syms.c:1057 +#: syms.c:1079 msgid "Unsupported .stab relocation" msgstr "”Ei-tuettu .stab”-sijoitus" -#: vms-gsd.c:338 +#: vms-gsd.c:350 #, c-format msgid "bfd_make_section (%s) failed" msgstr "bfd_make_section (%s) ei onnistunut" -#: vms-gsd.c:353 +#: vms-gsd.c:365 #, c-format msgid "bfd_set_section_flags (%s, %x) failed" msgstr "bfd_set_section_flags (%s, %x) ei onnistunut" -#: vms-gsd.c:388 +#: vms-gsd.c:399 #, c-format msgid "Size mismatch section %s=%lx, %s=%lx" msgstr "Kokotäsmäämätön lohko %s=%lx, %s=%lx" -#: vms-gsd.c:679 +#: vms-gsd.c:754 #, c-format -msgid "unknown gsd/egsd subtype %d" -msgstr "tuntematon ”gsd/egsd”-alityyppi %d" +msgid "Unknown GSD/EGSD subtype %d" +msgstr "tuntematon GSD/EGSD-alityyppi %d" -#: vms-hdr.c:328 +#: vms-hdr.c:364 msgid "Object module NOT error-free !\n" msgstr "Objektimoduli EI ole virheetön !\n" -#: vms-misc.c:474 +#: vms-hdr.c:878 +#, c-format +msgid "unknown source command %d" +msgstr "tuntematon lähdekomento %d" + +#: vms-hdr.c:951 +msgid "DST_S_C_SET_LINUM_INCR not implemented" +msgstr "DST_S_C_SET_LINUM_INCR ei ole toteutettu" + +#: vms-hdr.c:957 +msgid "DST_S_C_SET_LINUM_INCR_W not implemented" +msgstr "DST_S_C_SET_LINUM_INCR_W ei ole toteutettu" + +#: vms-hdr.c:963 +msgid "DST_S_C_RESET_LINUM_INCR not implemented" +msgstr "DST_S_C_RESET_LINUM_INCR ei ole toteutettu" + +#: vms-hdr.c:969 +msgid "DST_S_C_BEG_STMT_MODE not implemented" +msgstr "DST_S_C_BEG_STMT_MODE ei ole toteutettu" + +#: vms-hdr.c:975 +msgid "DST_S_C_END_STMT_MODE not implemented" +msgstr "DST_S_C_END_STMT_MODE ei ole toteutettu" + +#: vms-hdr.c:1008 +msgid "DST_S_C_SET_PC not implemented" +msgstr "DST_S_C_SET_PC ei ole toteutettu" + +#: vms-hdr.c:1014 +msgid "DST_S_C_SET_PC_W not implemented" +msgstr "DST_S_C_SET_PC_W ei ole toteutettu" + +#: vms-hdr.c:1020 +msgid "DST_S_C_SET_PC_L not implemented" +msgstr "DST_S_C_SET_PC_L ei ole toteutettu" + +#: vms-hdr.c:1026 +msgid "DST_S_C_SET_STMTNUM not implemented" +msgstr "DST_S_C_SET_STMTNUM ei ole toteutettu" + +#: vms-hdr.c:1079 +#, c-format +msgid "unknown line command %d" +msgstr "tuntematon rivikomento %d" + +#: vms-misc.c:588 #, c-format msgid "Stack overflow (%d) in _bfd_vms_push" msgstr "Pinon ylivuoto (%d) kohteessa _bfd_vms_push" -#: vms-misc.c:489 +#: vms-misc.c:603 msgid "Stack underflow in _bfd_vms_pop" msgstr "Pinon ylivuoto kohteessa _bfd_vms_pop" -#: vms-misc.c:803 +#: vms-misc.c:844 msgid "_bfd_vms_output_counted called with zero bytes" msgstr "_bfd_vms_output_counted kutsuttu nollatavuilla" -#: vms-misc.c:808 +#: vms-misc.c:849 msgid "_bfd_vms_output_counted called with too many bytes" msgstr "_bfd_vms_output_counted kutsuttu liian monilla tavuilla" -#: vms-misc.c:926 +#: vms-misc.c:967 #, c-format msgid "Symbol %s replaced by %s\n" msgstr "Symboli %s korvattu kohteella %s\n" -#: vms-misc.c:985 +#: vms-misc.c:1026 #, c-format msgid "failed to enter %s" msgstr "ei onnistuttu kirjoittamaan %s" -#: vms-tir.c:57 +#: vms-tir.c:83 msgid "No Mem !" msgstr "Ei muistia !" -#: vms-tir.c:300 +#. These names have not yet been added to this switch statement. +#: vms-tir.c:346 +#, c-format +msgid "unknown ETIR command %d" +msgstr "tuntematon ETIR-komento %d" + +#: vms-tir.c:440 #, c-format msgid "bad section index in %s" msgstr "virheellinen lohkoindeksi kohteessa %s" -#: vms-tir.c:313 +#: vms-tir.c:459 #, c-format msgid "unsupported STA cmd %s" msgstr "ei-tuettu STA-komento %s" -#: vms-tir.c:318 vms-tir.c:1120 +#: vms-tir.c:464 vms-tir.c:1304 #, c-format msgid "reserved STA cmd %d" msgstr "varattu STA-komento %d" -#: vms-tir.c:410 vms-tir.c:432 -#, c-format -msgid "%s: no symbol \"%s\"" -msgstr "%s: ei symbolia ”%s”" - #. Unsigned shift. #. Rotate. #. Redefine symbol to current location. #. Define a literal. -#: vms-tir.c:497 vms-tir.c:606 vms-tir.c:704 vms-tir.c:721 vms-tir.c:728 -#: vms-tir.c:736 vms-tir.c:1440 +#: vms-tir.c:655 vms-tir.c:774 vms-tir.c:894 vms-tir.c:1624 #, c-format msgid "%s: not supported" msgstr "%s: ei tuettu" -#: vms-tir.c:502 vms-tir.c:1297 +#: vms-tir.c:661 vms-tir.c:1481 #, c-format msgid "%s: not implemented" msgstr "%s: ei toteutettu" -#: vms-tir.c:506 vms-tir.c:1301 +#: vms-tir.c:666 vms-tir.c:1485 #, c-format msgid "reserved STO cmd %d" msgstr "varattu STO-komento %d" -#: vms-tir.c:621 vms-tir.c:1445 +#: vms-tir.c:789 vms-tir.c:1629 #, c-format msgid "reserved OPR cmd %d" msgstr "varattu OPR-komento %d" -#: vms-tir.c:681 vms-tir.c:1509 +#: vms-tir.c:852 vms-tir.c:1693 #, c-format msgid "reserved CTL cmd %d" msgstr "varattu CTL-komento %d" +#: vms-tir.c:966 +#, c-format +msgid "reserved STC cmd %d" +msgstr "varattu STC-komento %d" + #. stack byte from image #. arg: none. -#: vms-tir.c:1028 +#: vms-tir.c:1212 msgid "stack-from-image not implemented" msgstr "stack-from-image ei ole toteutettu" -#: vms-tir.c:1046 +#: vms-tir.c:1230 msgid "stack-entry-mask not fully implemented" msgstr "stack-entry-mask ei ole täysin toteutettu" @@ -3164,266 +3611,295 @@ msgstr "stack-entry-mask ei ole täysin toteutettu" #. #. compare argument descriptor with symbol argument (ARG$V_PASSMECH) #. and stack TRUE (args match) or FALSE (args dont match) value. -#: vms-tir.c:1060 +#: vms-tir.c:1244 msgid "PASSMECH not fully implemented" msgstr "PASSMECH ei ole täysin toteutettu" -#: vms-tir.c:1079 +#: vms-tir.c:1263 msgid "stack-local-symbol not fully implemented" msgstr "stack-local-symbol ei ole täysin toteutettu" -#: vms-tir.c:1092 +#: vms-tir.c:1276 msgid "stack-literal not fully implemented" msgstr "stack-literal ei ole täysin toteutettu" -#: vms-tir.c:1113 +#: vms-tir.c:1297 msgid "stack-local-symbol-entry-point-mask not fully implemented" msgstr "stack-local-symbol-entry-point-mask ei ole täysin toteutettu" -#: vms-tir.c:1387 vms-tir.c:1399 vms-tir.c:1411 vms-tir.c:1423 vms-tir.c:1488 -#: vms-tir.c:1496 vms-tir.c:1504 +#: vms-tir.c:1571 vms-tir.c:1583 vms-tir.c:1595 vms-tir.c:1607 vms-tir.c:1672 +#: vms-tir.c:1680 vms-tir.c:1688 #, c-format msgid "%s: not fully implemented" msgstr "%s: ei ole täysin toteutettu" -#: vms-tir.c:1562 +#: vms-tir.c:1746 #, c-format msgid "obj code %d not found" msgstr "obj-koodia %d ei löytynyt" -#: vms-tir.c:1870 +#: vms-tir.c:2019 +#, c-format +msgid "Reloc size error in section %s" +msgstr "Reloc-kokovirhe lohkossa %s" + +#: vms-tir.c:2112 vms-tir.c:2129 vms-tir.c:2147 vms-tir.c:2159 vms-tir.c:2170 +#: vms-tir.c:2182 +#, c-format +msgid "Unknown reloc %s + %s" +msgstr "Tuntematon reloc-tietue %s + %s" + +#: vms-tir.c:2249 +#, c-format +msgid "Unknown symbol %s in command %s" +msgstr "Tuntematon symboli %s komennossa %s" + +#: vms-tir.c:2504 #, c-format msgid "SEC_RELOC with no relocs in section %s" msgstr "SEC_RELOC ilman relocs-tietueita lohkossa %s" -#: vms-tir.c:2152 +#: vms-tir.c:2556 vms-tir.c:2783 +#, c-format +msgid "Size error in section %s" +msgstr "Kokovirhe lohkossa %s" + +#: vms-tir.c:2725 +msgid "Spurious ALPHA_R_BSR reloc" +msgstr "Väärä ALPHA_R_BSR reloc-tietue" + +#: vms-tir.c:2770 #, c-format msgid "Unhandled relocation %s" msgstr "Käsittelemätön sijoitus %s" -#: xcofflink.c:566 +#: xcofflink.c:836 #, c-format msgid "%s: XCOFF shared object when not producing XCOFF output" msgstr "%s: XCOFF jaettu objekti kun ei tuoteta XCOFF-tulostetta" -#: xcofflink.c:587 +#: xcofflink.c:857 #, c-format msgid "%s: dynamic object with no .loader section" msgstr "%s: dynaaminen objekti ilman ”.loader”-lohkoa" -#: xcofflink.c:1150 +#: xcofflink.c:1415 msgid "%B: `%s' has line numbers but no enclosing section" msgstr "%B: ”%s” on rivinumerot, mutta ei sulkevaa lohkoa" -#: xcofflink.c:1202 +#: xcofflink.c:1467 msgid "%B: class %d symbol `%s' has no aux entries" msgstr "%B: luokassa %d symbolissa ”%s” ei ole aputulokohtia" -#: xcofflink.c:1225 +#: xcofflink.c:1489 msgid "%B: symbol `%s' has unrecognized csect type %d" msgstr "%B: symbolissa ”%s” on tunnistamaton ohjauslohkotyyppi %d" -#: xcofflink.c:1237 +#: xcofflink.c:1501 msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d" msgstr "%B: virheellinen XTY_ER-symboli ”%s”: luokka %d ohjauslohkonumero %d ohjauslohkopituus %d" -#: xcofflink.c:1273 +#: xcofflink.c:1530 msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d" msgstr "%B: XMC_TC0-symboli ”%s” on luokka %d ohjauslohkopituus %d" -#: xcofflink.c:1419 +#: xcofflink.c:1676 msgid "%B: csect `%s' not in enclosing section" msgstr "%B: ohjauslohkoa ”%s” ei ole sulkeutuvassa lohkossa" -#: xcofflink.c:1526 +#: xcofflink.c:1783 msgid "%B: misplaced XTY_LD `%s'" msgstr "%B: väärin sijoitettu XTY_LD ”%s”" -#: xcofflink.c:1842 +#: xcofflink.c:2102 msgid "%B: reloc %s:%d not in csect" msgstr "%B: reloc-tietue %s:%d ei ole ohjauslohkossa" -#: xcofflink.c:2640 +#: xcofflink.c:3177 #, c-format msgid "%s: no such symbol" msgstr "%s: tuntematon symboli" -#: xcofflink.c:2869 +#: xcofflink.c:3282 #, c-format msgid "warning: attempt to export undefined symbol `%s'" msgstr "varoitus: yritettiin viedä määrittelemätön symboli ”%s”" -#: xcofflink.c:3036 +#: xcofflink.c:3664 msgid "error: undefined symbol __rtinit" msgstr "virhe: määrittelemätön symboli ”__rtinit”" -#: xcofflink.c:3656 -#, c-format -msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" -msgstr "Sisältöluettelon ylivuoto: 0x%lx > 0x10000; yritä ”-mminimal-toc” käännettäessä" - -#: xcofflink.c:4492 -msgid "%B: loader reloc in unrecognized section `%A'" -msgstr "%B: ”loader reloc”-tietue tunnistamattomassa lohkossa ”%A”" +#: xcofflink.c:4041 +msgid "%B: loader reloc in unrecognized section `%s'" +msgstr "%B: ”loader reloc”-tietue tunnistamattomassa lohkossa ”%s" -#: xcofflink.c:4513 +#: xcofflink.c:4052 msgid "%B: `%s' in loader reloc but not loader sym" msgstr "%B: ”%s” ”loader reloc”-tietueessa, mutta ei ”loader.sym”-binaarissa" -#: xcofflink.c:4528 +#: xcofflink.c:4068 msgid "%B: loader reloc in read-only section %A" msgstr "%B: ”loader reloc”-tietue kirjoitussuojatussa lohkossa %A" -#: xcofflink.c:4937 xcofflink.c:4999 xcofflink.c:5294 -#, c-format -msgid "%s: loader reloc in unrecognized section `%s'" -msgstr "%s: ”loader reloc”-tietue tunnistamattomassa lohkossa ”%s”" - -#: xcofflink.c:5305 +#: xcofflink.c:5086 #, c-format -msgid "%s: `%s' in loader reloc but not loader sym" -msgstr "%s: ”%s” ”loader reloc”-tietueessa, mutta ei ”loader.sym”-binaarissa" +msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" +msgstr "Sisältöluettelon ylivuoto: 0x%lx > 0x10000; yritä ”-mminimal-toc” käännettäessä" -#: elf32-ia64.c:1169 elf64-ia64.c:1169 +# Kun käskykohdemuuttuja on sen lukualueen ulkopuolella, joka sallitaan kullekin käskykentälle, +# assembler voi muuntaa koodin käyttämään toiminnallisesti samanlaista käskyä tai käskysekvenssiä. +# Tämä prosessi tunnetaan nimellä relaxation. Tätä tehdään tyypillisesti haarautumiskäskyissä, koska +# haarautumiskohteen etäisyyttä ei tunneta ennen linkitystä. Tavallaan tällä tavalla kumotaan lukualueen +# rajoitteet (constraints). Siksi olen suomentanut sen termillä avartaminen. +#: elf32-ia64.c:1050 elf64-ia64.c:1050 msgid "%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch." msgstr "%B: Ei voi avartaa br-käskyä kohteessa 0x%lx lohkossa ”%A”. Käytä ”brl”-käskyä tai epäsuoraa haarautumista." -#: elf32-ia64.c:2910 elf64-ia64.c:2910 +#: elf32-ia64.c:2739 elf64-ia64.c:2739 msgid "@pltoff reloc against local symbol" msgstr "”@pltoff reloc”-tietue paikallista symbolia varten" -#: elf32-ia64.c:4523 elf64-ia64.c:4523 +#: elf32-ia64.c:4314 elf64-ia64.c:4314 #, c-format msgid "%s: short data segment overflowed (0x%lx >= 0x400000)" msgstr "%s: ”short”-datasegmentti ylivuotanut (0x%lx >= 0x400000)" -#: elf32-ia64.c:4534 elf64-ia64.c:4534 +#: elf32-ia64.c:4325 elf64-ia64.c:4325 #, c-format msgid "%s: __gp does not cover short data segment" msgstr "%s: ”__gp” ei kata ”short”-datasegmenttiä" -#: elf32-ia64.c:4808 elf64-ia64.c:4808 +#: elf32-ia64.c:4595 elf64-ia64.c:4595 msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'" msgstr "%B: paikkariippuvainen koodi välittömällä sijoituksella dynaamista symbolia ”%s” varten" -#: elf32-ia64.c:4875 elf64-ia64.c:4875 +#: elf32-ia64.c:4662 elf64-ia64.c:4662 msgid "%B: @gprel relocation against dynamic symbol %s" msgstr "%B: ”@gprel”-sijoitus dynaamista symbolia %s varten" -#: elf32-ia64.c:4938 elf64-ia64.c:4938 +#: elf32-ia64.c:4725 elf64-ia64.c:4725 msgid "%B: linking non-pic code in a position independent executable" msgstr "%B: linkitetään paikkariippuvainen koodi paikkariippumattomassa suoritettavassa tiedostossa" -#: elf32-ia64.c:5075 elf64-ia64.c:5075 +#: elf32-ia64.c:4862 elf64-ia64.c:4862 msgid "%B: @internal branch to dynamic symbol %s" msgstr "%B: @sisäinen haarautuminen dynaamiseen symboliin %s" -#: elf32-ia64.c:5077 elf64-ia64.c:5077 +#: elf32-ia64.c:4864 elf64-ia64.c:4864 msgid "%B: speculation fixup to dynamic symbol %s" msgstr "%B: spekulaatiokorjaus dynaamiseen symboliin %s" -#: elf32-ia64.c:5079 elf64-ia64.c:5079 +#: elf32-ia64.c:4866 elf64-ia64.c:4866 msgid "%B: @pcrel relocation against dynamic symbol %s" msgstr "%B: ”@pcrel”-sijoitus dynaamista symbolia %s varten" -#: elf32-ia64.c:5279 elf64-ia64.c:5279 +#: elf32-ia64.c:5063 elf64-ia64.c:5063 msgid "unsupported reloc" msgstr "ei-tuettu reloc-tietue" -#: elf32-ia64.c:5312 elf64-ia64.c:5312 +#: elf32-ia64.c:5101 elf64-ia64.c:5101 +msgid "%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'." +msgstr "%B: siirroksen %s puuttuva TLS-lohko kohdetta ”%s” varten osoitteessa 0x%lx lohkossa ”%A”." + +# Kun käskykohdemuuttuja on sen lukualueen ulkopuolella, joka sallitaan kullekin käskykentälle, +# assembler voi muuntaa koodin käyttämään toiminnallisesti samanlaista käskyä tai käskysekvenssiä. +# Tämä prosessi tunnetaan nimellä relaxation. Tätä tehdään tyypillisesti haarautumiskäskyissä, koska +# haarautumiskohteen etäisyyttä ei tunneta ennen linkitystä. Tavallaan tällä tavalla kumotaan lukualueen +# rajoitteet (constraints). Siksi olen suomentanut sen termillä avartaminen. +#: elf32-ia64.c:5116 elf64-ia64.c:5116 msgid "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)." msgstr "%B: Ei voi avartaa br-käskyä (%s) kohteelle ”%s” kohteessa 0x%lx lohkossa ”%A” koolla 0x%lx (> 0x1000000)." -#: elf32-ia64.c:5573 elf64-ia64.c:5573 +#: elf32-ia64.c:5372 elf64-ia64.c:5372 msgid "%B: linking trap-on-NULL-dereference with non-trapping files" msgstr "%B: linkitetään keskeytysnollassa uudelleenviite ”ei-keskeytetä”-tiedostojen kanssa" -#: elf32-ia64.c:5582 elf64-ia64.c:5582 +#: elf32-ia64.c:5381 elf64-ia64.c:5381 msgid "%B: linking big-endian files with little-endian files" msgstr "%B: linkitetään ”big-endian”-tiedostoja ”little-endian”-tiedostojen kanssa" -#: elf32-ia64.c:5591 elf64-ia64.c:5591 +#: elf32-ia64.c:5390 elf64-ia64.c:5390 msgid "%B: linking 64-bit files with 32-bit files" msgstr "%B: linkitetään 64-bittiset tiedostot 32-bittisten tiedostojen kanssa" -#: elf32-ia64.c:5600 elf64-ia64.c:5600 +#: elf32-ia64.c:5399 elf64-ia64.c:5399 msgid "%B: linking constant-gp files with non-constant-gp files" -msgstr "%B: linkitetään vakiot gp-tiedostot ei-vakioiden gp-tiedostojen kanssa" +msgstr "%B: linkitetään vakioyleisosoitintiedostot ei-vakioiden yleisosoitintiedostojen kanssa" -#: elf32-ia64.c:5610 elf64-ia64.c:5610 +#: elf32-ia64.c:5409 elf64-ia64.c:5409 msgid "%B: linking auto-pic files with non-auto-pic files" msgstr "%B: linkitetään automaattiset paikkariippumattomat kooditiedostot ei-automaattisten paikkariippumattomien kooditiedostojen kanssa" -#: peigen.c:1000 pepigen.c:1000 pex64igen.c:1000 +#: peigen.c:999 pepigen.c:999 pex64igen.c:999 #, c-format msgid "%s: line number overflow: 0x%lx > 0xffff" msgstr "%s: rivinumeroylivuoto: 0x%lx > 0xffff" -#: peigen.c:1027 pepigen.c:1027 pex64igen.c:1027 +#: peigen.c:1026 pepigen.c:1026 pex64igen.c:1026 msgid "Export Directory [.edata (or where ever we found it)]" msgstr "Vientihakemisto [.edata (tai missä sen sitten löysimmekin)]" -#: peigen.c:1028 pepigen.c:1028 pex64igen.c:1028 +#: peigen.c:1027 pepigen.c:1027 pex64igen.c:1027 msgid "Import Directory [parts of .idata]" msgstr "Tuontihakemisto [”.idata”-osat]" -#: peigen.c:1029 pepigen.c:1029 pex64igen.c:1029 +#: peigen.c:1028 pepigen.c:1028 pex64igen.c:1028 msgid "Resource Directory [.rsrc]" msgstr "Resurssihakemisto [.rsrc]" -#: peigen.c:1030 pepigen.c:1030 pex64igen.c:1030 +#: peigen.c:1029 pepigen.c:1029 pex64igen.c:1029 msgid "Exception Directory [.pdata]" msgstr "Poikkeushakemisto [.pdata]" -#: peigen.c:1031 pepigen.c:1031 pex64igen.c:1031 +#: peigen.c:1030 pepigen.c:1030 pex64igen.c:1030 msgid "Security Directory" msgstr "Turvallisuushakemisto" -#: peigen.c:1032 pepigen.c:1032 pex64igen.c:1032 +#: peigen.c:1031 pepigen.c:1031 pex64igen.c:1031 msgid "Base Relocation Directory [.reloc]" msgstr "Perussijoitushakemisto [.reloc]" -#: peigen.c:1033 pepigen.c:1033 pex64igen.c:1033 +#: peigen.c:1032 pepigen.c:1032 pex64igen.c:1032 msgid "Debug Directory" msgstr "Virheenetsintähakemisto" -#: peigen.c:1034 pepigen.c:1034 pex64igen.c:1034 +#: peigen.c:1033 pepigen.c:1033 pex64igen.c:1033 msgid "Description Directory" msgstr "Kuvaushakemisto" -#: peigen.c:1035 pepigen.c:1035 pex64igen.c:1035 +#: peigen.c:1034 pepigen.c:1034 pex64igen.c:1034 msgid "Special Directory" msgstr "Erityishakemisto" -#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036 +#: peigen.c:1035 pepigen.c:1035 pex64igen.c:1035 msgid "Thread Storage Directory [.tls]" msgstr "Säievarastohakemisto [.tls]" -#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037 +#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036 msgid "Load Configuration Directory" msgstr "Lataa konfigurationhakemisto" -#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038 +#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037 msgid "Bound Import Directory" msgstr "Sidottu tuontihakemisto" -#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039 +#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038 msgid "Import Address Table Directory" msgstr "Tuontiosoitetauluhakemisto" -#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040 +#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039 msgid "Delay Import Directory" msgstr "Viivetuontihakemisto" -#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041 +#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040 msgid "CLR Runtime Header" msgstr "CLR ajoaikaotsake" -#: peigen.c:1042 pepigen.c:1042 pex64igen.c:1042 +#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041 msgid "Reserved" msgstr "Varattu" -#: peigen.c:1102 pepigen.c:1102 pex64igen.c:1102 +#: peigen.c:1101 pepigen.c:1101 pex64igen.c:1101 #, c-format msgid "" "\n" @@ -3432,7 +3908,7 @@ msgstr "" "\n" "Tuontitaulu löytyi, mutta ei lohkoa, joka sisältää sen\n" -#: peigen.c:1107 pepigen.c:1107 pex64igen.c:1107 +#: peigen.c:1106 pepigen.c:1106 pex64igen.c:1106 #, c-format msgid "" "\n" @@ -3441,7 +3917,7 @@ msgstr "" "\n" "Tuontitaulu lohkossa %s osoitteessa 0x%lx\n" -#: peigen.c:1150 pepigen.c:1150 pex64igen.c:1150 +#: peigen.c:1149 pepigen.c:1149 pex64igen.c:1149 #, c-format msgid "" "\n" @@ -3450,12 +3926,12 @@ msgstr "" "\n" "Funktiokuvaaja sijaitsi alkuosoitteessa: %04lx\n" -#: peigen.c:1153 pepigen.c:1153 pex64igen.c:1153 +#: peigen.c:1152 pepigen.c:1152 pex64igen.c:1152 #, c-format msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n" msgstr "\tkoodipohja %08lx sisältöluettelo (ladattava/todellinen) %08lx/%08lx\n" -#: peigen.c:1161 pepigen.c:1161 pex64igen.c:1161 +#: peigen.c:1160 pepigen.c:1160 pex64igen.c:1160 #, c-format msgid "" "\n" @@ -3464,7 +3940,7 @@ msgstr "" "\n" "Ei reldata-lohkoa! Funktiokuvaaja ei ole koodattu.\n" -#: peigen.c:1166 pepigen.c:1166 pex64igen.c:1166 +#: peigen.c:1165 pepigen.c:1165 pex64igen.c:1165 #, c-format msgid "" "\n" @@ -3474,7 +3950,7 @@ msgstr "" "Tuontitaulut (tulkittu %s lohkosisältö)\n" # Taulukko-otsake, jossa sanat on kahdella rivillä (ilman tavuviivaa), esimerkiksi: Vihjetaulu -#: peigen.c:1169 pepigen.c:1169 pex64igen.c:1169 +#: peigen.c:1168 pepigen.c:1168 pex64igen.c:1168 #, c-format msgid "" " vma: Hint Time Forward DLL First\n" @@ -3483,7 +3959,7 @@ msgstr "" " vma: Vihje- Aika- Jatkoläh. DLL- Ensimmäinen\n" " taulu leima ketju nimi Thunk-funktio\n" -#: peigen.c:1217 pepigen.c:1217 pex64igen.c:1217 +#: peigen.c:1216 pepigen.c:1216 pex64igen.c:1216 #, c-format msgid "" "\n" @@ -3492,12 +3968,12 @@ msgstr "" "\n" "\tDLL-nimi: %s\n" -#: peigen.c:1228 pepigen.c:1228 pex64igen.c:1228 +#: peigen.c:1227 pepigen.c:1227 pex64igen.c:1227 #, c-format msgid "\tvma: Hint/Ord Member-Name Bound-To\n" msgstr "\tvma: Vihje/Jär Jäsen-Nimi Sidottu\n" -#: peigen.c:1253 pepigen.c:1253 pex64igen.c:1253 +#: peigen.c:1252 pepigen.c:1252 pex64igen.c:1252 #, c-format msgid "" "\n" @@ -3506,7 +3982,7 @@ msgstr "" "\n" "Ensimmäinen thunk-funktio löytyi, mutta ei sen sisältävää lohkoa\n" -#: peigen.c:1418 pepigen.c:1418 pex64igen.c:1418 +#: peigen.c:1417 pepigen.c:1417 pex64igen.c:1417 #, c-format msgid "" "\n" @@ -3515,7 +3991,7 @@ msgstr "" "\n" "Vientitaulu löytyi, mutta ei sen sisältävää lohkoa\n" -#: peigen.c:1427 pepigen.c:1427 pex64igen.c:1427 +#: peigen.c:1426 pepigen.c:1426 pex64igen.c:1426 #, c-format msgid "" "\n" @@ -3524,7 +4000,7 @@ msgstr "" "\n" "Vientitaulu kohteessa %s, mutta ei sovi tuohon lohkoon\n" -#: peigen.c:1433 pepigen.c:1433 pex64igen.c:1433 +#: peigen.c:1432 pepigen.c:1432 pex64igen.c:1432 #, c-format msgid "" "\n" @@ -3533,7 +4009,7 @@ msgstr "" "\n" "Vientitaulu lohkossa %s osoitteessa 0x%lx\n" -#: peigen.c:1461 pepigen.c:1461 pex64igen.c:1461 +#: peigen.c:1460 pepigen.c:1460 pex64igen.c:1460 #, c-format msgid "" "\n" @@ -3544,67 +4020,67 @@ msgstr "" "Vientitaulut (tulkittu %s lohkosisältö)\n" "\n" -#: peigen.c:1465 pepigen.c:1465 pex64igen.c:1465 +#: peigen.c:1464 pepigen.c:1464 pex64igen.c:1464 #, c-format msgid "Export Flags \t\t\t%lx\n" msgstr "Vientiliput \t\t\t%lx\n" -#: peigen.c:1468 pepigen.c:1468 pex64igen.c:1468 +#: peigen.c:1467 pepigen.c:1467 pex64igen.c:1467 #, c-format msgid "Time/Date stamp \t\t%lx\n" msgstr "Aika/Päivämääräleima \t\t%lx\n" -#: peigen.c:1471 pepigen.c:1471 pex64igen.c:1471 +#: peigen.c:1470 pepigen.c:1470 pex64igen.c:1470 #, c-format msgid "Major/Minor \t\t\t%d/%d\n" msgstr "Suurempi/Pienempi \t\t\t%d/%d\n" -#: peigen.c:1474 pepigen.c:1474 pex64igen.c:1474 +#: peigen.c:1473 pepigen.c:1473 pex64igen.c:1473 #, c-format msgid "Name \t\t\t\t" msgstr "Nimi \t\t\t\t" -#: peigen.c:1480 pepigen.c:1480 pex64igen.c:1480 +#: peigen.c:1479 pepigen.c:1479 pex64igen.c:1479 #, c-format msgid "Ordinal Base \t\t\t%ld\n" msgstr "Järjestyslukukanta \t\t\t%ld\n" -#: peigen.c:1483 pepigen.c:1483 pex64igen.c:1483 +#: peigen.c:1482 pepigen.c:1482 pex64igen.c:1482 #, c-format msgid "Number in:\n" msgstr "Numero kohteessa:\n" -#: peigen.c:1486 pepigen.c:1486 pex64igen.c:1486 +#: peigen.c:1485 pepigen.c:1485 pex64igen.c:1485 #, c-format msgid "\tExport Address Table \t\t%08lx\n" msgstr "\tVientiosoitetaulu \t\t%08lx\n" -#: peigen.c:1490 pepigen.c:1490 pex64igen.c:1490 +#: peigen.c:1489 pepigen.c:1489 pex64igen.c:1489 #, c-format msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n" -msgstr "\t[Nimi Osoitin/Järjestysnumero] taulu\t%08lx\n" +msgstr "\t[Nimiosoitin/Järjestysnumero] taulu\t%08lx\n" -#: peigen.c:1493 pepigen.c:1493 pex64igen.c:1493 +#: peigen.c:1492 pepigen.c:1492 pex64igen.c:1492 #, c-format msgid "Table Addresses\n" msgstr "Tauluosoitteet\n" -#: peigen.c:1496 pepigen.c:1496 pex64igen.c:1496 +#: peigen.c:1495 pepigen.c:1495 pex64igen.c:1495 #, c-format msgid "\tExport Address Table \t\t" msgstr "\tVientiosoitetaulu \t\t" -#: peigen.c:1501 pepigen.c:1501 pex64igen.c:1501 +#: peigen.c:1500 pepigen.c:1500 pex64igen.c:1500 #, c-format msgid "\tName Pointer Table \t\t" -msgstr "\tNimi Osoitin Taulu \t\t" +msgstr "\tNimiosoitintaulu \t\t" -#: peigen.c:1506 pepigen.c:1506 pex64igen.c:1506 +#: peigen.c:1505 pepigen.c:1505 pex64igen.c:1505 #, c-format msgid "\tOrdinal Table \t\t\t" msgstr "\tJärjestysnumerotaulu \t\t\t" -#: peigen.c:1520 pepigen.c:1520 pex64igen.c:1520 +#: peigen.c:1519 pepigen.c:1519 pex64igen.c:1519 #, c-format msgid "" "\n" @@ -3613,44 +4089,36 @@ msgstr "" "\n" "Vientiosoitetaulu -- Järjestyslukukanta %ld\n" -#: peigen.c:1539 pepigen.c:1539 pex64igen.c:1539 +#: peigen.c:1538 pepigen.c:1538 pex64igen.c:1538 msgid "Forwarder RVA" msgstr "Jatkolähetyksen suhteellinen muuttujaosoite" -#: peigen.c:1550 pepigen.c:1550 pex64igen.c:1550 +#: peigen.c:1549 pepigen.c:1549 pex64igen.c:1549 msgid "Export RVA" msgstr "Viennin suhteellinen muuttujaosoite" -#: peigen.c:1557 pepigen.c:1557 pex64igen.c:1557 +#: peigen.c:1556 pepigen.c:1556 pex64igen.c:1556 #, c-format msgid "" "\n" "[Ordinal/Name Pointer] Table\n" msgstr "" "\n" -"[Järjestysnumero/Nimi Osoitin] Taulu\n" +"[Järjestysnumero/Nimiosoitin] Taulu\n" -#: peigen.c:1610 pepigen.c:1610 pex64igen.c:1610 +#: peigen.c:1616 peigen.c:1795 pepigen.c:1616 pepigen.c:1795 pex64igen.c:1616 +#: pex64igen.c:1795 #, c-format msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n" msgstr "Varoitus,” .pdata”-lohkokoko (%ld) ei ole %d:n monikerta\n" -#: peigen.c:1614 pepigen.c:1614 pex64igen.c:1614 -#, c-format -msgid "" -"\n" -"The Function Table (interpreted .pdata section contents)\n" -msgstr "" -"\n" -"Funktiotaulu (tulkittu ”.pdata”-lohkosisältö)\n" - -#: peigen.c:1617 pepigen.c:1617 pex64igen.c:1617 +#: peigen.c:1623 pepigen.c:1623 pex64igen.c:1623 #, c-format msgid " vma:\t\t\tBegin Address End Address Unwind Info\n" msgstr " vma:\t\t\tAlkuosoite Loppuosoite Unwind-tiedot\n" # Taulukko-otsake, jossa sanat jakautuvat taas alekkain kahdelle riville ilman tavuviivoja -#: peigen.c:1619 pepigen.c:1619 pex64igen.c:1619 +#: peigen.c:1625 pepigen.c:1625 pex64igen.c:1625 #, c-format msgid "" " vma:\t\tBegin End EH EH PrologEnd Exception\n" @@ -3659,22 +4127,31 @@ msgstr "" " vma:\t\tAlku- Loppu- EH-käsit- EH- PrologEnd Poikkeus-\n" " \t\tosoite osoite telijä data osoite peite\n" -#: peigen.c:1689 pepigen.c:1689 pex64igen.c:1689 +#: peigen.c:1695 pepigen.c:1695 pex64igen.c:1695 #, c-format msgid " Register save millicode" msgstr " Rekisteri tallentaa millicode-bitin" -#: peigen.c:1692 pepigen.c:1692 pex64igen.c:1692 +#: peigen.c:1698 pepigen.c:1698 pex64igen.c:1698 #, c-format msgid " Register restore millicode" msgstr " Rekisteri palauttaa millicode-bitin" -#: peigen.c:1695 pepigen.c:1695 pex64igen.c:1695 +#: peigen.c:1701 pepigen.c:1701 pex64igen.c:1701 #, c-format msgid " Glue code sequence" msgstr " Vihje-koodisekvenssi" -#: peigen.c:1745 pepigen.c:1745 pex64igen.c:1745 +#: peigen.c:1801 pepigen.c:1801 pex64igen.c:1801 +#, c-format +msgid "" +" vma:\t\tBegin Prolog Function Flags Exception EH\n" +" \t\tAddress Length Length 32b exc Handler Data\n" +msgstr "" +" vma:\t\tAlku- Prologi- Funktio- Liput Poikkeus- EH-\n" +" \t\tosoite pituus pituus 32b exc käsittelijä Data\n" + +#: peigen.c:1933 pepigen.c:1933 pex64igen.c:1933 #, c-format msgid "" "\n" @@ -3686,7 +4163,7 @@ msgstr "" "PE-tiedostokantasijoitukset (tulkittu ”.reloc”-lohkosisältö)\n" # Esimerkiksi välimuistissa RAM-alue koostuu usein pienistä palasista, joita kutsutaan nimellä chunk. Suomensin sen tässä sanalla alilohko -#: peigen.c:1775 pepigen.c:1775 pex64igen.c:1775 +#: peigen.c:1963 pepigen.c:1963 pex64igen.c:1963 #, c-format msgid "" "\n" @@ -3695,15 +4172,15 @@ msgstr "" "\n" "Virtuaaliosoite: %08lx alilohkokoko %ld (0x%lx) Korjausten lukumäärä %ld\n" -#: peigen.c:1788 pepigen.c:1788 pex64igen.c:1788 +#: peigen.c:1976 pepigen.c:1976 pex64igen.c:1976 #, c-format msgid "\treloc %4d offset %4x [%4lx] %s" -msgstr "\treloc-tietue %4d siirros %4x [%4lx] %s" +msgstr "\treloc-tietue %4d siirrososoite %4x [%4lx] %s" #. The MS dumpbin program reportedly ands with 0xff0f before #. printing the characteristics field. Not sure why. No reason to #. emulate it here. -#: peigen.c:1827 pepigen.c:1827 pex64igen.c:1827 +#: peigen.c:2015 pepigen.c:2015 pex64igen.c:2015 #, c-format msgid "" "\n" @@ -3712,22 +4189,70 @@ msgstr "" "\n" "Luonteenominaisuus 0x%x\n" -#: peigen.c:2088 pepigen.c:2088 pex64igen.c:2088 +#: peigen.c:2292 pepigen.c:2292 pex64igen.c:2292 msgid "%B: unable to fill in DataDictionary[1] because .idata$2 is missing" msgstr "%B: DataDictionary[1]:ia ei voi täyttää, koska ”.idata$2” puuttuu" -#: peigen.c:2106 pepigen.c:2106 pex64igen.c:2106 +#: peigen.c:2312 pepigen.c:2312 pex64igen.c:2312 msgid "%B: unable to fill in DataDictionary[1] because .idata$4 is missing" msgstr "%B: DataDictionary[1]:ia ei voi täyttää, koska ”.idata$4” puuttuu" -#: peigen.c:2125 pepigen.c:2125 pex64igen.c:2125 +#: peigen.c:2333 pepigen.c:2333 pex64igen.c:2333 msgid "%B: unable to fill in DataDictionary[12] because .idata$5 is missing" msgstr "%B: DataDictionary[12]:ia ei voi täyttää, koska ”.idata$5” puuttuu" -#: peigen.c:2143 pepigen.c:2143 pex64igen.c:2143 +#: peigen.c:2353 pepigen.c:2353 pex64igen.c:2353 msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing" msgstr "%B: DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)]:ia ei voi täyttää, koska ”.idata$6” puuttuu" -#: peigen.c:2163 pepigen.c:2163 pex64igen.c:2163 +#: peigen.c:2375 pepigen.c:2375 pex64igen.c:2375 msgid "%B: unable to fill in DataDictionary[9] because __tls_used is missing" msgstr "%B: DataDictionary[9]:ia ei voi täyttää, koska ”__tls_used” puuttuu" + +#~ msgid "ERROR: %B: Incompatible object tag '%s':%d" +#~ msgstr "VIRHE: %B: Yhteensopimaton objektitunnus ”%s”:%d" + +#~ msgid "%B(%A): warning: unresolvable relocation against symbol `%s'" +#~ msgstr "%B(%A): varoitus: ratkaisematon sijoitus symbolia ”%s” varten" + +#~ msgid "%B: Internal inconsistency; no relocation section %s" +#~ msgstr "%B: Sisäinen epäjohdonmukaisuus; ei sijoituslohkoa %s" + +#~ msgid "Could not find relocation section for %s" +#~ msgstr "Ei löytynyt sijoituslohkoa kohteelle %s" + +#~ msgid "%B: GOT overflow: Number of R_68K_GOT8O and R_68K_GOT16O relocations > %d" +#~ msgstr "%B: Yleissiirrostaulun ylivuoto: R_68K_GOT8O- ja R_68K_GOT16O-sijoitusten lukumäärä > %d" + +#~ msgid "%A link_order not found\n" +#~ msgstr "%A link_order ei löytynyt\n" + +#~ msgid "%s: no symbol \"%s\"" +#~ msgstr "%s: ei symbolia ”%s”" + +#~ msgid "%s: loader reloc in unrecognized section `%s'" +#~ msgstr "%s: ”loader reloc”-tietue tunnistamattomassa lohkossa ”%s”" + +#~ msgid "%s: `%s' in loader reloc but not loader sym" +#~ msgstr "%s: ”%s” ”loader reloc”-tietueessa, mutta ei ”loader.sym”-binaarissa" + +#~ msgid "Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str size (%lu)." +#~ msgstr "Dwarf-virhe: DW_FORM_strp siirrososoite (%lu) suurempi tai sama kuin ”.debug_str”-koko (%lu)." + +#~ msgid "Dwarf Error: Can't find .debug_abbrev section." +#~ msgstr "Dwarf-virhe: Ei löydy ”.debug_abbrev”-lohkoa." + +#~ msgid "Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size (%lu)." +#~ msgstr "Dwarf-virhe: Lyhennesiirrososoite (%lu) suurempi tai sama kuin ”.debug_abbrev”-koko (%lu)." + +#~ msgid "Dwarf Error: Can't find .debug_line section." +#~ msgstr "Dwarf-virhe: Ei löydy ”.debug_line”-lohkoa." + +#~ msgid "Dwarf Error: Can't find .debug_ranges section." +#~ msgstr "Dwarf-virhe: Ei löydy ”.debug_ranges”-lohkoa." + +#~ msgid "ERROR: %B: Conflicting definitions of wchar_t" +#~ msgstr "VIRHE: %B: Ristiriitaisia wchar_t-määrittelyjä" + +#~ msgid "%B: relocation R_X86_64_PC32 against protected function `%s' can not be used when making a shared object" +#~ msgstr "%B: sijoitusta R_X86_64_PC32 suojattua funktiota ”%s” varten ei voida käyttää kun tehdään jaettua objektia" diff --git a/cegcc/src/binutils/bfd/po/id.po b/cegcc/src/binutils/bfd/po/id.po index 31a70171c..865996242 100644 --- a/cegcc/src/binutils/bfd/po/id.po +++ b/cegcc/src/binutils/bfd/po/id.po @@ -1,14 +1,14 @@ # Pesan Bahasa Indonesia untuk BFD # Copyright (C) 2008 Free Software Foundation, Inc. # This file is distributed under the same license as the binutils package. -# Arif E. Nugroho , 2008. +# Arif E. Nugroho , 2008, 2009. # msgid "" msgstr "" -"Project-Id-Version: bfd 2.18.90\n" +"Project-Id-Version: bfd 2.19.1\n" "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n" "POT-Creation-Date: 2008-09-09 15:56+0930\n" -"PO-Revision-Date: 2008-10-08 07:45+0700\n" +"PO-Revision-Date: 2009-05-26 08:00+0700\n" "Last-Translator: Arif E. Nugroho \n" "Language-Team: Indonesian \n" "MIME-Version: 1.0\n" @@ -2591,7 +2591,7 @@ msgstr "Menghapus daerah tidak digunakan '%s' dalam berkas '%B'" #: elflink.c:11525 msgid "Warning: gc-sections option ignored" -msgstr "Peringatan: gc-sections opsi diabaikan" +msgstr "Peringatan: gc-sections pilihan diabaikan" #: elflink.c:12056 msgid "%B: ignoring duplicate section `%A'" @@ -2623,7 +2623,7 @@ msgstr "%B: %A+0x%lx: lompat ke routine stub dimana bukan jal" #: elfxx-mips.c:6206 elfxx-mips.c:6427 msgid "%B: Warning: bad `%s' option size %u smaller than its header" -msgstr "%B: Peringatan: opsi `%s' buruk ukuran %u lebih kecil dari headernya" +msgstr "%B: Peringatan: pilihan `%s' buruk ukuran %u lebih kecil dari headernya" #: elfxx-mips.c:7174 elfxx-mips.c:7299 msgid "%B: Warning: cannot determine the target function for stub section `%s'" @@ -2652,7 +2652,7 @@ msgstr "%B: Tidak dapat menemukan cocok LO16 relokasi terhadap `%s' untuk %s di #: elfxx-mips.c:9086 msgid "small-data section exceeds 64KB; lower small-data size limit (see option -G)" -msgstr "daerah data-kecil melebihi 64KB; dibawah data-kecil batas ukuran (lihat opsi -G)" +msgstr "daerah data-kecil melebihi 64KB; dibawah data-kecil batas ukuran (lihat pilihan -G)" #: elfxx-mips.c:11887 #, c-format diff --git a/cegcc/src/binutils/bfd/po/vi.po b/cegcc/src/binutils/bfd/po/vi.po index e0f3e121a..8664ce749 100644 --- a/cegcc/src/binutils/bfd/po/vi.po +++ b/cegcc/src/binutils/bfd/po/vi.po @@ -1,22 +1,22 @@ # Vietnamese translation for BFD. -# Copyright © 2008 Free Software Foundation, Inc. +# Copyright © 2009 Free Software Foundation, Inc. # This file is distributed under the same license as the binutils package. # Phần Vĩnh Thịnh , 2005. -# Clytie Siddall , 2008. +# Clytie Siddall , 2008-2009. # msgid "" msgstr "" -"Project-Id-Version: bfd 2.18.90\n" +"Project-Id-Version: bfd 2.19.90\n" "Report-Msgid-Bugs-To: bug-binutils@gnu.org\n" -"POT-Creation-Date: 2008-09-09 15:56+0930\n" -"PO-Revision-Date: 2008-09-23 22:51+0930\n" +"POT-Creation-Date: 2009-09-07 14:05+0200\n" +"PO-Revision-Date: 2009-09-18 16:56+0930\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: LocFactoryEditor 1.7b3\n" +"X-Generator: LocFactoryEditor 1.8\n" #: aout-adobe.c:127 msgid "%B: Unknown section type in a.out.adobe file: %x\n" @@ -35,151 +35,151 @@ msgstr "%B: Đã nhập kiểu định vị lại không hợp lệ: %d" msgid "%B: Bad relocation record imported: %d" msgstr "%B: Đã nhập mục ghi định vị lại sai: %d" -#: aoutx.h:1268 aoutx.h:1604 +#: aoutx.h:1271 aoutx.h:1609 #, c-format msgid "%s: can not represent section `%s' in a.out object file format" msgstr "%s: không thể đại diện phân « %s » trong định dạng tập tin đối tượng a.out" -#: aoutx.h:1570 +#: aoutx.h:1575 #, c-format msgid "%s: can not represent section for symbol `%s' in a.out object file format" msgstr "%s: không thể đại diện phân cho ký hiệu « %s » trong định dạng tập tin đối tượng a.ou" -#: aoutx.h:1572 +#: aoutx.h:1577 msgid "*unknown*" msgstr "• không rõ •" -#: aoutx.h:3989 aoutx.h:4315 +#: aoutx.h:3994 aoutx.h:4320 msgid "%P: %B: unexpected relocation type\n" msgstr "%P: %B: kiểu định vị lại bất thường\n" -#: aoutx.h:5349 +#: aoutx.h:5354 #, c-format msgid "%s: relocatable link from %s to %s not supported" msgstr "%s: không hỗ trợ liên kết có khả năng định vị lại từ %s sang %s" -#: archive.c:2046 +#: archive.c:2056 msgid "Warning: writing archive was slow: rewriting timestamp\n" msgstr "Cảnh báo : ghi kho quá chậm nên đang ghi lại nhãn thời gian\n" -#: archive.c:2309 +#: archive.c:2342 msgid "Reading archive file mod timestamp" msgstr "Đang đọc nhãn thời gian sửa đổi tập tin kho" -#: archive.c:2333 +#: archive.c:2366 msgid "Writing updated armap timestamp" msgstr "Đang ghi nhãn thời gian armap đã cập nhật" -#: bfd.c:368 +#: bfd.c:375 msgid "No error" msgstr "Không có lỗi" -#: bfd.c:369 +#: bfd.c:376 msgid "System call error" msgstr "Lỗi gọi hệ thống" -#: bfd.c:370 +#: bfd.c:377 msgid "Invalid bfd target" msgstr "Đích bfd không hợp lệ" -#: bfd.c:371 +#: bfd.c:378 msgid "File in wrong format" msgstr "Tập tin có định dạng không đúng" -#: bfd.c:372 +#: bfd.c:379 msgid "Archive object file in wrong format" msgstr "Tập tin đối tượng kho có định dạng không đúng" -#: bfd.c:373 +#: bfd.c:380 msgid "Invalid operation" msgstr "Thao tác không hợp lệ" -#: bfd.c:374 +#: bfd.c:381 msgid "Memory exhausted" msgstr "Cạn bộ nhớ" -#: bfd.c:375 +#: bfd.c:382 msgid "No symbols" msgstr "Không có ký hiệu" -#: bfd.c:376 +#: bfd.c:383 msgid "Archive has no index; run ranlib to add one" msgstr "Kho không có chỉ mục: hãy chạy ranlib để thêm" -#: bfd.c:377 +#: bfd.c:384 msgid "No more archived files" msgstr "Không còn có tập tin đã lưu trữ nào nữa" -#: bfd.c:378 +#: bfd.c:385 msgid "Malformed archive" msgstr "Kho dạng sai" -#: bfd.c:379 +#: bfd.c:386 msgid "File format not recognized" msgstr "Không nhận ra định dạng tập tin" -#: bfd.c:380 +#: bfd.c:387 msgid "File format is ambiguous" msgstr "Định dạng tập tin mơ hồ" -#: bfd.c:381 +#: bfd.c:388 msgid "Section has no contents" msgstr "Phần không có nội dung" -#: bfd.c:382 +#: bfd.c:389 msgid "Nonrepresentable section on output" msgstr "Kết xuất có phần không thể đại diện được" -#: bfd.c:383 +#: bfd.c:390 msgid "Symbol needs debug section which does not exist" msgstr "Ký hiệu cần phần gỡ lỗi mà không tồn tại" -#: bfd.c:384 +#: bfd.c:391 msgid "Bad value" msgstr "Giá trị sai" -#: bfd.c:385 +#: bfd.c:392 msgid "File truncated" msgstr "Tập tin bị cắt ngắn" -#: bfd.c:386 +#: bfd.c:393 msgid "File too big" msgstr "Tập tin quá lớn" -#: bfd.c:387 +#: bfd.c:394 #, c-format msgid "Error reading %s: %s" msgstr "Gặp lỗi khi đọc %s: %s" -#: bfd.c:388 +#: bfd.c:395 msgid "#" msgstr "#" -#: bfd.c:912 +#: bfd.c:919 #, c-format msgid "BFD %s assertion fail %s:%d" msgstr "BFD %s khắng định bị lỗi %s:%d" -#: bfd.c:924 +#: bfd.c:931 #, c-format msgid "BFD %s internal error, aborting at %s line %d in %s\n" msgstr "BFD %s lỗi nội bộ nên hủy bỏ tại %s dòng %d trong %s\n" -#: bfd.c:928 +#: bfd.c:935 #, c-format msgid "BFD %s internal error, aborting at %s line %d\n" msgstr "BFD %s lỗi nội bộ nên hủy bỏ tại %s dòng %d\n" -#: bfd.c:930 +#: bfd.c:937 msgid "Please report this bug.\n" msgstr "Hãy thông báo lỗi này.\n" -#: bfdwin.c:208 +#: bfdwin.c:206 #, c-format msgid "not mapping: data=%lx mapped=%d\n" msgstr "không đang ánh xạ: dữ liệu=%lx đã ánh xạ=%d\n" -#: bfdwin.c:211 +#: bfdwin.c:209 #, c-format msgid "not mapping: env var not set\n" msgstr "không đang ánh xạ: chưa đặt biến môi trường\n" @@ -189,7 +189,13 @@ msgstr "không đang ánh xạ: chưa đặt biến môi trường\n" msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx." msgstr "Cảnh báo : đang ghi phần « %s » vào khoảng bù tập tin rất lớn (tức là âm) 0x%lx." -#: cache.c:222 +#: bout.c:1150 elf-m10300.c:2078 elf32-avr.c:1639 elf32-frv.c:5743 +#: elf32-xtensa.c:6639 elfxx-sparc.c:2456 reloc.c:5386 reloc16.c:162 +#: vms.c:1918 elf32-ia64.c:788 elf64-ia64.c:788 +msgid "%P%F: --relax and -r may not be used together\n" +msgstr "%P%F: không thể dùng với nhau hai tuỳ chọn « --relax » và « -r »\n" + +#: cache.c:226 msgid "reopening %B: %s\n" msgstr "đang mở lại %B: %s\n" @@ -221,8 +227,8 @@ msgstr "%B: định vị lại không được hỗ trợ : ALPHA_R_GPRELHIGH" msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW" msgstr "%B: định vị lại không được hỗ trợ : ALPHA_R_GPRELLOW" -#: coff-alpha.c:1574 elf32-m32r.c:2487 elf64-alpha.c:3970 elf64-alpha.c:4125 -#: elf32-ia64.c:4465 elf64-ia64.c:4465 +#: coff-alpha.c:1574 elf32-m32r.c:2477 elf64-alpha.c:3943 elf64-alpha.c:4098 +#: elf32-ia64.c:4462 elf64-ia64.c:4462 msgid "%B: unknown relocation type %d" msgstr "%B: không rõ kiểu định vị lại %d" @@ -236,7 +242,7 @@ msgstr "%B: không tìm thấy keo hồ THUMB « %s » cho « %s »" msgid "%B: unable to find ARM glue '%s' for `%s'" msgstr "%B: không tìm thấy keo hồ ARM « %s » cho « %s »" -#: coff-arm.c:1370 elf32-arm.c:5453 +#: coff-arm.c:1370 elf32-arm.c:6372 #, c-format msgid "" "%B(%s): warning: interworking not enabled.\n" @@ -256,7 +262,7 @@ msgstr "" " lần xuất hiện đầu tiên: %B: gọi thumb tới arm\n" " coi như liên kết lại với « --support-old-code » được bật" -#: coff-arm.c:1755 coff-tic80.c:695 cofflink.c:3018 +#: coff-arm.c:1755 coff-tic80.c:695 cofflink.c:3027 msgid "%B: bad reloc address 0x%lx in section `%A'" msgstr "%B: địa chỉ định vị lại sai 0x%lx trong phần « %A »" @@ -266,35 +272,35 @@ msgstr "%B: chỉ mục ký hiệu cấm trong định vị lại: %d" #: coff-arm.c:2211 #, c-format -msgid "ERROR: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d" -msgstr "LỖI: %B được biên dịch cho APCS-%d, còn %B được biên dịch cho APCS-%d" +msgid "error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d" +msgstr "lỗi: %B được biên dịch cho APCS-%d, còn %B được biên dịch cho APCS-%d" -#: coff-arm.c:2227 elf32-arm.c:8563 +#: coff-arm.c:2227 elf32-arm.c:10327 #, c-format -msgid "ERROR: %B passes floats in float registers, whereas %B passes them in integer registers" -msgstr "LỖI: %B gửi trôi qua trong thanh ghi trôi, còn %B gửi chúng qua trong thanh ghi số nguyên" +msgid "error: %B passes floats in float registers, whereas %B passes them in integer registers" +msgstr "lỗi: %B gửi trôi qua trong thanh ghi trôi, còn %B gửi chúng qua trong thanh ghi số nguyên" -#: coff-arm.c:2230 elf32-arm.c:8567 +#: coff-arm.c:2230 elf32-arm.c:10331 #, c-format -msgid "ERROR: %B passes floats in integer registers, whereas %B passes them in float registers" -msgstr "LỖI: %B gửi trôi qua trong thanh ghi số nguyên, còn %B gửi chúng qua trong thanh ghi trôi" +msgid "error: %B passes floats in integer registers, whereas %B passes them in float registers" +msgstr "lỗi: %B gửi trôi qua trong thanh ghi số nguyên, còn %B gửi chúng qua trong thanh ghi trôi" #: coff-arm.c:2244 #, c-format -msgid "ERROR: %B is compiled as position independent code, whereas target %B is absolute position" -msgstr "LỖI: %B được biên dịch như mã không phụ thuộc vào vị trí, còn %B là vị trí tuyệt đối" +msgid "error: %B is compiled as position independent code, whereas target %B is absolute position" +msgstr "lỗi: %B được biên dịch như mã không phụ thuộc vào vị trí, còn %B là vị trí tuyệt đối" #: coff-arm.c:2247 #, c-format -msgid "ERROR: %B is compiled as absolute position code, whereas target %B is position independent" -msgstr "LỖI: %B được biên dịch như mã vị trí tuyệt đối, còn %B không phụ thuộc vào vị trí" +msgid "error: %B is compiled as absolute position code, whereas target %B is position independent" +msgstr "lỗi: %B được biên dịch như mã vị trí tuyệt đối, còn %B không phụ thuộc vào vị trí" -#: coff-arm.c:2275 elf32-arm.c:8632 +#: coff-arm.c:2275 elf32-arm.c:10396 #, c-format msgid "Warning: %B supports interworking, whereas %B does not" msgstr "Cảnh báo : %B hỗ trợ ảnh hưởng lẫn nhau, còn %B thì không" -#: coff-arm.c:2278 elf32-arm.c:8638 +#: coff-arm.c:2278 elf32-arm.c:10402 #, c-format msgid "Warning: %B does not support interworking, whereas %B does" msgstr "Cảnh báo : %B không hỗ trợ ảnh hưởng lẫn nhau, còn %B thì có" @@ -304,7 +310,7 @@ msgstr "Cảnh báo : %B không hỗ trợ ảnh hưởng lẫn nhau, còn %B th msgid "private flags = %x:" msgstr "các cờ riêng = %x:" -#: coff-arm.c:2310 elf32-arm.c:8689 +#: coff-arm.c:2310 elf32-arm.c:10453 #, c-format msgid " [floats passed in float registers]" msgstr " [các trôi được gửi qua trong thanh ghi trôi]" @@ -314,7 +320,7 @@ msgstr " [các trôi được gửi qua trong thanh ghi trôi]" msgid " [floats passed in integer registers]" msgstr " [các trôi được gửi qua trong thanh ghi số nguyên]" -#: coff-arm.c:2315 elf32-arm.c:8692 +#: coff-arm.c:2315 elf32-arm.c:10456 #, c-format msgid " [position independent]" msgstr " [không phụ thuộc vào vị trí]" @@ -339,12 +345,12 @@ msgstr " [hỗ trợ ảnh hưởng lẫn nhau]" msgid " [interworking not supported]" msgstr " [không hỗ trợ ảnh hưởng lẫn nhau]" -#: coff-arm.c:2371 elf32-arm.c:8050 +#: coff-arm.c:2371 elf32-arm.c:9360 #, c-format msgid "Warning: Not setting interworking flag of %B since it has already been specified as non-interworking" msgstr "Cảnh báo : không đang đặt cờ ảnh hưởng lẫn nhau của %B vì nó đã được xác định là không ảnh hưởng lẫn nhau" -#: coff-arm.c:2375 elf32-arm.c:8054 +#: coff-arm.c:2375 elf32-arm.c:9364 #, c-format msgid "Warning: Clearing the interworking flag of %B due to outside request" msgstr "Cảnh báo : Đang xoá cờ ảnh hưởng lẫn nhau của %B theo yêu cầu bên ngoài" @@ -359,7 +365,7 @@ msgstr "không thể xử lý định vị lại R_MEM_INDIRECT khi sử dụng msgid "Relocation `%s' not yet implemented\n" msgstr "Chưa thực hiện định vị lại « %s »\n" -#: coff-i860.c:605 coff-tic54x.c:398 coffcode.h:4975 +#: coff-i860.c:605 coff-tic54x.c:398 coffcode.h:5143 msgid "%B: warning: illegal symbol index %ld in relocs" msgstr "%B: cảnh báo : chỉ mục ký hiệu cấm %ld trong định vị lại" @@ -367,7 +373,7 @@ msgstr "%B: cảnh báo : chỉ mục ký hiệu cấm %ld trong định vị l msgid "uncertain calling convention for non-COFF symbol" msgstr "quy ước gọi không chắc chắn cho ký hiệu khác COFF" -#: coff-m68k.c:506 elf32-bfin.c:5510 elf32-m68k.c:3938 +#: coff-m68k.c:506 elf32-bfin.c:5693 elf32-cr16.c:2965 elf32-m68k.c:4615 msgid "unsupported reloc type" msgstr "kiểu định vị lại không được hỗ trợ" @@ -391,8 +397,8 @@ msgstr "Địa chỉ tuyệt đối vượt quá phạm vi 8 bit" msgid "Unrecognized Reloc Type" msgstr "Kiểu định vị lại không được nhận ra" -#: coff-mips.c:688 elf32-mips.c:1014 elf32-score.c:345 elf64-mips.c:1991 -#: elfn32-mips.c:1832 +#: coff-mips.c:688 elf32-mips.c:1014 elf32-score.c:441 elf32-score7.c:341 +#: elf64-mips.c:2018 elfn32-mips.c:1832 msgid "GP relative relocation when _gp not defined" msgstr "Có định vị lại tương đối GP khi chưa xác định _gp" @@ -400,17 +406,17 @@ msgstr "Có định vị lại tương đối GP khi chưa xác định _gp" msgid "Unrecognized reloc" msgstr "Định vị lại không được nhận ra" -#: coff-rs6000.c:2803 +#: coff-rs6000.c:2787 #, c-format msgid "%s: unsupported relocation type 0x%02x" msgstr "%s: kiểu định vị lại không được hỗ trợ 0x%02x" -#: coff-rs6000.c:2896 +#: coff-rs6000.c:2880 #, c-format msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry" msgstr "%s: định vị lại TOC tại 0x%x tới ký hiệu « %s » không có mục nhập TOC" -#: coff-rs6000.c:3628 coff64-rs6000.c:2130 +#: coff-rs6000.c:3646 coff64-rs6000.c:2168 msgid "%B: symbol `%s' has unrecognized smclas %d" msgstr "%B: ký tự « %s » có smclas không nhận ra %d" @@ -429,139 +435,143 @@ msgstr "%s: cảnh báo : chỉ mục ký hiệu cấm %ld trong các định v msgid "ignoring reloc %s\n" msgstr "Đang lờ đi định vị lại %s\n" -#: coffcode.h:850 +#: coffcode.h:960 msgid "%B: warning: COMDAT symbol '%s' does not match section name '%s'" msgstr "%B: cảnh báo : ký hiệu COMDAT « %s » không tương ứng vơi tên phần « %s »" #. Generate a warning message rather using the 'unhandled' #. variable as this will allow some .sys files generate by #. other toolchains to be processed. See bugzilla issue 196. -#: coffcode.h:1062 +#: coffcode.h:1176 msgid "%B: Warning: Ignoring section flag IMAGE_SCN_MEM_NOT_PAGED in section %s" msgstr "%B: Cảnh báo: Đang lờ đi cờ của phần IMAGE_SCN_MEM_NOT_PAGED trong phần %s" -#: coffcode.h:1117 +#: coffcode.h:1240 msgid "%B (%s): Section flag %s (0x%x) ignored" msgstr "%B (%s): Đã lờ đi cờ của phần %s (0x%x)" -#: coffcode.h:2244 +#: coffcode.h:2382 #, c-format msgid "Unrecognized TI COFF target id '0x%x'" msgstr "Không nhận ra mã số đích TI COFF « 0x%x »" -#: coffcode.h:2559 +#: coffcode.h:2696 msgid "%B: reloc against a non-existant symbol index: %ld" msgstr "%B: định vị lại so với một chỉ mục ký hiệu không tồn tại: %ld" -#: coffcode.h:4309 +#: coffcode.h:3669 +msgid "%B: section %s: string table overflow at offset %ld" +msgstr "%B: phần %s: tràn bảng chuỗi ở hiệu %ld" + +#: coffcode.h:4477 msgid "%B: warning: line number table read failed" msgstr "%B: Cảnh bảo : lỗi đọc bảng số thứ tự dòng" -#: coffcode.h:4339 +#: coffcode.h:4507 msgid "%B: warning: illegal symbol index %ld in line numbers" msgstr "%B: cảnh báo : chỉ mục ký hiệu cấm %ld trong các số thứ tự dòng" -#: coffcode.h:4353 +#: coffcode.h:4521 msgid "%B: warning: duplicate line number information for `%s'" msgstr "%B: cảnh báo : thông tin số thứ tự dòng trùng đối với « %s »" -#: coffcode.h:4744 +#: coffcode.h:4912 msgid "%B: Unrecognized storage class %d for %s symbol `%s'" msgstr "%B: Không nhận ra hạng lưu trữ %d cho ký hiệu %s « %s »" -#: coffcode.h:4870 +#: coffcode.h:5038 msgid "warning: %B: local symbol `%s' has no section" msgstr "cảnh báo : %B: ký hiệu cục bộ « %s » không có phần đoạn" -#: coffcode.h:5013 +#: coffcode.h:5181 msgid "%B: illegal relocation type %d at address 0x%lx" msgstr "%B: kiểu định vị lại cấm %d ở địa chỉ 0x%lx" -#: coffgen.c:1518 +#: coffgen.c:1571 msgid "%B: bad string table size %lu" msgstr "%B: kích cỡ bảng chuỗi sai %lu" -#: cofflink.c:513 elflink.c:4218 +#: cofflink.c:513 elflink.c:4307 msgid "Warning: type of symbol `%s' changed from %d to %d in %B" msgstr "Cảnh báo : kiểu ký hiệu « %s » bị thay đổi từ %d thành %d trong %B" -#: cofflink.c:2296 +#: cofflink.c:2305 msgid "%B: relocs in section `%A', but it has no contents" msgstr "%B: định vị lại trong phần « %A », nhưng nó không có nội dung" -#: cofflink.c:2627 coffswap.h:824 +#: cofflink.c:2636 coffswap.h:826 #, c-format msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" msgstr "%s: %s: tràn định vị lại: 0x%lx > 0xffff" -#: cofflink.c:2636 coffswap.h:810 +#: cofflink.c:2645 coffswap.h:812 #, c-format msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" msgstr "%s: cảnh báo : %s: tràn số thứ tự dòng: 0x%lx > 0xffff" #: cpu-arm.c:189 cpu-arm.c:200 -msgid "ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale" -msgstr "LỖI: %B được biên dịch cho EP9312, còn %B được biên dịch cho XScale" +msgid "error: %B is compiled for the EP9312, whereas %B is compiled for XScale" +msgstr "lỗi: %B được biên dịch cho EP9312, còn %B được biên dịch cho XScale" #: cpu-arm.c:332 #, c-format msgid "warning: unable to update contents of %s section in %s" msgstr "cảnh báo : không thể cập nhật nội dung của phần %s trong %s" -#: dwarf2.c:424 +#: dwarf2.c:430 #, c-format msgid "Dwarf Error: Can't find %s section." msgstr "Lỗi Dwarf: không tìm thấy phần %s." -#: dwarf2.c:452 +#: dwarf2.c:457 #, c-format msgid "Dwarf Error: unable to decompress %s section." msgstr "Lỗi Dwarf: không thể giải nén phần %s." -#: dwarf2.c:462 +#: dwarf2.c:468 #, c-format msgid "Dwarf Error: Offset (%lu) greater than or equal to %s size (%lu)." msgstr "Lỗi Dwarf: Khoảng bù dòng (%lu) lớn hơn hoặc bằng kích cỡ %s (%lu)." -#: dwarf2.c:849 +#: dwarf2.c:865 #, c-format msgid "Dwarf Error: Invalid or unhandled FORM value: %u." msgstr "Lỗi Dwarf: Giá trị FORM sai hoặc chưa được xử lý: %u." -#: dwarf2.c:1063 +#: dwarf2.c:1079 msgid "Dwarf Error: mangled line number section (bad file number)." msgstr "Lỗi Dwarf: phần số thứ tự dòng đã rối (số thứ tự tập tin sai)." -#: dwarf2.c:1393 +#: dwarf2.c:1413 msgid "Dwarf Error: mangled line number section." msgstr "Lỗi Dwarf: phần số thứ tự dòng đã rối." -#: dwarf2.c:1726 dwarf2.c:1842 dwarf2.c:2114 +#: dwarf2.c:1760 dwarf2.c:1867 dwarf2.c:2139 #, c-format msgid "Dwarf Error: Could not find abbrev number %u." msgstr "Lỗi Dwarf: Không tìm thấy số viết tắt %u." -#: dwarf2.c:2075 +#: dwarf2.c:2100 #, c-format -msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 information." -msgstr "Lỗi Dwarf: tìm thấy dwarf phiên bản « %u », nhưng trình đọc này chỉ điều khiển thông tin của phiên bản 2." +msgid "Dwarf Error: found dwarf version '%u', this reader only handles version 2 and 3 information." +msgstr "Lỗi Dwarf: tìm thấy dwarf phiên bản « %u », nhưng trình đọc này chỉ điều khiển thông tin của phiên bản 2 và 3." -#: dwarf2.c:2082 +#: dwarf2.c:2107 #, c-format msgid "Dwarf Error: found address size '%u', this reader can not handle sizes greater than '%u'." msgstr "Lỗi Dwarf: tìm thấy kích cỡ địa chỉ « %u », nhưng trình đọc này không điều khiển được kích cỡ lớn hơn « %u »." -#: dwarf2.c:2105 +#: dwarf2.c:2130 #, c-format msgid "Dwarf Error: Bad abbrev number: %u." msgstr "Lỗi Dwarf: Số viết tắt sai: %u." -#: ecoff.c:1227 +#: ecoff.c:1238 #, c-format msgid "Unknown basic type %d" msgstr "Không rõ kiểu cơ bản %d" -#: ecoff.c:1484 +#: ecoff.c:1495 #, c-format msgid "" "\n" @@ -570,7 +580,7 @@ msgstr "" "\n" " Ký hiệu End+1: %ld" -#: ecoff.c:1491 ecoff.c:1494 +#: ecoff.c:1502 ecoff.c:1505 #, c-format msgid "" "\n" @@ -579,7 +589,7 @@ msgstr "" "\n" " Ký hiệu đầu tiên: %ld" -#: ecoff.c:1506 +#: ecoff.c:1517 #, c-format msgid "" "\n" @@ -588,7 +598,7 @@ msgstr "" "\n" " Ký hiệu End+1: %-7ld Kiểu : %s" -#: ecoff.c:1513 +#: ecoff.c:1524 #, c-format msgid "" "\n" @@ -597,7 +607,7 @@ msgstr "" "\n" " Ký hiệu cục bộ : %ld" -#: ecoff.c:1521 +#: ecoff.c:1532 #, c-format msgid "" "\n" @@ -606,7 +616,7 @@ msgstr "" "\n" " cấu trúc; ký hiệu End+1: %ld" -#: ecoff.c:1526 +#: ecoff.c:1537 #, c-format msgid "" "\n" @@ -615,7 +625,7 @@ msgstr "" "\n" " kết hợp; ký hiệu End+1: %ld" -#: ecoff.c:1531 +#: ecoff.c:1542 #, c-format msgid "" "\n" @@ -624,7 +634,7 @@ msgstr "" "\n" " đếm; ký hiệu End+1: %ld" -#: ecoff.c:1537 +#: ecoff.c:1548 #, c-format msgid "" "\n" @@ -633,119 +643,124 @@ msgstr "" "\n" " Kiểu : %s" -#: elf-attrs.c:582 -msgid "ERROR: %B: Must be processed by '%s' toolchain" -msgstr "LỖI: %B: Phải được dãy công cụ « %s » xử lý" +#: elf-attrs.c:567 +msgid "error: %B: Must be processed by '%s' toolchain" +msgstr "lỗi: %B: Phải được dãy công cụ « %s » xử lý" -#: elf-attrs.c:602 elf-attrs.c:621 -msgid "ERROR: %B: Incompatible object tag '%s':%d" -msgstr "LỖI: %B: Thẻ đối tượng không tương thích « %s »:%s" +#: elf-attrs.c:575 +msgid "error: %B: Object tag '%d, %s' is incompatible with tag '%d, %s'" +msgstr "lỗi: %B: thẻ đối tượng « %d, %s » không tương thích với thẻ « %d, %s »" -#: elf-eh-frame.c:866 +#: elf-eh-frame.c:884 msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n" msgstr "%P: gặp lỗi trong %B(%A); sẽ không tạo bảng .eh_frame_hdr nào.\n" -#: elf-eh-frame.c:1102 +#: elf-eh-frame.c:1122 msgid "%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n" msgstr "%P: biên mã fde trong %B(%A) thì ngăn cản tạo bảng .eh_frame_hdr.\n" -#: elf-hppa.h:2241 elf-m10300.c:1546 elf32-arm.c:7954 elf32-i386.c:3582 -#: elf32-m32r.c:2598 elf32-m68k.c:3516 elf32-ppc.c:7223 elf32-s390.c:3058 -#: elf32-sh.c:3438 elf32-xtensa.c:3021 elf64-ppc.c:11528 elf64-s390.c:3019 -#: elf64-sh64.c:1648 elf64-x86-64.c:3239 elfxx-sparc.c:3336 -msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'" -msgstr "%B(%A+0x%lx): định vị lại không thể giải quyết %s đối với ký hiệu « %s »" - -#: elf-hppa.h:2266 elf-hppa.h:2280 -msgid "%B(%A): warning: unresolvable relocation against symbol `%s'" -msgstr "%B(%A): cảnh báo : định vị lại không thể giải quyết được so với ký hiệu « %s »" +#: elf-ifunc.c:179 +msgid "%F%P: dynamic STT_GNU_IFUNC symbol `%s' with pointer equality in `%B' can not be used when making an executable; recompile with -fPIE and relink with -pie\n" +msgstr "%F%P: ký hiệu STT_GNU_IFUNC động « %s » với tình trạng chất lượng con trỏ trong « %B » thì không dùng được khi tạo bản thực thi; hãy biên dịch lại với « -fPIE » và liên kết lại với « -pie »\n" -#: elf-m10200.c:456 elf-m10300.c:1609 elf32-avr.c:1250 elf32-bfin.c:3214 -#: elf32-cr16.c:959 elf32-cr16c.c:790 elf32-cris.c:1538 elf32-crx.c:933 +#: elf-m10200.c:456 elf-m10300.c:1575 elf32-avr.c:1251 elf32-bfin.c:3200 +#: elf32-cr16.c:1517 elf32-cr16c.c:790 elf32-cris.c:2089 elf32-crx.c:933 #: elf32-d10v.c:516 elf32-fr30.c:616 elf32-frv.c:4114 elf32-h8300.c:516 -#: elf32-i860.c:1218 elf32-ip2k.c:1499 elf32-iq2000.c:691 elf32-m32c.c:560 -#: elf32-m32r.c:3124 elf32-m68hc1x.c:1135 elf32-mep.c:541 elf32-msp430.c:493 -#: elf32-mt.c:402 elf32-openrisc.c:411 elf32-score.c:2451 elf32-spu.c:4132 -#: elf32-v850.c:1703 elf32-xstormy16.c:948 elf64-mmix.c:1533 +#: elf32-i860.c:1218 elf32-ip2k.c:1499 elf32-iq2000.c:691 elf32-lm32.c:1171 +#: elf32-m32c.c:560 elf32-m32r.c:3102 elf32-m68hc1x.c:1136 elf32-mep.c:541 +#: elf32-microblaze.c:1226 elf32-moxie.c:291 elf32-msp430.c:493 elf32-mt.c:402 +#: elf32-openrisc.c:411 elf32-score.c:2752 elf32-score7.c:2591 +#: elf32-spu.c:5045 elf32-v850.c:1701 elf32-xstormy16.c:948 elf64-mmix.c:1533 msgid "internal error: out of range error" msgstr "lỗi nội bộ : lỗi ở ngoại phạm vi" -#: elf-m10200.c:460 elf-m10300.c:1613 elf32-avr.c:1254 elf32-bfin.c:3218 -#: elf32-cr16.c:963 elf32-cr16c.c:794 elf32-cris.c:1542 elf32-crx.c:937 +#: elf-m10200.c:460 elf-m10300.c:1579 elf32-avr.c:1255 elf32-bfin.c:3204 +#: elf32-cr16.c:1521 elf32-cr16c.c:794 elf32-cris.c:2093 elf32-crx.c:937 #: elf32-d10v.c:520 elf32-fr30.c:620 elf32-frv.c:4118 elf32-h8300.c:520 -#: elf32-i860.c:1222 elf32-iq2000.c:695 elf32-m32c.c:564 elf32-m32r.c:3128 -#: elf32-m68hc1x.c:1139 elf32-mep.c:545 elf32-msp430.c:497 -#: elf32-openrisc.c:415 elf32-score.c:2455 elf32-spu.c:4136 elf32-v850.c:1707 -#: elf32-xstormy16.c:952 elf64-mmix.c:1537 elfxx-mips.c:9065 +#: elf32-i860.c:1222 elf32-iq2000.c:695 elf32-lm32.c:1175 elf32-m32c.c:564 +#: elf32-m32r.c:3106 elf32-m68hc1x.c:1140 elf32-mep.c:545 +#: elf32-microblaze.c:1230 elf32-moxie.c:295 elf32-msp430.c:497 +#: elf32-openrisc.c:415 elf32-score.c:2756 elf32-score7.c:2595 +#: elf32-spu.c:5049 elf32-v850.c:1705 elf32-xstormy16.c:952 elf64-mmix.c:1537 +#: elfxx-mips.c:9103 msgid "internal error: unsupported relocation error" msgstr "lỗi nội bộ : lỗi định vị lại không được hỗ trợ" -#: elf-m10200.c:464 elf32-cr16.c:967 elf32-cr16c.c:798 elf32-crx.c:941 -#: elf32-d10v.c:524 elf32-h8300.c:524 elf32-m32r.c:3132 elf32-m68hc1x.c:1143 -#: elf32-score.c:2459 elf32-spu.c:4140 +#: elf-m10200.c:464 elf32-cr16.c:1525 elf32-cr16c.c:798 elf32-crx.c:941 +#: elf32-d10v.c:524 elf32-h8300.c:524 elf32-lm32.c:1179 elf32-m32r.c:3110 +#: elf32-m68hc1x.c:1144 elf32-microblaze.c:1234 elf32-score.c:2760 +#: elf32-score7.c:2599 elf32-spu.c:5053 msgid "internal error: dangerous error" msgstr "lỗi nội bộ : lỗi nguy hiểm" -#: elf-m10200.c:468 elf-m10300.c:1626 elf32-avr.c:1262 elf32-bfin.c:3226 -#: elf32-cr16.c:971 elf32-cr16c.c:802 elf32-cris.c:1550 elf32-crx.c:945 +#: elf-m10200.c:468 elf-m10300.c:1592 elf32-avr.c:1263 elf32-bfin.c:3212 +#: elf32-cr16.c:1529 elf32-cr16c.c:802 elf32-cris.c:2101 elf32-crx.c:945 #: elf32-d10v.c:528 elf32-fr30.c:628 elf32-frv.c:4126 elf32-h8300.c:528 -#: elf32-i860.c:1230 elf32-ip2k.c:1514 elf32-iq2000.c:703 elf32-m32c.c:572 -#: elf32-m32r.c:3136 elf32-m68hc1x.c:1147 elf32-mep.c:553 elf32-msp430.c:505 -#: elf32-mt.c:410 elf32-openrisc.c:423 elf32-score.c:2463 elf32-spu.c:4144 -#: elf32-v850.c:1727 elf32-xstormy16.c:960 elf64-mmix.c:1545 +#: elf32-i860.c:1230 elf32-ip2k.c:1514 elf32-iq2000.c:703 elf32-lm32.c:1183 +#: elf32-m32c.c:572 elf32-m32r.c:3114 elf32-m68hc1x.c:1148 elf32-mep.c:553 +#: elf32-microblaze.c:1238 elf32-moxie.c:303 elf32-msp430.c:505 elf32-mt.c:410 +#: elf32-openrisc.c:423 elf32-score.c:2769 elf32-score7.c:2603 +#: elf32-spu.c:5057 elf32-v850.c:1725 elf32-xstormy16.c:960 elf64-mmix.c:1545 msgid "internal error: unknown error" msgstr "lỗi nội bộ : lỗi không rõ" -#: elf-m10300.c:1618 +#: elf-m10300.c:1512 elf32-arm.c:8963 elf32-i386.c:3984 elf32-m32r.c:2588 +#: elf32-m68k.c:4099 elf32-ppc.c:7906 elf32-s390.c:3015 elf32-sh.c:3429 +#: elf32-xtensa.c:3027 elf64-ppc.c:12063 elf64-s390.c:2974 elf64-sh64.c:1648 +#: elf64-x86-64.c:3657 elfxx-sparc.c:3317 +msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'" +msgstr "%B(%A+0x%lx): định vị lại không thể giải quyết %s đối với ký hiệu « %s »" + +#: elf-m10300.c:1584 msgid "error: inappropriate relocation type for shared library (did you forget -fpic?)" msgstr "lỗi: kiểu định vị lại không thích hợp cho thư viện chia sẻ (bạn đã quên đặt -fpic không?)" -#: elf-m10300.c:1621 +#: elf-m10300.c:1587 msgid "internal error: suspicious relocation type used in shared library" msgstr "lỗi nội bộ: kiểu định vị lại đáng ngờ được dùng trong thư viện chia sẻ" -#: elf-m10300.c:4397 elf32-arm.c:9578 elf32-cris.c:2403 elf32-hppa.c:1921 -#: elf32-i370.c:506 elf32-i386.c:1807 elf32-m32r.c:1931 elf32-m68k.c:2787 -#: elf32-ppc.c:4693 elf32-s390.c:1687 elf32-sh.c:2583 elf32-vax.c:1055 -#: elf64-ppc.c:6075 elf64-s390.c:1662 elf64-sh64.c:3432 elf64-x86-64.c:1641 -#: elfxx-sparc.c:1828 +#: elf-m10300.c:4385 elf32-arm.c:11346 elf32-cr16.c:2519 elf32-cris.c:3030 +#: elf32-hppa.c:1891 elf32-i370.c:506 elf32-i386.c:1975 elf32-lm32.c:1873 +#: elf32-m32r.c:1921 elf32-m68k.c:3188 elf32-ppc.c:4953 elf32-s390.c:1650 +#: elf32-sh.c:2574 elf32-vax.c:1052 elf64-ppc.c:6348 elf64-s390.c:1623 +#: elf64-sh64.c:3396 elf64-x86-64.c:1821 elfxx-sparc.c:1802 #, c-format msgid "dynamic variable `%s' is zero size" msgstr "biến động « %s » có kích cỡ số không" -#: elf.c:328 +#: elf.c:329 msgid "%B: invalid string offset %u >= %lu for section `%s'" msgstr "%B: khoảng bù chuỗi không hợp lệ %u≥%lu cho phần « %s »" -#: elf.c:438 +#: elf.c:439 msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section" msgstr "%B số thứ tự ký hiệu %lu tham chiếu đến phần SHT_SYMTAB_SHNDX không tồn tại" -#: elf.c:594 +#: elf.c:595 msgid "%B: Corrupt size field in group section header: 0x%lx" msgstr "%B: Trường kích cỡ bị hỏng trong phần đầu của phần nhóm: 0x%lx" -#: elf.c:630 +#: elf.c:631 msgid "%B: invalid SHT_GROUP entry" msgstr "%B: mục nhập SHT_GROUP không hợp lệ" -#: elf.c:700 +#: elf.c:701 msgid "%B: no group info for section %A" msgstr "%B: không có thông tin nhóm về phần %A" -#: elf.c:729 elf.c:2976 elflink.c:9746 +#: elf.c:730 elf.c:2960 elflink.c:9912 msgid "%B: warning: sh_link not set for section `%A'" msgstr "%B: cảnh báo : « sh_link » chưa được đặt cho phần « %A »" -#: elf.c:748 +#: elf.c:749 msgid "%B: sh_link [%d] in section `%A' is incorrect" msgstr "%B: sh_link [%d] không đúng trong phần « %A »" -#: elf.c:783 +#: elf.c:784 msgid "%B: unknown [%d] section `%s' in group [%s]" msgstr "%B: không rõ [%d] phần « %s » trong nhóm [%s]" -#: elf.c:1159 +#: elf.c:1104 #, c-format msgid "" "\n" @@ -754,7 +769,7 @@ msgstr "" "\n" "Phần đầu chương trình:\n" -#: elf.c:1201 +#: elf.c:1146 #, c-format msgid "" "\n" @@ -763,7 +778,7 @@ msgstr "" "\n" "Phần động:\n" -#: elf.c:1337 +#: elf.c:1282 #, c-format msgid "" "\n" @@ -772,7 +787,7 @@ msgstr "" "\n" "Phần định nghĩa phiên bản:\n" -#: elf.c:1362 +#: elf.c:1307 #, c-format msgid "" "\n" @@ -781,82 +796,82 @@ msgstr "" "\n" "Tham chiếu phiên bản:\n" -#: elf.c:1367 +#: elf.c:1312 #, c-format msgid " required from %s:\n" msgstr " cần thiết từ %s:\n" -#: elf.c:1755 +#: elf.c:1702 msgid "%B: invalid link %lu for reloc section %s (index %u)" msgstr "%B: liên kết không hợp lệ %lu cho phần định vị lại %s (chỉ mục %u)" -#: elf.c:1924 +#: elf.c:1870 msgid "%B: don't know how to handle allocated, application specific section `%s' [0x%8x]" msgstr "%B: không biết cách xử lý phần đã cấp phát mà đặc trưng cho ứng dụng « %s » [0x%8x]" -#: elf.c:1936 +#: elf.c:1882 msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]" msgstr "%B: không biết cách xử lý phần đặc trưng cho bộ xử lý « %s » [0x%8x]" -#: elf.c:1947 +#: elf.c:1893 msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]" msgstr "%B: không biết cách xử lý phần đặc trưng cho HĐH « %s » [0x%8x]" -#: elf.c:1957 +#: elf.c:1903 msgid "%B: don't know how to handle section `%s' [0x%8x]" msgstr "%B: không biết cách xử lý phần « %s » [0x%8x]" -#: elf.c:2555 +#: elf.c:2500 #, c-format msgid "warning: section `%A' type changed to PROGBITS" msgstr "cảnh báo : phần « %A » có kiểu bị thay đổi thành PROGBITS" -#: elf.c:2933 +#: elf.c:2917 msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'" msgstr "%B: sh_link của phần « %A » chỉ tới phần bị hủy « %A » của « %B »" -#: elf.c:2956 +#: elf.c:2940 msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'" msgstr "%B: sh_link của phần « %A » chỉ tới phần bị gỡ bỏ « %A » của « %B »" -#: elf.c:4300 +#: elf.c:4311 msgid "%B: The first section in the PT_DYNAMIC segment is not the .dynamic section" msgstr "%B: Phần thứ nhất trong đoạn PT_DYNAMIC không phải là phần .dynamic" -#: elf.c:4327 +#: elf.c:4338 msgid "%B: Not enough room for program headers, try linking with -N" msgstr "%B: Không đủ sức chứa cho các phần đầu của chương trình: hãy thử liên kết với « -N »" -#: elf.c:4404 +#: elf.c:4420 msgid "%B: section %A vma 0x%lx overlaps previous sections" msgstr "%B: phần %A vma 0x%lx đè lên phần trước" -#: elf.c:4499 +#: elf.c:4515 msgid "%B: section `%A' can't be allocated in segment %d" msgstr "%B: phần « %A » không thể được cấp phát trong đoạn %d" -#: elf.c:4549 +#: elf.c:4565 msgid "%B: warning: allocated section `%s' not in segment" msgstr "%B: cảnh báo : phần đã cấp phát « %s » không nằm trong đoạn" -#: elf.c:5064 +#: elf.c:5065 msgid "%B: symbol `%s' required but not present" msgstr "%B: ký hiệu « %s » cần thiết mà không có" -#: elf.c:5403 +#: elf.c:5404 msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n" msgstr "%B: cảnh báo : Phát hiện một đoạn rỗng có thể nạp được: trường hợp này có ý định trước không?\n" -#: elf.c:6366 +#: elf.c:6370 #, c-format msgid "Unable to find equivalent output section for symbol '%s' from section '%s'" msgstr "Không tìm thấy phần kết xuất tương đương cho ký hiệu « %s » từ phần « %s »" -#: elf.c:7346 +#: elf.c:7356 msgid "%B: unsupported relocation type %s" msgstr "%B: kiểu định vị lại không được hỗ trợ %s" -#: elf32-arm.c:2846 elf32-arm.c:2878 +#: elf32-arm.c:3149 msgid "" "%B(%s): warning: interworking not enabled.\n" " first occurrence: %B: Thumb call to ARM" @@ -864,40 +879,48 @@ msgstr "" "%B(%s): cảnh báo : chưa bật dùng ảnh hưởng lẫn nhau.\n" " lần xuất hiện đầu: %B: thumb gọi tới ARM" -#: elf32-arm.c:3041 +#: elf32-arm.c:3190 +msgid "" +"%B(%s): warning: interworking not enabled.\n" +" first occurrence: %B: ARM call to Thumb" +msgstr "" +"%B(%s): cảnh báo : chưa bật dùng ảnh hưởng lẫn nhau.\n" +" lần xuất hiện đầu tiên: %B: gọi ARM tới Thumb" + +#: elf32-arm.c:3387 elf32-arm.c:4692 #, c-format msgid "%s: cannot create stub entry %s" msgstr "%s: không thể tạo mục nhập mẩu %s" -#: elf32-arm.c:3825 +#: elf32-arm.c:4804 #, c-format msgid "unable to find THUMB glue '%s' for '%s'" msgstr "không tìm thấy keo hồ THUMB « %s » cho « %s »" -#: elf32-arm.c:3859 +#: elf32-arm.c:4838 #, c-format msgid "unable to find ARM glue '%s' for '%s'" msgstr "không tìm thấy keo hồ ARM « %s » cho « %s »" -#: elf32-arm.c:4463 +#: elf32-arm.c:5365 msgid "%B: BE8 images only valid in big-endian mode." msgstr "%B: hình ảnh BE8 chỉ đúng trong chế độ về cuối lớn." #. Give a warning, but do as the user requests anyway. -#: elf32-arm.c:4678 +#: elf32-arm.c:5590 msgid "%B: warning: selected VFP11 erratum workaround is not necessary for target architecture" msgstr "%B: cảnh báo : sự khắc phúc các lỗi VFP11 đã chọn không cần thiết cho kiến trúc đích" -#: elf32-arm.c:5212 elf32-arm.c:5232 +#: elf32-arm.c:6130 elf32-arm.c:6150 msgid "%B: unable to find VFP11 veneer `%s'" msgstr "%B: không tìm thấy lớp gỗ mặt VFP11 « %s »" -#: elf32-arm.c:5278 +#: elf32-arm.c:6196 #, c-format msgid "Invalid TARGET2 relocation type '%s'." msgstr "Kiểu định vị lại TARGET2 không hợp lệ « %s »" -#: elf32-arm.c:5362 +#: elf32-arm.c:6281 msgid "" "%B(%s): warning: interworking not enabled.\n" " first occurrence: %B: thumb call to arm" @@ -905,363 +928,409 @@ msgstr "" "%B(%s): cảnh báo : chưa bật dùng ảnh hưởng lẫn nhau.\n" " lần xuất hiện đầu: %B: thumb gọi tới arm" -#: elf32-arm.c:6094 +#: elf32-arm.c:7003 msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'." msgstr "\\%B: Cảnh báo : Chỉ dẫn Arm BLX đăt mục tiêu hàm Arm « %s »." -#: elf32-arm.c:6418 +#: elf32-arm.c:7405 msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'." msgstr "%B: Cảnh báo : Chỉ dẫn Thumb BLX đăt mục tiêu hàm thumb « %s »." -#: elf32-arm.c:7095 +#: elf32-arm.c:8085 msgid "%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object" msgstr "%B(%A+0x%lx): R_ARM_TLS_LE32 không cho phép định vị lại trong đối tượng dùng chung" -#: elf32-arm.c:7310 +#: elf32-arm.c:8300 msgid "%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations" msgstr "%B(%A+0x%lx): Chỉ cho phép chỉ dẫn kiểu ADD (cộng) hoặc SUB (trừ) khi định vị lại nhóm ALU" -#: elf32-arm.c:7350 elf32-arm.c:7437 elf32-arm.c:7520 elf32-arm.c:7605 +#: elf32-arm.c:8340 elf32-arm.c:8427 elf32-arm.c:8510 elf32-arm.c:8595 msgid "%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s" msgstr "%B(%A+0x%lx): Tràn trong khi tách ra 0x%lx để định vị lại nhóm %s" -#: elf32-arm.c:7812 elf32-sh.c:3334 elf64-sh64.c:1556 +#: elf32-arm.c:8821 elf32-sh.c:3325 elf64-sh64.c:1556 msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section" msgstr "%B(%A+0x%lx): %s định vị lại đối lại phần SEC_MERGE" -#: elf32-arm.c:7930 elf32-xtensa.c:2759 elf64-ppc.c:10374 +#: elf32-arm.c:8939 elf32-m68k.c:4134 elf32-xtensa.c:2765 elf64-ppc.c:10743 msgid "%B(%A+0x%lx): %s used with TLS symbol %s" msgstr "%B(%A+0x%lx): %s được dùng với ký hiệu TLS %s" -#: elf32-arm.c:7931 elf32-xtensa.c:2760 elf64-ppc.c:10375 +#: elf32-arm.c:8940 elf32-m68k.c:4135 elf32-xtensa.c:2766 elf64-ppc.c:10744 msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s" msgstr "%B(%A+0x%lx): %s được dùng với ký hiệu khác TLS %s" -#: elf32-arm.c:7988 +#: elf32-arm.c:8997 msgid "out of range" msgstr "ở ngoại phạm vi" -#: elf32-arm.c:7992 +#: elf32-arm.c:9001 msgid "unsupported relocation" msgstr "định vị lại không được hỗ trợ" -#: elf32-arm.c:8000 +#: elf32-arm.c:9009 msgid "unknown error" msgstr "lỗi không rõ" -#: elf32-arm.c:8099 +#: elf32-arm.c:9409 msgid "Warning: Clearing the interworking flag of %B because non-interworking code in %B has been linked with it" msgstr "Cảnh báo : Đang xóa cờ ảnh hưởng lẫn nhau của %B vì mã không ảnh hưởng lẫn nhau trong %B đã được liên kết với nó" -#: elf32-arm.c:8205 -msgid "ERROR: %B uses VFP register arguments, %B does not" -msgstr "LỖI: %B sử dụng các đối số thanh ghi VFP, còn %B thì không" +#: elf32-arm.c:9652 +msgid "error: %B: Unknown CPU architecture" +msgstr "lỗi: %B: không rõ kiến trúc CPU" + +#: elf32-arm.c:9690 +msgid "error: %B: Conflicting CPU architectures %d/%d" +msgstr "lỗi: %B: Các kiến trúc CPU xung đột với nhau %d/%d" -#: elf32-arm.c:8254 -msgid "ERROR: %B: Conflicting architecture profiles %c/%c" -msgstr "LỖI: %B: Các hồ sơ kiến trúc xung đột với nhau %c/%c" +#: elf32-arm.c:9747 +msgid "error: %B uses VFP register arguments, %B does not" +msgstr "lỗi: %B sử dụng các đối số thanh ghi VFP, còn %B thì không" -#: elf32-arm.c:8274 +#: elf32-arm.c:9897 +msgid "error: %B: Conflicting architecture profiles %c/%c" +msgstr "lỗi: %B: Các hồ sơ kiến trúc xung đột với nhau %c/%c" + +#: elf32-arm.c:9921 msgid "Warning: %B: Conflicting platform configuration" msgstr "Cảnh báo : %B: cấu trúc nền tảng xung đột" -#: elf32-arm.c:8283 -msgid "ERROR: %B: Conflicting use of R9" -msgstr "LỖI; %B: cách dùng R9 xung đột" +#: elf32-arm.c:9930 +msgid "error: %B: Conflicting use of R9" +msgstr "lỗi; %B: Dùng R9 một cách xung đột" -#: elf32-arm.c:8295 -msgid "ERROR: %B: SB relative addressing conflicts with use of R9" -msgstr "LỖI: %B: đạt địa chỉ tương đối SB xung đột với cách dùng R9" +#: elf32-arm.c:9942 +msgid "error: %B: SB relative addressing conflicts with use of R9" +msgstr "lỗi: %B: đạt địa chỉ tương đối SB cũng xung đột với cách dùng R9" -#: elf32-arm.c:8318 +#: elf32-arm.c:9955 msgid "warning: %B uses %u-byte wchar_t yet the output is to use %u-byte wchar_t; use of wchar_t values across objects may fail" msgstr "cảnh báo : %B dùng wchar_t %u-byte, còn kết xuất nên dùng wchar_t %u-byte; vì vậy có thể không thành công dùng giá trị wchar_t qua các đối tượng" -#: elf32-arm.c:8347 +#: elf32-arm.c:9986 msgid "warning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may fail" msgstr "cảnh báo : %B dùng sự đếm %s, còn kết xuất nên dùng sự đếm %s; vì vậy có thể không thành công dùng giá trị đếm qua các đối tượng" -#: elf32-arm.c:8360 -msgid "ERROR: %B uses iWMMXt register arguments, %B does not" -msgstr "LỖI: %B sử dụng các đối số thanh ghi iWMMXt, còn %B thì không" +#: elf32-arm.c:9998 +msgid "error: %B uses iWMMXt register arguments, %B does not" +msgstr "lỗi: %B sử dụng các đối số thanh ghi iWMMXt, còn %B thì không" + +#: elf32-arm.c:10020 +msgid "error: fp16 format mismatch between %B and %B" +msgstr "lỗi: định dạng fp16 không tương ứng giữa %B và %B" -#: elf32-arm.c:8400 +#: elf32-arm.c:10063 elf32-arm.c:10156 +msgid "%B: Unknown mandatory EABI object attribute %d" +msgstr "%B: Không rõ thuộc tính đối tượng EABI %d" + +#: elf32-arm.c:10071 elf32-arm.c:10164 msgid "Warning: %B: Unknown EABI object attribute %d" msgstr "Cảnh báo : %B: Không rõ thuộc tính đối tượng EABI %d" -#: elf32-arm.c:8460 -msgid "ERROR: %B is already in final BE8 format" -msgstr "LỖI: %B đã theo định dạng BE8 cuối cùng" +#: elf32-arm.c:10224 +msgid "error: %B is already in final BE8 format" +msgstr "lỗi: %B đã theo định dạng BE8 cuối cùng" -#: elf32-arm.c:8536 -msgid "ERROR: Source object %B has EABI version %d, but target %B has EABI version %d" -msgstr "LỖI: Đối tượng nguồn %B có phiên bản EABI %d, nhưng đích %B có phiên bản EABI %d" +#: elf32-arm.c:10300 +msgid "error: Source object %B has EABI version %d, but target %B has EABI version %d" +msgstr "lỗi: Đối tượng nguồn %B có phiên bản EABI %d, còn đích %B có phiên bản EABI %d" -#: elf32-arm.c:8552 -msgid "ERROR: %B is compiled for APCS-%d, whereas target %B uses APCS-%d" -msgstr "LỖI: %B được biên dịch cho APCS-%d, còn đích %B sử dụng APCS-%d" +#: elf32-arm.c:10316 +msgid "error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d" +msgstr "lỗi: %B được biên dịch cho APCS-%d, còn đích %B sử dụng APCS-%d" -#: elf32-arm.c:8577 -msgid "ERROR: %B uses VFP instructions, whereas %B does not" -msgstr "LỖI: %B sử dụng các chỉ dẫn VFP, còn %B thì không" +#: elf32-arm.c:10341 +msgid "error: %B uses VFP instructions, whereas %B does not" +msgstr "lỗi: %B sử dụng chỉ dẫn VFP, còn %B thì không" -#: elf32-arm.c:8581 -msgid "ERROR: %B uses FPA instructions, whereas %B does not" -msgstr "LỖI: %B sử dụng các chỉ dẫn FPA, còn %B thì không" +#: elf32-arm.c:10345 +msgid "error: %B uses FPA instructions, whereas %B does not" +msgstr "lỗi: %B sử dụng chỉ dẫn FPA, còn %B thì không" -#: elf32-arm.c:8591 -msgid "ERROR: %B uses Maverick instructions, whereas %B does not" -msgstr "LỖI: %B sử dụng các chỉ dẫn Maverick, còn %B thì không" +#: elf32-arm.c:10355 +msgid "error: %B uses Maverick instructions, whereas %B does not" +msgstr "lỗi: %B sử dụng chỉ dẫn Maverick, còn %B thì không" -#: elf32-arm.c:8595 -msgid "ERROR: %B does not use Maverick instructions, whereas %B does" -msgstr "LỖI: %B không sử dụng các chỉ dẫn Maverick, còn %B thì có" +#: elf32-arm.c:10359 +msgid "error: %B does not use Maverick instructions, whereas %B does" +msgstr "lỗi: %B không sử dụng chỉ dẫn Maverick, còn %B thì có" -#: elf32-arm.c:8614 -msgid "ERROR: %B uses software FP, whereas %B uses hardware FP" -msgstr "LỖI: %B sử dụng FP phần mềm, còn %B sử dụng FP phần cứng" +#: elf32-arm.c:10378 +msgid "error: %B uses software FP, whereas %B uses hardware FP" +msgstr "lỗi: %B sử dụng FP phần mềm, còn %B sử dụng FP phần cứng" -#: elf32-arm.c:8618 -msgid "ERROR: %B uses hardware FP, whereas %B uses software FP" -msgstr "LỖI: %B sử dụng FP phần cứng, còn %B sử dụng FP phần mềm" +#: elf32-arm.c:10382 +msgid "error: %B uses hardware FP, whereas %B uses software FP" +msgstr "lỗi: %B sử dụng FP phần cứng, còn %B sử dụng FP phần mềm" #. Ignore init flag - it may not be set, despite the flags field #. containing valid data. #. Ignore init flag - it may not be set, despite the flags field containing valid data. -#: elf32-arm.c:8665 elf32-bfin.c:4899 elf32-cris.c:3235 elf32-m68hc1x.c:1279 -#: elf32-m68k.c:774 elf32-score.c:3750 elf32-vax.c:538 elfxx-mips.c:12699 +#: elf32-arm.c:10429 elf32-bfin.c:5082 elf32-cris.c:4110 elf32-m68hc1x.c:1280 +#: elf32-m68k.c:1169 elf32-score.c:4039 elf32-score7.c:3876 elf32-vax.c:540 +#: elfxx-mips.c:12755 #, c-format msgid "private flags = %lx:" msgstr "các cờ riêng = %lx:" -#: elf32-arm.c:8674 +#: elf32-arm.c:10438 #, c-format msgid " [interworking enabled]" msgstr " [ảnh hưởng lẫn nhau đã bật]" -#: elf32-arm.c:8682 +#: elf32-arm.c:10446 #, c-format msgid " [VFP float format]" msgstr " [Định dạng trôi VFP]" -#: elf32-arm.c:8684 +#: elf32-arm.c:10448 #, c-format msgid " [Maverick float format]" msgstr " [Định dạng trôi Maverick]" -#: elf32-arm.c:8686 +#: elf32-arm.c:10450 #, c-format msgid " [FPA float format]" msgstr " [Định dạng trôi FPA]" -#: elf32-arm.c:8695 +#: elf32-arm.c:10459 #, c-format msgid " [new ABI]" msgstr " [ABI mới]" -#: elf32-arm.c:8698 +#: elf32-arm.c:10462 #, c-format msgid " [old ABI]" msgstr " [ABI cũ]" -#: elf32-arm.c:8701 +#: elf32-arm.c:10465 #, c-format msgid " [software FP]" msgstr " [FP phần mềm]" -#: elf32-arm.c:8710 +#: elf32-arm.c:10474 #, c-format msgid " [Version1 EABI]" msgstr " [EABI phiên bản 1]" -#: elf32-arm.c:8713 elf32-arm.c:8724 +#: elf32-arm.c:10477 elf32-arm.c:10488 #, c-format msgid " [sorted symbol table]" msgstr " [bảng ký hiệu đã sắp xếp]" -#: elf32-arm.c:8715 elf32-arm.c:8726 +#: elf32-arm.c:10479 elf32-arm.c:10490 #, c-format msgid " [unsorted symbol table]" msgstr " [bảng ký hiệu chưa sắp xếp]" -#: elf32-arm.c:8721 +#: elf32-arm.c:10485 #, c-format msgid " [Version2 EABI]" msgstr " [EABI phiên bản 2]" -#: elf32-arm.c:8729 +#: elf32-arm.c:10493 #, c-format msgid " [dynamic symbols use segment index]" msgstr " [các ký hiệu động sử dụng chỉ mục đoạn]" -#: elf32-arm.c:8732 +#: elf32-arm.c:10496 #, c-format msgid " [mapping symbols precede others]" msgstr " [ký hiệu ánh xạ đứng trước]" -#: elf32-arm.c:8739 +#: elf32-arm.c:10503 #, c-format msgid " [Version3 EABI]" msgstr " [EABI phiên bản 3]" -#: elf32-arm.c:8743 +#: elf32-arm.c:10507 #, c-format msgid " [Version4 EABI]" msgstr " [EABI phiên bản 4]" -#: elf32-arm.c:8747 +#: elf32-arm.c:10511 #, c-format msgid " [Version5 EABI]" msgstr " [EABI phiên bản 5]" -#: elf32-arm.c:8750 +#: elf32-arm.c:10514 #, c-format msgid " [BE8]" msgstr " [BE8]" -#: elf32-arm.c:8753 +#: elf32-arm.c:10517 #, c-format msgid " [LE8]" msgstr " [LE8]" -#: elf32-arm.c:8759 +#: elf32-arm.c:10523 #, c-format msgid " " msgstr "" -#: elf32-arm.c:8766 +#: elf32-arm.c:10530 #, c-format msgid " [relocatable executable]" msgstr " [tập tin có thể thực hiện và định vị lại]" -#: elf32-arm.c:8769 +#: elf32-arm.c:10533 #, c-format msgid " [has entry point]" msgstr " [có điểm vào]" -#: elf32-arm.c:8774 +#: elf32-arm.c:10538 #, c-format msgid "" msgstr "" -#: elf32-arm.c:9013 elf32-i386.c:1236 elf32-s390.c:1006 elf32-xtensa.c:999 -#: elf64-s390.c:961 elf64-x86-64.c:1016 elfxx-sparc.c:1127 +#: elf32-arm.c:10783 elf32-i386.c:1300 elf32-s390.c:998 elf32-xtensa.c:1000 +#: elf64-s390.c:952 elf64-x86-64.c:1082 elfxx-sparc.c:1121 msgid "%B: bad symbol index: %d" msgstr "%B: chỉ mục ký hiệu sai: %d" -#: elf32-arm.c:10125 +#: elf32-arm.c:10904 elf64-x86-64.c:1242 elf64-x86-64.c:1411 elfxx-mips.c:7870 +msgid "%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC" +msgstr "%B: định vị lại %s so với « %s » không thể được dùng khi tạo một đối tượng chia sẻ; hãy biên dịch lại với « -fPIC »" + +#: elf32-arm.c:11893 #, c-format msgid "Errors encountered processing file %s" msgstr "Gặp lỗi khi xử lý tập tin %s" -#: elf32-arm.c:11526 elf32-arm.c:11548 +#: elf32-arm.c:13339 +msgid "%B: error: Cortex-A8 erratum stub is allocated in unsafe location" +msgstr "%B: lỗi: mẩu mục lỗi Cortex-A8 được cấp phát ở vị trí không an toàn" + +#. There's not much we can do apart from complain if this +#. happens. +#: elf32-arm.c:13366 +msgid "%B: error: Cortex-A8 erratum stub out of range (input file too large)" +msgstr "%B: lỗi: mẩu mục lỗi Cortex-A8 ở ngoại phạm vi (tập tin nhập quá dài)" + +#: elf32-arm.c:13457 elf32-arm.c:13479 msgid "%B: error: VFP11 veneer out of range" msgstr "%B: lỗi: lớp gỗ mặt VFP11 ở ngoại phạm vi" -#: elf32-avr.c:1258 elf32-bfin.c:3222 elf32-cris.c:1546 elf32-fr30.c:624 +#: elf32-avr.c:1259 elf32-bfin.c:3208 elf32-cris.c:2097 elf32-fr30.c:624 #: elf32-frv.c:4122 elf32-i860.c:1226 elf32-ip2k.c:1510 elf32-iq2000.c:699 -#: elf32-m32c.c:568 elf32-mep.c:549 elf32-msp430.c:501 elf32-mt.c:406 -#: elf32-openrisc.c:419 elf32-v850.c:1711 elf32-xstormy16.c:956 +#: elf32-m32c.c:568 elf32-mep.c:549 elf32-moxie.c:299 elf32-msp430.c:501 +#: elf32-mt.c:406 elf32-openrisc.c:419 elf32-v850.c:1709 elf32-xstormy16.c:956 #: elf64-mmix.c:1541 msgid "internal error: dangerous relocation" msgstr "lỗi nội bộ : định vị lại nguy hiểm" -#: elf32-avr.c:2396 elf32-hppa.c:605 elf32-m68hc1x.c:164 elf64-ppc.c:3983 +#: elf32-avr.c:2409 elf32-hppa.c:605 elf32-m68hc1x.c:165 elf64-ppc.c:4141 msgid "%B: cannot create stub entry %s" msgstr "%B: không thể tạo mục nhập mẩu %s" -#: elf32-bfin.c:1585 +#: elf32-bfin.c:1581 msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'" msgstr "%B(%A+0x%lx): định vị lại không thể giải quyết đối với ký hiệu « %s »" -#: elf32-bfin.c:1618 elf32-i386.c:3623 elf32-m68k.c:3557 elf32-s390.c:3110 -#: elf64-s390.c:3071 elf64-x86-64.c:3278 +#: elf32-bfin.c:1614 elf32-i386.c:4026 elf32-m68k.c:4176 elf32-s390.c:3067 +#: elf64-s390.c:3026 elf64-x86-64.c:3697 msgid "%B(%A+0x%lx): reloc against `%s': error %d" msgstr "%B(%A+0x%lx): định vị lại đối với « %s »: lỗi %d" -#: elf32-bfin.c:2711 +#: elf32-bfin.c:2714 msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend" msgstr "%B: định vị lại ở « %A+0x%x » tham chiếu đến ký hiệu « %s » với số hạng khác không" -#: elf32-bfin.c:2725 elf32-frv.c:2904 +#: elf32-bfin.c:2728 elf32-frv.c:2904 msgid "relocation references symbol not defined in the module" msgstr "định vị lại tham chiếu đến ký hiệu không được định nghĩa trong mô-đun" -#: elf32-bfin.c:2822 +#: elf32-bfin.c:2825 msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend" msgstr "R_FRV_FUNCDESC tham chiếu đến ký hiệu động với số hạng khác không" -#: elf32-bfin.c:2861 elf32-bfin.c:2987 elf32-frv.c:3641 elf32-frv.c:3762 +#: elf32-bfin.c:2866 elf32-bfin.c:2989 elf32-frv.c:3641 elf32-frv.c:3762 msgid "cannot emit fixups in read-only section" msgstr "Không thể phát ra sự sửa chữa trong phần chỉ đọc" -#: elf32-bfin.c:2889 elf32-bfin.c:3036 elf32-frv.c:3672 elf32-frv.c:3806 +#: elf32-bfin.c:2897 elf32-bfin.c:3027 elf32-frv.c:3672 elf32-frv.c:3806 +#: elf32-lm32.c:1104 msgid "cannot emit dynamic relocations in read-only section" msgstr "không thể phát ra định vị lại động trong phần chỉ đọc" -#: elf32-bfin.c:2945 +#: elf32-bfin.c:2947 msgid "R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend" msgstr "R_FRV_FUNCDESC_VALUE tham chiếu đến ký hiệu động với số hạng khác không" -#: elf32-bfin.c:3126 +#: elf32-bfin.c:3112 msgid "relocations between different segments are not supported" msgstr "không hỗ trợ định vị lại giữa các đoạn khác nhau" -#: elf32-bfin.c:3127 +#: elf32-bfin.c:3113 msgid "warning: relocation references a different segment" msgstr "cảnh báo : định vị lại tham chiếu đến một đoạn khác" -#: elf32-bfin.c:4791 elf32-frv.c:6404 +#: elf32-bfin.c:4974 elf32-frv.c:6408 msgid "%B: unsupported relocation type %i" msgstr "%B: kiểu định vị lại không được hỗ trợ %i" -#: elf32-bfin.c:4944 elf32-frv.c:6812 +#: elf32-bfin.c:5127 elf32-frv.c:6816 #, c-format msgid "%s: cannot link non-fdpic object file into fdpic executable" msgstr "%s: không thể liên kết tập tin đối tượng khác fdpic vào tập tin fdpic có thể thực hiện" -#: elf32-bfin.c:4948 elf32-frv.c:6816 +#: elf32-bfin.c:5131 elf32-frv.c:6820 #, c-format msgid "%s: cannot link fdpic object file into non-fdpic executable" msgstr "%s: không thể liên kết tập tin đối tượng khác fdpic vào tập tin khác fdpic có thể thực hiện" -#: elf32-cris.c:1060 +#: elf32-cris.c:1169 msgid "%B, section %A: unresolvable relocation %s against symbol `%s'" msgstr "%B, phần %A: định vị lại không thể giải quyết %s đối với ký hiệu « %s »" -#: elf32-cris.c:1129 +#: elf32-cris.c:1238 msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'" msgstr "%B, phần %A: Không có PLT hoặc GOT cho định vị lại %s đối với ký hiệu « %s »" -#: elf32-cris.c:1131 +#: elf32-cris.c:1240 msgid "%B, section %A: No PLT for relocation %s against symbol `%s'" msgstr "%B, phần %A: Không có PLT cho định vị lại %s đối với ký hiệu « %s »" -#: elf32-cris.c:1137 elf32-cris.c:1269 +#: elf32-cris.c:1246 elf32-cris.c:1379 elf32-cris.c:1641 elf32-cris.c:1730 +#: elf32-cris.c:1883 msgid "[whose name is lost]" msgstr "[mất tên của ai]" -#: elf32-cris.c:1255 +#: elf32-cris.c:1365 msgid "%B, section %A: relocation %s with non-zero addend %d against local symbol" msgstr "%B, phần %A: định vị lại %s với số hạng khác không %d đối với ký hiệu cục bộ" -#: elf32-cris.c:1263 +#: elf32-cris.c:1373 elf32-cris.c:1724 elf32-cris.c:1877 msgid "%B, section %A: relocation %s with non-zero addend %d against symbol `%s'" msgstr "%B, phần %A: định vị lại %s với số hạng khác không %d đối với ký hiệu « %s »" -#: elf32-cris.c:1289 +#: elf32-cris.c:1399 msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'" msgstr "%B, phần %A: định vị lại %s không được phép cho ký hiệu toàn cục: « %s »" -#: elf32-cris.c:1305 +#: elf32-cris.c:1415 msgid "%B, section %A: relocation %s with no GOT created" msgstr "%B, phần %A: đã tạo định vị lại %s không có GOT" -#: elf32-cris.c:1423 -msgid "%B: Internal inconsistency; no relocation section %s" -msgstr "%s: Sự mâu thuẫn nội bộ ; không có phần định vị lại %s" +#. We shouldn't get here for GCC-emitted code. +#: elf32-cris.c:1632 +msgid "%B, section %A: relocation %s has an undefined reference to `%s', perhaps a declaration mixup?" +msgstr "%B: phần %A: sự định vị lại $s có một thàm chiếu chưa xác định đến « %s », có thể khai báo không rõ ?" + +#: elf32-cris.c:2010 +msgid "%B, section %A: relocation %s is not allowed for symbol: `%s' which is defined outside the program, perhaps a declaration mixup?" +msgstr "%B, phần %A: sự định vị lại %s không được phép cho ký hiệu « %s » mà được xác định bên ngoài chương trình, có thể khai báo không rõ ?" -#: elf32-cris.c:2510 +#: elf32-cris.c:2063 +msgid "(too many global variables for -fpic: recompile with -fPIC)" +msgstr "(quá nhiều biến toàn cục đối với « -fpic »: hãy biên dịch lại với « -fPIC »)" + +#: elf32-cris.c:2070 +msgid "(thread-local data too big for -fpic or -msmall-tls: recompile with -fPIC or -mno-small-tls)" +msgstr "(dữ liệu cục bộ với mạch cũng quá lớn đối với « fpic » hoặc « -msmall-tls »: hãy biên dịch lại với « -fPIC » hay « -mno-small-tls »)" + +#: elf32-cris.c:3204 msgid "" "%B, section %A:\n" " v10/v32 compatible object %s must not contain a PIC relocation" @@ -1269,46 +1338,62 @@ msgstr "" "%B, phần %A:\n" " đối tượng tương thích v10/v32 %s không được chứa định vị lại PIC" -#: elf32-cris.c:2697 elf32-cris.c:2765 +#: elf32-cris.c:3309 +msgid "" +"%B, section %A:\n" +" relocation %s not valid in a shared object; typically an option mixup, recompile with -fPIC" +msgstr "" +"%B, phần %A:\n" +" không được sử dụng sự định vị lại %s trong một đối tượng chia sẻ; bình thường do khai báo không rõ, hãy biên dịch lại với « -fPIC »" + +#: elf32-cris.c:3523 msgid "" "%B, section %A:\n" " relocation %s should not be used in a shared object; recompile with -fPIC" msgstr "" "%B, phần %A:\n" -" không được sử dụng định vị lại %s trong một đối tượng chia sẻ; hãy biên dịch lại với -fPIC" +" không được sử dụng sự định vị lại %s trong một đối tượng chia sẻ; hãy biên dịch lại với « -fPIC »" + +#: elf32-cris.c:3940 +msgid "" +"%B, section `%A', to symbol `%s':\n" +" relocation %s should not be used in a shared object; recompile with -fPIC" +msgstr "" +"%B, phần « %A », tới ký hiệu « %s »:\n" +" không được sử dụng sự định vị lại %s trong một đối tượng chia sẻ; hãy biên dịch lại với « -fPIC »" -#: elf32-cris.c:3184 +#: elf32-cris.c:4059 msgid "Unexpected machine number" msgstr "Số thứ tự máy bất thường" -#: elf32-cris.c:3238 +#: elf32-cris.c:4113 #, c-format msgid " [symbols have a _ prefix]" msgstr " [ký hiệu có một tiền tố _]" -#: elf32-cris.c:3241 +#: elf32-cris.c:4116 #, c-format msgid " [v10 and v32]" msgstr " [v10 và v32]" -#: elf32-cris.c:3244 +#: elf32-cris.c:4119 #, c-format msgid " [v32]" msgstr " [v32]" -#: elf32-cris.c:3289 +#: elf32-cris.c:4164 msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols" msgstr "%B: dùng ký hiệu tiền tố _, nhưng đang ghi tập tin với ký hiệu không phải tiền tố" -#: elf32-cris.c:3290 +#: elf32-cris.c:4165 msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols" msgstr "%B: dùng ký hiệu không phải tiền tố, nhưng đang ghi tập tin với ký hiệu có tiền tố _" -#: elf32-cris.c:3309 +#: elf32-cris.c:4184 msgid "%B contains CRIS v32 code, incompatible with previous objects" msgstr "%B chứa mã CRIS v32, không tương thích với các đối tượng trước" -#: elf32-cris.c:3311 +#: elf32-cris.c:4186 msgid "%B contains non-CRIS-v32 code, incompatible with previous objects" msgstr "%B chứa mã khác CRIS v32, không tương thích với các đối tượng trước" @@ -1384,22 +1469,22 @@ msgstr "%B(%A+0x%lx): định vị lại đối với « %s »: %s" msgid "relocation references a different segment" msgstr "định vị lại tham chiếu đến một đoạn khác" -#: elf32-frv.c:6726 +#: elf32-frv.c:6730 #, c-format msgid "%s: compiled with %s and linked with modules that use non-pic relocations" msgstr "%s: biên dịch với %s và liên kết với môđun sử dụng định vị lại khác pic" -#: elf32-frv.c:6779 elf32-iq2000.c:852 elf32-m32c.c:814 +#: elf32-frv.c:6783 elf32-iq2000.c:852 elf32-m32c.c:814 #, c-format msgid "%s: compiled with %s and linked with modules compiled with %s" msgstr "%s: biên dịch với %s và liên kết với môđun biên dịch với %s" -#: elf32-frv.c:6791 +#: elf32-frv.c:6795 #, c-format msgid "%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "%s: sử dụng trường e_flags không rõ (0x%lx) khác với mođun trước (0x%lx)" -#: elf32-frv.c:6841 elf32-iq2000.c:889 elf32-m32c.c:850 elf32-mt.c:583 +#: elf32-frv.c:6845 elf32-iq2000.c:889 elf32-m32c.c:850 elf32-mt.c:583 #, c-format msgid "private flags = 0x%lx:" msgstr "các cờ riêng = 0x%lx:" @@ -1408,79 +1493,73 @@ msgstr "các cờ riêng = 0x%lx:" msgid "%B: Relocations in generic ELF (EM: %d)" msgstr "%B: Định vị lại trong ELF chung (EM: %d)" -#: elf32-hppa.c:854 elf32-hppa.c:3600 +#: elf32-hppa.c:854 elf32-hppa.c:3570 msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections" msgstr "%B(%A+0x%lx): không thể tới %s, hãy biên dịch lại với « -ffunction-sections »" -#: elf32-hppa.c:1263 +#: elf32-hppa.c:1286 msgid "%B: relocation %s can not be used when making a shared object; recompile with -fPIC" msgstr "%B: không dùng được định vị lại %s khi tạo một đối tượng chia sẽ, hãy biên dịch lại với « -fPIC »" -#: elf32-hppa.c:1518 -#, c-format -msgid "Could not find relocation section for %s" -msgstr "Không tìm thấy phần định vị lại cho %s" - -#: elf32-hppa.c:2810 +#: elf32-hppa.c:2780 msgid "%B: duplicate export stub %s" msgstr "%B: mẩu xuất trùng %s" -#: elf32-hppa.c:3436 +#: elf32-hppa.c:3406 msgid "%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link" msgstr "%B(%A+0x%lx): %s sự sửa chữa cho chỉ dẫn 0x%x không được hỗ trợ trong một liên kết không chia sẻ" -#: elf32-hppa.c:4290 +#: elf32-hppa.c:4260 msgid "%B(%A+0x%lx): cannot handle %s for %s" msgstr "%B(%A+0x%lx): không thể xử lý %s cho %s" -#: elf32-hppa.c:4597 +#: elf32-hppa.c:4567 msgid ".got section not immediately after .plt section" msgstr "Phần .got không nằm ngay sau phần .pit" -#: elf32-i386.c:362 elf32-ppc.c:1616 elf32-s390.c:379 elf64-ppc.c:2153 -#: elf64-s390.c:403 elf64-x86-64.c:222 +#: elf32-i386.c:371 elf32-ppc.c:1666 elf32-s390.c:379 elf64-ppc.c:2283 +#: elf64-s390.c:403 elf64-x86-64.c:234 msgid "%B: invalid relocation type %d" msgstr "%B: kiểu định vị lại không hợp lệ %d" -#: elf32-i386.c:1183 elf64-x86-64.c:964 +#: elf32-i386.c:1246 elf64-x86-64.c:1029 msgid "%B: TLS transition from %s to %s against `%s' at 0x%lx in section `%A' failed" msgstr "%B: không thành công chuyển tiếp TLS từ %s sang %s đối với « %s » ở 0x%lx trong phần « %A »" -#: elf32-i386.c:1364 elf32-s390.c:1188 elf32-sh.c:5098 elf32-xtensa.c:1162 -#: elf64-s390.c:1152 elfxx-sparc.c:1263 +#: elf32-i386.c:1387 elf32-i386.c:2970 elf64-x86-64.c:1171 elf64-x86-64.c:2680 +msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' isn't handled by %s" +msgstr "%B: sự định vị lại %s đối với ký hiệu STT_GNU_IFUNC « %s » không phải được %s quản lý" + +#: elf32-i386.c:1548 elf32-s390.c:1180 elf32-sh.c:5065 elf32-xtensa.c:1173 +#: elf64-s390.c:1143 elfxx-sparc.c:1257 msgid "%B: `%s' accessed both as normal and thread local symbol" msgstr "%B: đã truy cập « %s » theo ký hiệu cả hai kiểu bình thường và cục bộ cho mạch" -#: elf32-i386.c:1479 elf32-s390.c:1297 elf64-ppc.c:5046 elf64-s390.c:1264 -#: elf64-x86-64.c:1299 -msgid "%B: bad relocation section name `%s'" -msgstr "%B: tên phần định vị lại sai « %s »" - -#: elf32-i386.c:2598 +#: elf32-i386.c:2805 msgid "%B: unrecognized relocation (0x%x) in section `%A'" msgstr "%B: định vị lại không được nhận ra (0x%x) trong phần « %A »" -#: elf32-i386.c:2822 elf64-x86-64.c:2660 +#: elf32-i386.c:3219 elf64-x86-64.c:3081 msgid "hidden symbol" msgstr "ký hiệu bị ẩn" -#: elf32-i386.c:2825 elf64-x86-64.c:2663 +#: elf32-i386.c:3222 elf64-x86-64.c:3084 msgid "internal symbol" msgstr "ký hiệu nội bộ" -#: elf32-i386.c:2828 elf64-x86-64.c:2666 +#: elf32-i386.c:3225 elf64-x86-64.c:3087 msgid "protected symbol" msgstr "ký hiệu bị bảo vệ" -#: elf32-i386.c:2831 elf64-x86-64.c:2669 +#: elf32-i386.c:3228 elf64-x86-64.c:3090 msgid "symbol" msgstr "ký hiệu" -#: elf32-i386.c:2836 +#: elf32-i386.c:3233 msgid "%B: relocation R_386_GOTOFF against undefined %s `%s' can not be used when making a shared object" msgstr "%B: không dùng được định vị lại R_386_GOTOFF đối với %s chưa xác định « %s » khi tạo một đối tượng chia sẻ" -#: elf32-i386.c:2846 +#: elf32-i386.c:3243 msgid "%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object" msgstr "%B: không dùng được định vị lại R_386_GOTOFF đối với hàm số đã bảo vệ « %s » khi tạo một đối tượng chia sẻ" @@ -1512,125 +1591,141 @@ msgstr "gặp định vị lại không được hỗ trợ giữa vùng địa msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "%s: sử dụng trường e_flags (0x%lx) khác với mo-đun trước (0x%lx)" +#: elf32-lm32.c:698 +msgid "global pointer relative relocation when _gp not defined" +msgstr "có định vị lại tương đối với con trỏ toàn cục khi chưa xác định _gp" + +#: elf32-lm32.c:753 +msgid "global pointer relative address out of range" +msgstr "địa chỉ tương đối với con trỏ toàn cục vẫn ở ngoại phạm vi" + +#: elf32-lm32.c:1058 +msgid "internal error: addend should be zero for R_LM32_16_GOT" +msgstr "lỗi nội bộ : phần cộng nên là số không cho R_LM32_16_GOT" + #: elf32-m32r.c:1453 msgid "SDA relocation when _SDA_BASE_ not defined" msgstr "định vị lại SDA khi chưa xác định _SDA_BASE_" -#: elf32-m32r.c:3061 +#: elf32-m32r.c:3039 msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)" msgstr "%B: Đích (%s) của một định vị lại %s nằm trong phần sai (%A)" -#: elf32-m32r.c:3589 +#: elf32-m32r.c:3567 msgid "%B: Instruction set mismatch with previous modules" msgstr "%B: Bộ chỉ dẫn không tương ứng với các mô-đun trước" -#: elf32-m32r.c:3610 +#: elf32-m32r.c:3588 #, c-format msgid "private flags = %lx" msgstr "các cờ riêng — %lx" -#: elf32-m32r.c:3615 +#: elf32-m32r.c:3593 #, c-format msgid ": m32r instructions" msgstr ": chỉ dẫn m32r" -#: elf32-m32r.c:3616 +#: elf32-m32r.c:3594 #, c-format msgid ": m32rx instructions" msgstr ": chỉ dẫn m32rx" -#: elf32-m32r.c:3617 +#: elf32-m32r.c:3595 #, c-format msgid ": m32r2 instructions" msgstr ": chỉ dẫn m32r2" -#: elf32-m68hc1x.c:1047 +#: elf32-m68hc1x.c:1048 #, c-format msgid "Reference to the far symbol `%s' using a wrong relocation may result in incorrect execution" msgstr "Tham chiếu đến ký hiệu ở xa « %s » khi sử dụng một định vị lại sai thì có thể dẫn đến sự thực hiện sai" -#: elf32-m68hc1x.c:1070 +#: elf32-m68hc1x.c:1071 #, c-format msgid "banked address [%lx:%04lx] (%lx) is not in the same bank as current banked address [%lx:%04lx] (%lx)" msgstr "địa chỉ đã đặt vào khối nhớ [%lx:%04lx] (%lx) không trong cùng khối nhớ với địa chỉ được đặt hiện thời vào khối nhớ [%lx:%04lx] (%lx)" -#: elf32-m68hc1x.c:1089 +#: elf32-m68hc1x.c:1090 #, c-format msgid "reference to a banked address [%lx:%04lx] in the normal address space at %04lx" msgstr "tham chiếu đến một địa chỉ đã đặt vào khối nhớ [%lx:%04lx] trong vùng địa chỉ thông thường tại %04lx" -#: elf32-m68hc1x.c:1222 +#: elf32-m68hc1x.c:1223 msgid "%B: linking files compiled for 16-bit integers (-mshort) and others for 32-bit integers" msgstr "%B: đang liên kết các tập tin được biên dịch cho số nguyên 16 bit (-mshort) và các tập tin khác cho số nguyên 32 bit" -#: elf32-m68hc1x.c:1229 +#: elf32-m68hc1x.c:1230 msgid "%B: linking files compiled for 32-bit double (-fshort-double) and others for 64-bit double" msgstr "%B: đang liên kết các tập tin được biên dịch 32 bit đôi (-mshort) và các tập tin khác cho 64 bit đôi" -#: elf32-m68hc1x.c:1238 +#: elf32-m68hc1x.c:1239 msgid "%B: linking files compiled for HCS12 with others compiled for HC12" msgstr "%B: đang liên kết tập tin được biên dịch cho HCS12 với các tập tin khác biên dịch cho HC12" -#: elf32-m68hc1x.c:1254 elf32-ppc.c:4046 elf64-sparc.c:697 elfxx-mips.c:12561 +#: elf32-m68hc1x.c:1255 elf32-ppc.c:4255 elf64-sparc.c:698 elfxx-mips.c:12617 msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "%B: sử dụng trường e_flags (0x%lx) khác với mo-đun trước (0x%lx)" -#: elf32-m68hc1x.c:1282 +#: elf32-m68hc1x.c:1283 #, c-format msgid "[abi=32-bit int, " msgstr "[abi=số nguyên 32-bit, " -#: elf32-m68hc1x.c:1284 +#: elf32-m68hc1x.c:1285 #, c-format msgid "[abi=16-bit int, " msgstr "[abi=số nguyên 16-bit, " -#: elf32-m68hc1x.c:1287 +#: elf32-m68hc1x.c:1288 #, c-format msgid "64-bit double, " msgstr "64-bit đôi, " -#: elf32-m68hc1x.c:1289 +#: elf32-m68hc1x.c:1290 #, c-format msgid "32-bit double, " msgstr "32-bit đôi, " -#: elf32-m68hc1x.c:1292 +#: elf32-m68hc1x.c:1293 #, c-format msgid "cpu=HC11]" msgstr "cpu=HC11]" -#: elf32-m68hc1x.c:1294 +#: elf32-m68hc1x.c:1295 #, c-format msgid "cpu=HCS12]" msgstr "cpu=HCS12]" -#: elf32-m68hc1x.c:1296 +#: elf32-m68hc1x.c:1297 #, c-format msgid "cpu=HC12]" msgstr "cpu=HC12]" -#: elf32-m68hc1x.c:1299 +#: elf32-m68hc1x.c:1300 #, c-format msgid " [memory=bank-model]" msgstr " [bộ nhớ=chế độ khối]" -#: elf32-m68hc1x.c:1301 +#: elf32-m68hc1x.c:1302 #, c-format msgid " [memory=flat]" msgstr " [bộ nhớ=phẳng]" -#: elf32-m68k.c:789 elf32-m68k.c:790 +#: elf32-m68k.c:1184 elf32-m68k.c:1185 msgid "unknown" msgstr "không rõ" -#: elf32-m68k.c:1216 -msgid "%B: GOT overflow: Number of R_68K_GOT8O relocations > %d" -msgstr "%B: tràn GOT: số các bố trí lại kiểu R_68K_GOT8O > %d" +#: elf32-m68k.c:1645 +msgid "%B: GOT overflow: Number of relocations with 8-bit offset > %d" +msgstr "%B: tràn GOT: số các sự định vị lại với hiệu 8-bit > %d" + +#: elf32-m68k.c:1651 +msgid "%B: GOT overflow: Number of relocations with 8- or 16-bit offset > %d" +msgstr "%B: tràn GOT: số các sự định vị lại với hiệu 8-bit hay 16-bit > %d" -#: elf32-m68k.c:1221 -msgid "%B: GOT overflow: Number of R_68K_GOT8O and R_68K_GOT16O relocations > %d" -msgstr "%B: tràn GOT: số các bố trí lại kiểu R_68K_GOT8O và R_68K_GOT16O > %d" +#: elf32-m68k.c:3902 +msgid "%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted in shared object" +msgstr "%B(%A+0x%lx): R_68K_TLS_LE32 không cho phép định vị lại trong đối tượng chia sẻ" #: elf32-mcore.c:99 elf32-mcore.c:442 msgid "%B: Relocation %s (%d) is not currently supported.\n" @@ -1648,147 +1743,187 @@ msgstr "%B và %B dành cho lõi khác nhau" msgid "%B and %B are for different configurations" msgstr "%B và %B dành cho cấu hình khác nhau" -#: elf32-mep.c:709 +#: elf32-mep.c:708 #, c-format msgid "private flags = 0x%lx" msgstr "các cờ riêng = 0x%lx" -#: elf32-mips.c:1045 elf64-mips.c:2056 elfn32-mips.c:1888 +#: elf32-microblaze.c:737 +#, c-format +msgid "%s: unknown relocation type %d" +msgstr "%s: không rõ loại định vị lại %d" + +#: elf32-microblaze.c:862 elf32-microblaze.c:907 +#, c-format +msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)" +msgstr "%s: Đích (%s) của một sự định vị lại %s nằm trong phần không đúng (%s)" + +#: elf32-microblaze.c:1150 elfxx-sparc.c:2957 +msgid "%B: probably compiled without -fPIC?" +msgstr "%B: rất có thể được biên dịch không có « -fPIC » ?" + +#: elf32-microblaze.c:2086 elflink.c:12444 +msgid "%B: bad relocation section name `%s'" +msgstr "%B: tên phần định vị lại sai « %s »" + +#: elf32-mips.c:1045 elf64-mips.c:2083 elfn32-mips.c:1888 msgid "literal relocation occurs for an external symbol" msgstr "định vị lại nghĩa chữ xảy ra cho một ký hiệu bên ngoài" -#: elf32-mips.c:1085 elf32-score.c:484 elf64-mips.c:2099 elfn32-mips.c:1929 +#: elf32-mips.c:1085 elf32-score.c:580 elf32-score7.c:480 elf64-mips.c:2126 +#: elfn32-mips.c:1929 msgid "32bits gp relative relocation occurs for an external symbol" msgstr "định vị lại tương đối 32-bit gp xảy ra cho một ký hiệu bên ngoài" -#: elf32-ppc.c:1681 +#: elf32-ppc.c:1731 #, c-format msgid "generic linker can't handle %s" msgstr "trình liên kết chung không thể xử lý %s" -#: elf32-ppc.c:2161 +#: elf32-ppc.c:2211 msgid "corrupt or empty %s section in %B" msgstr "Gặp phần %s bị hỏng hoặc còn rỗng trong %B" -#: elf32-ppc.c:2168 +#: elf32-ppc.c:2218 msgid "unable to read in %s section from %B" msgstr "không thể đọc trong phần %s từ %B" -#: elf32-ppc.c:2174 +#: elf32-ppc.c:2224 msgid "corrupt %s section in %B" msgstr "phần %s bị hỏng trong %b" -#: elf32-ppc.c:2217 +#: elf32-ppc.c:2267 msgid "warning: unable to set size of %s section in %B" msgstr "cảnh báo : không thể đặt kích cỡ của phần %s trong %B" -#: elf32-ppc.c:2265 +#: elf32-ppc.c:2315 msgid "failed to allocate space for new APUinfo section." msgstr "lỗi cấp phát sức chứa cho phần thông tin APUinfo mới." -#: elf32-ppc.c:2284 +#: elf32-ppc.c:2334 msgid "failed to compute new APUinfo section." msgstr "lỗi tính phần thông tin APUinfo mới." -#: elf32-ppc.c:2287 +#: elf32-ppc.c:2337 msgid "failed to install new APUinfo section." msgstr "lỗi cài đặt phần thông tin APUinfo mới." -#: elf32-ppc.c:3263 +#: elf32-ppc.c:3364 msgid "%B: relocation %s cannot be used when making a shared object" msgstr "%B: không dùng được định vị lại %s khi tạo một đối tượng chia sẻ" #. It does not make sense to have a procedure linkage #. table entry for a local symbol. -#: elf32-ppc.c:3534 +#: elf32-ppc.c:3723 msgid "%B(%A+0x%lx): %s reloc against local symbol" msgstr "%B(%A+0x%lx): %s định vị lại đối với ký hiệu cục bộ" -#: elf32-ppc.c:3885 elf32-ppc.c:3900 elfxx-mips.c:12268 elfxx-mips.c:12294 -#: elfxx-mips.c:12316 elfxx-mips.c:12342 +#: elf32-ppc.c:4067 elf32-ppc.c:4082 elfxx-mips.c:12324 elfxx-mips.c:12350 +#: elfxx-mips.c:12372 elfxx-mips.c:12398 msgid "Warning: %B uses hard float, %B uses soft float" msgstr "Cảnh báo : %B dùng trôi cứng, còn %B dùng trôi mềm" -#: elf32-ppc.c:3888 elf32-ppc.c:3892 +#: elf32-ppc.c:4070 elf32-ppc.c:4074 msgid "Warning: %B uses double-precision hard float, %B uses single-precision hard float" msgstr "Cảnh báo : %B dùng trôi cứng chính xác đôi, còn %B dùng trôi cứng chính xác đơn" -#: elf32-ppc.c:3896 +#: elf32-ppc.c:4078 msgid "Warning: %B uses soft float, %B uses single-precision hard float" msgstr "Cảnh báo : %B dùng trôi mềm, còn %B dùng trôi cứng chính xác đơn" -#: elf32-ppc.c:3903 elf32-ppc.c:3907 elfxx-mips.c:12248 elfxx-mips.c:12252 +#: elf32-ppc.c:4085 elf32-ppc.c:4089 elfxx-mips.c:12304 elfxx-mips.c:12308 msgid "Warning: %B uses unknown floating point ABI %d" msgstr "Cảnh báo : %B dùng điểm trôi không rõ ABI %d" -#: elf32-ppc.c:3949 elf32-ppc.c:3953 +#: elf32-ppc.c:4131 elf32-ppc.c:4135 msgid "Warning: %B uses unknown vector ABI %d" msgstr "Cảnh báo : %B dùng véc-tơ không nhận ra ABI %d" -#: elf32-ppc.c:3957 +#: elf32-ppc.c:4139 msgid "Warning: %B uses vector ABI \"%s\", %B uses \"%s\"" msgstr "Cảnh báo : %B dùng véc-tơ ABI « %s », còn %B dùng « %s »" -#: elf32-ppc.c:4011 +#: elf32-ppc.c:4156 elf32-ppc.c:4159 +msgid "Warning: %B uses r3/r4 for small structure returns, %B uses memory" +msgstr "Cảnh báo : %B dùng r3/r4 để trả lại cấu trúc nhỏ, %B dùng phần nhớ" + +#: elf32-ppc.c:4162 elf32-ppc.c:4166 +msgid "Warning: %B uses unknown small structure return convention %d" +msgstr "Cảnh báo : %B dùng quy ước trả lại cấu trúc nhỏ không rõ %d" + +#: elf32-ppc.c:4220 msgid "%B: compiled with -mrelocatable and linked with modules compiled normally" msgstr "%B: đã biên dịch với « -mrelocatable » và đã liên kết với các môđun biên dịch bình thường" -#: elf32-ppc.c:4019 +#: elf32-ppc.c:4228 msgid "%B: compiled normally and linked with modules compiled with -mrelocatable" msgstr "%B: đã biên dịch bình thường và đã liên kết với các môđun biên dịch với « -mrelocatable »" -#: elf32-ppc.c:4105 +#: elf32-ppc.c:4314 msgid "Using bss-plt due to %B" msgstr "Đang dùng biss-pit do %B" -#: elf32-ppc.c:6418 elf64-ppc.c:10881 +#: elf32-ppc.c:7056 elf64-ppc.c:11364 msgid "%B: unknown relocation type %d for symbol %s" msgstr "%B: không rõ kiểu định vị lại %d cho ký hiệu %s" -#: elf32-ppc.c:6668 +#: elf32-ppc.c:7316 msgid "%B(%A+0x%lx): non-zero addend on %s reloc against `%s'" msgstr "%B(%A+0x%lx): số hạng khác không trên định vị lại %s đối với « %s »" -#: elf32-ppc.c:7024 elf32-ppc.c:7050 elf32-ppc.c:7109 +#: elf32-ppc.c:7499 elf64-ppc.c:11854 +msgid "%B(%A+0x%lx): relocation %s for indirect function %s unsupported" +msgstr "%B(%A+0x%lx): không hỗ trợ sự định vị lại %s cho hàm gián tiếp %s" + +#: elf32-ppc.c:7709 elf32-ppc.c:7736 elf32-ppc.c:7787 msgid "%B: the target (%s) of a %s relocation is in the wrong output section (%s)" msgstr "%B: đích (%s) của một định vị lại %s nằm trong phần kết xuất không đúng (%s)" -#: elf32-ppc.c:7164 +#: elf32-ppc.c:7847 msgid "%B: relocation %s is not yet supported for symbol %s." msgstr "%B: định vị lại %s chưa được hỗ trợ cho ký hiệu %s." -#: elf32-ppc.c:7272 elf64-ppc.c:11575 +#: elf32-ppc.c:7955 elf64-ppc.c:12110 msgid "%B(%A+0x%lx): %s reloc against `%s': error %d" msgstr "%B(%A+0x%lx): %s định vị lại đối với « %s »: lỗi %d" -#: elf32-s390.c:2246 elf64-s390.c:2220 +#: elf32-ppc.c:8423 +#, c-format +msgid "%s not defined in linker created %s" +msgstr "%s chưa được xác định trong bộ liên kết được tạo %s" + +#: elf32-s390.c:2207 elf64-s390.c:2179 msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s" msgstr "%B(%A+0x%lx): chỉ dẫn không hợp lệ cho định vị lại TLS %s" -#: elf32-score.c:1415 elfxx-mips.c:3273 +#: elf32-score.c:1533 elf32-score7.c:1424 elfxx-mips.c:3299 msgid "not enough GOT space for local GOT entries" msgstr "không đủ sức chứa GOT cho các mục nhập GOT cục bộ" -#: elf32-score.c:2545 +#: elf32-score.c:2765 +msgid "address not word align" +msgstr "địa chỉ không sắp hàng từ" + +#: elf32-score.c:2850 elf32-score7.c:2685 #, c-format msgid "%s: Malformed reloc detected for section %s" msgstr "%s: định vị lại dạng sai được phát hiện cho phần %s" -#: elf32-score.c:2596 +#: elf32-score.c:2901 elf32-score7.c:2736 msgid "%B: CALL15 reloc at 0x%lx not against global symbol" msgstr "%B: CALL15 định vị lại tại 0x%lx không phải so với ký hiệu toàn cục" -#: elf32-score.c:3753 +#: elf32-score.c:4042 elf32-score7.c:3879 #, c-format msgid " [pic]" -msgstr " [pic]" +msgstr " [ảnh]" -#: elf32-score.c:3757 +#: elf32-score.c:4046 elf32-score7.c:3883 #, c-format msgid " [fix dep]" msgstr " [sửa quan hệ phụ thuộc]" -#: elf32-score.c:3799 +#: elf32-score.c:4088 elf32-score7.c:3925 msgid "%B: warning: linking PIC files with non-PIC files" msgstr "%B: cảnh báo : đang liên kết tập tin PIC với tập tin khác PIC" @@ -1800,7 +1935,7 @@ msgstr "%B: chỉ thị IMPORT AS (nhập dạng) cho %s cũng ẩn chỉ thị msgid "%B: Unrecognised .directive command: %s" msgstr "%B: Không nhận ra câu lệnh .directive: %s" -#: elf32-sh-symbian.c:504 +#: elf32-sh-symbian.c:503 msgid "%B: Failed to add renamed symbol %s" msgstr "%B: Lỗi thêm ký hiệu đã đặt tên lại %s" @@ -1836,46 +1971,46 @@ msgstr "%B: 0x%lx: cảnh báo : đếm sai" msgid "%B: 0x%lx: fatal: reloc overflow while relaxing" msgstr "%B: 0x%lx: lỗi nặng: tràn định vị lại trong khi giảm nhẹ" -#: elf32-sh.c:3279 elf64-sh64.c:1526 +#: elf32-sh.c:3270 elf64-sh64.c:1526 msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled" msgstr "Không xử lý được STO_SH5_ISA32 không mong đợi trên ký hiệu cục bộ" -#: elf32-sh.c:3516 +#: elf32-sh.c:3507 msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation" msgstr "%B: 0x%lx: lỗi nặng: có đích nhánh chưa sắp hàng cho định vị lại hỗ trợ giảm nhẹ" -#: elf32-sh.c:3549 elf32-sh.c:3564 +#: elf32-sh.c:3540 elf32-sh.c:3555 msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx" msgstr "%B: 0x%lx: lỗi nặng: định vị lại %s chưa sắp hàng 0x%lx" -#: elf32-sh.c:3578 +#: elf32-sh.c:3569 msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32" msgstr "%B: 0x%lx: lỗi nặng: R_SH_PSHA định vị lại %d không nằm trong phạm vi -32..32" -#: elf32-sh.c:3592 +#: elf32-sh.c:3583 msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32" msgstr "%B: 0x%lx: lỗi nặng: R_SH_PSHL định vị lại %d không nằm trong phạm vi -32..32" -#: elf32-sh.c:5310 elf64-alpha.c:4552 +#: elf32-sh.c:5256 elf64-alpha.c:4525 msgid "%B: TLS local exec code cannot be linked into shared objects" msgstr "%B: mã thực hiện cục bộ TLS không thể được liên kết vào đối tượng chia sẻ" -#: elf32-sh64.c:222 elf64-sh64.c:2345 +#: elf32-sh64.c:222 elf64-sh64.c:2333 #, c-format msgid "%s: compiled as 32-bit object and %s is 64-bit" msgstr "%s: biên dịch như một đối tượng 32-bit và %s là 64-bit" -#: elf32-sh64.c:225 elf64-sh64.c:2348 +#: elf32-sh64.c:225 elf64-sh64.c:2336 #, c-format msgid "%s: compiled as 64-bit object and %s is 32-bit" msgstr "%s: biên dịch như một đối tượng 64-bit và %s là 32-bit" -#: elf32-sh64.c:227 elf64-sh64.c:2350 +#: elf32-sh64.c:227 elf64-sh64.c:2338 #, c-format msgid "%s: object size does not match that of target %s" msgstr "%s: kích cỡ đối tượng không tương ứng với kích cỡ của đích %s" -#: elf32-sh64.c:450 elf64-sh64.c:2888 +#: elf32-sh64.c:450 elf64-sh64.c:2852 #, c-format msgid "%s: encountered datalabel symbol in input" msgstr "%s: gặp ký hiệu nhãn dữ liệu trong dữ liệu nhập vào" @@ -1915,103 +2050,119 @@ msgstr "%B: được biên dịch cho hệ thống 64-bit, còn đích là 32-bi msgid "%B: linking little endian files with big endian files" msgstr "%B: đang liên kết tập tin về cuối nhỏ với tập tin về cuối lớn" -#: elf32-spu.c:607 +#: elf32-spu.c:723 +msgid "%X%P: overlay section %A does not start on a cache line.\n" +msgstr "%X%P: phần phủ %A không bắt đầu ở một dòng nhớ tạm.\n" + +#: elf32-spu.c:731 +msgid "%X%P: overlay section %A is larger than a cache line.\n" +msgstr "%X%P: phần phủ %A lớn hơn một dòng nhớ tạm.\n" + +#: elf32-spu.c:751 +msgid "%X%P: overlay section %A is not in cache area.\n" +msgstr "%X%P: phần phủ %A không phải trong vùng nhớ tạm.\n" + +#: elf32-spu.c:791 msgid "%X%P: overlay sections %A and %A do not start at the same address.\n" msgstr "%X%P: hai phần phủ %A và %A không bắt đầu ở cùng một địa chỉ.\n" -#: elf32-spu.c:805 +#: elf32-spu.c:1015 msgid "warning: call to non-function symbol %s defined in %B" msgstr "cảnh báo : cuộc gọi ký hiệu khác hàm %s được xác định trong %B" -#: elf32-spu.c:1406 +#: elf32-spu.c:1365 +msgid "%A:0x%v lrlive .brinfo (%u) differs from analysis (%u)\n" +msgstr "%A:0x%v lrlive .brinfo (%u) khác với phân tích (%u)\n" + +#: elf32-spu.c:1884 msgid "%B is not allowed to define %s" msgstr "không cho phép %B xác định %s" -#: elf32-spu.c:1453 +#: elf32-spu.c:1892 +#, c-format +msgid "you are not allowed to define %s in a script" +msgstr "không cho phép bạn xác định %s trong một văn lệnh" + +#: elf32-spu.c:1926 #, c-format msgid "%s in overlay section" msgstr "%s trong phần phủ" -#: elf32-spu.c:1469 +#: elf32-spu.c:1955 msgid "overlay stub relocation overflow" msgstr "tràn định vị lại mẩu phủ" -#: elf32-spu.c:1478 elf64-ppc.c:10078 +#: elf32-spu.c:1964 elf64-ppc.c:10441 msgid "stubs don't match calculated size" msgstr "các mẩu không tương ứng với kích cỡ đã tính" -#: elf32-spu.c:1976 +#: elf32-spu.c:2546 #, c-format msgid "warning: %s overlaps %s\n" msgstr "cảnh báo : %s đè lên %s\n" -#: elf32-spu.c:1992 +#: elf32-spu.c:2562 #, c-format msgid "warning: %s exceeds section size\n" msgstr "cảnh báo : %s vượt quá kích cỡ phần\n" -#: elf32-spu.c:2023 +#: elf32-spu.c:2593 msgid "%A:0x%v not found in function table\n" msgstr "%A:0x%v không tìm thấy trong bảng hàm\n" -#: elf32-spu.c:2165 +#: elf32-spu.c:2740 msgid "%B(%A+0x%v): call to non-code section %B(%A), analysis incomplete\n" msgstr "%B(%A+0x%v): gọi phần khác mã %B(%A), chưa phân tích hoàn toàn\n" -#: elf32-spu.c:2339 -#, c-format -msgid "%A link_order not found\n" -msgstr "%A link_order không tìm thấy\n" - -#: elf32-spu.c:2706 +#: elf32-spu.c:3297 #, c-format msgid "Stack analysis will ignore the call from %s to %s\n" msgstr "Tiến trình phân tích đống sẽ bỏ qua cuộc gọi từ %s cho %s\n" -#: elf32-spu.c:3348 +#: elf32-spu.c:3988 msgid " %s: 0x%v\n" msgstr " %s: 0x%v\n" -#: elf32-spu.c:3349 +#: elf32-spu.c:3989 msgid "%s: 0x%v 0x%v\n" msgstr "%s: 0x%v 0x%v\n" -#: elf32-spu.c:3354 +#: elf32-spu.c:3994 msgid " calls:\n" msgstr " cuộc gọi:\n" -#: elf32-spu.c:3362 +#: elf32-spu.c:4002 #, c-format msgid " %s%s %s\n" msgstr " %s%s %s\n" -#: elf32-spu.c:3564 +#: elf32-spu.c:4304 #, c-format msgid "%s duplicated in %s\n" msgstr "%s bị nhân đôi trong %s\n" -#: elf32-spu.c:3568 +#: elf32-spu.c:4308 #, c-format msgid "%s duplicated\n" msgstr "%s bị nhân đôi\n" -#: elf32-spu.c:3575 +#: elf32-spu.c:4315 msgid "sorry, no support for duplicate object files in auto-overlay script\n" msgstr "tiếc là văn lệnh tự động phủ không hỗ trợ tập tin đối tượng tăng đôi\n" -#: elf32-spu.c:3605 +#: elf32-spu.c:4356 msgid "non-overlay size of 0x%v plus maximum overlay size of 0x%v exceeds local store\n" msgstr "kích cỡ khác phủ 0x%v cộng với kích cỡ phủ tối đa 0x%v thì vượt quá kho cục bộ\n" -#: elf32-spu.c:3741 +#: elf32-spu.c:4512 msgid "%B:%A%s exceeds overlay size\n" msgstr "%B:%A%s vượt quá kích cỡ phủ\n" -#: elf32-spu.c:3862 +#: elf32-spu.c:4669 msgid "Stack size for call graph root nodes.\n" msgstr "Kích cỡ đống cho các nút thông tin gốc đồ thị cuộc gọi.\n" -#: elf32-spu.c:3863 +#: elf32-spu.c:4670 msgid "" "\n" "Stack size for functions. Annotations: '*' max stack, 't' tail call\n" @@ -2021,164 +2172,168 @@ msgstr "" " *\tđống tối đa\n" " t\tcuộc gọi đuôi\n" -#: elf32-spu.c:3871 +#: elf32-spu.c:4680 msgid "Maximum stack required is 0x%v\n" msgstr "Đống tối đa cần thiết là 0x%v\n" -#: elf32-spu.c:4067 +#: elf32-spu.c:4771 +msgid "fatal error while creating .fixup" +msgstr "gặp lỗi nghiêm trọng trong khi tạo .fixup" + +#: elf32-spu.c:5009 msgid "%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'" msgstr "%B(%s+0x%lx): không thể giải quyết định vị lại %s so với ký hiệu « %s »" -#: elf32-v850.c:165 +#: elf32-v850.c:163 #, c-format msgid "Variable `%s' cannot occupy in multiple small data regions" msgstr "Biến « %s » không thể chiếm nhiều vùng dữ liệu nhỏ" -#: elf32-v850.c:168 +#: elf32-v850.c:166 #, c-format msgid "Variable `%s' can only be in one of the small, zero, and tiny data regions" msgstr "Biến « %s » chỉ có thể nằm trong một của vùng dữ liệu kiểu nhỏ, số không và rất nhỏ" -#: elf32-v850.c:171 +#: elf32-v850.c:169 #, c-format msgid "Variable `%s' cannot be in both small and zero data regions simultaneously" msgstr "Biến « %s » không thể nằm đồng thời trong cả hai vùng dữ liệu kiểu nhỏ và số không" -#: elf32-v850.c:174 +#: elf32-v850.c:172 #, c-format msgid "Variable `%s' cannot be in both small and tiny data regions simultaneously" msgstr "Biến « %s » không thể nằm đồng thời trong cả hai vùng dữ liệu kiểu nhỏ và rất nhỏ" -#: elf32-v850.c:177 +#: elf32-v850.c:175 #, c-format msgid "Variable `%s' cannot be in both zero and tiny data regions simultaneously" msgstr "Biến « %s » không thể nằm đồng thời trong cả hai vùng dữ liệu kiểu rất nhỏ và số không" -#: elf32-v850.c:480 +#: elf32-v850.c:478 #, c-format msgid "FAILED to find previous HI16 reloc\n" msgstr "LỖI tìm định vị lại HI16 trước\n" -#: elf32-v850.c:1715 +#: elf32-v850.c:1713 msgid "could not locate special linker symbol __gp" msgstr "không tìm thấy ký hiệu liên kết đặc biệt __gp" -#: elf32-v850.c:1719 +#: elf32-v850.c:1717 msgid "could not locate special linker symbol __ep" msgstr "không tìm thấy ký hiệu liên kết đặc biệt __ep" -#: elf32-v850.c:1723 +#: elf32-v850.c:1721 msgid "could not locate special linker symbol __ctbp" msgstr "không tìm thấy ký hiệu liên kết đặc biệt __ctbp" -#: elf32-v850.c:1873 +#: elf32-v850.c:1871 msgid "%B: Architecture mismatch with previous modules" msgstr "%B: sai khớp kiến trúc với mô-đun khác" -#: elf32-v850.c:1892 +#: elf32-v850.c:1890 #, c-format msgid "private flags = %lx: " msgstr "các cờ riêng — %lx: " -#: elf32-v850.c:1897 +#: elf32-v850.c:1895 #, c-format msgid "v850 architecture" msgstr "Kiến trúc v850" -#: elf32-v850.c:1898 +#: elf32-v850.c:1896 #, c-format msgid "v850e architecture" msgstr "Kiến trúc v850e" -#: elf32-v850.c:1899 +#: elf32-v850.c:1897 #, c-format msgid "v850e1 architecture" msgstr "Kiến trúc v850e1" -#: elf32-vax.c:541 +#: elf32-vax.c:543 #, c-format msgid " [nonpic]" msgstr " [khác pic]" -#: elf32-vax.c:544 +#: elf32-vax.c:546 #, c-format msgid " [d-float]" msgstr " [trôi d]" -#: elf32-vax.c:547 +#: elf32-vax.c:549 #, c-format msgid " [g-float]" msgstr " [trôi g]" -#: elf32-vax.c:657 +#: elf32-vax.c:666 #, c-format msgid "%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of %ld" msgstr "%s: cảnh báo : số hạng GOT của %ld cho « %s » không tương ứng với số hạng GOT trước của %ld" -#: elf32-vax.c:1589 +#: elf32-vax.c:1608 #, c-format msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored" msgstr "%s: cảnh báo : số hạng PLT của %d cho « %s » từ phần %s bị bỏ qua" -#: elf32-vax.c:1726 +#: elf32-vax.c:1735 #, c-format msgid "%s: warning: %s relocation against symbol `%s' from %s section" msgstr "%s: cảnh báo : định vị lại %s so với ký hiệu « %s » từ phần %s" -#: elf32-vax.c:1732 +#: elf32-vax.c:1741 #, c-format msgid "%s: warning: %s relocation to 0x%x from %s section" msgstr "%s: cảnh báo : định vị lại %s sang 0x%x từ phần %s" -#: elf32-xstormy16.c:451 elf32-ia64.c:2794 elf64-ia64.c:2794 +#: elf32-xstormy16.c:451 elf32-ia64.c:2791 elf64-ia64.c:2791 msgid "non-zero addend in @fptr reloc" msgstr "số hạng khác không trong định vị lại @fptr" -#: elf32-xtensa.c:911 +#: elf32-xtensa.c:912 msgid "%B(%A): invalid property table" msgstr "%B(%A): bảng thuộc tính sai" -#: elf32-xtensa.c:2734 +#: elf32-xtensa.c:2740 msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)" msgstr "%B(%A+0x%lx): khoảng bù định vị lại ở ngoại phạm vi (kích cỡ=0x%x)" -#: elf32-xtensa.c:2813 elf32-xtensa.c:2934 +#: elf32-xtensa.c:2819 elf32-xtensa.c:2940 msgid "dynamic relocation in read-only section" msgstr "định vị lại động trong vùng chỉ đọc" -#: elf32-xtensa.c:2910 +#: elf32-xtensa.c:2916 msgid "TLS relocation invalid without dynamic sections" msgstr "Định vị lại TLS không hợp lệ mà không có phần động" -#: elf32-xtensa.c:3127 +#: elf32-xtensa.c:3133 msgid "internal inconsistency in size of .got.loc section" msgstr "sự mâu thuẫn nội bộ trong kích cỡ của phần .got.loc" -#: elf32-xtensa.c:3437 +#: elf32-xtensa.c:3443 msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x" msgstr "%B: kiểu máy không tương thích. Kết xuất là 0x%x. Dữ liệu nhập vào là 0x%x." -#: elf32-xtensa.c:4666 elf32-xtensa.c:4674 +#: elf32-xtensa.c:4672 elf32-xtensa.c:4680 msgid "Attempt to convert L32R/CALLX to CALL failed" msgstr "Lỗi thử chuyển đổi L32R/CALLX sang CALL" -#: elf32-xtensa.c:6276 elf32-xtensa.c:6352 elf32-xtensa.c:7468 +#: elf32-xtensa.c:6290 elf32-xtensa.c:6366 elf32-xtensa.c:7486 msgid "%B(%A+0x%lx): could not decode instruction; possible configuration mismatch" msgstr "%B(%A+0x%lx): không thể giải mã chỉ dẫn; có thể sai khớp cấu hình" -#: elf32-xtensa.c:7208 +#: elf32-xtensa.c:7226 msgid "%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch" msgstr "%B(%A+0x%lx): không thể giải mã chỉ dẫn cho định vị lại XTENSA_ASM_SIMPLIFY; có thể sai khớp cấu hình" -#: elf32-xtensa.c:8969 +#: elf32-xtensa.c:8987 msgid "invalid relocation address" msgstr "địa chỉ định vị lại không hợp lệ" -#: elf32-xtensa.c:9018 +#: elf32-xtensa.c:9036 msgid "overflow after relaxation" msgstr "tràn sau khi giảm nhẹ" -#: elf32-xtensa.c:10154 +#: elf32-xtensa.c:10167 msgid "%B(%A+0x%lx): unexpected fix for %s relocation" msgstr "%B(%A+0x%lx): sửa chữa bất thường cho định vị lại %s" @@ -2186,51 +2341,55 @@ msgstr "%B(%A+0x%lx): sửa chữa bất thường cho định vị lại %s" msgid "GPDISP relocation did not find ldah and lda instructions" msgstr "Định vị lại GPDISP không tìm thấy các chỉ dẫn ldah và lda" -#: elf64-alpha.c:2416 +#: elf64-alpha.c:2389 msgid "%B: .got subsegment exceeds 64K (size %d)" msgstr "%B: đoạn phụ .got vượt quá 64 K (kích cỡ %d)" -#: elf64-alpha.c:4296 elf64-alpha.c:4308 +#: elf64-alpha.c:4269 elf64-alpha.c:4281 msgid "%B: gp-relative relocation against dynamic symbol %s" msgstr "%B: định vị lại tương đối với gp (gp-relative) so với ký hiệu động %s" -#: elf64-alpha.c:4334 elf64-alpha.c:4469 +#: elf64-alpha.c:4307 elf64-alpha.c:4442 msgid "%B: pc-relative relocation against dynamic symbol %s" msgstr "%B: định vị lại tương đối với pc (pc-relative) so với ký hiệu động %s" -#: elf64-alpha.c:4362 +#: elf64-alpha.c:4335 msgid "%B: change in gp: BRSGP %s" msgstr "%B: thay đổi trong gp: BRSGP %s" -#: elf64-alpha.c:4387 +#: elf64-alpha.c:4360 msgid "" msgstr "" -#: elf64-alpha.c:4392 +#: elf64-alpha.c:4365 msgid "%B: !samegp reloc against symbol without .prologue: %s" msgstr "%B: định vị lại !samegp so với ký hiệu không có .prologue: %s" -#: elf64-alpha.c:4444 +#: elf64-alpha.c:4417 msgid "%B: unhandled dynamic relocation against %s" msgstr "%B: không xử lý được định vị lại động so với %s" -#: elf64-alpha.c:4476 +#: elf64-alpha.c:4449 msgid "%B: pc-relative relocation against undefined weak symbol %s" msgstr "%B: định vị lại tương đối với pc (pc-relative) so với ký hiệu yếu chưa được xác định %s" -#: elf64-alpha.c:4536 +#: elf64-alpha.c:4509 msgid "%B: dtp-relative relocation against dynamic symbol %s" msgstr "%B: định vị lại tương đối với dtp (dtp-relative) so với ký hiệu động %s" -#: elf64-alpha.c:4559 +#: elf64-alpha.c:4532 msgid "%B: tp-relative relocation against dynamic symbol %s" msgstr "%B: định vị lại tương đối với tp (tp-relative) so với ký hiệu động %s" -#: elf64-hppa.c:2071 +#: elf64-hppa.c:2091 #, c-format msgid "stub entry for %s cannot load .plt, dp offset = %ld" msgstr "mục nhập mẩu cho %s không thể nạp .plt, khoảng bù dp = %ld" +#: elf64-hppa.c:3273 +msgid "%B(%A+0x%lx): cannot reach %s" +msgstr "%B(%A+0x%lx): không thể tới %s" + #: elf64-mmix.c:1177 #, c-format msgid "" @@ -2293,65 +2452,65 @@ msgstr "" "Sự mâu thuẫn nội bộ : còn lại %u != tối đa %u.\n" " Hãy thông báo lỗi này." -#: elf64-ppc.c:2561 libbfd.c:978 +#: elf64-ppc.c:2691 libbfd.c:978 msgid "%B: compiled for a big endian system and target is little endian" msgstr "%B: được biên dịch cho một hệ thống về cuối lớn, còn đích về cuối nhỏ" -#: elf64-ppc.c:2564 libbfd.c:980 +#: elf64-ppc.c:2694 libbfd.c:980 msgid "%B: compiled for a little endian system and target is big endian" msgstr "%B: được biên dịch cho một hệ thống về cuối nhỏ, còn đích về cuối lớn" -#: elf64-ppc.c:6065 +#: elf64-ppc.c:6338 #, c-format msgid "copy reloc against `%s' requires lazy plt linking; avoid setting LD_BIND_NOW=1 or upgrade gcc" msgstr "định vị lại sao chép so với « %s » thì cần thiết chức năng liên kết plt uể oải; hãy tránh đặtLD_BIND_NOW=1, hoặc nân cấp GCC" -#: elf64-ppc.c:6486 +#: elf64-ppc.c:6767 msgid "dynreloc miscount for %B, section %A" msgstr "sai đếm định vị lại động cho %B, phần %A" -#: elf64-ppc.c:6570 +#: elf64-ppc.c:6851 msgid "%B: .opd is not a regular array of opd entries" msgstr "%B: .opd không phải là một mảng chính quy các mục nhập opd" -#: elf64-ppc.c:6579 +#: elf64-ppc.c:6860 msgid "%B: unexpected reloc type %u in .opd section" msgstr "%B: gặp kiểu định vị lại bất thường %u trong phần .opd" -#: elf64-ppc.c:6600 +#: elf64-ppc.c:6881 msgid "%B: undefined sym `%s' in .opd section" msgstr "%B: gặp sym (liên kết mềm?) chưa được xác định « %s » trong phần .opd" -#: elf64-ppc.c:7377 elf64-ppc.c:7754 +#: elf64-ppc.c:7640 elf64-ppc.c:8017 #, c-format msgid "%s defined in removed toc entry" msgstr "%s được xác định trong mục nhập toc bị gỡ bỏ" -#: elf64-ppc.c:8581 +#: elf64-ppc.c:8910 #, c-format msgid "long branch stub `%s' offset overflow" msgstr "mẩu nhánh dài « %s » tràn khoảng bù" -#: elf64-ppc.c:8640 +#: elf64-ppc.c:8969 #, c-format msgid "can't find branch stub `%s'" msgstr "không tìm thấy mẩu nhánh « %s »" -#: elf64-ppc.c:8702 elf64-ppc.c:8822 +#: elf64-ppc.c:9031 elf64-ppc.c:9169 #, c-format msgid "linkage table error against `%s'" msgstr "lỗi bảng liên kết so với « %s »" -#: elf64-ppc.c:8978 +#: elf64-ppc.c:9326 #, c-format msgid "can't build branch stub `%s'" msgstr "không thể xây dựng mẩu nhánh « %s »" -#: elf64-ppc.c:9451 +#: elf64-ppc.c:9799 msgid "%B section %A exceeds stub group size" msgstr "%B phần %A vượt quá kích cỡ nhóm mẩu" -#: elf64-ppc.c:10090 +#: elf64-ppc.c:10453 #, c-format msgid "" "linker stubs in %u group%s\n" @@ -2368,19 +2527,19 @@ msgstr "" " điều chỉnh toc dài\t\t%lu\n" " cuộc gọi pit\t\t\t%lu" -#: elf64-ppc.c:10769 +#: elf64-ppc.c:11252 msgid "%B(%A+0x%lx): automatic multiple TOCs not supported using your crt files; recompile with -mminimal-toc or upgrade gcc" msgstr "%B(%A+0x%lx): tự động tạo nhiều TOC không được hỗ trợ khi dùng các tập tin CRT của bạn; hãy biên dịch lại với « -mminimal-toc », hoặc nâng cấp GCC" -#: elf64-ppc.c:10777 +#: elf64-ppc.c:11260 msgid "%B(%A+0x%lx): sibling call optimization to `%s' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `%s' extern" msgstr "%B(%A+0x%lx): tối ưu hoá cuộc gọi cùng chỗ cho « %s » không cho phép tự động tạo nhiều TOC; hãy biên dịch lại với « -mminimal-toc » hoặc « -fno-optimize-sibling-calls », hoặc làm cho « %s » là bên ngoài" -#: elf64-ppc.c:11427 +#: elf64-ppc.c:11961 msgid "%B: relocation %s is not supported for symbol %s." msgstr "%B: không hỗ trợ định vị lại %s cho ký hiệu %s." -#: elf64-ppc.c:11509 +#: elf64-ppc.c:12044 msgid "%B: error: relocation %s not a multiple of %d" msgstr "%B: lỗi: định vị lại %s không phải là bội số cho %d" @@ -2405,31 +2564,31 @@ msgstr "Ký hiệu « %s » có các kiểu khác hau: REGISTER (thanh ghi) tron msgid "Symbol `%s' has differing types: %s in %B, previously REGISTER in %B" msgstr "Ký hiệu « %s » có các kiểu khác hau: %s trong %b, trước là REGISTER (thanh ghi) trong %B" -#: elf64-sparc.c:678 +#: elf64-sparc.c:679 msgid "%B: linking UltraSPARC specific with HAL specific code" msgstr "%B: đang liên kết UltraSPARC dứt khoát với mã đặc trưng cho HAL" -#: elf64-x86-64.c:1047 elf64-x86-64.c:1207 elfxx-mips.c:7834 -msgid "%B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC" -msgstr "%B: định vị lại %s so với « %s » không thể được dùng khi tạo một đối tượng chia sẻ; hãy biên dịch lại với « -fPIC »" - -#: elf64-x86-64.c:1138 +#: elf64-x86-64.c:1337 msgid "%B: '%s' accessed both as normal and thread local symbol" msgstr "%B; « %s » được truy cập như là ký hiệu cả hai kiểu bình thường và mạch cục bộ" -#: elf64-x86-64.c:2559 +#: elf64-x86-64.c:2701 +msgid "%B: relocation %s against STT_GNU_IFUNC symbol `%s' has non-zero addend: %d" +msgstr "%B: sự định vị lại %s đối với ký hiệu STT_GNU_IFUNC « %s » có phần cộng khác số không: %d" + +#: elf64-x86-64.c:2980 msgid "%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be used when making a shared object" msgstr "%B: định vị lại R_X86_64_GOTOFF64 so với hàm đã bảo vệ « %s » thì không thể được dùng khi tạo một đối tượng chia sẻ" -#: elf64-x86-64.c:2670 +#: elf64-x86-64.c:3091 msgid "; recompile with -fPIC" msgstr "; biên dịch lại với « -fPIC »" -#: elf64-x86-64.c:2675 +#: elf64-x86-64.c:3096 msgid "%B: relocation %s against %s `%s' can not be used when making a shared object%s" msgstr "%B: không dùng được định vị lại %s đối với %s « %s » khi tạo một đối tượng chia sẻ %s" -#: elf64-x86-64.c:2677 +#: elf64-x86-64.c:3098 msgid "%B: relocation %s against undefined %s `%s' can not be used when making a shared object%s" msgstr "%B: không dùng được định vị lại %s đối với %s chưa xác định « %s » khi tạo một đối tượng chia sẻ %s" @@ -2443,7 +2602,7 @@ msgstr "cảnh báo : %s có một chỉ mục bảng chuỗi bị hỏng: nên msgid "%s: version count (%ld) does not match symbol count (%ld)" msgstr "%s: số đếm phiên bản (%ld) không tương ứng với số đếm ký hiệu (%ld)" -#: elfcode.h:1435 +#: elfcode.h:1441 #, c-format msgid "%s(%s): relocation %d has invalid symbol index %ld" msgstr "%s(%s): định vị lại %d có chỉ mục ký hiệu không hợp lệ %ld" @@ -2452,305 +2611,313 @@ msgstr "%s(%s): định vị lại %d có chỉ mục ký hiệu không hợp l msgid "Warning: %B is truncated: expected core file size >= %lu, found: %lu." msgstr "Cảnh báo : %B bị cắt ngắn: kích cỡ tập tin lõi mong đợi ≥%lu còn tìm %lu." -#: elflink.c:1028 +#: elflink.c:1113 msgid "%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A" msgstr "%s: lời định nghĩa TLS trong %B phần %A không tương ứng với lời định nghĩa TLS trong %B phần %A" -#: elflink.c:1032 +#: elflink.c:1117 msgid "%s: TLS reference in %B mismatches non-TLS reference in %B" msgstr "%s: lời định nghĩa TLS trong %B không tương ứng với lời định nghĩa khác TLS trong %B" -#: elflink.c:1036 +#: elflink.c:1121 msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B" msgstr "%s: lời định nghĩa TLS trong %B phần %A không tương ứng với lời định nghĩa khác TLS trong %B" -#: elflink.c:1040 +#: elflink.c:1125 msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A" msgstr "%s: lời định nghĩa TLS trong %B không tương ứng với lời định nghĩa khác TLS trong %B phần %A" -#: elflink.c:1654 +#: elflink.c:1764 msgid "%B: unexpected redefinition of indirect versioned symbol `%s'" msgstr "%B: gặp lời định nghĩa lại bất thường của ký hiệu gián tiếp đặt phiên bản « %s »" -#: elflink.c:1982 +#: elflink.c:2077 msgid "%B: version node not found for symbol %s" msgstr "%B: không tìm thấy nút thông tin phiên bản cho ký hiệu %s" -#: elflink.c:2130 +#: elflink.c:2167 msgid "%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'" msgstr "%B: chỉ mục ký hiệu định vị lại sai (0x%lx ≥ 0x%lx) cho khoảng bù 0x%lx trong phần « %A »" -#: elflink.c:2327 +#: elflink.c:2178 +msgid "%B: non-zero symbol index (0x%lx) for offset 0x%lx in section `%A' when the object file has no symbol table" +msgstr "%B: chỉ mục ký hiệu khác số không (0x%lx) cho hiệu 0x%lx trong phần « %A » mà tập tin đối tượng không có bảng ký hiệu" + +#: elflink.c:2375 msgid "%B: relocation size mismatch in %B section %A" msgstr "%B: sai khớp kích cỡ định vị lại trong %B phần %A" -#: elflink.c:2629 +#: elflink.c:2678 #, c-format msgid "warning: type and size of dynamic symbol `%s' are not defined" msgstr "cảnh báo : chưa xác định kiểu và kích cỡ của ký hiệu động « %s »" -#: elflink.c:3953 +#: elflink.c:3424 +msgid "%P: alternate ELF machine code found (%d) in %B, expecting %d\n" +msgstr "%P: mã máy ELF luân phiên được tìm (%d) trong %B, còn mong đợi %d\n" + +#: elflink.c:4032 msgid "%B: %s: invalid version %u (max %d)" msgstr "%B: %s: phiên bản không hợp lệ %u (tối đa %d)" -#: elflink.c:3989 +#: elflink.c:4068 msgid "%B: %s: invalid needed version %d" msgstr "%B: %s: phiên bản cần thiết mà không hợp lệ %d" -#: elflink.c:4172 +#: elflink.c:4253 msgid "Warning: alignment %u of common symbol `%s' in %B is greater than the alignment (%u) of its section %A" msgstr "Cảnh báo : vị trí sắp hàng %u của ký hiệu dùng chung « %s » trong %B là lớn hơn vị trí sắp hàng (%u) của phần %A của nó" -#: elflink.c:4178 +#: elflink.c:4259 msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B" msgstr "Cảnh báo : vị trí sắp hàng %u của ký hiệu « %s » trong %B là nhỏ hơn %u trong %B" -#: elflink.c:4193 +#: elflink.c:4274 msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B" msgstr "Cảnh báo : kích cỡ của ký hiệu « %s » đã thay đổi từ %lu trong %B thành %lu trong %B" -#: elflink.c:4371 +#: elflink.c:4438 #, c-format msgid "%s: invalid DSO for symbol `%s' definition" msgstr "%s: DSO không hợp lệ cho lời định nghĩa ký hiệu « %s »" -#: elflink.c:5621 +#: elflink.c:5688 #, c-format msgid "%s: undefined version: %s" msgstr "%s: phiên bản chưa được xác định: %s" -#: elflink.c:5689 +#: elflink.c:5756 msgid "%B: .preinit_array section is not allowed in DSO" msgstr "%B: không cho phép phần « .preinit_array » trong DSO" -#: elflink.c:7414 +#: elflink.c:7484 #, c-format msgid "undefined %s reference in complex symbol: %s" msgstr "gặp tham chiếu %s chưa được xác định trong ký hiệu phức tạp %s" -#: elflink.c:7568 +#: elflink.c:7638 #, c-format msgid "unknown operator '%c' in complex symbol" msgstr "không rõ toán tử « %c » trong ký hiệu phức tạp" -#: elflink.c:7904 elflink.c:7921 elflink.c:7958 elflink.c:7975 +#: elflink.c:7976 elflink.c:7993 elflink.c:8030 elflink.c:8047 msgid "%B: Unable to sort relocs - they are in more than one size" msgstr "%B: Không thể sắp xếp các sự định vị lại: chúng có kích cỡ khác nhau" -#: elflink.c:7935 elflink.c:7989 +#: elflink.c:8007 elflink.c:8061 msgid "%B: Unable to sort relocs - they are of an unknown size" msgstr "%B: Không thể sắp xếp các sự định vị lại: chúng có kích cỡ không rõ" -#: elflink.c:8038 +#: elflink.c:8112 msgid "Not enough memory to sort relocations" msgstr "Không đủ bộ nhớ để sắp xếp các sự định vị lại" -#: elflink.c:8227 +#: elflink.c:8304 msgid "%B: Too many sections: %d (>= %d)" msgstr "%B: Quá nhiều phần: %d (≥ %d)" -#: elflink.c:8461 +#: elflink.c:8540 msgid "%B: %s symbol `%s' in %B is referenced by DSO" msgstr "%B: %s ký hiệu « %s » trong %B được DSO tham chiếu" -#: elflink.c:8544 +#: elflink.c:8625 msgid "%B: could not find output section %A for input section %A" msgstr "%B: không thể tìm thấy phần kết xuất %A cho phần dữ liệu nhập vào %A" -#: elflink.c:8655 +#: elflink.c:8745 msgid "%B: %s symbol `%s' isn't defined" msgstr "%B: %s: chưa xác định ký hiệu « %s »" -#: elflink.c:9141 +#: elflink.c:9301 msgid "error: %B contains a reloc (0x%s) for section %A that references a non-existent global symbol" msgstr "lỗi: %B chứa một định vị lại (0x%s) cho phần %A mà tham chiếu đến một ký hiệu toàn cục không tồn tại" -#: elflink.c:9205 +#: elflink.c:9366 msgid "%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' of %B\n" msgstr "%X« %s » được tham chiếu trong phần « %A » của %B: được định nghĩa trong phần bị hủy « %A » của %B\n" -#: elflink.c:9825 +#: elflink.c:9991 msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections" msgstr "%A có phần cả hai được sắp xếp [« %A » trong %B] và chưa sắp xếp [« %A » trong %B]" -#: elflink.c:9830 +#: elflink.c:9996 #, c-format msgid "%A has both ordered and unordered sections" msgstr "%A có phần cả hai được sắp xếp và chưa sắp xếp" -#: elflink.c:10715 elflink.c:10759 +#: elflink.c:10872 elflink.c:10916 msgid "%B: could not find output section %s" msgstr "%B: không tìm thấy phần kết xuất %s" -#: elflink.c:10720 +#: elflink.c:10877 #, c-format msgid "warning: %s section has zero size" msgstr "cảnh báo : phần %s có kích cỡ số không" -#: elflink.c:10824 +#: elflink.c:10982 msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n" msgstr "%P: cảnh báo : đang tạo một DT_TEXTREL trong một đối tượng chia sẻ.\n" -#: elflink.c:11006 +#: elflink.c:11165 msgid "%P%X: can not read symbols: %E\n" msgstr "%P%X: không thể đọc các ký hiệu : %E\n" -#: elflink.c:11313 +#: elflink.c:11483 msgid "Removing unused section '%s' in file '%B'" msgstr "Đang gỡ bỏ phần không dùng « %s » trong tập tin « %B »" -#: elflink.c:11525 +#: elflink.c:11695 msgid "Warning: gc-sections option ignored" msgstr "Cảnh báo : tùy chọn gc-sections bị bỏ qua" -#: elflink.c:12056 +#: elflink.c:12242 msgid "%B: ignoring duplicate section `%A'" msgstr "%B: đang bỏ qua phần trùng « %A »" -#: elflink.c:12063 elflink.c:12070 +#: elflink.c:12249 elflink.c:12256 msgid "%B: duplicate section `%A' has different size" msgstr "%B: phần trùng « %A » có kích cỡ khác" -#: elflink.c:12078 elflink.c:12083 +#: elflink.c:12264 elflink.c:12269 msgid "%B: warning: could not read contents of section `%A'" msgstr "%B: cảnh báo : không thể đọc nội dung của phần « %A »" -#: elflink.c:12087 +#: elflink.c:12273 msgid "%B: warning: duplicate section `%A' has different contents" msgstr "%B: cảnh báo : phần trùng « %A » có nội dung khác" -#: elflink.c:12166 linker.c:3080 -msgid "%F%P: already_linked_table: %E" -msgstr "%F%P: already_linked_table: %E" +#: elflink.c:12374 linker.c:3098 +msgid "%F%P: already_linked_table: %E\n" +msgstr "%F%P: already_linked_table: %E\n" -#: elfxx-mips.c:1197 +#: elfxx-mips.c:1222 msgid "static procedure (no name)" msgstr "thủ tục tĩnh (không có tên)" -#: elfxx-mips.c:5562 +#: elfxx-mips.c:5588 msgid "%B: %A+0x%lx: jump to stub routine which is not jal" msgstr "%B: %A+0x%lx: nhảy tới hàm mẩu mà không phải jal" -#: elfxx-mips.c:6206 elfxx-mips.c:6427 +#: elfxx-mips.c:6235 elfxx-mips.c:6458 msgid "%B: Warning: bad `%s' option size %u smaller than its header" msgstr "%B: Cảnh báo : kích cỡ tùy chọn « %s » sai: nhỏ hơn phần đầu của nó" -#: elfxx-mips.c:7174 elfxx-mips.c:7299 +#: elfxx-mips.c:7205 elfxx-mips.c:7330 msgid "%B: Warning: cannot determine the target function for stub section `%s'" msgstr "%B: cảnh báo : không thể quyết định hàm đích cho phần mẩu « %s »" -#: elfxx-mips.c:7428 +#: elfxx-mips.c:7459 msgid "%B: Malformed reloc detected for section %s" msgstr "%B: Phát hiện sự định vị lại dạng sai cho phần %s" -#: elfxx-mips.c:7468 +#: elfxx-mips.c:7499 msgid "%B: GOT reloc at 0x%lx not expected in executables" msgstr "%B: định vị lại GOT ở 0x%lx không mong đợi trong tập tin có khả năng thực hiện" -#: elfxx-mips.c:7566 +#: elfxx-mips.c:7602 msgid "%B: CALL16 reloc at 0x%lx not against global symbol" msgstr "%B: định vị lại CALL16 ở 0x%lx không phải so với ký hiệu toàn cục" -#: elfxx-mips.c:8244 +#: elfxx-mips.c:8280 #, c-format msgid "non-dynamic relocations refer to dynamic symbol %s" msgstr "định vị lại khác động cũng tham chiếu đến ký hiệu động %s" -#: elfxx-mips.c:8947 +#: elfxx-mips.c:8985 msgid "%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'" msgstr "%B: Không tìm thấy định vị lại LO16 tương ứng so với « %s » cho %s ở 0x%lx trong phần « %A »" -#: elfxx-mips.c:9086 +#: elfxx-mips.c:9124 msgid "small-data section exceeds 64KB; lower small-data size limit (see option -G)" msgstr "Phần small-data (dữ liệu nhỏ) vượt quá 64 KB; hãy giảm giới hạn dữ liệu nhỏ (xem tùy chọn « -G »)" -#: elfxx-mips.c:11887 +#: elfxx-mips.c:11940 #, c-format msgid "%s: illegal section name `%s'" msgstr "%s: tên phần cấm « %s »" -#: elfxx-mips.c:12262 elfxx-mips.c:12288 +#: elfxx-mips.c:12318 elfxx-mips.c:12344 msgid "Warning: %B uses -msingle-float, %B uses -mdouble-float" msgstr "Cảnh báo : %B dùng « -msingle-float », còn %B dùng « -mdouble-float »" -#: elfxx-mips.c:12274 elfxx-mips.c:12330 +#: elfxx-mips.c:12330 elfxx-mips.c:12386 msgid "Warning: %B uses -msingle-float, %B uses -mips32r2 -mfp64" msgstr "Cảnh báo : %B dùng « -msingle-float », còn %B dùng « -mips32r2 -mfp64 »" -#: elfxx-mips.c:12300 elfxx-mips.c:12336 +#: elfxx-mips.c:12356 elfxx-mips.c:12392 msgid "Warning: %B uses -mdouble-float, %B uses -mips32r2 -mfp64" msgstr "Cảnh báo : %B dùng « -mdouble-float », còn %B dùng « -mips32r2 -mfp64 »" -#: elfxx-mips.c:12378 +#: elfxx-mips.c:12434 msgid "%B: endianness incompatible with that of the selected emulation" msgstr "%B: tình trạng về cuối không tương thích với cái của bản mô phỏng đã chọn" -#: elfxx-mips.c:12389 +#: elfxx-mips.c:12445 msgid "%B: ABI is incompatible with that of the selected emulation" msgstr "%B: ABI không tương thích với cái của bản mô phỏng đã chọn" -#: elfxx-mips.c:12470 +#: elfxx-mips.c:12526 msgid "%B: warning: linking abicalls files with non-abicalls files" msgstr "%B: cảnh báo : đang liên kết tập tin abicalls với tập tin khác abicalls" -#: elfxx-mips.c:12487 +#: elfxx-mips.c:12543 msgid "%B: linking 32-bit code with 64-bit code" msgstr "%B: đang liên kết mã 32-bit với mã 64-bit" -#: elfxx-mips.c:12515 +#: elfxx-mips.c:12571 msgid "%B: linking %s module with previous %s modules" msgstr "%B: đang liên kết mô-đun %s với các mô-đun %s trước" -#: elfxx-mips.c:12538 +#: elfxx-mips.c:12594 msgid "%B: ABI mismatch: linking %s module with previous %s modules" msgstr "%B: sai khớp ABI: đang liên kết mô-đun %s với các mô-đun %s trước" -#: elfxx-mips.c:12702 +#: elfxx-mips.c:12758 #, c-format msgid " [abi=O32]" msgstr " [abi=O32]" -#: elfxx-mips.c:12704 +#: elfxx-mips.c:12760 #, c-format msgid " [abi=O64]" msgstr " [abi=O64]" -#: elfxx-mips.c:12706 +#: elfxx-mips.c:12762 #, c-format msgid " [abi=EABI32]" msgstr " [abi=EABI32]" -#: elfxx-mips.c:12708 +#: elfxx-mips.c:12764 #, c-format msgid " [abi=EABI64]" msgstr " [abi=EABI64]" -#: elfxx-mips.c:12710 +#: elfxx-mips.c:12766 #, c-format msgid " [abi unknown]" msgstr " [abi không rõ]" -#: elfxx-mips.c:12712 +#: elfxx-mips.c:12768 #, c-format msgid " [abi=N32]" msgstr " [abi=N32]" -#: elfxx-mips.c:12714 +#: elfxx-mips.c:12770 #, c-format msgid " [abi=64]" msgstr " [abi=64]" -#: elfxx-mips.c:12716 +#: elfxx-mips.c:12772 #, c-format msgid " [no abi set]" msgstr " [chưa đặt abi]" -#: elfxx-mips.c:12737 +#: elfxx-mips.c:12793 #, c-format msgid " [unknown ISA]" msgstr " [không rõ ISA]" -#: elfxx-mips.c:12748 +#: elfxx-mips.c:12804 #, c-format msgid " [not 32bitmode]" msgstr " [không phải 32bitmode]" @@ -2760,10 +2927,6 @@ msgstr " [không phải 32bitmode]" msgid "invalid relocation type %d" msgstr "kiểu định vị lại không hợp lệ %d" -#: elfxx-sparc.c:2976 -msgid "%B: probably compiled without -fPIC?" -msgstr "%B: rất có thể được biên dịch không có « -fPIC » ?" - #: i386linux.c:455 m68klinux.c:459 sparclinux.c:453 #, c-format msgid "Output file requires shared library `%s'\n" @@ -2866,15 +3029,75 @@ msgstr "%B: ký hiệu gián tiếp « %s » tới « %s » thì tạo một vò msgid "Attempt to do relocatable link with %s input and %s output" msgstr "Thử làm liên kết có khả năng định vị lại với đầu vào %s và đầu ra %s" -#: linker.c:3047 +#: linker.c:3065 msgid "%B: warning: ignoring duplicate section `%A'\n" msgstr "%B: cảnh báo : đang bỏ qua phần trùng « %A »\n" -#: linker.c:3061 +#: linker.c:3079 msgid "%B: warning: duplicate section `%A' has different size\n" msgstr "%B: cảnh báo : phần trùng « %A » có kích cỡ khác\n" -#: merge.c:828 +#: mach-o.c:3195 +#, c-format +msgid "Mach-O header:\n" +msgstr "Phần đầu Mach-O :\n" + +#: mach-o.c:3196 +#, c-format +msgid " magic : %08lx\n" +msgstr " ma thuật : %08lx\n" + +#: mach-o.c:3197 +#, c-format +msgid " cputype : %08lx (%s)\n" +msgstr " kiểu CPU : %08lx (%s)\n" + +#: mach-o.c:3199 +#, c-format +msgid " cpusubtype: %08lx\n" +msgstr " kiểu phụ CPU : %08lx\n" + +#: mach-o.c:3200 +#, c-format +msgid " filetype : %08lx (%s)\n" +msgstr " kiểu tập tin : %08lx (%s)\n" + +#: mach-o.c:3203 +#, c-format +msgid " ncmds : %08lx\n" +msgstr " ncmds : %08lx\n" + +#: mach-o.c:3204 +#, c-format +msgid " sizeofcmds: %08lx\n" +msgstr " kích cỡ cmds : %08lx\n" + +#: mach-o.c:3205 +#, c-format +msgid " flags : %08lx (" +msgstr " cờ : %08lx (" + +#: mach-o.c:3207 +#, c-format +msgid ")\n" +msgstr ")\n" + +#: mach-o.c:3208 +#, c-format +msgid " reserved : %08x\n" +msgstr " dành riêng : %08x\n" + +#: mach-o.c:3218 +#, c-format +msgid "Segments and Sections:\n" +msgstr "Đoạn và Phần:\n" + +#: mach-o.c:3219 +#, c-format +msgid " #: Segment name Section name Address\n" +msgstr " #: Tên đoạn Tên phần Địa chỉ\n" + +#: merge.c:829 #, c-format msgid "%s: access beyond end of merged section (%ld)" msgstr "%s: truy cập vượt quá kết thúc của phần đã gộp lại (%ld)" @@ -3014,7 +3237,7 @@ msgstr "%s: không thể đại diện phần « %s » theo oasys" msgid "Unhandled OSF/1 core file section type %d\n" msgstr "Kiểu phần tập tin lõi OSF/1 không được quản lý %d\n" -#: pe-mips.c:607 +#: pe-mips.c:613 msgid "%B: `ld -r' not supported with PE MIPS objects\n" msgstr "%B: « ld -r » không được hỗ trợ với đối tượng MIPS PE\n" @@ -3022,44 +3245,64 @@ msgstr "%B: « ld -r » không được hỗ trợ với đối tượng MIPS PE #. src = VMA of the memory we're fixing up #. mem = pointer to memory we're fixing up #. val = VMA of what we need to refer to. -#: pe-mips.c:723 +#: pe-mips.c:729 msgid "%B: unimplemented %s\n" msgstr "%B: %s chưa được thực hiện\n" -#: pe-mips.c:749 +#: pe-mips.c:755 msgid "%B: jump too far away\n" msgstr "%B: bước nhảy quá xa\n" -#: pe-mips.c:775 +#: pe-mips.c:781 msgid "%B: bad pair/reflo after refhi\n" msgstr "%B: pair/reflo sai đằng sau refhi\n" +#: pei-x86_64.c:465 +#, c-format +msgid "warning: .pdata section size (%ld) is not a multiple of %d\n" +msgstr "cảnh báo : kích cỡ phần .pdata (%ld) không phải là bội số cho %d\n" + +#: pei-x86_64.c:469 peigen.c:1620 peigen.c:1799 pepigen.c:1620 pepigen.c:1799 +#: pex64igen.c:1620 pex64igen.c:1799 +#, c-format +msgid "" +"\n" +"The Function Table (interpreted .pdata section contents)\n" +msgstr "" +"\n" +"Bảng Hàm (phiên dịch nội dung phần .pdata)\n" + +#: pei-x86_64.c:471 +#, c-format +msgid "vma:\t\t\tBeginAddress\t EndAddress\t UnwindData\n" +msgstr "vma:\t\t\tĐịa chi đầu Địa chỉ cuối Thông tin tháo ra\n" + #. XXX code yet to be written. -#: peicode.h:759 +#: peicode.h:752 msgid "%B: Unhandled import type; %x" msgstr "%B: Kiểu nhập không được quản lý; %x" -#: peicode.h:764 +#: peicode.h:757 msgid "%B: Unrecognised import type; %x" msgstr "%B: Kiểu nhập không được nhận ra; %x" -#: peicode.h:778 +#: peicode.h:771 msgid "%B: Unrecognised import name type; %x" msgstr "%B: Kiểu tên nhập không được nhận ra; %x" -#: peicode.h:1161 +#: peicode.h:1154 msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive" msgstr "%B: Kiểu máy không được nhận ra (0x%x) trong kho lưu Định dạng Thư viện Nhập" -#: peicode.h:1173 +#: peicode.h:1166 msgid "%B: Recognised but unhandled machine type (0x%x) in Import Library Format archive" msgstr "%B: Kiểu máy được nhận ra còn không được quản lý (0x%x) trong kho lưu Định dạng Thư viện Nhập" -#: peicode.h:1191 +#: peicode.h:1184 msgid "%B: size field is zero in Import Library Format header" msgstr "%B: trường kích cỡ là số không trong phần đầu Định dạng Thư viện Nhập" -#: peicode.h:1222 +#: peicode.h:1215 msgid "%B: string not null terminated in ILF object file." msgstr "%B: chuỗi không phải kết thúc vô hiệu lực trong tập tin đối tượng ILF. " @@ -3116,7 +3359,7 @@ msgstr "Phân vùng[%d] rãnh ghi = 0x%.8lx (%ld)\n" msgid "Partition[%d] length = 0x%.8lx (%ld)\n" msgstr "Phân vùng[%d] dài = 0x%.8lx (%ld)\n" -#: som.c:5137 +#: som.c:5114 #, c-format msgid "" "\n" @@ -3125,7 +3368,7 @@ msgstr "" "\n" "Phần đầu phụ thực hiện\n" -#: som.c:5440 +#: som.c:5417 msgid "som_sizeof_headers unimplemented" msgstr "som_sizeof_headers chưa được thực hiện" @@ -3141,122 +3384,173 @@ msgstr "%B:%d: sai tổng kiểm trong tập tin S-record\n" msgid "%B(%A+0x%lx): Stabs entry has invalid string index." msgstr "%B(%A+0x%lx): Mục nhập Stabs có chỉ mục chuỗi không hợp lệ." -#: syms.c:1067 +#: syms.c:1079 msgid "Unsupported .stab relocation" msgstr "Định vị lại .stab không được hỗ trợ" -#: vms-gsd.c:338 +#: vms-gsd.c:350 #, c-format msgid "bfd_make_section (%s) failed" msgstr "bfd_make_section (%s) bị lỗi" -#: vms-gsd.c:353 +#: vms-gsd.c:365 #, c-format msgid "bfd_set_section_flags (%s, %x) failed" msgstr "bfd_set_section_flags (%s, %x) bị lỗi" -#: vms-gsd.c:388 +#: vms-gsd.c:399 #, c-format msgid "Size mismatch section %s=%lx, %s=%lx" msgstr "Sai khớp phần %s=%lx, %s=%lx" -#: vms-gsd.c:679 +#: vms-gsd.c:754 #, c-format -msgid "unknown gsd/egsd subtype %d" -msgstr "Không rõ kiểu phụ gsd/egsd %d" +msgid "Unknown GSD/EGSD subtype %d" +msgstr "Không rõ kiểu phụ GSD/EGSD %d" -#: vms-hdr.c:328 +#: vms-hdr.c:364 msgid "Object module NOT error-free !\n" msgstr "Mô-đun đối tượng KHÔNG phải miễn lỗi !\n" -#: vms-misc.c:474 +#: vms-hdr.c:878 +#, c-format +msgid "unknown source command %d" +msgstr "không rõ câu lệnh nguồn %d" + +#: vms-hdr.c:951 +msgid "DST_S_C_SET_LINUM_INCR not implemented" +msgstr "DST_S_C_SET_LINUM_INCR chưa được thực hiện" + +#: vms-hdr.c:957 +msgid "DST_S_C_SET_LINUM_INCR_W not implemented" +msgstr "DST_S_C_SET_LINUM_INCR_W chưa được thực hiện" + +#: vms-hdr.c:963 +msgid "DST_S_C_RESET_LINUM_INCR not implemented" +msgstr "DST_S_C_RESET_LINUM_INCR chưa được thực hiện" + +#: vms-hdr.c:969 +msgid "DST_S_C_BEG_STMT_MODE not implemented" +msgstr "DST_S_C_BEG_STMT_MODE chưa được thực hiện" + +#: vms-hdr.c:975 +msgid "DST_S_C_END_STMT_MODE not implemented" +msgstr "DST_S_C_END_STMT_MODE chưa được thực hiện" + +#: vms-hdr.c:1008 +msgid "DST_S_C_SET_PC not implemented" +msgstr "DST_S_C_SET_PC chưa được thực hiện" + +#: vms-hdr.c:1014 +msgid "DST_S_C_SET_PC_W not implemented" +msgstr "DST_S_C_SET_PC_W chưa được thực hiện" + +#: vms-hdr.c:1020 +msgid "DST_S_C_SET_PC_L not implemented" +msgstr "DST_S_C_SET_PC_L chưa được thực hiện" + +#: vms-hdr.c:1026 +msgid "DST_S_C_SET_STMTNUM not implemented" +msgstr "DST_S_C_SET_STMTNUM chưa được thực hiện" + +#: vms-hdr.c:1079 +#, c-format +msgid "unknown line command %d" +msgstr "không rõ câu lệnh dòng %d" + +#: vms-misc.c:588 #, c-format msgid "Stack overflow (%d) in _bfd_vms_push" msgstr "Tràn đống (%d) trong _bfd_vms_push" -#: vms-misc.c:489 +#: vms-misc.c:603 msgid "Stack underflow in _bfd_vms_pop" msgstr "Trán ngược đống trong _bfd_vms_pop" -#: vms-misc.c:808 +#: vms-misc.c:844 msgid "_bfd_vms_output_counted called with zero bytes" msgstr "_bfd_vms_output_counted được gọi với số không byte" -#: vms-misc.c:813 +#: vms-misc.c:849 msgid "_bfd_vms_output_counted called with too many bytes" msgstr "_bfd_vms_output_counted được gọi với quá nhiều byte" -#: vms-misc.c:931 +#: vms-misc.c:967 #, c-format msgid "Symbol %s replaced by %s\n" msgstr "Ký hiệu %s đã bị thay thế bằng %s\n" -#: vms-misc.c:990 +#: vms-misc.c:1026 #, c-format msgid "failed to enter %s" msgstr "lỗi vào %s" -#: vms-tir.c:57 +#: vms-tir.c:83 msgid "No Mem !" msgstr "Không có Mem !" -#: vms-tir.c:300 +#. These names have not yet been added to this switch statement. +#: vms-tir.c:346 +#, c-format +msgid "unknown ETIR command %d" +msgstr "không rõ câu lệnh ETIR %d" + +#: vms-tir.c:440 #, c-format msgid "bad section index in %s" msgstr "chỉ mục phần sai trong %s" -#: vms-tir.c:313 +#: vms-tir.c:459 #, c-format msgid "unsupported STA cmd %s" msgstr "câu lệnh STA không được hỗ trợ %s" -#: vms-tir.c:318 vms-tir.c:1120 +#: vms-tir.c:464 vms-tir.c:1304 #, c-format msgid "reserved STA cmd %d" msgstr "câu lệnh STA dành riêng %d" -#: vms-tir.c:410 vms-tir.c:432 -#, c-format -msgid "%s: no symbol \"%s\"" -msgstr "%s: không có ký hiệu « %s »" - #. Unsigned shift. #. Rotate. #. Redefine symbol to current location. #. Define a literal. -#: vms-tir.c:497 vms-tir.c:606 vms-tir.c:704 vms-tir.c:721 vms-tir.c:728 -#: vms-tir.c:736 vms-tir.c:1440 +#: vms-tir.c:655 vms-tir.c:774 vms-tir.c:894 vms-tir.c:1624 #, c-format msgid "%s: not supported" msgstr "%s: không được hỗ trợ" -#: vms-tir.c:502 vms-tir.c:1297 +#: vms-tir.c:661 vms-tir.c:1481 #, c-format msgid "%s: not implemented" msgstr "%s: chưa được thực hiện" -#: vms-tir.c:506 vms-tir.c:1301 +#: vms-tir.c:666 vms-tir.c:1485 #, c-format msgid "reserved STO cmd %d" msgstr "câu lệnh STO dành riêng %d" -#: vms-tir.c:621 vms-tir.c:1445 +#: vms-tir.c:789 vms-tir.c:1629 #, c-format msgid "reserved OPR cmd %d" msgstr "câu lệnh OPR dành riêng %d" -#: vms-tir.c:681 vms-tir.c:1509 +#: vms-tir.c:852 vms-tir.c:1693 #, c-format msgid "reserved CTL cmd %d" msgstr "câu lệnh CTL dành riêng %d" +#: vms-tir.c:966 +#, c-format +msgid "reserved STC cmd %d" +msgstr "câu lệnh STC dành riêng %d" + #. stack byte from image #. arg: none. -#: vms-tir.c:1028 +#: vms-tir.c:1212 msgid "stack-from-image not implemented" msgstr "stack-from-image chưa được thực hiện" -#: vms-tir.c:1046 +#: vms-tir.c:1230 msgid "stack-entry-mask not fully implemented" msgstr "stack-entry-mask chưa được thực hiện hoàn toàn" @@ -3267,270 +3561,285 @@ msgstr "stack-entry-mask chưa được thực hiện hoàn toàn" #. #. compare argument descriptor with symbol argument (ARG$V_PASSMECH) #. and stack TRUE (args match) or FALSE (args dont match) value. -#: vms-tir.c:1060 +#: vms-tir.c:1244 msgid "PASSMECH not fully implemented" msgstr "PASSMECH chưa được thực hiện hoàn toàn" -#: vms-tir.c:1079 +#: vms-tir.c:1263 msgid "stack-local-symbol not fully implemented" msgstr "stack-local-symbol chưa được thực hiện hoàn toàn" -#: vms-tir.c:1092 +#: vms-tir.c:1276 msgid "stack-literal not fully implemented" msgstr "stack-literal chưa được thực hiện hoàn toàn" -#: vms-tir.c:1113 +#: vms-tir.c:1297 msgid "stack-local-symbol-entry-point-mask not fully implemented" msgstr "stack-local-symbol-entry-point-mask chưa được thực hiện hoàn toàn" -#: vms-tir.c:1387 vms-tir.c:1399 vms-tir.c:1411 vms-tir.c:1423 vms-tir.c:1488 -#: vms-tir.c:1496 vms-tir.c:1504 +#: vms-tir.c:1571 vms-tir.c:1583 vms-tir.c:1595 vms-tir.c:1607 vms-tir.c:1672 +#: vms-tir.c:1680 vms-tir.c:1688 #, c-format msgid "%s: not fully implemented" msgstr "%s: chưa được thực hiện hoàn toàn" -#: vms-tir.c:1562 +#: vms-tir.c:1746 #, c-format msgid "obj code %d not found" msgstr "Không tìm thấy mã đối tượng %d" -#: vms-tir.c:1870 +#: vms-tir.c:2019 +#, c-format +msgid "Reloc size error in section %s" +msgstr "Gặp lỗi kích cỡ sự định vị lại trong phần %s" + +#: vms-tir.c:2112 vms-tir.c:2129 vms-tir.c:2147 vms-tir.c:2159 vms-tir.c:2170 +#: vms-tir.c:2182 +#, c-format +msgid "Unknown reloc %s + %s" +msgstr "Không rõ sự định vị lại %s + %s" + +#: vms-tir.c:2249 +#, c-format +msgid "Unknown symbol %s in command %s" +msgstr "Gặp ký hiệu lạ %s trong câu lệnh %s" + +#: vms-tir.c:2504 #, c-format msgid "SEC_RELOC with no relocs in section %s" msgstr "SEC_RELOC không có định vị lại trong phần %s" -#: vms-tir.c:2152 +#: vms-tir.c:2556 vms-tir.c:2783 +#, c-format +msgid "Size error in section %s" +msgstr "Gặp lỗi kích cỡ trong phần %s" + +#: vms-tir.c:2725 +msgid "Spurious ALPHA_R_BSR reloc" +msgstr "Gặp sự định vị lại ALPHA_R_BSR giả" + +#: vms-tir.c:2770 #, c-format msgid "Unhandled relocation %s" msgstr "Định vị lại không được quản lý %s" -#: xcofflink.c:566 +#: xcofflink.c:836 #, c-format msgid "%s: XCOFF shared object when not producing XCOFF output" msgstr "%s: có đối tượng dùng chung XCOFF khi không xuất dữ liệu XCOFF" -#: xcofflink.c:587 +#: xcofflink.c:857 #, c-format msgid "%s: dynamic object with no .loader section" msgstr "%s đối tượng động không có phần .loader" -#: xcofflink.c:1150 +#: xcofflink.c:1415 msgid "%B: `%s' has line numbers but no enclosing section" msgstr "%B: « %s » có số thứ tự dòng mà không có phần bao bọc" -#: xcofflink.c:1202 +#: xcofflink.c:1467 msgid "%B: class %d symbol `%s' has no aux entries" msgstr "%B: hạng %d ký hiệu « %s » không có mục nhập phụ" -#: xcofflink.c:1225 +#: xcofflink.c:1489 msgid "%B: symbol `%s' has unrecognized csect type %d" msgstr "%B: ký hiệu « %s » có kiểu csect không được nhận ra %d" -#: xcofflink.c:1237 +#: xcofflink.c:1501 msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d" msgstr "%B: ký hiệu XTY_ER sai « %s » hạng %d scnum %d scnlen %d" -#: xcofflink.c:1273 +#: xcofflink.c:1530 msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d" msgstr "%B: ký hiệu XMC_TC0 « %s » là hạng %d scnlen %d" -#: xcofflink.c:1419 +#: xcofflink.c:1676 msgid "%B: csect `%s' not in enclosing section" msgstr "%B: csect « %s » không phải trong phần bao bọc" -#: xcofflink.c:1526 +#: xcofflink.c:1783 msgid "%B: misplaced XTY_LD `%s'" msgstr "%B: không đúng chỗ XTY_LD « %s »" -#: xcofflink.c:1842 +#: xcofflink.c:2102 msgid "%B: reloc %s:%d not in csect" msgstr "%B: định vị lại %s:%d không phải trong csect" -#: xcofflink.c:2640 +#: xcofflink.c:3177 #, c-format msgid "%s: no such symbol" msgstr "%s: không có ký hiệu như vậy" -#: xcofflink.c:2869 +#: xcofflink.c:3282 #, c-format msgid "warning: attempt to export undefined symbol `%s'" msgstr "cảnh báo : thử xuất ký hiệu chưa được xác định « %s »" -#: xcofflink.c:3036 +#: xcofflink.c:3664 msgid "error: undefined symbol __rtinit" msgstr "lỗi: chưa xác định ký hiệu __rtinit" -#: xcofflink.c:3656 -#, c-format -msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" -msgstr "Tràn TOC: 0x%lx > 0x10000; hãy thử « -mminimal-toc » khi biên dịch" - -#: xcofflink.c:4492 -msgid "%B: loader reloc in unrecognized section `%A'" -msgstr "%B: định vị lại bộ nạp trong phần không được nhận ra « %A »" +#: xcofflink.c:4041 +msgid "%B: loader reloc in unrecognized section `%s'" +msgstr "%B: gặp sự định vị lại bộ nạp trong phần không được nhận ra « %s »" -#: xcofflink.c:4513 +#: xcofflink.c:4052 msgid "%B: `%s' in loader reloc but not loader sym" msgstr "%B: « %s » trong định vị lại bộ nạp nhưng không phải liên kết mềm đến bộ nạp" -#: xcofflink.c:4528 +#: xcofflink.c:4068 msgid "%B: loader reloc in read-only section %A" msgstr "%B: định vị lại bộ nạp trong phần chỉ đọc %A" -#: xcofflink.c:4937 xcofflink.c:4999 xcofflink.c:5294 -#, c-format -msgid "%s: loader reloc in unrecognized section `%s'" -msgstr "%s: định vị lại bộ nạp trong phần không được nhận ra « %s »" - -#: xcofflink.c:5305 +#: xcofflink.c:5086 #, c-format -msgid "%s: `%s' in loader reloc but not loader sym" -msgstr "%s: « %s » trong định vị lại bộ nạp nhưng không phải liên kết mềm đến bộ nạp" +msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" +msgstr "Tràn TOC: 0x%lx > 0x10000; hãy thử « -mminimal-toc » khi biên dịch" -#: elf32-ia64.c:1037 elf64-ia64.c:1037 +#: elf32-ia64.c:1050 elf64-ia64.c:1050 msgid "%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch." msgstr "%B: Không thể giảm nhẹ br ở 0x%lx trong phần « %A ». Hãy dùng brl hoặc nhánh gián tiếp." -#: elf32-ia64.c:2742 elf64-ia64.c:2742 +#: elf32-ia64.c:2739 elf64-ia64.c:2739 msgid "@pltoff reloc against local symbol" msgstr "định vị lại @pltoff so với ký hiệu cục bộ" -#: elf32-ia64.c:4317 elf64-ia64.c:4317 +#: elf32-ia64.c:4314 elf64-ia64.c:4314 #, c-format msgid "%s: short data segment overflowed (0x%lx >= 0x400000)" msgstr "%s: tràn đoạn dữ liệu ngắn (0x%lx ≥ 0x400000)" -#: elf32-ia64.c:4328 elf64-ia64.c:4328 +#: elf32-ia64.c:4325 elf64-ia64.c:4325 #, c-format msgid "%s: __gp does not cover short data segment" msgstr "%s: __gp không trải ra đoạn dữ liệu ngắn" -#: elf32-ia64.c:4598 elf64-ia64.c:4598 +#: elf32-ia64.c:4595 elf64-ia64.c:4595 msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'" msgstr "%B: mã khác pic với định vị lại imm so với ký hiệu động « %s »" -#: elf32-ia64.c:4665 elf64-ia64.c:4665 +#: elf32-ia64.c:4662 elf64-ia64.c:4662 msgid "%B: @gprel relocation against dynamic symbol %s" msgstr "%B: định vị lại @gprel so với ký hiệu động « %s »" -#: elf32-ia64.c:4728 elf64-ia64.c:4728 +#: elf32-ia64.c:4725 elf64-ia64.c:4725 msgid "%B: linking non-pic code in a position independent executable" msgstr "%B: đang liên kết mã khác pin trong một tập tin có khả năng thực hiện mà không phụ thuộc vào vị trí" -#: elf32-ia64.c:4865 elf64-ia64.c:4865 +#: elf32-ia64.c:4862 elf64-ia64.c:4862 msgid "%B: @internal branch to dynamic symbol %s" msgstr "%B: nhánh @internal (nội bộ) tới ký hiệu động %s" -#: elf32-ia64.c:4867 elf64-ia64.c:4867 +#: elf32-ia64.c:4864 elf64-ia64.c:4864 msgid "%B: speculation fixup to dynamic symbol %s" msgstr "%B: sự sửa chữa suy đoán so với ký hiệu động %s" -#: elf32-ia64.c:4869 elf64-ia64.c:4869 +#: elf32-ia64.c:4866 elf64-ia64.c:4866 msgid "%B: @pcrel relocation against dynamic symbol %s" msgstr "%B: định vị lại @pcrel so với ký hiệu động %s" -#: elf32-ia64.c:5066 elf64-ia64.c:5066 +#: elf32-ia64.c:5063 elf64-ia64.c:5063 msgid "unsupported reloc" msgstr "định vị lại không được hỗ trợ" -#: elf32-ia64.c:5104 elf64-ia64.c:5104 +#: elf32-ia64.c:5101 elf64-ia64.c:5101 msgid "%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'." msgstr "%B: thiếu phần TLS để định vị lại %s đối với « %s » ở 0x%lx trong phần « %A »." -#: elf32-ia64.c:5119 elf64-ia64.c:5119 +#: elf32-ia64.c:5116 elf64-ia64.c:5116 msgid "%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)." msgstr "%B: Không thể giảm nhẹ br (%s) tới « %s » tại 0x%lx trong phần « %A » với kích cỡ 0x%lx (> 0x1000000)." -#: elf32-ia64.c:5375 elf64-ia64.c:5375 +#: elf32-ia64.c:5372 elf64-ia64.c:5372 msgid "%B: linking trap-on-NULL-dereference with non-trapping files" msgstr "%B: đang liên kết trap-on-NULL-dereference với tập tin không đặt bẫy" -#: elf32-ia64.c:5384 elf64-ia64.c:5384 +#: elf32-ia64.c:5381 elf64-ia64.c:5381 msgid "%B: linking big-endian files with little-endian files" msgstr "%B: đang liên kết tập tin về cuối lớn với tập tin về cuối nhỏ" -#: elf32-ia64.c:5393 elf64-ia64.c:5393 +#: elf32-ia64.c:5390 elf64-ia64.c:5390 msgid "%B: linking 64-bit files with 32-bit files" msgstr "%B: đang liên kết tập tin 64-bit với tập tin 32-bit" -#: elf32-ia64.c:5402 elf64-ia64.c:5402 +#: elf32-ia64.c:5399 elf64-ia64.c:5399 msgid "%B: linking constant-gp files with non-constant-gp files" msgstr "%B: đang liên kết tập tin constant-gp với tập tin non-constant-gp" -#: elf32-ia64.c:5412 elf64-ia64.c:5412 +#: elf32-ia64.c:5409 elf64-ia64.c:5409 msgid "%B: linking auto-pic files with non-auto-pic files" msgstr "%B: đang liên kết tập tin auto-pic với tập tin non-auto-pic" -#: peigen.c:1000 pepigen.c:1000 pex64igen.c:1000 +#: peigen.c:999 pepigen.c:999 pex64igen.c:999 #, c-format msgid "%s: line number overflow: 0x%lx > 0xffff" msgstr "%s: tràn số thứ tự dòng: 0x%lx > 0xffff" -#: peigen.c:1027 pepigen.c:1027 pex64igen.c:1027 +#: peigen.c:1026 pepigen.c:1026 pex64igen.c:1026 msgid "Export Directory [.edata (or where ever we found it)]" msgstr "Thư mục Xuất [.edata (hoặc ở nơi nào chúng ta đã tìm nó)]" -#: peigen.c:1028 pepigen.c:1028 pex64igen.c:1028 +#: peigen.c:1027 pepigen.c:1027 pex64igen.c:1027 msgid "Import Directory [parts of .idata]" msgstr "Thư mục Nhập [các phần của .idata]" -#: peigen.c:1029 pepigen.c:1029 pex64igen.c:1029 +#: peigen.c:1028 pepigen.c:1028 pex64igen.c:1028 msgid "Resource Directory [.rsrc]" msgstr "Thư mục Tài nguyên [.rsrc]" -#: peigen.c:1030 pepigen.c:1030 pex64igen.c:1030 +#: peigen.c:1029 pepigen.c:1029 pex64igen.c:1029 msgid "Exception Directory [.pdata]" msgstr "Thư mục Ngoại lệ [.pdata]" -#: peigen.c:1031 pepigen.c:1031 pex64igen.c:1031 +#: peigen.c:1030 pepigen.c:1030 pex64igen.c:1030 msgid "Security Directory" msgstr "Thư mục Bảo mật" -#: peigen.c:1032 pepigen.c:1032 pex64igen.c:1032 +#: peigen.c:1031 pepigen.c:1031 pex64igen.c:1031 msgid "Base Relocation Directory [.reloc]" msgstr "Thư mục Định vị lại Cơ bản [.reloc]" -#: peigen.c:1033 pepigen.c:1033 pex64igen.c:1033 +#: peigen.c:1032 pepigen.c:1032 pex64igen.c:1032 msgid "Debug Directory" msgstr "Thư mục Gỡ lỗi" -#: peigen.c:1034 pepigen.c:1034 pex64igen.c:1034 +#: peigen.c:1033 pepigen.c:1033 pex64igen.c:1033 msgid "Description Directory" msgstr "Thư mục Mô tả" -#: peigen.c:1035 pepigen.c:1035 pex64igen.c:1035 +#: peigen.c:1034 pepigen.c:1034 pex64igen.c:1034 msgid "Special Directory" msgstr "Thư mục Đặc biệt" -#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036 +#: peigen.c:1035 pepigen.c:1035 pex64igen.c:1035 msgid "Thread Storage Directory [.tls]" msgstr "Thư mục Lưu trữ Mạch [.tls]" -#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037 +#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036 msgid "Load Configuration Directory" msgstr "Thư mục Cấu hình Nạp" -#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038 +#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037 msgid "Bound Import Directory" msgstr "Thư mục Nhập đã Đóng kết" -#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039 +#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038 msgid "Import Address Table Directory" msgstr "Thư mục Bảng Địa chỉ Nhập" -#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040 +#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039 msgid "Delay Import Directory" msgstr "Thư mục Nhập Hoãn" -#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041 +#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040 msgid "CLR Runtime Header" msgstr "Phần đầu Lúc chạy CLR" -#: peigen.c:1042 pepigen.c:1042 pex64igen.c:1042 +#: peigen.c:1041 pepigen.c:1041 pex64igen.c:1041 msgid "Reserved" msgstr "Dành riêng" -#: peigen.c:1102 pepigen.c:1102 pex64igen.c:1102 +#: peigen.c:1101 pepigen.c:1101 pex64igen.c:1101 #, c-format msgid "" "\n" @@ -3539,7 +3848,7 @@ msgstr "" "\n" "Có một bảng nhập, nhưng không tìm thấy phần chứa nó\n" -#: peigen.c:1107 pepigen.c:1107 pex64igen.c:1107 +#: peigen.c:1106 pepigen.c:1106 pex64igen.c:1106 #, c-format msgid "" "\n" @@ -3548,7 +3857,7 @@ msgstr "" "\n" "Có một bảng nhập trong %s tại 0x%lx\n" -#: peigen.c:1150 pepigen.c:1150 pex64igen.c:1150 +#: peigen.c:1149 pepigen.c:1149 pex64igen.c:1149 #, c-format msgid "" "\n" @@ -3557,12 +3866,12 @@ msgstr "" "\n" "Bộ mô tả hàm được tìm tại địa chỉ đầu : %04lx\n" -#: peigen.c:1153 pepigen.c:1153 pex64igen.c:1153 +#: peigen.c:1152 pepigen.c:1152 pex64igen.c:1152 #, c-format msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n" msgstr "\tcơ bản mã %08lx toc (nạp được/thật) %08lx/%08lx\n" -#: peigen.c:1161 pepigen.c:1161 pex64igen.c:1161 +#: peigen.c:1160 pepigen.c:1160 pex64igen.c:1160 #, c-format msgid "" "\n" @@ -3571,7 +3880,7 @@ msgstr "" "\n" "Không có phần reldata ! Vì thế chưa giải mã bộ mô tả hàm.\n" -#: peigen.c:1166 pepigen.c:1166 pex64igen.c:1166 +#: peigen.c:1165 pepigen.c:1165 pex64igen.c:1165 #, c-format msgid "" "\n" @@ -3580,7 +3889,7 @@ msgstr "" "\n" "Các Bảng Nhập (phiên dịch %s nội dung phần)\n" -#: peigen.c:1169 pepigen.c:1169 pex64igen.c:1169 +#: peigen.c:1168 pepigen.c:1168 pex64igen.c:1168 #, c-format msgid "" " vma: Hint Time Forward DLL First\n" @@ -3589,7 +3898,7 @@ msgstr "" " vma: Gợi ý Giờ Tiếp DLL Đầu\n" " Bảng Nhãn Dây Tên Thunk\n" -#: peigen.c:1217 pepigen.c:1217 pex64igen.c:1217 +#: peigen.c:1216 pepigen.c:1216 pex64igen.c:1216 #, c-format msgid "" "\n" @@ -3598,12 +3907,12 @@ msgstr "" "\n" "\tTên DLL: %s\n" -#: peigen.c:1228 pepigen.c:1228 pex64igen.c:1228 +#: peigen.c:1227 pepigen.c:1227 pex64igen.c:1227 #, c-format msgid "\tvma: Hint/Ord Member-Name Bound-To\n" msgstr "\tvma: Gợi_ý/Thứ_tự Tên_thành_viên Đóng_kết_với\n" -#: peigen.c:1253 pepigen.c:1253 pex64igen.c:1253 +#: peigen.c:1252 pepigen.c:1252 pex64igen.c:1252 #, c-format msgid "" "\n" @@ -3612,7 +3921,7 @@ msgstr "" "\n" "Có một thunk đầu tiên, nhưng không tìm thấy phần chứa nó\n" -#: peigen.c:1418 pepigen.c:1418 pex64igen.c:1418 +#: peigen.c:1417 pepigen.c:1417 pex64igen.c:1417 #, c-format msgid "" "\n" @@ -3621,7 +3930,7 @@ msgstr "" "\n" "Có một bảng xuất, nhưng không tìm thấy phần chứa nó\n" -#: peigen.c:1427 pepigen.c:1427 pex64igen.c:1427 +#: peigen.c:1426 pepigen.c:1426 pex64igen.c:1426 #, c-format msgid "" "\n" @@ -3630,7 +3939,7 @@ msgstr "" "\n" "Có một bảng xuất trong %s, nhưng nó không vừa trong phần đó\n" -#: peigen.c:1433 pepigen.c:1433 pex64igen.c:1433 +#: peigen.c:1432 pepigen.c:1432 pex64igen.c:1432 #, c-format msgid "" "\n" @@ -3639,7 +3948,7 @@ msgstr "" "\n" "Có một bảng xuất trong %s tại 0x%lx\n" -#: peigen.c:1461 pepigen.c:1461 pex64igen.c:1461 +#: peigen.c:1460 pepigen.c:1460 pex64igen.c:1460 #, c-format msgid "" "\n" @@ -3649,67 +3958,67 @@ msgstr "" "\n" "Các Bảng Xuất (phiên dịch %s nội dung phần)\n" -#: peigen.c:1465 pepigen.c:1465 pex64igen.c:1465 +#: peigen.c:1464 pepigen.c:1464 pex64igen.c:1464 #, c-format msgid "Export Flags \t\t\t%lx\n" msgstr "Cờ xuất \t\t\t%lx\n" -#: peigen.c:1468 pepigen.c:1468 pex64igen.c:1468 +#: peigen.c:1467 pepigen.c:1467 pex64igen.c:1467 #, c-format msgid "Time/Date stamp \t\t%lx\n" msgstr "Nhãn Ngày/Giờ \t\t%lx\n" -#: peigen.c:1471 pepigen.c:1471 pex64igen.c:1471 +#: peigen.c:1470 pepigen.c:1470 pex64igen.c:1470 #, c-format msgid "Major/Minor \t\t\t%d/%d\n" msgstr "Chính/Phụ \t\t\t%d/%d\n" -#: peigen.c:1474 pepigen.c:1474 pex64igen.c:1474 +#: peigen.c:1473 pepigen.c:1473 pex64igen.c:1473 #, c-format msgid "Name \t\t\t\t" msgstr "Tên \t\t\t\t" -#: peigen.c:1480 pepigen.c:1480 pex64igen.c:1480 +#: peigen.c:1479 pepigen.c:1479 pex64igen.c:1479 #, c-format msgid "Ordinal Base \t\t\t%ld\n" msgstr "Cơ bản thứ tự \t\t\t%ld\n" -#: peigen.c:1483 pepigen.c:1483 pex64igen.c:1483 +#: peigen.c:1482 pepigen.c:1482 pex64igen.c:1482 #, c-format msgid "Number in:\n" msgstr "Số trong:\n" -#: peigen.c:1486 pepigen.c:1486 pex64igen.c:1486 +#: peigen.c:1485 pepigen.c:1485 pex64igen.c:1485 #, c-format msgid "\tExport Address Table \t\t%08lx\n" msgstr "\tBảng Địa chỉ Xuất \t\t%08lx\n" -#: peigen.c:1490 pepigen.c:1490 pex64igen.c:1490 +#: peigen.c:1489 pepigen.c:1489 pex64igen.c:1489 #, c-format msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n" msgstr "\t[Cái_chỉ_tên/Thứ_tự] Bảng\t%08lx\n" -#: peigen.c:1493 pepigen.c:1493 pex64igen.c:1493 +#: peigen.c:1492 pepigen.c:1492 pex64igen.c:1492 #, c-format msgid "Table Addresses\n" msgstr "Địa chỉ bảng\n" -#: peigen.c:1496 pepigen.c:1496 pex64igen.c:1496 +#: peigen.c:1495 pepigen.c:1495 pex64igen.c:1495 #, c-format msgid "\tExport Address Table \t\t" msgstr "\tBảng Địa chỉ Xuất \t\t" -#: peigen.c:1501 pepigen.c:1501 pex64igen.c:1501 +#: peigen.c:1500 pepigen.c:1500 pex64igen.c:1500 #, c-format msgid "\tName Pointer Table \t\t" msgstr "\tBảng Cái Chỉ Tên \t\t" -#: peigen.c:1506 pepigen.c:1506 pex64igen.c:1506 +#: peigen.c:1505 pepigen.c:1505 pex64igen.c:1505 #, c-format msgid "\tOrdinal Table \t\t\t" msgstr "\tBảng Thứ Tự \t\t\t" -#: peigen.c:1520 pepigen.c:1520 pex64igen.c:1520 +#: peigen.c:1519 pepigen.c:1519 pex64igen.c:1519 #, c-format msgid "" "\n" @@ -3718,15 +4027,15 @@ msgstr "" "\n" "Bảng Địa chỉ Xuất — Cơ bản Thứ tự %ld\n" -#: peigen.c:1539 pepigen.c:1539 pex64igen.c:1539 +#: peigen.c:1538 pepigen.c:1538 pex64igen.c:1538 msgid "Forwarder RVA" msgstr "Bộ chuyển tiếp RVA" -#: peigen.c:1550 pepigen.c:1550 pex64igen.c:1550 +#: peigen.c:1549 pepigen.c:1549 pex64igen.c:1549 msgid "Export RVA" msgstr "Xuất RVA" -#: peigen.c:1557 pepigen.c:1557 pex64igen.c:1557 +#: peigen.c:1556 pepigen.c:1556 pex64igen.c:1556 #, c-format msgid "" "\n" @@ -3735,28 +4044,18 @@ msgstr "" "\n" "Bảng [Cái chỉ Thứ tự/Tên]\n" -#: peigen.c:1617 peigen.c:1796 pepigen.c:1617 pepigen.c:1796 pex64igen.c:1617 -#: pex64igen.c:1796 +#: peigen.c:1616 peigen.c:1795 pepigen.c:1616 pepigen.c:1795 pex64igen.c:1616 +#: pex64igen.c:1795 #, c-format msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n" msgstr "Cảnh báo : kích cỡ phần .pdata (%ld) không phải là bội số cho %d\n" -#: peigen.c:1621 peigen.c:1800 pepigen.c:1621 pepigen.c:1800 pex64igen.c:1621 -#: pex64igen.c:1800 -#, c-format -msgid "" -"\n" -"The Function Table (interpreted .pdata section contents)\n" -msgstr "" -"\n" -"Bảng Hàm (phiên dịch nội dung phần .pdata)\n" - -#: peigen.c:1624 pepigen.c:1624 pex64igen.c:1624 +#: peigen.c:1623 pepigen.c:1623 pex64igen.c:1623 #, c-format msgid " vma:\t\t\tBegin Address End Address Unwind Info\n" msgstr " vma:\t\t\tĐịa chi đầu Địa chỉ cuối Thông tin tháo ra\n" -#: peigen.c:1626 pepigen.c:1626 pex64igen.c:1626 +#: peigen.c:1625 pepigen.c:1625 pex64igen.c:1625 #, c-format msgid "" " vma:\t\tBegin End EH EH PrologEnd Exception\n" @@ -3765,22 +4064,22 @@ msgstr "" " vma:\t\tĐầu Cuối EH EH PrologEnd Ngoại lệ\n" " \t\tĐịa chỉ Địa chỉ Bộ quản lý Dữ liệu Địa chỉ Mặt nạ\n" -#: peigen.c:1696 pepigen.c:1696 pex64igen.c:1696 +#: peigen.c:1695 pepigen.c:1695 pex64igen.c:1695 #, c-format msgid " Register save millicode" msgstr " Mili-mã lưu thanh ghi" -#: peigen.c:1699 pepigen.c:1699 pex64igen.c:1699 +#: peigen.c:1698 pepigen.c:1698 pex64igen.c:1698 #, c-format msgid " Register restore millicode" msgstr " Mili-mã phục hồi thanh ghi" -#: peigen.c:1702 pepigen.c:1702 pex64igen.c:1702 +#: peigen.c:1701 pepigen.c:1701 pex64igen.c:1701 #, c-format msgid " Glue code sequence" msgstr " Dãy mã nối lại" -#: peigen.c:1802 pepigen.c:1802 pex64igen.c:1802 +#: peigen.c:1801 pepigen.c:1801 pex64igen.c:1801 #, c-format msgid "" " vma:\t\tBegin Prolog Function Flags Exception EH\n" @@ -3826,22 +4125,22 @@ msgstr "" "\n" "Đặc tính 0x%x\n" -#: peigen.c:2289 pepigen.c:2289 pex64igen.c:2289 +#: peigen.c:2292 pepigen.c:2292 pex64igen.c:2292 msgid "%B: unable to fill in DataDictionary[1] because .idata$2 is missing" msgstr "%B: không thể điền vào DataDictionary[1] vì .idata$2 còn thiếu" -#: peigen.c:2307 pepigen.c:2307 pex64igen.c:2307 +#: peigen.c:2312 pepigen.c:2312 pex64igen.c:2312 msgid "%B: unable to fill in DataDictionary[1] because .idata$4 is missing" msgstr "%B: không thể điền vào DataDictionary[1] vì .idata$4 còn thiếu" -#: peigen.c:2326 pepigen.c:2326 pex64igen.c:2326 +#: peigen.c:2333 pepigen.c:2333 pex64igen.c:2333 msgid "%B: unable to fill in DataDictionary[12] because .idata$5 is missing" msgstr "%B: không thể điền vào DataDictionary[12] vì .idata$5 còn thiếu" -#: peigen.c:2344 pepigen.c:2344 pex64igen.c:2344 +#: peigen.c:2353 pepigen.c:2353 pex64igen.c:2353 msgid "%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing" msgstr "%B: không thể điền vào DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] vì .idata$6 còn thiếu" -#: peigen.c:2364 pepigen.c:2364 pex64igen.c:2364 +#: peigen.c:2375 pepigen.c:2375 pex64igen.c:2375 msgid "%B: unable to fill in DataDictionary[9] because __tls_used is missing" msgstr "%B: không thể điền vào DataDictionary[9] vì __tls_used còn thiếu" diff --git a/cegcc/src/binutils/bfd/ppcboot.c b/cegcc/src/binutils/bfd/ppcboot.c index d51280c8d..0d9a3bcdf 100644 --- a/cegcc/src/binutils/bfd/ppcboot.c +++ b/cegcc/src/binutils/bfd/ppcboot.c @@ -1,6 +1,6 @@ /* BFD back-end for PPCbug boot records. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, - 2007, 2008 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008, 2009 Free Software Foundation, Inc. Written by Michael Meissner, Cygnus Support, This file is part of BFD, the Binary File Descriptor library. @@ -475,6 +475,7 @@ ppcboot_bfd_print_private_bfd_data (abfd, farg) #define ppcboot_bfd_discard_group bfd_generic_discard_group #define ppcboot_section_already_linked \ _bfd_generic_section_already_linked +#define ppcboot_bfd_define_common_symbol bfd_generic_define_common_symbol #define ppcboot_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define ppcboot_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/ptrace-core.c b/cegcc/src/binutils/bfd/ptrace-core.c index a1aa34ce9..ce621547f 100644 --- a/cegcc/src/binutils/bfd/ptrace-core.c +++ b/cegcc/src/binutils/bfd/ptrace-core.c @@ -1,6 +1,6 @@ /* BFD backend for core files which use the ptrace_user structure Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, - 2006, 2007 Free Software Foundation, Inc. + 2005, 2006, 2007 Free Software Foundation, Inc. The structure of this file is based on trad-core.c written by John Gilmore of Cygnus Support. Modified to work with the ptrace_user structure by Kevin A. Buettner. diff --git a/cegcc/src/binutils/bfd/reloc.c b/cegcc/src/binutils/bfd/reloc.c index 0c0fb1d31..0ea7a85c1 100644 --- a/cegcc/src/binutils/bfd/reloc.c +++ b/cegcc/src/binutils/bfd/reloc.c @@ -1,6 +1,6 @@ /* BFD support for handling relocation entries. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -2017,6 +2017,8 @@ ENUMX BFD_RELOC_SPU_PPU32 ENUMX BFD_RELOC_SPU_PPU64 +ENUMX + BFD_RELOC_SPU_ADD_PIC ENUMDOC SPU Relocations. @@ -2110,6 +2112,30 @@ ENUMDOC STO_ALPHA_STD_GPLOAD. ENUM + BFD_RELOC_ALPHA_NOP +ENUMDOC + The NOP relocation outputs a NOP if the longword displacement + between two procedure entry points is < 2^21. + +ENUM + BFD_RELOC_ALPHA_BSR +ENUMDOC + The BSR relocation outputs a BSR if the longword displacement + between two procedure entry points is < 2^21. + +ENUM + BFD_RELOC_ALPHA_LDA +ENUMDOC + The LDA relocation outputs a LDA if the longword displacement + between two procedure entry points is < 2^16. + +ENUM + BFD_RELOC_ALPHA_BOH +ENUMDOC + The BOH relocation outputs a BSR if the longword displacement + between two procedure entry points is < 2^21, or else a hint. + +ENUM BFD_RELOC_ALPHA_TLSGD ENUMX BFD_RELOC_ALPHA_TLSLDM @@ -2292,6 +2318,12 @@ ENUMDOC COMMENT ENUM + BFD_RELOC_MOXIE_10_PCREL +ENUMDOC + Moxie ELF relocations. +COMMENT + +ENUM BFD_RELOC_FRV_LABEL16 ENUMX BFD_RELOC_FRV_LABEL24 @@ -2468,6 +2500,8 @@ ENUMX BFD_RELOC_386_TLS_DESC_CALL ENUMX BFD_RELOC_386_TLS_DESC +ENUMX + BFD_RELOC_386_IRELATIVE ENUMDOC i386/elf relocations @@ -2523,6 +2557,8 @@ ENUMX BFD_RELOC_X86_64_TLSDESC_CALL ENUMX BFD_RELOC_X86_64_TLSDESC +ENUMX + BFD_RELOC_X86_64_IRELATIVE ENUMDOC x86-64/elf relocations @@ -2687,6 +2723,10 @@ ENUMDOC ENUM BFD_RELOC_PPC_TLS ENUMX + BFD_RELOC_PPC_TLSGD +ENUMX + BFD_RELOC_PPC_TLSLD +ENUMX BFD_RELOC_PPC_DTPMOD ENUMX BFD_RELOC_PPC_TPREL16 @@ -4012,6 +4052,57 @@ ENUMDOC instructions ENUM + BFD_RELOC_RX_NEG8 +ENUMX + BFD_RELOC_RX_NEG16 +ENUMX + BFD_RELOC_RX_NEG24 +ENUMX + BFD_RELOC_RX_NEG32 +ENUMX + BFD_RELOC_RX_16_OP +ENUMX + BFD_RELOC_RX_24_OP +ENUMX + BFD_RELOC_RX_32_OP +ENUMX + BFD_RELOC_RX_8U +ENUMX + BFD_RELOC_RX_16U +ENUMX + BFD_RELOC_RX_24U +ENUMX + BFD_RELOC_RX_DIR3U_PCREL +ENUMX + BFD_RELOC_RX_DIFF +ENUMX + BFD_RELOC_RX_GPRELB +ENUMX + BFD_RELOC_RX_GPRELW +ENUMX + BFD_RELOC_RX_GPRELL +ENUMX + BFD_RELOC_RX_SYM +ENUMX + BFD_RELOC_RX_OP_SUBTRACT +ENUMX + BFD_RELOC_RX_ABS8 +ENUMX + BFD_RELOC_RX_ABS16 +ENUMX + BFD_RELOC_RX_ABS32 +ENUMX + BFD_RELOC_RX_ABS16U +ENUMX + BFD_RELOC_RX_ABS16UW +ENUMX + BFD_RELOC_RX_ABS16UL +ENUMX + BFD_RELOC_RX_RELAX +ENUMDOC + Renesas RX Relocations. + +ENUM BFD_RELOC_390_12 ENUMDOC Direct 12 bit. @@ -4171,12 +4262,9 @@ ENUMDOC Long displacement extension. ENUM - BFD_RELOC_SCORE_DUMMY1 -ENUMDOC - Score relocations -ENUM BFD_RELOC_SCORE_GPREL15 ENUMDOC + Score relocations Low 16 bit for load/store ENUM BFD_RELOC_SCORE_DUMMY2 @@ -4189,6 +4277,14 @@ ENUM ENUMDOC This is a 19-bit reloc with the right 1 bit assumed to be 0 ENUM + BFD_RELOC_SCORE_IMM30 +ENUMDOC + This is a 32-bit reloc for 48-bit instructions. +ENUM + BFD_RELOC_SCORE_IMM32 +ENUMDOC + This is a 32-bit reloc for 48-bit instructions. +ENUM BFD_RELOC_SCORE16_JMP ENUMDOC This is a 11-bit reloc with the right 1 bit assumed to be 0 @@ -4197,6 +4293,10 @@ ENUM ENUMDOC This is a 8-bit reloc with the right 1 bit assumed to be 0 ENUM + BFD_RELOC_SCORE_BCMP +ENUMDOC + This is a 9-bit reloc with the right 1 bit assumed to be 0 +ENUM BFD_RELOC_SCORE_GOT15 ENUMX BFD_RELOC_SCORE_GOT_LO16 @@ -5133,7 +5233,85 @@ ENUMX BFD_RELOC_LM32_RELATIVE ENUMDOC Lattice Mico32 relocations. - + +ENUM + BFD_RELOC_MACH_O_SECTDIFF +ENUMDOC + Difference between two section addreses. Must be followed by a + BFD_RELOC_MACH_O_PAIR. +ENUM + BFD_RELOC_MACH_O_PAIR +ENUMDOC + Mach-O generic relocations. + +ENUM + BFD_RELOC_MICROBLAZE_32_LO +ENUMDOC + This is a 32 bit reloc for the microblaze that stores the + low 16 bits of a value +ENUM + BFD_RELOC_MICROBLAZE_32_LO_PCREL +ENUMDOC + This is a 32 bit pc-relative reloc for the microblaze that + stores the low 16 bits of a value +ENUM + BFD_RELOC_MICROBLAZE_32_ROSDA +ENUMDOC + This is a 32 bit reloc for the microblaze that stores a + value relative to the read-only small data area anchor +ENUM + BFD_RELOC_MICROBLAZE_32_RWSDA +ENUMDOC + This is a 32 bit reloc for the microblaze that stores a + value relative to the read-write small data area anchor +ENUM + BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM +ENUMDOC + This is a 32 bit reloc for the microblaze to handle + expressions of the form "Symbol Op Symbol" +ENUM + BFD_RELOC_MICROBLAZE_64_NONE +ENUMDOC + This is a 64 bit reloc that stores the 32 bit pc relative + value in two words (with an imm instruction). No relocation is + done here - only used for relaxing +ENUM + BFD_RELOC_MICROBLAZE_64_GOTPC +ENUMDOC + This is a 64 bit reloc that stores the 32 bit pc relative + value in two words (with an imm instruction). The relocation is + PC-relative GOT offset +ENUM + BFD_RELOC_MICROBLAZE_64_GOT +ENUMDOC + This is a 64 bit reloc that stores the 32 bit pc relative + value in two words (with an imm instruction). The relocation is + GOT offset +ENUM + BFD_RELOC_MICROBLAZE_64_PLT +ENUMDOC + This is a 64 bit reloc that stores the 32 bit pc relative + value in two words (with an imm instruction). The relocation is + PC-relative offset into PLT +ENUM + BFD_RELOC_MICROBLAZE_64_GOTOFF +ENUMDOC + This is a 64 bit reloc that stores the 32 bit GOT relative + value in two words (with an imm instruction). The relocation is + relative offset from _GLOBAL_OFFSET_TABLE_ +ENUM + BFD_RELOC_MICROBLAZE_32_GOTOFF +ENUMDOC + This is a 32 bit reloc that stores the 32 bit GOT relative + value in a word. The relocation is relative offset from + _GLOBAL_OFFSET_TABLE_ +ENUM + BFD_RELOC_MICROBLAZE_COPY +ENUMDOC + This is used to tell the dynamic linker to copy the value out of + the dynamic object into the runtime process image. + + ENDSENUM BFD_RELOC_UNUSED CODE_FRAGMENT @@ -5254,6 +5432,10 @@ bfd_generic_relax_section (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *link_info ATTRIBUTE_UNUSED, bfd_boolean *again) { + if (link_info->relocatable) + (*link_info->callbacks->einfo) + (_("%P%F: --relax and -r may not be used together\n")); + *again = FALSE; return TRUE; } @@ -5344,7 +5526,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd, if (reloc_size == 0) return data; - reloc_vector = bfd_malloc (reloc_size); + reloc_vector = (arelent **) bfd_malloc (reloc_size); if (reloc_vector == NULL) return NULL; diff --git a/cegcc/src/binutils/bfd/reloc16.c b/cegcc/src/binutils/bfd/reloc16.c index b4087cbd5..768b288d8 100644 --- a/cegcc/src/binutils/bfd/reloc16.c +++ b/cegcc/src/binutils/bfd/reloc16.c @@ -1,6 +1,6 @@ /* 8 and 16 bit COFF relocation functions, for BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, - 2002, 2003, 2004, 2007 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -157,6 +157,10 @@ bfd_coff_reloc16_relax_section (abfd, input_section, link_info, again) arelent **reloc_vector = NULL; long reloc_count; + if (link_info->relocatable) + (*link_info->callbacks->einfo) + (_("%P%F: --relax and -r may not be used together\n")); + /* We only do global relaxation once. It is not safe to do it multiple times (see discussion of the "shrinks" array below). */ *again = FALSE; diff --git a/cegcc/src/binutils/bfd/rs6000-core.c b/cegcc/src/binutils/bfd/rs6000-core.c index ad7bef9e1..d9c06b6c1 100644 --- a/cegcc/src/binutils/bfd/rs6000-core.c +++ b/cegcc/src/binutils/bfd/rs6000-core.c @@ -1,6 +1,6 @@ /* IBM RS/6000 "XCOFF" back-end for BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, - 2001, 2002, 2004, 2006, 2007, 2008 + 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore. Archive support from Damon A. Permezel. @@ -107,9 +107,9 @@ typedef union { typedef union { #ifdef AIX_CORE_DUMPX_CORE - struct core_dumpx new; /* new AIX 4.3+ core dump */ + struct core_dumpx new_dump; /* new AIX 4.3+ core dump */ #else - struct core_dump new; /* for simpler coding */ + struct core_dump new_dump; /* for simpler coding */ #endif struct core_dump old; /* old AIX 4.2- core dump, still used on 4.3+ with appropriate SMIT config */ @@ -120,9 +120,9 @@ typedef union { #ifdef CORE_VERSION_1 typedef union { #ifdef AIX_CORE_DUMPX_CORE - struct vm_infox new; + struct vm_infox new_dump; #else - struct vm_info new; + struct vm_info new_dump; #endif struct vm_info old; } VmInfo; @@ -144,7 +144,7 @@ typedef union { #ifdef AIX_5_CORE # define CORE_DUMPXX_VERSION 267312562 -# define CNEW_IS_CORE_DUMPXX(c) ((c).new.c_version == CORE_DUMPXX_VERSION) +# define CNEW_IS_CORE_DUMPXX(c) ((c).new_dump.c_version == CORE_DUMPXX_VERSION) #else # define CNEW_IS_CORE_DUMPXX(c) 0 #endif @@ -291,7 +291,7 @@ read_hdr (bfd *abfd, CoreHdr *core) /* Read the trailing portion of the structure. */ if (CORE_NEW (*core)) - size = sizeof (core->new); + size = sizeof (core->new_dump); else size = sizeof (core->old); size -= CORE_COMMONSZ; @@ -352,13 +352,13 @@ rs6000coff_core_p (bfd *abfd) /* Copy fields from new or old core structure. */ if (CORE_NEW (core)) { - c_flag = core.new.c_flag; - c_stack = (file_ptr) core.new.c_stack; - c_size = core.new.c_size; - c_stackend = CNEW_STACKORG (core.new) + c_size; - c_lsize = CNEW_LSIZE (core.new); - c_loader = CNEW_LOADER (core.new); - proc64 = CNEW_PROC64 (core.new); + c_flag = core.new_dump.c_flag; + c_stack = (file_ptr) core.new_dump.c_stack; + c_size = core.new_dump.c_size; + c_stackend = CNEW_STACKORG (core.new_dump) + c_size; + c_lsize = CNEW_LSIZE (core.new_dump); + c_loader = CNEW_LOADER (core.new_dump); + proc64 = CNEW_PROC64 (core.new_dump); } else { @@ -373,13 +373,13 @@ rs6000coff_core_p (bfd *abfd) if (proc64) { - c_regsize = sizeof (CNEW_CONTEXT64 (core.new)); - c_regptr = &CNEW_CONTEXT64 (core.new); + c_regsize = sizeof (CNEW_CONTEXT64 (core.new_dump)); + c_regptr = &CNEW_CONTEXT64 (core.new_dump); } else if (CORE_NEW (core)) { - c_regsize = sizeof (CNEW_MSTSAVE (core.new)); - c_regptr = &CNEW_MSTSAVE (core.new); + c_regsize = sizeof (CNEW_MSTSAVE (core.new_dump)); + c_regptr = &CNEW_MSTSAVE (core.new_dump); } else { @@ -449,7 +449,7 @@ rs6000coff_core_p (bfd *abfd) bfd_get_filename (abfd)); /* Allocate core file header. */ - size = CORE_NEW (core) ? sizeof (core.new) : sizeof (core.old); + size = CORE_NEW (core) ? sizeof (core.new_dump) : sizeof (core.old); tmpptr = (char *) bfd_zalloc (abfd, (bfd_size_type) size); if (!tmpptr) return NULL; @@ -464,7 +464,7 @@ rs6000coff_core_p (bfd *abfd) enum bfd_architecture arch; unsigned long mach; - switch (CNEW_IMPL (core.new)) + switch (CNEW_IMPL (core.new_dump)) { case POWER_RS1: case POWER_RSC: @@ -537,10 +537,10 @@ rs6000coff_core_p (bfd *abfd) if (CORE_NEW (core)) { - c_datasize = CNEW_DATASIZE (core.new); - c_data = (file_ptr) core.new.c_data; - c_vmregions = core.new.c_vmregions; - c_vmm = (file_ptr) core.new.c_vmm; + c_datasize = CNEW_DATASIZE (core.new_dump); + c_data = (file_ptr) core.new_dump.c_data; + c_vmregions = core.new_dump.c_vmregions; + c_vmm = (file_ptr) core.new_dump.c_vmm; } else { @@ -615,15 +615,15 @@ rs6000coff_core_p (bfd *abfd) file_ptr vminfo_offset; bfd_vma vminfo_addr; - size = CORE_NEW (core) ? sizeof (vminfo.new) : sizeof (vminfo.old); + size = CORE_NEW (core) ? sizeof (vminfo.new_dump) : sizeof (vminfo.old); if (bfd_bread (&vminfo, size, abfd) != size) goto fail; if (CORE_NEW (core)) { - vminfo_addr = (bfd_vma) vminfo.new.vminfo_addr; - vminfo_size = vminfo.new.vminfo_size; - vminfo_offset = vminfo.new.vminfo_offset; + vminfo_addr = (bfd_vma) vminfo.new_dump.vminfo_addr; + vminfo_size = vminfo.new_dump.vminfo_size; + vminfo_offset = vminfo.new_dump.vminfo_offset; } else { @@ -669,11 +669,11 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) return FALSE; if (CORE_NEW (core)) - c_loader = CNEW_LOADER (core.new); + c_loader = CNEW_LOADER (core.new_dump); else c_loader = (file_ptr) (ptr_to_uint) COLD_LOADER (core.old); - if (CORE_NEW (core) && CNEW_PROC64 (core.new)) + if (CORE_NEW (core) && CNEW_PROC64 (core.new_dump)) size = (int) ((LdInfo *) 0)->l64.ldinfo_filename; else size = (int) ((LdInfo *) 0)->l32.ldinfo_filename; @@ -735,7 +735,7 @@ rs6000coff_core_file_failing_command (bfd *abfd) { CoreHdr *core = core_hdr (abfd); char *com = CORE_NEW (*core) ? - CNEW_COMM (core->new) : COLD_COMM (core->old); + CNEW_COMM (core->new_dump) : COLD_COMM (core->old); if (*com) return com; @@ -747,7 +747,7 @@ int rs6000coff_core_file_failing_signal (bfd *abfd) { CoreHdr *core = core_hdr (abfd); - return CORE_NEW (*core) ? core->new.c_signo : core->old.c_signo; + return CORE_NEW (*core) ? core->new_dump.c_signo : core->old.c_signo; } #endif /* AIX_CORE */ diff --git a/cegcc/src/binutils/bfd/section.c b/cegcc/src/binutils/bfd/section.c index cadba6b6d..d92dc2d4d 100644 --- a/cegcc/src/binutils/bfd/section.c +++ b/cegcc/src/binutils/bfd/section.c @@ -1,6 +1,6 @@ /* Object file "section" support for the BFD library. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -343,6 +343,10 @@ CODE_FRAGMENT . TMS320C54X only. *} .#define SEC_TIC54X_CLINK 0x20000000 . +. {* Indicate that section has the no read flag set. This happens +. when memory read flag isn't set. *} +.#define SEC_COFF_NOREAD 0x40000000 +. . {* End of section flags. *} . . {* Some internal packed boolean fields. *} @@ -382,6 +386,9 @@ CODE_FRAGMENT . {* Nonzero if this section has TLS related relocations. *} . unsigned int has_tls_reloc:1; . +. {* Nonzero if this section has a call to __tls_get_addr. *} +. unsigned int has_tls_get_addr_call:1; +. . {* Nonzero if this section has a gp reloc. *} . unsigned int has_gp_reloc:1; . @@ -421,6 +428,13 @@ CODE_FRAGMENT . section size calculated on a previous linker relaxation pass. *} . bfd_size_type rawsize; . +. {* Relaxation table. *} +. struct relax_table *relax; +. +. {* Count of used relaxation table entries. *} +. int relax_count; +. +. . {* If this section is going to be output, then this value is the . offset in *bytes* into the output section of the first byte in the . input section (byte ==> smallest addressable unit on the @@ -510,6 +524,17 @@ CODE_FRAGMENT . } map_head, map_tail; .} asection; . +.{* Relax table contains information about instructions which can +. be removed by relaxation -- replacing a long address with a +. short address. *} +.struct relax_table { +. {* Address where bytes may be deleted. *} +. bfd_vma addr; +. +. {* Number of bytes to be deleted. *} +. int size; +.}; +. .{* These sections are global, and are managed by BFD. The application . and target back end are not permitted to change the values in . these sections. New code should use the section_ptr macros rather @@ -642,11 +667,11 @@ CODE_FRAGMENT . {* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, *} \ . 0, 0, 0, 0, \ . \ -. {* has_gp_reloc, need_finalize_relax, reloc_done, *} \ -. 0, 0, 0, \ +. {* has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, *} \ +. 0, 0, 0, \ . \ -. {* vma, lma, size, rawsize *} \ -. 0, 0, 0, 0, \ +. {* reloc_done, vma, lma, size, rawsize, relax, relax_count, *} \ +. 0, 0, 0, 0, 0, 0, 0, \ . \ . {* output_offset, output_section, alignment_power, *} \ . 0, (struct bfd_section *) &SEC, 0, \ @@ -912,7 +937,7 @@ bfd_get_unique_section_name (bfd *abfd, const char *templat, int *count) char *sname; len = strlen (templat); - sname = bfd_malloc (len + 8); + sname = (char *) bfd_malloc (len + 8); if (sname == NULL) return NULL; memcpy (sname, templat, len); @@ -1429,6 +1454,16 @@ bfd_get_section_contents (bfd *abfd, if ((section->flags & SEC_IN_MEMORY) != 0) { + if (section->contents == NULL) + { + /* This can happen because of errors earlier on in the linking process. + We do not want to seg-fault here, so clear the flag and return an + error code. */ + section->flags &= ~ SEC_IN_MEMORY; + bfd_set_error (bfd_error_invalid_operation); + return FALSE; + } + memcpy (location, section->contents + offset, (size_t) count); return TRUE; } @@ -1460,7 +1495,8 @@ bfd_malloc_and_get_section (bfd *abfd, sec_ptr sec, bfd_byte **buf) if (sz == 0) return TRUE; - p = bfd_malloc (sec->rawsize > sec->size ? sec->rawsize : sec->size); + p = (bfd_byte *) + bfd_malloc (sec->rawsize > sec->size ? sec->rawsize : sec->size); if (p == NULL) return FALSE; *buf = p; diff --git a/cegcc/src/binutils/bfd/simple.c b/cegcc/src/binutils/bfd/simple.c index dd69f9a55..9a8397f83 100644 --- a/cegcc/src/binutils/bfd/simple.c +++ b/cegcc/src/binutils/bfd/simple.c @@ -1,5 +1,5 @@ /* simple.c -- BFD simple client routines - Copyright 2002, 2003, 2004, 2005, 2007, 2008 + Copyright 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by MontaVista Software, Inc. @@ -109,7 +109,7 @@ simple_save_output_info (bfd *abfd ATTRIBUTE_UNUSED, asection *section, void *ptr) { - struct saved_output_info *output_info = ptr; + struct saved_output_info *output_info = (struct saved_output_info *) ptr; output_info[section->index].offset = section->output_offset; output_info[section->index].section = section->output_section; if ((section->flags & SEC_DEBUGGING) != 0 @@ -125,7 +125,7 @@ simple_restore_output_info (bfd *abfd ATTRIBUTE_UNUSED, asection *section, void *ptr) { - struct saved_output_info *output_info = ptr; + struct saved_output_info *output_info = (struct saved_output_info *) ptr; section->output_offset = output_info[section->index].offset; section->output_section = output_info[section->index].section; } @@ -171,7 +171,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd, bfd_size_type size = sec->rawsize ? sec->rawsize : sec->size; if (outbuf == NULL) - contents = bfd_malloc (amt); + contents = (bfd_byte *) bfd_malloc (amt); else contents = outbuf; @@ -210,7 +210,8 @@ bfd_simple_get_relocated_section_contents (bfd *abfd, data = NULL; if (outbuf == NULL) { - data = bfd_malloc (sec->size); + bfd_size_type amt = sec->rawsize > sec->size ? sec->rawsize : sec->size; + data = (bfd_byte *) bfd_malloc (amt); if (data == NULL) return NULL; outbuf = data; @@ -240,7 +241,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd, _bfd_generic_link_add_symbols (abfd, &link_info); storage_needed = bfd_get_symtab_upper_bound (abfd); - symbol_table = bfd_malloc (storage_needed); + symbol_table = (asymbol **) bfd_malloc (storage_needed); bfd_canonicalize_symtab (abfd, symbol_table); } else diff --git a/cegcc/src/binutils/bfd/som.c b/cegcc/src/binutils/bfd/som.c index 360819dc6..0fb8e1de3 100644 --- a/cegcc/src/binutils/bfd/som.c +++ b/cegcc/src/binutils/bfd/som.c @@ -1,6 +1,6 @@ /* bfd back-end for HP PA-RISC SOM objects. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by the Center for Software Science at the @@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "alloca-conf.h" #include "sysdep.h" #include "bfd.h" @@ -37,32 +38,6 @@ #include #include -/* This is the code recommended in the autoconf documentation, almost - verbatim. */ - -#ifndef __GNUC__ -# if HAVE_ALLOCA_H -# include -# else -# ifdef _AIX -/* Indented so that pre-ansi C compilers will ignore it, rather than - choke on it. Some versions of AIX require this to be the first - thing in the file. */ - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -# if !defined (__STDC__) && !defined (__hpux) -extern char *alloca (); -# else -extern void *alloca (); -# endif /* __STDC__, __hpux */ -# endif /* alloca */ -# endif /* _AIX */ -# endif /* HAVE_ALLOCA_H */ -#else -extern void *alloca (size_t); -#endif /* __GNUC__ */ - static bfd_reloc_status_type hppa_som_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_boolean som_mkobject (bfd *); @@ -4015,7 +3990,9 @@ som_bfd_derive_misc_symbol_info (bfd *abfd ATTRIBUTE_UNUSED, section (ST_DATA for DATA sections, ST_CODE for CODE sections). */ else if (som_symbol_data (sym)->som_type == SYMBOL_TYPE_UNKNOWN) { - if (sym->section->flags & SEC_CODE) + if (bfd_is_abs_section (sym->section)) + info->symbol_type = ST_ABSOLUTE; + else if (sym->section->flags & SEC_CODE) info->symbol_type = ST_CODE; else info->symbol_type = ST_DATA; @@ -4495,13 +4472,13 @@ static asymbol * som_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (som_symbol_type); - som_symbol_type *new = bfd_zalloc (abfd, amt); + som_symbol_type *new_symbol_type = bfd_zalloc (abfd, amt); - if (new == NULL) + if (new_symbol_type == NULL) return NULL; - new->symbol.the_bfd = abfd; + new_symbol_type->symbol.the_bfd = abfd; - return &new->symbol; + return &new_symbol_type->symbol; } /* Print symbol information. */ @@ -6372,6 +6349,7 @@ som_bfd_link_split_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec) #define som_bfd_is_group_section bfd_generic_is_group_section #define som_bfd_discard_group bfd_generic_discard_group #define som_section_already_linked _bfd_generic_section_already_linked +#define som_bfd_define_common_symbol bfd_generic_define_common_symbol #define som_bfd_merge_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data #define som_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data #define som_bfd_set_private_flags _bfd_generic_bfd_set_private_flags diff --git a/cegcc/src/binutils/bfd/som.h b/cegcc/src/binutils/bfd/som.h index 59b4c1991..016c518f6 100644 --- a/cegcc/src/binutils/bfd/som.h +++ b/cegcc/src/binutils/bfd/som.h @@ -1,6 +1,6 @@ /* HP PA-RISC SOM object file format: definitions internal to BFD. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, - 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. Contributed by the Center for Software Science at the University of Utah (pa-gdb-bugs@cs.utah.edu). diff --git a/cegcc/src/binutils/bfd/sparclinux.c b/cegcc/src/binutils/bfd/sparclinux.c index c7e029952..7bb10d8e0 100644 --- a/cegcc/src/binutils/bfd/sparclinux.c +++ b/cegcc/src/binutils/bfd/sparclinux.c @@ -1,6 +1,6 @@ /* BFD back-end for linux flavored sparc a.out binaries. Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, - 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -23,7 +23,6 @@ #define ZMAGIC_DISK_BLOCK_SIZE 1024 #define SEGMENT_SIZE TARGET_PAGE_SIZE #define TEXT_START_ADDR 0x0 -#define N_SHARED_LIB(x) 0 #define MACHTYPE_OK(mtype) ((mtype) == M_SPARC || (mtype) == M_UNKNOWN) diff --git a/cegcc/src/binutils/bfd/sparcnetbsd.c b/cegcc/src/binutils/bfd/sparcnetbsd.c index dcabce6f3..0bde25eac 100644 --- a/cegcc/src/binutils/bfd/sparcnetbsd.c +++ b/cegcc/src/binutils/bfd/sparcnetbsd.c @@ -1,6 +1,6 @@ /* BFD back-end for NetBSD/sparc a.out-ish binaries. Copyright 1990, 1991, 1992, 1994, 1995, 1997, 1998, 2000, 2001, 2003, - 2007 Free Software Foundation, Inc. + 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/srec.c b/cegcc/src/binutils/bfd/srec.c index b7d515ccb..d66fa6d99 100644 --- a/cegcc/src/binutils/bfd/srec.c +++ b/cegcc/src/binutils/bfd/srec.c @@ -1,6 +1,6 @@ /* BFD back-end for s-record objects. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support . @@ -198,7 +198,7 @@ srec_mkobject (bfd *abfd) srec_init (); - tdata = bfd_alloc (abfd, sizeof (tdata_type)); + tdata = (tdata_type *) bfd_alloc (abfd, sizeof (tdata_type)); if (tdata == NULL) return FALSE; @@ -271,7 +271,7 @@ srec_new_symbol (bfd *abfd, const char *name, bfd_vma val) { struct srec_symbol *n; - n = bfd_alloc (abfd, sizeof (* n)); + n = (struct srec_symbol *) bfd_alloc (abfd, sizeof (* n)); if (n == NULL) return FALSE; @@ -363,7 +363,7 @@ srec_scan (bfd *abfd) } alc = 10; - symbuf = bfd_malloc (alc + 1); + symbuf = (char *) bfd_malloc (alc + 1); if (symbuf == NULL) goto error_return; @@ -378,7 +378,7 @@ srec_scan (bfd *abfd) char *n; alc *= 2; - n = bfd_realloc (symbuf, alc + 1); + n = (char *) bfd_realloc (symbuf, alc + 1); if (n == NULL) goto error_return; p = n + (p - symbuf); @@ -395,7 +395,7 @@ srec_scan (bfd *abfd) } *p++ = '\0'; - symname = bfd_alloc (abfd, (bfd_size_type) (p - symbuf)); + symname = (char *) bfd_alloc (abfd, (bfd_size_type) (p - symbuf)); if (symname == NULL) goto error_return; strcpy (symname, symbuf); @@ -482,7 +482,7 @@ srec_scan (bfd *abfd) { if (buf != NULL) free (buf); - buf = bfd_malloc ((bfd_size_type) bytes * 2); + buf = (bfd_byte *) bfd_malloc ((bfd_size_type) bytes * 2); if (buf == NULL) goto error_return; bufsize = bytes * 2; @@ -542,7 +542,7 @@ srec_scan (bfd *abfd) sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1); amt = strlen (secbuf) + 1; - secname = bfd_alloc (abfd, amt); + secname = (char *) bfd_alloc (abfd, amt); strcpy (secname, secbuf); flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC; sec = bfd_make_section_with_flags (abfd, secname, flags); @@ -738,7 +738,7 @@ srec_read_section (bfd *abfd, asection *section, bfd_byte *contents) { if (buf != NULL) free (buf); - buf = bfd_malloc ((bfd_size_type) bytes * 2); + buf = (bfd_byte *) bfd_malloc ((bfd_size_type) bytes * 2); if (buf == NULL) goto error_return; bufsize = bytes * 2; @@ -838,7 +838,8 @@ srec_get_section_contents (bfd *abfd, if (section->used_by_bfd == NULL) return FALSE; - if (! srec_read_section (abfd, section, section->used_by_bfd)) + if (! srec_read_section (abfd, section, + (bfd_byte *) section->used_by_bfd)) return FALSE; } @@ -872,7 +873,7 @@ srec_set_section_contents (bfd *abfd, tdata_type *tdata = abfd->tdata.srec_data; srec_data_list_type *entry; - entry = bfd_alloc (abfd, sizeof (* entry)); + entry = (srec_data_list_type *) bfd_alloc (abfd, sizeof (* entry)); if (entry == NULL) return FALSE; @@ -882,7 +883,7 @@ srec_set_section_contents (bfd *abfd, { bfd_byte *data; - data = bfd_alloc (abfd, bytes_to_do); + data = (bfd_byte *) bfd_alloc (abfd, bytes_to_do); if (data == NULL) return FALSE; memcpy ((void *) data, location, (size_t) bytes_to_do); @@ -1181,7 +1182,7 @@ srec_canonicalize_symtab (bfd *abfd, asymbol **alocation) asymbol *c; struct srec_symbol *s; - csymbols = bfd_alloc (abfd, symcount * sizeof (asymbol)); + csymbols = (asymbol *) bfd_alloc (abfd, symcount * sizeof (asymbol)); if (csymbols == NULL) return -1; abfd->tdata.srec_data->csymbols = csymbols; @@ -1255,6 +1256,7 @@ srec_print_symbol (bfd *abfd, #define srec_bfd_is_group_section bfd_generic_is_group_section #define srec_bfd_discard_group bfd_generic_discard_group #define srec_section_already_linked _bfd_generic_section_already_linked +#define srec_bfd_define_common_symbol bfd_generic_define_common_symbol #define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/stab-syms.c b/cegcc/src/binutils/bfd/stab-syms.c index 8ecd21e1e..9e9274f98 100644 --- a/cegcc/src/binutils/bfd/stab-syms.c +++ b/cegcc/src/binutils/bfd/stab-syms.c @@ -1,5 +1,5 @@ /* Table of stab names for the BFD library. - Copyright 1990, 1991, 1992, 1994, 1995, 1996, 2000, 2007 + Copyright 1990, 1991, 1992, 1994, 1995, 1996, 2000, 2005, 2007 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/cegcc/src/binutils/bfd/stabs.c b/cegcc/src/binutils/bfd/stabs.c index 72e312cc5..8a1cd87e0 100644 --- a/cegcc/src/binutils/bfd/stabs.c +++ b/cegcc/src/binutils/bfd/stabs.c @@ -1,6 +1,6 @@ /* Stabs in sections linking support. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007 Free Software Foundation, Inc. + 2006, 2007, 2008 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -127,8 +127,8 @@ stab_link_includes_newfunc (struct bfd_hash_entry *entry, /* Allocate the structure if it has not already been allocated by a subclass. */ if (ret == NULL) - ret = bfd_hash_allocate (table, - sizeof (struct stab_link_includes_entry)); + ret = (struct stab_link_includes_entry *) + bfd_hash_allocate (table, sizeof (struct stab_link_includes_entry)); if (ret == NULL) return NULL; @@ -337,7 +337,7 @@ _bfd_link_section_stabs (bfd *abfd, if (num_chars >= buf_len) { buf_len += 32 * 1024; - symb = bfd_realloc_or_free (symb, buf_len); + symb = (char *) bfd_realloc_or_free (symb, buf_len); if (symb == NULL) goto error_return; symb_rover = symb + num_chars; @@ -375,7 +375,7 @@ _bfd_link_section_stabs (bfd *abfd, /* Record this symbol, so that we can set the value correctly. */ amt = sizeof *ne; - ne = bfd_alloc (abfd, amt); + ne = (struct stab_excl_list *) bfd_alloc (abfd, amt); if (ne == NULL) goto error_return; ne->offset = sym - stabbuf; @@ -388,12 +388,14 @@ _bfd_link_section_stabs (bfd *abfd, { /* This is the first time we have seen this header file with this set of stabs strings. */ - t = bfd_hash_allocate (&sinfo->includes, sizeof *t); + t = (struct stab_link_includes_totals *) + bfd_hash_allocate (&sinfo->includes, sizeof *t); if (t == NULL) goto error_return; t->sum_chars = sum_chars; t->num_chars = num_chars; - t->symb = symb = bfd_realloc_or_free (symb, num_chars); /* Trim data down. */ + /* Trim data down. */ + t->symb = symb = (char *) bfd_realloc_or_free (symb, num_chars); t->next = incl_entry->totals; incl_entry->totals = t; } @@ -471,7 +473,7 @@ _bfd_link_section_stabs (bfd *abfd, bfd_size_type *pskips; amt = count * sizeof (bfd_size_type); - secinfo->cumulative_skips = bfd_alloc (abfd, amt); + secinfo->cumulative_skips = (bfd_size_type *) bfd_alloc (abfd, amt); if (secinfo->cumulative_skips == NULL) goto error_return; @@ -624,7 +626,7 @@ _bfd_discard_section_stabs (bfd *abfd, if (secinfo->cumulative_skips == NULL) { amt = count * sizeof (bfd_size_type); - secinfo->cumulative_skips = bfd_alloc (abfd, amt); + secinfo->cumulative_skips = (bfd_size_type *) bfd_alloc (abfd, amt); if (secinfo->cumulative_skips == NULL) goto error_return; } diff --git a/cegcc/src/binutils/bfd/syms.c b/cegcc/src/binutils/bfd/syms.c index cdbf905f9..1f25d3381 100644 --- a/cegcc/src/binutils/bfd/syms.c +++ b/cegcc/src/binutils/bfd/syms.c @@ -1,6 +1,6 @@ /* Generic symbol-table support for the BFD library. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2009 + 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -297,6 +297,16 @@ CODE_FRAGMENT . {* This symbol was created by bfd_get_synthetic_symtab. *} .#define BSF_SYNTHETIC (1 << 21) . +. {* This symbol is an indirect code object. Unrelated to BSF_INDIRECT. +. The dynamic linker will compute the value of this symbol by +. calling the function that it points to. BSF_FUNCTION must +. also be also set. *} +.#define BSF_GNU_INDIRECT_FUNCTION (1 << 22) +. {* This symbol is a globally unique data object. The dynamic linker +. will make sure that in the entire process there is just one symbol +. with this name and type in use. BSF_OBJECT must also be set. *} +.#define BSF_GNU_UNIQUE (1 << 23) +. . flagword flags; . . {* A pointer to the section to which this symbol is @@ -464,7 +474,7 @@ DESCRIPTION void bfd_print_symbol_vandf (bfd *abfd, void *arg, asymbol *symbol) { - FILE *file = arg; + FILE *file = (FILE *) arg; flagword type = symbol->flags; @@ -479,11 +489,12 @@ bfd_print_symbol_vandf (bfd *abfd, void *arg, asymbol *symbol) fprintf (file, " %c%c%c%c%c%c%c", ((type & BSF_LOCAL) ? (type & BSF_GLOBAL) ? '!' : 'l' - : (type & BSF_GLOBAL) ? 'g' : ' '), + : (type & BSF_GLOBAL) ? 'g' + : (type & BSF_GNU_UNIQUE) ? 'u' : ' '), (type & BSF_WEAK) ? 'w' : ' ', (type & BSF_CONSTRUCTOR) ? 'C' : ' ', (type & BSF_WARNING) ? 'W' : ' ', - (type & BSF_INDIRECT) ? 'I' : ' ', + (type & BSF_INDIRECT) ? 'I' : (type & BSF_GNU_INDIRECT_FUNCTION) ? 'i' : ' ', (type & BSF_DEBUGGING) ? 'd' : (type & BSF_DYNAMIC) ? 'D' : ' ', ((type & BSF_FUNCTION) ? 'F' @@ -528,10 +539,10 @@ asymbol * _bfd_generic_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (asymbol); - asymbol *new = bfd_zalloc (abfd, amt); - if (new) - new->the_bfd = abfd; - return new; + asymbol *new_symbol = (asymbol *) bfd_zalloc (abfd, amt); + if (new_symbol) + new_symbol->the_bfd = abfd; + return new_symbol; } /* @@ -669,6 +680,8 @@ bfd_decode_symclass (asymbol *symbol) } if (bfd_is_ind_section (symbol->section)) return 'I'; + if (symbol->flags & BSF_GNU_INDIRECT_FUNCTION) + return 'i'; if (symbol->flags & BSF_WEAK) { /* If weak, determine if it's specifically an object @@ -678,6 +691,8 @@ bfd_decode_symclass (asymbol *symbol) else return 'W'; } + if (symbol->flags & BSF_GNU_UNIQUE) + return 'u'; if (!(symbol->flags & (BSF_GLOBAL | BSF_LOCAL))) return '?'; @@ -796,7 +811,7 @@ _bfd_generic_read_minisymbols (bfd *abfd, if (storage == 0) return 0; - syms = bfd_malloc (storage); + syms = (asymbol **) bfd_malloc (storage); if (syms == NULL) goto error_return; @@ -863,8 +878,8 @@ struct indexentry static int cmpindexentry (const void *a, const void *b) { - const struct indexentry *contestantA = a; - const struct indexentry *contestantB = b; + const struct indexentry *contestantA = (const struct indexentry *) a; + const struct indexentry *contestantB = (const struct indexentry *) b; if (contestantA->val < contestantB->val) return -1; @@ -951,7 +966,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, #define VALOFF (8) #define STABSIZE (12) - info = *pinfo; + info = (struct stab_find_info *) *pinfo; if (info != NULL) { if (info->stabsec == NULL || info->strsec == NULL) @@ -976,7 +991,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, char *function_name; bfd_size_type amt = sizeof *info; - info = bfd_zalloc (abfd, amt); + info = (struct stab_find_info *) bfd_zalloc (abfd, amt); if (info == NULL) return FALSE; @@ -1009,8 +1024,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, ? info->strsec->rawsize : info->strsec->size); - info->stabs = bfd_alloc (abfd, stabsize); - info->strs = bfd_alloc (abfd, strsize); + info->stabs = (bfd_byte *) bfd_alloc (abfd, stabsize); + info->strs = (bfd_byte *) bfd_alloc (abfd, strsize); if (info->stabs == NULL || info->strs == NULL) return FALSE; @@ -1027,7 +1042,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, reloc_size = bfd_get_reloc_upper_bound (abfd, info->stabsec); if (reloc_size < 0) return FALSE; - reloc_vector = bfd_malloc (reloc_size); + reloc_vector = (arelent **) bfd_malloc (reloc_size); if (reloc_vector == NULL && reloc_size != 0) return FALSE; reloc_count = bfd_canonicalize_reloc (abfd, info->stabsec, reloc_vector, @@ -1124,7 +1139,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, amt = info->indextablesize; amt *= sizeof (struct indexentry); - info->indextable = bfd_alloc (abfd, amt); + info->indextable = (struct indexentry *) bfd_alloc (abfd, amt); if (info->indextable == NULL) return FALSE; @@ -1380,7 +1395,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, apps keep a copy of a previously returned file name pointer. */ len = strlen (file_name) + 1; - info->filename = bfd_alloc (abfd, dirlen + len); + info->filename = (char *) bfd_alloc (abfd, dirlen + len); if (info->filename == NULL) return FALSE; memcpy (info->filename, directory_name, dirlen); diff --git a/cegcc/src/binutils/bfd/sysdep.h b/cegcc/src/binutils/bfd/sysdep.h index 969519029..20ef56d69 100644 --- a/cegcc/src/binutils/bfd/sysdep.h +++ b/cegcc/src/binutils/bfd/sysdep.h @@ -1,5 +1,5 @@ /* sysdep.h -- handle host dependencies for the BFD library - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2007 + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2007, 2009 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/cegcc/src/binutils/bfd/targets.c b/cegcc/src/binutils/bfd/targets.c index 2eab66383..347c6cd76 100644 --- a/cegcc/src/binutils/bfd/targets.c +++ b/cegcc/src/binutils/bfd/targets.c @@ -1,6 +1,6 @@ /* Generic target-file-type support for the BFD library. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Cygnus Support. @@ -157,6 +157,7 @@ DESCRIPTION . bfd_target_oasys_flavour, . bfd_target_tekhex_flavour, . bfd_target_srec_flavour, +. bfd_target_verilog_flavour, . bfd_target_ihex_flavour, . bfd_target_som_flavour, . bfd_target_os9k_flavour, @@ -441,7 +442,8 @@ BFD_JUMP_TABLE macros. . NAME##_bfd_merge_sections, \ . NAME##_bfd_is_group_section, \ . NAME##_bfd_discard_group, \ -. NAME##_section_already_linked \ +. NAME##_section_already_linked, \ +. NAME##_bfd_define_common_symbol . . int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); . bfd_byte * (*_bfd_get_relocated_section_contents) @@ -489,6 +491,10 @@ BFD_JUMP_TABLE macros. . void (*_section_already_linked) (bfd *, struct bfd_section *, . struct bfd_link_info *); . +. {* Define a common symbol. *} +. bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, +. struct bfd_link_hash_entry *); +. . {* Routines to handle dynamic symbols and relocs. *} .#define BFD_JUMP_TABLE_DYNAMIC(NAME) \ . NAME##_get_dynamic_symtab_upper_bound, \ @@ -560,15 +566,7 @@ extern const bfd_target armpei_big_vec; extern const bfd_target armpei_little_vec; extern const bfd_target b_out_vec_big_host; extern const bfd_target b_out_vec_little_host; -extern const bfd_target bfd_efi_app_ia32_vec; -extern const bfd_target bfd_efi_bsdrv_ia32_vec; -extern const bfd_target bfd_efi_rtdrv_ia32_vec; -extern const bfd_target bfd_efi_app_x86_64_vec; -extern const bfd_target bfd_efi_bsdrv_x86_64_vec; -extern const bfd_target bfd_efi_rtdrv_x86_64_vec; -extern const bfd_target bfd_efi_app_ia64_vec; -extern const bfd_target bfd_efi_bsdrv_ia64_vec; -extern const bfd_target bfd_efi_rtdrv_ia64_vec; +extern const bfd_target bfd_pei_ia64_vec; extern const bfd_target bfd_elf32_avr_vec; extern const bfd_target bfd_elf32_bfin_vec; extern const bfd_target bfd_elf32_bfinfdpic_vec; @@ -589,6 +587,7 @@ extern const bfd_target bfd_elf32_dlx_big_vec; extern const bfd_target bfd_elf32_fr30_vec; extern const bfd_target bfd_elf32_frv_vec; extern const bfd_target bfd_elf32_frvfdpic_vec; +extern const bfd_target bfd_elf32_moxie_vec; extern const bfd_target bfd_elf32_h8300_vec; extern const bfd_target bfd_elf32_hppa_linux_vec; extern const bfd_target bfd_elf32_hppa_nbsd_vec; @@ -626,6 +625,7 @@ extern const bfd_target bfd_elf32_mcore_big_vec; extern const bfd_target bfd_elf32_mcore_little_vec; extern const bfd_target bfd_elf32_mep_vec; extern const bfd_target bfd_elf32_mep_little_vec; +extern const bfd_target bfd_elf32_microblaze_vec; extern const bfd_target bfd_elf32_mn10200_vec; extern const bfd_target bfd_elf32_mn10300_vec; extern const bfd_target bfd_elf32_mt_vec; @@ -641,6 +641,8 @@ extern const bfd_target bfd_elf32_pjl_vec; extern const bfd_target bfd_elf32_powerpc_vec; extern const bfd_target bfd_elf32_powerpcle_vec; extern const bfd_target bfd_elf32_powerpc_vxworks_vec; +extern const bfd_target bfd_elf32_rx_le_vec; +extern const bfd_target bfd_elf32_rx_be_vec; extern const bfd_target bfd_elf32_s390_vec; extern const bfd_target bfd_elf32_bigscore_vec; extern const bfd_target bfd_elf32_littlescore_vec; @@ -699,6 +701,8 @@ extern const bfd_target bfd_elf64_tradbigmips_vec; extern const bfd_target bfd_elf64_tradlittlemips_vec; extern const bfd_target bfd_elf64_x86_64_freebsd_vec; extern const bfd_target bfd_elf64_x86_64_vec; +extern const bfd_target bfd_elf64_l1om_freebsd_vec; +extern const bfd_target bfd_elf64_l1om_vec; extern const bfd_target bfd_mmo_vec; extern const bfd_target bfd_powerpc_pe_vec; extern const bfd_target bfd_powerpc_pei_vec; @@ -748,6 +752,7 @@ extern const bfd_target m88kopenbsd_vec; extern const bfd_target mach_o_be_vec; extern const bfd_target mach_o_le_vec; extern const bfd_target mach_o_fat_vec; +extern const bfd_target mach_o_i386_vec; extern const bfd_target maxqcoff_vec; extern const bfd_target mcore_pe_big_vec; extern const bfd_target mcore_pe_little_vec; @@ -767,6 +772,7 @@ extern const bfd_target pc532netbsd_vec; extern const bfd_target pdp11_aout_vec; extern const bfd_target pef_vec; extern const bfd_target pef_xlib_vec; +extern const bfd_target plugin_vec; extern const bfd_target pmac_xcoff_vec; extern const bfd_target ppcboot_vec; extern const bfd_target riscix_vec; @@ -818,6 +824,7 @@ extern const bfd_target z8kcoff_vec; /* These are always included. */ extern const bfd_target srec_vec; +extern const bfd_target verilog_vec; extern const bfd_target symbolsrec_vec; extern const bfd_target tekhex_vec; extern const bfd_target binary_vec; @@ -887,16 +894,8 @@ static const bfd_target * const _bfd_target_vector[] = &armpei_little_vec, &b_out_vec_big_host, &b_out_vec_little_host, - &bfd_efi_app_ia32_vec, - &bfd_efi_bsdrv_ia32_vec, - &bfd_efi_rtdrv_ia32_vec, #ifdef BFD64 - &bfd_efi_app_x86_64_vec, - &bfd_efi_bsdrv_x86_64_vec, - &bfd_efi_rtdrv_x86_64_vec, - &bfd_efi_app_ia64_vec, - &bfd_efi_bsdrv_ia64_vec, - &bfd_efi_rtdrv_ia64_vec, + &bfd_pei_ia64_vec, #endif &bfd_elf32_avr_vec, &bfd_elf32_bfin_vec, @@ -923,6 +922,7 @@ static const bfd_target * const _bfd_target_vector[] = &bfd_elf32_fr30_vec, &bfd_elf32_frv_vec, &bfd_elf32_frvfdpic_vec, + &bfd_elf32_moxie_vec, &bfd_elf32_h8300_vec, &bfd_elf32_hppa_linux_vec, &bfd_elf32_hppa_nbsd_vec, @@ -962,6 +962,7 @@ static const bfd_target * const _bfd_target_vector[] = &bfd_elf32_mcore_big_vec, &bfd_elf32_mcore_little_vec, &bfd_elf32_mep_vec, + &bfd_elf32_microblaze_vec, &bfd_elf32_mn10200_vec, &bfd_elf32_mn10300_vec, &bfd_elf32_mt_vec, @@ -979,9 +980,13 @@ static const bfd_target * const _bfd_target_vector[] = &bfd_elf32_powerpc_vec, &bfd_elf32_powerpc_vxworks_vec, &bfd_elf32_powerpcle_vec, + &bfd_elf32_rx_be_vec, + &bfd_elf32_rx_le_vec, &bfd_elf32_s390_vec, +#ifdef BFD64 &bfd_elf32_bigscore_vec, - &bfd_elf32_littlescore_vec, + &bfd_elf32_littlescore_vec, +#endif &bfd_elf32_sh_vec, &bfd_elf32_shblin_vec, &bfd_elf32_shl_vec, @@ -1040,6 +1045,8 @@ static const bfd_target * const _bfd_target_vector[] = &bfd_elf64_tradlittlemips_vec, &bfd_elf64_x86_64_freebsd_vec, &bfd_elf64_x86_64_vec, + &bfd_elf64_l1om_freebsd_vec, + &bfd_elf64_l1om_vec, &bfd_mmo_vec, #endif &bfd_powerpc_pe_vec, @@ -1119,6 +1126,7 @@ static const bfd_target * const _bfd_target_vector[] = &mach_o_be_vec, &mach_o_le_vec, &mach_o_fat_vec, + &mach_o_i386_vec, &maxqcoff_vec, &mcore_pe_big_vec, &mcore_pe_little_vec, @@ -1149,6 +1157,9 @@ static const bfd_target * const _bfd_target_vector[] = &pdp11_aout_vec, &pef_vec, &pef_xlib_vec, +#if BFD_SUPPORTS_PLUGINS + &plugin_vec, +#endif #if 0 /* This has the same magic number as RS/6000. */ &pmac_xcoff_vec, @@ -1206,6 +1217,8 @@ static const bfd_target * const _bfd_target_vector[] = /* Always support S-records, for convenience. */ &srec_vec, &symbolsrec_vec, +/* And verilog. */ + &verilog_vec, /* And tekhex */ &tekhex_vec, /* Likewise for binary output. */ @@ -1446,7 +1459,7 @@ bfd_target_list (void) vec_length++; amt = (vec_length + 1) * sizeof (char **); - name_ptr = name_list = bfd_malloc (amt); + name_ptr = name_list = (const char **) bfd_malloc (amt); if (name_list == NULL) return NULL; diff --git a/cegcc/src/binutils/bfd/tekhex.c b/cegcc/src/binutils/bfd/tekhex.c index 2df774fc0..0be3ab967 100644 --- a/cegcc/src/binutils/bfd/tekhex.c +++ b/cegcc/src/binutils/bfd/tekhex.c @@ -1,6 +1,6 @@ /* BFD backend for Extended Tektronix Hex Format objects. Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2007 Free Software Foundation, Inc. + 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support . This file is part of BFD, the Binary File Descriptor library. @@ -324,7 +324,8 @@ find_chunk (bfd *abfd, bfd_vma vma) if (!d) { /* No chunk for this address, so make one up. */ - d = bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct)); + d = (struct data_struct *) + bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct)); if (!d) return NULL; @@ -383,7 +384,7 @@ first_phase (bfd *abfd, int type, char *src) section = bfd_get_section_by_name (abfd, sym); if (section == NULL) { - char *n = bfd_alloc (abfd, (bfd_size_type) len + 1); + char *n = (char *) bfd_alloc (abfd, (bfd_size_type) len + 1); if (!n) return FALSE; @@ -415,31 +416,33 @@ first_phase (bfd *abfd, int type, char *src) /* Symbols, add to section. */ { bfd_size_type amt = sizeof (tekhex_symbol_type); - tekhex_symbol_type *new = bfd_alloc (abfd, amt); + tekhex_symbol_type *new_symbol = (tekhex_symbol_type *) + bfd_alloc (abfd, amt); char stype = (*src); - if (!new) + if (!new_symbol) return FALSE; - new->symbol.the_bfd = abfd; + new_symbol->symbol.the_bfd = abfd; src++; abfd->symcount++; abfd->flags |= HAS_SYMS; - new->prev = abfd->tdata.tekhex_data->symbols; - abfd->tdata.tekhex_data->symbols = new; + new_symbol->prev = abfd->tdata.tekhex_data->symbols; + abfd->tdata.tekhex_data->symbols = new_symbol; if (!getsym (sym, &src, &len)) return FALSE; - new->symbol.name = bfd_alloc (abfd, (bfd_size_type) len + 1); - if (!new->symbol.name) + new_symbol->symbol.name = (const char *) + bfd_alloc (abfd, (bfd_size_type) len + 1); + if (!new_symbol->symbol.name) return FALSE; - memcpy ((char *) (new->symbol.name), sym, len + 1); - new->symbol.section = section; + memcpy ((char *) (new_symbol->symbol.name), sym, len + 1); + new_symbol->symbol.section = section; if (stype <= '4') - new->symbol.flags = (BSF_GLOBAL | BSF_EXPORT); + new_symbol->symbol.flags = (BSF_GLOBAL | BSF_EXPORT); else - new->symbol.flags = BSF_LOCAL; + new_symbol->symbol.flags = BSF_LOCAL; if (!getvalue (&src, &val)) return FALSE; - new->symbol.value = val - section->vma; + new_symbol->symbol.value = val - section->vma; break; } default: @@ -532,7 +535,7 @@ tekhex_mkobject (bfd *abfd) { tdata_type *tdata; - tdata = bfd_alloc (abfd, (bfd_size_type) sizeof (tdata_type)); + tdata = (tdata_type *) bfd_alloc (abfd, (bfd_size_type) sizeof (tdata_type)); if (!tdata) return FALSE; abfd->tdata.tekhex_data = tdata; @@ -880,13 +883,14 @@ static asymbol * tekhex_make_empty_symbol (bfd *abfd) { bfd_size_type amt = sizeof (struct tekhex_symbol_struct); - tekhex_symbol_type *new = bfd_zalloc (abfd, amt); + tekhex_symbol_type *new_symbol = (tekhex_symbol_type *) bfd_zalloc (abfd, + amt); - if (!new) + if (!new_symbol) return NULL; - new->symbol.the_bfd = abfd; - new->prev = NULL; - return &(new->symbol); + new_symbol->symbol.the_bfd = abfd; + new_symbol->prev = NULL; + return &(new_symbol->symbol); } static void @@ -943,6 +947,7 @@ tekhex_print_symbol (bfd *abfd, #define tekhex_bfd_is_group_section bfd_generic_is_group_section #define tekhex_bfd_discard_group bfd_generic_discard_group #define tekhex_section_already_linked _bfd_generic_section_already_linked +#define tekhex_bfd_define_common_symbol bfd_generic_define_common_symbol #define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/ticoff.h b/cegcc/src/binutils/bfd/ticoff.h index 50f057702..e2c931673 100644 --- a/cegcc/src/binutils/bfd/ticoff.h +++ b/cegcc/src/binutils/bfd/ticoff.h @@ -1,4 +1,4 @@ -/* Copyright 2002, 2007 Free Software Foundation, Inc. +/* Copyright 2002, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -68,7 +68,7 @@ ticoff_bfd_is_local_label_name (abfd, name) #include "coffcode.h" /* COFF0 differs in file/section header size and relocation entry size. */ -static const bfd_coff_backend_data ticoff0_swap_table = +static bfd_coff_backend_data ticoff0_swap_table = { coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in, coff_SWAP_aux_out, coff_SWAP_sym_out, @@ -81,10 +81,7 @@ static const bfd_coff_backend_data ticoff0_swap_table = #else FALSE, #endif -#ifdef COFF_LONG_SECTION_NAMES - TRUE, -#else - FALSE, + COFF_DEFAULT_LONG_SECTION_NAMES, #endif COFF_DEFAULT_SECTION_ALIGNMENT_POWER, coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, @@ -99,7 +96,7 @@ static const bfd_coff_backend_data ticoff0_swap_table = }; /* COFF1 differs in section header size. */ -static const bfd_coff_backend_data ticoff1_swap_table = +static bfd_coff_backend_data ticoff1_swap_table = { coff_SWAP_aux_in, coff_SWAP_sym_in, coff_SWAP_lineno_in, coff_SWAP_aux_out, coff_SWAP_sym_out, @@ -112,11 +109,7 @@ static const bfd_coff_backend_data ticoff1_swap_table = #else FALSE, #endif -#ifdef COFF_LONG_SECTION_NAMES - TRUE, -#else - FALSE, -#endif + COFF_DEFAULT_LONG_SECTION_NAMES, COFF_DEFAULT_SECTION_ALIGNMENT_POWER, coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, coff_SWAP_reloc_in, ticoff1_bad_format_hook, coff_set_arch_mach_hook, diff --git a/cegcc/src/binutils/bfd/vax1knetbsd.c b/cegcc/src/binutils/bfd/vax1knetbsd.c index f51142905..22f5a1358 100644 --- a/cegcc/src/binutils/bfd/vax1knetbsd.c +++ b/cegcc/src/binutils/bfd/vax1knetbsd.c @@ -1,5 +1,5 @@ /* BFD back-end for NetBSD/VAX (1K page size) a.out-ish binaries. - Copyright 1998, 2000, 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 1998, 2000, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/vaxbsd.c b/cegcc/src/binutils/bfd/vaxbsd.c index b0ba6532d..21fbe5856 100644 --- a/cegcc/src/binutils/bfd/vaxbsd.c +++ b/cegcc/src/binutils/bfd/vaxbsd.c @@ -1,5 +1,5 @@ /* BFD back-end for BSD and Ultrix/VAX (1K page size) a.out-ish binaries. - Copyright 2002, 2003, 2007 Free Software Foundation, Inc. + Copyright 2002, 2003, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -20,7 +20,6 @@ #define N_HEADER_IN_TEXT(x) 0 #define ENTRY_CAN_BE_ZERO -#define N_SHARED_LIB(x) 0 /* Avoids warning */ #define TEXT_START_ADDR 0 #define TARGET_PAGE_SIZE 1024 #define SEGMENT_SIZE TARGET_PAGE_SIZE diff --git a/cegcc/src/binutils/bfd/vaxnetbsd.c b/cegcc/src/binutils/bfd/vaxnetbsd.c index b692ffa6e..033cec978 100644 --- a/cegcc/src/binutils/bfd/vaxnetbsd.c +++ b/cegcc/src/binutils/bfd/vaxnetbsd.c @@ -1,5 +1,6 @@ /* BFD back-end for NetBSD/VAX (4K page size) a.out-ish binaries. - Copyright 1998, 2000, 2001, 2002, 2007 Free Software Foundation, Inc. + Copyright 1998, 2000, 2001, 2002, 2005, 2007 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/cegcc/src/binutils/bfd/versados.c b/cegcc/src/binutils/bfd/versados.c index c4decd6f3..8fbc17b8d 100644 --- a/cegcc/src/binutils/bfd/versados.c +++ b/cegcc/src/binutils/bfd/versados.c @@ -1,6 +1,6 @@ /* BFD back-end for VERSAdos-E objects. Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007 Free Software Foundation, Inc. + 2006, 2007, 2009 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support . Versados is a Motorola trademark. @@ -808,6 +808,7 @@ versados_canonicalize_reloc (bfd *abfd, #define versados_bfd_is_group_section bfd_generic_is_group_section #define versados_bfd_discard_group bfd_generic_discard_group #define versados_section_already_linked _bfd_generic_section_already_linked +#define versados_bfd_define_common_symbol bfd_generic_define_common_symbol #define versados_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define versados_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define versados_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/version.h b/cegcc/src/binutils/bfd/version.h index f7dc8b8f1..b580166d4 100644 --- a/cegcc/src/binutils/bfd/version.h +++ b/cegcc/src/binutils/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20090204 +#define BFD_VERSION_DATE 20091016 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/cegcc/src/binutils/bfd/vms-gsd.c b/cegcc/src/binutils/bfd/vms-gsd.c index 4bdc27c98..e641d0de4 100644 --- a/cegcc/src/binutils/bfd/vms-gsd.c +++ b/cegcc/src/binutils/bfd/vms-gsd.c @@ -1,9 +1,12 @@ /* vms-gsd.c -- BFD back-end for VAX (openVMS/VAX) and EVAX (openVMS/Alpha) files. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2007 Free Software Foundation, Inc. + 2007, 2009 Free Software Foundation, Inc. - go and read the openVMS linker manual (esp. appendix B) + GSD record handling functions + EGSD record handling functions + + Go and read the openVMS linker manual (esp. appendix B) if you don't know what's going on here :-) Written by Klaus K"ampf (kkaempf@rmi.de) @@ -46,6 +49,7 @@ #define EVAX_READONLYADDR_NAME "$READONLY_ADDR$" #define EVAX_READONLY_NAME "$READONLY$" #define EVAX_LITERAL_NAME "$LITERAL$" +#define EVAX_LITERALS_NAME "$LITERALS" #define EVAX_COMMON_NAME "$COMMON$" #define EVAX_LOCAL_NAME "$LOCAL$" @@ -133,6 +137,11 @@ static struct sec_flags_struct evax_section_flags[] = (SEC_DATA), (EGPS_S_V_REL | EGPS_S_V_RD | EGPS_S_V_WRT), (SEC_IN_MEMORY | SEC_DATA | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD) }, + { EVAX_LITERALS_NAME, + (EGPS_S_V_PIC | EGPS_S_V_OVR), + (SEC_DATA | SEC_READONLY), + (EGPS_S_V_PIC | EGPS_S_V_OVR), + (SEC_IN_MEMORY | SEC_DATA | SEC_HAS_CONTENTS | SEC_ALLOC | SEC_READONLY | SEC_LOAD) }, { NULL, (EGPS_S_V_REL | EGPS_S_V_RD | EGPS_S_V_WRT), (SEC_DATA), @@ -197,6 +206,37 @@ vms_esecflag_by_name (struct sec_flags_struct *section_flags, struct flagdescstruct { char *name; flagword value; }; +static const struct flagdescstruct gpsflagdesc[] = +{ + { "PIC", GPS_S_M_PIC }, + { "LIB", GPS_S_M_LIB }, + { "OVR", GPS_S_M_OVR }, + { "REL", GPS_S_M_REL }, + { "GBL", GPS_S_M_GBL }, + { "SHR", GPS_S_M_SHR }, + { "EXE", GPS_S_M_EXE }, + { "RD", GPS_S_M_RD }, + { "WRT", GPS_S_M_WRT }, + { "VEC", GPS_S_M_VEC }, + { "NOMOD", EGPS_S_V_NOMOD }, + { "COM", EGPS_S_V_COM }, + { NULL, 0 } +}; + +static const struct flagdescstruct gsyflagdesc[] = +{ + { "WEAK", GSY_S_M_WEAK }, + { "DEF", GSY_S_M_DEF }, + { "UNI", GSY_S_M_UNI }, + { "REL", GSY_S_M_REL }, + { "COMM", EGSY_S_V_COMM }, + { "VECEP", EGSY_S_V_VECEP }, + { "NORM", EGCY_S_V_NORM }, + { NULL, 0 } +}; + +static char *flag2str (struct flagdescstruct *, flagword); + /* Convert flag to printable string. */ static char * @@ -224,43 +264,15 @@ flag2str (struct flagdescstruct * flagdesc, flagword flags) /* Input routines. */ +static int register_universal_symbol (bfd *abfd, asymbol *symbol, + int vms_flags); + /* Process GSD/EGSD record return 0 on success, -1 on error. */ int _bfd_vms_slurp_gsd (bfd * abfd, int objtype) { -#if VMS_DEBUG - static struct flagdescstruct gpsflagdesc[] = - { - { "PIC", 0x0001 }, - { "LIB", 0x0002 }, - { "OVR", 0x0004 }, - { "REL", 0x0008 }, - { "GBL", 0x0010 }, - { "SHR", 0x0020 }, - { "EXE", 0x0040 }, - { "RD", 0x0080 }, - { "WRT", 0x0100 }, - { "VEC", 0x0200 }, - { "NOMOD", 0x0400 }, - { "COM", 0x0800 }, - { NULL, 0 } - }; - - static struct flagdescstruct gsyflagdesc[] = - { - { "WEAK", 0x0001 }, - { "DEF", 0x0002 }, - { "UNI", 0x0004 }, - { "REL", 0x0008 }, - { "COMM", 0x0010 }, - { "VECEP", 0x0020 }, - { "NORM", 0x0040 }, - { NULL, 0 } - }; -#endif - int gsd_type, gsd_size; asection *section; unsigned char *vms_rec; @@ -300,7 +312,7 @@ _bfd_vms_slurp_gsd (bfd * abfd, int objtype) vms_rec = PRIV (vms_rec); if (objtype == OBJ_S_C_GSD) - gsd_type = *vms_rec; + gsd_type = vms_rec[0]; else { _bfd_vms_get_header_values (abfd, vms_rec, &gsd_type, &gsd_size); @@ -322,7 +334,7 @@ _bfd_vms_slurp_gsd (bfd * abfd, int objtype) vms_debug (4, "GSD_S_C_PSC\n"); #endif /* If this section isn't a bfd section. */ - if (PRIV (is_vax) && (psect_idx < (abfd->section_count-1))) + if (PRIV (is_vax) && (psect_idx < (abfd->section_count - 1))) { /* Check for temporary section from TIR record. */ if (psect_idx < PRIV (section_count)) @@ -362,7 +374,6 @@ _bfd_vms_slurp_gsd (bfd * abfd, int objtype) base_addr += section->size; /* Global section is common symbol. */ - if (old_flags & GPS_S_M_GBL) { entry = _bfd_vms_enter_symbol (abfd, name); @@ -496,21 +507,20 @@ _bfd_vms_slurp_gsd (bfd * abfd, int objtype) else psect = vms_rec[value_offset-1]; - symbol->section = (asection *) (size_t) psect; + symbol->section = (asection *)(unsigned long)psect; #if VMS_DEBUG - vms_debug (4, "gsd sym def #%d (%s, %d [%p], %04x=%s)\n", abfd->symcount, - symbol->name, (int)symbol->section, symbol->section, old_flags, flag2str (gsyflagdesc, old_flags)); + vms_debug (4, "gsd sym def #%d (%s, %ld, %04x=%s)\n", abfd->symcount, + symbol->name, (long)symbol->section, old_flags, flag2str(gsyflagdesc, old_flags)); #endif } else { /* Symbol reference. */ - symbol->section = bfd_make_section (abfd, BFD_UND_SECTION_NAME); #if VMS_DEBUG - vms_debug (4, "gsd sym ref #%d (%s, %s [%p], %04x=%s)\n", - abfd->symcount, symbol->name, symbol->section->name, - symbol->section, old_flags, flag2str (gsyflagdesc, old_flags)); + vms_debug (4, "gsd sym ref #%d (%s, %04x=%s)\n", abfd->symcount, + symbol->name, old_flags, flag2str (gsyflagdesc, old_flags)); #endif + symbol->section = (asection *)(unsigned long)-1; } gsd_size = vms_rec[name_offset] + name_offset + 1; @@ -574,19 +584,19 @@ _bfd_vms_slurp_gsd (bfd * abfd, int objtype) case EGSD_S_C_PSC + EVAX_OFFSET: { /* Program section definition. */ - name = _bfd_vms_save_counted_string (vms_rec + 12); + name = _bfd_vms_save_counted_string (vms_rec + EGPS_S_B_NAMLNG); section = bfd_make_section (abfd, name); if (!section) return -1; - old_flags = bfd_getl16 (vms_rec + 6); - section->size = bfd_getl32 (vms_rec + 8); /* Allocation. */ + old_flags = bfd_getl16 (vms_rec + EGPS_S_W_FLAGS); + section->size = bfd_getl32 (vms_rec + EGPS_S_L_ALLOC); new_flags = vms_secflag_by_name (abfd, evax_section_flags, name, section->size > 0); if (old_flags & EGPS_S_V_REL) new_flags |= SEC_RELOC; if (!bfd_set_section_flags (abfd, section, new_flags)) return -1; - section->alignment_power = vms_rec[4]; + section->alignment_power = vms_rec[EGPS_S_B_ALIGN]; align_addr = (1 << section->alignment_power); if ((base_addr % align_addr) != 0) base_addr += (align_addr - (base_addr % align_addr)); @@ -595,9 +605,10 @@ _bfd_vms_slurp_gsd (bfd * abfd, int objtype) section->contents = bfd_zmalloc (section->size); if (section->contents == NULL) return -1; + section->filepos = (unsigned int)-1; #if VMS_DEBUG - vms_debug (4, "egsd psc %d (%s, flags %04x=%s) ", - section->index, name, old_flags, flag2str (gpsflagdesc, old_flags)); + vms_debug (4, "EGSD P-section %d (%s, flags %04x=%s) ", + section->index, name, old_flags, flag2str(gpsflagdesc, old_flags)); vms_debug (4, "%d bytes at 0x%08lx (mem %p)\n", section->size, section->vma, section->contents); #endif @@ -606,50 +617,52 @@ _bfd_vms_slurp_gsd (bfd * abfd, int objtype) case EGSD_S_C_SYM + EVAX_OFFSET: { - /* Symbol specification (definition or reference). */ + /* Global symbol specification (definition or reference). */ symbol = bfd_make_empty_symbol (abfd); if (symbol == 0) return -1; - old_flags = bfd_getl16 (vms_rec + 6); + old_flags = bfd_getl16 (vms_rec + EGSY_S_W_FLAGS); new_flags = BSF_NO_FLAGS; if (old_flags & EGSY_S_V_WEAK) new_flags |= BSF_WEAK; - if (vms_rec[6] & EGSY_S_V_DEF) + if (old_flags & EGSY_S_V_DEF) { /* Symbol definition. */ - symbol->name = _bfd_vms_save_counted_string (vms_rec + 32); if (old_flags & EGSY_S_V_NORM) - /* Proc def. */ new_flags |= BSF_FUNCTION; - - symbol->value = bfd_getl64 (vms_rec + 8); - symbol->section = (asection *) ((unsigned long) bfd_getl32 (vms_rec + 28)); + symbol->name = + _bfd_vms_save_counted_string (vms_rec + ESDF_S_B_NAMLNG); + symbol->value = bfd_getl64 (vms_rec + ESDF_S_L_VALUE); + symbol->section = + (asection *)(unsigned long) bfd_getl32 (vms_rec + ESDF_S_L_PSINDX); #if VMS_DEBUG - vms_debug (4, "egsd sym def #%d (%s, %d, %04x=%s)\n", abfd->symcount, - symbol->name, (int) symbol->section, old_flags, - flag2str (gsyflagdesc, old_flags)); + vms_debug (4, "EGSD sym def #%d (%s, %ld, %04x=%s)\n", + abfd->symcount, symbol->name, (long)symbol->section, + old_flags, flag2str (gsyflagdesc, old_flags)); #endif } else { /* Symbol reference. */ - symbol->name = _bfd_vms_save_counted_string (vms_rec + 8); + symbol->name = + _bfd_vms_save_counted_string (vms_rec + ESRF_S_B_NAMLNG); #if VMS_DEBUG - vms_debug (4, "egsd sym ref #%d (%s, %04x=%s)\n", abfd->symcount, - symbol->name, old_flags, flag2str (gsyflagdesc, old_flags)); + vms_debug (4, "EGSD sym ref #%d (%s, %04x=%s)\n", + abfd->symcount, symbol->name, old_flags, + flag2str (gsyflagdesc, old_flags)); #endif - symbol->section = bfd_make_section (abfd, BFD_UND_SECTION_NAME); + symbol->section = (asection *)(unsigned long)-1; } symbol->flags = new_flags; - /* Save symbol in vms_symbol_table. */ - entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table), - symbol->name, - TRUE, FALSE); + /* Register symbol in VMS symbol table. */ + entry = (vms_symbol_entry *) bfd_hash_lookup + (PRIV (vms_symbol_table), symbol->name, TRUE, FALSE); + if (entry == NULL) { bfd_set_error (bfd_error_no_memory); @@ -672,11 +685,73 @@ _bfd_vms_slurp_gsd (bfd * abfd, int objtype) } break; - case EGSD_S_C_IDC + EVAX_OFFSET: + case EGSD_S_C_SYMG + EVAX_OFFSET: + { + /* Universal symbol specification (definition). */ + symbol = bfd_make_empty_symbol (abfd); + if (symbol == 0) + return -1; + + old_flags = bfd_getl16 (vms_rec + EGST_S_W_FLAGS); + new_flags = BSF_NO_FLAGS; + + if (old_flags & EGSY_S_V_WEAK) + new_flags |= BSF_WEAK; + + if (old_flags & EGSY_S_V_DEF) /* symbol definition */ + { + if (old_flags & EGSY_S_V_NORM) + new_flags |= BSF_FUNCTION; + + symbol->name = + _bfd_vms_save_counted_string (vms_rec + EGST_S_B_NAMLNG); + + /* For BSF_FUNCTION symbols, the entry point is in LP_1 + and the descriptor in LP_2. For other symbols, the + unique value is in LP_2. */ + symbol->value = bfd_getl64 (vms_rec + EGST_S_Q_LP_2); + + /* Adding this offset is necessary in order for GDB to + read the DWARF-2 debug info from shared libraries. */ + if (abfd->flags & DYNAMIC + && strstr (symbol->name, "$DWARF2.DEBUG") != 0) + symbol->value += PRIV (symvva); + } + else /* symbol reference */ + (*_bfd_error_handler) ("Invalid EGST reference"); + + symbol->flags = new_flags; + + if (register_universal_symbol (abfd, symbol, old_flags) < 0) + return -1; + + /* Make a second symbol for the entry point. */ + if (symbol->flags & BSF_FUNCTION) + { + asymbol *en_sym; + char *name = bfd_alloc (abfd, strlen (symbol->name) + 5); + + en_sym = bfd_make_empty_symbol (abfd); + if (en_sym == 0) + return -1; + + strcpy (name, symbol->name); + strcat (name, "..en"); + + en_sym->name = name; + en_sym->value = bfd_getl64 (vms_rec + EGST_S_Q_LP_1); + + if (register_universal_symbol (abfd, en_sym, old_flags) < 0) + return -1; + } + } break; + case EGSD_S_C_IDC + EVAX_OFFSET: + break; + default: - (*_bfd_error_handler) (_("unknown gsd/egsd subtype %d"), gsd_type); + (*_bfd_error_handler) (_("Unknown GSD/EGSD subtype %d"), gsd_type); bfd_set_error (bfd_error_bad_value); return -1; } @@ -691,7 +766,79 @@ _bfd_vms_slurp_gsd (bfd * abfd, int objtype) return 0; } -/* Output routines. */ +/* Register a universal symbol in the VMS symbol table. */ + +static int +register_universal_symbol (bfd *abfd, asymbol *symbol, int vms_flags) +{ + bfd_vma sbase = 0; + asection *s, *sec = NULL; + vms_symbol_entry *entry; + + /* A universal symbol is by definition global... */ + symbol->flags |= BSF_GLOBAL; + + /* ...and dynamic in shared libraries. */ + if (abfd->flags & DYNAMIC) + symbol->flags |= BSF_DYNAMIC; + + /* Find containing section. */ + for (s = abfd->sections; s; s = s->next) + { + if (symbol->value >= s->vma + && s->vma > sbase + && !(s->flags & SEC_COFF_SHARED_LIBRARY) + && (s->size > 0 || !(vms_flags & EGSY_S_V_REL))) + { + sbase = s->vma; + sec = s; + } + } + + symbol->value -= sbase; + symbol->section = sec; + +#if VMS_DEBUG + vms_debug (4, "EGST sym def #%d (%s, 0x%llx => 0x%llx, %04x=%s)\n", + abfd->symcount, symbol->name, symbol->value + sbase, + symbol->value, vms_flags, + flag2str(gsyflagdesc, vms_flags)); +#endif + + entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table), + symbol->name, + TRUE, FALSE); + + if (entry == NULL) + { + bfd_set_error (bfd_error_no_memory); + return -1; + } + + if (entry->symbol) /* FIXME: DEC C generates this */ + { +#if VMS_DEBUG + vms_debug (4, "EGSD_S_C_SYMG: duplicate \"%s\"\n", symbol->name); +#endif + } + else + { + entry->symbol = symbol; + PRIV (gsd_sym_count)++; + abfd->symcount++; + } + + return 0; +} + +/* Set section VMS flags. */ + +void +bfd_vms_set_section_flags (bfd *abfd ATTRIBUTE_UNUSED, + asection *sec, flagword flags) +{ + vms_section_data (sec)->vflags = flags; +} /* Write section and symbol directory of bfd abfd. */ @@ -705,6 +852,7 @@ _bfd_vms_write_gsd (bfd *abfd, int objtype ATTRIBUTE_UNUSED) char dummy_name[10]; char *sname; flagword new_flags, old_flags; + int abs_section_index = 0; #if VMS_DEBUG vms_debug (2, "vms_write_gsd (%p, %d)\n", abfd, objtype); @@ -730,6 +878,11 @@ _bfd_vms_write_gsd (bfd *abfd, int objtype ATTRIBUTE_UNUSED) vms_debug (3, "Section #%d %s, %d bytes\n", section->index, section->name, (int)section->size); #endif + /* Don't write out the VMS debug info section since it is in the + ETBT and EDBG sections in etir. */ + if (!strcmp (section->name, ".vmsdebug")) + goto done; + /* 13 bytes egsd, max 31 chars name -> should be 44 bytes. */ if (_bfd_vms_output_check (abfd, 64) < 0) { @@ -775,6 +928,11 @@ _bfd_vms_write_gsd (bfd *abfd, int objtype ATTRIBUTE_UNUSED) sname = EVAX_READONLY_NAME; else if ((*sname == 'l') && (strcmp (sname, "literal") == 0)) sname = EVAX_LITERAL_NAME; + else if ((*sname == 'l') && (strcmp (sname, "literals") == 0)) + { + sname = EVAX_LITERALS_NAME; + abs_section_index = section->index; + } else if ((*sname == 'c') && (strcmp (sname, "comm") == 0)) sname = EVAX_COMMON_NAME; else if ((*sname == 'l') && (strcmp (sname, "lcomm") == 0)) @@ -785,18 +943,34 @@ _bfd_vms_write_gsd (bfd *abfd, int objtype ATTRIBUTE_UNUSED) _bfd_vms_output_begin (abfd, EGSD_S_C_PSC, -1); _bfd_vms_output_short (abfd, section->alignment_power & 0xff); + if (bfd_is_com_section (section)) - new_flags = (EGPS_S_V_OVR | EGPS_S_V_REL | EGPS_S_V_GBL | EGPS_S_V_RD | EGPS_S_V_WRT | EGPS_S_V_NOMOD | EGPS_S_V_COM); + new_flags = (EGPS_S_V_OVR | EGPS_S_V_REL | EGPS_S_V_GBL | EGPS_S_V_RD + | EGPS_S_V_WRT | EGPS_S_V_NOMOD | EGPS_S_V_COM); else new_flags = vms_esecflag_by_name (evax_section_flags, sname, section->size > 0); + /* Modify them as directed. */ + if (section->flags & SEC_READONLY) + new_flags &= ~EGPS_S_V_WRT; + + new_flags |= vms_section_data (section)->vflags & 0xffff; + new_flags &= + ~((vms_section_data (section)->vflags >> EGPS_S_V_NO_SHIFT) & 0xffff); + +#if VMS_DEBUG + vms_debug (3, "sec flags %x\n", section->flags); + vms_debug (3, "new_flags %x, _raw_size %d\n", new_flags, section->size); +#endif + _bfd_vms_output_short (abfd, new_flags); _bfd_vms_output_long (abfd, (unsigned long) section->size); _bfd_vms_output_counted (abfd, sname); _bfd_vms_output_flush (abfd); last_index = section->index; +done: section = section->next; } @@ -822,9 +996,11 @@ _bfd_vms_write_gsd (bfd *abfd, int objtype ATTRIBUTE_UNUSED) if (old_flags & BSF_FILE) continue; - if (((old_flags & (BSF_GLOBAL | BSF_WEAK)) == 0) /* Not xdef... */ - && (!bfd_is_und_section (symbol->section))) /* ...and not xref. */ - continue; /* Dont output. */ + if ((old_flags & BSF_GLOBAL) == 0 /* Not xdef... */ + && !bfd_is_und_section (symbol->section) /* and not xref... */ + && !((old_flags & BSF_SECTION_SYM) != 0 /* and not LIB$INITIALIZE. */ + && strcmp (symbol->section->name, "LIB$INITIALIZE") == 0)) + continue; /* 13 bytes egsd, max 64 chars name -> should be 77 bytes. */ if (_bfd_vms_output_check (abfd, 80) < 0) @@ -846,7 +1022,7 @@ _bfd_vms_write_gsd (bfd *abfd, int objtype ATTRIBUTE_UNUSED) if (old_flags & BSF_WEAK) new_flags |= EGSY_S_V_WEAK; - if (bfd_is_com_section (symbol->section)) + if (bfd_is_com_section (symbol->section)) /* .comm */ new_flags |= (EGSY_S_V_WEAK | EGSY_S_V_COMM); if (old_flags & BSF_FUNCTION) @@ -854,7 +1030,7 @@ _bfd_vms_write_gsd (bfd *abfd, int objtype ATTRIBUTE_UNUSED) new_flags |= EGSY_S_V_NORM; new_flags |= EGSY_S_V_REL; } - if (old_flags & (BSF_GLOBAL | BSF_WEAK)) + if (old_flags & BSF_GLOBAL) { new_flags |= EGSY_S_V_DEF; if (!bfd_is_abs_section (symbol->section)) @@ -862,7 +1038,7 @@ _bfd_vms_write_gsd (bfd *abfd, int objtype ATTRIBUTE_UNUSED) } _bfd_vms_output_short (abfd, new_flags); - if (old_flags & (BSF_GLOBAL | BSF_WEAK)) + if (old_flags & BSF_GLOBAL) { /* Symbol definition. */ uquad code_address = 0; @@ -871,10 +1047,19 @@ _bfd_vms_write_gsd (bfd *abfd, int objtype ATTRIBUTE_UNUSED) if ((old_flags & BSF_FUNCTION) && symbol->udata.p != NULL) { - code_address = ((asymbol *) (symbol->udata.p))->value; - ca_psindx = ((asymbol *) (symbol->udata.p))->section->index; + asymbol *sym; + + if (bfd_get_flavour (abfd) == bfd_target_evax_flavour) + sym = ((struct evax_private_udata_struct *)symbol->udata.p)->enbsym; + else + sym = (asymbol *)symbol->udata.p; + code_address = sym->value; + ca_psindx = sym->section->index; } - psindx = symbol->section->index; + if (bfd_is_abs_section (symbol->section)) + psindx = abs_section_index; + else + psindx = symbol->section->index; _bfd_vms_output_quad (abfd, symbol->value); _bfd_vms_output_quad (abfd, code_address); diff --git a/cegcc/src/binutils/bfd/vms-hdr.c b/cegcc/src/binutils/bfd/vms-hdr.c index 11e1af601..8c10df622 100644 --- a/cegcc/src/binutils/bfd/vms-hdr.c +++ b/cegcc/src/binutils/bfd/vms-hdr.c @@ -1,14 +1,31 @@ /* vms-hdr.c -- BFD back-end for VMS/VAX (openVMS/VAX) and EVAX (openVMS/Alpha) files. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, - 2007 Free Software Foundation, Inc. + 2007, 2008, 2009 Free Software Foundation, Inc. HDR record handling functions EMH record handling functions - and + EOM record handling functions EEOM record handling functions + IHD record handling functions + EIHD record handling functions + + ISD record handling functions + EISD record handling functions + + IHS record handling functions + EIHS record handling functions + + DBG record handling functions + EDBG record handling functions + + TBT record handling functions + ETBT record handling functions + + DST/DMT section handling functions + Written by Klaus K"ampf (kkaempf@rmi.de) This program is free software; you can redistribute it and/or modify @@ -35,9 +52,19 @@ #include "vms.h" -#ifdef HAVE_ALLOCA_H -#include -#endif +static struct module *new_module (bfd *); +static void parse_module + (bfd *, struct module *, unsigned char *, unsigned int); +static struct module *build_module_list (bfd *); +static bfd_boolean module_find_nearest_line + (bfd *, struct module *, bfd_vma, const char **, const char **, + unsigned int *); +static int vms_slurp_debug (bfd *); + +#define SET_MODULE_PARSED(m) \ + do { if ((m)->name == NULL) (m)->name = ""; } while (0) +#define IS_MODULE_PARSED(m) ((m)->name != NULL) + /* Read & process emh record return 0 on success, -1 on error. */ @@ -85,15 +112,15 @@ _bfd_vms_slurp_hdr (bfd *abfd, int objtype) break; case MHD_S_C_LNM: - PRIV (hdr_data).hdr_c_lnm = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 2)); + PRIV (hdr_data).hdr_c_lnm = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_size - 2)); break; case MHD_S_C_SRC: - PRIV (hdr_data).hdr_c_src = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 2)); + PRIV (hdr_data).hdr_c_src = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_size - 2)); break; case MHD_S_C_TTL: - PRIV (hdr_data).hdr_c_ttl = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 2)); + PRIV (hdr_data).hdr_c_ttl = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_size - 2)); break; case EMH_S_C_MHD + EVAX_OFFSET: @@ -110,15 +137,15 @@ _bfd_vms_slurp_hdr (bfd *abfd, int objtype) break; case EMH_S_C_LNM + EVAX_OFFSET: - PRIV (hdr_data).hdr_c_lnm = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 6)); + PRIV (hdr_data).hdr_c_lnm = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_size - 6)); break; case EMH_S_C_SRC + EVAX_OFFSET: - PRIV (hdr_data).hdr_c_src = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 6)); + PRIV (hdr_data).hdr_c_src = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_size - 6)); break; case EMH_S_C_TTL + EVAX_OFFSET: - PRIV (hdr_data).hdr_c_ttl = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_length - 6)); + PRIV (hdr_data).hdr_c_ttl = _bfd_vms_save_sized_string (vms_rec, PRIV (rec_size - 6)); break; case MHD_S_C_CPR: @@ -189,6 +216,7 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype) unsigned int symnum; int had_case = 0; int had_file = 0; + char version [256]; #if VMS_DEBUG vms_debug (2, "vms_write_hdr (%p)\n", abfd); @@ -213,27 +241,34 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype) fptr = bfd_get_filename (abfd); fname = strdup (fptr); + + /* Strip VMS path. */ fout = strrchr (fname, ']'); - if (fout == 0) + if (fout == NULL) fout = strchr (fname, ':'); - if (fout != 0) + if (fout != NULL) fout++; else fout = fname; + /* Strip UNIX path. */ + fptr = strrchr (fout, '/'); + if (fptr != NULL) + fout = fptr + 1; + /* Strip .obj suffix. */ - fptr = strrchr (fname, '.'); - if ((fptr != 0) - && (strcasecmp (fptr, ".OBJ") == 0)) + fptr = strrchr (fout, '.'); + if (fptr != 0 && strcasecmp (fptr, ".OBJ") == 0) *fptr = 0; + /* Convert to upper case and truncate at 31 characters. + (VMS object file format restricts module name length to 31). */ fptr = fout; while (*fptr != 0) { *fptr = TOUPPER (*fptr); fptr++; - if ((*fptr == ';') - || ((fptr - fout) > 31)) + if (*fptr == ';' || (fptr - fout) >= 31) *fptr = 0; } _bfd_vms_output_counted (abfd, fout); @@ -243,13 +278,14 @@ _bfd_vms_write_hdr (bfd *abfd, int objtype) _bfd_vms_output_counted (abfd, "NONAME"); _bfd_vms_output_counted (abfd, BFD_VERSION_STRING); - _bfd_vms_output_dump (abfd, get_vms_time_string (), 17); - _bfd_vms_output_fill (abfd, 0, 17); + _bfd_vms_output_dump (abfd, get_vms_time_string (), EMH_DATE_LENGTH); + _bfd_vms_output_fill (abfd, 0, EMH_DATE_LENGTH); _bfd_vms_output_flush (abfd); /* LMN. */ _bfd_vms_output_begin (abfd, EOBJ_S_C_EMH, EMH_S_C_LNM); - _bfd_vms_output_dump (abfd, (unsigned char *) STRING_COMMA_LEN ("GAS proGIS")); + snprintf (version, sizeof (version), "GAS BFD v%s", BFD_VERSION_STRING); + _bfd_vms_output_dump (abfd, (unsigned char *)version, strlen (version)); _bfd_vms_output_flush (abfd); /* SRC. */ @@ -320,10 +356,10 @@ _bfd_vms_slurp_eom (bfd *abfd, int objtype) } else { - PRIV (eom_data).eom_l_total_lps = bfd_getl32 (vms_rec + 4); - PRIV (eom_data).eom_b_comcod = *(vms_rec + 8); - - if (PRIV (eom_data).eom_b_comcod > 1) + PRIV (eom_data).eom_l_total_lps + = bfd_getl32 (vms_rec + EEOM_S_L_TOTAL_LPS); + PRIV (eom_data).eom_w_comcod = bfd_getl16 (vms_rec + EEOM_S_W_COMCOD); + if (PRIV (eom_data).eom_w_comcod > 1) { (*_bfd_error_handler) (_("Object module NOT error-free !\n")); bfd_set_error (bfd_error_bad_value); @@ -333,9 +369,11 @@ _bfd_vms_slurp_eom (bfd *abfd, int objtype) if (PRIV (rec_size) > 10) { PRIV (eom_data).eom_has_transfer = TRUE; - PRIV (eom_data).eom_b_tfrflg = *(vms_rec + 9); - PRIV (eom_data).eom_l_psindx = bfd_getl32 (vms_rec + 12); - PRIV (eom_data).eom_l_tfradr = bfd_getl32 (vms_rec + 16); + PRIV (eom_data).eom_b_tfrflg = vms_rec[EEOM_S_B_TFRFLG]; + PRIV (eom_data).eom_l_psindx + = bfd_getl32 (vms_rec + EEOM_S_L_PSINDX); + PRIV (eom_data).eom_l_tfradr + = bfd_getl32 (vms_rec + EEOM_S_L_TFRADR); abfd->start_address = PRIV (eom_data).eom_l_tfradr; } @@ -377,3 +415,1001 @@ _bfd_vms_write_eom (bfd *abfd, int objtype) _bfd_vms_output_end (abfd); return 0; } + +/* Read & process IHD/EIHD record. + Return 0 on success, -1 on error */ +int +_bfd_vms_slurp_ihd (bfd *abfd, unsigned int *isd_offset, + unsigned int *ihs_offset) +{ + unsigned int imgtype, size; + bfd_vma symvva; + +#if VMS_DEBUG + vms_debug (8, "_bfd_vms_slurp_ihd\n"); +#endif + + size = bfd_getl32 (PRIV (vms_rec) + EIHD_S_L_SIZE); + imgtype = bfd_getl32 (PRIV (vms_rec) + EIHD_S_L_IMGTYPE); + + if (imgtype == EIHD_S_K_EXE) + abfd->flags |= EXEC_P; + + symvva = bfd_getl64 (PRIV (vms_rec) + EIHD_S_Q_SYMVVA); + if (symvva != 0) + { + PRIV (symvva) = symvva; + abfd->flags |= DYNAMIC; + } + + *isd_offset = bfd_getl32 (PRIV (vms_rec) + EIHD_S_L_ISDOFF); + *ihs_offset = bfd_getl32 (PRIV (vms_rec) + EIHD_S_L_SYMDBGOFF); + +#if VMS_DEBUG + vms_debug (4, "EIHD record size %d imgtype %d symvva 0x%llx isd %d ihs %d\n", + size, imgtype, symvva, *isd_offset, *ihs_offset); +#endif + + return 0; +} + +/* Read & process ISD/EISD record + return 0 on success, -1 on error */ + +int +_bfd_vms_slurp_isd (bfd *abfd, unsigned int offset) +{ + int section_count = 0; + unsigned char *p; + unsigned int rec_size; + +#if VMS_DEBUG + vms_debug (8, "_bfd_vms_slurp_isd\n"); +#endif + + for (p = PRIV (vms_rec) + offset; + (rec_size = bfd_getl32 (p + EISD_S_L_EISDSIZE)) != 0; + p += rec_size) + { + unsigned long long vaddr = bfd_getl64 (p + EISD_S_Q_VIR_ADDR); + unsigned int size = bfd_getl32 (p + EISD_S_L_SECSIZE); + unsigned int flags = bfd_getl32 (p + EISD_S_L_FLAGS); + unsigned int vbn = bfd_getl32 (p + EISD_S_L_VBN); + char *name = NULL; + asection *section; + flagword bfd_flags; + +#if VMS_DEBUG + vms_debug (4, "EISD record at 0x%x size 0x%x addr 0x%x bfd_flags 0x%x block %d\n", + p - PRIV (vms_rec), size, vaddr, flags, vbn); +#endif + + /* VMS combines psects from .obj files into isects in the .exe. This + process doesn't preserve enough information to reliably determine + what's in each section without examining the data. This is + especially true of DWARF debug sections. */ + bfd_flags = SEC_ALLOC; + + if (flags & EISD_S_M_EXE) + bfd_flags |= SEC_CODE | SEC_HAS_CONTENTS | SEC_LOAD; + + if (flags & EISD_S_M_NONSHRADR) + bfd_flags |= SEC_DATA | SEC_HAS_CONTENTS | SEC_LOAD; + + if (!(flags & EISD_S_M_WRT)) + bfd_flags |= SEC_READONLY; + + if (flags & EISD_S_M_DZRO) + bfd_flags |= SEC_DATA; + + if (flags & EISD_S_M_FIXUPVEC) + bfd_flags |= SEC_DATA | SEC_HAS_CONTENTS | SEC_LOAD; + + if (flags & EISD_S_M_CRF) + bfd_flags |= SEC_HAS_CONTENTS | SEC_LOAD; + + if (flags & EISD_S_M_GBL) + { + name = _bfd_vms_save_counted_string (p + EISD_S_T_GBLNAM); + bfd_flags |= SEC_COFF_SHARED_LIBRARY; + bfd_flags &= ~(SEC_ALLOC | SEC_LOAD); + } + else + { + name = (char*) bfd_alloc (abfd, 32); + sprintf (name, "$LOCAL_%03d$", section_count++); + } + + section = bfd_make_section (abfd, name); + + if (!section) + return -1; + + section->filepos = vbn ? VMS_BLOCK_SIZE * (vbn - 1) : (unsigned int)-1; + section->size = size; + section->vma = vaddr; + + if (!bfd_set_section_flags (abfd, section, bfd_flags)) + return -1; + } + + return 0; +} + +/* Read & process IHS/EIHS record + return 0 on success, -1 on error */ +int +_bfd_vms_slurp_ihs (bfd *abfd, unsigned int offset) +{ + unsigned char *p = PRIV (vms_rec) + offset; + unsigned int gstvbn = bfd_getl32 (p + EIHS_S_L_GSTVBN); + unsigned int gstsize ATTRIBUTE_UNUSED = bfd_getl32 (p + EIHS_S_L_GSTSIZE); + unsigned int dstvbn = bfd_getl32 (p + EIHS_S_L_DSTVBN); + unsigned int dstsize = bfd_getl32 (p + EIHS_S_L_DSTSIZE); + unsigned int dmtvbn = bfd_getl32 (p + EIHS_S_L_DMTVBN); + unsigned int dmtbytes = bfd_getl32 (p + EIHS_S_L_DMTBYTES); + asection *section; + +#if VMS_DEBUG + vms_debug (8, "_bfd_vms_slurp_ihs\n"); + vms_debug (4, "EIHS record gstvbn %d gstsize %d dstvbn %d dstsize %d dmtvbn %d dmtbytes %d\n", + gstvbn, gstsize, dstvbn, dstsize, dmtvbn, dmtbytes); +#endif + + if (dstvbn) + { + flagword bfd_flags = SEC_HAS_CONTENTS | SEC_DEBUGGING; + + section = bfd_make_section (abfd, "$DST$"); + if (!section) + return -1; + + section->size = dstsize; + section->filepos = VMS_BLOCK_SIZE * (dstvbn - 1); + + if (!bfd_set_section_flags (abfd, section, bfd_flags)) + return -1; + + PRIV (dst_section) = section; + abfd->flags |= (HAS_DEBUG | HAS_LINENO); + } + + if (dmtvbn) + { + flagword bfd_flags = SEC_HAS_CONTENTS | SEC_DEBUGGING; + + section = bfd_make_section (abfd, "$DMT$"); + if (!section) + return -1; + + section->size = dmtbytes; + section->filepos = VMS_BLOCK_SIZE * (dmtvbn - 1); + + if (!bfd_set_section_flags (abfd, section, bfd_flags)) + return -1; + } + + if (gstvbn) + { + flagword bfd_flags = SEC_HAS_CONTENTS; + + section = bfd_make_section (abfd, "$GST$"); + if (!section) + return -1; + + if (bfd_seek (abfd, VMS_BLOCK_SIZE * (gstvbn - 1), SEEK_SET)) + { + bfd_set_error (bfd_error_file_truncated); + return -1; + } + + if (_bfd_vms_slurp_object_records (abfd) != 0) + return -1; + + section->filepos = VMS_BLOCK_SIZE * (gstvbn - 1); + section->size = bfd_tell (abfd) - section->filepos; + + if (!bfd_set_section_flags (abfd, section, bfd_flags)) + return -1; + + abfd->flags |= HAS_SYMS; + } + + return 0; +} + +/* Build a new module for the specified BFD. */ + +static struct module * +new_module (bfd *abfd) +{ + struct module *module + = (struct module *) bfd_zalloc (abfd, sizeof (struct module)); + module->file_table_count = 16; /* Arbitrary. */ + module->file_table + = bfd_malloc (module->file_table_count * sizeof (struct fileinfo)); + return module; +} + +/* Parse debug info for a module and internalize it. */ + +static void +parse_module (bfd *abfd, struct module *module, unsigned char *ptr, + unsigned int length) +{ + unsigned char *maxptr = ptr + length, *src_ptr, *pcl_ptr; + unsigned int prev_linum = 0, curr_linenum = 0; + bfd_vma prev_pc = 0, curr_pc = 0; + struct srecinfo *curr_srec, *srec; + struct lineinfo *curr_line, *line; + struct funcinfo *funcinfo; + + /* Initialize tables with zero element. */ + curr_srec = (struct srecinfo *) bfd_zalloc (abfd, sizeof (struct srecinfo)); + module->srec_table = curr_srec; + + curr_line = (struct lineinfo *) bfd_zalloc (abfd, sizeof (struct lineinfo)); + module->line_table = curr_line; + + while (ptr < maxptr) + { + /* The first byte is not counted in the recorded length. */ + int rec_length = bfd_getl16 (ptr) + 1; + int rec_type = bfd_getl16 (ptr + 2); + +#if VMS_DEBUG + _bfd_vms_debug (2, "DST record: length %d, type %d\n", + rec_length, rec_type); +#endif + + switch (rec_type) + { + case DST_S_C_MODBEG: + module->name + = _bfd_vms_save_counted_string (ptr + DST_S_B_MODBEG_NAME); + + curr_pc = 0; + prev_pc = 0; + curr_linenum = 0; + prev_linum = 0; + +#if VMS_DEBUG + _bfd_vms_debug (3, "module: %s\n", module->name); +#endif + break; + + case DST_S_C_MODEND: +#if VMS_DEBUG + _bfd_vms_debug (3, "end module\n"); +#endif + break; + + case DST_S_C_RTNBEG: + funcinfo = (struct funcinfo *) + bfd_zalloc (abfd, sizeof (struct funcinfo)); + funcinfo->name + = _bfd_vms_save_counted_string (ptr + DST_S_B_RTNBEG_NAME); + funcinfo->low = bfd_getl32 (ptr + DST_S_L_RTNBEG_ADDRESS); + funcinfo->next = module->func_table; + module->func_table = funcinfo; + +#if VMS_DEBUG + _bfd_vms_debug (3, "routine: %s at 0x%x\n", + funcinfo->name, funcinfo->low); +#endif + break; + + case DST_S_C_RTNEND: + module->func_table->high = module->func_table->low + + bfd_getl32 (ptr + DST_S_L_RTNEND_SIZE) - 1; + + if (module->func_table->high > module->high) + module->high = module->func_table->high; + +#if VMS_DEBUG + _bfd_vms_debug (3, "end routine\n"); +#endif + break; + + case DST_S_C_PROLOG: +#if VMS_DEBUG + _bfd_vms_debug (3, "prologue\n"); +#endif + break; + + case DST_S_C_EPILOG: +#if VMS_DEBUG + _bfd_vms_debug (3, "epilog\n"); +#endif + break; + + case DST_S_C_BLKBEG: +#if VMS_DEBUG + _bfd_vms_debug (3, "block\n"); +#endif + break; + + case DST_S_C_BLKEND: +#if VMS_DEBUG + _bfd_vms_debug (3, "end block\n"); +#endif + break; + + case DST_S_C_SOURCE: + src_ptr = ptr + DST_S_C_SOURCE_HEADER_SIZE; + +#if VMS_DEBUG + _bfd_vms_debug (3, "source info\n"); +#endif + + while (src_ptr < ptr + rec_length) + { + int cmd = src_ptr[0], cmd_length, data; + + switch (cmd) + { + case DST_S_C_SRC_DECLFILE: + { + unsigned int fileid + = bfd_getl16 (src_ptr + DST_S_W_SRC_DF_FILEID); + char *filename + = _bfd_vms_save_counted_string (src_ptr + + DST_S_B_SRC_DF_FILENAME); + + while (fileid >= module->file_table_count) + { + module->file_table_count *= 2; + module->file_table + = bfd_realloc (module->file_table, + module->file_table_count + * sizeof (struct fileinfo)); + } + + module->file_table [fileid].name = filename; + module->file_table [fileid].srec = 1; + cmd_length = src_ptr[DST_S_B_SRC_DF_LENGTH] + 2; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SRC_DECLFILE: %d, %s\n", + fileid, + module->file_table [fileid].name); +#endif + } + break; + + case DST_S_C_SRC_DEFLINES_B: + /* Perform the association and set the next higher index + to the limit. */ + data = src_ptr[DST_S_B_SRC_UNSBYTE]; + srec = (struct srecinfo *) + bfd_zalloc (abfd, sizeof (struct srecinfo)); + srec->line = curr_srec->line + data; + srec->srec = curr_srec->srec + data; + srec->sfile = curr_srec->sfile; + curr_srec->next = srec; + curr_srec = srec; + cmd_length = 2; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SRC_DEFLINES_B: %d\n", data); +#endif + break; + + case DST_S_C_SRC_DEFLINES_W: + /* Perform the association and set the next higher index + to the limit. */ + data = bfd_getl16 (src_ptr + DST_S_W_SRC_UNSWORD); + srec = (struct srecinfo *) + bfd_zalloc (abfd, sizeof (struct srecinfo)); + srec->line = curr_srec->line + data; + srec->srec = curr_srec->srec + data, + srec->sfile = curr_srec->sfile; + curr_srec->next = srec; + curr_srec = srec; + cmd_length = 3; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SRC_DEFLINES_W: %d\n", data); +#endif + break; + + case DST_S_C_SRC_INCRLNUM_B: + data = src_ptr[DST_S_B_SRC_UNSBYTE]; + curr_srec->line += data; + cmd_length = 2; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SRC_INCRLNUM_B: %d\n", data); +#endif + break; + + case DST_S_C_SRC_SETFILE: + data = bfd_getl16 (src_ptr + DST_S_W_SRC_UNSWORD); + curr_srec->sfile = data; + curr_srec->srec = module->file_table[data].srec; + cmd_length = 3; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SRC_SETFILE: %d\n", data); +#endif + break; + + case DST_S_C_SRC_SETLNUM_L: + data = bfd_getl32 (src_ptr + DST_S_L_SRC_UNSLONG); + curr_srec->line = data; + cmd_length = 5; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SRC_SETLNUM_L: %d\n", data); +#endif + break; + + case DST_S_C_SRC_SETLNUM_W: + data = bfd_getl16 (src_ptr + DST_S_W_SRC_UNSWORD); + curr_srec->line = data; + cmd_length = 3; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SRC_SETLNUM_W: %d\n", data); +#endif + break; + + case DST_S_C_SRC_SETREC_L: + data = bfd_getl32 (src_ptr + DST_S_L_SRC_UNSLONG); + curr_srec->srec = data; + module->file_table[curr_srec->sfile].srec = data; + cmd_length = 5; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SRC_SETREC_L: %d\n", data); +#endif + break; + + case DST_S_C_SRC_SETREC_W: + data = bfd_getl16 (src_ptr + DST_S_W_SRC_UNSWORD); + curr_srec->srec = data; + module->file_table[curr_srec->sfile].srec = data; + cmd_length = 3; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SRC_SETREC_W: %d\n", data); +#endif + break; + + case DST_S_C_SRC_FORMFEED: + cmd_length = 1; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SRC_FORMFEED\n"); +#endif + break; + + default: + (*_bfd_error_handler) (_("unknown source command %d"), + cmd); + cmd_length = 2; + break; + } + + src_ptr += cmd_length; + } + break; + + case DST_S_C_LINE_NUM: + pcl_ptr = ptr + DST_S_C_LINE_NUM_HEADER_SIZE; + +#if VMS_DEBUG + _bfd_vms_debug (3, "line info\n"); +#endif + + while (pcl_ptr < ptr + rec_length) + { + /* The command byte is signed so we must sign-extend it. */ + int cmd = ((signed char *)pcl_ptr)[0], cmd_length, data; + + switch (cmd) + { + case DST_S_C_DELTA_PC_W: + data = bfd_getl16 (pcl_ptr + DST_S_W_PCLINE_UNSWORD); + curr_pc += data; + curr_linenum += 1; + cmd_length = 3; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_DELTA_PC_W: %d\n", data); +#endif + break; + + case DST_S_C_DELTA_PC_L: + data = bfd_getl32 (pcl_ptr + DST_S_L_PCLINE_UNSLONG); + curr_pc += data; + curr_linenum += 1; + cmd_length = 5; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_DELTA_PC_L: %d\n", data); +#endif + break; + + case DST_S_C_INCR_LINUM: + data = pcl_ptr[DST_S_B_PCLINE_UNSBYTE]; + curr_linenum += data; + cmd_length = 2; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_INCR_LINUM: %d\n", data); +#endif + break; + + case DST_S_C_INCR_LINUM_W: + data = bfd_getl16 (pcl_ptr + DST_S_W_PCLINE_UNSWORD); + curr_linenum += data; + cmd_length = 3; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_INCR_LINUM_W: %d\n", data); +#endif + break; + + case DST_S_C_INCR_LINUM_L: + data = bfd_getl32 (pcl_ptr + DST_S_L_PCLINE_UNSLONG); + curr_linenum += data; + cmd_length = 5; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_INCR_LINUM_L: %d\n", data); +#endif + break; + + case DST_S_C_SET_LINUM_INCR: + (*_bfd_error_handler) + (_("DST_S_C_SET_LINUM_INCR not implemented")); + cmd_length = 2; + break; + + case DST_S_C_SET_LINUM_INCR_W: + (*_bfd_error_handler) + (_("DST_S_C_SET_LINUM_INCR_W not implemented")); + cmd_length = 3; + break; + + case DST_S_C_RESET_LINUM_INCR: + (*_bfd_error_handler) + (_("DST_S_C_RESET_LINUM_INCR not implemented")); + cmd_length = 1; + break; + + case DST_S_C_BEG_STMT_MODE: + (*_bfd_error_handler) + (_("DST_S_C_BEG_STMT_MODE not implemented")); + cmd_length = 1; + break; + + case DST_S_C_END_STMT_MODE: + (*_bfd_error_handler) + (_("DST_S_C_END_STMT_MODE not implemented")); + cmd_length = 1; + break; + + case DST_S_C_SET_LINUM_B: + data = pcl_ptr[DST_S_B_PCLINE_UNSBYTE]; + curr_linenum = data; + cmd_length = 2; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SET_LINUM_B: %d\n", data); +#endif + break; + + case DST_S_C_SET_LINE_NUM: + data = bfd_getl16 (pcl_ptr + DST_S_W_PCLINE_UNSWORD); + curr_linenum = data; + cmd_length = 3; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SET_LINE_NUM: %d\n", data); +#endif + break; + + case DST_S_C_SET_LINUM_L: + data = bfd_getl32 (pcl_ptr + DST_S_L_PCLINE_UNSLONG); + curr_linenum = data; + cmd_length = 5; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SET_LINUM_L: %d\n", data); +#endif + break; + + case DST_S_C_SET_PC: + (*_bfd_error_handler) + (_("DST_S_C_SET_PC not implemented")); + cmd_length = 2; + break; + + case DST_S_C_SET_PC_W: + (*_bfd_error_handler) + (_("DST_S_C_SET_PC_W not implemented")); + cmd_length = 3; + break; + + case DST_S_C_SET_PC_L: + (*_bfd_error_handler) + (_("DST_S_C_SET_PC_L not implemented")); + cmd_length = 5; + break; + + case DST_S_C_SET_STMTNUM: + (*_bfd_error_handler) + (_("DST_S_C_SET_STMTNUM not implemented")); + cmd_length = 2; + break; + + case DST_S_C_TERM: + data = pcl_ptr[DST_S_B_PCLINE_UNSBYTE]; + curr_pc += data; + cmd_length = 2; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_TERM: %d\n", data); +#endif + break; + + case DST_S_C_TERM_W: + data = bfd_getl16 (pcl_ptr + DST_S_W_PCLINE_UNSWORD); + curr_pc += data; + cmd_length = 3; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_TERM_W: %d\n", data); +#endif + break; + + case DST_S_C_TERM_L: + data = bfd_getl32 (pcl_ptr + DST_S_L_PCLINE_UNSLONG); + curr_pc += data; + cmd_length = 5; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_TERM_L: %d\n", data); +#endif + break; + + case DST_S_C_SET_ABS_PC: + data = bfd_getl32 (pcl_ptr + DST_S_L_PCLINE_UNSLONG); + curr_pc = data; + cmd_length = 5; +#if VMS_DEBUG + _bfd_vms_debug (4, "DST_S_C_SET_ABS_PC: 0x%x\n", data); +#endif + break; + + default: + if (cmd <= 0) + { + curr_pc -= cmd; + curr_linenum += 1; + cmd_length = 1; +#if VMS_DEBUG + _bfd_vms_debug (4, "bump pc to 0x%llx and line to %d\n", + curr_pc, curr_linenum); +#endif + } + else + { + (*_bfd_error_handler) (_("unknown line command %d"), + cmd); + cmd_length = 2; + } + break; + } + + if ((curr_linenum != prev_linum && curr_pc != prev_pc) + || cmd <= 0 + || cmd == DST_S_C_DELTA_PC_L + || cmd == DST_S_C_DELTA_PC_W) + { + line = (struct lineinfo *) + bfd_zalloc (abfd, sizeof (struct lineinfo)); + line->address = curr_pc; + line->line = curr_linenum; + + curr_line->next = line; + curr_line = line; + + prev_linum = curr_linenum; + prev_pc = curr_pc; +#if VMS_DEBUG + _bfd_vms_debug (4, "-> correlate pc 0x%llx with line %d\n", + curr_pc, curr_linenum); +#endif + } + + pcl_ptr += cmd_length; + } + break; + + case 0x17: /* Undocumented type used by DEC C to declare equates. */ +#if VMS_DEBUG + _bfd_vms_debug (3, "undocumented type 0x17\n"); +#endif + break; + + default: +#if VMS_DEBUG + _bfd_vms_debug (3, "ignoring record\n"); +#endif + break; + + } + + ptr += rec_length; + } + + /* Finalize tables with EOL marker. */ + srec = (struct srecinfo *) bfd_zalloc (abfd, sizeof (struct srecinfo)); + srec->line = (unsigned int) -1; + srec->srec = (unsigned int) -1; + curr_srec->next = srec; + + line = (struct lineinfo *) bfd_zalloc (abfd, sizeof (struct lineinfo)); + line->line = (unsigned int) -1; + line->address = (bfd_vma) -1; + curr_line->next = line; + + /* Advertise that this module has been parsed. This is needed + because parsing can be either performed at module creation + or deferred until debug info is consumed. */ + SET_MODULE_PARSED (module); +} + +/* Build the list of modules for the specified BFD. */ + +static struct module * +build_module_list (bfd *abfd) +{ + struct module *module, *list = NULL; + asection *dmt; + + if ((dmt = bfd_get_section_by_name (abfd, "$DMT$"))) + { + /* We have a DMT section so this must be an image. Parse the + section and build the list of modules. This is sufficient + since we can compute the start address and the end address + of every module from the section contents. */ + bfd_size_type size = bfd_get_section_size (dmt); + unsigned char *ptr, *end; + + ptr = (unsigned char *) bfd_alloc (abfd, size); + if (! ptr) + return NULL; + + if (! bfd_get_section_contents (abfd, dmt, ptr, 0, size)) + return NULL; + +#if VMS_DEBUG + _bfd_vms_debug (2, "DMT\n"); +#endif + + end = ptr + size; + + while (ptr < end) + { + /* Each header declares a module with its start offset and size + of debug info in the DST section, as well as the count of + program sections (i.e. address spans) it contains. */ + int modbeg = bfd_getl32 (ptr + DBG_S_L_DMT_MODBEG); + int size = bfd_getl32 (ptr + DBG_S_L_DST_SIZE); + int count = bfd_getl16 (ptr + DBG_S_W_DMT_PSECT_COUNT); + ptr += DBG_S_C_DMT_HEADER_SIZE; + +#if VMS_DEBUG + _bfd_vms_debug (3, "module: modbeg = %d, size = %d, count = %d\n", + modbeg, size, count); +#endif + + /* We create a 'module' structure for each program section since + we only support contiguous addresses in a 'module' structure. + As a consequence, the actual debug info in the DST section is + shared and can be parsed multiple times; that doesn't seem to + cause problems in practice. */ + while (count-- > 0) + { + int start = bfd_getl32 (ptr + DBG_S_L_DMT_PSECT_START); + int length = bfd_getl32 (ptr + DBG_S_L_DMT_PSECT_LENGTH); + module = new_module (abfd); + module->modbeg = modbeg; + module->size = size; + module->low = start; + module->high = start + length; + module->next = list; + list = module; + ptr += DBG_S_C_DMT_PSECT_SIZE; + +#if VMS_DEBUG + _bfd_vms_debug (4, "section: start = 0x%x, length = %d\n", + start, length); +#endif + } + } + } + else + { + /* We don't have a DMT section so this must be an object. Parse + the module right now in order to compute its start address and + end address. */ + module = new_module (abfd); + parse_module (abfd, module, PRIV (dst_section)->contents, + PRIV (dst_ptr_end) - PRIV (dst_section)->contents); + list = module; + } + + return list; +} + +/* Calculate and return the name of the source file and the line nearest + to the wanted location in the specified module. */ + +static bfd_boolean +module_find_nearest_line (bfd *abfd, struct module *module, bfd_vma addr, + const char **file, const char **func, + unsigned int *line) +{ + struct funcinfo *funcinfo; + struct lineinfo *lineinfo; + struct srecinfo *srecinfo; + bfd_boolean ret = FALSE; + + /* Parse this module if that was not done at module creation. */ + if (! IS_MODULE_PARSED (module)) + { + unsigned int size = module->size; + unsigned int modbeg = PRIV (dst_section)->filepos + module->modbeg; + unsigned char *buffer = (unsigned char *) bfd_malloc (module->size); + + if (bfd_seek (abfd, modbeg, SEEK_SET) != 0 + || bfd_bread (buffer, size, abfd) != size) + { + bfd_set_error (bfd_error_no_debug_section); + return FALSE; + } + + parse_module (abfd, module, buffer, size); + free (buffer); + } + + /* Find out the function (if any) that contains the address. */ + for (funcinfo = module->func_table; funcinfo; funcinfo = funcinfo->next) + if (addr >= funcinfo->low && addr <= funcinfo->high) + { + *func = funcinfo->name; + ret = TRUE; + break; + } + + /* Find out the source file and the line nearest to the address. */ + for (lineinfo = module->line_table; lineinfo; lineinfo = lineinfo->next) + if (lineinfo->next && addr < lineinfo->next->address) + { + for (srecinfo = module->srec_table; srecinfo; srecinfo = srecinfo->next) + if (srecinfo->next && lineinfo->line < srecinfo->next->line) + { + if (srecinfo->sfile > 0) + { + *file = module->file_table[srecinfo->sfile].name; + *line = srecinfo->srec + lineinfo->line - srecinfo->line; + } + else + { + *file = module->name; + *line = lineinfo->line; + } + return TRUE; + } + + break; + } + + return ret; +} + +/* Provided a BFD, a section and an offset into the section, calculate and + return the name of the source file and the line nearest to the wanted + location. */ + +bfd_boolean +_bfd_vms_find_nearest_dst_line (bfd *abfd, asection *section, + asymbol **symbols ATTRIBUTE_UNUSED, + bfd_vma offset, const char **file, + const char **func, unsigned int *line) +{ + struct module *module; + + /* What address are we looking for? */ + bfd_vma addr = section->vma + offset; + + *file = NULL; + *func = NULL; + *line = 0; + + if (PRIV (dst_section) == NULL) + return FALSE; + + if (PRIV (modules) == NULL) + { + PRIV (modules) = build_module_list (abfd); + if (PRIV (modules) == NULL) + return FALSE; + } + + for (module = PRIV (modules); module; module = module->next) + if (addr >= module->low && addr <= module->high) + return module_find_nearest_line (abfd, module, addr, file, func, line); + + return FALSE; +} + +/* Process EDBG/ETBT record. + Return 0 on success, -1 on error */ + +static int +vms_slurp_debug (bfd *abfd) +{ + if (PRIV (dst_section) == NULL) + { + /* We have no way to find out beforehand how much debug info there + is in an object file, so pick an initial amount and grow it as + needed later. */ + flagword flags = SEC_HAS_CONTENTS | SEC_DEBUGGING | SEC_RELOC; + asection *section = bfd_make_section (abfd, "$DST$"); + if (!section) + return -1; + section->size = 1024; + if (!bfd_set_section_flags (abfd, section, flags)) + return -1; + section->contents = ((unsigned char *) + bfd_zmalloc (section->size)); + if (section->contents == NULL) + return -1; + section->filepos = (unsigned int)-1; + PRIV (dst_section) = section; + } + + PRIV (image_section) = PRIV (dst_section); + PRIV (image_ptr) = PRIV (dst_section)->contents; + + return _bfd_vms_slurp_tir (abfd, EOBJ_S_C_ETIR); +} + +/* Process DBG/EDBG record. + Return 0 on success, -1 on error. */ + +int +_bfd_vms_slurp_dbg (bfd *abfd, int objtype ATTRIBUTE_UNUSED) +{ +#if VMS_DEBUG + _bfd_vms_debug (2, "DBG/EDBG\n"); +#endif + + abfd->flags |= (HAS_DEBUG | HAS_LINENO); + + return vms_slurp_debug (abfd); +} + +/* Process TBT/ETBT record. + Return 0 on success, -1 on error. */ + +int +_bfd_vms_slurp_tbt (bfd *abfd, int objtype ATTRIBUTE_UNUSED) +{ +#if VMS_DEBUG + _bfd_vms_debug (2, "TBT/ETBT\n"); +#endif + + abfd->flags |= HAS_LINENO; + + return vms_slurp_debug (abfd); +} + +/* Write DBG/EDBG record. */ + +int +_bfd_vms_write_dbg (bfd *abfd ATTRIBUTE_UNUSED, int objtype ATTRIBUTE_UNUSED) +{ +#if VMS_DEBUG + _bfd_vms_debug (2, "vms_write_dbg (%p, objtype)\n", abfd, objtype); +#endif + + return 0; +} + +/* Write TBT/ETBT record. */ + +int +_bfd_vms_write_tbt (bfd *abfd ATTRIBUTE_UNUSED, int objtype ATTRIBUTE_UNUSED) +{ +#if VMS_DEBUG + _bfd_vms_debug (2, "vms_write_tbt (%p, %d)\n", abfd, objtype); +#endif + + return 0; +} diff --git a/cegcc/src/binutils/bfd/vms-misc.c b/cegcc/src/binutils/bfd/vms-misc.c index 9d0ffdb27..21816587e 100644 --- a/cegcc/src/binutils/bfd/vms-misc.c +++ b/cegcc/src/binutils/bfd/vms-misc.c @@ -1,7 +1,9 @@ -/* vms-misc.c -- Miscellaneous functions for VAX (openVMS/VAX) and +/* vms-misc.c -- BFD back-end for VMS/VAX (openVMS/VAX) and EVAX (openVMS/Alpha) files. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2007, 2008 Free Software Foundation, Inc. + 2007, 2008, 2009 Free Software Foundation, Inc. + + Miscellaneous functions. Written by Klaus K"ampf (kkaempf@rmi.de) @@ -30,22 +32,29 @@ #include "libbfd.h" #include "vms.h" - + +#define MIN(a,b) ((a) < (b) ? (a) : (b)) + +static int hash_string PARAMS ((const char *)); +static asymbol *new_symbol PARAMS ((bfd *, char *)); +static void maybe_adjust_record_pointer_for_object PARAMS ((bfd *)); +static int vms_get_remaining_object_record PARAMS ((bfd *, int )); +static int vms_get_remaining_image_record PARAMS ((bfd *, int )); + #if VMS_DEBUG /* Debug functions. */ -/* Debug function for all vms extensions - evaluates environment variable VMS_DEBUG for a - numerical value on the first call - all error levels below this value are printed +/* Debug function for all vms extensions evaluates environment + variable VMS_DEBUG for a numerical value on the first call all + error levels below this value are printed: - levels: + Levels: 1 toplevel bfd calls (functions from the bfd vector) 2 functions called by bfd calls ... 9 almost everything - level is also indentation level. Indentation is performed + Level is also indentation level. Indentation is performed if level > 0. */ void @@ -167,22 +176,23 @@ _bfd_vms_hash_newfunc (struct bfd_hash_entry *entry, /* Object file input functions. */ -/* Return type and length from record header (buf) on Alpha. */ +/* Return type and size from record header (buf) on Alpha. */ void _bfd_vms_get_header_values (bfd * abfd ATTRIBUTE_UNUSED, unsigned char *buf, int *type, - int *length) + int *size) { - if (type != 0) + if (type) *type = bfd_getl16 (buf); - buf += 2; - if (length != 0) - *length = bfd_getl16 (buf); + + if (size) + *size = bfd_getl16 (buf+2); #if VMS_DEBUG - vms_debug (10, "_bfd_vms_get_header_values type %x, length %x\n", (type?*type:0), (length?*length:0)); + vms_debug (10, "_bfd_vms_get_header_values type %x, size %x\n", + type ? *type : 0, size ? *size : 0); #endif } @@ -193,237 +203,341 @@ _bfd_vms_get_header_values (bfd * abfd ATTRIBUTE_UNUSED, The openVMS object file has 'variable length' which means that read() returns data in chunks of (hopefully) correct and expected - size. The linker (and other tools on vms) depend on that. Unix doesn't - know about 'formatted' files, so reading and writing such an object - file in a unix environment is not trivial. + size. The linker (and other tools on VMS) depend on that. Unix + doesn't know about 'formatted' files, so reading and writing such + an object file in a Unix environment is not trivial. - With the tool 'file' (available on all vms ftp sites), one - can view and change the attributes of a file. Changing from + With the tool 'file' (available on all VMS FTP sites), one + can view and change the attributes of a file. Changing from 'variable length' to 'fixed length, 512 bytes' reveals the - record length at the first 2 bytes of every record. The same - happens during the transfer of object files from vms to unix, - at least with ucx, dec's implementation of tcp/ip. + record size at the first 2 bytes of every record. The same + happens during the transfer of object files from VMS to Unix, + at least with UCX, the DEC implementation of TCP/IP. - The vms format repeats the length at bytes 2 & 3 of every record. + The VMS format repeats the size at bytes 2 & 3 of every record. On the first call (file_format == FF_UNKNOWN) we check if the first and the third byte pair (!) of the record match. - If they do it's an object file in an unix environment or with - wrong attributes (FF_FOREIGN), else we should be in a vms + If they do it's an object file in an Unix environment or with + wrong attributes (FF_FOREIGN), else we should be in a VMS environment where read() returns the record size (FF_NATIVE). - Reading is always done in 2 steps. - First just the record header is read and the length extracted - by get_header_values, - then the read buffer is adjusted and the remaining bytes are - read in. + Reading is always done in 2 steps: + 1. first just the record header is read and the size extracted, + 2. then the read buffer is adjusted and the remaining bytes are + read in. + + All file I/O is done on even file positions. */ - All file i/o is always done on even file positions. */ +#define VMS_OBJECT_ADJUSTMENT 2 + +static void +maybe_adjust_record_pointer_for_object (bfd *abfd) +{ + /* Set the file format once for all on the first invocation. */ + if (PRIV (file_format) == FF_UNKNOWN) + { + if (PRIV (vms_rec)[0] == PRIV (vms_rec)[4] + && PRIV (vms_rec)[1] == PRIV (vms_rec)[5]) + PRIV (file_format) = FF_FOREIGN; + else + PRIV (file_format) = FF_NATIVE; + } + + /* The adjustment is needed only in an Unix environment. */ + if (PRIV (file_format) == FF_FOREIGN) + PRIV (vms_rec) += VMS_OBJECT_ADJUSTMENT; +} + +/* Get first record from file and return the file type. */ int -_bfd_vms_get_record (bfd * abfd) +_bfd_vms_get_first_record (bfd *abfd) { - int test_len, test_start, remaining; - unsigned char *vms_buf; + unsigned int test_len; #if VMS_DEBUG - vms_debug (8, "_bfd_vms_get_record\n"); + vms_debug (8, "_bfd_vms_get_first_record\n"); #endif - /* Minimum is 6 bytes on Alpha - (2 bytes length, 2 bytes record id, 2 bytes length repeated) - - On the VAX there's no length information in the record - so start with OBJ_S_C_MAXRECSIZ. */ + if (PRIV (is_vax)) + test_len = 0; + else + /* Minimum is 6 bytes for objects (2 bytes size, 2 bytes record id, + 2 bytes size repeated) and 12 bytes for images (4 bytes major id, + 4 bytes minor id, 4 bytes length). */ + test_len = 12; + /* Size the main buffer. */ if (PRIV (buf_size) == 0) { - bfd_size_type amt; - - if (PRIV (is_vax)) - { - amt = OBJ_S_C_MAXRECSIZ; - PRIV (file_format) = FF_VAX; - } - else - amt = 6; - PRIV (vms_buf) = bfd_malloc (amt); + /* On VAX there's no size information in the record, so + start with OBJ_S_C_MAXRECSIZ. */ + bfd_size_type amt = (test_len ? test_len : OBJ_S_C_MAXRECSIZ); + PRIV (vms_buf) = (unsigned char *) bfd_malloc (amt); PRIV (buf_size) = amt; } - vms_buf = PRIV (vms_buf); + /* Initialize the record pointer. */ + PRIV (vms_rec) = PRIV (vms_buf); - if (vms_buf == 0) - return -1; - - switch (PRIV (file_format)) + /* We only support modules on VAX. */ + if (PRIV (is_vax)) { - case FF_UNKNOWN: - case FF_FOREIGN: - test_len = 6; /* Probe 6 bytes. */ - test_start = 2; /* Where the record starts. */ - break; - - case FF_NATIVE: - test_len = 4; - test_start = 0; - break; - - default: - case FF_VAX: - test_len = 0; - test_start = 0; - break; + if (vms_get_remaining_object_record (abfd, test_len) <= 0) + return FT_UNKNOWN; + +#if VMS_DEBUG + vms_debug (2, "file type is VAX module\n"); +#endif + + return FT_MODULE; } - /* Skip odd alignment byte. */ + if (bfd_bread (PRIV (vms_buf), test_len, abfd) != test_len) + { + bfd_set_error (bfd_error_file_truncated); + return FT_UNKNOWN; + } - if (bfd_tell (abfd) & 1) + /* Is it an image? */ + if ((bfd_getl32 (PRIV (vms_rec)) == EIHD_S_K_MAJORID) + && (bfd_getl32 (PRIV (vms_rec) + 4) == EIHD_S_K_MINORID)) { - if (bfd_bread (PRIV (vms_buf), (bfd_size_type) 1, abfd) != 1) - { - bfd_set_error (bfd_error_file_truncated); - return 0; - } + if (vms_get_remaining_image_record (abfd, test_len) <= 0) + return FT_UNKNOWN; + +#if VMS_DEBUG + vms_debug (2, "file type is image\n"); +#endif + + return FT_IMAGE; } - /* Read the record header on Alpha. */ - if ((test_len != 0) - && (bfd_bread (PRIV (vms_buf), (bfd_size_type) test_len, abfd) - != (bfd_size_type) test_len)) + /* Assume it's a module and adjust record pointer if necessary. */ + maybe_adjust_record_pointer_for_object (abfd); + + /* But is it really a module? */ + if (bfd_getl16 (PRIV (vms_rec)) <= EOBJ_S_C_MAXRECTYP + && bfd_getl16 (PRIV (vms_rec) + 2) <= EOBJ_S_C_MAXRECSIZ) { - bfd_set_error (bfd_error_file_truncated); - return 0; + if (vms_get_remaining_object_record (abfd, test_len) <= 0) + return FT_UNKNOWN; + +#if VMS_DEBUG + vms_debug (2, "file type is module\n"); +#endif + + return FT_MODULE; } - /* Check file format on first call. */ - if (PRIV (file_format) == FF_UNKNOWN) - { /* Record length repeats ? */ - if (vms_buf[0] == vms_buf[4] - && vms_buf[1] == vms_buf[5]) +#if VMS_DEBUG + vms_debug (2, "file type is unknown\n"); +#endif + + return FT_UNKNOWN; +} + +/* Implement step #1 of the object record reading procedure. + Return the record type or -1 on failure. */ + +int +_bfd_vms_get_object_record (bfd *abfd) +{ + unsigned int test_len; + int type; + +#if VMS_DEBUG + vms_debug (8, "_bfd_vms_get_obj_record\n"); +#endif + + if (PRIV (is_vax)) + test_len = 0; + else + { + /* See _bfd_vms_get_first_record. */ + test_len = 6; + + /* Skip odd alignment byte. */ + if (bfd_tell (abfd) & 1) { - PRIV (file_format) = FF_FOREIGN; /* Y: foreign environment. */ - test_start = 2; + if (bfd_bread (PRIV (vms_buf), 1, abfd) != 1) + { + bfd_set_error (bfd_error_file_truncated); + return -1; + } } - else + + /* Read the record header */ + if (bfd_bread (PRIV (vms_buf), test_len, abfd) != test_len) { - PRIV (file_format) = FF_NATIVE; /* N: native environment. */ - test_start = 0; + bfd_set_error (bfd_error_file_truncated); + return -1; } + + /* Reset the record pointer. */ + PRIV (vms_rec) = PRIV (vms_buf); + maybe_adjust_record_pointer_for_object (abfd); } + if (vms_get_remaining_object_record (abfd, test_len) <= 0) + return -1; + + if (PRIV (is_vax)) + type = PRIV (vms_rec) [0]; + else + type = bfd_getl16 (PRIV (vms_rec)); + +#if VMS_DEBUG + vms_debug (8, "_bfd_vms_get_obj_record: rec %p, size %d, type %d\n", + PRIV (vms_rec), PRIV (rec_size), type); +#endif + + return type; +} + +/* Implement step #2 of the object record reading procedure. + Return the size of the record or 0 on failure. */ + +static int +vms_get_remaining_object_record (bfd *abfd, int read_so_far) +{ +#if VMS_DEBUG + vms_debug (8, "vms_get_remaining_obj_record\n"); +#endif + if (PRIV (is_vax)) { - PRIV (rec_length) = bfd_bread (vms_buf, (bfd_size_type) PRIV (buf_size), - abfd); - if (PRIV (rec_length) <= 0) + if (read_so_far != 0) + abort (); + + PRIV (rec_size) = bfd_bread (PRIV (vms_buf), PRIV (buf_size), abfd); + + if (PRIV (rec_size) <= 0) { bfd_set_error (bfd_error_file_truncated); return 0; } - PRIV (vms_rec) = vms_buf; + + /* Reset the record pointer. */ + PRIV (vms_rec) = PRIV (vms_buf); } else { - /* Alpha. */ - /* Extract vms record length. */ + unsigned int to_read; - _bfd_vms_get_header_values (abfd, vms_buf + test_start, NULL, - & PRIV (rec_length)); + /* Extract record size. */ + PRIV (rec_size) = bfd_getl16 (PRIV (vms_rec) + 2); - if (PRIV (rec_length) <= 0) + if (PRIV (rec_size) <= 0) { bfd_set_error (bfd_error_file_truncated); return 0; } /* That's what the linker manual says. */ - - if (PRIV (rec_length) > EOBJ_S_C_MAXRECSIZ) + if (PRIV (rec_size) > EOBJ_S_C_MAXRECSIZ) { bfd_set_error (bfd_error_file_truncated); return 0; } - /* Adjust the buffer. */ + /* Take into account object adjustment. */ + to_read = PRIV (rec_size); + if (PRIV (file_format) == FF_FOREIGN) + to_read += VMS_OBJECT_ADJUSTMENT; - if (PRIV (rec_length) > PRIV (buf_size)) + /* Adjust the buffer. */ + if (to_read > PRIV (buf_size)) { - PRIV (vms_buf) = bfd_realloc_or_free (vms_buf, - (bfd_size_type) PRIV (rec_length)); - vms_buf = PRIV (vms_buf); - if (vms_buf == 0) - return -1; - PRIV (buf_size) = PRIV (rec_length); + PRIV (vms_buf) + = (unsigned char *) bfd_realloc (PRIV (vms_buf), to_read); + if (PRIV (vms_buf) == NULL) + return 0; + PRIV (buf_size) = to_read; } /* Read the remaining record. */ - remaining = PRIV (rec_length) - test_len + test_start; + to_read -= read_so_far; #if VMS_DEBUG - vms_debug (10, "bfd_bread remaining %d\n", remaining); + vms_debug (8, "vms_get_remaining_obj_record: to_read %d\n", to_read); #endif - if (bfd_bread (vms_buf + test_len, (bfd_size_type) remaining, abfd) != - (bfd_size_type) remaining) + + if (bfd_bread (PRIV (vms_buf) + read_so_far, to_read, abfd) != to_read) { bfd_set_error (bfd_error_file_truncated); return 0; } - PRIV (vms_rec) = vms_buf + test_start; + + /* Reset the record pointer. */ + PRIV (vms_rec) = PRIV (vms_buf); + maybe_adjust_record_pointer_for_object (abfd); } #if VMS_DEBUG - vms_debug (11, "bfd_bread rec_length %d\n", PRIV (rec_length)); + vms_debug (8, "vms_get_remaining_obj_record: size %d\n", PRIV (rec_size)); #endif - return PRIV (rec_length); + return PRIV (rec_size); } -/* Get next vms record from file - update vms_rec and rec_length to new (remaining) values. */ +/* Implement step #2 of the record reading procedure for images. + Return the size of the record or 0 on failure. */ -int -_bfd_vms_next_record (bfd * abfd) +static int +vms_get_remaining_image_record (bfd *abfd, int read_so_far) { -#if VMS_DEBUG - vms_debug (8, "_bfd_vms_next_record (len %d, size %d)\n", - PRIV (rec_length), PRIV (rec_size)); -#endif + unsigned int to_read; + int remaining; - if (PRIV (rec_length) > 0) - PRIV (vms_rec) += PRIV (rec_size); - else + /* Extract record size. */ + PRIV (rec_size) = bfd_getl32 (PRIV (vms_rec) + EIHD_S_L_SIZE); + + if (PRIV (rec_size) > PRIV (buf_size)) { - if (_bfd_vms_get_record (abfd) <= 0) - return -1; + PRIV (vms_buf) = bfd_realloc (PRIV (vms_buf), PRIV (rec_size)); + + if (PRIV (vms_buf) == NULL) + { + bfd_set_error (bfd_error_no_memory); + return 0; + } + + PRIV (buf_size) = PRIV (rec_size); } - if (!PRIV (vms_rec) || !PRIV (vms_buf) - || PRIV (vms_rec) >= (PRIV (vms_buf) + PRIV (buf_size))) - return -1; + /* Read the remaining record. */ + remaining = PRIV (rec_size) - read_so_far; + to_read = MIN (VMS_BLOCK_SIZE - read_so_far, remaining); - if (PRIV (is_vax)) + while (remaining > 0) { - PRIV (rec_type) = *(PRIV (vms_rec)); - PRIV (rec_size) = PRIV (rec_length); - } - else - _bfd_vms_get_header_values (abfd, PRIV (vms_rec), &PRIV (rec_type), - &PRIV (rec_size)); + if (bfd_bread (PRIV (vms_buf) + read_so_far, to_read, abfd) != to_read) + { + bfd_set_error (bfd_error_file_truncated); + return 0; + } - PRIV (rec_length) -= PRIV (rec_size); + read_so_far += to_read; + remaining -= to_read; -#if VMS_DEBUG - vms_debug (8, "_bfd_vms_next_record: rec %p, size %d, length %d, type %d\n", - PRIV (vms_rec), PRIV (rec_size), PRIV (rec_length), - PRIV (rec_type)); -#endif + /* Eat trailing 0xff's. */ + if (remaining > 0) + while (PRIV (vms_buf) [read_so_far - 1] == 0xff) + read_so_far--; + + to_read = MIN (VMS_BLOCK_SIZE, remaining); + } - return PRIV (rec_type); + /* Reset the record pointer. */ + PRIV (vms_rec) = PRIV (vms_buf); + + return PRIV (rec_size); } - -/* Copy sized string (string with fixed length) to new allocated area - size is string length (size of record) */ + +/* Copy sized string (string with fixed size) to new allocated area + size is string size (size of record) */ char * _bfd_vms_save_sized_string (unsigned char *str, int size) @@ -438,8 +552,8 @@ _bfd_vms_save_sized_string (unsigned char *str, int size) return newstr; } -/* Copy counted string (string with length at first byte) to new allocated area - ptr points to length byte on entry */ +/* Copy counted string (string with size at first byte) to new allocated area + ptr points to size byte on entry */ char * _bfd_vms_save_counted_string (unsigned char *ptr) @@ -501,83 +615,12 @@ _bfd_vms_pop (bfd * abfd, int *psect) return value; } -/* Object file output functions. */ - -/* GAS tends to write sections in little chunks (bfd_set_section_contents) - which we can't use directly. So we save the little chunks in linked - lists (one per section) and write them later. */ - -/* Add a new vms_section structure to vms_section_table - - forward chaining -. */ - -static vms_section * -add_new_contents (bfd * abfd, sec_ptr section) -{ - vms_section *sptr, *newptr; - - sptr = PRIV (vms_section_table)[section->index]; - if (sptr != NULL) - return sptr; - - newptr = bfd_alloc (abfd, (bfd_size_type) sizeof (vms_section)); - if (newptr == NULL) - return NULL; - newptr->contents = bfd_alloc (abfd, section->size); - if (newptr->contents == NULL) - return NULL; - newptr->offset = 0; - newptr->size = section->size; - newptr->next = 0; - PRIV (vms_section_table)[section->index] = newptr; - return newptr; -} - -/* Save section data & offset to a vms_section structure - vms_section_table[] holds the vms_section chain. */ - -bfd_boolean -_bfd_save_vms_section (bfd * abfd, - sec_ptr section, - const void * data, - file_ptr offset, - bfd_size_type count) -{ - vms_section *sptr; - - if (section->index >= VMS_SECTION_COUNT) - { - bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; - } - if (count == (bfd_size_type)0) - return TRUE; - sptr = add_new_contents (abfd, section); - if (sptr == NULL) - return FALSE; - memcpy (sptr->contents + offset, data, (size_t) count); - - return TRUE; -} - -/* Get vms_section pointer to saved contents for section # index */ - -vms_section * -_bfd_get_vms_section (bfd * abfd, int index) -{ - if (index >= VMS_SECTION_COUNT) - { - bfd_set_error (bfd_error_nonrepresentable_section); - return NULL; - } - return PRIV (vms_section_table)[index]; -} - /* Object output routines. */ /* Begin new record or record header write 2 bytes rectype write 2 bytes record length (filled in at flush) - write 2 bytes header type (ommitted if rechead == -1). */ + write 2 bytes header type (ommitted if rechead == -1). */ void _bfd_vms_output_begin (bfd * abfd, int rectype, int rechead) @@ -691,18 +734,11 @@ _bfd_vms_output_flush (bfd * abfd) if (PRIV (push_level) == 0) { - if (0 -#ifndef VMS - /* Write length first, see FF_FOREIGN in the input routines. */ - || fwrite (PRIV (output_buf) + 2, 2, 1, - (FILE *) abfd->iostream) != 1 -#endif - || (real_size != 0 - && fwrite (PRIV (output_buf), (size_t) real_size, 1, - (FILE *) abfd->iostream) != 1)) - /* FIXME: Return error status. */ - abort (); - + /* File is open in undefined (UDF) format on VMS, but ultimately will be + converted to variable length (VAR) format. VAR format has a length + word first which must be explicitly output in UDF format. */ + bfd_bwrite (PRIV (output_buf) + 2, 2, abfd); + bfd_bwrite (PRIV (output_buf), (size_t) real_size, abfd); PRIV (output_size) = 0; } else @@ -948,7 +984,7 @@ new_symbol (bfd * abfd, char *name) if (symbol == 0) return symbol; symbol->name = name; - symbol->section = bfd_make_section (abfd, BFD_UND_SECTION_NAME); + symbol->section = (asection *)(unsigned long)-1; return symbol; } diff --git a/cegcc/src/binutils/bfd/vms-tir.c b/cegcc/src/binutils/bfd/vms-tir.c index e6ec6ebcc..5bc61da87 100644 --- a/cegcc/src/binutils/bfd/vms-tir.c +++ b/cegcc/src/binutils/bfd/vms-tir.c @@ -1,12 +1,12 @@ /* vms-tir.c -- BFD back-end for VAX (openVMS/VAX) and EVAX (openVMS/Alpha) files. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2007, 2008 - Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2007, + 2008, 2009 Free Software Foundation, Inc. TIR record handling functions ETIR record handling functions - go and read the openVMS linker manual (esp. appendix B) + Go and read the openVMS linker manual (esp. appendix B) if you don't know what's going on here :-) Written by Klaus K"ampf (kkaempf@rmi.de) @@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ - /* The following type abbreviations are used: cs counted string (ascii string with length byte) @@ -41,6 +40,33 @@ #include "bfdlink.h" #include "libbfd.h" #include "vms.h" + +static int check_section (bfd *, int); +static void image_set_ptr (bfd *abfd, int psect, uquad offset); +static void image_inc_ptr (bfd *abfd, uquad offset); +static void dst_define_location (bfd *abfd, uquad loc); +static void dst_restore_location (bfd *abfd, uquad loc); +static unsigned int dst_retrieve_location (bfd *abfd, uquad loc); +static void dst_check_allocation (bfd *abfd, unsigned int size); +static void image_dump (bfd *abfd, unsigned char *ptr, int size, int offset); +static void image_write_b (bfd *abfd, unsigned int value); +static void image_write_w (bfd *abfd, unsigned int value); +static void image_write_l (bfd *abfd, unsigned long value); +static void image_write_q (bfd *abfd, uquad value); +static bfd_boolean etir_sta (bfd *, int, unsigned char *, int *); +static bfd_boolean etir_sto (bfd *, int, unsigned char *, int *); +static bfd_boolean etir_opr (bfd *, int, unsigned char *, int *); +static bfd_boolean etir_ctl (bfd *, int, unsigned char *, int *); +static bfd_boolean etir_stc (bfd *, int, unsigned char *, int *); +static asection *new_section (bfd *, int); +static int alloc_section (bfd *, unsigned int); +static int etir_cmd (bfd *, int, unsigned char *, int *); +static int analyze_tir (bfd *, unsigned char *, unsigned int); +static int analyze_etir (bfd *, unsigned char *, unsigned int); +static unsigned char *tir_opr (bfd *, unsigned char *); +static const char *tir_cmd_name (int); +static const char *cmd_name (int); + static int check_section (bfd * abfd, int size) @@ -92,6 +118,77 @@ image_inc_ptr (bfd * abfd, uquad offset) PRIV (image_ptr) += offset; } +/* Save current DST location counter under specified index. */ + +static void +dst_define_location (bfd *abfd, uquad loc) +{ + asection *dst_section = PRIV (dst_section); + +#if VMS_DEBUG + _bfd_vms_debug (4, "dst_define_location (%d)\n", (int)loc); +#endif + + /* Grow the ptr offset table if necessary. */ + if (loc + 1 > PRIV (dst_ptr_offsets_count)) + { + PRIV (dst_ptr_offsets) = bfd_realloc (PRIV (dst_ptr_offsets), + (loc + 1) * sizeof (unsigned int)); + PRIV (dst_ptr_offsets_count) = loc + 1; + } + + PRIV (dst_ptr_offsets)[loc] = PRIV (image_ptr) - dst_section->contents; +} + +/* Restore saved DST location counter from specified index. */ + +static void +dst_restore_location (bfd *abfd, uquad loc) +{ + asection *dst_section = PRIV (dst_section); + +#if VMS_DEBUG + _bfd_vms_debug (4, "dst_restore_location (%d)\n", (int)loc); +#endif + + PRIV (image_ptr) = dst_section->contents + PRIV (dst_ptr_offsets)[loc]; +} + +/* Retrieve saved DST location counter from specified index. */ + +static unsigned int +dst_retrieve_location (bfd *abfd, uquad loc) +{ +#if VMS_DEBUG + _bfd_vms_debug (4, "dst_retrieve_location (%d)\n", (int)loc); +#endif + + return PRIV (dst_ptr_offsets)[loc]; +} + +/* Check that the DST section is big enough for the specified + amount of bytes. */ + +static void +dst_check_allocation (bfd *abfd, unsigned int size) +{ + asection *dst_section = PRIV (dst_section); + + bfd_size_type used = PRIV (image_ptr) - dst_section->contents; + bfd_size_type left = dst_section->size - used; + + /* Grow the DST section as necessary */ + if (size > left) + { + dst_section->size *= 2; + dst_section->contents + = bfd_realloc (dst_section->contents, dst_section->size); + PRIV (image_ptr) = dst_section->contents + used; + + dst_check_allocation (abfd, size); + } +} + /* Dump multiple bytes to section image. */ static void @@ -109,6 +206,9 @@ image_dump (bfd * abfd, if (PRIV (is_vax) && check_section (abfd, size)) return; + if (PRIV (dst_section)) + dst_check_allocation (abfd, size); + while (size-- > 0) *PRIV (image_ptr)++ = *ptr++; } @@ -125,6 +225,9 @@ image_write_b (bfd * abfd, unsigned int value) if (PRIV (is_vax) && check_section (abfd, 1)) return; + if (PRIV (dst_section)) + dst_check_allocation (abfd, 1); + *PRIV (image_ptr)++ = (value & 0xff); } @@ -140,6 +243,9 @@ image_write_w (bfd * abfd, unsigned int value) if (PRIV (is_vax) && check_section (abfd, 2)) return; + if (PRIV (dst_section)) + dst_check_allocation (abfd, 2); + bfd_putl16 ((bfd_vma) value, PRIV (image_ptr)); PRIV (image_ptr) += 2; } @@ -156,6 +262,9 @@ image_write_l (bfd * abfd, unsigned long value) if (PRIV (is_vax) && check_section (abfd, 4)) return; + if (PRIV (dst_section)) + dst_check_allocation (abfd, 4); + bfd_putl32 ((bfd_vma) value, PRIV (image_ptr)); PRIV (image_ptr) += 4; } @@ -172,6 +281,9 @@ image_write_q (bfd * abfd, uquad value) if (PRIV (is_vax) && check_section (abfd, 8)) return; + if (PRIV (dst_section)) + dst_check_allocation (abfd, 8); + bfd_putl64 (value, PRIV (image_ptr)); PRIV (image_ptr) += 8; } @@ -182,6 +294,8 @@ cmd_name (int cmd) switch (cmd) { case ETIR_S_C_STA_GBL: return "ETIR_S_C_STA_GBL"; + case ETIR_S_C_STA_LW: return "ETIR_S_C_STA_LW"; + case ETIR_S_C_STA_QW: return "ETIR_S_C_STA_QW"; case ETIR_S_C_STA_PQ: return "ETIR_S_C_STA_PQ"; case ETIR_S_C_STA_LI: return "ETIR_S_C_STA_LI"; case ETIR_S_C_STA_MOD: return "ETIR_S_C_STA_MOD"; @@ -192,10 +306,16 @@ cmd_name (int cmd) case ETIR_S_C_STO_CA: return "ETIR_S_C_STO_CA"; case ETIR_S_C_STO_RB: return "ETIR_S_C_STO_RB"; case ETIR_S_C_STO_AB: return "ETIR_S_C_STO_AB"; + case ETIR_S_C_STO_OFF: return "ETIR_S_C_STO_OFF"; + case ETIR_S_C_STO_IMM: return "ETIR_S_C_STO_IMM"; + case ETIR_S_C_STO_IMMR: return "ETIR_S_C_STO_IMMR"; + case ETIR_S_C_STO_LW: return "ETIR_S_C_STO_LW"; + case ETIR_S_C_STO_QW: return "ETIR_S_C_STO_QW"; case ETIR_S_C_STO_GBL_LW: return "ETIR_S_C_STO_GBL_LW"; case ETIR_S_C_STO_LP_PSB: return "ETIR_S_C_STO_LP_PSB"; case ETIR_S_C_STO_HINT_GBL: return "ETIR_S_C_STO_HINT_GBL"; case ETIR_S_C_STO_HINT_PS: return "ETIR_S_C_STO_HINT_PS"; + case ETIR_S_C_OPR_ADD: return "ETIR_S_C_OPR_ADD"; case ETIR_S_C_OPR_INSV: return "ETIR_S_C_OPR_INSV"; case ETIR_S_C_OPR_USH: return "ETIR_S_C_OPR_USH"; case ETIR_S_C_OPR_ROT: return "ETIR_S_C_OPR_ROT"; @@ -215,34 +335,41 @@ cmd_name (int cmd) case ETIR_S_C_STC_BOH_GBL: return "ETIR_S_C_STC_BOH_GBL"; case ETIR_S_C_STC_BOH_PS: return "ETIR_S_C_STC_BOH_PS"; case ETIR_S_C_STC_NBH_GBL: return "ETIR_S_C_STC_NBH_GBL"; + case ETIR_S_C_CTL_SETRB: return "ETIR_S_C_CTL_SETRB"; + case ETIR_S_C_STC_LP_PSB: return "ETIR_S_C_STC_LP_PSB"; + case ETIR_S_C_CTL_DFLOC: return "ETIR_S_C_CTL_DFLOC"; + case ETIR_S_C_CTL_STLOC: return "ETIR_S_C_CTL_STLOC"; + case ETIR_S_C_CTL_STKDL: return "ETIR_S_C_CTL_STKDL"; default: /* These names have not yet been added to this switch statement. */ - abort (); + (*_bfd_error_handler) (_("unknown ETIR command %d"), cmd); } + + return NULL; } #define HIGHBIT(op) ((op & 0x80000000L) == 0x80000000L) /* etir_sta - vms stack commands + Vms stack commands. - handle sta_xxx commands in etir section - ptr points to data area in record + Handle sta_xxx commands in etir section, + ptr points to data area in record. - see table B-8 of the openVMS linker manual. */ + See table B-8 of the openVMS linker manual. */ static bfd_boolean -etir_sta (bfd * abfd, int cmd, unsigned char *ptr) +etir_sta (bfd *abfd, int cmd, unsigned char *ptr, int *quarter_relocs) { #if VMS_DEBUG _bfd_vms_debug (5, "etir_sta %d/%x\n", cmd, cmd); - _bfd_hexdump (8, ptr, 16, (int) ptr); + _bfd_hexdump (8, ptr, 16, (long) ptr); #endif switch (cmd) { - /* stack global + /* Stack global arg: cs symbol name stack 32 bit value of symbol (high bits set to 0). */ @@ -265,37 +392,50 @@ etir_sta (bfd * abfd, int cmd, unsigned char *ptr) else _bfd_vms_push (abfd, (uquad) (entry->symbol->value), -1); } + *quarter_relocs = 1; break; - /* stack longword + /* Stack longword arg: lw value stack 32 bit value, sign extend to 64 bit. */ case ETIR_S_C_STA_LW: _bfd_vms_push (abfd, (uquad) bfd_getl32 (ptr), -1); + /* This one is special as it is both part of the section header + and of the ALPHA_R_REFLONG relocation. */ + if (bfd_getl16 (ptr - 4 + bfd_getl16 (ptr - 2)) == ETIR_S_C_CTL_DFLOC) + *quarter_relocs = 0; + else if (*quarter_relocs) + *quarter_relocs += 1; + else + *quarter_relocs = 2; break; - /* stack global + /* Stack quadword arg: qw value stack 64 bit value of symbol. */ case ETIR_S_C_STA_QW: _bfd_vms_push (abfd, (uquad) bfd_getl64 (ptr), -1); + if (*quarter_relocs) + *quarter_relocs += 1; + else + *quarter_relocs = 2; break; - /* stack psect base plus quadword offset + /* Stack psect base plus quadword offset arg: lw section index qw signed quadword offset (low 32 bits) - stack qw argument and section index + Stack qw argument and section index (see ETIR_S_C_STO_OFF, ETIR_S_C_CTL_SETRB). */ case ETIR_S_C_STA_PQ: { uquad dummy; - unsigned int psect; + int psect; psect = bfd_getl32 (ptr); - if (psect >= PRIV (section_count)) + if ((unsigned int) psect >= PRIV (section_count)) { (*_bfd_error_handler) (_("bad section index in %s"), cmd_name (cmd)); @@ -305,23 +445,31 @@ etir_sta (bfd * abfd, int cmd, unsigned char *ptr) dummy = bfd_getl64 (ptr + 4); _bfd_vms_push (abfd, dummy, (int) psect); } + /* This one is special as it is both part of the section header + and of the ALPHA_R_REFLONG and ALPHA_R_REFQUAD relocations. */ + if (bfd_getl16 (ptr - 4 + bfd_getl16 (ptr - 2)) == ETIR_S_C_CTL_SETRB) + *quarter_relocs = 0; + else + *quarter_relocs = 2; break; case ETIR_S_C_STA_LI: case ETIR_S_C_STA_MOD: case ETIR_S_C_STA_CKARG: (*_bfd_error_handler) (_("unsupported STA cmd %s"), cmd_name (cmd)); + *quarter_relocs = 0; return FALSE; - break; default: (*_bfd_error_handler) (_("reserved STA cmd %d"), cmd); + *quarter_relocs = 0; return FALSE; - break; } + #if VMS_DEBUG _bfd_vms_debug (5, "etir_sta true\n"); #endif + return TRUE; } @@ -335,14 +483,14 @@ etir_sta (bfd * abfd, int cmd, unsigned char *ptr) see table B-9 of the openVMS linker manual. */ static bfd_boolean -etir_sto (bfd * abfd, int cmd, unsigned char *ptr) +etir_sto (bfd *abfd, int cmd, unsigned char *ptr, int *quarter_relocs) { uquad dummy; int psect; #if VMS_DEBUG _bfd_vms_debug (5, "etir_sto %d/%x\n", cmd, cmd); - _bfd_hexdump (8, ptr, 16, (int) ptr); + _bfd_hexdump (8, ptr, 16, (long) ptr); #endif switch (cmd) @@ -353,6 +501,7 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) dummy = _bfd_vms_pop (abfd, &psect); /* FIXME: check top bits. */ image_write_b (abfd, (unsigned int) dummy & 0xff); + *quarter_relocs = 0; break; /* Store word: pop stack, write word @@ -361,6 +510,7 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) dummy = _bfd_vms_pop (abfd, &psect); /* FIXME: check top bits */ image_write_w (abfd, (unsigned int) dummy & 0xffff); + *quarter_relocs = 0; break; /* Store longword: pop stack, write longword @@ -370,6 +520,10 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) dummy += (PRIV (sections)[psect])->vma; /* FIXME: check top bits. */ image_write_l (abfd, (unsigned int) dummy & 0xffffffff); + if (*quarter_relocs == 2) + *quarter_relocs = 4; + else + *quarter_relocs += 1; break; /* Store quadword: pop stack, write quadword @@ -379,6 +533,10 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) dummy += (PRIV (sections)[psect])->vma; /* FIXME: check top bits. */ image_write_q (abfd, dummy); + if (*quarter_relocs == 2) + *quarter_relocs = 4; + else + *quarter_relocs += 1; break; /* Store immediate repeated: pop stack for repeat count @@ -393,6 +551,7 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) while (dummy-- > 0) image_dump (abfd, ptr+4, size, 0); } + *quarter_relocs = 0; break; /* Store global: write symbol value @@ -406,15 +565,13 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table), name, FALSE, FALSE); if (entry == NULL) - { - (*_bfd_error_handler) (_("%s: no symbol \"%s\""), - cmd_name (cmd), name); - return FALSE; - } + /* FIXME, reloc. */ + image_write_q (abfd, (uquad) (0)); else /* FIXME, reloc. */ image_write_q (abfd, (uquad) (entry->symbol->value)); } + *quarter_relocs = 4; break; /* Store code address: write address of entry point @@ -428,15 +585,13 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) entry = (vms_symbol_entry *) bfd_hash_lookup (PRIV (vms_symbol_table), name, FALSE, FALSE); if (entry == NULL) - { - (*_bfd_error_handler) (_("%s: no symbol \"%s\""), - cmd_name (cmd), name); - return FALSE; - } + /* FIXME, reloc. */ + image_write_q (abfd, (uquad) (0)); else /* FIXME, reloc. */ image_write_q (abfd, (uquad) (entry->symbol->value)); } + *quarter_relocs = 4; break; /* Store offset to psect: pop stack, add low 32 bits to base of psect @@ -450,6 +605,7 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) q += (PRIV (sections)[psect1])->vma; image_write_q (abfd, q); } + *quarter_relocs += 2; break; /* Store immediate @@ -462,6 +618,7 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) size = bfd_getl32 (ptr); image_dump (abfd, ptr+4, size, 0); } + *quarter_relocs = 0; break; /* This code is 'reserved to digital' according to the openVMS @@ -489,22 +646,26 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) /* FIXME, reloc. */ image_write_l (abfd, (unsigned long) (entry->symbol->value)); } + *quarter_relocs = 4; break; case ETIR_S_C_STO_RB: case ETIR_S_C_STO_AB: case ETIR_S_C_STO_LP_PSB: (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd)); - break; + *quarter_relocs = 0; + return FALSE; case ETIR_S_C_STO_HINT_GBL: case ETIR_S_C_STO_HINT_PS: (*_bfd_error_handler) (_("%s: not implemented"), cmd_name (cmd)); - break; + *quarter_relocs = 0; + return FALSE; default: (*_bfd_error_handler) (_("reserved STO cmd %d"), cmd); - break; + *quarter_relocs = 0; + return FALSE; } return TRUE; @@ -518,15 +679,22 @@ etir_sto (bfd * abfd, int cmd, unsigned char *ptr) see table B-10 of the openVMS linker manual. */ static bfd_boolean -etir_opr (bfd * abfd, int cmd, unsigned char *ptr ATTRIBUTE_UNUSED) +etir_opr (bfd *abfd, int cmd, unsigned char *ptr ATTRIBUTE_UNUSED, + int *quarter_relocs) { long op1, op2; #if VMS_DEBUG _bfd_vms_debug (5, "etir_opr %d/%x\n", cmd, cmd); - _bfd_hexdump (8, ptr, 16, (int) ptr); + _bfd_hexdump (8, ptr, 16, (long) ptr); #endif + /* No relocation uses OPR commands except ETIR_S_C_OPR_ADD. */ + if (cmd == ETIR_S_C_OPR_ADD) + *quarter_relocs += 1; + else + *quarter_relocs = 0; + switch (cmd) { case ETIR_S_C_OPR_NOP: /* No-op. */ @@ -604,7 +772,7 @@ etir_opr (bfd * abfd, int cmd, unsigned char *ptr ATTRIBUTE_UNUSED) case ETIR_S_C_OPR_REDEF: /* Redefine symbol to current location. */ case ETIR_S_C_OPR_DFLIT: /* Define a literal. */ (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd)); - break; + return FALSE; case ETIR_S_C_OPR_SEL: /* Select. */ if ((long) _bfd_vms_pop (abfd, NULL) & 0x01L) @@ -619,7 +787,7 @@ etir_opr (bfd * abfd, int cmd, unsigned char *ptr ATTRIBUTE_UNUSED) default: (*_bfd_error_handler) (_("reserved OPR cmd %d"), cmd); - break; + return FALSE; } return TRUE; @@ -630,16 +798,19 @@ etir_opr (bfd * abfd, int cmd, unsigned char *ptr ATTRIBUTE_UNUSED) See table B-11 of the openVMS linker manual. */ static bfd_boolean -etir_ctl (bfd * abfd, int cmd, unsigned char *ptr) +etir_ctl (bfd *abfd, int cmd, unsigned char *ptr, int *quarter_relocs) { - uquad dummy; + uquad dummy; int psect; #if VMS_DEBUG _bfd_vms_debug (5, "etir_ctl %d/%x\n", cmd, cmd); - _bfd_hexdump (8, ptr, 16, (int) ptr); + _bfd_hexdump (8, ptr, 16, (long) ptr); #endif + /* No relocation uses CTL commands. */ + *quarter_relocs = 0; + switch (cmd) { /* Det relocation base: pop stack, set image location counter @@ -660,27 +831,28 @@ etir_ctl (bfd * abfd, int cmd, unsigned char *ptr) arg: none. */ case ETIR_S_C_CTL_DFLOC: dummy = _bfd_vms_pop (abfd, NULL); - /* FIXME */ + dst_define_location (abfd, dummy); break; /* Set location: pop index, restore location counter from index arg: none. */ case ETIR_S_C_CTL_STLOC: - dummy = _bfd_vms_pop (abfd, &psect); - /* FIXME */ + dummy = _bfd_vms_pop (abfd, NULL); + dst_restore_location (abfd, dummy); break; /* Stack defined location: pop index, push location counter from index arg: none. */ case ETIR_S_C_CTL_STKDL: - dummy = _bfd_vms_pop (abfd, &psect); - /* FIXME. */ + dummy = _bfd_vms_pop (abfd, NULL); + _bfd_vms_push (abfd, dst_retrieve_location (abfd, dummy), -1); break; default: (*_bfd_error_handler) (_("reserved CTL cmd %d"), cmd); - break; + return FALSE; } + return TRUE; } @@ -689,11 +861,12 @@ etir_ctl (bfd * abfd, int cmd, unsigned char *ptr) See table B-12 and B-13 of the openVMS linker manual. */ static bfd_boolean -etir_stc (bfd * abfd, int cmd, unsigned char *ptr ATTRIBUTE_UNUSED) +etir_stc (bfd *abfd, int cmd, unsigned char *ptr ATTRIBUTE_UNUSED, + int *quarter_relocs) { #if VMS_DEBUG _bfd_vms_debug (5, "etir_stc %d/%x\n", cmd, cmd); - _bfd_hexdump (8, ptr, 16, (int) ptr); + _bfd_hexdump (8, ptr, 16, (long) ptr); #endif switch (cmd) @@ -701,32 +874,17 @@ etir_stc (bfd * abfd, int cmd, unsigned char *ptr ATTRIBUTE_UNUSED) /* 200 Store-conditional Linkage Pair arg: none. */ case ETIR_S_C_STC_LP: - (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd)); - break; - - /* 201 Store-conditional Linkage Pair with Procedure Signature - arg: lw linkage index - cs procedure name - by signature length - da signature. */ - case ETIR_S_C_STC_LP_PSB: - image_inc_ptr (abfd, (uquad) 16); /* skip entry,procval */ - break; /* 202 Store-conditional Address at global address arg: lw linkage index cs global name. */ case ETIR_S_C_STC_GBL: - (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd)); - break; /* 203 Store-conditional Code Address at global address arg: lw linkage index cs procedure name. */ case ETIR_S_C_STC_GCA: - (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd)); - break; /* 204 Store-conditional Address at psect + offset arg: lw linkage index @@ -734,56 +892,82 @@ etir_stc (bfd * abfd, int cmd, unsigned char *ptr ATTRIBUTE_UNUSED) qw offset. */ case ETIR_S_C_STC_PS: (*_bfd_error_handler) (_("%s: not supported"), cmd_name (cmd)); + *quarter_relocs = 0; + return FALSE; + + /* 201 Store-conditional Linkage Pair with Procedure Signature + arg: lw linkage index + cs procedure name + by signature length + da signature. */ + + case ETIR_S_C_STC_LP_PSB: + image_inc_ptr (abfd, (uquad) 16); /* skip entry,procval */ + *quarter_relocs = 4; break; /* 205 Store-conditional NOP at address of global arg: none. */ case ETIR_S_C_STC_NOP_GBL: - - /* 206 Store-conditional NOP at pect + offset - arg: none. */ - case ETIR_S_C_STC_NOP_PS: + /* ALPHA_R_NOP */ /* 207 Store-conditional BSR at global address arg: none. */ - case ETIR_S_C_STC_BSR_GBL: - /* 208 Store-conditional BSR at pect + offset - arg: none. */ - case ETIR_S_C_STC_BSR_PS: + case ETIR_S_C_STC_BSR_GBL: + /* ALPHA_R_BSR */ /* 209 Store-conditional LDA at global address arg: none. */ - case ETIR_S_C_STC_LDA_GBL: - /* 210 Store-conditional LDA at psect + offset - arg: none. */ - case ETIR_S_C_STC_LDA_PS: + case ETIR_S_C_STC_LDA_GBL: + /* ALPHA_R_LDA */ /* 211 Store-conditional BSR or Hint at global address arg: none. */ - case ETIR_S_C_STC_BOH_GBL: - /* 212 Store-conditional BSR or Hint at pect + offset - arg: none. */ - case ETIR_S_C_STC_BOH_PS: + case ETIR_S_C_STC_BOH_GBL: + *quarter_relocs = 4; + break; /* 213 Store-conditional NOP,BSR or HINT at global address arg: none. */ + case ETIR_S_C_STC_NBH_GBL: - /* 214 Store-conditional NOP,BSR or HINT at psect + offset + /* 206 Store-conditional NOP at pect + offset + arg: none. */ + + case ETIR_S_C_STC_NOP_PS: + + /* 208 Store-conditional BSR at pect + offset + arg: none. */ + + case ETIR_S_C_STC_BSR_PS: + + /* 210 Store-conditional LDA at psect + offset + arg: none. */ + + case ETIR_S_C_STC_LDA_PS: + + /* 212 Store-conditional BSR or Hint at pect + offset + arg: none. */ + + case ETIR_S_C_STC_BOH_PS: + + /* 214 Store-conditional NOP, BSR or HINT at psect + offset arg: none. */ case ETIR_S_C_STC_NBH_PS: - /* FIXME */ - break; + (*_bfd_error_handler) ("%s: not supported", cmd_name (cmd)); + *quarter_relocs = 0; + return FALSE; default: -#if VMS_DEBUG - _bfd_vms_debug (3, "reserved STC cmd %d", cmd); -#endif - break; + (*_bfd_error_handler) (_("reserved STC cmd %d"), cmd); + *quarter_relocs = 0; + return FALSE; } + return TRUE; } @@ -851,10 +1035,10 @@ alloc_section (bfd * abfd, unsigned int idx) /* tir_sta - vax stack commands + Vax stack commands. - Handle sta_xxx commands in tir section - ptr points to data area in record + Handle sta_xxx commands in tir section, + ptr points to data area in record. See table 7-3 of the VAX/VMS linker manual. */ @@ -924,7 +1108,7 @@ tir_sta (bfd * abfd, unsigned char *ptr) by signed byte offset. */ { unsigned long dummy; - unsigned int psect; + int psect; if (cmd == TIR_S_C_STA_PB) psect = *ptr++; @@ -934,12 +1118,12 @@ tir_sta (bfd * abfd, unsigned char *ptr) ptr += 2; } - if (psect >= PRIV (section_count)) + if ((unsigned int) psect >= PRIV (section_count)) alloc_section (abfd, psect); dummy = (long) *ptr++; dummy += (PRIV (sections)[psect])->vma; - _bfd_vms_push (abfd, (uquad) dummy, (int) psect); + _bfd_vms_push (abfd, (uquad) dummy, psect); } break; @@ -951,7 +1135,7 @@ tir_sta (bfd * abfd, unsigned char *ptr) sh signed short offset. */ { unsigned long dummy; - unsigned int psect; + int psect; if (cmd == TIR_S_C_STA_PW) psect = *ptr++; @@ -961,12 +1145,12 @@ tir_sta (bfd * abfd, unsigned char *ptr) ptr += 2; } - if (psect >= PRIV (section_count)) + if ((unsigned int) psect >= PRIV (section_count)) alloc_section (abfd, psect); dummy = bfd_getl16 (ptr); ptr+=2; dummy += (PRIV (sections)[psect])->vma; - _bfd_vms_push (abfd, (uquad) dummy, (int) psect); + _bfd_vms_push (abfd, (uquad) dummy, psect); } break; @@ -978,7 +1162,7 @@ tir_sta (bfd * abfd, unsigned char *ptr) lw signed longword offset. */ { unsigned long dummy; - unsigned int psect; + int psect; if (cmd == TIR_S_C_STA_PL) psect = *ptr++; @@ -988,12 +1172,12 @@ tir_sta (bfd * abfd, unsigned char *ptr) ptr += 2; } - if (psect >= PRIV (section_count)) + if ((unsigned int) psect >= PRIV (section_count)) alloc_section (abfd, psect); dummy = bfd_getl32 (ptr); ptr += 4; dummy += (PRIV (sections)[psect])->vma; - _bfd_vms_push (abfd, (uquad) dummy, (int) psect); + _bfd_vms_push (abfd, (uquad) dummy, psect); } break; @@ -1457,7 +1641,7 @@ static unsigned char * tir_ctl (bfd * abfd, unsigned char *ptr) { unsigned long dummy; - unsigned int psect; + int psect; #if VMS_DEBUG _bfd_vms_debug (5, "tir_ctl %d\n", *ptr); @@ -1468,10 +1652,10 @@ tir_ctl (bfd * abfd, unsigned char *ptr) case TIR_S_C_CTL_SETRB: /* Set relocation base: pop stack, set image location counter arg: none. */ - dummy = _bfd_vms_pop (abfd, (int *) &psect); - if (psect >= PRIV (section_count)) + dummy = _bfd_vms_pop (abfd, &psect); + if ((unsigned int) psect >= PRIV (section_count)) alloc_section (abfd, psect); - image_set_ptr (abfd, (int) psect, (uquad) dummy); + image_set_ptr (abfd, psect, (uquad) dummy); break; case TIR_S_C_CTL_AUGRB: @@ -1492,7 +1676,7 @@ tir_ctl (bfd * abfd, unsigned char *ptr) case TIR_S_C_CTL_STLOC: /* Set location: pop index, restore location counter from index arg: none. */ - dummy = _bfd_vms_pop (abfd, (int *) &psect); + dummy = _bfd_vms_pop (abfd, &psect); (*_bfd_error_handler) (_("%s: not fully implemented"), tir_cmd_name (ptr[-1])); break; @@ -1500,7 +1684,7 @@ tir_ctl (bfd * abfd, unsigned char *ptr) case TIR_S_C_CTL_STKDL: /* Stack defined location: pop index, push location counter from index arg: none. */ - dummy = _bfd_vms_pop (abfd, (int *) &psect); + dummy = _bfd_vms_pop (abfd, &psect); (*_bfd_error_handler) (_("%s: not fully implemented"), tir_cmd_name (ptr[-1])); break; @@ -1517,7 +1701,7 @@ tir_ctl (bfd * abfd, unsigned char *ptr) static unsigned char * tir_cmd (bfd * abfd, unsigned char *ptr) { - struct + static const struct { int mincod; int maxcod; @@ -1535,7 +1719,7 @@ tir_cmd (bfd * abfd, unsigned char *ptr) #if VMS_DEBUG _bfd_vms_debug (4, "tir_cmd %d/%x\n", *ptr, *ptr); - _bfd_hexdump (8, ptr, 16, (int) ptr); + _bfd_hexdump (8, ptr, 16, (long) ptr); #endif if (*ptr & 0x80) @@ -1570,13 +1754,13 @@ tir_cmd (bfd * abfd, unsigned char *ptr) /* Handle command from ETIR section. */ static int -etir_cmd (bfd * abfd, int cmd, unsigned char *ptr) +etir_cmd (bfd *abfd, int cmd, unsigned char *ptr, int *quarter_relocs) { - static struct + static const struct { int mincod; int maxcod; - bfd_boolean (*explain) (bfd *, int, unsigned char *); + bfd_boolean (*explain) (bfd *, int, unsigned char *, int *); } etir_table[] = { @@ -1591,8 +1775,8 @@ etir_cmd (bfd * abfd, int cmd, unsigned char *ptr) int i = 0; #if VMS_DEBUG - _bfd_vms_debug (4, "etir_cmd %d/%x\n", cmd, cmd); - _bfd_hexdump (8, ptr, 16, (int) ptr); + _bfd_vms_debug (4, "etir_cmd: %s(%d)\n", cmd_name (cmd), cmd); + _bfd_hexdump (8, ptr, 16, (long) ptr); #endif while (etir_table[i].mincod >= 0) @@ -1600,7 +1784,7 @@ etir_cmd (bfd * abfd, int cmd, unsigned char *ptr) if ( (etir_table[i].mincod <= cmd) && (cmd <= etir_table[i].maxcod)) { - if (!etir_table[i].explain (abfd, cmd, ptr)) + if (!etir_table[i].explain (abfd, cmd, ptr, quarter_relocs)) return -1; break; } @@ -1608,7 +1792,7 @@ etir_cmd (bfd * abfd, int cmd, unsigned char *ptr) } #if VMS_DEBUG - _bfd_vms_debug (4, "etir_cmd: = 0\n"); + _bfd_vms_debug (4, "etir_cmd: result = 0\n"); #endif return 0; } @@ -1643,28 +1827,67 @@ analyze_tir (bfd * abfd, unsigned char *ptr, unsigned int length) static int analyze_etir (bfd * abfd, unsigned char *ptr, unsigned int length) { - int cmd; - unsigned char *maxptr; + unsigned char *maxptr = ptr + length; + /* Relocations are made of 1, 2 or 4 ETIR commands. + We therefore count them using quarters. */ + int quarter_relocs = 0; int result = 0; #if VMS_DEBUG _bfd_vms_debug (3, "analyze_etir: %d bytes\n", length); #endif - maxptr = ptr + length; - while (ptr < maxptr) { - cmd = bfd_getl16 (ptr); - length = bfd_getl16 (ptr + 2); - result = etir_cmd (abfd, cmd, ptr+4); + int cmd = bfd_getl16 (ptr); + int cmd_length = bfd_getl16 (ptr + 2); + result = etir_cmd (abfd, cmd, ptr + 4, &quarter_relocs); if (result != 0) break; - ptr += length; + + /* If we have a relocation, we record its length to size + future buffers and bump the reloc count of the section. */ + if (quarter_relocs) + { + vms_section_data (PRIV (image_section))->reloc_size += cmd_length; + abfd->flags |= HAS_RELOC; + + if (quarter_relocs == 4) + { + PRIV (image_section)->reloc_count++; + +#if VMS_DEBUG + _bfd_vms_debug (4, "-> reloc %d at 0x%x\n", + PRIV (image_section)->reloc_count-1, + ptr - (maxptr - length)); +#endif + + quarter_relocs = 0; + } + else if (quarter_relocs > 4) + { + +#if VMS_DEBUG + _bfd_vms_debug (4, "Reloc count error (%d) in section %s\n", + PRIV (image_section)->reloc_count, + PRIV (image_section)->name); +#endif + + quarter_relocs = 0; + } + } + + /* If we have a Store Immediate, we reserve space for the + count argument. */ + else if (cmd == ETIR_S_C_STO_IMM) + vms_section_data (PRIV (image_section))->reloc_size + += ETIR_S_C_HEADER_SIZE + 4; + + ptr += cmd_length; } #if VMS_DEBUG - _bfd_vms_debug (3, "analyze_etir: = %d\n", result); + _bfd_vms_debug (3, "analyze_etir: result = %d\n", result); #endif return result; @@ -1685,8 +1908,8 @@ _bfd_vms_slurp_tir (bfd * abfd, int objtype) switch (objtype) { case EOBJ_S_C_ETIR: - PRIV (vms_rec) += 4; /* Skip type, size. */ - PRIV (rec_size) -= 4; + PRIV (vms_rec) += ETIR_S_C_HEADER_SIZE; + PRIV (rec_size) -= ETIR_S_C_HEADER_SIZE; result = analyze_etir (abfd, PRIV (vms_rec), (unsigned) PRIV (rec_size)); break; case OBJ_S_C_TIR: @@ -1702,33 +1925,361 @@ _bfd_vms_slurp_tir (bfd * abfd, int objtype) return result; } -/* Process EDBG record - Return 0 on success, -1 on error - - Not implemented yet. */ + /* Slurp relocs from ETIR sections and (temporarily) save them + in the per-section reloc buffer. */ int -_bfd_vms_slurp_dbg (bfd * abfd, int objtype ATTRIBUTE_UNUSED) +_bfd_vms_slurp_relocs (bfd *abfd) { + struct vms_section_data_struct *vsd; + unsigned char *begin = PRIV (vms_rec) + 4; + unsigned char *end = PRIV (vms_rec) + PRIV (rec_size); + unsigned char *ptr; + int cmd, length, slurped_length; + #if VMS_DEBUG - _bfd_vms_debug (2, "DBG/EDBG\n"); + _bfd_vms_debug (3, "_bfd_vms_slurp_relocs: %d bytes\n", PRIV (rec_size)); +#endif + + for (ptr = begin; ptr < end; ptr += length) + { + cmd = bfd_getl16 (ptr); + length = bfd_getl16 (ptr + 2); + slurped_length = length; + + switch (cmd) + { + case ETIR_S_C_STA_PQ: /* ALPHA_R_REF{LONG|QUAD}, others part 1 */ + /* This one is special as it is both part of the section header + and of the ALPHA_R_REFLONG and ALPHA_R_REFQUAD relocations. */ + if (bfd_getl16 (ptr + length) == ETIR_S_C_CTL_SETRB) + { + int psect = bfd_getl32 (ptr + ETIR_S_C_HEADER_SIZE); + PRIV (image_section) = PRIV (sections)[psect]; + continue; + } + + case ETIR_S_C_STA_GBL: /* ALPHA_R_REFLONG und_section, step 1 */ + /* ALPHA_R_REFQUAD und_section, step 1 */ + break; + + case ETIR_S_C_STA_LW: /* ALPHA_R_REFLONG und_section, step 2 */ + /* ALPHA_R_REFLONG abs_section, step 1 */ + /* This one is special as it is both part of the section header + and of the ALPHA_R_REFLONG relocation. */ + if (bfd_getl16 (ptr + length) == ETIR_S_C_CTL_DFLOC) + { + PRIV (image_section) = PRIV (dst_section); + continue; + } + + case ETIR_S_C_STA_QW: /* ALPHA_R_REFQUAD und_section, step 2 */ + /* ALPHA_R_REFQUAD abs_section, step 1 */ + + case ETIR_S_C_STO_LW: /* ALPHA_R_REFLONG und_section, step 4 */ + /* ALPHA_R_REFLONG abs_section, step 2 */ + /* ALPHA_R_REFLONG others, step 2 */ + + case ETIR_S_C_STO_QW: /* ALPHA_R_REFQUAD und_section, step 4 */ + /* ALPHA_R_REFQUAD abs_section, step 2 */ + + case ETIR_S_C_STO_OFF: /* ALPHA_R_REFQUAD others, step 2 */ + + case ETIR_S_C_OPR_ADD: /* ALPHA_R_REFLONG und_section, step 3 */ + /* ALPHA_R_REFQUAD und_section, step 3 */ + + case ETIR_S_C_STO_CA: /* ALPHA_R_CODEADDR */ + case ETIR_S_C_STO_GBL: /* ALPHA_R_REFQUAD und_section */ + case ETIR_S_C_STO_GBL_LW: /* ALPHA_R_REFLONG und_section */ + case ETIR_S_C_STC_LP_PSB: /* ALPHA_R_LINKAGE */ + case ETIR_S_C_STC_NOP_GBL: /* ALPHA_R_NOP */ + case ETIR_S_C_STC_BSR_GBL: /* ALPHA_R_BSR */ + case ETIR_S_C_STC_LDA_GBL: /* ALPHA_R_LDA */ + case ETIR_S_C_STC_BOH_GBL: /* ALPHA_R_BOH */ + break; + + case ETIR_S_C_STO_IMM: + if (PRIV (image_section)->reloc_count == 0) + continue; + /* This is not a relocation, but we nevertheless slurp the + count argument. We'll use it to compute the addresses + of the relocations. */ + slurped_length = ETIR_S_C_HEADER_SIZE + 4; + break; + + default: + continue; + } + + vsd = vms_section_data (PRIV (image_section)); + memcpy (vsd->reloc_stream + vsd->reloc_offset, ptr, slurped_length); + vsd->reloc_offset += slurped_length; + if (vsd->reloc_offset > vsd->reloc_size) + { + (*_bfd_error_handler) (_("Reloc size error in section %s"), + PRIV (image_section)->name); + return -1; + } + } + +#if VMS_DEBUG + _bfd_vms_debug (3, "_bfd_vms_slurp_relocs: result = 0\n"); #endif - abfd->flags |= (HAS_DEBUG | HAS_LINENO); return 0; } -/* Process ETBT record - Return 0 on success, -1 on error - - Not implemented yet. */ +/* Decode relocs from the reloc buffer of the specified section + and internalize them in the specified buffer. */ int -_bfd_vms_slurp_tbt (bfd * abfd ATTRIBUTE_UNUSED, - int objtype ATTRIBUTE_UNUSED) +_bfd_vms_decode_relocs (bfd *abfd, arelent *relocs, asection *section, + asymbol **symbols ATTRIBUTE_UNUSED) { + int saved_cmd, saved_sym_offset, saved_sec_offset, saved_addend_offset; + int cmd, sym_offset, sec_offset, address_offset, addend_offset; + struct vms_section_data_struct *vsd = vms_section_data (section); + bfd_reloc_code_real_type reloc_code; + vms_symbol_entry *entry; + bfd_vma vaddr = 0; + unsigned char *begin = vsd->reloc_stream; + unsigned char *end = vsd->reloc_stream + vsd->reloc_size; + unsigned char *ptr, *arg_ptr; + const char *name; + int length; + #if VMS_DEBUG - _bfd_vms_debug (2, "TBT/ETBT\n"); + _bfd_vms_debug (3, "_bfd_vms_decode_relocs: %d bytes\n", vsd->reloc_size); +#endif + + #define PUSH_CMD() \ + { \ + saved_cmd = cmd; \ + saved_sym_offset = sym_offset - length; \ + saved_sec_offset = sec_offset - length; \ + saved_addend_offset = addend_offset - length; \ + continue; \ + } + + #define POP_CMD() \ + { \ + cmd = saved_cmd; \ + saved_cmd = ETIR_S_C_MAXSTCCOD + 1; \ + sym_offset = saved_sym_offset; \ + sec_offset = saved_sec_offset; \ + addend_offset= saved_addend_offset; \ + } + + #define CMD_PUSHED (saved_cmd != ETIR_S_C_MAXSTCCOD + 1) + + #define NO_OFFSET -128 + + saved_cmd = ETIR_S_C_MAXSTCCOD + 1; + saved_sym_offset = NO_OFFSET; + saved_sec_offset = NO_OFFSET; + saved_addend_offset = NO_OFFSET; + + for (ptr = begin; ptr < end; ptr += length) + { + cmd = bfd_getl16 (ptr); + length = bfd_getl16 (ptr + 2); + + arg_ptr = ptr + ETIR_S_C_HEADER_SIZE; + sym_offset = NO_OFFSET; + sec_offset = NO_OFFSET; + address_offset = NO_OFFSET; + addend_offset = NO_OFFSET; + + switch (cmd) + { + case ETIR_S_C_STA_GBL: /* ALPHA_R_REFLONG und_section, step 1 */ + /* ALPHA_R_REFQUAD und_section, step 1 */ + sym_offset = 0; + PUSH_CMD () + + case ETIR_S_C_STA_PQ: /* ALPHA_R_REF{LONG|QUAD}, others part 1 */ + sec_offset = 0; + addend_offset = 4; + PUSH_CMD () + + case ETIR_S_C_STA_LW: /* ALPHA_R_REFLONG abs_section, step 1 */ + /* ALPHA_R_REFLONG und_section, step 2 */ + if (CMD_PUSHED) + { + POP_CMD () + if (cmd != ETIR_S_C_STA_GBL) + { + (*_bfd_error_handler) (_("Unknown reloc %s + %s"), + cmd_name (cmd), + cmd_name (ETIR_S_C_STA_LW)); + return 0; + } + cmd = ETIR_S_C_STA_LW; + } + addend_offset = 0; + PUSH_CMD () + + case ETIR_S_C_STA_QW: /* ALPHA_R_REFQUAD abs_section, step 1 */ + /* ALPHA_R_REFQUAD und_section, step 2 */ + if (CMD_PUSHED) + { + POP_CMD () + if (cmd != ETIR_S_C_STA_GBL) + { + (*_bfd_error_handler) (_("Unknown reloc %s + %s"), + cmd_name (cmd), + cmd_name (ETIR_S_C_STA_QW)); + return 0; + } + cmd = ETIR_S_C_STA_QW; + } + addend_offset = 0; + PUSH_CMD () + + case ETIR_S_C_STO_LW: /* ALPHA_R_REFLONG und_section, step 4 */ + /* ALPHA_R_REFLONG abs_section, step 2 */ + /* ALPHA_R_REFLONG others, step 2 */ + POP_CMD () + if (cmd != ETIR_S_C_OPR_ADD + && cmd != ETIR_S_C_STA_LW + && cmd != ETIR_S_C_STA_PQ) + { + (*_bfd_error_handler) (_("Unknown reloc %s + %s"), + cmd_name (cmd), cmd_name (ETIR_S_C_STO_LW)); + return 0; + } + reloc_code = BFD_RELOC_32; + break; + + case ETIR_S_C_STO_QW: /* ALPHA_R_REFQUAD und_section, step 4 */ + /* ALPHA_R_REFQUAD abs_section, step 2 */ + POP_CMD () + if (cmd != ETIR_S_C_OPR_ADD && cmd != ETIR_S_C_STA_QW) + { + (*_bfd_error_handler) (_("Unknown reloc %s + %s"), + cmd_name (cmd), cmd_name (ETIR_S_C_STO_QW)); + return 0; + } + reloc_code = BFD_RELOC_64; + break; + + case ETIR_S_C_STO_OFF: /* ALPHA_R_REFQUAD others, step 2 */ + POP_CMD () + if (cmd != ETIR_S_C_STA_PQ) + { + (*_bfd_error_handler) (_("Unknown reloc %s + %s"), + cmd_name (cmd), cmd_name (ETIR_S_C_STO_OFF)); + return 0; + } + reloc_code = BFD_RELOC_64; + break; + + case ETIR_S_C_OPR_ADD: /* ALPHA_R_REFLONG und_section, step 3 */ + /* ALPHA_R_REFQUAD und_section, step 3 */ + POP_CMD () + if (cmd != ETIR_S_C_STA_LW && cmd != ETIR_S_C_STA_QW) + { + (*_bfd_error_handler) (_("Unknown reloc %s + %s"), + cmd_name (cmd), cmd_name (ETIR_S_C_OPR_ADD)); + return 0; + } + cmd = ETIR_S_C_OPR_ADD; + PUSH_CMD () + + case ETIR_S_C_STO_CA: /* ALPHA_R_CODEADDR */ + reloc_code = BFD_RELOC_ALPHA_CODEADDR; + sym_offset = 0; + break; + + case ETIR_S_C_STO_GBL: /* ALPHA_R_REFQUAD und_section */ + reloc_code = BFD_RELOC_64; + sym_offset = 0; + break; + + case ETIR_S_C_STO_GBL_LW: /* ALPHA_R_REFLONG und_section */ + reloc_code = BFD_RELOC_32; + sym_offset = 0; + break; + + case ETIR_S_C_STC_LP_PSB: /* ALPHA_R_LINKAGE */ + reloc_code = BFD_RELOC_ALPHA_LINKAGE; + sym_offset = 4; + break; + + case ETIR_S_C_STC_NOP_GBL: /* ALPHA_R_NOP */ + reloc_code = BFD_RELOC_ALPHA_NOP; + goto call_reloc; + + case ETIR_S_C_STC_BSR_GBL: /* ALPHA_R_BSR */ + reloc_code = BFD_RELOC_ALPHA_BSR; + goto call_reloc; + + case ETIR_S_C_STC_LDA_GBL: /* ALPHA_R_LDA */ + reloc_code = BFD_RELOC_ALPHA_LDA; + goto call_reloc; + + case ETIR_S_C_STC_BOH_GBL: /* ALPHA_R_BOH */ + reloc_code = BFD_RELOC_ALPHA_BOH; + goto call_reloc; + + call_reloc: + sym_offset = 32; + address_offset = 8; + addend_offset = 24; + break; + + case ETIR_S_C_STO_IMM: + vaddr += bfd_getl32 (arg_ptr); + length = ETIR_S_C_HEADER_SIZE + 4; + continue; + + default: + continue; + } + + relocs->howto = bfd_reloc_type_lookup (abfd, reloc_code); + + if (sym_offset > NO_OFFSET) + { + name = _bfd_vms_save_counted_string (arg_ptr + sym_offset); + entry = (vms_symbol_entry *) + bfd_hash_lookup (PRIV (vms_symbol_table), name, FALSE, FALSE); + if (entry == NULL) + { + (*_bfd_error_handler) (_("Unknown symbol %s in command %s"), + name, cmd_name (cmd)); + relocs->sym_ptr_ptr = NULL; + } + else + /* ??? This is a hack. We should point in 'symbols'. */ + relocs->sym_ptr_ptr = &entry->symbol; + } + else if (sec_offset > NO_OFFSET) + relocs->sym_ptr_ptr + = PRIV (sections)[bfd_getl32 (arg_ptr + sec_offset)]->symbol_ptr_ptr; + else + relocs->sym_ptr_ptr = NULL; + + if (address_offset > NO_OFFSET) + relocs->address = bfd_getl64 (arg_ptr + address_offset); + else + relocs->address = vaddr; + + if (addend_offset > NO_OFFSET) + relocs->addend = bfd_getl64 (arg_ptr + addend_offset); + else + relocs->addend = 0; + + vaddr += bfd_get_reloc_size (relocs->howto); + relocs++; + } + + #undef PUSH_CMD + #undef POP_CMD + #undef NO_OFFSET + +#if VMS_DEBUG + _bfd_vms_debug (3, "_bfd_vms_decode_relocs: result = 0\n"); #endif return 0; @@ -1750,6 +2301,20 @@ _bfd_vms_slurp_lnk (bfd * abfd ATTRIBUTE_UNUSED, return 0; } +/* WRITE ETIR SECTION + + This is still under construction and therefore not documented. */ + +static void start_etir_record (bfd *abfd, int index, uquad offset, + bfd_boolean justoffset); +static void start_first_etbt_record (bfd *abfd); +static void start_another_etbt_record (bfd *abfd); +static void sto_imm (bfd *abfd, bfd_size_type, unsigned char *, bfd_vma vaddr, + int index, const char *name); +static void end_etir_record (bfd *abfd); +static void etir_output_check (bfd *abfd, asection *section, bfd_vma vaddr, + int checklen); + /* Start ETIR record for section #index at virtual addr offset. */ static void @@ -1780,25 +2345,20 @@ end_etir_record (bfd * abfd) _bfd_vms_output_end (abfd); } -/* WRITE ETIR SECTION - - This is still under construction and therefore not documented. */ +/* Output a STO_IMM command for SSIZE bytes of data from CPR at virtual + address VADDR in section specified by INDEX and NAME. */ static void -sto_imm (bfd * abfd, vms_section *sptr, bfd_vma vaddr, int index) +sto_imm (bfd *abfd, bfd_size_type ssize, unsigned char *cptr, bfd_vma vaddr, + int index, const char *name) { - int size; - int ssize; - unsigned char *cptr; + bfd_size_type size; #if VMS_DEBUG - _bfd_vms_debug (8, "sto_imm %d bytes\n", sptr->size); - _bfd_hexdump (9, sptr->contents, (int) sptr->size, (int) vaddr); + _bfd_vms_debug (8, "sto_imm %d bytes\n", ssize); + _bfd_hexdump (9, cptr, (int) ssize, (int) vaddr); #endif - ssize = sptr->size; - cptr = sptr->contents; - while (ssize > 0) { /* Try all the rest. */ @@ -1808,11 +2368,14 @@ sto_imm (bfd * abfd, vms_section *sptr, bfd_vma vaddr, int index) { /* Doesn't fit, split ! */ end_etir_record (abfd); - start_etir_record (abfd, index, vaddr, FALSE); - /* Get max size. */ - size = _bfd_vms_output_check (abfd, 0); - /* More than what's left ? */ - if (size > ssize) + + if (name [0] && name[1] == 'v' && !strcmp (name, ".vmsdebug")) + start_another_etbt_record (abfd); + else + start_etir_record (abfd, index, vaddr, FALSE); + + size = _bfd_vms_output_check (abfd, 0); /* get max size */ + if (size > ssize) /* more than what's left ? */ size = ssize; } @@ -1827,8 +2390,63 @@ sto_imm (bfd * abfd, vms_section *sptr, bfd_vma vaddr, int index) #endif vaddr += size; - ssize -= size; cptr += size; + ssize -= size; + } +} + +/* Start ETBT record for section #index at virtual addr offset. */ + +static void +start_first_etbt_record (bfd *abfd) +{ + _bfd_vms_output_begin (abfd, EOBJ_S_C_ETBT, -1); + _bfd_vms_output_push (abfd); + + _bfd_vms_output_begin (abfd, ETIR_S_C_STA_LW, -1); /* push start offset */ + _bfd_vms_output_long (abfd, (unsigned long) 0); + _bfd_vms_output_flush (abfd); + + _bfd_vms_output_begin (abfd, ETIR_S_C_CTL_DFLOC, -1); /* start = pop() */ + _bfd_vms_output_flush (abfd); +} + +static void +start_another_etbt_record (bfd *abfd) +{ + _bfd_vms_output_begin (abfd, EOBJ_S_C_ETBT, -1); + _bfd_vms_output_push (abfd); +} + +static void +etir_output_check (bfd *abfd, asection *section, bfd_vma vaddr, int checklen) +{ + if (_bfd_vms_output_check (abfd, checklen) < 0) + { + end_etir_record (abfd); + if (section->name[0] && section->name[1] == 'v' + && !strcmp (section->name, ".vmsdebug")) + start_another_etbt_record (abfd); + else + start_etir_record (abfd, section->index, vaddr, FALSE); + } +} + +/* Return whether RELOC must be deferred till the end. */ + +static int +defer_reloc_p (arelent *reloc) +{ + switch (reloc->howto->type) + { + case ALPHA_R_NOP: + case ALPHA_R_LDA: + case ALPHA_R_BSR: + case ALPHA_R_BOH: + return 1; + + default: + return 0; } } @@ -1838,8 +2456,6 @@ int _bfd_vms_write_tir (bfd * abfd, int objtype ATTRIBUTE_UNUSED) { asection *section; - vms_section *sptr; - int nextoffset; #if VMS_DEBUG _bfd_vms_debug (2, "vms_write_tir (%p, %d)\n", abfd, objtype); @@ -1847,391 +2463,346 @@ _bfd_vms_write_tir (bfd * abfd, int objtype ATTRIBUTE_UNUSED) _bfd_vms_output_alignment (abfd, 4); - nextoffset = 0; PRIV (vms_linkage_index) = 1; - /* Dump all other sections. */ - section = abfd->sections; - - while (section != NULL) + for (section = abfd->sections; section; section = section->next) { - #if VMS_DEBUG _bfd_vms_debug (4, "writing %d. section '%s' (%d bytes)\n", section->index, section->name, (int) (section->size)); #endif + if (!(section->flags & SEC_HAS_CONTENTS) + || bfd_is_com_section (section)) + continue; + + if (!section->contents) + { + bfd_set_error (bfd_error_no_contents); + return -1; + } + + if (section->name[0] + && section->name[1] == 'v' + && !strcmp (section->name, ".vmsdebug")) + start_first_etbt_record (abfd); + else + start_etir_record (abfd, section->index, 0, FALSE); + if (section->flags & SEC_RELOC) { - int i; + bfd_vma curr_addr = 0; + unsigned char *curr_data = section->contents; + bfd_size_type size; + int pass2_needed = 0; + int pass2_in_progress = 0; + unsigned int irel; + + if (section->reloc_count <= 0) + (*_bfd_error_handler) + (_("SEC_RELOC with no relocs in section %s"), section->name); - if ((i = section->reloc_count) <= 0) - (*_bfd_error_handler) (_("SEC_RELOC with no relocs in section %s"), - section->name); #if VMS_DEBUG else { - arelent **rptr; + int i = section->reloc_count; + arelent **rptr = section->orelocation; _bfd_vms_debug (4, "%d relocations:\n", i); - rptr = section->orelocation; while (i-- > 0) { - _bfd_vms_debug (4, "sym %s in sec %s, value %08lx, addr %08lx, off %08lx, len %d: %s\n", + _bfd_vms_debug (4, "sym %s in sec %s, value %08lx, " + "addr %08lx, off %08lx, len %d: %s\n", (*(*rptr)->sym_ptr_ptr)->name, (*(*rptr)->sym_ptr_ptr)->section->name, (long) (*(*rptr)->sym_ptr_ptr)->value, (*rptr)->address, (*rptr)->addend, bfd_get_reloc_size ((*rptr)->howto), - (*rptr)->howto->name); + ( *rptr)->howto->name); rptr++; } } #endif - } - if ((section->flags & SEC_HAS_CONTENTS) - && (! bfd_is_com_section (section))) - { - /* Virtual addr in section. */ - bfd_vma vaddr; - - sptr = _bfd_get_vms_section (abfd, section->index); - if (sptr == NULL) + new_pass: + for (irel = 0; irel < section->reloc_count; irel++) { - bfd_set_error (bfd_error_no_contents); - return -1; - } + struct evax_private_udata_struct *udata; + arelent *rptr = section->orelocation [irel]; + bfd_vma addr = rptr->address; + asymbol *sym = *rptr->sym_ptr_ptr; + asection *sec = sym->section; + int defer = defer_reloc_p (rptr); + unsigned int slen; + char *hash; + + if (pass2_in_progress) + { + /* Non-deferred relocs have already been output. */ + if (!defer) + continue; + } + else + { + /* Deferred relocs must be output at the very end. */ + if (defer) + { + pass2_needed = 1; + continue; + } - vaddr = (bfd_vma) (sptr->offset); + /* Regular relocs are intertwined with binary data. */ + if (curr_addr > addr) + (*_bfd_error_handler) (_("Size error in section %s"), + section->name); + size = addr - curr_addr; + sto_imm (abfd, size, curr_data, curr_addr, + section->index, section->name); + curr_data += size; + curr_addr += size; + } - start_etir_record (abfd, section->index, (uquad) sptr->offset, - FALSE); + size = bfd_get_reloc_size (rptr->howto); - while (sptr != NULL) - { - /* One STA_PQ, CTL_SETRB per vms_section. */ - if (section->flags & SEC_RELOC) - { - /* Check for relocs. */ - arelent **rptr = section->orelocation; - int i = section->reloc_count; + switch (rptr->howto->type) + { + case ALPHA_R_IGNORE: + break; - for (;;) + case ALPHA_R_REFLONG: + if (bfd_is_und_section (sym->section)) { - bfd_size_type addr = (*rptr)->address; - bfd_size_type len = bfd_get_reloc_size ((*rptr)->howto); - if (sptr->offset < addr) - { - /* Sptr starts before reloc. */ - bfd_size_type before = addr - sptr->offset; - if (sptr->size <= before) - { - /* Complete before. */ - sto_imm (abfd, sptr, vaddr, section->index); - vaddr += sptr->size; - break; - } - else - { - /* Partly before. */ - int after = sptr->size - before; - - sptr->size = before; - sto_imm (abfd, sptr, vaddr, section->index); - vaddr += sptr->size; - sptr->contents += before; - sptr->offset += before; - sptr->size = after; - } - } - else if (sptr->offset == addr) + bfd_vma addend = rptr->addend; + slen = strlen ((char *) sym->name); + hash = _bfd_vms_length_hash_symbol + (abfd, sym->name, EOBJ_S_C_SYMSIZ); + etir_output_check (abfd, section, curr_addr, slen); + if (addend) { - /* Sptr starts at reloc. */ - asymbol *sym = *(*rptr)->sym_ptr_ptr; - asection *sec = sym->section; - - switch ((*rptr)->howto->type) - { - case ALPHA_R_IGNORE: - break; - - case ALPHA_R_REFLONG: - { - if (bfd_is_und_section (sym->section)) - { - int slen = strlen ((char *) sym->name); - char *hash; - - if (_bfd_vms_output_check (abfd, slen) < 0) - { - end_etir_record (abfd); - start_etir_record (abfd, - section->index, - vaddr, FALSE); - } - _bfd_vms_output_begin (abfd, - ETIR_S_C_STO_GBL_LW, - -1); - hash = (_bfd_vms_length_hash_symbol - (abfd, sym->name, EOBJ_S_C_SYMSIZ)); - _bfd_vms_output_counted (abfd, hash); - _bfd_vms_output_flush (abfd); - } - else if (bfd_is_abs_section (sym->section)) - { - if (_bfd_vms_output_check (abfd, 16) < 0) - { - end_etir_record (abfd); - start_etir_record (abfd, - section->index, - vaddr, FALSE); - } - _bfd_vms_output_begin (abfd, - ETIR_S_C_STA_LW, - -1); - _bfd_vms_output_quad (abfd, - (uquad) sym->value); - _bfd_vms_output_flush (abfd); - _bfd_vms_output_begin (abfd, - ETIR_S_C_STO_LW, - -1); - _bfd_vms_output_flush (abfd); - } - else - { - if (_bfd_vms_output_check (abfd, 32) < 0) - { - end_etir_record (abfd); - start_etir_record (abfd, - section->index, - vaddr, FALSE); - } - _bfd_vms_output_begin (abfd, - ETIR_S_C_STA_PQ, - -1); - _bfd_vms_output_long (abfd, - (unsigned long) (sec->index)); - _bfd_vms_output_quad (abfd, - ((uquad) (*rptr)->addend - + (uquad) sym->value)); - _bfd_vms_output_flush (abfd); - _bfd_vms_output_begin (abfd, - ETIR_S_C_STO_LW, - -1); - _bfd_vms_output_flush (abfd); - } - } - break; - - case ALPHA_R_REFQUAD: - { - if (bfd_is_und_section (sym->section)) - { - int slen = strlen ((char *) sym->name); - char *hash; - - if (_bfd_vms_output_check (abfd, slen) < 0) - { - end_etir_record (abfd); - start_etir_record (abfd, - section->index, - vaddr, FALSE); - } - _bfd_vms_output_begin (abfd, - ETIR_S_C_STO_GBL, - -1); - hash = (_bfd_vms_length_hash_symbol - (abfd, sym->name, EOBJ_S_C_SYMSIZ)); - _bfd_vms_output_counted (abfd, hash); - _bfd_vms_output_flush (abfd); - } - else if (bfd_is_abs_section (sym->section)) - { - if (_bfd_vms_output_check (abfd, 16) < 0) - { - end_etir_record (abfd); - start_etir_record (abfd, - section->index, - vaddr, FALSE); - } - _bfd_vms_output_begin (abfd, - ETIR_S_C_STA_QW, - -1); - _bfd_vms_output_quad (abfd, - (uquad) sym->value); - _bfd_vms_output_flush (abfd); - _bfd_vms_output_begin (abfd, - ETIR_S_C_STO_QW, - -1); - _bfd_vms_output_flush (abfd); - } - else - { - if (_bfd_vms_output_check (abfd, 32) < 0) - { - end_etir_record (abfd); - start_etir_record (abfd, - section->index, - vaddr, FALSE); - } - _bfd_vms_output_begin (abfd, - ETIR_S_C_STA_PQ, - -1); - _bfd_vms_output_long (abfd, - (unsigned long) (sec->index)); - _bfd_vms_output_quad (abfd, - ((uquad) (*rptr)->addend - + (uquad) sym->value)); - _bfd_vms_output_flush (abfd); - _bfd_vms_output_begin (abfd, - ETIR_S_C_STO_OFF, - -1); - _bfd_vms_output_flush (abfd); - } - } - break; - - case ALPHA_R_HINT: - { - int hint_size; - char *hash ATTRIBUTE_UNUSED; - - hint_size = sptr->size; - sptr->size = len; - sto_imm (abfd, sptr, vaddr, section->index); - sptr->size = hint_size; - } - break; - case ALPHA_R_LINKAGE: - { - char *hash; - - if (_bfd_vms_output_check (abfd, 64) < 0) - { - end_etir_record (abfd); - start_etir_record (abfd, section->index, - vaddr, FALSE); - } - _bfd_vms_output_begin (abfd, - ETIR_S_C_STC_LP_PSB, - -1); - _bfd_vms_output_long (abfd, - (unsigned long) PRIV (vms_linkage_index)); - PRIV (vms_linkage_index) += 2; - hash = (_bfd_vms_length_hash_symbol - (abfd, sym->name, EOBJ_S_C_SYMSIZ)); - _bfd_vms_output_counted (abfd, hash); - _bfd_vms_output_byte (abfd, 0); - _bfd_vms_output_flush (abfd); - } - break; - - case ALPHA_R_CODEADDR: - { - int slen = strlen ((char *) sym->name); - char *hash; - if (_bfd_vms_output_check (abfd, slen) < 0) - { - end_etir_record (abfd); - start_etir_record (abfd, - section->index, - vaddr, FALSE); - } - _bfd_vms_output_begin (abfd, - ETIR_S_C_STO_CA, - -1); - hash = (_bfd_vms_length_hash_symbol - (abfd, sym->name, EOBJ_S_C_SYMSIZ)); - _bfd_vms_output_counted (abfd, hash); - _bfd_vms_output_flush (abfd); - } - break; - - default: - (*_bfd_error_handler) (_("Unhandled relocation %s"), - (*rptr)->howto->name); - break; - } - - vaddr += len; - - if (len == sptr->size) - { - break; - } - else - { - sptr->contents += len; - sptr->offset += len; - sptr->size -= len; - i--; - rptr++; - } + _bfd_vms_output_begin (abfd, ETIR_S_C_STA_GBL, -1); + _bfd_vms_output_counted (abfd, hash); + _bfd_vms_output_flush (abfd); + _bfd_vms_output_begin (abfd, ETIR_S_C_STA_LW, -1); + _bfd_vms_output_long (abfd, (unsigned long) addend); + _bfd_vms_output_flush (abfd); + _bfd_vms_output_begin (abfd, ETIR_S_C_OPR_ADD, -1); + _bfd_vms_output_flush (abfd); + _bfd_vms_output_begin (abfd, ETIR_S_C_STO_LW, -1); + _bfd_vms_output_flush (abfd); } else { - /* Sptr starts after reloc. */ - i--; - /* Check next reloc. */ - rptr++; + _bfd_vms_output_begin (abfd, ETIR_S_C_STO_GBL_LW, -1); + _bfd_vms_output_counted (abfd, hash); + _bfd_vms_output_flush (abfd); } + } + else if (bfd_is_abs_section (sym->section)) + { + etir_output_check (abfd, section, curr_addr, 16); + _bfd_vms_output_begin (abfd, ETIR_S_C_STA_LW, -1); + _bfd_vms_output_long (abfd, (unsigned long) sym->value); + _bfd_vms_output_flush (abfd); + _bfd_vms_output_begin (abfd, ETIR_S_C_STO_LW, -1); + _bfd_vms_output_flush (abfd); + } + else + { + etir_output_check (abfd, section, curr_addr, 32); + _bfd_vms_output_begin (abfd, ETIR_S_C_STA_PQ, -1); + _bfd_vms_output_long (abfd, (unsigned long) sec->index); + _bfd_vms_output_quad (abfd, (uquad) rptr->addend + + (uquad) sym->value); + _bfd_vms_output_flush (abfd); + /* ??? Table B-8 of the OpenVMS Linker Utilily Manual + says that we should have a ETIR_S_C_STO_OFF here. + But the relocation would not be BFD_RELOC_32 then. + This case is very likely unreachable. */ + _bfd_vms_output_begin (abfd, ETIR_S_C_STO_LW, -1); + _bfd_vms_output_flush (abfd); + } + break; - if (i == 0) + case ALPHA_R_REFQUAD: + if (bfd_is_und_section (sym->section)) + { + bfd_vma addend = rptr->addend; + slen = strlen ((char *) sym->name); + hash = _bfd_vms_length_hash_symbol + (abfd, sym->name, EOBJ_S_C_SYMSIZ); + etir_output_check (abfd, section, curr_addr, slen); + if (addend) + { + _bfd_vms_output_begin (abfd, ETIR_S_C_STA_GBL, -1); + _bfd_vms_output_counted (abfd, hash); + _bfd_vms_output_flush (abfd); + _bfd_vms_output_begin (abfd, ETIR_S_C_STA_QW, -1); + _bfd_vms_output_quad (abfd, (uquad) addend); + _bfd_vms_output_flush (abfd); + _bfd_vms_output_begin (abfd, ETIR_S_C_OPR_ADD, -1); + _bfd_vms_output_flush (abfd); + _bfd_vms_output_begin (abfd, ETIR_S_C_STO_QW, -1); + _bfd_vms_output_flush (abfd); + } + else { - /* All reloc checked. */ - if (sptr->size > 0) - { - /* Dump rest. */ - sto_imm (abfd, sptr, vaddr, section->index); - vaddr += sptr->size; - } - break; + _bfd_vms_output_begin (abfd, ETIR_S_C_STO_GBL, -1); + _bfd_vms_output_counted (abfd, hash); + _bfd_vms_output_flush (abfd); } } + else if (bfd_is_abs_section (sym->section)) + { + etir_output_check (abfd, section, curr_addr, 16); + _bfd_vms_output_begin (abfd, ETIR_S_C_STA_QW, -1); + _bfd_vms_output_quad (abfd, (uquad) sym->value); + _bfd_vms_output_flush (abfd); + _bfd_vms_output_begin (abfd, ETIR_S_C_STO_QW, -1); + _bfd_vms_output_flush (abfd); + } + else + { + etir_output_check (abfd, section, curr_addr, 32); + _bfd_vms_output_begin (abfd, ETIR_S_C_STA_PQ, -1); + _bfd_vms_output_long (abfd, (unsigned long) sec->index); + _bfd_vms_output_quad (abfd, (uquad) rptr->addend + + (uquad) sym->value); + _bfd_vms_output_flush (abfd); + _bfd_vms_output_begin (abfd, ETIR_S_C_STO_OFF, -1); + _bfd_vms_output_flush (abfd); + } + break; + + case ALPHA_R_HINT: + sto_imm (abfd, size, curr_data, curr_addr, + section->index, section->name); + break; + + case ALPHA_R_LINKAGE: + etir_output_check (abfd, section, curr_addr, 64); + _bfd_vms_output_begin (abfd, ETIR_S_C_STC_LP_PSB, -1); + _bfd_vms_output_long + (abfd, (unsigned long) PRIV (vms_linkage_index)); + PRIV (vms_linkage_index) += 2; + hash = _bfd_vms_length_hash_symbol + (abfd, sym->name, EOBJ_S_C_SYMSIZ); + _bfd_vms_output_counted (abfd, hash); + _bfd_vms_output_byte (abfd, 0); + _bfd_vms_output_flush (abfd); + break; + + case ALPHA_R_CODEADDR: + slen = strlen ((char *) sym->name); + hash = _bfd_vms_length_hash_symbol + (abfd, sym->name, EOBJ_S_C_SYMSIZ); + etir_output_check (abfd, section, curr_addr, slen); + _bfd_vms_output_begin (abfd, ETIR_S_C_STO_CA, -1); + _bfd_vms_output_counted (abfd, hash); + _bfd_vms_output_flush (abfd); + break; + + case ALPHA_R_NOP: + udata + = (struct evax_private_udata_struct *) rptr->sym_ptr_ptr; + etir_output_check (abfd, section, curr_addr, + 32 + 1 + strlen (udata->origname)); + _bfd_vms_output_begin (abfd, ETIR_S_C_STC_NOP_GBL, -1); + _bfd_vms_output_long (abfd, (unsigned long) udata->lkindex); + _bfd_vms_output_long + (abfd, (unsigned long) udata->enbsym->section->index); + _bfd_vms_output_quad (abfd, (uquad) rptr->address); + _bfd_vms_output_long (abfd, (unsigned long) 0x47ff041f); + _bfd_vms_output_long + (abfd, (unsigned long) udata->enbsym->section->index); + _bfd_vms_output_quad (abfd, (uquad) rptr->addend); + _bfd_vms_output_counted + (abfd, _bfd_vms_length_hash_symbol + (abfd, udata->origname, EOBJ_S_C_SYMSIZ)); + _bfd_vms_output_flush (abfd); + break; + + case ALPHA_R_BSR: + (*_bfd_error_handler) (_("Spurious ALPHA_R_BSR reloc")); + break; + + case ALPHA_R_LDA: + udata + = (struct evax_private_udata_struct *) rptr->sym_ptr_ptr; + etir_output_check (abfd, section, curr_addr, + 32 + 1 + strlen (udata->origname)); + _bfd_vms_output_begin (abfd, ETIR_S_C_STC_LDA_GBL, -1); + _bfd_vms_output_long + (abfd, (unsigned long) udata->lkindex + 1); + _bfd_vms_output_long + (abfd, (unsigned long) udata->enbsym->section->index); + _bfd_vms_output_quad (abfd, (uquad) rptr->address); + _bfd_vms_output_long (abfd, (unsigned long) 0x237B0000); + _bfd_vms_output_long + (abfd, (unsigned long) udata->bsym->section->index); + _bfd_vms_output_quad (abfd, (uquad) rptr->addend); + _bfd_vms_output_counted + (abfd, _bfd_vms_length_hash_symbol + (abfd, udata->origname, EOBJ_S_C_SYMSIZ)); + _bfd_vms_output_flush (abfd); + break; + + case ALPHA_R_BOH: + udata + = (struct evax_private_udata_struct *) rptr->sym_ptr_ptr; + etir_output_check (abfd, section, curr_addr, + 32 + 1 + strlen (udata->origname)); + _bfd_vms_output_begin (abfd, ETIR_S_C_STC_BOH_GBL, -1); + _bfd_vms_output_long (abfd, (unsigned long) udata->lkindex); + _bfd_vms_output_long + (abfd, (unsigned long) udata->enbsym->section->index); + _bfd_vms_output_quad (abfd, (uquad) rptr->address); + _bfd_vms_output_long (abfd, (unsigned long) 0xD3400000); + _bfd_vms_output_long + (abfd, (unsigned long) udata->enbsym->section->index); + _bfd_vms_output_quad (abfd, (uquad) rptr->addend); + _bfd_vms_output_counted + (abfd, _bfd_vms_length_hash_symbol + (abfd, udata->origname, EOBJ_S_C_SYMSIZ)); + _bfd_vms_output_flush (abfd); + break; + + default: + (*_bfd_error_handler) (_("Unhandled relocation %s"), + rptr->howto->name); + break; } - else + + curr_data += size; + curr_addr += size; + } /* End of relocs loop. */ + + if (!pass2_in_progress) + { + /* Output rest of section. */ + if (curr_addr > section->size) + (*_bfd_error_handler) (_("Size error in section %s"), + section->name); + size = section->size - curr_addr; + sto_imm (abfd, size, curr_data, curr_addr, + section->index, section->name); + curr_data += size; + curr_addr += size; + + if (pass2_needed) { - /* No relocs, just dump. */ - sto_imm (abfd, sptr, vaddr, section->index); - vaddr += sptr->size; + pass2_in_progress = 1; + goto new_pass; } - - sptr = sptr->next; } - - end_etir_record (abfd); } + + else /* (section->flags & SEC_RELOC) */ + sto_imm (abfd, section->size, section->contents, 0, + section->index, section->name); - section = section->next; + end_etir_record (abfd); } _bfd_vms_output_alignment (abfd, 2); return 0; } - -/* Write traceback data for bfd abfd. */ - -int -_bfd_vms_write_tbt (bfd * abfd ATTRIBUTE_UNUSED, - int objtype ATTRIBUTE_UNUSED) -{ -#if VMS_DEBUG - _bfd_vms_debug (2, "vms_write_tbt (%p, %d)\n", abfd, objtype); -#endif - - return 0; -} - -/* Write debug info for bfd abfd. */ - -int -_bfd_vms_write_dbg (bfd * abfd ATTRIBUTE_UNUSED, - int objtype ATTRIBUTE_UNUSED) -{ -#if VMS_DEBUG - _bfd_vms_debug (2, "vms_write_dbg (%p, objtype)\n", abfd, objtype); -#endif - - return 0; -} diff --git a/cegcc/src/binutils/bfd/vms.c b/cegcc/src/binutils/bfd/vms.c index 1944c1ee0..61f485ed6 100644 --- a/cegcc/src/binutils/bfd/vms.c +++ b/cegcc/src/binutils/bfd/vms.c @@ -1,7 +1,9 @@ /* vms.c -- BFD back-end for VAX (openVMS/VAX) and EVAX (openVMS/Alpha) files. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + + Main file. Written by Klaus K"ampf (kkaempf@rmi.de) @@ -20,6 +22,14 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifdef VMS +#include +#include +#include +#define RME$C_SETRFM 0x00000001 +#include +#endif + #include "sysdep.h" #include "bfd.h" #include "bfdlink.h" @@ -27,51 +37,148 @@ #include "vms.h" +static bfd_boolean vms_initialize (bfd *); +static bfd_boolean fill_section_ptr (struct bfd_hash_entry *, PTR); +static bfd_boolean vms_fixup_sections (bfd *); +static bfd_boolean copy_symbols (struct bfd_hash_entry *, PTR); +static bfd_reloc_status_type reloc_nil (bfd *, arelent *, asymbol *, PTR, + asection *, bfd *, char **); +static int vms_slurp_module (bfd *abfd); +static int vms_slurp_image (bfd *abfd); +static const struct bfd_target *vms_object_p (bfd *abfd); +static const struct bfd_target *vms_archive_p (bfd *abfd); +static bfd_boolean vms_mkobject (bfd *abfd); +static bfd_boolean vms_write_object_contents (bfd *abfd); +static void free_reloc_stream (bfd *abfd, asection *section, void *data); +static bfd_boolean vms_close_and_cleanup (bfd *abfd); +static bfd_boolean vms_bfd_free_cached_info (bfd *abfd); +static bfd_boolean vms_new_section_hook (bfd *abfd, asection *section); +static bfd_boolean vms_get_section_contents + (bfd *abfd, asection *section, PTR x1, file_ptr x2, bfd_size_type x3); +static bfd_boolean vms_get_section_contents_in_window + (bfd *abfd, asection *section, bfd_window *w, file_ptr offset, + bfd_size_type count); +static bfd_boolean vms_bfd_copy_private_bfd_data (bfd *src, bfd *dest); +static bfd_boolean vms_bfd_copy_private_section_data + (bfd *srcbfd, asection *srcsec, bfd *dstbfd, asection *dstsec); +static bfd_boolean vms_bfd_copy_private_symbol_data + (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); +static bfd_boolean vms_bfd_print_private_bfd_data (bfd *abfd, void *file); +static char *vms_core_file_failing_command (bfd *abfd); +static int vms_core_file_failing_signal (bfd *abfd); +static bfd_boolean vms_core_file_matches_executable_p (bfd *abfd, bfd *bbfd); +static bfd_boolean vms_slurp_armap (bfd *abfd); +static bfd_boolean vms_slurp_extended_name_table (bfd *abfd); +static bfd_boolean vms_construct_extended_name_table + (bfd *abfd, char **tabloc, bfd_size_type *tablen, const char **name); +static void vms_truncate_arname (bfd *abfd, const char *pathname, char *arhdr); +static bfd_boolean vms_write_armap + (bfd *arch, unsigned int elen, struct orl *map, unsigned int cnt, int idx); +static PTR vms_read_ar_hdr (bfd *abfd); +static bfd *vms_get_elt_at_index (bfd *abfd, symindex index); +static bfd *vms_openr_next_archived_file (bfd *arch, bfd *prev); +static bfd_boolean vms_update_armap_timestamp (bfd *abfd); +static int vms_generic_stat_arch_elt (bfd *, struct stat *); +static long vms_get_symtab_upper_bound (bfd *abfd); +static long vms_canonicalize_symtab (bfd *abfd, asymbol **symbols); +static void vms_print_symbol (bfd *abfd, PTR file, asymbol *symbol, + bfd_print_symbol_type how); +static void vms_get_symbol_info (bfd *abfd, asymbol *symbol, symbol_info *ret); +static bfd_boolean vms_bfd_is_local_label_name (bfd *abfd, const char *); +static alent *vms_get_lineno (bfd *abfd, asymbol *symbol); +static bfd_boolean vms_find_nearest_line + (bfd *abfd, asection *section, asymbol **symbols, bfd_vma offset, + const char **file, const char **func, unsigned int *line); +static asymbol *vms_bfd_make_debug_symbol (bfd *abfd, void *ptr, + unsigned long size); +static long vms_read_minisymbols (bfd *abfd, bfd_boolean dynamic, + PTR *minisymsp, unsigned int *sizep); +static asymbol *vms_minisymbol_to_symbol + (bfd *abfd, bfd_boolean dynamic, const PTR minisym, asymbol *sym); +static void alloc_reloc_stream (bfd *abfd, asection *section, + void *alloc_error); +static bfd_boolean vms_slurp_reloc_table (bfd *abfd, asection *section, + asymbol **symbols); +static long vms_get_reloc_upper_bound (bfd *abfd, asection *sect); +static long vms_canonicalize_reloc (bfd *abfd, asection *srcsec, + arelent **location, asymbol **symbols); +static const struct reloc_howto_struct *vms_bfd_reloc_type_lookup + (bfd *abfd, bfd_reloc_code_real_type code); +static bfd_boolean vms_set_arch_mach + (bfd *abfd, enum bfd_architecture arch, unsigned long mach); +static bfd_boolean vms_set_section_contents + (bfd *abfd, asection *section, const PTR location, file_ptr offset, + bfd_size_type count); +static int vms_sizeof_headers (bfd *abfd, + struct bfd_link_info *info ATTRIBUTE_UNUSED); +static bfd_byte *vms_bfd_get_relocated_section_contents + (bfd *abfd, struct bfd_link_info *link_info, + struct bfd_link_order *link_order, bfd_byte *data, + bfd_boolean relocatable, asymbol **symbols); +static bfd_boolean vms_bfd_relax_section + (bfd *abfd, asection *section, struct bfd_link_info *link_info, + bfd_boolean *again); +static bfd_boolean vms_bfd_gc_sections + (bfd *abfd, struct bfd_link_info *link_info); +static bfd_boolean vms_bfd_merge_sections + (bfd *abfd, struct bfd_link_info *link_info); +static struct bfd_link_hash_table *vms_bfd_link_hash_table_create (bfd *abfd); +static void vms_bfd_link_hash_table_free (struct bfd_link_hash_table *hash); +static bfd_boolean vms_bfd_link_add_symbols + (bfd *abfd, struct bfd_link_info *link_info); +static bfd_boolean vms_bfd_final_link (bfd *abfd, + struct bfd_link_info *link_info); +static bfd_boolean vms_bfd_link_split_section (bfd *abfd, asection *section); +static long vms_get_dynamic_symtab_upper_bound (bfd *abfd); +static long vms_canonicalize_dynamic_symtab (bfd *abfd, asymbol **symbols); +static long vms_get_dynamic_reloc_upper_bound (bfd *abfd); +static long vms_canonicalize_dynamic_reloc + (bfd *abfd, arelent **arel, asymbol **symbols); +static bfd_boolean vms_bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd); +static bfd_boolean vms_bfd_set_private_flags (bfd *abfd, flagword flags); + #define vms_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) #define vms_make_empty_symbol _bfd_generic_make_empty_symbol #define vms_bfd_link_just_syms _bfd_generic_link_just_syms #define vms_bfd_is_group_section bfd_generic_is_group_section #define vms_bfd_discard_group bfd_generic_discard_group #define vms_section_already_linked _bfd_generic_section_already_linked +#define vms_bfd_define_common_symbol bfd_generic_define_common_symbol #define vms_bfd_copy_private_header_data _bfd_generic_bfd_copy_private_header_data #define vms_get_synthetic_symtab _bfd_nodynamic_get_synthetic_symtab -static unsigned int priv_section_count; + +#ifdef VMS_DEBUG +/* Cause debug info to be emitted for the structure. */ +struct vms_private_data_struct _vms_private_data_struct_dummy; +struct vms_section_data_struct _vms_section_data_struct_dummy; +#endif + extern const bfd_target vms_vax_vec; extern const bfd_target vms_alpha_vec; - -/* Initialize private data. */ +/* Initialize private data */ static bfd_boolean vms_initialize (bfd * abfd) { - int i; bfd_size_type amt; bfd_set_start_address (abfd, (bfd_vma) -1); amt = sizeof (struct vms_private_data_struct); - abfd->tdata.any = bfd_alloc (abfd, amt); + abfd->tdata.any = bfd_zalloc (abfd, amt); if (abfd->tdata.any == NULL) return FALSE; -#ifdef __ALPHA - PRIV (is_vax) = FALSE; -#else - PRIV (is_vax) = TRUE; -#endif - PRIV (vms_buf) = NULL; - PRIV (buf_size) = 0; - PRIV (rec_length) = 0; + if (bfd_get_flavour (abfd) == bfd_target_ovax_flavour) + PRIV (is_vax) = TRUE; + PRIV (file_format) = FF_UNKNOWN; - PRIV (fixup_done) = FALSE; - PRIV (sections) = NULL; amt = sizeof (struct stack_struct) * STACKSIZE; PRIV (stack) = bfd_alloc (abfd, amt); if (PRIV (stack) == NULL) goto error_ret1; - PRIV (stackptr) = 0; amt = sizeof (struct bfd_hash_table); PRIV (vms_symbol_table) = bfd_alloc (abfd, amt); @@ -82,24 +189,12 @@ vms_initialize (bfd * abfd) sizeof (vms_symbol_entry))) goto error_ret1; - amt = sizeof (struct location_struct) * LOCATION_SAVE_SIZE; - PRIV (location_stack) = bfd_alloc (abfd, amt); - if (PRIV (location_stack) == NULL) - goto error_ret2; - - for (i = 0; i < VMS_SECTION_COUNT; i++) - PRIV (vms_section_table)[i] = NULL; - amt = MAX_OUTREC_SIZE; PRIV (output_buf) = bfd_alloc (abfd, amt); if (PRIV (output_buf) == NULL) goto error_ret2; - PRIV (push_level) = 0; - PRIV (pushed_size) = 0; PRIV (length_pos) = 2; - PRIV (output_size) = 0; - PRIV (output_alignment) = 1; return TRUE; @@ -111,154 +206,127 @@ vms_initialize (bfd * abfd) return FALSE; } -/* Fill symbol->section with section ptr +struct pair +{ + unsigned int section_count; + asection **sections; +}; + +/* Fill symbol->section with section pointer. + symbol->section is filled with the section index for defined symbols - during reading the GSD/EGSD section. But we need the pointer to the + during reading the GSD/EGSD section. But we need the pointer to the bfd section later. - It has the correct value for referenced (undefined section) symbols + It has the correct value for referenced (undefined section) symbols. - called from bfd_hash_traverse in vms_fixup_sections. */ + Called from bfd_hash_traverse in vms_fixup_sections. */ static bfd_boolean -fill_section_ptr (struct bfd_hash_entry * entry, void * sections) +fill_section_ptr (struct bfd_hash_entry *entry, void *sections) { - asection *sec; - asymbol *sym; - - sym = ((vms_symbol_entry *) entry)->symbol; - sec = sym->section; + asymbol *sym = ((vms_symbol_entry *)entry)->symbol; + struct pair *data = (struct pair *)sections; + unsigned long sec = (unsigned long)sym->section; #if VMS_DEBUG vms_debug (6, "fill_section_ptr: sym %p, sec %p\n", sym, sec); #endif - /* Fill forward references (these contain section number, not section ptr). */ - if ((unsigned int) (size_t) sec < priv_section_count) - sec = ((vms_symbol_entry *) entry)->symbol->section = - ((asection **) sections)[(unsigned int) (size_t) sec]; - - if (strcmp (sym->name, sec->name) == 0) - sym->flags |= BSF_SECTION_SYM; + if (sec < data->section_count) + { + sym->section = data->sections[sec]; + if (strcmp (sym->name, sym->section->name) == 0) + sym->flags |= BSF_SECTION_SYM; + } + else if (sec == (unsigned long)-1) + sym->section = &bfd_und_section; + return TRUE; } -/* Fixup sections - set up all pointers and arrays, counters and sizes are fixed now - - we build a private sections vector for easy access since sections - are always referenced by an index number. - - alloc PRIV(sections) according to abfd->section_count - copy abfd->sections to PRIV(sections). */ - +/* Fixup section pointers in symbols. */ static bfd_boolean vms_fixup_sections (bfd * abfd) { + struct pair data; + if (PRIV (fixup_done)) return TRUE; - /* Traverse symbol table and fill in all section pointers. */ - - /* Can't provide section count as argument to fill_section_ptr(). */ - priv_section_count = PRIV (section_count); - bfd_hash_traverse (PRIV (vms_symbol_table), fill_section_ptr, (PRIV (sections))); + data.section_count = PRIV (section_count); + data.sections = PRIV (sections); + bfd_hash_traverse (PRIV (vms_symbol_table), fill_section_ptr, &data); PRIV (fixup_done) = TRUE; - return TRUE; } - -/* Check the format for a file being read. - Return a (bfd_target *) if it's an object file or zero if not. */ -static const struct bfd_target * -vms_object_p (bfd * abfd) +/* Slurp an ordered set of VMS object records. */ +int +_bfd_vms_slurp_object_records (bfd * abfd) { - int err = 0; - int prev_type; - const struct bfd_target *target_vector = NULL; - const bfd_arch_info_type *arch = NULL; - void * tdata_save = abfd->tdata.any; - bfd_vma saddr_save = bfd_get_start_address (abfd); - -#if VMS_DEBUG - vms_debug (1, "vms_object_p (%p)\n", abfd); -#endif - - if (!vms_initialize (abfd)) - goto error_ret; - - if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET)) - goto err_wrong_format; - - prev_type = -1; + int err, new_type, type = -1; do { #if VMS_DEBUG vms_debug (7, "reading at %08lx\n", bfd_tell (abfd)); #endif - if (_bfd_vms_next_record (abfd) < 0) + new_type = _bfd_vms_get_object_record (abfd); + if (new_type < 0) { #if VMS_DEBUG vms_debug (2, "next_record failed\n"); #endif - goto err_wrong_format; + return -1; } - if ((prev_type == EOBJ_S_C_EGSD) - && (PRIV (rec_type) != EOBJ_S_C_EGSD)) + if (type == EOBJ_S_C_EGSD && new_type != EOBJ_S_C_EGSD) { if (! vms_fixup_sections (abfd)) { #if VMS_DEBUG vms_debug (2, "vms_fixup_sections failed\n"); #endif - goto err_wrong_format; + return -1; } } - prev_type = PRIV (rec_type); - - if (target_vector == NULL) - { - if (prev_type <= OBJ_S_C_MAXRECTYP) - target_vector = & vms_vax_vec; - else - target_vector = & vms_alpha_vec; - } + type = new_type; - switch (prev_type) + switch (type) { case OBJ_S_C_HDR: case EOBJ_S_C_EMH: - err = _bfd_vms_slurp_hdr (abfd, prev_type); + err = _bfd_vms_slurp_hdr (abfd, type); break; case OBJ_S_C_EOM: case OBJ_S_C_EOMW: case EOBJ_S_C_EEOM: - err = _bfd_vms_slurp_eom (abfd, prev_type); + err = _bfd_vms_slurp_eom (abfd, type); break; case OBJ_S_C_GSD: case EOBJ_S_C_EGSD: - err = _bfd_vms_slurp_gsd (abfd, prev_type); + err = _bfd_vms_slurp_gsd (abfd, type); break; case OBJ_S_C_TIR: case EOBJ_S_C_ETIR: - err = _bfd_vms_slurp_tir (abfd, prev_type); + err = _bfd_vms_slurp_tir (abfd, type); break; case OBJ_S_C_DBG: case EOBJ_S_C_EDBG: - err = _bfd_vms_slurp_dbg (abfd, prev_type); + err = _bfd_vms_slurp_dbg (abfd, type); + PRIV (dst_ptr_end) = PRIV (image_ptr); break; case OBJ_S_C_TBT: case EOBJ_S_C_ETBT: - err = _bfd_vms_slurp_tbt (abfd, prev_type); + err = _bfd_vms_slurp_tbt (abfd, type); + PRIV (dst_ptr_end) = PRIV (image_ptr); break; case OBJ_S_C_LNK: - err = _bfd_vms_slurp_lnk (abfd, prev_type); + err = _bfd_vms_slurp_lnk (abfd, type); break; default: err = -1; @@ -266,14 +334,105 @@ vms_object_p (bfd * abfd) if (err != 0) { #if VMS_DEBUG - vms_debug (2, "slurp type %d failed with %d\n", prev_type, err); + vms_debug (2, "slurp type %d failed with %d\n", type, err); #endif - goto err_wrong_format; + return err; } } - while ((prev_type != EOBJ_S_C_EEOM) && (prev_type != OBJ_S_C_EOM) && (prev_type != OBJ_S_C_EOMW)); + while (type != EOBJ_S_C_EEOM && type != OBJ_S_C_EOM && type != OBJ_S_C_EOMW); + + return 0; +} + +/* Slurp a VMS module and return an error status. */ + +static int +vms_slurp_module (bfd *abfd) +{ + int type, err; + + if (PRIV (is_vax)) + type = PRIV (vms_rec)[0]; + else + type = bfd_getl16 (PRIV (vms_rec)); + + err = _bfd_vms_slurp_hdr (abfd, type); + if (err != 0) + { + bfd_set_error (bfd_error_wrong_format); + return err; + } + + return _bfd_vms_slurp_object_records (abfd); +} + +/* Slurp a VMS image and return an error status. */ + +static int +vms_slurp_image (bfd *abfd) +{ + unsigned int isd_offset, ihs_offset; + int err; + + err = _bfd_vms_slurp_ihd (abfd, &isd_offset, &ihs_offset); + if (err != 0) + { + bfd_set_error (bfd_error_wrong_format); + return err; + } - if (target_vector == & vms_vax_vec) + err = _bfd_vms_slurp_isd (abfd, isd_offset); + if (err != 0) + { + bfd_set_error (bfd_error_wrong_format); + return err; + } + + return _bfd_vms_slurp_ihs (abfd, ihs_offset); +} + +/* Check the format for a file being read. + Return a (bfd_target *) if it's an object file or zero if not. */ + +static const struct bfd_target * +vms_object_p (bfd *abfd) +{ + const struct bfd_target *target_vector; + const bfd_arch_info_type *arch; + PTR tdata_save = abfd->tdata.any; + bfd_vma saddr_save = bfd_get_start_address (abfd); + int err = 0; + +#if VMS_DEBUG + vms_debug (1, "vms_object_p(%p)\n", abfd); +#endif + + if (!vms_initialize (abfd)) + goto error_ret; + + if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET)) + goto err_wrong_format; + + switch (_bfd_vms_get_first_record (abfd)) + { + case FT_UNKNOWN: + default: + err = -1; + break; + + case FT_MODULE: + err = vms_slurp_module (abfd); + break; + + case FT_IMAGE: + err = vms_slurp_image (abfd); + break; + } + + if (err != 0) + goto err_wrong_format; + + if (PRIV (is_vax)) { if (! vms_fixup_sections (abfd)) { @@ -283,38 +442,29 @@ vms_object_p (bfd * abfd) goto err_wrong_format; } - /* Set arch_info to vax. */ - + target_vector = &vms_vax_vec; arch = bfd_scan_arch ("vax"); - PRIV (is_vax) = TRUE; + #if VMS_DEBUG vms_debug (2, "arch is vax\n"); #endif } - else if (target_vector == & vms_alpha_vec) + else { /* Set arch_info to alpha. */ - + target_vector = &vms_alpha_vec; arch = bfd_scan_arch ("alpha"); - PRIV (is_vax) = FALSE; #if VMS_DEBUG vms_debug (2, "arch is alpha\n"); #endif } - if (arch == NULL) - { -#if VMS_DEBUG - vms_debug (2, "arch not found\n"); -#endif - goto err_wrong_format; - } abfd->arch_info = arch; - return target_vector; err_wrong_format: bfd_set_error (bfd_error_wrong_format); + error_ret: if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL) bfd_release (abfd, abfd->tdata.any); @@ -341,6 +491,8 @@ vms_archive_p (bfd * abfd ATTRIBUTE_UNUSED) static bfd_boolean vms_mkobject (bfd * abfd) { + const bfd_arch_info_type *arch; + #if VMS_DEBUG vms_debug (1, "vms_mkobject (%p)\n", abfd); #endif @@ -348,20 +500,18 @@ vms_mkobject (bfd * abfd) if (!vms_initialize (abfd)) return FALSE; - { -#ifdef __VAX - const bfd_arch_info_type *arch = bfd_scan_arch ("vax"); -#else - const bfd_arch_info_type *arch = bfd_scan_arch ("alpha"); -#endif - if (arch == NULL) - { - bfd_set_error (bfd_error_wrong_format); - return FALSE; - } - abfd->arch_info = arch; - } + if (PRIV (is_vax)) + arch = bfd_scan_arch ("vax"); + else + arch = bfd_scan_arch ("alpha"); + + if (arch == 0) + { + bfd_set_error(bfd_error_wrong_format); + return FALSE; + } + abfd->arch_info = arch; return TRUE; } @@ -420,6 +570,62 @@ vms_write_object_contents (bfd * abfd) /* 4.1, generic. */ +/* Free the reloc buffer for the specified section. */ + +static void +free_reloc_stream (bfd *abfd ATTRIBUTE_UNUSED, asection *section, + void *data ATTRIBUTE_UNUSED) +{ + if (vms_section_data (section)->reloc_stream) + free (vms_section_data (section)->reloc_stream); +} + +#ifdef VMS +/* Convert the file to variable record length format. This is done + using undocumented system call sys$modify(). + Pure VMS version. */ + +static void +vms_convert_to_var (char *vms_filename) +{ + struct FAB fab = cc$rms_fab; + + fab.fab$l_fna = vms_filename; + fab.fab$b_fns = strlen (vms_filename); + fab.fab$b_fac = FAB$M_PUT; + fab.fab$l_fop = FAB$M_ESC; + fab.fab$l_ctx = RME$C_SETRFM; + + sys$open (&fab); + + fab.fab$b_rfm = FAB$C_VAR; + + sys$modify (&fab); + sys$close (&fab); +} + +static int +vms_convert_to_var_1 (char *filename, int type) +{ + if (type != DECC$K_FILE) + return FALSE; + vms_convert_to_var (filename); + return TRUE; +} + +/* Convert the file to variable record length format. This is done + using undocumented system call sys$modify(). + Unix filename version. */ + +static int +vms_convert_to_var_unix_filename (const char *unix_filename) +{ + if (decc$to_vms (unix_filename, &vms_convert_to_var_1, 0, 1) != 1) + return FALSE; + return TRUE; +} +#endif /* VMS */ + /* Called when the BFD is being closed to do any necessary cleanup. */ static bfd_boolean @@ -428,8 +634,7 @@ vms_close_and_cleanup (bfd * abfd) #if VMS_DEBUG vms_debug (1, "vms_close_and_cleanup (%p)\n", abfd); #endif - if (abfd == NULL - || abfd->tdata.any == NULL) + if (abfd == NULL || abfd->tdata.any == NULL) return TRUE; if (PRIV (vms_buf) != NULL) @@ -441,9 +646,23 @@ vms_close_and_cleanup (bfd * abfd) if (PRIV (vms_symbol_table)) bfd_hash_table_free (PRIV (vms_symbol_table)); + bfd_map_over_sections (abfd, free_reloc_stream, NULL); + bfd_release (abfd, abfd->tdata.any); abfd->tdata.any = NULL; +#ifdef VMS + if (abfd->direction == write_direction) + { + /* Last step on VMS is to convert the file to variable record length + format. */ + if (bfd_cache_close (abfd) != TRUE) + return FALSE; + if (vms_convert_to_var_unix_filename (abfd->filename) != TRUE) + return FALSE; + } +#endif + return TRUE; } @@ -463,6 +682,8 @@ vms_bfd_free_cached_info (bfd * abfd ATTRIBUTE_UNUSED) static bfd_boolean vms_new_section_hook (bfd * abfd, asection *section) { + bfd_size_type amt; + /* Count hasn't been incremented yet. */ unsigned int section_count = abfd->section_count + 1; @@ -470,7 +691,8 @@ vms_new_section_hook (bfd * abfd, asection *section) vms_debug (1, "vms_new_section_hook (%p, [%d]%s), count %d\n", abfd, section->index, section->name, section_count); #endif - bfd_set_section_alignment (abfd, section, 4); + + bfd_set_section_alignment (abfd, section, 0); if (section_count > PRIV (section_count)) { @@ -481,14 +703,22 @@ vms_new_section_hook (bfd * abfd, asection *section) return FALSE; PRIV (section_count) = section_count; } + #if VMS_DEBUG vms_debug (6, "section_count: %d\n", PRIV (section_count)); #endif + PRIV (sections)[section->index] = section; + #if VMS_DEBUG vms_debug (7, "%d: %s\n", section->index, section->name); #endif + amt = sizeof (struct vms_section_data_struct); + section->used_by_bfd = (PTR) bfd_zalloc (abfd, amt); + if (section->used_by_bfd == NULL) + return FALSE; + return _bfd_generic_new_section_hook (abfd, section); } @@ -503,13 +733,42 @@ vms_get_section_contents (bfd * abfd ATTRIBUTE_UNUSED, file_ptr offset ATTRIBUTE_UNUSED, bfd_size_type buf_size ATTRIBUTE_UNUSED) { + bfd_size_type size = section->size; + #if VMS_DEBUG vms_debug (1, "vms_get_section_contents (%p, %s, %p, off %ld, size %d)\n", abfd, section->name, buf, offset, (int)buf_size); #endif - /* Shouldn't be called, since all sections are IN_MEMORY. */ - return FALSE; + if (section->contents) + abort (); + + section->contents = (unsigned char *) bfd_malloc (size); + + if (section->contents == NULL) + { + bfd_set_error (bfd_error_no_memory); + return FALSE; + } + + if (bfd_seek (abfd, section->filepos, SEEK_SET)) + { + bfd_set_error (bfd_error_file_truncated); + return FALSE; + } + + if (bfd_bread (section->contents, size, abfd) != size) + { + bfd_set_error (bfd_error_file_truncated); + return FALSE; + } + + section->flags |= SEC_IN_MEMORY; + + if (buf) + memcpy (buf, section->contents + offset, (size_t) buf_size); + + return TRUE; } /* Read the contents of a section. @@ -703,7 +962,6 @@ vms_truncate_arname (bfd * abfd ATTRIBUTE_UNUSED, #if VMS_DEBUG vms_debug (1, "vms_truncate_arname (%p, %s, %s)\n", abfd, pathname, arhdr); #endif - return; } /* ??? write archive map. */ @@ -906,7 +1164,9 @@ vms_get_symbol_info (bfd * abfd ATTRIBUTE_UNUSED, if (ret == NULL) return; - if (bfd_is_com_section (sec)) + if (sec == 0) + ret->type = 'U'; + else if (bfd_is_com_section (sec)) ret->type = 'C'; else if (bfd_is_abs_section (sec)) ret->type = 'A'; @@ -972,7 +1232,7 @@ vms_find_nearest_line (bfd * abfd ATTRIBUTE_UNUSED, vms_debug (1, "vms_find_nearest_line (%p, %s, %p, %ld, , , )\n", abfd, section->name, symbols, (long int)offset); #endif - return FALSE; + return _bfd_vms_find_nearest_dst_line (abfd, section, symbols, offset, file, func, line); } static bfd_boolean @@ -1037,36 +1297,160 @@ vms_minisymbol_to_symbol (bfd * abfd, /* Part 4.6, relocations. */ -/* Return the number of bytes required to store the relocation information - associated with section sect attached to bfd abfd. - If an error occurs, return -1. */ +/* Allocate the reloc buffer for the specified section. */ -static long -vms_get_reloc_upper_bound (bfd * abfd ATTRIBUTE_UNUSED, - asection *section ATTRIBUTE_UNUSED) +static void +alloc_reloc_stream (bfd *abfd ATTRIBUTE_UNUSED, asection *section, + void *alloc_error) { + unsigned char *ptr; + + /* If there were no relocations, there is nothing to do. */ + if (section->reloc_count == 0) + return; + + ptr = bfd_malloc (vms_section_data (section)->reloc_size); + if (ptr == NULL) + { + *(bfd_boolean *)alloc_error = TRUE; + return; + } + + vms_section_data (section)->reloc_stream = ptr; +} + +/* Read in the relocs for the specified section and internalize them. + + The implementation is loosely based on the SOM code and made up + of 3 distinct phases: + + 1. When the VMS object is opened and parsed, the number and the size + of the relocations are computed for all sections. This makes it + possible to know upfront both which sections have no relocs and + the size of the reloc buffers for the other sections, at virtually + no cost for consumers that don't care about relocs at all. + + 2. When vms_slurp_reloc_table is invoked for the first time on a section + with relocs, the object is traversed and all the reloc information + is saved in per-section reloc buffers. It would be very inefficient + to scan the whole file on each invocation, so we slurp for all the + sections at once. + + 3. On subsequent invocations of vms_slurp_reloc_table, the relocs for the + specified section are fetched from the buffer, decoded and internalized. + The buffer is then freed since the internalized relocs are attached to + the section, turning additional invocations of vms_slurp_reloc_table + on the same section into no-ops. + + Since VMS objects have very few sections, it could be profitable to merge + phase #2 and phase #3, i.e. to decode and internalize the relocs for all + the sections at once. The current implementation is more elegant. */ + +static bfd_boolean +vms_slurp_reloc_table (bfd *abfd, asection *section, asymbol **symbols) +{ + arelent *internal_relocs; + bfd_size_type amt; + int err; + + /* If there were no relocations, there is nothing to do. */ + if (section->reloc_count == 0) + return TRUE; + + /* Return saved information about the relocations if it is available. */ + if (section->relocation != NULL) + return TRUE; + + /* If the relocation stream has not been slurped, do it now. */ + if (vms_section_data (section)->reloc_stream == NULL) + { + bfd_boolean alloc_error = FALSE; + int type; + + /* Size the reloc buffer for each section. */ + bfd_map_over_sections (abfd, alloc_reloc_stream, &alloc_error); + if (alloc_error) + return FALSE; + + if (bfd_seek (abfd, 0, SEEK_SET) != 0) + return FALSE; + + /* Reset section pointer. */ + PRIV (image_section) = NULL; + + do + { + type = _bfd_vms_get_object_record (abfd); + if (type != EOBJ_S_C_ETIR + && type != EOBJ_S_C_EDBG + && type != EOBJ_S_C_ETBT) + continue; + err = _bfd_vms_slurp_relocs (abfd); + if (err != 0) + { #if VMS_DEBUG - vms_debug (1, "vms_get_reloc_upper_bound (%p, %s)\n", abfd, section->name); + vms_debug (2, "slurp relocs failed with %d\n", err); #endif - return -1L; + return FALSE; + } + } + while (type != EOBJ_S_C_EEOM); + } + + amt = section->reloc_count * sizeof (arelent); + internal_relocs = (arelent *) bfd_zalloc (abfd, amt); + if (internal_relocs == NULL) + return FALSE; + + /* Decode and internalize the relocations. */ + err = _bfd_vms_decode_relocs (abfd, internal_relocs, section, symbols); + if (err != 0) + { +#if VMS_DEBUG + vms_debug (2, "decode relocs failed with %d\n", err); +#endif + return FALSE; + } + + /* We're done with the external relocations. Free them. */ + free (vms_section_data (section)->reloc_stream); + vms_section_data (section)->reloc_stream = NULL; + + /* Save our results and return success. */ + section->relocation = internal_relocs; + return TRUE; } -/* Call the back end associated with the open BFD abfd and translate the - external form of the relocation information attached to sec into the - internal canonical form. Place the table into memory at loc, which has - been preallocated, usually by a call to bfd_get_reloc_upper_bound. - Returns the number of relocs, or -1 on error. */ +/* Return the number of bytes required to store the relocation + information associated with the given section. */ static long -vms_canonicalize_reloc (bfd * abfd ATTRIBUTE_UNUSED, - asection *section ATTRIBUTE_UNUSED, - arelent **location ATTRIBUTE_UNUSED, - asymbol **symbols ATTRIBUTE_UNUSED) +vms_get_reloc_upper_bound (bfd *abfd ATTRIBUTE_UNUSED, asection *section) { -#if VMS_DEBUG - vms_debug (1, "vms_canonicalize_reloc (%p, %s, , )\n", abfd, section->name); -#endif - return FALSE; + return (section->reloc_count + 1) * sizeof (arelent *); +} + +/* Convert relocations from VMS (external) form into BFD internal + form. Return the number of relocations. */ + +static long +vms_canonicalize_reloc (bfd *abfd, asection *section, arelent **relptr, + asymbol **symbols) +{ + arelent *tblptr; + int count; + + if (! vms_slurp_reloc_table (abfd, section, symbols)) + return -1; + + count = section->reloc_count; + tblptr = section->relocation; + + while (count--) + *relptr++ = tblptr++; + + *relptr = (arelent *) NULL; + return section->reloc_count; } /* This is just copied from ecoff-alpha, needs to be fixed probably. */ @@ -1317,6 +1701,64 @@ static reloc_howto_type alpha_howto_table[] = 0xffffffff, /* Dest mask. */ FALSE), /* PC rel offset. */ + HOWTO (ALPHA_R_NOP, /* Type. */ + 0, /* Rightshift. */ + 3, /* Size (0 = byte, 1 = short, 2 = long). */ + 0, /* Bitsize. */ + /* The following value must match that of ALPHA_R_BSR/ALPHA_R_BOH + because the calculations for the 3 relocations are the same. + See B.4.5.2 of the OpenVMS Linker Utility Manual. */ + TRUE, /* PC relative. */ + 0, /* Bitpos. */ + complain_overflow_dont,/* Complain_on_overflow. */ + reloc_nil, /* Special_function. */ + "NOP", /* Name. */ + FALSE, /* Partial_inplace. */ + 0xffffffff, /* Source mask. */ + 0xffffffff, /* Dest mask. */ + FALSE), /* PC rel offset. */ + + HOWTO (ALPHA_R_BSR, /* Type. */ + 0, /* Rightshift. */ + 3, /* Size (0 = byte, 1 = short, 2 = long). */ + 0, /* Bitsize. */ + TRUE, /* PC relative. */ + 0, /* Bitpos. */ + complain_overflow_dont,/* Complain_on_overflow. */ + reloc_nil, /* Special_function. */ + "BSR", /* Name. */ + FALSE, /* Partial_inplace. */ + 0xffffffff, /* Source mask. */ + 0xffffffff, /* Dest mask. */ + FALSE), /* PC rel offset. */ + + HOWTO (ALPHA_R_LDA, /* Type. */ + 0, /* Rightshift. */ + 3, /* Size (0 = byte, 1 = short, 2 = long). */ + 0, /* Bitsize. */ + FALSE, /* PC relative. */ + 0, /* Bitpos. */ + complain_overflow_dont,/* Complain_on_overflow. */ + reloc_nil, /* Special_function. */ + "LDA", /* Name. */ + FALSE, /* Partial_inplace. */ + 0xffffffff, /* Source mask. */ + 0xffffffff, /* Dest mask. */ + FALSE), /* PC rel offset. */ + + HOWTO (ALPHA_R_BOH, /* Type. */ + 0, /* Rightshift. */ + 3, /* Size (0 = byte, 1 = short, 2 = long, 3 = nil). */ + 0, /* Bitsize. */ + TRUE, /* PC relative. */ + 0, /* Bitpos. */ + complain_overflow_dont,/* Complain_on_overflow. */ + reloc_nil, /* Special_function. */ + "BOH", /* Name. */ + FALSE, /* Partial_inplace. */ + 0xffffffff, /* Source mask. */ + 0xffffffff, /* Dest mask. */ + FALSE), /* PC rel offset. */ }; /* Return a pointer to a howto structure which, when invoked, will perform @@ -1345,6 +1787,10 @@ vms_bfd_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, case BFD_RELOC_64_PCREL: alpha_type = ALPHA_R_SREL64; break; case BFD_RELOC_ALPHA_LINKAGE: alpha_type = ALPHA_R_LINKAGE; break; case BFD_RELOC_ALPHA_CODEADDR: alpha_type = ALPHA_R_CODEADDR; break; + case BFD_RELOC_ALPHA_NOP: alpha_type = ALPHA_R_NOP; break; + case BFD_RELOC_ALPHA_BSR: alpha_type = ALPHA_R_BSR; break; + case BFD_RELOC_ALPHA_LDA: alpha_type = ALPHA_R_LDA; break; + case BFD_RELOC_ALPHA_BOH: alpha_type = ALPHA_R_BOH; break; default: (*_bfd_error_handler) ("reloc (%d) is *UNKNOWN*", code); return NULL; @@ -1385,14 +1831,18 @@ vms_set_arch_mach (bfd * abfd, #if VMS_DEBUG vms_debug (1, "vms_set_arch_mach (%p, %d, %ld)\n", abfd, arch, mach); #endif - abfd->arch_info = bfd_scan_arch ("alpha"); - return TRUE; + if (arch != bfd_arch_alpha + && arch != bfd_arch_vax + && arch != bfd_arch_unknown) + return FALSE; + + return bfd_default_set_arch_mach (abfd, arch, mach); } /* Sets the contents of the section section in BFD abfd to the data starting - in memory at data. The data is written to the output section starting at - offset offset for count bytes. + in memory at LOCATION. The data is written to the output section starting + at offset offset for count bytes. Normally TRUE is returned, else FALSE. Possible error returns are: o bfd_error_no_contents - The output section does not have the @@ -1411,7 +1861,16 @@ vms_set_section_contents (bfd * abfd, abfd, section->name, location, (long int)offset, (int)count); vms_debug (2, "size %d\n", (int) section->size); #endif - return _bfd_save_vms_section (abfd, section, location, offset, count); + if (count == (bfd_size_type)0) + return TRUE; + + if (section->contents == NULL) + section->contents = bfd_alloc (abfd, section->size); + if (section->contents == NULL) + return FALSE; + + memcpy (section->contents + offset, location, (size_t) count); + return TRUE; } /* Part 4.8, linker. */ @@ -1454,6 +1913,10 @@ vms_bfd_relax_section (bfd * abfd ATTRIBUTE_UNUSED, struct bfd_link_info *link_info ATTRIBUTE_UNUSED, bfd_boolean *again ATTRIBUTE_UNUSED) { + if (link_info->relocatable) + (*link_info->callbacks->einfo) + (_("%P%F: --relax and -r may not be used together\n")); + #if VMS_DEBUG vms_debug (1, "vms_bfd_relax_section (%p, %s, %p, )\n", abfd, section->name, link_info); @@ -1550,7 +2013,7 @@ vms_get_dynamic_symtab_upper_bound (bfd * abfd ATTRIBUTE_UNUSED) #if VMS_DEBUG vms_debug (1, "vms_get_dynamic_symtab_upper_bound (%p)\n", abfd); #endif - return 0; + return 0L; } static bfd_boolean @@ -1606,14 +2069,14 @@ const bfd_target vms_alpha_vec = BFD_ENDIAN_LITTLE, /* Data byte order is little. */ BFD_ENDIAN_LITTLE, /* Header byte order is little. */ - (HAS_RELOC | HAS_SYMS + (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED), /* Object flags. */ (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY | SEC_CODE | SEC_DATA | SEC_HAS_CONTENTS | SEC_IN_MEMORY), /* Sect flags. */ - 0, /* Symbol_leading_char. */ - ' ', /* AR_pad_char. */ - 15, /* AR_max_namelen. */ + 0, /* symbol_leading_char. */ + ' ', /* ar_pad_char. */ + 15, /* ar_max_namelen. */ bfd_getl64, bfd_getl_signed_64, bfd_putl64, bfd_getl32, bfd_getl_signed_32, bfd_putl32, bfd_getl16, bfd_getl_signed_16, bfd_putl16, @@ -1640,7 +2103,7 @@ const bfd_target vms_alpha_vec = NULL, - NULL + (PTR) 0 }; const bfd_target vms_vax_vec = @@ -1657,15 +2120,15 @@ const bfd_target vms_vax_vec = (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY | SEC_CODE | SEC_DATA | SEC_HAS_CONTENTS | SEC_IN_MEMORY), /* Sect flags. */ - 0, /* Symbol_leading_char. */ - ' ', /* AR_pad_char. */ - 15, /* AR_max_namelen. */ + 0, /* symbol_leading_char */ + ' ', /* ar_pad_char */ + 15, /* ar_max_namelen */ bfd_getl64, bfd_getl_signed_64, bfd_putl64, bfd_getl32, bfd_getl_signed_32, bfd_putl32, bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */ bfd_getl64, bfd_getl_signed_64, bfd_putl64, bfd_getl32, bfd_getl_signed_32, bfd_putl32, - bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */ + bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Hdrs. */ {_bfd_dummy_target, vms_object_p, /* bfd_check_format. */ vms_archive_p, _bfd_dummy_target}, @@ -1686,5 +2149,5 @@ const bfd_target vms_vax_vec = NULL, - NULL + (PTR) 0 }; diff --git a/cegcc/src/binutils/bfd/vms.h b/cegcc/src/binutils/bfd/vms.h index 223554086..0d6e21557 100644 --- a/cegcc/src/binutils/bfd/vms.h +++ b/cegcc/src/binutils/bfd/vms.h @@ -1,6 +1,8 @@ /* vms.h -- Header file for VMS (Alpha and Vax) support. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007 - Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, + 2008, 2009 Free Software Foundation, Inc. + + Main header file. Written by Klaus K"ampf (kkaempf@rmi.de) @@ -25,9 +27,12 @@ #ifndef VMS_H #define VMS_H -/* Constants starting with 'Exxx_' are for openVMS/Alpha (EVAX object language) */ +/* Constants starting with 'Exxx_' are for openVMS/Alpha (EVAX object + language). */ + +#define VMS_BLOCK_SIZE 512 -/* VMS Text, information and relocation record (TIR/ETIR) definitions. */ +/* VMS Text Information and Relocation Records (TIR/ETIR). */ #define TIR_S_C_STA_GBL 0 #define TIR_S_C_STA_SB 1 @@ -107,7 +112,7 @@ #define ETIR_S_C_STA_GBL 0 /* Stack global symbol value. */ #define ETIR_S_C_STA_LW 1 /* Stack longword. */ #define ETIR_S_C_STA_QW 2 /* Stack quadword. */ -#define ETIR_S_C_STA_PQ 3 /* Stack psect base plus quadword offset. */ +#define ETIR_S_C_STA_PQ 3 /* Stack psect base + quadword off. */ #define ETIR_S_C_STA_LI 4 /* Stack literal. */ #define ETIR_S_C_STA_MOD 5 /* Stack module. */ #define ETIR_S_C_STA_CKARG 6 /* Check Arguments. */ @@ -173,7 +178,9 @@ #define ETIR_S_C_STC_NBH_PS 214 /* Store-conditional NOP,BSR or HINT at psect + offset. */ #define ETIR_S_C_MAXSTCCOD 214 /* Maximum store-conditional code. */ -/* VMS Global symbol definition record (GSD/EGSD). */ +#define ETIR_S_C_HEADER_SIZE 4 /* Size of the header of a command */ + +/* VMS Global Symbol Directory Records (GSD/EGSD). */ #define GSD_S_K_ENTRIES 1 #define GSD_S_C_ENTRIES 1 @@ -206,6 +213,7 @@ #define EGSD_S_C_SYMG 8 /* EGST - gst version of SYM. */ #define EGSD_S_C_MAXRECTYP 8 /* Maximum entry type defined. */ +/* Program Section Definition. */ #define GPS_S_M_PIC 1 #define GPS_S_M_LIB 2 #define GPS_S_M_OVR 4 @@ -219,31 +227,41 @@ #define GPS_S_K_NAME 9 #define GPS_S_C_NAME 9 -#define EGPS_S_V_PIC 0x0001 -#define EGPS_S_V_LIB 0x0002 -#define EGPS_S_V_OVR 0x0004 -#define EGPS_S_V_REL 0x0008 -#define EGPS_S_V_GBL 0x0010 -#define EGPS_S_V_SHR 0x0020 -#define EGPS_S_V_EXE 0x0040 -#define EGPS_S_V_RD 0x0080 -#define EGPS_S_V_WRT 0x0100 -#define EGPS_S_V_VEC 0x0200 -#define EGPS_S_V_NOMOD 0x0400 -#define EGPS_S_V_COM 0x0800 - +#define EGPS_S_B_ALIGN 4 +#define EGPS_S_W_FLAGS 6 +#define EGPS_S_L_ALLOC 8 +#define EGPS_S_B_NAMLNG 12 + +#define EGPS_S_V_PIC 0x0001 +#define EGPS_S_V_LIB 0x0002 +#define EGPS_S_V_OVR 0x0004 +#define EGPS_S_V_REL 0x0008 +#define EGPS_S_V_GBL 0x0010 +#define EGPS_S_V_SHR 0x0020 +#define EGPS_S_V_EXE 0x0040 +#define EGPS_S_V_RD 0x0080 +#define EGPS_S_V_WRT 0x0100 +#define EGPS_S_V_VEC 0x0200 +#define EGPS_S_V_NOMOD 0x0400 +#define EGPS_S_V_COM 0x0800 +#define EGPS_S_V_ALLOC_64BIT 0x1000 + +/* Symbol Defintion or Reference. */ #define GSY_S_M_WEAK 1 #define GSY_S_M_DEF 2 #define GSY_S_M_UNI 4 #define GSY_S_M_REL 8 -#define EGSY_S_V_WEAK 0x0001 -#define EGSY_S_V_DEF 0x0002 -#define EGSY_S_V_UNI 0x0004 -#define EGSY_S_V_REL 0x0008 -#define EGSY_S_V_COMM 0x0010 -#define EGSY_S_V_VECEP 0x0020 -#define EGSY_S_V_NORM 0x0040 +#define EGSY_S_W_FLAGS 6 + +#define EGSY_S_V_WEAK 0x0001 +#define EGSY_S_V_DEF 0x0002 +#define EGSY_S_V_UNI 0x0004 +#define EGSY_S_V_REL 0x0008 +#define EGSY_S_V_COMM 0x0010 +#define EGSY_S_V_VECEP 0x0020 +#define EGSY_S_V_NORM 0x0040 +#define EGSY_S_V_QUAD_VAL 0x0080 #define LSY_S_M_DEF 2 #define LSY_S_M_REL 8 @@ -251,10 +269,26 @@ #define ENV_S_M_DEF 1 #define ENV_S_M_NESTED 2 +/* Symbol Definition. */ +#define ESDF_S_L_VALUE 8 +#define ESDF_S_L_PSINDX 28 +#define ESDF_S_B_NAMLNG 32 + +/* Universal Symbol Definition. */ +#define EGST_S_W_FLAGS 6 +#define EGST_S_Q_LP_1 16 +#define EGST_S_Q_LP_2 24 +#define EGST_S_L_PSINDX 32 +#define EGST_S_B_NAMLNG 36 + +/* Symbol Reference. */ +#define ESRF_S_B_NAMLNG 8 + /* Debugger symbol definitions: These are done by hand, as no machine-readable version seems to be available. */ #define DST_S_C_C 7 /* Language == "C". */ #define DST_S_C_CXX 15 /* Language == "C++". */ +#define DST_S_C_EPILOG 127 #define DST_S_C_VERSION 153 #define DST_S_C_SOURCE 155 /* Source file. */ #define DST_S_C_PROLOG 162 @@ -269,15 +303,19 @@ #define DST_S_C_MODEND 189 /* End of module. */ #define DST_S_C_RTNBEG 190 /* Beginning of routine.*/ #define DST_S_C_RTNEND 191 /* End of routine. */ -#define DST_S_C_DELTA_PC_W 1 /* Incr PC. */ -#define DST_S_C_INCR_LINUM 2 /* Incr Line #. */ -#define DST_S_C_INCR_LINUM_W 3 /* Incr Line #. */ -#define DST_S_C_SET_LINUM_INCR 4 + +/* These are used with DST_S_C_LINE_NUM. */ +#define DST_S_C_LINE_NUM_HEADER_SIZE 4 + +#define DST_S_C_DELTA_PC_W 1 /* Incr PC. */ +#define DST_S_C_INCR_LINUM 2 /* Incr Line #. */ +#define DST_S_C_INCR_LINUM_W 3 /* Incr Line #. */ +#define DST_S_C_SET_LINUM_INCR 4 #define DST_S_C_SET_LINUM_INCR_W 5 #define DST_S_C_RESET_LINUM_INCR 6 -#define DST_S_C_BEG_STMT_MODE 7 -#define DST_S_C_END_STMT_MODE 8 -#define DST_S_C_SET_LINE_NUM 9 /* Set Line #. */ +#define DST_S_C_BEG_STMT_MODE 7 +#define DST_S_C_END_STMT_MODE 8 +#define DST_S_C_SET_LINE_NUM 9 /* Set Line #. */ #define DST_S_C_SET_PC 10 #define DST_S_C_SET_PC_W 11 #define DST_S_C_SET_PC_L 12 @@ -295,9 +333,32 @@ #define DST_S_C_SRC_SETFILE 2 /* Set source file. */ #define DST_S_C_SRC_SETREC_L 3 /* Set record, longword value. */ #define DST_S_C_SRC_SETREC_W 4 /* Set record, word value. */ +#define DST_S_C_SRC_SETLNUM_L 5 /* Set line, longword value. */ +#define DST_S_C_SRC_SETLNUM_W 6 /* Set line, word value. */ +#define DST_S_C_SRC_INCRLNUM_B 7 /* Increment line. */ #define DST_S_C_SRC_DEFLINES_W 10 /* # of line, word counter. */ #define DST_S_C_SRC_DEFLINES_B 11 /* # of line, byte counter. */ #define DST_S_C_SRC_FORMFEED 16 /* ^L counts as a record. */ + +#define DST_S_B_PCLINE_UNSBYTE 1 +#define DST_S_W_PCLINE_UNSWORD 1 +#define DST_S_L_PCLINE_UNSLONG 1 + +#define DST_S_B_MODBEG_NAME 14 +#define DST_S_L_RTNBEG_ADDRESS 5 +#define DST_S_B_RTNBEG_NAME 13 +#define DST_S_L_RTNEND_SIZE 5 + +/* These are used with DST_S_C_SOURCE. */ +#define DST_S_C_SOURCE_HEADER_SIZE 4 + +#define DST_S_B_SRC_DF_LENGTH 1 +#define DST_S_W_SRC_DF_FILEID 3 +#define DST_S_B_SRC_DF_FILENAME 20 +#define DST_S_B_SRC_UNSBYTE 1 +#define DST_S_W_SRC_UNSWORD 1 +#define DST_S_L_SRC_UNSLONG 1 + /* The following are the codes for the various data types. Anything not on the list is included under 'advanced_type'. */ #define DBG_S_C_UCHAR 0x02 @@ -328,6 +389,7 @@ #define DSC_K_CLASS_D 0x02 /* Dynamic string (not via malloc!). */ #define DSC_K_CLASS_A 0x04 /* Array. */ #define DSC_K_CLASS_UBS 0x0d /* Unaligned bit string. */ + /* These are the codes that are used to generate the definitions of struct union and enum records. */ #define DBG_S_C_ENUM_ITEM 0xa4 @@ -336,7 +398,7 @@ #define DBG_S_C_STRUCT_ITEM DST_K_VFLAGS_BITOFFS /* 0xff */ #define DBG_S_C_STRUCT_START 0xab #define DBG_S_C_STRUCT_END 0xac -#define DST_K_TYPSPEC 0xaf /* Type specification. */ +#define DST_K_TYPSPEC 0xaf /* Type specification. */ /* These codes are used in the generation of the symbol definition records. */ #define DST_K_VFLAGS_NOVAL 0x80 /* Struct definition only. */ #define DST_K_VFLAGS_DSC 0xfa /* Descriptor used. */ @@ -379,7 +441,7 @@ #define DBG_S_C_VOID DST_K_TS_PTR #define DBG_S_C_COMPLEX_ARRAY DST_K_TS_ARRAY -/* VMS Module header record (EMH) definitions. */ +/* VMS Module Header Records (MHD/EMH). */ #define MHD_S_C_MHD 0 #define MHD_S_C_LNM 1 @@ -402,48 +464,68 @@ /* vms.c. */ extern asymbol *_bfd_vms_make_empty_symbol (bfd *); +extern int _bfd_vms_slurp_object_records (bfd *abfd); /* vms-gsd.c. */ -extern int _bfd_vms_slurp_gsd (bfd *, int); -extern int _bfd_vms_write_gsd (bfd *, int); +extern int _bfd_vms_slurp_gsd (bfd *abfd, int objtype); +extern int _bfd_vms_write_gsd (bfd *abfd, int objtype); +extern int _bfd_vms_slurp_dbg (bfd *abfd, int objtype); +extern int _bfd_vms_write_dbg (bfd *abfd, int objtype); +extern int _bfd_vms_slurp_tbt (bfd *abfd, int objtype); +extern int _bfd_vms_write_tbt (bfd *abfd, int objtype); -/* vms-mhd.c. */ +/* vms-misc.c. */ -extern int _bfd_vms_slurp_hdr (bfd *, int); -extern int _bfd_vms_write_hdr (bfd *, int); -extern int _bfd_vms_slurp_eom (bfd *, int); -extern int _bfd_vms_write_eom (bfd *, int); +extern int _bfd_vms_get_object_record (bfd *abfd); +extern int _bfd_vms_get_first_record (bfd *abfd); + +/* vms-hdr.c. */ + +extern int _bfd_vms_slurp_hdr (bfd *abfd, int objtype); +extern int _bfd_vms_write_hdr (bfd *abfd, int objtype); +extern int _bfd_vms_slurp_eom (bfd *abfd, int objtype); +extern int _bfd_vms_write_eom (bfd *abfd, int objtype); +extern bfd_boolean _bfd_vms_find_nearest_dst_line + (bfd *abfd, asection *section, asymbol **symbols, bfd_vma offset, + const char **file, const char **func, unsigned int *line); +extern int _bfd_vms_slurp_ihd + (bfd *abfd, unsigned int *isd_offset, unsigned int *ihs_offset); +extern int _bfd_vms_slurp_isd (bfd *abfd, unsigned int offset); +extern int _bfd_vms_slurp_ihs (bfd *abfd, unsigned int offset); /* vms-tir.c. */ -extern int _bfd_vms_slurp_tir (bfd *, int); -extern int _bfd_vms_slurp_dbg (bfd *, int); -extern int _bfd_vms_slurp_tbt (bfd *, int); -extern int _bfd_vms_slurp_lnk (bfd *, int); - -extern int _bfd_vms_write_tir (bfd *, int); -extern int _bfd_vms_write_tbt (bfd *, int); -extern int _bfd_vms_write_dbg (bfd *, int); - -/* The r_type field in a reloc is one of he following values. */ -#define ALPHA_R_IGNORE 0 -#define ALPHA_R_REFQUAD 1 -#define ALPHA_R_BRADDR 2 -#define ALPHA_R_HINT 3 -#define ALPHA_R_SREL16 4 -#define ALPHA_R_SREL32 5 -#define ALPHA_R_SREL64 6 -#define ALPHA_R_OP_PUSH 7 -#define ALPHA_R_OP_STORE 8 -#define ALPHA_R_OP_PSUB 9 -#define ALPHA_R_OP_PRSHIFT 10 -#define ALPHA_R_LINKAGE 11 -#define ALPHA_R_REFLONG 12 -#define ALPHA_R_CODEADDR 13 - -/* Object language definitions. */ - +extern int _bfd_vms_slurp_tir (bfd *abfd, int objtype); +extern int _bfd_vms_write_tir (bfd *abfd, int objtype); +extern int _bfd_vms_slurp_lnk (bfd *abfd, int objtype); + +extern int _bfd_vms_slurp_relocs (bfd *abfd); +extern int _bfd_vms_decode_relocs + (bfd *abfd, arelent *relocs, asection *section, asymbol **symbols); + +/* The r_type field in a reloc is one of the following values. */ +#define ALPHA_R_IGNORE 0 +#define ALPHA_R_REFQUAD 1 +#define ALPHA_R_BRADDR 2 +#define ALPHA_R_HINT 3 +#define ALPHA_R_SREL16 4 +#define ALPHA_R_SREL32 5 +#define ALPHA_R_SREL64 6 +#define ALPHA_R_OP_PUSH 7 +#define ALPHA_R_OP_STORE 8 +#define ALPHA_R_OP_PSUB 9 +#define ALPHA_R_OP_PRSHIFT 10 +#define ALPHA_R_LINKAGE 11 +#define ALPHA_R_REFLONG 12 +#define ALPHA_R_CODEADDR 13 +#define ALPHA_R_NOP 14 +#define ALPHA_R_BSR 15 +#define ALPHA_R_LDA 16 +#define ALPHA_R_BOH 17 + +/* VMS Object Language (OBJ/EOBJ). */ + #define OBJ_S_C_HDR 0 /* VAX moule header record. */ #define OBJ_S_C_GSD 1 /* VAX glbal symbol definition record. */ #define OBJ_S_C_TIR 2 /* VAX tet information record. */ @@ -453,13 +535,15 @@ extern int _bfd_vms_write_dbg (bfd *, int); #define OBJ_S_C_LNK 6 /* VAX liker options record. */ #define OBJ_S_C_EOMW 7 /* VAX en of module word-psect record. */ #define OBJ_S_C_MAXRECTYP 7 /* VAX Lat assigned record type. */ + #define EOBJ_S_C_EMH 8 /* EVAX mdule header record. */ #define EOBJ_S_C_EEOM 9 /* EVAX ed of module record. */ -#define EOBJ_S_C_EGSD 10 /* EVAX gobal symbol definition record.*/ -#define EOBJ_S_C_ETIR 11 /* EVAX txt information record. */ +#define EOBJ_S_C_EGSD 10 /* EVAX gobal symbol definition record. */ +#define EOBJ_S_C_ETIR 11 /* EVAX txt information record. */ #define EOBJ_S_C_EDBG 12 /* EVAX Dbugger information record. */ #define EOBJ_S_C_ETBT 13 /* EVAX Taceback information record. */ #define EOBJ_S_C_MAXRECTYP 13 /* EVAX Lst assigned record type. */ + #define OBJ_S_K_SUBTYP 1 #define OBJ_S_C_SUBTYP 1 #define EOBJ_S_K_SUBTYP 4 @@ -475,8 +559,9 @@ extern int _bfd_vms_write_dbg (bfd *, int); #define EOBJ_S_C_STOREPLIM -1 /* Maximu repeat count on store commands. */ #define OBJ_S_C_PSCALILIM 9 /* Maximu p-sect alignment. */ #define EOBJ_S_C_PSCALILIM 16 /* Maximu p-sect alignment. */ - + #define EVAX_OFFSET 256 /* Type ofset for EVAX codes in switch. */ + /* Miscellaneous definitions. */ #if __GNUC__ @@ -484,140 +569,286 @@ typedef unsigned long long uquad; #else typedef unsigned long uquad; #endif - -#define MAX_OUTREC_SIZE 4096 -#define MIN_OUTREC_LUFT 64 - -typedef struct _vms_section -{ - unsigned char *contents; - bfd_vma offset; - bfd_size_type size; - struct _vms_section *next; -} vms_section; - -extern vms_section * _bfd_get_vms_section (bfd *, int); - -typedef struct _vms_reloc -{ - struct _vms_reloc *next; - arelent *reloc; - asection *section; -} vms_reloc; - + +#define MAX_OUTREC_SIZE 4096 +#define MIN_OUTREC_LUFT 64 + /* VMS module header. */ - -struct hdr_struc -{ - int hdr_b_strlvl; - long hdr_l_arch1; - long hdr_l_arch2; - long hdr_l_recsiz; - char * hdr_t_name; - char * hdr_t_version; - char * hdr_t_date; - char * hdr_c_lnm; - char * hdr_c_src; - char * hdr_c_ttl; -}; - -/* VMS end of module. */ - -struct eom_struc -{ - long eom_l_total_lps; - unsigned char eom_b_comcod; - bfd_boolean eom_has_transfer; - unsigned char eom_b_tfrflg; - long eom_l_psindx; - long eom_l_tfradr; -}; - -enum file_format_enum { FF_UNKNOWN, FF_FOREIGN, FF_NATIVE, FF_VAX }; - -typedef struct vms_symbol_struct -{ - struct bfd_hash_entry bfd_hash; - asymbol *symbol; -} vms_symbol_entry; - + +struct hdr_struct +{ + char hdr_b_strlvl; + int hdr_l_arch1; + int hdr_l_arch2; + int hdr_l_recsiz; + char *hdr_t_name; + char *hdr_t_version; + char *hdr_t_date; + char *hdr_c_lnm; + char *hdr_c_src; + char *hdr_c_ttl; + char *hdr_c_cpr; +}; + +#define EMH_S_W_HDRTYP 4 +#define EMH_S_B_STRLVL 6 +#define EMH_S_L_ARCH1 8 +#define EMH_S_L_ARCH2 12 +#define EH_S_L_RECSIZ 16 +#define EMH_S_B_NAMLNG 20 + +#define EMH_DATE_LENGTH 17 + +/* VMS End-Of-Module records (EOM/EEOM). */ + +struct eom_struct +{ + int eom_l_total_lps; + short eom_w_comcod; + bfd_boolean eom_has_transfer; + char eom_b_tfrflg; + int eom_l_psindx; + int eom_l_tfradr; +}; + +#define EEOM_S_L_TOTAL_LPS 4 +#define EEOM_S_W_COMCOD 8 +#define EEOM_S_B_TFRFLG 10 +#define EEOM_S_L_PSINDX 12 +#define EEOM_S_L_TFRADR 16 + +/* VMS Image Header Records (IHD/EIHD). */ + +#define EIHD_S_K_MAJORID 3 /* Major id constant */ +#define EIHD_S_K_MINORID 0 /* Minor id constant */ +#define EIHD_S_K_EXE 1 /* Executable image */ + +#define EIHD_S_L_SIZE 8 +#define EIHD_S_L_ISDOFF 12 +#define EIHD_S_L_SYMDBGOFF 20 +#define EIHD_S_Q_SYMVVA 40 +#define EIHD_S_L_IMGTYPE 52 + +/* VMS Image Section Description Records (ISD/EISD). */ + +#define EISD_S_L_EISDSIZE 8 +#define EISD_S_L_SECSIZE 12 +#define EISD_S_Q_VIR_ADDR 16 +#define EISD_S_L_FLAGS 24 +#define EISD_S_L_VBN 28 +#define EISD_S_R_CONTROL 32 +#define EISD_S_L_IDENT 36 +#define EISD_S_T_GBLNAM 40 + +#define EISD_S_M_GBL 0x0001 +#define EISD_S_M_CRF 0x0002 +#define EISD_S_M_DZRO 0x0004 +#define EISD_S_M_WRT 0x0008 +#define EISD_S_M_INITALCODE 0x0010 +#define EISD_S_M_BASED 0x0020 +#define EISD_S_M_FIXUPVEC 0x0040 +#define EISD_S_M_RESIDENT 0x0080 +#define EISD_S_M_VECTOR 0x0100 +#define EISD_S_M_PROTECT 0x0200 +#define EISD_S_M_LASTCLU 0x0400 +#define EISD_S_M_EXE 0x0800 +#define EISD_S_M_NONSHRADR 0x1000 +#define EISD_S_M_QUAD_LENGTH 0x2000 +#define EISD_S_M_ALLOC_64BIT 0x4000 + +/* VMS Image Header Symbol Records (IHS/EIHS). */ + +#define EIHS_S_L_DSTVBN 8 +#define EIHS_S_L_DSTSIZE 12 +#define EIHS_S_L_GSTVBN 16 +#define EIHS_S_L_GSTSIZE 20 +#define EIHS_S_L_DMTVBN 24 +#define EIHS_S_L_DMTBYTES 28 + +/* Debugger symbol definitions. */ + +#define DBG_S_L_DMT_MODBEG 0 +#define DBG_S_L_DST_SIZE 4 +#define DBG_S_W_DMT_PSECT_COUNT 8 +#define DBG_S_C_DMT_HEADER_SIZE 12 + +#define DBG_S_L_DMT_PSECT_START 0 +#define DBG_S_L_DMT_PSECT_LENGTH 4 +#define DBG_S_C_DMT_PSECT_SIZE 8 + + +enum file_format_enum { FF_UNKNOWN, FF_FOREIGN, FF_NATIVE }; +enum file_type_enum { FT_UNKNOWN, FT_MODULE, FT_IMAGE }; + +typedef struct vms_symbol_struct +{ + struct bfd_hash_entry bfd_hash; + asymbol *symbol; +} vms_symbol_entry; + /* Stack value for push/pop commands. */ - -struct stack_struct -{ - uquad value; - int psect; -}; -#define STACKSIZE 8192 - -/* location stack definitions for CTL_DFLC, CTL_STLOC, and CTL_STKDL */ - -struct location_struct -{ - unsigned long value; - int psect; -}; -#define LOCATION_SAVE_SIZE 32 - -#define VMS_SECTION_COUNT 1024 - -struct vms_private_data_struct -{ - bfd_boolean is_vax; + +struct stack_struct +{ + uquad value; + int psect; +}; + +#define STACKSIZE 8192 + +/* A minimal decoding of DST compilation units. We only decode + what's needed to get to the line number information. */ + +struct fileinfo +{ + char *name; + unsigned int srec; +}; + +struct srecinfo +{ + struct srecinfo *next; + unsigned int line; + unsigned int sfile; + unsigned int srec; +}; + +struct lineinfo +{ + struct lineinfo *next; + bfd_vma address; + unsigned int line; +}; + +struct funcinfo +{ + struct funcinfo *next; + char *name; + bfd_vma low; + bfd_vma high; +}; + +struct module +{ + /* Chain the previously read compilation unit. */ + struct module *next; + + /* The module name. */ + char *name; + + /* The start offset and size of debug info in the DST section. */ + unsigned int modbeg; + unsigned int size; + + /* The lowest and highest addresses contained in this compilation + unit as specified in the compilation unit header. */ + bfd_vma low; + bfd_vma high; + + /* The listing line table. */ + struct lineinfo *line_table; + + /* The source record table. */ + struct srecinfo *srec_table; + + /* A list of the functions found in this module. */ + struct funcinfo *func_table; + + /* Current allocation of file_table. */ + unsigned int file_table_count; + + /* An array of the files making up this module. */ + struct fileinfo *file_table; +}; + +struct vms_private_data_struct +{ + bfd_boolean is_vax; bfd_boolean fixup_done; /* Flag to indicate if all section pointers and PRIV(sections) are set up correctly. */ - unsigned char *vms_buf; /* Buffer to record. */ - int buf_size; /* Max size of buffer. */ - unsigned char *vms_rec; /* Actual record ptr. */ - int rec_length; /* Remaining record length. */ - int rec_size; /* Actual record size. */ - int rec_type; /* Actual record type. */ - enum file_format_enum file_format; - - struct hdr_struc hdr_data; /* Data from HDR/EMH record. */ - struct eom_struc eom_data; /* Data from EOM/EEOM record. */ - unsigned int section_count; /* # of sections in following array. */ - asection **sections; /* Array of GSD/EGSD sections. */ - int gsd_sym_count; /* # of GSD/EGSD symbols. */ - asymbol **symbols; /* Vector of GSD/EGSD symbols. */ - struct proc_value *procedure; - - struct stack_struct *stack; - int stackptr; - - vms_section *vms_section_table[VMS_SECTION_COUNT]; - + unsigned char *vms_buf; /* record buffer */ + unsigned int buf_size; /* size of record buffer */ + unsigned char *vms_rec; /* record pointer in record buffer */ + unsigned int rec_size; /* record size */ + enum file_format_enum file_format; + + struct hdr_struct hdr_data; /* data from HDR/EMH record */ + struct eom_struct eom_data; /* data from EOM/EEOM record */ + unsigned int section_count; /* # of sections in following array */ + asection **sections; /* array of GSD/EGSD sections */ + unsigned int gsd_sym_count; /* # of GSD/EGSD symbols */ + asymbol **symbols; /* vector of GSD/EGSD symbols */ + struct proc_value *procedure; + + struct stack_struct *stack; + int stackptr; + struct bfd_hash_table *vms_symbol_table; - struct bfd_symbol **symcache; - int symnum; - - struct location_struct *location_stack; - - asection *image_section; /* Section for image_ptr. */ - unsigned char *image_ptr; /* A pointer to section->contents. */ - - unsigned char pdsc[8]; /* Procedure descriptor. */ - - /* Output routine storage. */ - unsigned char *output_buf; /* Output data. */ - int push_level; - int pushed_size; - int length_pos; - int output_size; - int output_alignment; - - /* Linkage index counter - used by conditional store commands (TIR_S_C_STC_). */ - int vms_linkage_index; - - /* see tc-alpha.c of gas for a descripton. */ - int flag_hash_long_names; /* -+, hash instead of truncate. */ - int flag_show_after_trunc; /* -H, shw hashing/truncation. */ -}; - -#define PRIV(name) ((struct vms_private_data_struct *) abfd->tdata.any)->name - + struct bfd_symbol **symcache; + int symnum; + + asection *image_section; /* section for image_ptr */ + unsigned char *image_ptr; /* a pointer to section->contents */ + + unsigned char pdsc[8]; /* procedure descriptor */ + + struct module *modules; /* list of all compilation units */ + + struct dst_info *dst_info; + asection *dst_section; + unsigned char *dst_ptr_end; + unsigned int dst_ptr_offsets_count; /* # of offsets in following array */ + unsigned int *dst_ptr_offsets; /* array of saved image_ptr offsets */ + + /* Shared library support */ + bfd_vma symvva; /* relative virtual address of symbol vector */ + + /* Output routine storage */ + unsigned char *output_buf; /* output data */ + int push_level; + int pushed_size; + int length_pos; + int output_size; + int output_alignment; + + /* linkage index counter used by conditional store commands */ + int vms_linkage_index; + + /* see tc-alpha.c of gas for a description. */ + int flag_hash_long_names; /* -+, hash instead of truncate */ + int flag_show_after_trunc; /* -H, show hashing/truncation */ +}; + +#define PRIV(name) ((struct vms_private_data_struct *)abfd->tdata.any)->name + +/* Used to keep extra VMS specific information for a given section. + + reloc_size holds the size of the relocation stream, note this + is very different from the number of relocations as VMS relocations + are variable length. + + reloc_stream is the actual stream of relocation entries. */ + +struct vms_section_data_struct +{ + bfd_size_type reloc_size; + unsigned char *reloc_stream; + bfd_size_type reloc_offset; + flagword vflags; +}; + +#define vms_section_data(sec) \ + ((struct vms_section_data_struct *)sec->used_by_bfd) + +struct evax_private_udata_struct +{ + asymbol *bsym; + asymbol *enbsym; + char *origname; + int lkindex; +}; + #define SECTION_NAME_TEMPLATE "__SEC__%d" #if VMS_DEBUG @@ -635,7 +866,6 @@ extern char * _bfd_vms_save_sized_string (unsigned char *, int); extern char * _bfd_vms_save_counted_string (unsigned char *); extern void _bfd_vms_push (bfd *, uquad, int); extern uquad _bfd_vms_pop (bfd *, int *); -extern bfd_boolean _bfd_save_vms_section (bfd *, asection *, const void *, file_ptr, bfd_size_type); extern void _bfd_vms_output_begin (bfd *, int, int); extern void _bfd_vms_output_alignment (bfd *, int); extern void _bfd_vms_output_push (bfd *); @@ -653,4 +883,7 @@ extern void _bfd_vms_output_fill (bfd *, int, int); extern char * _bfd_vms_length_hash_symbol (bfd *, const char *, int); extern vms_symbol_entry * _bfd_vms_enter_symbol (bfd *, char *); +#define EGPS_S_V_NO_SHIFT 16 + +extern void bfd_vms_set_section_flags (bfd *, asection *, flagword); #endif /* VMS_H */ diff --git a/cegcc/src/binutils/bfd/xcoff-target.h b/cegcc/src/binutils/bfd/xcoff-target.h index 8212a0da4..4837fdff7 100644 --- a/cegcc/src/binutils/bfd/xcoff-target.h +++ b/cegcc/src/binutils/bfd/xcoff-target.h @@ -1,5 +1,5 @@ /* Common definitions for backends based on IBM RS/6000 "XCOFF64" files. - Copyright 2000, 2001, 2002, 2004, 2005, 2006, 2007 + Copyright 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -57,6 +57,7 @@ #define _bfd_xcoff_bfd_merge_sections coff_bfd_merge_sections #define _bfd_xcoff_bfd_discard_group bfd_generic_discard_group #define _bfd_xcoff_section_already_linked _bfd_generic_section_already_linked +#define _bfd_xcoff_bfd_define_common_symbol _bfd_xcoff_define_common_symbol #define _bfd_xcoff_bfd_link_split_section coff_bfd_link_split_section #define CORE_FILE_P _bfd_dummy_target diff --git a/cegcc/src/binutils/bfd/xcofflink.c b/cegcc/src/binutils/bfd/xcofflink.c index 21d9a2d94..8885ca305 100644 --- a/cegcc/src/binutils/bfd/xcofflink.c +++ b/cegcc/src/binutils/bfd/xcofflink.c @@ -1,6 +1,6 @@ /* POWER/PowerPC XCOFF linker support. Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Ian Lance Taylor , Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -28,6 +28,7 @@ #include "coff/xcoff.h" #include "libcoff.h" #include "libxcoff.h" +#include "libiberty.h" /* This file holds the XCOFF linker code. */ @@ -75,6 +76,88 @@ struct xcoff_link_section_info } *toc_rel_hashes; }; +/* Information that the XCOFF linker collects about an archive. */ +struct xcoff_archive_info +{ + /* The archive described by this entry. */ + bfd *archive; + + /* The import path and import filename to use when referring to + this archive in the .loader section. */ + const char *imppath; + const char *impfile; + + /* True if the archive contains a dynamic object. */ + unsigned int contains_shared_object_p : 1; + + /* True if the previous field is valid. */ + unsigned int know_contains_shared_object_p : 1; +}; + +struct xcoff_link_hash_table +{ + struct bfd_link_hash_table root; + + /* The .debug string hash table. We need to compute this while + reading the input files, so that we know how large the .debug + section will be before we assign section positions. */ + struct bfd_strtab_hash *debug_strtab; + + /* The .debug section we will use for the final output. */ + asection *debug_section; + + /* The .loader section we will use for the final output. */ + asection *loader_section; + + /* A count of non TOC relative relocs which will need to be + allocated in the .loader section. */ + size_t ldrel_count; + + /* The .loader section header. */ + struct internal_ldhdr ldhdr; + + /* The .gl section we use to hold global linkage code. */ + asection *linkage_section; + + /* The .tc section we use to hold toc entries we build for global + linkage code. */ + asection *toc_section; + + /* The .ds section we use to hold function descriptors which we + create for exported symbols. */ + asection *descriptor_section; + + /* The list of import files. */ + struct xcoff_import_file *imports; + + /* Required alignment of sections within the output file. */ + unsigned long file_align; + + /* Whether the .text section must be read-only. */ + bfd_boolean textro; + + /* Whether -brtl was specified. */ + bfd_boolean rtld; + + /* Whether garbage collection was done. */ + bfd_boolean gc; + + /* A linked list of symbols for which we have size information. */ + struct xcoff_link_size_list + { + struct xcoff_link_size_list *next; + struct xcoff_link_hash_entry *h; + bfd_size_type size; + } + *size_list; + + /* Information about archives. */ + htab_t archive_info; + + /* Magic sections: _text, _etext, _data, _edata, _end, end. */ + asection *special_sections[XCOFF_NUMBER_OF_SPECIAL_SECTIONS]; +}; + /* Information that we pass around while doing the final link step. */ struct xcoff_final_link_info @@ -258,7 +341,12 @@ _bfd_xcoff_canonicalize_dynamic_symtab (bfd *abfd, asymbol **psyms) symbuf->symbol.flags = BSF_NO_FLAGS; if ((ldsym.l_smtype & L_EXPORT) != 0) - symbuf->symbol.flags |= BSF_GLOBAL; + { + if ((ldsym.l_smtype & L_WEAK) != 0) + symbuf->symbol.flags |= BSF_WEAK; + else + symbuf->symbol.flags |= BSF_GLOBAL; + } /* FIXME: We have no way to record the other information stored with the loader symbol. */ @@ -398,6 +486,56 @@ _bfd_xcoff_canonicalize_dynamic_reloc (bfd *abfd, return ldhdr.l_nreloc; } +/* Hash functions for xcoff_link_hash_table's archive_info. */ + +static hashval_t +xcoff_archive_info_hash (const void *data) +{ + const struct xcoff_archive_info *info; + + info = (const struct xcoff_archive_info *) data; + return htab_hash_pointer (info->archive); +} + +static int +xcoff_archive_info_eq (const void *data1, const void *data2) +{ + const struct xcoff_archive_info *info1; + const struct xcoff_archive_info *info2; + + info1 = (const struct xcoff_archive_info *) data1; + info2 = (const struct xcoff_archive_info *) data2; + return info1->archive == info2->archive; +} + +/* Return information about archive ARCHIVE. Return NULL on error. */ + +static struct xcoff_archive_info * +xcoff_get_archive_info (struct bfd_link_info *info, bfd *archive) +{ + struct xcoff_link_hash_table *htab; + struct xcoff_archive_info *entryp, entry; + void **slot; + + htab = xcoff_hash_table (info); + entry.archive = archive; + slot = htab_find_slot (htab->archive_info, &entry, INSERT); + if (!slot) + return NULL; + + entryp = *slot; + if (!entryp) + { + entryp = bfd_zalloc (archive, sizeof (entry)); + if (!entryp) + return NULL; + + entryp->archive = archive; + *slot = entryp; + } + return entryp; +} + /* Routine to create an entry in an XCOFF link hash table. */ static struct bfd_hash_entry * @@ -464,6 +602,8 @@ _bfd_xcoff_bfd_link_hash_table_create (bfd *abfd) ret->file_align = 0; ret->textro = FALSE; ret->gc = FALSE; + ret->archive_info = htab_create (37, xcoff_archive_info_hash, + xcoff_archive_info_eq, NULL); memset (ret->special_sections, 0, sizeof ret->special_sections); /* The linker will always generate a full a.out header. We need to @@ -540,6 +680,139 @@ xcoff_read_internal_relocs (bfd *abfd, require_internal, internal_relocs); } +/* Split FILENAME into an import path and an import filename, + storing them in *IMPPATH and *IMPFILE respectively. */ + +bfd_boolean +bfd_xcoff_split_import_path (bfd *abfd, const char *filename, + const char **imppath, const char **impfile) +{ + const char *basename; + size_t length; + char *path; + + basename = lbasename (filename); + length = basename - filename; + if (length == 0) + /* The filename has no directory component, so use an empty path. */ + *imppath = ""; + else if (length == 1) + /* The filename is in the root directory. */ + *imppath = "/"; + else + { + /* Extract the (non-empty) directory part. Note that we don't + need to strip duplicate directory separators from any part + of the string; the native linker doesn't do that either. */ + path = bfd_alloc (abfd, length); + if (path == NULL) + return FALSE; + memcpy (path, filename, length - 1); + path[length - 1] = 0; + *imppath = path; + } + *impfile = basename; + return TRUE; +} + +/* Set ARCHIVE's import path as though its filename had been given + as FILENAME. */ + +bfd_boolean +bfd_xcoff_set_archive_import_path (struct bfd_link_info *info, + bfd *archive, const char *filename) +{ + struct xcoff_archive_info *archive_info; + + archive_info = xcoff_get_archive_info (info, archive); + return (archive_info != NULL + && bfd_xcoff_split_import_path (archive, filename, + &archive_info->imppath, + &archive_info->impfile)); +} + +/* H is an imported symbol. Set the import module's path, file and member + to IMPATH, IMPFILE and IMPMEMBER respectively. All three are null if + no specific import module is specified. */ + +static bfd_boolean +xcoff_set_import_path (struct bfd_link_info *info, + struct xcoff_link_hash_entry *h, + const char *imppath, const char *impfile, + const char *impmember) +{ + unsigned int c; + struct xcoff_import_file **pp; + + /* We overload the ldindx field to hold the l_ifile value for this + symbol. */ + BFD_ASSERT (h->ldsym == NULL); + BFD_ASSERT ((h->flags & XCOFF_BUILT_LDSYM) == 0); + if (imppath == NULL) + h->ldindx = -1; + else + { + /* We start c at 1 because the first entry in the import list is + reserved for the library search path. */ + for (pp = &xcoff_hash_table (info)->imports, c = 1; + *pp != NULL; + pp = &(*pp)->next, ++c) + { + if (strcmp ((*pp)->path, imppath) == 0 + && strcmp ((*pp)->file, impfile) == 0 + && strcmp ((*pp)->member, impmember) == 0) + break; + } + + if (*pp == NULL) + { + struct xcoff_import_file *n; + bfd_size_type amt = sizeof (* n); + + n = bfd_alloc (info->output_bfd, amt); + if (n == NULL) + return FALSE; + n->next = NULL; + n->path = imppath; + n->file = impfile; + n->member = impmember; + *pp = n; + } + h->ldindx = c; + } + return TRUE; +} + +/* H is the bfd symbol associated with exported .loader symbol LDSYM. + Return true if LDSYM defines H. */ + +static bfd_boolean +xcoff_dynamic_definition_p (struct xcoff_link_hash_entry *h, + struct internal_ldsym *ldsym) +{ + /* If we didn't know about H before processing LDSYM, LDSYM + definitely defines H. */ + if (h->root.type == bfd_link_hash_new) + return TRUE; + + /* If H is currently a weak dynamic symbol, and if LDSYM is a strong + dynamic symbol, LDSYM trumps the current definition of H. */ + if ((ldsym->l_smtype & L_WEAK) == 0 + && (h->flags & XCOFF_DEF_DYNAMIC) != 0 + && (h->flags & XCOFF_DEF_REGULAR) == 0 + && (h->root.type == bfd_link_hash_defweak + || h->root.type == bfd_link_hash_undefweak)) + return TRUE; + + /* If H is currently undefined, LDSYM defines it. */ + if ((h->flags & XCOFF_DEF_DYNAMIC) == 0 + && (h->root.type == bfd_link_hash_undefined + || h->root.type == bfd_link_hash_undefweak)) + return TRUE; + + return FALSE; +} + /* This function is used to add symbols from a dynamic object to the global symbol table. */ @@ -552,9 +825,6 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) const char *strings; bfd_byte *elsym, *elsymend; struct xcoff_import_file *n; - const char *bname; - const char *mname; - const char *s; unsigned int c; struct xcoff_import_file **pp; @@ -638,43 +908,33 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) if (h == NULL) return FALSE; - h->flags |= XCOFF_DEF_DYNAMIC; - - /* If the symbol is undefined, and the BFD it was found in is - not a dynamic object, change the BFD to this dynamic object, - so that we can get the correct import file ID. */ - if ((h->root.type == bfd_link_hash_undefined - || h->root.type == bfd_link_hash_undefweak) - && (h->root.u.undef.abfd == NULL - || (h->root.u.undef.abfd->flags & DYNAMIC) == 0)) - h->root.u.undef.abfd = abfd; - - if (h->root.type == bfd_link_hash_new) - { - h->root.type = bfd_link_hash_undefined; - h->root.u.undef.abfd = abfd; - /* We do not want to add this to the undefined symbol list. */ - } - - if (h->smclas == XMC_UA - || h->root.type == bfd_link_hash_undefined - || h->root.type == bfd_link_hash_undefweak) - h->smclas = ldsym.l_smclas; - - /* Unless this is an XMC_XO symbol, we don't bother to actually - define it, since we don't have a section to put it in anyhow. - Instead, the relocation routines handle the DEF_DYNAMIC flag - correctly. */ + if (!xcoff_dynamic_definition_p (h, &ldsym)) + continue; - if (h->smclas == XMC_XO - && (h->root.type == bfd_link_hash_undefined - || h->root.type == bfd_link_hash_undefweak)) + h->flags |= XCOFF_DEF_DYNAMIC; + h->smclas = ldsym.l_smclas; + if (h->smclas == XMC_XO) { /* This symbol has an absolute value. */ - h->root.type = bfd_link_hash_defined; + if ((ldsym.l_smtype & L_WEAK) != 0) + h->root.type = bfd_link_hash_defweak; + else + h->root.type = bfd_link_hash_defined; h->root.u.def.section = bfd_abs_section_ptr; h->root.u.def.value = ldsym.l_value; } + else + { + /* Otherwise, we don't bother to actually define the symbol, + since we don't have a section to put it in anyhow. + We assume instead that an undefined XCOFF_DEF_DYNAMIC symbol + should be imported from the symbol's undef.abfd. */ + if ((ldsym.l_smtype & L_WEAK) != 0) + h->root.type = bfd_link_hash_undefweak; + else + h->root.type = bfd_link_hash_undefined; + h->root.u.undef.abfd = abfd; + } /* If this symbol defines a function descriptor, then it implicitly defines the function code as well. */ @@ -701,33 +961,30 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) if (hds == NULL) return FALSE; - if (hds->root.type == bfd_link_hash_new) - { - hds->root.type = bfd_link_hash_undefined; - hds->root.u.undef.abfd = abfd; - /* We do not want to add this to the undefined - symbol list. */ - } - hds->descriptor = h; h->descriptor = hds; } - hds->flags |= XCOFF_DEF_DYNAMIC; - if (hds->smclas == XMC_UA) - hds->smclas = XMC_PR; - - /* An absolute symbol appears to actually define code, not a - function descriptor. This is how some math functions are - implemented on AIX 4.1. */ - if (h->smclas == XMC_XO - && (hds->root.type == bfd_link_hash_undefined - || hds->root.type == bfd_link_hash_undefweak)) + if (xcoff_dynamic_definition_p (hds, &ldsym)) { - hds->smclas = XMC_XO; - hds->root.type = bfd_link_hash_defined; - hds->root.u.def.section = bfd_abs_section_ptr; - hds->root.u.def.value = ldsym.l_value; + hds->root.type = h->root.type; + hds->flags |= XCOFF_DEF_DYNAMIC; + if (h->smclas == XMC_XO) + { + /* An absolute symbol appears to actually define code, not a + function descriptor. This is how some math functions are + implemented on AIX 4.1. */ + hds->smclas = XMC_XO; + hds->root.u.def.section = bfd_abs_section_ptr; + hds->root.u.def.value = ldsym.l_value; + } + else + { + hds->smclas = XMC_PR; + hds->root.u.undef.abfd = abfd; + /* We do not want to add this to the undefined + symbol list. */ + } } } } @@ -744,25 +1001,30 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) return FALSE; n->next = NULL; - /* For some reason, the path entry in the import file list for a - shared object appears to always be empty. The file name is the - base name. */ - n->path = ""; if (abfd->my_archive == NULL) { - bname = bfd_get_filename (abfd); - mname = ""; + if (!bfd_xcoff_split_import_path (abfd, abfd->filename, + &n->path, &n->file)) + return FALSE; + n->member = ""; } else { - bname = bfd_get_filename (abfd->my_archive); - mname = bfd_get_filename (abfd); + struct xcoff_archive_info *archive_info; + + archive_info = xcoff_get_archive_info (info, abfd->my_archive); + if (!archive_info->impfile) + { + if (!bfd_xcoff_split_import_path (archive_info->archive, + archive_info->archive->filename, + &archive_info->imppath, + &archive_info->impfile)) + return FALSE; + } + n->path = archive_info->imppath; + n->file = archive_info->impfile; + n->member = bfd_get_filename (abfd); } - s = strrchr (bname, '/'); - if (s != NULL) - bname = s + 1; - n->file = bname; - n->member = mname; /* We start c at 1 because the first import file number is reserved for LIBPATH. */ @@ -792,7 +1054,8 @@ xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info) won't work if we're producing an XCOFF output file with no XCOFF input files. FIXME. */ - if (xcoff_hash_table (info)->loader_section == NULL) + if (!info->relocatable + && xcoff_hash_table (info)->loader_section == NULL) { asection *lsec; flagword flags = SEC_HAS_CONTENTS | SEC_IN_MEMORY; @@ -947,6 +1210,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) bfd_size_type symcount; struct xcoff_link_hash_entry **sym_hash; asection **csect_cache; + unsigned int *lineno_counts; bfd_size_type linesz; asection *o; asection *last_real; @@ -1013,6 +1277,15 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) goto error_return; xcoff_data (abfd)->csects = csect_cache; + /* We garbage-collect line-number information on a symbol-by-symbol + basis, so we need to have quick access to the number of entries + per symbol. */ + amt = symcount * sizeof (unsigned int); + lineno_counts = bfd_zalloc (abfd, amt); + if (lineno_counts == NULL && symcount != 0) + goto error_return; + xcoff_data (abfd)->lineno_counts = lineno_counts; + /* While splitting sections into csects, we need to assign the relocs correctly. The relocs and the csects must both be in order by VMA within a given section, so we handle this by @@ -1077,7 +1350,6 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) const char *name; char buf[SYMNMLEN + 1]; int smtyp; - flagword flags; asection *section; bfd_vma value; struct xcoff_link_hash_entry *set_toc; @@ -1086,23 +1358,15 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) /* In this pass we are only interested in symbols with csect information. */ - if (sym.n_sclass != C_EXT && sym.n_sclass != C_HIDEXT) + if (!CSECT_SYM_P (sym.n_sclass)) { /* Set csect_cache, Normally csect is a .pr, .rw etc. created in the loop If C_FILE or first time, handle special - Advance esym, sym_hash, csect_hash ptr's - Keep track of the last_symndx for the current file. */ - if (sym.n_sclass == C_FILE && csect != NULL) - { - xcoff_section_data (abfd, csect)->last_symndx = - ((esym - - (bfd_byte *) obj_coff_external_syms (abfd)) - / symesz); - csect = NULL; - } - + Advance esym, sym_hash, csect_hash ptrs. */ + if (sym.n_sclass == C_FILE) + csect = NULL; if (csect != NULL) *csect_cache = csect; else if (first_csect == NULL || sym.n_sclass == C_FILE) @@ -1112,6 +1376,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) esym += (sym.n_numaux + 1) * symesz; sym_hash += sym.n_numaux + 1; csect_cache += sym.n_numaux + 1; + lineno_counts += sym.n_numaux + 1; continue; } @@ -1182,7 +1447,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) if (lin.l_lnno == 0) break; } - csect->lineno_count += (linp - linpstart) / linesz; + *lineno_counts = (linp - linpstart) / linesz; /* The setting of line_filepos will only be useful if all the line number entries for a csect are contiguous; this only matters for @@ -1213,7 +1478,6 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) smtyp = SMTYP_SMTYP (aux.x_csect.x_smtyp); - flags = BSF_GLOBAL; section = NULL; value = 0; set_toc = NULL; @@ -1253,13 +1517,6 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) break; case XTY_SD: - /* This is a csect definition. */ - if (csect != NULL) - { - xcoff_section_data (abfd, csect)->last_symndx = - ((esym - (bfd_byte *) obj_coff_external_syms (abfd)) / symesz); - } - csect = NULL; csect_index = -(unsigned) 1; @@ -1331,7 +1588,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) erelsym = ((bfd_byte *) obj_coff_external_syms (abfd) + rel->r_symndx * symesz); bfd_coff_swap_sym_in (abfd, (void *) erelsym, (void *) &relsym); - if (relsym.n_sclass == C_EXT) + if (EXTERN_SYM_P (relsym.n_sclass)) { const char *relname; char relbuf[SYMNMLEN + 1]; @@ -1486,9 +1743,9 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) if (first_csect == NULL) first_csect = csect; - /* If this symbol is C_EXT, we treat it as starting at the + /* If this symbol is external, we treat it as starting at the beginning of the newly created section. */ - if (sym.n_sclass == C_EXT) + if (EXTERN_SYM_P (sym.n_sclass)) { section = csect; value = 0; @@ -1541,14 +1798,6 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) named .tocbss, and rely on the linker script to put that in the TOC area. */ - if (csect != NULL) - { - xcoff_section_data (abfd, csect)->last_symndx = - ((esym - - (bfd_byte *) obj_coff_external_syms (abfd)) - / symesz); - } - if (aux.x_csect.x_smclas == XMC_TD) { /* The linker script puts the .td section in the data @@ -1585,7 +1834,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) if (first_csect == NULL) first_csect = csect; - if (sym.n_sclass == C_EXT) + if (EXTERN_SYM_P (sym.n_sclass)) { csect->flags |= SEC_IS_COMMON; csect->size = 0; @@ -1626,9 +1875,10 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) /* Now we have enough information to add the symbol to the linker hash table. */ - if (sym.n_sclass == C_EXT) + if (EXTERN_SYM_P (sym.n_sclass)) { bfd_boolean copy; + flagword flags; BFD_ASSERT (section != NULL); @@ -1639,6 +1889,15 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) || sym._n._n_n._n_offset == 0) copy = TRUE; + /* Ignore global linkage code when linking statically. */ + if (info->static_link + && (smtyp == XTY_SD || smtyp == XTY_LD) + && aux.x_csect.x_smclas == XMC_GL) + { + section = bfd_und_section_ptr; + value = 0; + } + /* The AIX linker appears to only detect multiple symbol definitions when there is a reference to the symbol. If a symbol is defined multiple times, and the only @@ -1663,8 +1922,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) We also have to handle the case of statically linking a shared object, which will cause symbol redefinitions, although this is an easier case to detect. */ - - if (info->output_bfd->xvec == abfd->xvec) + else if (info->output_bfd->xvec == abfd->xvec) { if (! bfd_is_und_section (section)) *sym_hash = xcoff_link_hash_lookup (xcoff_hash_table (info), @@ -1684,23 +1942,8 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) && ! bfd_is_com_section (section)) { /* This is a second definition of a defined symbol. */ - if ((abfd->flags & DYNAMIC) != 0 - && ((*sym_hash)->smclas != XMC_GL - || aux.x_csect.x_smclas == XMC_GL - || ((*sym_hash)->root.u.def.section->owner->flags - & DYNAMIC) == 0)) - { - /* The new symbol is from a shared library, and - either the existing symbol is not global - linkage code or this symbol is global linkage - code. If the existing symbol is global - linkage code and the new symbol is not, then - we want to use the new symbol. */ - section = bfd_und_section_ptr; - value = 0; - } - else if (((*sym_hash)->root.u.def.section->owner->flags - & DYNAMIC) != 0) + if (((*sym_hash)->flags & XCOFF_DEF_REGULAR) == 0 + && ((*sym_hash)->flags & XCOFF_DEF_DYNAMIC) != 0) { /* The existing symbol is from a shared library. Replace it. */ @@ -1716,6 +1959,12 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) section = bfd_und_section_ptr; value = 0; } + else if (sym.n_sclass == C_AIX_WEAKEXT + || (*sym_hash)->root.type == bfd_link_hash_defweak) + { + /* At least one of the definitions is weak. + Allow the normal rules to take effect. */ + } else if ((*sym_hash)->root.u.undef.next != NULL || info->hash->undefs_tail == &(*sym_hash)->root) { @@ -1735,8 +1984,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) } } else if (((*sym_hash)->flags & XCOFF_MULTIPLY_DEFINED) != 0 - && ((*sym_hash)->root.type == bfd_link_hash_defined - || (*sym_hash)->root.type == bfd_link_hash_defweak) + && (*sym_hash)->root.type == bfd_link_hash_defined && (bfd_is_und_section (section) || bfd_is_com_section (section))) { @@ -1771,6 +2019,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) a second time from the csects. */ BFD_ASSERT (last_real->next == first_csect); last_real->next = NULL; + flags = (sym.n_sclass == C_EXT ? BSF_GLOBAL : BSF_WEAK); if (! (_bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value, NULL, copy, TRUE, @@ -1793,7 +2042,9 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { int flag; - if (smtyp == XTY_ER || smtyp == XTY_CM) + if (smtyp == XTY_ER + || smtyp == XTY_CM + || section == bfd_und_section_ptr) flag = XCOFF_REF_REGULAR; else flag = XCOFF_DEF_REGULAR; @@ -1805,11 +2056,20 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) } } - *csect_cache = csect; + if (smtyp == XTY_ER) + *csect_cache = section; + else + { + *csect_cache = csect; + if (csect != NULL) + xcoff_section_data (abfd, csect)->last_symndx + = (esym - (bfd_byte *) obj_coff_external_syms (abfd)) / symesz; + } esym += (sym.n_numaux + 1) * symesz; sym_hash += sym.n_numaux + 1; csect_cache += sym.n_numaux + 1; + lineno_counts += sym.n_numaux + 1; } BFD_ASSERT (last_real == NULL || last_real->next == first_csect); @@ -1845,19 +2105,16 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) goto error_return; } - /* We identify all symbols which are called, so that we - can create glue code for calls to functions imported - from dynamic objects. */ + /* We identify all function symbols that are the target + of a relocation, so that we can create glue code for + functions imported from dynamic objects. */ if (info->output_bfd->xvec == abfd->xvec && *rel_csect != bfd_und_section_ptr - && (rel->r_type == R_BR - || rel->r_type == R_RBR) && obj_xcoff_sym_hashes (abfd)[rel->r_symndx] != NULL) { struct xcoff_link_hash_entry *h; h = obj_xcoff_sym_hashes (abfd)[rel->r_symndx]; - h->flags |= XCOFF_CALLED; /* If the symbol name starts with a period, it is the code of a function. If the symbol is currently undefined, then add an undefined symbol @@ -1890,11 +2147,12 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) hds = (struct xcoff_link_hash_entry *) bh; } hds->flags |= XCOFF_DESCRIPTOR; - BFD_ASSERT ((hds->flags & XCOFF_CALLED) == 0 - && (h->flags & XCOFF_DESCRIPTOR) == 0); + BFD_ASSERT ((h->flags & XCOFF_DESCRIPTOR) == 0); hds->descriptor = h; h->descriptor = hds; } + if (h->root.root.string[0] == '.') + h->flags |= XCOFF_CALLED; } } @@ -2078,7 +2336,7 @@ xcoff_link_check_ar_symbols (bfd *abfd, bfd_coff_swap_sym_in (abfd, (void *) esym, (void *) &sym); - if (sym.n_sclass == C_EXT && sym.n_scnum != N_UNDEF) + if (EXTERN_SYM_P (sym.n_sclass) && sym.n_scnum != N_UNDEF) { const char *name; char buf[SYMNMLEN + 1]; @@ -2127,6 +2385,9 @@ xcoff_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, bfd_boolean *pneeded) { + bfd_boolean keep_syms_p; + + keep_syms_p = (obj_coff_external_syms (abfd) != NULL); if (! _bfd_coff_get_external_symbols (abfd)) return FALSE; @@ -2137,9 +2398,11 @@ xcoff_link_check_archive_element (bfd *abfd, { if (! xcoff_link_add_symbols (abfd, info)) return FALSE; + if (info->keep_memory) + keep_syms_p = TRUE; } - if (! info->keep_memory || ! *pneeded) + if (!keep_syms_p) { if (! _bfd_coff_free_symbols (abfd)) return FALSE; @@ -2203,37 +2466,405 @@ _bfd_xcoff_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) } } -/* Mark a symbol as not being garbage, including the section in which - it is defined. */ - -static inline bfd_boolean -xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) +bfd_boolean +_bfd_xcoff_define_common_symbol (bfd *output_bfd ATTRIBUTE_UNUSED, + struct bfd_link_info *info ATTRIBUTE_UNUSED, + struct bfd_link_hash_entry *harg) { - if ((h->flags & XCOFF_MARK) != 0) - return TRUE; + struct xcoff_link_hash_entry *h; - h->flags |= XCOFF_MARK; - if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) + if (!bfd_generic_define_common_symbol (output_bfd, info, harg)) + return FALSE; + + h = (struct xcoff_link_hash_entry *) harg; + h->flags |= XCOFF_DEF_REGULAR; + return TRUE; +} + +/* If symbol H has not been interpreted as a function descriptor, + see whether it should be. Set up its descriptor information if so. */ + +static bfd_boolean +xcoff_find_function (struct bfd_link_info *info, + struct xcoff_link_hash_entry *h) +{ + if ((h->flags & XCOFF_DESCRIPTOR) == 0 + && h->root.root.string[0] != '.') { - asection *hsec; + char *fnname; + struct xcoff_link_hash_entry *hfn; + bfd_size_type amt; - hsec = h->root.u.def.section; - if (! bfd_is_abs_section (hsec) - && (hsec->flags & SEC_MARK) == 0) + amt = strlen (h->root.root.string) + 2; + fnname = bfd_malloc (amt); + if (fnname == NULL) + return FALSE; + fnname[0] = '.'; + strcpy (fnname + 1, h->root.root.string); + hfn = xcoff_link_hash_lookup (xcoff_hash_table (info), + fnname, FALSE, FALSE, TRUE); + free (fnname); + if (hfn != NULL + && hfn->smclas == XMC_PR + && (hfn->root.type == bfd_link_hash_defined + || hfn->root.type == bfd_link_hash_defweak)) { - if (! xcoff_mark (info, hsec)) - return FALSE; + h->flags |= XCOFF_DESCRIPTOR; + h->descriptor = hfn; + hfn->descriptor = h; } } + return TRUE; +} + +/* Return true if the given bfd contains at least one shared object. */ - if (h->toc_section != NULL - && (h->toc_section->flags & SEC_MARK) == 0) +static bfd_boolean +xcoff_archive_contains_shared_object_p (struct bfd_link_info *info, + bfd *archive) +{ + struct xcoff_archive_info *archive_info; + bfd *member; + + archive_info = xcoff_get_archive_info (info, archive); + if (!archive_info->know_contains_shared_object_p) { - if (! xcoff_mark (info, h->toc_section)) - return FALSE; + member = bfd_openr_next_archived_file (archive, NULL); + while (member != NULL && (member->flags & DYNAMIC) == 0) + member = bfd_openr_next_archived_file (archive, member); + + archive_info->contains_shared_object_p = (member != NULL); + archive_info->know_contains_shared_object_p = 1; } + return archive_info->contains_shared_object_p; +} +/* Symbol H qualifies for export by -bexpfull. Return true if it also + qualifies for export by -bexpall. */ + +static bfd_boolean +xcoff_covered_by_expall_p (struct xcoff_link_hash_entry *h) +{ + /* Exclude symbols beginning with '_'. */ + if (h->root.root.string[0] == '_') + return FALSE; + + /* Exclude archive members that would otherwise be unreferenced. */ + if ((h->flags & XCOFF_MARK) == 0 + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + && h->root.u.def.section->owner != NULL + && h->root.u.def.section->owner->my_archive != NULL) + return FALSE; + + return TRUE; +} + +/* Return true if symbol H qualifies for the forms of automatic export + specified by AUTO_EXPORT_FLAGS. */ + +static bfd_boolean +xcoff_auto_export_p (struct bfd_link_info *info, + struct xcoff_link_hash_entry *h, + unsigned int auto_export_flags) +{ + /* Don't automatically export things that were explicitly exported. */ + if ((h->flags & XCOFF_EXPORT) != 0) + return FALSE; + + /* Don't export things that we don't define. */ + if ((h->flags & XCOFF_DEF_REGULAR) == 0) + return FALSE; + + /* Don't export functions; export their descriptors instead. */ + if (h->root.root.string[0] == '.') + return FALSE; + + /* We don't export a symbol which is being defined by an object + included from an archive which contains a shared object. The + rationale is that if an archive contains both an unshared and + a shared object, then there must be some reason that the + unshared object is unshared, and we don't want to start + providing a shared version of it. In particular, this solves + a bug involving the _savefNN set of functions. gcc will call + those functions without providing a slot to restore the TOC, + so it is essential that these functions be linked in directly + and not from a shared object, which means that a shared + object which also happens to link them in must not export + them. This is confusing, but I haven't been able to think of + a different approach. Note that the symbols can, of course, + be exported explicitly. */ + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + { + bfd *owner; + + owner = h->root.u.def.section->owner; + if (owner != NULL + && owner->my_archive != NULL + && xcoff_archive_contains_shared_object_p (info, owner->my_archive)) + return FALSE; + } + + /* Otherwise, all symbols are exported by -bexpfull. */ + if ((auto_export_flags & XCOFF_EXPFULL) != 0) + return TRUE; + + /* Despite its name, -bexpall exports most but not all symbols. */ + if ((auto_export_flags & XCOFF_EXPALL) != 0 + && xcoff_covered_by_expall_p (h)) + return TRUE; + + return FALSE; +} + +/* Return true if relocation REL needs to be copied to the .loader section. + If REL is against a global symbol, H is that symbol, otherwise it + is null. */ + +static bfd_boolean +xcoff_need_ldrel_p (struct bfd_link_info *info, struct internal_reloc *rel, + struct xcoff_link_hash_entry *h) +{ + if (!xcoff_hash_table (info)->loader_section) + return FALSE; + + switch (rel->r_type) + { + case R_TOC: + case R_GL: + case R_TCL: + case R_TRL: + case R_TRLA: + /* We should never need a .loader reloc for a TOC-relative reloc. */ + return FALSE; + + default: + /* In this case, relocations against defined symbols can be resolved + statically. */ + if (h == NULL + || h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak + || h->root.type == bfd_link_hash_common) + return FALSE; + + /* We will always provide a local definition of function symbols, + even if we don't have one yet. */ + if ((h->flags & XCOFF_CALLED) != 0) + return FALSE; + + return TRUE; + + case R_POS: + case R_NEG: + case R_RL: + case R_RLA: + /* Absolute relocations against absolute symbols can be + resolved statically. */ + if (h != NULL + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + && bfd_is_abs_section (h->root.u.def.section)) + return FALSE; + + return TRUE; + } +} + +/* Mark a symbol as not being garbage, including the section in which + it is defined. */ + +static inline bfd_boolean +xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) +{ + if ((h->flags & XCOFF_MARK) != 0) + return TRUE; + + h->flags |= XCOFF_MARK; + + /* If we're marking an undefined symbol, try find some way of + defining it. */ + if (!info->relocatable + && (h->flags & XCOFF_IMPORT) == 0 + && (h->flags & XCOFF_DEF_REGULAR) == 0 + && (h->root.type == bfd_link_hash_undefined + || h->root.type == bfd_link_hash_undefweak)) + { + /* First check whether this symbol can be interpreted as an + undefined function descriptor for a defined function symbol. */ + if (!xcoff_find_function (info, h)) + return FALSE; + + if ((h->flags & XCOFF_DESCRIPTOR) != 0 + && (h->descriptor->root.type == bfd_link_hash_defined + || h->descriptor->root.type == bfd_link_hash_defweak)) + { + /* This is a descriptor for a defined symbol, but the input + objects have not defined the descriptor itself. Fill in + the definition automatically. + + Note that we do this even if we found a dynamic definition + of H. The local function definition logically overrides + the dynamic one. */ + asection *sec; + + sec = xcoff_hash_table (info)->descriptor_section; + h->root.type = bfd_link_hash_defined; + h->root.u.def.section = sec; + h->root.u.def.value = sec->size; + h->smclas = XMC_DS; + h->flags |= XCOFF_DEF_REGULAR; + + /* The size of the function descriptor depends on whether this + is xcoff32 (12) or xcoff64 (24). */ + sec->size += bfd_xcoff_function_descriptor_size (sec->owner); + + /* A function descriptor uses two relocs: one for the + associated code, and one for the TOC address. */ + xcoff_hash_table (info)->ldrel_count += 2; + sec->reloc_count += 2; + + /* Mark the function itself. */ + if (!xcoff_mark_symbol (info, h->descriptor)) + return FALSE; + + /* Mark the TOC section, so that we get an anchor + to relocate against. */ + if (!xcoff_mark (info, xcoff_hash_table (info)->toc_section)) + return FALSE; + + /* We handle writing out the contents of the descriptor in + xcoff_write_global_symbol. */ + } + else if (info->static_link) + /* We can't get a symbol value dynamically, so just assume + that it's undefined. */ + h->flags |= XCOFF_WAS_UNDEFINED; + else if ((h->flags & XCOFF_CALLED) != 0) + { + /* This is a function symbol for which we need to create + linkage code. */ + asection *sec; + struct xcoff_link_hash_entry *hds; + + /* Mark the descriptor (and its TOC section). */ + hds = h->descriptor; + BFD_ASSERT ((hds->root.type == bfd_link_hash_undefined + || hds->root.type == bfd_link_hash_undefweak) + && (hds->flags & XCOFF_DEF_REGULAR) == 0); + if (!xcoff_mark_symbol (info, hds)) + return FALSE; + + /* Treat this symbol as undefined if the descriptor was. */ + if ((hds->flags & XCOFF_WAS_UNDEFINED) != 0) + h->flags |= XCOFF_WAS_UNDEFINED; + + /* Allocate room for the global linkage code itself. */ + sec = xcoff_hash_table (info)->linkage_section; + h->root.type = bfd_link_hash_defined; + h->root.u.def.section = sec; + h->root.u.def.value = sec->size; + h->smclas = XMC_GL; + h->flags |= XCOFF_DEF_REGULAR; + sec->size += bfd_xcoff_glink_code_size (info->output_bfd); + + /* The global linkage code requires a TOC entry for the + descriptor. */ + if (hds->toc_section == NULL) + { + int byte_size; + + /* 32 vs 64 + xcoff32 uses 4 bytes in the toc. + xcoff64 uses 8 bytes in the toc. */ + if (bfd_xcoff_is_xcoff64 (info->output_bfd)) + byte_size = 8; + else if (bfd_xcoff_is_xcoff32 (info->output_bfd)) + byte_size = 4; + else + return FALSE; + + /* Allocate room in the fallback TOC section. */ + hds->toc_section = xcoff_hash_table (info)->toc_section; + hds->u.toc_offset = hds->toc_section->size; + hds->toc_section->size += byte_size; + if (!xcoff_mark (info, hds->toc_section)) + return FALSE; + + /* Allocate room for a static and dynamic R_TOC + relocation. */ + ++xcoff_hash_table (info)->ldrel_count; + ++hds->toc_section->reloc_count; + + /* Set the index to -2 to force this symbol to + get written out. */ + hds->indx = -2; + hds->flags |= XCOFF_SET_TOC | XCOFF_LDREL; + } + } + else if ((h->flags & XCOFF_DEF_DYNAMIC) == 0) + { + /* Record that the symbol was undefined, then import it. + -brtl links use a special fake import file. */ + h->flags |= XCOFF_WAS_UNDEFINED | XCOFF_IMPORT; + if (xcoff_hash_table (info)->rtld) + { + if (!xcoff_set_import_path (info, h, "", "..", "")) + return FALSE; + } + else + { + if (!xcoff_set_import_path (info, h, NULL, NULL, NULL)) + return FALSE; + } + } + } + + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + { + asection *hsec; + + hsec = h->root.u.def.section; + if (! bfd_is_abs_section (hsec) + && (hsec->flags & SEC_MARK) == 0) + { + if (! xcoff_mark (info, hsec)) + return FALSE; + } + } + + if (h->toc_section != NULL + && (h->toc_section->flags & SEC_MARK) == 0) + { + if (! xcoff_mark (info, h->toc_section)) + return FALSE; + } + + return TRUE; +} + +/* Look for a symbol called NAME. If the symbol is defined, mark it. + If the symbol exists, set FLAGS. */ + +static bfd_boolean +xcoff_mark_symbol_by_name (struct bfd_link_info *info, + const char *name, unsigned int flags) +{ + struct xcoff_link_hash_entry *h; + + h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, + FALSE, FALSE, TRUE); + if (h != NULL) + { + h->flags |= flags; + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + { + if (!xcoff_mark (info, h->root.u.def.section)) + return FALSE; + } + } return TRUE; } @@ -2256,26 +2887,24 @@ xcoff_mark (struct bfd_link_info *info, asection *sec) && coff_section_data (sec->owner, sec) != NULL && xcoff_section_data (sec->owner, sec) != NULL) { - struct xcoff_link_hash_entry **hp, **hpend; + struct xcoff_link_hash_entry **syms; struct internal_reloc *rel, *relend; + asection **csects; + unsigned long i, first, last; /* Mark all the symbols in this section. */ - hp = (obj_xcoff_sym_hashes (sec->owner) - + xcoff_section_data (sec->owner, sec)->first_symndx); - hpend = (obj_xcoff_sym_hashes (sec->owner) - + xcoff_section_data (sec->owner, sec)->last_symndx); - for (; hp < hpend; hp++) - { - struct xcoff_link_hash_entry *h; - - h = *hp; - if (h != NULL - && (h->flags & XCOFF_MARK) == 0) - { - if (! xcoff_mark_symbol (info, h)) - return FALSE; - } - } + syms = obj_xcoff_sym_hashes (sec->owner); + csects = xcoff_data (sec->owner)->csects; + first = xcoff_section_data (sec->owner, sec)->first_symndx; + last = xcoff_section_data (sec->owner, sec)->last_symndx; + for (i = first; i <= last; i++) + if (csects[i] == sec + && syms[i] != NULL + && (syms[i]->flags & XCOFF_MARK) == 0) + { + if (!xcoff_mark_symbol (info, syms[i])) + return FALSE; + } /* Look through the section relocs. */ if ((sec->flags & SEC_RELOC) != 0 @@ -2288,7 +2917,6 @@ xcoff_mark (struct bfd_link_info *info, asection *sec) relend = rel + sec->reloc_count; for (; rel < relend; rel++) { - asection *rsec; struct xcoff_link_hash_entry *h; if ((unsigned int) rel->r_symndx @@ -2296,57 +2924,34 @@ xcoff_mark (struct bfd_link_info *info, asection *sec) continue; h = obj_xcoff_sym_hashes (sec->owner)[rel->r_symndx]; - if (h != NULL - && (h->flags & XCOFF_MARK) == 0) + if (h != NULL) { - if (! xcoff_mark_symbol (info, h)) - return FALSE; + if ((h->flags & XCOFF_MARK) == 0) + { + if (!xcoff_mark_symbol (info, h)) + return FALSE; + } } - - rsec = xcoff_data (sec->owner)->csects[rel->r_symndx]; - if (rsec != NULL - && (rsec->flags & SEC_MARK) == 0) + else { - if (! xcoff_mark (info, rsec)) - return FALSE; + asection *rsec; + + rsec = xcoff_data (sec->owner)->csects[rel->r_symndx]; + if (rsec != NULL + && (rsec->flags & SEC_MARK) == 0) + { + if (!xcoff_mark (info, rsec)) + return FALSE; + } } /* See if this reloc needs to be copied into the .loader section. */ - switch (rel->r_type) + if (xcoff_need_ldrel_p (info, rel, h)) { - default: - if (h == NULL - || h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak - || h->root.type == bfd_link_hash_common - || ((h->flags & XCOFF_CALLED) != 0 - && (h->root.type == bfd_link_hash_undefined - || h->root.type == bfd_link_hash_undefweak) - && h->root.root.string[0] == '.' - && h->descriptor != NULL - && ((h->descriptor->flags & XCOFF_DEF_DYNAMIC) != 0 - || ((h->descriptor->flags & XCOFF_IMPORT) != 0 - && (h->descriptor->flags - & XCOFF_DEF_REGULAR) == 0)))) - break; - /* Fall through. */ - case R_POS: - case R_NEG: - case R_RL: - case R_RLA: ++xcoff_hash_table (info)->ldrel_count; if (h != NULL) h->flags |= XCOFF_LDREL; - break; - case R_TOC: - case R_GL: - case R_TCL: - case R_TRL: - case R_TRLA: - /* We should never need a .loader reloc for a TOC - relative reloc. */ - break; } } @@ -2390,7 +2995,6 @@ xcoff_sweep (struct bfd_link_info *info) || o == xcoff_hash_table (info)->debug_section || o == xcoff_hash_table (info)->loader_section || o == xcoff_hash_table (info)->linkage_section - || o == xcoff_hash_table (info)->toc_section || o == xcoff_hash_table (info)->descriptor_section || strcmp (o->name, ".debug") == 0) o->flags |= SEC_MARK; @@ -2398,7 +3002,6 @@ xcoff_sweep (struct bfd_link_info *info) { o->size = 0; o->reloc_count = 0; - o->lineno_count = 0; } } } @@ -2478,8 +3081,7 @@ bfd_xcoff_import_symbol (bfd *output_bfd, hds->root.u.undef.abfd = h->root.u.undef.abfd; } hds->flags |= XCOFF_DESCRIPTOR; - BFD_ASSERT ((hds->flags & XCOFF_CALLED) == 0 - && (h->flags & XCOFF_DESCRIPTOR) == 0); + BFD_ASSERT ((h->flags & XCOFF_DESCRIPTOR) == 0); hds->descriptor = h; h->descriptor = hds; } @@ -2509,48 +3111,11 @@ bfd_xcoff_import_symbol (bfd *output_bfd, h->root.type = bfd_link_hash_defined; h->root.u.def.section = bfd_abs_section_ptr; h->root.u.def.value = val; + h->smclas = XMC_XO; } - /* We overload the ldindx field to hold the l_ifile value for this - symbol. */ - BFD_ASSERT (h->ldsym == NULL); - BFD_ASSERT ((h->flags & XCOFF_BUILT_LDSYM) == 0); - if (imppath == NULL) - h->ldindx = -1; - else - { - unsigned int c; - struct xcoff_import_file **pp; - - /* We start c at 1 because the first entry in the import list is - reserved for the library search path. */ - for (pp = &xcoff_hash_table (info)->imports, c = 1; - *pp != NULL; - pp = &(*pp)->next, ++c) - { - if (strcmp ((*pp)->path, imppath) == 0 - && strcmp ((*pp)->file, impfile) == 0 - && strcmp ((*pp)->member, impmember) == 0) - break; - } - - if (*pp == NULL) - { - struct xcoff_import_file *n; - bfd_size_type amt = sizeof (* n); - - n = bfd_alloc (output_bfd, amt); - if (n == NULL) - return FALSE; - n->next = NULL; - n->path = imppath; - n->file = impfile; - n->member = impmember; - *pp = n; - } - - h->ldindx = c; - } + if (!xcoff_set_import_path (info, h, imppath, impfile, impmember)) + return FALSE; return TRUE; } @@ -2572,34 +3137,6 @@ bfd_xcoff_export_symbol (bfd *output_bfd, /* FIXME: I'm not at all sure what syscall is supposed to mean, so I'm just going to ignore it until somebody explains it. */ - /* See if this is a function descriptor. It may be one even though - it is not so marked. */ - if ((h->flags & XCOFF_DESCRIPTOR) == 0 - && h->root.root.string[0] != '.') - { - char *fnname; - struct xcoff_link_hash_entry *hfn; - bfd_size_type amt = strlen (h->root.root.string) + 2; - - fnname = bfd_malloc (amt); - if (fnname == NULL) - return FALSE; - fnname[0] = '.'; - strcpy (fnname + 1, h->root.root.string); - hfn = xcoff_link_hash_lookup (xcoff_hash_table (info), - fnname, FALSE, FALSE, TRUE); - free (fnname); - if (hfn != NULL - && hfn->smclas == XMC_PR - && (hfn->root.type == bfd_link_hash_defined - || hfn->root.type == bfd_link_hash_defweak)) - { - h->flags |= XCOFF_DESCRIPTOR; - h->descriptor = hfn; - hfn->descriptor = h; - } - } - /* Make sure we don't garbage collect this symbol. */ if (! xcoff_mark_symbol (info, h)) return FALSE; @@ -2642,8 +3179,12 @@ bfd_xcoff_link_count_reloc (bfd *output_bfd, return FALSE; } - h->flags |= XCOFF_REF_REGULAR | XCOFF_LDREL; - ++xcoff_hash_table (info)->ldrel_count; + h->flags |= XCOFF_REF_REGULAR; + if (xcoff_hash_table (info)->loader_section) + { + h->flags |= XCOFF_LDREL; + ++xcoff_hash_table (info)->ldrel_count; + } /* Mark the symbol to avoid garbage collection. */ if (! xcoff_mark_symbol (info, h)) @@ -2675,82 +3216,134 @@ bfd_xcoff_record_link_assignment (bfd *output_bfd, return TRUE; } -/* Add a symbol to the .loader symbols, if necessary. */ +/* An xcoff_link_hash_traverse callback for which DATA points to an + xcoff_loader_info. Mark all symbols that should be automatically + exported. */ static bfd_boolean -xcoff_build_ldsyms (struct xcoff_link_hash_entry *h, void * p) +xcoff_mark_auto_exports (struct xcoff_link_hash_entry *h, void *data) { - struct xcoff_loader_info *ldinfo = (struct xcoff_loader_info *) p; - bfd_size_type amt; + struct xcoff_loader_info *ldinfo; - if (h->root.type == bfd_link_hash_warning) - h = (struct xcoff_link_hash_entry *) h->root.u.i.link; + ldinfo = (struct xcoff_loader_info *) data; + if (xcoff_auto_export_p (ldinfo->info, h, ldinfo->auto_export_flags)) + { + if (!xcoff_mark_symbol (ldinfo->info, h)) + ldinfo->failed = TRUE; + } + return TRUE; +} - /* __rtinit, this symbol has special handling. */ - if (h->flags & XCOFF_RTINIT) +/* Add a symbol to the .loader symbols, if necessary. */ + +/* INPUT_BFD has an external symbol associated with hash table entry H + and csect CSECT. Return true if INPUT_BFD defines H. */ + +static bfd_boolean +xcoff_final_definition_p (bfd *input_bfd, struct xcoff_link_hash_entry *h, + asection *csect) +{ + switch (h->root.type) + { + case bfd_link_hash_defined: + case bfd_link_hash_defweak: + /* No input bfd owns absolute symbols. They are written by + xcoff_write_global_symbol instead. */ + return (!bfd_is_abs_section (csect) + && h->root.u.def.section == csect); + + case bfd_link_hash_common: + return h->root.u.c.p->section->owner == input_bfd; + + case bfd_link_hash_undefined: + case bfd_link_hash_undefweak: + /* We can't treat undef.abfd as the owner because that bfd + might be a dynamic object. Allow any bfd to claim it. */ return TRUE; - /* If this is a final link, and the symbol was defined as a common - symbol in a regular object file, and there was no definition in - any dynamic object, then the linker will have allocated space for - the symbol in a common section but the XCOFF_DEF_REGULAR flag - will not have been set. */ - if (h->root.type == bfd_link_hash_defined - && (h->flags & XCOFF_DEF_REGULAR) == 0 - && (h->flags & XCOFF_REF_REGULAR) != 0 - && (h->flags & XCOFF_DEF_DYNAMIC) == 0 - && (bfd_is_abs_section (h->root.u.def.section) - || (h->root.u.def.section->owner->flags & DYNAMIC) == 0)) - h->flags |= XCOFF_DEF_REGULAR; - - /* If all defined symbols should be exported, mark them now. We - don't want to export the actual functions, just the function - descriptors. */ - if (ldinfo->export_defineds - && (h->flags & XCOFF_DEF_REGULAR) != 0 - && h->root.root.string[0] != '.') + default: + abort (); + } +} + +/* See if H should have a loader symbol associated with it. */ + +static bfd_boolean +xcoff_build_ldsym (struct xcoff_loader_info *ldinfo, + struct xcoff_link_hash_entry *h) +{ + bfd_size_type amt; + + /* Warn if this symbol is exported but not defined. */ + if ((h->flags & XCOFF_EXPORT) != 0 + && (h->flags & XCOFF_WAS_UNDEFINED) != 0) { - bfd_boolean export; - - /* We don't export a symbol which is being defined by an object - included from an archive which contains a shared object. The - rationale is that if an archive contains both an unshared and - a shared object, then there must be some reason that the - unshared object is unshared, and we don't want to start - providing a shared version of it. In particular, this solves - a bug involving the _savefNN set of functions. gcc will call - those functions without providing a slot to restore the TOC, - so it is essential that these functions be linked in directly - and not from a shared object, which means that a shared - object which also happens to link them in must not export - them. This is confusing, but I haven't been able to think of - a different approach. Note that the symbols can, of course, - be exported explicitly. */ - export = TRUE; - if ((h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - && h->root.u.def.section->owner != NULL - && h->root.u.def.section->owner->my_archive != NULL) - { - bfd *arbfd, *member; + (*_bfd_error_handler) + (_("warning: attempt to export undefined symbol `%s'"), + h->root.root.string); + return TRUE; + } - arbfd = h->root.u.def.section->owner->my_archive; - member = bfd_openr_next_archived_file (arbfd, NULL); - while (member != NULL) - { - if ((member->flags & DYNAMIC) != 0) - { - export = FALSE; - break; - } - member = bfd_openr_next_archived_file (arbfd, member); - } - } + /* We need to add a symbol to the .loader section if it is mentioned + in a reloc which we are copying to the .loader section and it was + not defined or common, or if it is the entry point, or if it is + being exported. */ + if (((h->flags & XCOFF_LDREL) == 0 + || h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak + || h->root.type == bfd_link_hash_common) + && (h->flags & XCOFF_ENTRY) == 0 + && (h->flags & XCOFF_EXPORT) == 0) + return TRUE; - if (export) - h->flags |= XCOFF_EXPORT; + /* We need to add this symbol to the .loader symbols. */ + + BFD_ASSERT (h->ldsym == NULL); + amt = sizeof (struct internal_ldsym); + h->ldsym = bfd_zalloc (ldinfo->output_bfd, amt); + if (h->ldsym == NULL) + { + ldinfo->failed = TRUE; + return FALSE; } + if ((h->flags & XCOFF_IMPORT) != 0) + { + /* Give imported descriptors class XMC_DS rather than XMC_UA. */ + if ((h->flags & XCOFF_DESCRIPTOR) != 0) + h->smclas = XMC_DS; + h->ldsym->l_ifile = h->ldindx; + } + + /* The first 3 symbol table indices are reserved to indicate the + data, text and bss sections. */ + h->ldindx = ldinfo->ldsym_count + 3; + + ++ldinfo->ldsym_count; + + if (! bfd_xcoff_put_ldsymbol_name (ldinfo->output_bfd, ldinfo, + h->ldsym, h->root.root.string)) + return FALSE; + + h->flags |= XCOFF_BUILT_LDSYM; + return TRUE; +} + +/* An xcoff_htab_traverse callback that is called for each symbol + once garbage collection is complete. */ + +static bfd_boolean +xcoff_post_gc_symbol (struct xcoff_link_hash_entry *h, void * p) +{ + struct xcoff_loader_info *ldinfo = (struct xcoff_loader_info *) p; + + if (h->root.type == bfd_link_hash_warning) + h = (struct xcoff_link_hash_entry *) h->root.u.i.link; + + /* __rtinit, this symbol has special handling. */ + if (h->flags & XCOFF_RTINIT) + return TRUE; + /* We don't want to garbage collect symbols which are not defined in XCOFF files. This is a convenient place to mark them. */ if (xcoff_hash_table (ldinfo->info)->gc @@ -2762,187 +3355,237 @@ xcoff_build_ldsyms (struct xcoff_link_hash_entry *h, void * p) != ldinfo->info->output_bfd->xvec))) h->flags |= XCOFF_MARK; - /* If this symbol is called and defined in a dynamic object, or it - is imported, then we need to set up global linkage code for it. - (Unless we did garbage collection and we didn't need this - symbol.) */ - if ((h->flags & XCOFF_CALLED) != 0 - && (h->root.type == bfd_link_hash_undefined - || h->root.type == bfd_link_hash_undefweak) - && h->root.root.string[0] == '.' - && h->descriptor != NULL - && ((h->descriptor->flags & XCOFF_DEF_DYNAMIC) != 0 - || ((h->descriptor->flags & XCOFF_IMPORT) != 0 - && (h->descriptor->flags & XCOFF_DEF_REGULAR) == 0)) - && (! xcoff_hash_table (ldinfo->info)->gc - || (h->flags & XCOFF_MARK) != 0)) - { - asection *sec; - struct xcoff_link_hash_entry *hds; - - sec = xcoff_hash_table (ldinfo->info)->linkage_section; - h->root.type = bfd_link_hash_defined; - h->root.u.def.section = sec; - h->root.u.def.value = sec->size; - h->smclas = XMC_GL; - h->flags |= XCOFF_DEF_REGULAR; - sec->size += bfd_xcoff_glink_code_size(ldinfo->output_bfd); - - /* The global linkage code requires a TOC entry for the - descriptor. */ - hds = h->descriptor; - BFD_ASSERT ((hds->root.type == bfd_link_hash_undefined - || hds->root.type == bfd_link_hash_undefweak) - && (hds->flags & XCOFF_DEF_REGULAR) == 0); - hds->flags |= XCOFF_MARK; - if (hds->toc_section == NULL) - { - int byte_size; - - /* 32 vs 64 - xcoff32 uses 4 bytes in the toc. - xcoff64 uses 8 bytes in the toc. */ - if (bfd_xcoff_is_xcoff64 (ldinfo->output_bfd)) - byte_size = 8; - else if (bfd_xcoff_is_xcoff32 (ldinfo->output_bfd)) - byte_size = 4; - else - return FALSE; - - hds->toc_section = xcoff_hash_table (ldinfo->info)->toc_section; - hds->u.toc_offset = hds->toc_section->size; - hds->toc_section->size += byte_size; - ++xcoff_hash_table (ldinfo->info)->ldrel_count; - ++hds->toc_section->reloc_count; - hds->indx = -2; - hds->flags |= XCOFF_SET_TOC | XCOFF_LDREL; - - /* We need to call xcoff_build_ldsyms recursively here, - because we may already have passed hds on the traversal. */ - xcoff_build_ldsyms (hds, p); - } - } - - /* If this symbol is exported, but not defined, we need to try to - define it. */ - if ((h->flags & XCOFF_EXPORT) != 0 - && (h->flags & XCOFF_IMPORT) == 0 - && (h->flags & XCOFF_DEF_REGULAR) == 0 - && (h->flags & XCOFF_DEF_DYNAMIC) == 0 - && (h->root.type == bfd_link_hash_undefined - || h->root.type == bfd_link_hash_undefweak)) - { - if ((h->flags & XCOFF_DESCRIPTOR) != 0 - && (h->descriptor->root.type == bfd_link_hash_defined - || h->descriptor->root.type == bfd_link_hash_defweak)) - { - asection *sec; - - /* This is an undefined function descriptor associated with - a defined entry point. We can build up a function - descriptor ourselves. Believe it or not, the AIX linker - actually does this, and there are cases where we need to - do it as well. */ - sec = xcoff_hash_table (ldinfo->info)->descriptor_section; - h->root.type = bfd_link_hash_defined; - h->root.u.def.section = sec; - h->root.u.def.value = sec->size; - h->smclas = XMC_DS; - h->flags |= XCOFF_DEF_REGULAR; - - /* The size of the function descriptor depends if this is an - xcoff32 (12) or xcoff64 (24). */ - sec->size += - bfd_xcoff_function_descriptor_size(ldinfo->output_bfd); - - /* A function descriptor uses two relocs: one for the - associated code, and one for the TOC address. */ - xcoff_hash_table (ldinfo->info)->ldrel_count += 2; - sec->reloc_count += 2; - - /* We handle writing out the contents of the descriptor in - xcoff_write_global_symbol. */ - } - else - { - (*_bfd_error_handler) - (_("warning: attempt to export undefined symbol `%s'"), - h->root.root.string); - h->ldsym = NULL; - return TRUE; - } - } + /* Skip discarded symbols. */ + if (xcoff_hash_table (ldinfo->info)->gc + && (h->flags & XCOFF_MARK) == 0) + return TRUE; /* If this is still a common symbol, and it wasn't garbage collected, we need to actually allocate space for it in the .bss section. */ if (h->root.type == bfd_link_hash_common - && (! xcoff_hash_table (ldinfo->info)->gc - || (h->flags & XCOFF_MARK) != 0) && h->root.u.c.p->section->size == 0) { BFD_ASSERT (bfd_is_com_section (h->root.u.c.p->section)); h->root.u.c.p->section->size = h->root.u.c.size; } - /* We need to add a symbol to the .loader section if it is mentioned - in a reloc which we are copying to the .loader section and it was - not defined or common, or if it is the entry point, or if it is - being exported. */ + if (xcoff_hash_table (ldinfo->info)->loader_section) + { + if (xcoff_auto_export_p (ldinfo->info, h, ldinfo->auto_export_flags)) + h->flags |= XCOFF_EXPORT; - if (((h->flags & XCOFF_LDREL) == 0 - || h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak - || h->root.type == bfd_link_hash_common) - && (h->flags & XCOFF_ENTRY) == 0 - && (h->flags & XCOFF_EXPORT) == 0) + if (!xcoff_build_ldsym (ldinfo, h)) + return FALSE; + } + + return TRUE; +} + +/* INPUT_BFD includes XCOFF symbol ISYM, which is associated with linker + hash table entry H and csect CSECT. AUX contains ISYM's auxillary + csect information, if any. NAME is the function's name if the name + is stored in the .debug section, otherwise it is null. + + Return 1 if we should include an appropriately-adjusted ISYM + in the output file, 0 if we should discard ISYM, or -1 if an + error occured. */ + +static int +xcoff_keep_symbol_p (struct bfd_link_info *info, bfd *input_bfd, + struct internal_syment *isym, + union internal_auxent *aux, + struct xcoff_link_hash_entry *h, + asection *csect, const char *name) +{ + int smtyp; + + /* If we are skipping this csect, we want to strip the symbol too. */ + if (csect == NULL) + return 0; + + /* Likewise if we garbage-collected the csect. */ + if (xcoff_hash_table (info)->gc + && !bfd_is_abs_section (csect) + && !bfd_is_und_section (csect) + && (csect->flags & SEC_MARK) == 0) + return 0; + + /* An XCOFF linker always removes C_STAT symbols. */ + if (isym->n_sclass == C_STAT) + return 0; + + /* We generate the TOC anchor separately. */ + if (isym->n_sclass == C_HIDEXT + && aux->x_csect.x_smclas == XMC_TC0) + return 0; + + /* If we are stripping all symbols, we want to discard this one. */ + if (info->strip == strip_all) + return 0; + + /* Discard symbols that are defined elsewhere. */ + if (EXTERN_SYM_P (isym->n_sclass)) { - h->ldsym = NULL; - return TRUE; + if ((h->flags & XCOFF_ALLOCATED) != 0) + return 0; + if (!xcoff_final_definition_p (input_bfd, h, csect)) + return 0; } - /* We don't need to add this symbol if we did garbage collection and - we did not mark this symbol. */ - if (xcoff_hash_table (ldinfo->info)->gc - && (h->flags & XCOFF_MARK) == 0) + /* If we're discarding local symbols, check whether ISYM is local. */ + smtyp = SMTYP_SMTYP (aux->x_csect.x_smtyp); + if (info->discard == discard_all + && !EXTERN_SYM_P (isym->n_sclass) + && (isym->n_sclass != C_HIDEXT || smtyp != XTY_SD)) + return 0; + + /* If we're stripping debugging symbols, check whether ISYM is one. */ + if (info->strip == strip_debugger + && isym->n_scnum == N_DEBUG) + return 0; + + /* If we are stripping symbols based on name, check how ISYM's + name should be handled. */ + if (info->strip == strip_some + || info->discard == discard_l) { - h->ldsym = NULL; - return TRUE; + char buf[SYMNMLEN + 1]; + + if (name == NULL) + { + name = _bfd_coff_internal_syment_name (input_bfd, isym, buf); + if (name == NULL) + return -1; + } + + if (info->strip == strip_some + && bfd_hash_lookup (info->keep_hash, name, FALSE, FALSE) == NULL) + return 0; + + if (info->discard == discard_l + && !EXTERN_SYM_P (isym->n_sclass) + && (isym->n_sclass != C_HIDEXT || smtyp != XTY_SD) + && bfd_is_local_label_name (input_bfd, name)) + return 0; } - /* We may have already processed this symbol due to the recursive - call above. */ - if ((h->flags & XCOFF_BUILT_LDSYM) != 0) - return TRUE; + return 1; +} - /* We need to add this symbol to the .loader symbols. */ +/* Lay out the .loader section, filling in the header and the import paths. + LIBPATH is as for bfd_xcoff_size_dynamic_sections. */ - BFD_ASSERT (h->ldsym == NULL); - amt = sizeof (struct internal_ldsym); - h->ldsym = bfd_zalloc (ldinfo->output_bfd, amt); - if (h->ldsym == NULL) +static bfd_boolean +xcoff_build_loader_section (struct xcoff_loader_info *ldinfo, + const char *libpath) +{ + bfd *output_bfd; + struct xcoff_link_hash_table *htab; + struct internal_ldhdr *ldhdr; + struct xcoff_import_file *fl; + bfd_size_type stoff; + size_t impsize, impcount; + asection *lsec; + char *out; + + /* Work out the size of the import file names. Each import file ID + consists of three null terminated strings: the path, the file + name, and the archive member name. The first entry in the list + of names is the path to use to find objects, which the linker has + passed in as the libpath argument. For some reason, the path + entry in the other import file names appears to always be empty. */ + output_bfd = ldinfo->output_bfd; + htab = xcoff_hash_table (ldinfo->info); + impsize = strlen (libpath) + 3; + impcount = 1; + for (fl = htab->imports; fl != NULL; fl = fl->next) { - ldinfo->failed = TRUE; - return FALSE; + ++impcount; + impsize += (strlen (fl->path) + + strlen (fl->file) + + strlen (fl->member) + + 3); } - if ((h->flags & XCOFF_IMPORT) != 0) - h->ldsym->l_ifile = h->ldindx; + /* Set up the .loader section header. */ + ldhdr = &htab->ldhdr; + ldhdr->l_version = bfd_xcoff_ldhdr_version(output_bfd); + ldhdr->l_nsyms = ldinfo->ldsym_count; + ldhdr->l_nreloc = htab->ldrel_count; + ldhdr->l_istlen = impsize; + ldhdr->l_nimpid = impcount; + ldhdr->l_impoff = (bfd_xcoff_ldhdrsz (output_bfd) + + ldhdr->l_nsyms * bfd_xcoff_ldsymsz (output_bfd) + + ldhdr->l_nreloc * bfd_xcoff_ldrelsz (output_bfd)); + ldhdr->l_stlen = ldinfo->string_size; + stoff = ldhdr->l_impoff + impsize; + if (ldinfo->string_size == 0) + ldhdr->l_stoff = 0; + else + ldhdr->l_stoff = stoff; - /* The first 3 symbol table indices are reserved to indicate the - data, text and bss sections. */ - h->ldindx = ldinfo->ldsym_count + 3; + /* 64 bit elements to ldhdr + The swap out routine for 32 bit will ignore them. + Nothing fancy, symbols come after the header and relocs come + after symbols. */ + ldhdr->l_symoff = bfd_xcoff_ldhdrsz (output_bfd); + ldhdr->l_rldoff = (bfd_xcoff_ldhdrsz (output_bfd) + + ldhdr->l_nsyms * bfd_xcoff_ldsymsz (output_bfd)); - ++ldinfo->ldsym_count; + /* We now know the final size of the .loader section. Allocate + space for it. */ + lsec = htab->loader_section; + lsec->size = stoff + ldhdr->l_stlen; + lsec->contents = bfd_zalloc (output_bfd, lsec->size); + if (lsec->contents == NULL) + return FALSE; + + /* Set up the header. */ + bfd_xcoff_swap_ldhdr_out (output_bfd, ldhdr, lsec->contents); + + /* Set up the import file names. */ + out = (char *) lsec->contents + ldhdr->l_impoff; + strcpy (out, libpath); + out += strlen (libpath) + 1; + *out++ = '\0'; + *out++ = '\0'; + for (fl = htab->imports; fl != NULL; fl = fl->next) + { + const char *s; + + s = fl->path; + while ((*out++ = *s++) != '\0') + ; + s = fl->file; + while ((*out++ = *s++) != '\0') + ; + s = fl->member; + while ((*out++ = *s++) != '\0') + ; + } + + BFD_ASSERT ((bfd_size_type) ((bfd_byte *) out - lsec->contents) == stoff); - if (! bfd_xcoff_put_ldsymbol_name (ldinfo->output_bfd, ldinfo, - h->ldsym, h->root.root.string)) - return FALSE; + /* Set up the symbol string table. */ + if (ldinfo->string_size > 0) + { + memcpy (out, ldinfo->strings, ldinfo->string_size); + free (ldinfo->strings); + ldinfo->strings = NULL; + } - h->flags |= XCOFF_BUILT_LDSYM; + /* We can't set up the symbol table or the relocs yet, because we + don't yet know the final position of the various sections. The + .loader symbols are written out when the corresponding normal + symbols are written out in xcoff_link_input_bfd or + xcoff_write_global_symbol. The .loader relocs are written out + when the corresponding normal relocs are handled in + xcoff_link_input_bfd. */ return TRUE; } + /* Build the .loader section. This is called by the XCOFF linker emulation before_allocation routine. We must set the size of the .loader section before the linker lays out the output file. @@ -2955,10 +3598,9 @@ xcoff_build_ldsyms (struct xcoff_link_hash_entry *h, void * p) -bmaxdata linker option). GC is whether to do garbage collection (the -bgc linker option). MODTYPE is the module type (the -bmodtype linker option). TEXTRO is whether the text section must - be read only (the -btextro linker option). EXPORT_DEFINEDS is - whether all defined symbols should be exported (the -unix linker - option). SPECIAL_SECTIONS is set by this routine to csects with - magic names like _end. */ + be read only (the -btextro linker option). AUTO_EXPORT_FLAGS + is a mask of XCOFF_EXPALL and XCOFF_EXPFULL. SPECIAL_SECTIONS + is set by this routine to csects with magic names like _end. */ bfd_boolean bfd_xcoff_size_dynamic_sections (bfd *output_bfd, @@ -2971,19 +3613,12 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, bfd_boolean gc, int modtype, bfd_boolean textro, - bfd_boolean export_defineds, + unsigned int auto_export_flags, asection **special_sections, bfd_boolean rtld) { - struct xcoff_link_hash_entry *hentry; - asection *lsec; struct xcoff_loader_info ldinfo; int i; - size_t impsize, impcount; - struct xcoff_import_file *fl; - struct internal_ldhdr *ldhdr; - bfd_size_type stoff; - char *out; asection *sec; bfd *sub; struct bfd_strtab_hash *debug_strtab; @@ -3000,7 +3635,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, ldinfo.failed = FALSE; ldinfo.output_bfd = output_bfd; ldinfo.info = info; - ldinfo.export_defineds = export_defineds; + ldinfo.auto_export_flags = auto_export_flags; ldinfo.ldsym_count = 0; ldinfo.string_size = 0; ldinfo.strings = NULL; @@ -3012,18 +3647,11 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, xcoff_hash_table (info)->file_align = file_align; xcoff_hash_table (info)->textro = textro; - - hentry = NULL; - if (entry != NULL) - { - hentry = xcoff_link_hash_lookup (xcoff_hash_table (info), entry, - FALSE, FALSE, TRUE); - if (hentry != NULL) - hentry->flags |= XCOFF_ENTRY; - } + xcoff_hash_table (info)->rtld = rtld; /* __rtinit */ - if (info->init_function || info->fini_function || rtld) + if (xcoff_hash_table (info)->loader_section + && (info->init_function || info->fini_function || rtld)) { struct xcoff_link_hash_entry *hsym; struct internal_ldsym *ldsym; @@ -3074,11 +3702,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, } /* Garbage collect unused sections. */ - if (info->relocatable - || ! gc - || hentry == NULL - || (hentry->root.type != bfd_link_hash_defined - && hentry->root.type != bfd_link_hash_defweak)) + if (info->relocatable || !gc) { gc = FALSE; xcoff_hash_table (info)->gc = FALSE; @@ -3091,7 +3715,12 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, for (o = sub->sections; o != NULL; o = o->next) { - if ((o->flags & SEC_MARK) == 0) + /* We shouldn't unconditionaly mark the TOC section. + The output file should only have a TOC if either + (a) one of the input files did or (b) we end up + creating TOC references as part of the link process. */ + if (o != xcoff_hash_table (info)->toc_section + && (o->flags & SEC_MARK) == 0) { if (! xcoff_mark (info, o)) goto error_return; @@ -3101,8 +3730,22 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, } else { - if (! xcoff_mark (info, hentry->root.u.def.section)) + if (entry != NULL + && !xcoff_mark_symbol_by_name (info, entry, XCOFF_ENTRY)) goto error_return; + if (info->init_function != NULL + && !xcoff_mark_symbol_by_name (info, info->init_function, 0)) + goto error_return; + if (info->fini_function != NULL + && !xcoff_mark_symbol_by_name (info, info->fini_function, 0)) + goto error_return; + if (auto_export_flags != 0) + { + xcoff_link_hash_traverse (xcoff_hash_table (info), + xcoff_mark_auto_exports, &ldinfo); + if (ldinfo.failed) + goto error_return; + } xcoff_sweep (info); xcoff_hash_table (info)->gc = TRUE; } @@ -3124,103 +3767,15 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, /* I'm not sure what to do in this bizarre case. */ return TRUE; - xcoff_link_hash_traverse (xcoff_hash_table (info), xcoff_build_ldsyms, + xcoff_link_hash_traverse (xcoff_hash_table (info), xcoff_post_gc_symbol, (void *) &ldinfo); if (ldinfo.failed) goto error_return; - /* Work out the size of the import file names. Each import file ID - consists of three null terminated strings: the path, the file - name, and the archive member name. The first entry in the list - of names is the path to use to find objects, which the linker has - passed in as the libpath argument. For some reason, the path - entry in the other import file names appears to always be empty. */ - impsize = strlen (libpath) + 3; - impcount = 1; - for (fl = xcoff_hash_table (info)->imports; fl != NULL; fl = fl->next) - { - ++impcount; - impsize += (strlen (fl->path) - + strlen (fl->file) - + strlen (fl->member) - + 3); - } - - /* Set up the .loader section header. */ - ldhdr = &xcoff_hash_table (info)->ldhdr; - ldhdr->l_version = bfd_xcoff_ldhdr_version(output_bfd); - ldhdr->l_nsyms = ldinfo.ldsym_count; - ldhdr->l_nreloc = xcoff_hash_table (info)->ldrel_count; - ldhdr->l_istlen = impsize; - ldhdr->l_nimpid = impcount; - ldhdr->l_impoff = (bfd_xcoff_ldhdrsz(output_bfd) - + ldhdr->l_nsyms * bfd_xcoff_ldsymsz(output_bfd) - + ldhdr->l_nreloc * bfd_xcoff_ldrelsz(output_bfd)); - ldhdr->l_stlen = ldinfo.string_size; - stoff = ldhdr->l_impoff + impsize; - if (ldinfo.string_size == 0) - ldhdr->l_stoff = 0; - else - ldhdr->l_stoff = stoff; - - /* 64 bit elements to ldhdr - The swap out routine for 32 bit will ignore them. - Nothing fancy, symbols come after the header and relocs come - after symbols. */ - ldhdr->l_symoff = bfd_xcoff_ldhdrsz (output_bfd); - ldhdr->l_rldoff = (bfd_xcoff_ldhdrsz (output_bfd) - + ldhdr->l_nsyms * bfd_xcoff_ldsymsz (output_bfd)); - - /* We now know the final size of the .loader section. Allocate - space for it. */ - lsec = xcoff_hash_table (info)->loader_section; - lsec->size = stoff + ldhdr->l_stlen; - lsec->contents = bfd_zalloc (output_bfd, lsec->size); - if (lsec->contents == NULL) + if (xcoff_hash_table (info)->loader_section + && !xcoff_build_loader_section (&ldinfo, libpath)) goto error_return; - /* Set up the header. */ - bfd_xcoff_swap_ldhdr_out (output_bfd, ldhdr, lsec->contents); - - /* Set up the import file names. */ - out = (char *) lsec->contents + ldhdr->l_impoff; - strcpy (out, libpath); - out += strlen (libpath) + 1; - *out++ = '\0'; - *out++ = '\0'; - for (fl = xcoff_hash_table (info)->imports; fl != NULL; fl = fl->next) - { - const char *s; - - s = fl->path; - while ((*out++ = *s++) != '\0') - ; - s = fl->file; - while ((*out++ = *s++) != '\0') - ; - s = fl->member; - while ((*out++ = *s++) != '\0') - ; - } - - BFD_ASSERT ((bfd_size_type) ((bfd_byte *) out - lsec->contents) == stoff); - - /* Set up the symbol string table. */ - if (ldinfo.string_size > 0) - { - memcpy (out, ldinfo.strings, ldinfo.string_size); - free (ldinfo.strings); - ldinfo.strings = NULL; - } - - /* We can't set up the symbol table or the relocs yet, because we - don't yet know the final position of the various sections. The - .loader symbols are written out when the corresponding normal - symbols are written out in xcoff_link_input_bfd or - xcoff_write_global_symbol. The .loader relocs are written out - when the corresponding normal relocs are handled in - xcoff_link_input_bfd. */ - /* Allocate space for the magic sections. */ sec = xcoff_hash_table (info)->linkage_section; if (sec->size > 0) @@ -3244,96 +3799,142 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, goto error_return; } - /* Now that we've done garbage collection, figure out the contents - of the .debug section. */ + /* Now that we've done garbage collection, decide which symbols to keep, + and figure out the contents of the .debug section. */ debug_strtab = xcoff_hash_table (info)->debug_strtab; for (sub = info->input_bfds; sub != NULL; sub = sub->link_next) { asection *subdeb; bfd_size_type symcount; - unsigned long *debug_index; + long *debug_index; asection **csectpp; + unsigned int *lineno_counts; + struct xcoff_link_hash_entry **sym_hash; bfd_byte *esym, *esymend; bfd_size_type symesz; if (sub->xvec != info->output_bfd->xvec) continue; - subdeb = bfd_get_section_by_name (sub, ".debug"); - if (subdeb == NULL || subdeb->size == 0) - continue; - if (info->strip == strip_all - || info->strip == strip_debugger - || info->discard == discard_all) - { - subdeb->size = 0; - continue; - } + if ((sub->flags & DYNAMIC) != 0 + && !info->static_link) + continue; if (! _bfd_coff_get_external_symbols (sub)) goto error_return; symcount = obj_raw_syment_count (sub); - debug_index = bfd_zalloc (sub, symcount * sizeof (unsigned long)); + debug_index = bfd_zalloc (sub, symcount * sizeof (long)); if (debug_index == NULL) goto error_return; xcoff_data (sub)->debug_indices = debug_index; - /* Grab the contents of the .debug section. We use malloc and - copy the names into the debug stringtab, rather than - bfd_alloc, because I expect that, when linking many files - together, many of the strings will be the same. Storing the - strings in the hash table should save space in this case. */ - if (! bfd_malloc_and_get_section (sub, subdeb, &debug_contents)) - goto error_return; + if (info->strip == strip_all + || info->strip == strip_debugger + || info->discard == discard_all) + /* We're stripping all debugging information, so there's no need + to read SUB's .debug section. */ + subdeb = NULL; + else + { + /* Grab the contents of SUB's .debug section, if any. */ + subdeb = bfd_get_section_by_name (sub, ".debug"); + if (subdeb != NULL && subdeb->size > 0) + { + /* We use malloc and copy the names into the debug + stringtab, rather than bfd_alloc, because I expect + that, when linking many files together, many of the + strings will be the same. Storing the strings in the + hash table should save space in this case. */ + if (!bfd_malloc_and_get_section (sub, subdeb, &debug_contents)) + goto error_return; + } + } csectpp = xcoff_data (sub)->csects; + lineno_counts = xcoff_data (sub)->lineno_counts; + sym_hash = obj_xcoff_sym_hashes (sub); + symesz = bfd_coff_symesz (sub); + esym = (bfd_byte *) obj_coff_external_syms (sub); + esymend = esym + symcount * symesz; - /* Dynamic object do not have csectpp's. */ - if (NULL != csectpp) + while (esym < esymend) { - symesz = bfd_coff_symesz (sub); - esym = (bfd_byte *) obj_coff_external_syms (sub); - esymend = esym + symcount * symesz; + struct internal_syment sym; + union internal_auxent aux; + asection *csect; + const char *name; + int keep_p; - while (esym < esymend) + bfd_coff_swap_sym_in (sub, esym, &sym); + + /* Read in the csect information, if any. */ + if (CSECT_SYM_P (sym.n_sclass)) { - struct internal_syment sym; + BFD_ASSERT (sym.n_numaux > 0); + bfd_coff_swap_aux_in (sub, esym + symesz * sym.n_numaux, + sym.n_type, sym.n_sclass, + sym.n_numaux - 1, sym.n_numaux, &aux); + } - bfd_coff_swap_sym_in (sub, (void *) esym, (void *) &sym); + /* If this symbol's name is stored in the debug section, + get a pointer to it. */ + if (debug_contents != NULL + && sym._n._n_n._n_zeroes == 0 + && bfd_coff_symname_in_debug (sub, &sym)) + name = (const char *) debug_contents + sym._n._n_n._n_offset; + else + name = NULL; - *debug_index = (unsigned long) -1; + /* Decide whether to copy this symbol to the output file. */ + csect = *csectpp; + keep_p = xcoff_keep_symbol_p (info, sub, &sym, &aux, + *sym_hash, csect, name); + if (keep_p < 0) + return FALSE; - if (sym._n._n_n._n_zeroes == 0 - && *csectpp != NULL - && (! gc - || ((*csectpp)->flags & SEC_MARK) != 0 - || *csectpp == bfd_abs_section_ptr) - && bfd_coff_symname_in_debug (sub, &sym)) + if (!keep_p) + /* Use a debug_index of -2 to record that a symbol should + be stripped. */ + *debug_index = -2; + else + { + /* See whether we should store the symbol name in the + output .debug section. */ + if (name != NULL) { - char *name; bfd_size_type indx; - name = (char *) debug_contents + sym._n._n_n._n_offset; indx = _bfd_stringtab_add (debug_strtab, name, TRUE, TRUE); if (indx == (bfd_size_type) -1) goto error_return; *debug_index = indx; } - - esym += (sym.n_numaux + 1) * symesz; - csectpp += sym.n_numaux + 1; - debug_index += sym.n_numaux + 1; + else + *debug_index = -1; + if (*sym_hash != 0) + (*sym_hash)->flags |= XCOFF_ALLOCATED; + if (*lineno_counts > 0) + csect->output_section->lineno_count += *lineno_counts; } + + esym += (sym.n_numaux + 1) * symesz; + csectpp += sym.n_numaux + 1; + sym_hash += sym.n_numaux + 1; + lineno_counts += sym.n_numaux + 1; + debug_index += sym.n_numaux + 1; } - free (debug_contents); - debug_contents = NULL; + if (debug_contents) + { + free (debug_contents); + debug_contents = NULL; - /* Clear the size of subdeb, so that it is not included directly - in the output file. */ - subdeb->size = 0; + /* Clear the size of subdeb, so that it is not included directly + in the output file. */ + subdeb->size = 0; + } if (! info->keep_memory) { @@ -3389,6 +3990,91 @@ bfd_xcoff_link_generate_rtinit (bfd *abfd, return TRUE; } +/* Return the section that defines H. Return null if no section does. */ + +static asection * +xcoff_symbol_section (struct xcoff_link_hash_entry *h) +{ + switch (h->root.type) + { + case bfd_link_hash_defined: + case bfd_link_hash_defweak: + return h->root.u.def.section; + + case bfd_link_hash_common: + return h->root.u.c.p->section; + + default: + return NULL; + } +} + +/* Add a .loader relocation for input relocation IREL. If the loader + relocation should be against an output section, HSEC points to the + input section that IREL is against, otherwise HSEC is null. H is the + symbol that IREL is against, or null if it isn't against a global symbol. + REFERENCE_BFD is the bfd to use in error messages about the relocation. */ + +static bfd_boolean +xcoff_create_ldrel (bfd *output_bfd, struct xcoff_final_link_info *finfo, + asection *output_section, bfd *reference_bfd, + struct internal_reloc *irel, asection *hsec, + struct xcoff_link_hash_entry *h) +{ + struct internal_ldrel ldrel; + + ldrel.l_vaddr = irel->r_vaddr; + if (hsec != NULL) + { + const char *secname; + + secname = hsec->output_section->name; + if (strcmp (secname, ".text") == 0) + ldrel.l_symndx = 0; + else if (strcmp (secname, ".data") == 0) + ldrel.l_symndx = 1; + else if (strcmp (secname, ".bss") == 0) + ldrel.l_symndx = 2; + else + { + (*_bfd_error_handler) + (_("%B: loader reloc in unrecognized section `%s'"), + reference_bfd, secname); + bfd_set_error (bfd_error_nonrepresentable_section); + return FALSE; + } + } + else if (h != NULL) + { + if (h->ldindx < 0) + { + (*_bfd_error_handler) + (_("%B: `%s' in loader reloc but not loader sym"), + reference_bfd, h->root.root.string); + bfd_set_error (bfd_error_bad_value); + return FALSE; + } + ldrel.l_symndx = h->ldindx; + } + else + ldrel.l_symndx = -(bfd_size_type) 1; + + ldrel.l_rtype = (irel->r_size << 8) | irel->r_type; + ldrel.l_rsecnm = output_section->target_index; + if (xcoff_hash_table (finfo->info)->textro + && strcmp (output_section->name, ".text") == 0) + { + (*_bfd_error_handler) + (_("%B: loader reloc in read-only section %A"), + reference_bfd, output_section); + bfd_set_error (bfd_error_invalid_operation); + return FALSE; + } + bfd_xcoff_swap_ldrel_out (output_bfd, &ldrel, finfo->ldrel); + finfo->ldrel += bfd_xcoff_ldrelsz (output_bfd); + return TRUE; +} + /* Link an input file into the linker output file. This function handles all the sections and relocations of the input file at once. */ @@ -3410,7 +4096,8 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, struct xcoff_link_hash_entry **sym_hash; struct internal_syment *isymp; asection **csectpp; - unsigned long *debug_index; + unsigned int *lineno_counts; + long *debug_index; long *indexp; unsigned long output_index; bfd_byte *outsym; @@ -3450,6 +4137,9 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, if (! _bfd_coff_get_external_symbols (input_bfd)) return FALSE; + /* Make one pass over the symbols and assign indices to symbols that + we have decided to keep. Also use create .loader symbol information + and update information in hash table entries. */ esym = (bfd_byte *) obj_coff_external_syms (input_bfd); esym_end = esym + obj_raw_syment_count (input_bfd) * isymesz; sym_hash = obj_xcoff_sym_hashes (input_bfd); @@ -3458,24 +4148,16 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, isymp = finfo->internal_syms; indexp = finfo->sym_indices; output_index = syment_base; - outsym = finfo->outsyms; - incls = 0; - oline = NULL; - while (esym < esym_end) { - struct internal_syment isym; union internal_auxent aux; int smtyp = 0; - bfd_boolean skip; - bfd_boolean require; int add; bfd_coff_swap_sym_in (input_bfd, (void *) esym, (void *) isymp); - /* If this is a C_EXT or C_HIDEXT symbol, we need the csect - information. */ - if (isymp->n_sclass == C_EXT || isymp->n_sclass == C_HIDEXT) + /* Read in the csect information, if any. */ + if (CSECT_SYM_P (isymp->n_sclass)) { BFD_ASSERT (isymp->n_numaux > 0); bfd_coff_swap_aux_in (input_bfd, @@ -3487,39 +4169,32 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, smtyp = SMTYP_SMTYP (aux.x_csect.x_smtyp); } - /* Make a copy of *isymp so that the relocate_section function - always sees the original values. This is more reliable than - always recomputing the symbol value even if we are stripping - the symbol. */ - isym = *isymp; - /* If this symbol is in the .loader section, swap out the .loader symbol information. If this is an external symbol reference to a defined symbol, though, then wait until we get to the definition. */ - if (isym.n_sclass == C_EXT + if (EXTERN_SYM_P (isymp->n_sclass) && *sym_hash != NULL && (*sym_hash)->ldsym != NULL - && (smtyp != XTY_ER - || (*sym_hash)->root.type == bfd_link_hash_undefined)) + && xcoff_final_definition_p (input_bfd, *sym_hash, *csectpp)) { struct xcoff_link_hash_entry *h; struct internal_ldsym *ldsym; h = *sym_hash; ldsym = h->ldsym; - if (isym.n_scnum > 0) + if (isymp->n_scnum > 0) { ldsym->l_scnum = (*csectpp)->output_section->target_index; - ldsym->l_value = (isym.n_value + ldsym->l_value = (isymp->n_value + (*csectpp)->output_section->vma + (*csectpp)->output_offset - (*csectpp)->vma); } else { - ldsym->l_scnum = isym.n_scnum; - ldsym->l_value = isym.n_value; + ldsym->l_scnum = isymp->n_scnum; + ldsym->l_value = isymp->n_value; } ldsym->l_smtype = smtyp; @@ -3533,6 +4208,8 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, ldsym->l_smtype |= L_EXPORT; if ((h->flags & XCOFF_ENTRY) != 0) ldsym->l_smtype |= L_ENTRY; + if (isymp->n_sclass == C_AIX_WEAKEXT) + ldsym->l_smtype |= L_WEAK; ldsym->l_smclas = aux.x_csect.x_smclas; @@ -3584,184 +4261,82 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, } } - *indexp = -1; - - skip = FALSE; - require = FALSE; - add = 1 + isym.n_numaux; - - /* If we are skipping this csect, we want to skip this symbol. */ - if (*csectpp == NULL) - skip = TRUE; - - /* If we garbage collected this csect, we want to skip this - symbol. */ - if (! skip - && xcoff_hash_table (finfo->info)->gc - && ((*csectpp)->flags & SEC_MARK) == 0 - && *csectpp != bfd_abs_section_ptr) - skip = TRUE; - - /* An XCOFF linker always skips C_STAT symbols. */ - if (! skip - && isymp->n_sclass == C_STAT) - skip = TRUE; - - /* We skip all but the first TOC anchor. */ - if (! skip - && isymp->n_sclass == C_HIDEXT - && aux.x_csect.x_smclas == XMC_TC0) - { - if (finfo->toc_symindx != -1) - skip = TRUE; - else - { - bfd_vma tocval, tocend; - bfd *inp; - - tocval = ((*csectpp)->output_section->vma - + (*csectpp)->output_offset - + isym.n_value - - (*csectpp)->vma); - - /* We want to find out if tocval is a good value to use - as the TOC anchor--that is, whether we can access all - of the TOC using a 16 bit offset from tocval. This - test assumes that the TOC comes at the end of the - output section, as it does in the default linker - script. */ - tocend = ((*csectpp)->output_section->vma - + (*csectpp)->output_section->size); - for (inp = finfo->info->input_bfds; - inp != NULL; - inp = inp->link_next) - { - - for (o = inp->sections; o != NULL; o = o->next) - if (strcmp (o->name, ".tocbss") == 0) - { - bfd_vma new_toc_end; - new_toc_end = (o->output_section->vma - + o->output_offset - + o->size); - if (new_toc_end > tocend) - tocend = new_toc_end; - } - - } - - if (tocval + 0x10000 < tocend) - { - (*_bfd_error_handler) - (_("TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"), - (unsigned long) (tocend - tocval)); - bfd_set_error (bfd_error_file_too_big); - return FALSE; - } - - if (tocval + 0x8000 < tocend) - { - bfd_vma tocadd; + add = 1 + isymp->n_numaux; - tocadd = tocend - (tocval + 0x8000); - tocval += tocadd; - isym.n_value += tocadd; - } + if (*debug_index == -2) + /* We've decided to strip this symbol. */ + *indexp = -1; + else + { + /* Assign the next unused index to this symbol. */ + *indexp = output_index; - finfo->toc_symindx = output_index; - xcoff_data (finfo->output_bfd)->toc = tocval; - xcoff_data (finfo->output_bfd)->sntoc = - (*csectpp)->output_section->target_index; - require = TRUE; + if (EXTERN_SYM_P (isymp->n_sclass)) + { + BFD_ASSERT (*sym_hash != NULL); + (*sym_hash)->indx = output_index; + } + /* If this is a symbol in the TOC which we may have merged + (class XMC_TC), remember the symbol index of the TOC + symbol. */ + if (isymp->n_sclass == C_HIDEXT + && aux.x_csect.x_smclas == XMC_TC + && *sym_hash != NULL) + { + BFD_ASSERT (((*sym_hash)->flags & XCOFF_SET_TOC) == 0); + BFD_ASSERT ((*sym_hash)->toc_section != NULL); + (*sym_hash)->u.toc_indx = output_index; } - } - /* If we are stripping all symbols, we want to skip this one. */ - if (! skip - && finfo->info->strip == strip_all) - skip = TRUE; - - /* We can skip resolved external references. */ - if (! skip - && isym.n_sclass == C_EXT - && smtyp == XTY_ER - && (*sym_hash)->root.type != bfd_link_hash_undefined) - skip = TRUE; - - /* We can skip common symbols if they got defined somewhere - else. */ - if (! skip - && isym.n_sclass == C_EXT - && smtyp == XTY_CM - && ((*sym_hash)->root.type != bfd_link_hash_common - || (*sym_hash)->root.u.c.p->section != *csectpp) - && ((*sym_hash)->root.type != bfd_link_hash_defined - || (*sym_hash)->root.u.def.section != *csectpp)) - skip = TRUE; - - /* Skip local symbols if we are discarding them. */ - if (! skip - && finfo->info->discard == discard_all - && isym.n_sclass != C_EXT - && (isym.n_sclass != C_HIDEXT - || smtyp != XTY_SD)) - skip = TRUE; - - /* If we stripping debugging symbols, and this is a debugging - symbol, then skip it. */ - if (! skip - && finfo->info->strip == strip_debugger - && isym.n_scnum == N_DEBUG) - skip = TRUE; - - /* If some symbols are stripped based on the name, work out the - name and decide whether to skip this symbol. We don't handle - this correctly for symbols whose names are in the .debug - section; to get it right we would need a new bfd_strtab_hash - function to return the string given the index. */ - if (! skip - && (finfo->info->strip == strip_some - || finfo->info->discard == discard_l) - && (debug_index == NULL || *debug_index == (unsigned long) -1)) - { - const char *name; - char buf[SYMNMLEN + 1]; + output_index += add; + } - name = _bfd_coff_internal_syment_name (input_bfd, &isym, buf); + esym += add * isymesz; + isymp += add; + csectpp += add; + sym_hash += add; + debug_index += add; + ++indexp; + for (--add; add > 0; --add) + *indexp++ = -1; + } - if (name == NULL) - return FALSE; + /* Now write out the symbols that we decided to keep. */ - if ((finfo->info->strip == strip_some - && (bfd_hash_lookup (finfo->info->keep_hash, name, FALSE, - FALSE) == NULL)) - || (finfo->info->discard == discard_l - && (isym.n_sclass != C_EXT - && (isym.n_sclass != C_HIDEXT - || smtyp != XTY_SD)) - && bfd_is_local_label_name (input_bfd, name))) - skip = TRUE; - } + esym = (bfd_byte *) obj_coff_external_syms (input_bfd); + esym_end = esym + obj_raw_syment_count (input_bfd) * isymesz; + sym_hash = obj_xcoff_sym_hashes (input_bfd); + isymp = finfo->internal_syms; + indexp = finfo->sym_indices; + csectpp = xcoff_data (input_bfd)->csects; + lineno_counts = xcoff_data (input_bfd)->lineno_counts; + debug_index = xcoff_data (input_bfd)->debug_indices; + outsym = finfo->outsyms; + incls = 0; + oline = NULL; + while (esym < esym_end) + { + int add; - /* We can not skip the first TOC anchor. */ - if (skip - && require - && finfo->info->strip != strip_all) - skip = FALSE; + add = 1 + isymp->n_numaux; - /* We now know whether we are to skip this symbol or not. */ - if (! skip) + if (*indexp < 0) + esym += add * isymesz; + else { - /* Adjust the symbol in order to output it. */ + struct internal_syment isym; + int i; + /* Adjust the symbol in order to output it. */ + isym = *isymp; if (isym._n._n_n._n_zeroes == 0 && isym._n._n_n._n_offset != 0) { /* This symbol has a long name. Enter it in the string table we are building. If *debug_index != -1, the name has already been entered in the .debug section. */ - if (debug_index != NULL && *debug_index != (unsigned long) -1) + if (*debug_index >= 0) isym._n._n_n._n_offset = *debug_index; else { @@ -3779,16 +4354,15 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, } } - if (isym.n_sclass != C_BSTAT - && isym.n_sclass != C_ESTAT - && isym.n_sclass != C_DECL - && isym.n_scnum > 0) - { - isym.n_scnum = (*csectpp)->output_section->target_index; - isym.n_value += ((*csectpp)->output_section->vma - + (*csectpp)->output_offset - - (*csectpp)->vma); - } + /* Make __rtinit C_HIDEXT rather than C_EXT. This avoids + multiple definition problems when linking a shared object + statically. (The native linker doesn't enter __rtinit into + the normal table at all, but having a local symbol can make + the objdump output easier to read.) */ + if (isym.n_sclass == C_EXT + && *sym_hash + && ((*sym_hash)->flags & XCOFF_RTINIT) != 0) + isym.n_sclass = C_HIDEXT; /* The value of a C_FILE symbol is the symbol index of the next C_FILE symbol. The value of the last C_FILE symbol @@ -3798,10 +4372,10 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, if (isym.n_sclass == C_FILE) { if (finfo->last_file_index != -1 - && finfo->last_file.n_value != (bfd_vma) output_index) + && finfo->last_file.n_value != (bfd_vma) *indexp) { /* We must correct the value of the last C_FILE entry. */ - finfo->last_file.n_value = output_index; + finfo->last_file.n_value = *indexp; if ((bfd_size_type) finfo->last_file_index >= syment_base) { /* The last C_FILE symbol is in this input file. */ @@ -3832,7 +4406,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, } } - finfo->last_file_index = output_index; + finfo->last_file_index = *indexp; finfo->last_file = isym; } @@ -3845,84 +4419,12 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, isym.n_value = finfo->line_filepos; ++incls; } - - /* Output the symbol. */ - - bfd_coff_swap_sym_out (output_bfd, (void *) &isym, (void *) outsym); - - *indexp = output_index; - - if (isym.n_sclass == C_EXT) - { - long indx; - struct xcoff_link_hash_entry *h; - - indx = ((esym - (bfd_byte *) obj_coff_external_syms (input_bfd)) - / isymesz); - h = obj_xcoff_sym_hashes (input_bfd)[indx]; - BFD_ASSERT (h != NULL); - h->indx = output_index; - } - - /* If this is a symbol in the TOC which we may have merged - (class XMC_TC), remember the symbol index of the TOC - symbol. */ - if (isym.n_sclass == C_HIDEXT - && aux.x_csect.x_smclas == XMC_TC - && *sym_hash != NULL) - { - BFD_ASSERT (((*sym_hash)->flags & XCOFF_SET_TOC) == 0); - BFD_ASSERT ((*sym_hash)->toc_section != NULL); - (*sym_hash)->u.toc_indx = output_index; - } - - output_index += add; - outsym += add * osymesz; - } - - esym += add * isymesz; - isymp += add; - csectpp += add; - sym_hash += add; - if (debug_index != NULL) - debug_index += add; - ++indexp; - for (--add; add > 0; --add) - *indexp++ = -1; - } - - /* Fix up the aux entries and the C_BSTAT symbols. This must be - done in a separate pass, because we don't know the correct symbol - indices until we have already decided which symbols we are going - to keep. */ - - esym = (bfd_byte *) obj_coff_external_syms (input_bfd); - esym_end = esym + obj_raw_syment_count (input_bfd) * isymesz; - isymp = finfo->internal_syms; - indexp = finfo->sym_indices; - csectpp = xcoff_data (input_bfd)->csects; - outsym = finfo->outsyms; - while (esym < esym_end) - { - int add; - - add = 1 + isymp->n_numaux; - - if (*indexp < 0) - esym += add * isymesz; - else - { - int i; - - if (isymp->n_sclass == C_BSTAT) + /* The value of a C_BSTAT symbol is the symbol table + index of the containing csect. */ + else if (isym.n_sclass == C_BSTAT) { - struct internal_syment isym; - bfd_vma indx; - /* The value of a C_BSTAT symbol is the symbol table - index of the containing csect. */ - bfd_coff_swap_sym_in (output_bfd, (void *) outsym, (void *) &isym); indx = isym.n_value; if (indx < obj_raw_syment_count (input_bfd)) { @@ -3933,10 +4435,20 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, isym.n_value = 0; else isym.n_value = symindx; - bfd_coff_swap_sym_out (output_bfd, (void *) &isym, - (void *) outsym); } } + else if (isym.n_sclass != C_ESTAT + && isym.n_sclass != C_DECL + && isym.n_scnum > 0) + { + isym.n_scnum = (*csectpp)->output_section->target_index; + isym.n_value += ((*csectpp)->output_section->vma + + (*csectpp)->output_offset + - (*csectpp)->vma); + } + + /* Output the symbol. */ + bfd_coff_swap_sym_out (output_bfd, (void *) &isym, (void *) outsym); esym += isymesz; outsym += osymesz; @@ -3976,8 +4488,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, aux.x_file.x_n.x_offset = STRING_SIZE_SIZE + indx; } } - else if ((isymp->n_sclass == C_EXT - || isymp->n_sclass == C_HIDEXT) + else if (CSECT_SYM_P (isymp->n_sclass) && i + 1 == isymp->n_numaux) { @@ -4056,15 +4567,13 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, /* Copy over the line numbers, unless we are stripping them. We do this on a symbol by symbol basis in order to more easily handle garbage collection. */ - if ((isymp->n_sclass == C_EXT - || isymp->n_sclass == C_HIDEXT) + if (CSECT_SYM_P (isymp->n_sclass) && i == 0 && isymp->n_numaux > 1 && ISFCN (isymp->n_type) && aux.x_sym.x_fcnary.x_fcn.x_lnnoptr != 0) { - if (finfo->info->strip != strip_none - && finfo->info->strip != strip_some) + if (*lineno_counts == 0) aux.x_sym.x_fcnary.x_fcn.x_lnnoptr = 0; else { @@ -4072,14 +4581,21 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, unsigned int enc_count; bfd_signed_vma linoff; struct internal_lineno lin; + bfd_byte *linp; + bfd_byte *linpend; + bfd_vma offset; + file_ptr pos; + bfd_size_type amt; + /* Read in the enclosing section's line-number + information, if we haven't already. */ o = *csectpp; enclosing = xcoff_section_data (abfd, o)->enclosing; enc_count = xcoff_section_data (abfd, o)->lineno_count; if (oline != enclosing) { - file_ptr pos = enclosing->line_filepos; - bfd_size_type amt = linesz * enc_count; + pos = enclosing->line_filepos; + amt = linesz * enc_count; if (bfd_seek (input_bfd, pos, SEEK_SET) != 0 || (bfd_bread (finfo->linenos, amt, input_bfd) != amt)) @@ -4087,114 +4603,82 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, oline = enclosing; } + /* Copy across the first entry, adjusting its + symbol index. */ linoff = (aux.x_sym.x_fcnary.x_fcn.x_lnnoptr - enclosing->line_filepos); - - bfd_coff_swap_lineno_in (input_bfd, - (void *) (finfo->linenos + linoff), - (void *) &lin); - if (lin.l_lnno != 0 - || ((bfd_size_type) lin.l_addr.l_symndx - != ((esym - - isymesz - - ((bfd_byte *) - obj_coff_external_syms (input_bfd))) - / isymesz))) - aux.x_sym.x_fcnary.x_fcn.x_lnnoptr = 0; - else + linp = finfo->linenos + linoff; + bfd_coff_swap_lineno_in (input_bfd, linp, &lin); + lin.l_addr.l_symndx = *indexp; + bfd_coff_swap_lineno_out (output_bfd, &lin, linp); + + /* Copy the other entries, adjusting their addresses. */ + linpend = linp + *lineno_counts * linesz; + offset = (o->output_section->vma + + o->output_offset + - o->vma); + for (linp += linesz; linp < linpend; linp += linesz) { - bfd_byte *linpend, *linp; - bfd_vma offset; - bfd_size_type count; - - lin.l_addr.l_symndx = *indexp; - bfd_coff_swap_lineno_out (output_bfd, (void *) &lin, - (void *) (finfo->linenos - + linoff)); - - linpend = (finfo->linenos - + enc_count * linesz); - offset = (o->output_section->vma - + o->output_offset - - o->vma); - for (linp = finfo->linenos + linoff + linesz; - linp < linpend; - linp += linesz) - { - bfd_coff_swap_lineno_in (input_bfd, (void *) linp, - (void *) &lin); - if (lin.l_lnno == 0) - break; - lin.l_addr.l_paddr += offset; - bfd_coff_swap_lineno_out (output_bfd, - (void *) &lin, - (void *) linp); - } - - count = (linp - (finfo->linenos + linoff)) / linesz; + bfd_coff_swap_lineno_in (input_bfd, linp, &lin); + lin.l_addr.l_paddr += offset; + bfd_coff_swap_lineno_out (output_bfd, &lin, linp); + } - aux.x_sym.x_fcnary.x_fcn.x_lnnoptr = - (o->output_section->line_filepos + /* Write out the entries we've just processed. */ + pos = (o->output_section->line_filepos + o->output_section->lineno_count * linesz); + amt = linesz * *lineno_counts; + if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 + || bfd_bwrite (finfo->linenos + linoff, + amt, output_bfd) != amt) + return FALSE; + o->output_section->lineno_count += *lineno_counts; - if (bfd_seek (output_bfd, - aux.x_sym.x_fcnary.x_fcn.x_lnnoptr, - SEEK_SET) != 0 - || (bfd_bwrite (finfo->linenos + linoff, - linesz * count, output_bfd) - != linesz * count)) - return FALSE; - - o->output_section->lineno_count += count; + /* Record the offset of the symbol's line numbers + in the output file. */ + aux.x_sym.x_fcnary.x_fcn.x_lnnoptr = pos; - if (incls > 0) + if (incls > 0) + { + struct internal_syment *iisp, *iispend; + long *iindp; + bfd_byte *oos; + bfd_vma range_start, range_end; + int iiadd; + + /* Update any C_BINCL or C_EINCL symbols + that refer to a line number in the + range we just output. */ + iisp = finfo->internal_syms; + iispend = iisp + obj_raw_syment_count (input_bfd); + iindp = finfo->sym_indices; + oos = finfo->outsyms; + range_start = enclosing->line_filepos + linoff; + range_end = range_start + *lineno_counts * linesz; + while (iisp < iispend) { - struct internal_syment *iisp, *iispend; - long *iindp; - bfd_byte *oos; - int iiadd; - - /* Update any C_BINCL or C_EINCL symbols - that refer to a line number in the - range we just output. */ - iisp = finfo->internal_syms; - iispend = (iisp - + obj_raw_syment_count (input_bfd)); - iindp = finfo->sym_indices; - oos = finfo->outsyms; - while (iisp < iispend) + if (*iindp >= 0 + && (iisp->n_sclass == C_BINCL + || iisp->n_sclass == C_EINCL) + && iisp->n_value >= range_start + && iisp->n_value < range_end) { - if (*iindp >= 0 - && (iisp->n_sclass == C_BINCL - || iisp->n_sclass == C_EINCL) - && ((bfd_size_type) iisp->n_value - >= (bfd_size_type)(enclosing->line_filepos + linoff)) - && ((bfd_size_type) iisp->n_value - < (enclosing->line_filepos - + enc_count * linesz))) - { - struct internal_syment iis; - - bfd_coff_swap_sym_in (output_bfd, - (void *) oos, - (void *) &iis); - iis.n_value = - (iisp->n_value - - enclosing->line_filepos - - linoff - + aux.x_sym.x_fcnary.x_fcn.x_lnnoptr); - bfd_coff_swap_sym_out (output_bfd, - (void *) &iis, - (void *) oos); - --incls; - } - - iiadd = 1 + iisp->n_numaux; - if (*iindp >= 0) - oos += iiadd * osymesz; - iisp += iiadd; - iindp += iiadd; + struct internal_syment iis; + + bfd_coff_swap_sym_in (output_bfd, oos, &iis); + iis.n_value = (iisp->n_value + - range_start + + pos); + bfd_coff_swap_sym_out (output_bfd, + &iis, oos); + --incls; } + + iiadd = 1 + iisp->n_numaux; + if (*iindp >= 0) + oos += iiadd * osymesz; + iisp += iiadd; + iindp += iiadd; } } } @@ -4208,9 +4692,12 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, } } + sym_hash += add; indexp += add; isymp += add; csectpp += add; + lineno_counts += add; + debug_index += add; } /* If we swapped out a C_FILE symbol, guess that the next C_FILE @@ -4312,8 +4799,6 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, for (; irel < irelend; irel++, rel_hash++) { struct xcoff_link_hash_entry *h = NULL; - struct internal_ldrel ldrel; - bfd_boolean quiet; *rel_hash = NULL; @@ -4446,104 +4931,20 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *finfo, } } - quiet = FALSE; - switch (irel->r_type) + if (xcoff_need_ldrel_p (finfo->info, irel, h)) { - default: - if (h == NULL - || h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak - || h->root.type == bfd_link_hash_common) - break; - /* Fall through. */ - case R_POS: - case R_NEG: - case R_RL: - case R_RLA: - /* This reloc needs to be copied into the .loader - section. */ - ldrel.l_vaddr = irel->r_vaddr; - if (r_symndx == -1) - ldrel.l_symndx = -(bfd_size_type ) 1; - else if (h == NULL - || (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak - || h->root.type == bfd_link_hash_common)) - { - asection *sec; + asection *sec; - if (h == NULL) - sec = xcoff_data (input_bfd)->csects[r_symndx]; - else if (h->root.type == bfd_link_hash_common) - sec = h->root.u.c.p->section; - else - sec = h->root.u.def.section; - sec = sec->output_section; - - if (strcmp (sec->name, ".text") == 0) - ldrel.l_symndx = 0; - else if (strcmp (sec->name, ".data") == 0) - ldrel.l_symndx = 1; - else if (strcmp (sec->name, ".bss") == 0) - ldrel.l_symndx = 2; - else - { - (*_bfd_error_handler) - (_("%B: loader reloc in unrecognized section `%A'"), - input_bfd, sec); - bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; - } - } + if (r_symndx == -1) + sec = NULL; + else if (h == NULL) + sec = xcoff_data (input_bfd)->csects[r_symndx]; else - { - if (! finfo->info->relocatable - && (h->flags & XCOFF_DEF_DYNAMIC) == 0 - && (h->flags & XCOFF_IMPORT) == 0) - { - /* We already called the undefined_symbol - callback for this relocation, in - _bfd_ppc_xcoff_relocate_section. Don't - issue any more warnings. */ - quiet = TRUE; - } - if (h->ldindx < 0 && ! quiet) - { - (*_bfd_error_handler) - (_("%B: `%s' in loader reloc but not loader sym"), - input_bfd, - h->root.root.string); - bfd_set_error (bfd_error_bad_value); - return FALSE; - } - ldrel.l_symndx = h->ldindx; - } - ldrel.l_rtype = (irel->r_size << 8) | irel->r_type; - ldrel.l_rsecnm = o->output_section->target_index; - if (xcoff_hash_table (finfo->info)->textro - && strcmp (o->output_section->name, ".text") == 0 - && ! quiet) - { - (*_bfd_error_handler) - (_("%B: loader reloc in read-only section %A"), - input_bfd, o->output_section); - bfd_set_error (bfd_error_invalid_operation); - return FALSE; - } - bfd_xcoff_swap_ldrel_out (output_bfd, &ldrel, - finfo->ldrel); - - finfo->ldrel += bfd_xcoff_ldrelsz(output_bfd); - break; - - case R_TOC: - case R_GL: - case R_TCL: - case R_TRL: - case R_TRLA: - /* We should never need a .loader reloc for a TOC - relative reloc. */ - break; + sec = xcoff_symbol_section (h); + if (!xcoff_create_ldrel (output_bfd, finfo, + o->output_section, input_bfd, + irel, sec, h)) + return FALSE; } } @@ -4587,6 +4988,144 @@ xcoff_sort_relocs (const void * p1, const void * p2) return 0; } +/* Return true if section SEC is a TOC section. */ + +static inline bfd_boolean +xcoff_toc_section_p (asection *sec) +{ + const char *name; + + name = sec->name; + if (name[0] == '.' && name[1] == 't') + { + if (name[2] == 'c') + { + if (name[3] == '0' && name[4] == 0) + return TRUE; + if (name[3] == 0) + return TRUE; + } + if (name[2] == 'd' && name[3] == 0) + return TRUE; + } + return FALSE; +} + +/* See if the link requires a TOC (it usually does!). If so, find a + good place to put the TOC anchor csect, and write out the associated + symbol. */ + +static bfd_boolean +xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *finfo) +{ + bfd_vma toc_start, toc_end, start, end, best_address; + asection *sec; + bfd *input_bfd; + int section_index; + struct internal_syment irsym; + union internal_auxent iraux; + file_ptr pos; + size_t size; + + /* Set [TOC_START, TOC_END) to the range of the TOC. Record the + index of a csect at the beginning of the TOC. */ + toc_start = ~(bfd_vma) 0; + toc_end = 0; + section_index = -1; + for (input_bfd = finfo->info->input_bfds; + input_bfd != NULL; + input_bfd = input_bfd->link_next) + for (sec = input_bfd->sections; sec != NULL; sec = sec->next) + if ((sec->flags & SEC_MARK) != 0 && xcoff_toc_section_p (sec)) + { + start = sec->output_section->vma + sec->output_offset; + if (toc_start > start) + { + toc_start = start; + section_index = sec->output_section->target_index; + } + + end = start + sec->size; + if (toc_end < end) + toc_end = end; + } + + /* There's no need for a TC0 symbol if we don't have a TOC. */ + if (toc_end < toc_start) + { + xcoff_data (output_bfd)->toc = toc_start; + return TRUE; + } + + if (toc_end - toc_start < 0x8000) + /* Every TOC csect can be accessed from TOC_START. */ + best_address = toc_start; + else + { + /* Find the lowest TOC csect that is still within range of TOC_END. */ + best_address = toc_end; + for (input_bfd = finfo->info->input_bfds; + input_bfd != NULL; + input_bfd = input_bfd->link_next) + for (sec = input_bfd->sections; sec != NULL; sec = sec->next) + if ((sec->flags & SEC_MARK) != 0 && xcoff_toc_section_p (sec)) + { + start = sec->output_section->vma + sec->output_offset; + if (start < best_address + && start + 0x8000 >= toc_end) + { + best_address = start; + section_index = sec->output_section->target_index; + } + } + + /* Make sure that the start of the TOC is also within range. */ + if (best_address > toc_start + 0x8000) + { + (*_bfd_error_handler) + (_("TOC overflow: 0x%lx > 0x10000; try -mminimal-toc " + "when compiling"), + (unsigned long) (toc_end - toc_start)); + bfd_set_error (bfd_error_file_too_big); + return FALSE; + } + } + + /* Record the chosen TOC value. */ + finfo->toc_symindx = obj_raw_syment_count (output_bfd); + xcoff_data (output_bfd)->toc = best_address; + xcoff_data (output_bfd)->sntoc = section_index; + + /* Fill out the TC0 symbol. */ + if (!bfd_xcoff_put_symbol_name (output_bfd, finfo->strtab, &irsym, "TOC")) + return FALSE; + irsym.n_value = best_address; + irsym.n_scnum = section_index; + irsym.n_sclass = C_HIDEXT; + irsym.n_type = T_NULL; + irsym.n_numaux = 1; + bfd_coff_swap_sym_out (output_bfd, &irsym, finfo->outsyms); + + /* Fill out the auxillary csect information. */ + memset (&iraux, 0, sizeof iraux); + iraux.x_csect.x_smtyp = XTY_SD; + iraux.x_csect.x_smclas = XMC_TC0; + iraux.x_csect.x_scnlen.l = 0; + bfd_coff_swap_aux_out (output_bfd, &iraux, T_NULL, C_HIDEXT, 0, 1, + finfo->outsyms + bfd_coff_symesz (output_bfd)); + + /* Write the contents to the file. */ + pos = obj_sym_filepos (output_bfd); + pos += obj_raw_syment_count (output_bfd) * bfd_coff_symesz (output_bfd); + size = 2 * bfd_coff_symesz (output_bfd); + if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 + || bfd_bwrite (finfo->outsyms, size, output_bfd) != size) + return FALSE; + obj_raw_syment_count (output_bfd) += 2; + + return TRUE; +} + /* Write out a non-XCOFF global symbol. */ static bfd_boolean @@ -4762,7 +5301,6 @@ xcoff_write_global_symbol (struct xcoff_link_hash_entry *h, void * inf) asection *osec; int oindx; struct internal_reloc *irel; - struct internal_ldrel ldrel; struct internal_syment irsym; union internal_auxent iraux; @@ -4815,12 +5353,9 @@ xcoff_write_global_symbol (struct xcoff_link_hash_entry *h, void * inf) finfo->section_info[oindx].rel_hashes[osec->reloc_count] = NULL; ++osec->reloc_count; - ldrel.l_vaddr = irel->r_vaddr; - ldrel.l_symndx = h->ldindx; - ldrel.l_rtype = (irel->r_size << 8) | R_POS; - ldrel.l_rsecnm = oindx; - bfd_xcoff_swap_ldrel_out (output_bfd, &ldrel, finfo->ldrel); - finfo->ldrel += bfd_xcoff_ldrelsz(output_bfd); + if (!xcoff_create_ldrel (output_bfd, finfo, osec, + output_bfd, irel, NULL, h)) + return FALSE; /* We need to emit a symbol to define a csect which holds the reloc. */ @@ -4886,7 +5421,6 @@ xcoff_write_global_symbol (struct xcoff_link_hash_entry *h, void * inf) struct xcoff_link_hash_entry *hentry; asection *esec; struct internal_reloc *irel; - struct internal_ldrel ldrel; asection *tsec; unsigned int reloc_size, byte_size; @@ -4924,26 +5458,9 @@ xcoff_write_global_symbol (struct xcoff_link_hash_entry *h, void * inf) finfo->section_info[oindx].rel_hashes[osec->reloc_count] = NULL; ++osec->reloc_count; - ldrel.l_vaddr = irel->r_vaddr; - if (strcmp (esec->output_section->name, ".text") == 0) - ldrel.l_symndx = 0; - else if (strcmp (esec->output_section->name, ".data") == 0) - ldrel.l_symndx = 1; - else if (strcmp (esec->output_section->name, ".bss") == 0) - ldrel.l_symndx = 2; - else - { - (*_bfd_error_handler) - (_("%s: loader reloc in unrecognized section `%s'"), - bfd_get_filename (output_bfd), - esec->output_section->name); - bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; - } - ldrel.l_rtype = (reloc_size << 8) | R_POS; - ldrel.l_rsecnm = oindx; - bfd_xcoff_swap_ldrel_out (output_bfd, &ldrel, finfo->ldrel); - finfo->ldrel += bfd_xcoff_ldrelsz(output_bfd); + if (!xcoff_create_ldrel (output_bfd, finfo, osec, + output_bfd, irel, esec, NULL)) + return FALSE; /* There are three items to write out, the address of the code @@ -4986,26 +5503,9 @@ xcoff_write_global_symbol (struct xcoff_link_hash_entry *h, void * inf) finfo->section_info[oindx].rel_hashes[osec->reloc_count] = NULL; ++osec->reloc_count; - ldrel.l_vaddr = irel->r_vaddr; - if (strcmp (tsec->output_section->name, ".text") == 0) - ldrel.l_symndx = 0; - else if (strcmp (tsec->output_section->name, ".data") == 0) - ldrel.l_symndx = 1; - else if (strcmp (tsec->output_section->name, ".bss") == 0) - ldrel.l_symndx = 2; - else - { - (*_bfd_error_handler) - (_("%s: loader reloc in unrecognized section `%s'"), - bfd_get_filename (output_bfd), - tsec->output_section->name); - bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; - } - ldrel.l_rtype = (reloc_size << 8) | R_POS; - ldrel.l_rsecnm = oindx; - bfd_xcoff_swap_ldrel_out (output_bfd, &ldrel, finfo->ldrel); - finfo->ldrel += bfd_xcoff_ldrelsz(output_bfd); + if (!xcoff_create_ldrel (output_bfd, finfo, osec, + output_bfd, irel, tsec, NULL)) + return FALSE; } if (h->indx >= 0 || finfo->info->strip == strip_all) @@ -5045,7 +5545,11 @@ xcoff_write_global_symbol (struct xcoff_link_hash_entry *h, void * inf) { isym.n_value = 0; isym.n_scnum = N_UNDEF; - isym.n_sclass = C_EXT; + if (h->root.type == bfd_link_hash_undefweak + && C_WEAKEXT == C_AIX_WEAKEXT) + isym.n_sclass = C_WEAKEXT; + else + isym.n_sclass = C_EXT; aux.x_csect.x_smtyp = XTY_ER; } else if ((h->root.type == bfd_link_hash_defined @@ -5055,7 +5559,11 @@ xcoff_write_global_symbol (struct xcoff_link_hash_entry *h, void * inf) BFD_ASSERT (bfd_is_abs_section (h->root.u.def.section)); isym.n_value = h->root.u.def.value; isym.n_scnum = N_UNDEF; - isym.n_sclass = C_EXT; + if (h->root.type == bfd_link_hash_undefweak + && C_WEAKEXT == C_AIX_WEAKEXT) + isym.n_sclass = C_WEAKEXT; + else + isym.n_sclass = C_EXT; aux.x_csect.x_smtyp = XTY_ER; } else if (h->root.type == bfd_link_hash_defined @@ -5117,7 +5625,11 @@ xcoff_write_global_symbol (struct xcoff_link_hash_entry *h, void * inf) /* We just output an SD symbol. Now output an LD symbol. */ h->indx += 2; - isym.n_sclass = C_EXT; + if (h->root.type == bfd_link_hash_undefweak + && C_WEAKEXT == C_AIX_WEAKEXT) + isym.n_sclass = C_WEAKEXT; + else + isym.n_sclass = C_EXT; bfd_coff_swap_sym_out (output_bfd, (void *) &isym, (void *) outsym); outsym += bfd_coff_symesz (output_bfd); @@ -5155,7 +5667,6 @@ xcoff_reloc_link_order (bfd *output_bfd, bfd_vma addend; struct internal_reloc *irel; struct xcoff_link_hash_entry **rel_hash_ptr; - struct internal_ldrel ldrel; if (link_order->type == bfd_section_reloc_link_order) /* We need to somehow locate a symbol in the right section. The @@ -5183,22 +5694,12 @@ xcoff_reloc_link_order (bfd *output_bfd, return TRUE; } - if (h->root.type == bfd_link_hash_common) - { - hsec = h->root.u.c.p->section; - hval = 0; - } - else if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - { - hsec = h->root.u.def.section; - hval = h->root.u.def.value; - } + hsec = xcoff_symbol_section (h); + if (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + hval = h->root.u.def.value; else - { - hsec = NULL; - hval = 0; - } + hval = 0; addend = link_order->u.reloc.p->addend; if (hsec != NULL) @@ -5273,49 +5774,13 @@ xcoff_reloc_link_order (bfd *output_bfd, ++output_section->reloc_count; /* Now output the reloc to the .loader section. */ - - ldrel.l_vaddr = irel->r_vaddr; - - if (hsec != NULL) - { - const char *secname; - - secname = hsec->output_section->name; - - if (strcmp (secname, ".text") == 0) - ldrel.l_symndx = 0; - else if (strcmp (secname, ".data") == 0) - ldrel.l_symndx = 1; - else if (strcmp (secname, ".bss") == 0) - ldrel.l_symndx = 2; - else - { - (*_bfd_error_handler) - (_("%s: loader reloc in unrecognized section `%s'"), - bfd_get_filename (output_bfd), secname); - bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; - } - } - else + if (xcoff_hash_table (finfo->info)->loader_section) { - if (h->ldindx < 0) - { - (*_bfd_error_handler) - (_("%s: `%s' in loader reloc but not loader sym"), - bfd_get_filename (output_bfd), - h->root.root.string); - bfd_set_error (bfd_error_bad_value); - return FALSE; - } - ldrel.l_symndx = h->ldindx; + if (!xcoff_create_ldrel (output_bfd, finfo, output_section, + output_bfd, irel, hsec, h)) + return FALSE; } - ldrel.l_rtype = (irel->r_size << 8) | irel->r_type; - ldrel.l_rsecnm = output_section->target_index; - bfd_xcoff_swap_ldrel_out (output_bfd, &ldrel, finfo->ldrel); - finfo->ldrel += bfd_xcoff_ldrelsz(output_bfd); - return TRUE; } @@ -5361,12 +5826,20 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) finfo.contents = NULL; finfo.external_relocs = NULL; - finfo.ldsym = (xcoff_hash_table (info)->loader_section->contents - + bfd_xcoff_ldhdrsz (abfd)); - finfo.ldrel = (xcoff_hash_table (info)->loader_section->contents - + bfd_xcoff_ldhdrsz(abfd) - + (xcoff_hash_table (info)->ldhdr.l_nsyms - * bfd_xcoff_ldsymsz(abfd))); + if (xcoff_hash_table (info)->loader_section) + { + finfo.ldsym = (xcoff_hash_table (info)->loader_section->contents + + bfd_xcoff_ldhdrsz (abfd)); + finfo.ldrel = (xcoff_hash_table (info)->loader_section->contents + + bfd_xcoff_ldhdrsz (abfd) + + (xcoff_hash_table (info)->ldhdr.l_nsyms + * bfd_xcoff_ldsymsz (abfd))); + } + else + { + finfo.ldsym = NULL; + finfo.ldrel = NULL; + } xcoff_data (abfd)->coff.link_info = info; @@ -5374,15 +5847,15 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) if (finfo.strtab == NULL) goto error_return; - /* Count the line number and relocation entries required for the - output file. Determine a few maximum sizes. */ + /* Count the relocation entries required for the output file. + (We've already counted the line numbers.) Determine a few + maximum sizes. */ max_contents_size = 0; max_lineno_count = 0; max_reloc_count = 0; for (o = abfd->sections; o != NULL; o = o->next) { o->reloc_count = 0; - o->lineno_count = 0; for (p = o->map_head.link_order; p != NULL; p = p->next) { if (p->type == bfd_indirect_link_order) @@ -5397,18 +5870,12 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) the linker has decided to not include. */ sec->linker_mark = TRUE; - if (info->strip == strip_none - || info->strip == strip_some) - o->lineno_count += sec->lineno_count; - o->reloc_count += sec->reloc_count; if (sec->rawsize > max_contents_size) max_contents_size = sec->rawsize; if (sec->size > max_contents_size) max_contents_size = sec->size; - if (sec->lineno_count > max_lineno_count) - max_lineno_count = sec->lineno_count; if (coff_section_data (sec->owner, sec) != NULL && xcoff_section_data (sec->owner, sec) != NULL && (xcoff_section_data (sec->owner, sec)->lineno_count @@ -5663,7 +6130,10 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) goto error_return; obj_raw_syment_count (abfd) = 0; - xcoff_data (abfd)->toc = (bfd_vma) -1; + + /* Find a TOC symbol, if we need one. */ + if (!xcoff_find_tc0 (abfd, &finfo)) + goto error_return; /* We now know the position of everything in the file, except that we don't know the size of the symbol table and therefore we don't @@ -5856,13 +6326,16 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) } /* Write out the loader section contents. */ - BFD_ASSERT ((bfd_byte *) finfo.ldrel - == (xcoff_hash_table (info)->loader_section->contents - + xcoff_hash_table (info)->ldhdr.l_impoff)); o = xcoff_hash_table (info)->loader_section; - if (! bfd_set_section_contents (abfd, o->output_section, o->contents, - (file_ptr) o->output_offset, o->size)) - goto error_return; + if (o) + { + BFD_ASSERT ((bfd_byte *) finfo.ldrel + == (xcoff_hash_table (info)->loader_section->contents + + xcoff_hash_table (info)->ldhdr.l_impoff)); + if (!bfd_set_section_contents (abfd, o->output_section, o->contents, + (file_ptr) o->output_offset, o->size)) + goto error_return; + } /* Write out the magic sections. */ o = xcoff_hash_table (info)->linkage_section; diff --git a/cegcc/src/binutils/bfd/xsym.c b/cegcc/src/binutils/bfd/xsym.c index ac5d80b61..706310ac6 100644 --- a/cegcc/src/binutils/bfd/xsym.c +++ b/cegcc/src/binutils/bfd/xsym.c @@ -1,6 +1,6 @@ /* xSYM symbol-file support for BFD. - Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 - Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "alloca-conf.h" #include "sysdep.h" #include "xsym.h" #include "bfd.h" @@ -45,6 +46,7 @@ #define bfd_sym_bfd_is_group_section bfd_generic_is_group_section #define bfd_sym_bfd_discard_group bfd_generic_discard_group #define bfd_sym_section_already_linked _bfd_generic_section_already_linked +#define bfd_sym_bfd_define_common_symbol bfd_generic_define_common_symbol #define bfd_sym_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define bfd_sym_bfd_link_hash_table_free _bfd_generic_link_hash_table_free #define bfd_sym_bfd_link_add_symbols _bfd_generic_link_add_symbols diff --git a/cegcc/src/binutils/bfd/xtensa-modules.c b/cegcc/src/binutils/bfd/xtensa-modules.c index b68e48239..3b2ddeac1 100644 --- a/cegcc/src/binutils/bfd/xtensa-modules.c +++ b/cegcc/src/binutils/bfd/xtensa-modules.c @@ -1,5 +1,5 @@ /* Xtensa configuration-specific ISA information. - Copyright 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. + Copyright 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. -- 2.11.4.GIT