From bc13a0c5958e501561da1e6b4a3ca1fadda52059 Mon Sep 17 00:00:00 2001 From: obrien Date: Tue, 26 Jun 2001 16:57:43 +0000 Subject: Import of GNU Binutils version 2.11.2. --- contrib/binutils/Makefile.in | 4 +- contrib/binutils/bfd/ChangeLog | 566 +++++++ contrib/binutils/bfd/Makefile.am | 107 +- contrib/binutils/bfd/Makefile.in | 565 ++++++- contrib/binutils/bfd/aclocal.m4 | 18 - contrib/binutils/bfd/aout-arm.c | 3 +- contrib/binutils/bfd/aout-encap.c | 2 +- contrib/binutils/bfd/aout-sparcle.c | 2 +- contrib/binutils/bfd/aout-target.h | 3 +- contrib/binutils/bfd/aout-tic30.c | 2 +- contrib/binutils/bfd/aout0.c | 3 +- contrib/binutils/bfd/aout32.c | 2 +- contrib/binutils/bfd/aout64.c | 2 +- contrib/binutils/bfd/aoutf1.h | 2 +- contrib/binutils/bfd/aoutx.h | 7 +- contrib/binutils/bfd/archive.c | 3 +- contrib/binutils/bfd/archures.c | 24 +- contrib/binutils/bfd/armnetbsd.c | 2 +- contrib/binutils/bfd/bfd-in.h | 3 +- contrib/binutils/bfd/bfd-in2.h | 25 +- contrib/binutils/bfd/bfd.c | 3 +- contrib/binutils/bfd/binary.c | 3 +- contrib/binutils/bfd/cache.c | 2 +- contrib/binutils/bfd/coff-alpha.c | 27 +- contrib/binutils/bfd/coff-arm.c | 67 +- contrib/binutils/bfd/coff-aux.c | 2 +- contrib/binutils/bfd/coff-i386.c | 13 +- contrib/binutils/bfd/coff-ppc.c | 3 +- contrib/binutils/bfd/coff-sparc.c | 2 +- contrib/binutils/bfd/coff-tic30.c | 2 +- contrib/binutils/bfd/coff-z8k.c | 3 +- contrib/binutils/bfd/coffcode.h | 635 ++++---- contrib/binutils/bfd/coffgen.c | 3 +- contrib/binutils/bfd/cofflink.c | 3 +- contrib/binutils/bfd/coffswap.h | 3 +- contrib/binutils/bfd/config.bfd | 18 +- contrib/binutils/bfd/config.in | 3 + contrib/binutils/bfd/configure | 961 ++++++----- contrib/binutils/bfd/configure.in | 13 +- contrib/binutils/bfd/corefile.c | 3 +- contrib/binutils/bfd/cpu-alpha.c | 2 +- contrib/binutils/bfd/cpu-arm.c | 2 +- contrib/binutils/bfd/cpu-i386.c | 3 +- contrib/binutils/bfd/cpu-powerpc.c | 2 +- contrib/binutils/bfd/cpu-sparc.c | 2 +- contrib/binutils/bfd/cpu-v850.c | 2 +- contrib/binutils/bfd/cpu-z8k.c | 2 +- contrib/binutils/bfd/demo64.c | 2 +- contrib/binutils/bfd/doc/ChangeLog | 5 + contrib/binutils/bfd/doc/Makefile.in | 2 +- contrib/binutils/bfd/doc/archures.texi | 5 + contrib/binutils/bfd/doc/bfd.texinfo | 6 +- contrib/binutils/bfd/doc/bfdint.texi | 5 +- contrib/binutils/bfd/doc/chew.c | 2 +- contrib/binutils/bfd/doc/reloc.texi | 13 + contrib/binutils/bfd/doc/section.texi | 4 + contrib/binutils/bfd/dwarf1.c | 2 +- contrib/binutils/bfd/dwarf2.c | 9 +- contrib/binutils/bfd/ecoff.c | 38 +- contrib/binutils/bfd/ecofflink.c | 3 +- contrib/binutils/bfd/ecoffswap.h | 5 +- contrib/binutils/bfd/elf-bfd.h | 9 +- contrib/binutils/bfd/elf.c | 133 +- contrib/binutils/bfd/elf32-arm.h | 62 +- contrib/binutils/bfd/elf32-i386.c | 59 +- contrib/binutils/bfd/elf32-ppc.c | 3 +- contrib/binutils/bfd/elf32-sparc.c | 64 +- contrib/binutils/bfd/elf32-v850.c | 4 +- contrib/binutils/bfd/elf32.c | 2 +- contrib/binutils/bfd/elf64-alpha.c | 64 +- contrib/binutils/bfd/elf64-gen.c | 12 +- contrib/binutils/bfd/elf64-sparc.c | 91 +- contrib/binutils/bfd/elfarm-nabi.c | 2 +- contrib/binutils/bfd/elfarm-oabi.c | 2 +- contrib/binutils/bfd/elfcode.h | 12 +- contrib/binutils/bfd/elfcore.h | 3 +- contrib/binutils/bfd/elflink.c | 7 +- contrib/binutils/bfd/elflink.h | 290 ++-- contrib/binutils/bfd/elfxx-target.h | 5 +- contrib/binutils/bfd/format.c | 3 +- contrib/binutils/bfd/freebsd.h | 3 +- contrib/binutils/bfd/gen-aout.c | 3 +- contrib/binutils/bfd/genlink.h | 2 +- contrib/binutils/bfd/hash.c | 3 +- contrib/binutils/bfd/host-aout.c | 2 +- contrib/binutils/bfd/i386aout.c | 3 +- contrib/binutils/bfd/i386bsd.c | 2 +- contrib/binutils/bfd/i386freebsd.c | 2 +- contrib/binutils/bfd/i386linux.c | 2 +- contrib/binutils/bfd/i386netbsd.c | 3 +- contrib/binutils/bfd/ieee.c | 7 +- contrib/binutils/bfd/ihex.c | 2 +- contrib/binutils/bfd/init.c | 3 +- contrib/binutils/bfd/libaout.h | 3 +- contrib/binutils/bfd/libbfd-in.h | 5 +- contrib/binutils/bfd/libbfd.c | 13 +- contrib/binutils/bfd/libbfd.h | 18 +- contrib/binutils/bfd/libcoff-in.h | 9 +- contrib/binutils/bfd/libcoff.h | 9 +- contrib/binutils/bfd/libecoff.h | 2 +- contrib/binutils/bfd/libieee.h | 2 +- contrib/binutils/bfd/linker.c | 11 +- contrib/binutils/bfd/netbsd-core.c | 3 +- contrib/binutils/bfd/netbsd.h | 2 +- contrib/binutils/bfd/opncls.c | 3 +- contrib/binutils/bfd/osf-core.c | 2 +- contrib/binutils/bfd/pe-arm.c | 2 +- contrib/binutils/bfd/pe-i386.c | 2 +- contrib/binutils/bfd/pe-ppc.c | 2 +- contrib/binutils/bfd/peXXigen.c | 2043 +++++++++++++++++++++++ contrib/binutils/bfd/po/Make-in | 61 +- contrib/binutils/bfd/ppcboot.c | 3 +- contrib/binutils/bfd/ptrace-core.c | 3 +- contrib/binutils/bfd/reloc.c | 29 +- contrib/binutils/bfd/reloc16.c | 2 +- contrib/binutils/bfd/sco5-core.c | 2 +- contrib/binutils/bfd/section.c | 23 +- contrib/binutils/bfd/sparclinux.c | 2 +- contrib/binutils/bfd/sparcnetbsd.c | 3 +- contrib/binutils/bfd/srec.c | 3 +- contrib/binutils/bfd/stab-syms.c | 3 +- contrib/binutils/bfd/stabs.c | 2 +- contrib/binutils/bfd/syms.c | 3 +- contrib/binutils/bfd/sysdep.h | 3 +- contrib/binutils/bfd/targets.c | 17 +- contrib/binutils/bfd/tekhex.c | 2 +- contrib/binutils/bfd/trad-core.c | 3 +- contrib/binutils/binutils/ChangeLog | 131 +- contrib/binutils/binutils/MAINTAINERS | 20 +- contrib/binutils/binutils/Makefile.am | 2 +- contrib/binutils/binutils/Makefile.in | 7 +- contrib/binutils/binutils/NEWS | 8 + contrib/binutils/binutils/aclocal.m4 | 17 - contrib/binutils/binutils/addr2line.c | 2 +- contrib/binutils/binutils/ar.c | 2 +- contrib/binutils/binutils/arlex.l | 2 +- contrib/binutils/binutils/arparse.y | 2 +- contrib/binutils/binutils/arsup.c | 2 +- contrib/binutils/binutils/arsup.h | 2 +- contrib/binutils/binutils/binutils.texi | 42 + contrib/binutils/binutils/bucomm.c | 4 +- contrib/binutils/binutils/bucomm.h | 2 +- contrib/binutils/binutils/budbg.h | 2 +- contrib/binutils/binutils/coffdump.c | 2 +- contrib/binutils/binutils/coffgrok.c | 2 +- contrib/binutils/binutils/coffgrok.h | 19 + contrib/binutils/binutils/config.in | 3 + contrib/binutils/binutils/config.texi | 2 +- contrib/binutils/binutils/configure | 873 +++++----- contrib/binutils/binutils/configure.in | 5 +- contrib/binutils/binutils/debug.c | 2 +- contrib/binutils/binutils/debug.h | 2 +- contrib/binutils/binutils/deflex.l | 2 +- contrib/binutils/binutils/defparse.c | 8 +- contrib/binutils/binutils/defparse.y | 2 +- contrib/binutils/binutils/dlltool.c | 3 +- contrib/binutils/binutils/dlltool.h | 2 +- contrib/binutils/binutils/dllwrap.c | 2 +- contrib/binutils/binutils/filemode.c | 3 +- contrib/binutils/binutils/ieee.c | 2 +- contrib/binutils/binutils/nm.c | 8 +- contrib/binutils/binutils/objcopy.1 | 1172 ++++++-------- contrib/binutils/binutils/objcopy.c | 178 +- contrib/binutils/binutils/objdump.c | 13 +- contrib/binutils/binutils/po/binutils.pot | 793 ++++----- contrib/binutils/binutils/prdbg.c | 2 +- contrib/binutils/binutils/rclex.c | 4 +- contrib/binutils/binutils/rclex.l | 2 +- contrib/binutils/binutils/rcparse.c | 8 +- contrib/binutils/binutils/rcparse.y | 2 +- contrib/binutils/binutils/rdcoff.c | 2 +- contrib/binutils/binutils/rddbg.c | 2 +- contrib/binutils/binutils/readelf.c | 1270 +++++++++++---- contrib/binutils/binutils/rename.c | 2 +- contrib/binutils/binutils/resbin.c | 2 +- contrib/binutils/binutils/rescoff.c | 2 +- contrib/binutils/binutils/resrc.c | 2 +- contrib/binutils/binutils/size.c | 2 +- contrib/binutils/binutils/srconv.c | 3 +- contrib/binutils/binutils/strings.c | 9 +- contrib/binutils/binutils/sysdump.c | 2 +- contrib/binutils/binutils/sysinfo.y | 19 + contrib/binutils/binutils/syslex.l | 19 + contrib/binutils/binutils/version.c | 3 +- contrib/binutils/binutils/wrstabs.c | 2 +- contrib/binutils/gas/ChangeLog | 572 ++++++- contrib/binutils/gas/Makefile.am | 32 +- contrib/binutils/gas/Makefile.in | 34 +- contrib/binutils/gas/aclocal.m4 | 18 - contrib/binutils/gas/app.c | 3 +- contrib/binutils/gas/as.c | 6 +- contrib/binutils/gas/as.h | 3 +- contrib/binutils/gas/asintl.h | 2 +- contrib/binutils/gas/atof-generic.c | 2 +- contrib/binutils/gas/bignum-copy.c | 2 +- contrib/binutils/gas/bignum.h | 2 +- contrib/binutils/gas/bit_fix.h | 2 +- contrib/binutils/gas/config.in | 9 + contrib/binutils/gas/config/aout_gnu.h | 3 +- contrib/binutils/gas/config/atof-ieee.c | 25 +- contrib/binutils/gas/config/obj-aout.c | 2 +- contrib/binutils/gas/config/obj-aout.h | 2 +- contrib/binutils/gas/config/obj-coff.c | 39 +- contrib/binutils/gas/config/obj-coff.h | 3 +- contrib/binutils/gas/config/obj-ecoff.c | 10 +- contrib/binutils/gas/config/obj-ecoff.h | 3 +- contrib/binutils/gas/config/obj-elf.c | 2 +- contrib/binutils/gas/config/obj-elf.h | 2 +- contrib/binutils/gas/config/obj-generic.h | 3 +- contrib/binutils/gas/config/obj-ieee.c | 2 +- contrib/binutils/gas/config/obj-ieee.h | 3 +- contrib/binutils/gas/config/obj-multi.h | 2 +- contrib/binutils/gas/config/tc-alpha.c | 3 +- contrib/binutils/gas/config/tc-alpha.h | 3 +- contrib/binutils/gas/config/tc-arm.c | 202 ++- contrib/binutils/gas/config/tc-arm.h | 22 +- contrib/binutils/gas/config/tc-generic.h | 2 +- contrib/binutils/gas/config/tc-i386.c | 694 ++++---- contrib/binutils/gas/config/tc-i386.h | 14 +- contrib/binutils/gas/config/tc-m68851.h | 3 +- contrib/binutils/gas/config/tc-ppc.c | 24 +- contrib/binutils/gas/config/tc-ppc.h | 2 +- contrib/binutils/gas/config/tc-sparc.c | 36 +- contrib/binutils/gas/config/tc-sparc.h | 3 +- contrib/binutils/gas/config/tc-tic30.c | 2 +- contrib/binutils/gas/config/tc-tic30.h | 2 +- contrib/binutils/gas/config/tc-v850.c | 34 +- contrib/binutils/gas/config/tc-v850.h | 2 +- contrib/binutils/gas/config/tc-z8k.c | 184 +-- contrib/binutils/gas/config/tc-z8k.h | 3 +- contrib/binutils/gas/config/te-386bsd.h | 3 +- contrib/binutils/gas/config/te-freebsd.h | 2 +- contrib/binutils/gas/config/te-nbsd.h | 3 +- contrib/binutils/gas/config/te-ppcnw.h | 2 +- contrib/binutils/gas/config/te-sparcaout.h | 2 +- contrib/binutils/gas/configure | 901 +++++------ contrib/binutils/gas/configure.in | 27 +- contrib/binutils/gas/debug.c | 3 +- contrib/binutils/gas/depend.c | 2 +- contrib/binutils/gas/doc/Makefile.in | 2 +- contrib/binutils/gas/doc/all.texi | 3 +- contrib/binutils/gas/doc/as.texinfo | 40 +- contrib/binutils/gas/doc/c-arm.texi | 3 +- contrib/binutils/gas/doc/c-i386.texi | 35 +- contrib/binutils/gas/doc/c-sparc.texi | 3 +- contrib/binutils/gas/doc/c-v850.texi | 2 +- contrib/binutils/gas/doc/c-z8k.texi | 2 +- contrib/binutils/gas/doc/gasp.texi | 2 +- contrib/binutils/gas/doc/internals.texi | 10 +- contrib/binutils/gas/dwarf2dbg.c | 14 +- contrib/binutils/gas/dwarf2dbg.h | 2 +- contrib/binutils/gas/ecoff.c | 66 +- contrib/binutils/gas/ecoff.h | 3 +- contrib/binutils/gas/ehopt.c | 352 ++-- contrib/binutils/gas/emul-target.h | 20 + contrib/binutils/gas/emul.h | 20 + contrib/binutils/gas/expr.c | 3 +- contrib/binutils/gas/expr.h | 3 +- contrib/binutils/gas/flonum-copy.c | 3 +- contrib/binutils/gas/flonum-konst.c | 2 +- contrib/binutils/gas/flonum-mult.c | 2 +- contrib/binutils/gas/flonum.h | 2 +- contrib/binutils/gas/frags.c | 3 +- contrib/binutils/gas/frags.h | 6 +- contrib/binutils/gas/gasp.c | 2 +- contrib/binutils/gas/hash.c | 3 +- contrib/binutils/gas/hash.h | 2 +- contrib/binutils/gas/input-file.c | 2 +- contrib/binutils/gas/input-file.h | 2 +- contrib/binutils/gas/input-scrub.c | 3 +- contrib/binutils/gas/itbl-lex.l | 2 +- contrib/binutils/gas/itbl-ops.c | 4 +- contrib/binutils/gas/itbl-ops.h | 2 +- contrib/binutils/gas/itbl-parse.y | 2 +- contrib/binutils/gas/listing.h | 2 +- contrib/binutils/gas/literal.c | 2 +- contrib/binutils/gas/macro.c | 2 +- contrib/binutils/gas/macro.h | 3 +- contrib/binutils/gas/messages.c | 2 +- contrib/binutils/gas/obj.h | 2 +- contrib/binutils/gas/output-file.c | 2 +- contrib/binutils/gas/output-file.h | 3 +- contrib/binutils/gas/po/POTFILES.in | 4 +- contrib/binutils/gas/read.c | 42 +- contrib/binutils/gas/read.h | 3 +- contrib/binutils/gas/sb.c | 2 +- contrib/binutils/gas/sb.h | 2 +- contrib/binutils/gas/stabs.c | 18 +- contrib/binutils/gas/struc-symbol.h | 2 +- contrib/binutils/gas/subsegs.c | 3 +- contrib/binutils/gas/subsegs.h | 2 +- contrib/binutils/gas/symbols.c | 17 +- contrib/binutils/gas/symbols.h | 2 +- contrib/binutils/gas/tc.h | 3 +- contrib/binutils/gas/write.c | 82 +- contrib/binutils/gas/write.h | 4 +- contrib/binutils/include/ChangeLog | 115 +- contrib/binutils/include/ansidecl.h | 3 +- contrib/binutils/include/aout/ChangeLog | 4 + contrib/binutils/include/aout/aout64.h | 18 +- contrib/binutils/include/aout/ar.h | 18 +- contrib/binutils/include/aout/encap.h | 2 +- contrib/binutils/include/aout/host.h | 28 +- contrib/binutils/include/aout/ranlib.h | 2 +- contrib/binutils/include/aout/reloc.h | 2 +- contrib/binutils/include/aout/stab.def | 2 +- contrib/binutils/include/aout/stab_gnu.h | 17 + contrib/binutils/include/bfdlink.h | 3 +- contrib/binutils/include/coff/ChangeLog | 68 +- contrib/binutils/include/coff/alpha.h | 20 +- contrib/binutils/include/coff/arm.h | 2 +- contrib/binutils/include/coff/aux-coff.h | 17 + contrib/binutils/include/coff/ecoff.h | 24 +- contrib/binutils/include/coff/i386.h | 18 +- contrib/binutils/include/coff/internal.h | 18 +- contrib/binutils/include/coff/pe.h | 6 +- contrib/binutils/include/coff/powerpc.h | 24 +- contrib/binutils/include/coff/sparc.h | 18 +- contrib/binutils/include/coff/ti.h | 19 +- contrib/binutils/include/coff/tic30.h | 18 +- contrib/binutils/include/coff/z8k.h | 18 +- contrib/binutils/include/demangle.h | 3 +- contrib/binutils/include/dis-asm.h | 18 + contrib/binutils/include/elf/ChangeLog | 58 +- contrib/binutils/include/elf/alpha.h | 2 +- contrib/binutils/include/elf/arc.h | 2 +- contrib/binutils/include/elf/arm.h | 2 +- contrib/binutils/include/elf/avr.h | 2 +- contrib/binutils/include/elf/common.h | 4 +- contrib/binutils/include/elf/cris.h | 2 +- contrib/binutils/include/elf/d10v.h | 2 +- contrib/binutils/include/elf/d30v.h | 2 +- contrib/binutils/include/elf/dwarf.h | 2 +- contrib/binutils/include/elf/dwarf2.h | 2 +- contrib/binutils/include/elf/external.h | 5 +- contrib/binutils/include/elf/fr30.h | 2 +- contrib/binutils/include/elf/hppa.h | 3 +- contrib/binutils/include/elf/i370.h | 2 +- contrib/binutils/include/elf/i386.h | 2 +- contrib/binutils/include/elf/i860.h | 2 +- contrib/binutils/include/elf/i960.h | 2 +- contrib/binutils/include/elf/ia64.h | 4 +- contrib/binutils/include/elf/internal.h | 2 +- contrib/binutils/include/elf/m32r.h | 2 +- contrib/binutils/include/elf/m68hc11.h | 2 +- contrib/binutils/include/elf/m68k.h | 2 +- contrib/binutils/include/elf/mcore.h | 2 +- contrib/binutils/include/elf/mips.h | 128 +- contrib/binutils/include/elf/mn10200.h | 2 +- contrib/binutils/include/elf/mn10300.h | 2 +- contrib/binutils/include/elf/pj.h | 2 +- contrib/binutils/include/elf/ppc.h | 2 +- contrib/binutils/include/elf/reloc-macros.h | 2 +- contrib/binutils/include/elf/sh.h | 2 +- contrib/binutils/include/elf/sparc.h | 4 +- contrib/binutils/include/elf/v850.h | 2 +- contrib/binutils/include/floatformat.h | 2 +- contrib/binutils/include/fnmatch.h | 2 +- contrib/binutils/include/getopt.h | 2 +- contrib/binutils/include/ieee.h | 270 ++-- contrib/binutils/include/libiberty.h | 25 + contrib/binutils/include/md5.h | 2 +- contrib/binutils/include/obstack.h | 3 +- contrib/binutils/include/opcode/ChangeLog | 86 +- contrib/binutils/include/opcode/arm.h | 2 +- contrib/binutils/include/opcode/convex.h | 2 +- contrib/binutils/include/opcode/i386.h | 14 +- contrib/binutils/include/opcode/np1.h | 2 +- contrib/binutils/include/opcode/pn.h | 2 +- contrib/binutils/include/opcode/ppc.h | 2 +- contrib/binutils/include/opcode/sparc.h | 2 +- contrib/binutils/include/opcode/v850.h | 2 +- contrib/binutils/include/partition.h | 4 +- contrib/binutils/include/progress.h | 2 +- contrib/binutils/include/remote-sim.h | 3 +- contrib/binutils/include/safe-ctype.h | 2 +- contrib/binutils/include/splay-tree.h | 2 +- contrib/binutils/ld/ChangeLog | 139 +- contrib/binutils/ld/Makefile.am | 24 +- contrib/binutils/ld/Makefile.in | 24 +- contrib/binutils/ld/configure | 357 ++-- contrib/binutils/ld/configure.host | 2 +- contrib/binutils/ld/configure.in | 5 +- contrib/binutils/ld/configure.tgt | 13 +- contrib/binutils/ld/deffile.h | 2 +- contrib/binutils/ld/deffilep.y | 2 +- contrib/binutils/ld/emulparams/shelf_linux.sh | 14 + contrib/binutils/ld/emultempl/armcoff.em | 2 +- contrib/binutils/ld/emultempl/armelf.em | 2 +- contrib/binutils/ld/emultempl/armelf_oabi.em | 2 +- contrib/binutils/ld/emultempl/elf32.em | 63 +- contrib/binutils/ld/emultempl/generic.em | 2 +- contrib/binutils/ld/emultempl/linux.em | 2 +- contrib/binutils/ld/emultempl/pe.em | 5 +- contrib/binutils/ld/emultempl/vanilla.em | 2 +- contrib/binutils/ld/ld.1 | 21 +- contrib/binutils/ld/ld.h | 2 +- contrib/binutils/ld/ld.texinfo | 101 +- contrib/binutils/ld/ldcref.c | 2 +- contrib/binutils/ld/ldctor.c | 2 +- contrib/binutils/ld/ldctor.h | 3 +- contrib/binutils/ld/ldemul.c | 2 +- contrib/binutils/ld/ldemul.h | 2 +- contrib/binutils/ld/ldexp.c | 9 +- contrib/binutils/ld/ldexp.h | 3 +- contrib/binutils/ld/ldfile.c | 28 +- contrib/binutils/ld/ldfile.h | 3 +- contrib/binutils/ld/ldgram.y | 6 +- contrib/binutils/ld/ldint.texinfo | 5 +- contrib/binutils/ld/ldlang.c | 99 +- contrib/binutils/ld/ldlang.h | 3 +- contrib/binutils/ld/ldlex.h | 3 +- contrib/binutils/ld/ldlex.l | 19 +- contrib/binutils/ld/ldmain.c | 4 +- contrib/binutils/ld/ldmain.h | 3 +- contrib/binutils/ld/ldmisc.c | 16 +- contrib/binutils/ld/ldmisc.h | 4 +- contrib/binutils/ld/ldver.c | 2 +- contrib/binutils/ld/ldver.h | 2 +- contrib/binutils/ld/ldwrite.c | 2 +- contrib/binutils/ld/lexsup.c | 7 +- contrib/binutils/ld/mri.c | 2 +- contrib/binutils/ld/mri.h | 2 +- contrib/binutils/ld/pe-dll.c | 2 +- contrib/binutils/ld/pe-dll.h | 2 +- contrib/binutils/ld/po/POTFILES.in | 2 +- contrib/binutils/ld/sysdep.h | 2 +- contrib/binutils/md5.sum | 2154 +++++++++++++------------ contrib/binutils/opcodes/ChangeLog | 180 ++- contrib/binutils/opcodes/Makefile.am | 39 +- contrib/binutils/opcodes/Makefile.in | 40 +- contrib/binutils/opcodes/aclocal.m4 | 18 - contrib/binutils/opcodes/alpha-dis.c | 2 +- contrib/binutils/opcodes/alpha-opc.c | 2 +- contrib/binutils/opcodes/arm-dis.c | 3 +- contrib/binutils/opcodes/arm-opc.h | 3 +- contrib/binutils/opcodes/config.in | 3 + contrib/binutils/opcodes/configure | 758 +++++---- contrib/binutils/opcodes/configure.in | 4 +- contrib/binutils/opcodes/dis-buf.c | 3 +- contrib/binutils/opcodes/disassemble.c | 2 +- contrib/binutils/opcodes/i386-dis.c | 258 +-- contrib/binutils/opcodes/opintl.h | 2 +- contrib/binutils/opcodes/po/POTFILES.in | 10 +- contrib/binutils/opcodes/ppc-dis.c | 2 +- contrib/binutils/opcodes/ppc-opc.c | 41 +- contrib/binutils/opcodes/sparc-dis.c | 3 +- contrib/binutils/opcodes/sparc-opc.c | 3 +- contrib/binutils/opcodes/sysdep.h | 2 +- contrib/binutils/opcodes/tic30-dis.c | 2 +- contrib/binutils/opcodes/v850-dis.c | 2 +- contrib/binutils/opcodes/v850-opc.c | 2 +- contrib/binutils/opcodes/z8k-dis.c | 2 +- contrib/binutils/opcodes/z8kgen.c | 25 +- 454 files changed, 13621 insertions(+), 7059 deletions(-) create mode 100644 contrib/binutils/bfd/peXXigen.c create mode 100644 contrib/binutils/ld/emulparams/shelf_linux.sh (limited to 'contrib/binutils') diff --git a/contrib/binutils/Makefile.in b/contrib/binutils/Makefile.in index 14a7756..d4ae7e9 100644 --- a/contrib/binutils/Makefile.in +++ b/contrib/binutils/Makefile.in @@ -1739,7 +1739,9 @@ SUPPORT_FILES = list-of-support-files-for-tool-in-question # NOTE: No double quotes in the below. It is used within shell script # as VER="$(VER)" -VER = ` if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ +VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \ + sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ + elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ else \ sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \ diff --git a/contrib/binutils/bfd/ChangeLog b/contrib/binutils/bfd/ChangeLog index 380d1ff..6227438 100644 --- a/contrib/binutils/bfd/ChangeLog +++ b/contrib/binutils/bfd/ChangeLog @@ -1,3 +1,569 @@ +2001-06-19 Philip Blundell + + * configure.in: Set version to 2.11.2. + * configure: Regenerate. + +2001-06-19 Andreas Jaeger + + Merge from mainline sources: + 2001-06-19 Andreas Jaeger + * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of + dynamic symbols. + 2001-06-07 Andreas Jaeger + * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an + assertion. + (elf64_x86_64_check_relocs): Set an alignment of 8 for .rela + sections; handle further relocations. + 2001-06-01 Andreas Jaeger + * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8 + relocation, small reformatting. + +2001-06-14 Nick Clifton + + Merge from mainline sources: + 2001-04-27 Sean McNeil + * config.bfd: Add arm-vxworks target. + * coff-arm (coff_arm_relocate_section): Add in symbol value to + addend (fro VXworks targets). + 2001-03-06 Nick Clifton + * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero + of offset in BLX(1) instruction. + * coff-arm.c (coff_arm_relocate_section): Clear bit zero of + offset in BLX(1) instruction. + Fix formatting. + 2001-03-06 Nick Clifton + * coff-arm.c (coff_arm_reloc_type_lookup): Add + BFD_RELOC_THUMB_PCREL_BLX. + 2001-05-04 Nick Clifton + * elf32-arm.h (elf32_arm_final_link_relocate): Set + EF_ARM_HASENTRY if the start address is set. + +2001-06-11 Alan Modra + + * configure.in (): Move powerpc-*-*bsd* after + powerpc-*-freebsd*. + + Merge from mainline. + 2001-06-02 H.J. Lu + * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX + and ELFOSABI_HPUX. + * elf64-hppa.c (elf64_hppa_object_p): Likewise. + + 2001-06-02 Hans-Peter Nilsson + * section.c (_bfd_strip_section_from_output): Handle NULL + output_section. + + 2001-05-30 Alan Modra + * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for + millicode. Don't allocate .got and .rela.got space here.. + (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here.. + (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and + .rela.plt here.. + (hppa_handle_PIC_calls): ..nor here.. + (allocate_plt_and_got): ..instead do it all here. New function. + (elf32_hppa_size_dynamic_sections): Allocate local .got space and + call allocate_plt_and_got. No need to zap .got if not dynamic. + (elf32_hppa_final_link): Call regular bfd_final_link instead of + gc_common_final_link. + (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define. + (elf32_hppa_relocate_section): Use it here. + (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of + dynamic_sections_created. + (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym. + + 2001-05-28 Thiemo Seufer + * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of + a zeroing loop. + (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly. + (elf_link_input_bfd): Likewise. + (elf_reloc_link_order): Likewise. + (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64 + relocations correctly. + + 2001-05-28 Alan Modra + * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries + for symbols forced local that need plabels. + (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in + .plt.rela for local syms if non-shared. + (hppa_build_one_stub): Mask lsb of plt.offset. + (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set. + (clobber_millicode_symbols): Correct comment. + (elf32_hppa_relocate_section): Likewise. + (elf32_hppa_finish_dynamic_symbol): Likewise. + + 2001-05-25 Alan Modra + * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow + undefined millicode syms in shared libs. + (hppa_build_one_stub): Turn BFD_ASSERTs into aborts. + (elf32_hppa_check_relocs): Likewise. + (elf32_hppa_adjust_dynamic_symbol): Likewise. + (elf32_hppa_size_dynamic_sections): Likewise. + (elf32_hppa_relocate_section): Likewise. + (elf32_hppa_finish_dynamic_symbol): Likewise. + (elf32_hppa_finish_dynamic_sections): Likewise. + + 2001-05-23 Alexandre Oliva + * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo + s/ENTIRES/ENTRIES/. + + 2001-05-23 Thiemo Seufer + * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. + * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support. + * archures.c (bfd_mach_mips12000): Define. + * cpu-mips.c (arch_info_struct): Add MIPS r12k support. + * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k + support. + (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef. + * bfd-in2.h: Regenerate. + * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol. + + 2001-05-23 Nick Clifton + * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number + of entries in a structured section. + * elf.c: Use new macro. + * elf32-i386.c: Use new macro. + * elf32-mips.c: Use new macro. + * elf64-alpha.c: Use new macro. + * elf64-sparc.c: Use new macro. + * elfcode.h: Use new macro. + * elflink.h: Use new macro. + + 2001-05-21 Andreas Jaeger + * dwarf2.c (decode_line_info): Fix error message. + (read_abbrevs): Fix test for offset as suggested by Alan Modra and + adjust error message. + + 2001-05-17 H.J. Lu + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the + version definition to basename of the output filename. + + 2001-05-15 Alexandre Oliva + * elf-m10300.c (mn10300_elf_relax_section): Don't relax + negative 32-bit operands to 16 operands when the operand is + going to be zero-extended by the modified opcode. + + 2001-05-11 Jakub Jelinek + * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind + sections as well. + (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO + to .gnu.linkonce.t.FOO text section. + + 2001-05-11 Nick Clifton + * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr' + to be unsigned long, in order to match its use. + + 2001-05-10 H.J. Lu + * linker.c (_bfd_generic_link_add_one_symbol): Check loop on + indirect symbols. + + 2001-05-09 H.J. Lu + * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate + versymhdr->sh_size bytes for extversym instead of hdr->sh_size. + Remove the unused veriable `dynver'. + + 2001-05-07 Thiemo Seufer + * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it + is always a positive integer. Cast away sign mismatch. + * elf32-mips.c: Fix misleading comment and typo. + (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use + correct data type. + * elflink.c: Fix typo. + (_bfd_elf_create_dynamic_sections): Remove superfluous initialization. + * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch. + + 2001-05-03 Nick Clifton + * targets.c (_bfd_target_vector_entries): Compute value based on + the size of the _bfd_target_vector and not bfd_target_vector. + + 2001-05-03 Andreas Jaeger + * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute. + (elf_generic_info_to_howto_rel): Likewise. + * coff-alpha.c (reloc_nil): Likewise. + (alpha_ecoff_bad_format_hook): Likewise. + (alpha_adjust_reloc_out): Likewise. + (alpha_bfd_reloc_type_lookup): Likewise. + (alpha_convert_external_reloc): Likewise. + * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise. + (elf64_alpha_reloc_bad): Likewise. + (elf64_alpha_reloc_gpdisp): Likewise. + (elf64_alpha_bfd_reloc_type_lookup): Likewise. + (elf64_alpha_info_to_howto): Likewise. + (elf64_alpha_add_symbol_hook): Likewise. + (elf64_alpha_create_got_section): Likewise. + (elf64_alpha_is_local_label_name): Likewise. + (elf64_alpha_merge_ind_symbols): Likewise. + * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise. + (mips_elf64_get_reloc_upper_bound): Likewise. + * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise. + (nlm_alpha_get_public_offset): Likewise. + + 2001-04-30 H.J. Lu + * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1 + only for ELF_LINK_FORCED_LOCAL. + * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise. + * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise. + * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise. + * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL + if the symbol has hidden or internal visibility. + + 2001-04-14 Mark Elbrecht + * coffcode.h (coff_write_object_contents): Use + bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out. + + 2001-04-09 Hans-Peter Nilsson + * elflink.h (elf_fix_symbol_flags): For non-default visibilities, + only hide symbols marked STV_INTERNAL or STV_HIDDEN. + + 2001-04-05 Steven J. Hill + * config.bfd (mips*el*-*-linux-gnu*): Use traditional little + endian MIPS ELF target. + (mips*-*-linux-gnu*): Use traditional big endian MIPS ELF target. + * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional + 64bit big endian MIPS ELF target. + (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little + endian MIPS ELF target. + * configure: Regenerated. + * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and + little endian targets. + (mips_elf_sym_is_global): Handle traditional targets. + * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional + 64bit big endian MIPS ELF target. + (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little + endian MIPS ELF target. + * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec + and bfd_elf64_tradlittlemips_vec. + + 2001-04-04 Alan Modra + * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol + when -Bsymbolic causes a symbol to no longer need a .plt entry. + + 2001-04-03 David Mosberger + * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted. + + 2001-03-30 H.J. Lu + * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ... + (PEI_DEFAULT_TARGET_SUBSYSTEM): This. + + 2001-03-23 Nick Clifton + * Makefile.am (BUILD_CFILES): New variable: List of C source + files created in build directory. + (BUILD_HFILES): New variable: List of header files created in + build directory. + (POTFILES): Delete. + (po/POTFILES.in): Replace rule with empty entry. + (po/SRC-POTFILES.in): New rule: Create a list of source files + in the source directory. + (po/BLD-POTFILES.in): New rule: Create a list of source files + in the build directory. + (MOSTLYCLEAN): Do not delete source files created in build + directory. + * Makefile.in: Regenerate. + * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in + into po/Makefile. + * configure: Regenerate. + * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES + and BLD_POTFILES. + Add .. to the search path when building bfd.pot. + Delete POTFILES when performing distclean. + Add comment describing why distclean is broken in maintainer mode. + * po/POTFILES.in: Delete. + * po/SRC-POTFILES.in: New file. + * po/BLD-POTFILES.in: New file. + * po/bfd.pot: Regenerate. + + 2001-03-06 Igor Shevlyakov + * archures.c (bfd_default_scan): Add Coldfire CPUs. + * bfd-in2.h: Regenerate. + * cpu-m68k.c: Add Coldfire CPUs for arch table. + * ieee.c (ieee_write_processor): Set proper id for + Coldfire CPUs. + + 2001-02-27 H.J. Lu + * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if + abfd->tdata.aout_data == NULL. + + 2001-02-26 Nick Clifton + * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy + up, replacing multiple if statements with a switch. + (handle_COMDAT): New function. + + 2001-02-26 H.J. Lu + * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue + a warning for section flags we do not handle instead of + aborting. + + 2001-02-19 Jakub Jelinek + * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT + entries that could serve as a definition for a weak symbol. + * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise. + + 2001-02-18 Jim Kingdon + * irix-core.c (irix_core_core_file_p): Set the architecture (GDB + multiarch needs it). + + 2001-02-18 H.J. Lu + * elflink.h (elf_link_input_bfd): Ignore invalid section symbol + index. + + 2001-02-18 Kazu Hirata + * vms-misc.c: Fix formatting. + + 2001-02-16 Kazu Hirata + * vms.c: Fix formatting. + + 2001-02-14 H.J. Lu + * elf.c (elf_find_function): New function. + (_bfd_elf_find_nearest_line): Call elf_find_function () to find + the file name and function name. + + 2001-02-14 Nick Clifton + * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c + (BFD64_BACKENDS): Add pepigen.c + Add rules to create peigen.c and pepigen.c from peXXigen.c. + + 2001-02-14 H.J. Lu + * libcoff-in.h (pe_tdata): Add members target_subsystem and + force_minimum_alignment. + + 2001-02-13 Kazu Hirata + * vms.c (vms_print_symbol): Remove unreachable code. + * rs6000-core.c: Fix formatting. + + 2001-02-13 David Mosberger + * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define + as _bfd_XXi_only_swap_filehdr_out. + (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set + pe->force_minimum_alignment to TRUE. + (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to + PEI_TARGET_SUBSYSTEM. + (pe_print_private_bfd_data): Call + _bfd_XX_print_private_bfd_data_common() instead of + _bfd_pe_print_private_bfd_data_common(). + (pe_bfd_copy_private_bfd_data): Call + _bfd_XX_bfd_copy_private_bfd_data_common() instead of + _bfd_pe_bfd_copy_private_bfd_data_common(). + (coff_bfd_copy_private_section_data): Define as + _bfd_XX_bfd_copy_private_section_data instead of + _bfd_pe_bfd_copy_private_section_data. + (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead + of a _bfd_pe_get_symbol_info. + * peigen.c: Delete. + * peXXigen.c: Renamed from peigen.c. + (COFF_WITH_XX): Define this macro (will get expanded into + COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being + compiled as peigen.c or pepigen.c. + [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to + define the canonical PEP structures and definitions. + (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in + effect, enforce minimum file and section alignments. If + extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to + pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN, + so, by default, this is a no-op). + * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep. + (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map + _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to + _bfd_pefoo if it's not defined. Use these macros to define + coff swap macros. + * libcoff.h (pe_tdata): Add members target_subsystem and + force_minimum_alignment. + * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to + COFF_WITH_pep. + (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM. + * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of + peigen.lo. + * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep. + (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and + PEPAOUTHDR. + * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo. + (BFD64_BACKENDS_CFILES): Mention pepigen.c + (peigen.c): Add rule to generate from peXXigen.c. + (pepigen.c): Ditto. + (pepigen.lo): List dependencies for pepigen.lo. + + 2001-02-11 H.J. Lu + * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB + alignment. + + 2001-02-11 Maciej W. Rozycki + * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch + from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32 + relocations against dynsym symbols. + * elf32-mips.c (elf_mips_howto_table): Fix the comment on + the R_MIPS_26 relocation. + (mips_elf_calculate_relocation): Use (p + 4) instead of p for + the R_MIPS_26 relocation. + (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26 + relocation. + * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on + the R_MIPS_26 relocation. + (mips_elf64_howto_table_rela): Likewise. + * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub + member to mark symbols that have non-CALL relocations against + them. + (mips_elf_link_hash_newfunc): Initialize no_fn_stub. + (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like + R_MIPS_GOT16. + (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a + non-CALL relocation against it is encountered. + (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well. + (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if + no_fn_stub is not set. + * elf32-mips.c (mips_elf_output_extsym): Get the output section + information from the real symbol for indirect ones. + Check no_fn_stub to find out if a symbol has a function stub + indeed. + + 2001-02-09 Jakub Jelinek + * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function. + + 2001-02-09 Mark Kettenis + * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32 + similar to R_SPARC_32. + * elf64-sparc.c (sparc64_elf_howto_table): Likewise. + + 2001-02-08 Richard Henderson + * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness + before visibility. Locally defined protected symbols are not + dynamic. + + 2001-02-07 Jakub Jelinek + * elflink.h (is_global_symbol_definition): Rename to + is_global_data_symbol_definition and have it reject function + symbols. + (elf_link_is_defined_archive_symbol): Use renamed function. + + 2001-02-07 Todd Vierling + * libbfd-in.h (bfd_target_vector): Change extern array to pointer. + * libbfd.h (bfd_target_vector): Likewise. + * targets.c (bfd_target_vector): Rename to _bfd_target_vector and + make static; create pointer reference named bfd_target_vector. + (_bfd_target_vector_entries): Calculate this based on the array + typed _bfd_target_vector. + + 2001-02-06 H.J. Lu + * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and + internal symbols are not dynamic. + * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise. + + 2001-02-06 Kazu Hirata + * elf-m10200.c: Fix formatting. + + 2001-02-01 Kazu Hirata + * elf-m10300.c: Fix formatting. + +2001-06-10 Philip Blundell + + * configure.in: Set version to 2.11.1. + * configure: Regenerate. + +2001-06-09 Philip Blundell + + * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last + change. + (elf32_arm_plt_entry): Likewise. + +2001-06-07 Alan Modra + + * Most files: Update copyright notices. + +2001-05-29 Andreas Jaeger + + * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64. + (elf64_x86_64_relocate_section): Likewise. + +2001-05-28 Andreas Jaeger + + * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the + generic version since we want a hashsize of 4. + (elf_backend_size_info): Likewise. + +2001-05-28 Nicolas Pitre + + * elf32-arm.h: Fix PLT generation for big endian ARM. + +2001-05-28 Jeff Sturm + + * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32 + and BFD_RELOC_SPARC_UA64 mapping + * elf64-sparc.c: Likewise. + +2001-05-23 Alan Modra + + Merge from mainline. + 2001-05-17 Alan Modra + * elf32-hppa.c (hppa_build_one_stub): Add an assert to check + plt.offset. + + 2001-05-16 Alan Modra + * section.c (asection): Add linker_has_input field. + (STD_SECTION): Adjust initialization to suit. + * ecoff.c (bfd_debug_section): Likewise. + * bfd-in2.h: Regenerate. + + 2001-05-07 Thiemo Seufer + * ecoff.c (bfd_debug_section): Fix initialization. + + 2001-05-12 Peter Targett + * cpu-arc.c (arch_info_struct): Add entry 'base' representing old + name for 'arc5' core versions. + (bfd_arc_arch): Make bfd_mach_arc_6 default. + * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default + architecture. + (arc_elf_final_write_processing): Make bfd_mach_arc_6 default. + + 2001-05-08 Ian Lance Taylor + * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is + NULL or is not COFF. + (coff_i386_rtype_to_howto): Don't dump core if output section + owner is not COFF. + + 2001-04-13 Roger Sayle + * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section + flag on pe-i386 targets. + + 2001-04-26 H.J. Lu + * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is + valid. + + 2001-04-05 David Mosberger + * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an + ordinary "progbits" section. + +2001-05-04 Richard Henderson + + * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true. + +2001-04-30 Andreas Jaeger , Andreas Schwab + + * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for + R_X86_64_GOTPCREL, don't use assignments instead of comparisons. + +2001-04-27 Andreas Jaeger + + * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap + out handled entries. + (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries. + (elf64_x86_64_relocate_section): Fix GOTPCREL calculation. + (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and + GOT32. + +2001-04-30 Alan Modra + + * elf32-hppa.c (final_link_relocate): Branch to .+8 for + calls to undefined weak symbols. + +2001-04-19 Andreas Jaeger + + * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions. + (elf64_x86_64_plt_entry): Likewise. + (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation. + (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation. + 2001-03-31 Philip Blundell From 2001-03-26 H.J. Lu diff --git a/contrib/binutils/bfd/Makefile.am b/contrib/binutils/bfd/Makefile.am index b6741bc..630cbe1 100644 --- a/contrib/binutils/bfd/Makefile.am +++ b/contrib/binutils/bfd/Makefile.am @@ -385,7 +385,6 @@ BFD32_BACKENDS_CFILES = \ pei-sh.c \ pe-mips.c \ pei-mips.c \ - peigen.c \ ppcboot.c \ reloc16.c \ riscix.c \ @@ -420,7 +419,8 @@ BFD64_BACKENDS = \ elf64-sparc.lo \ elf64.lo \ nlm32-alpha.lo \ - nlm64.lo + nlm64.lo \ + pepigen.lo BFD64_BACKENDS_CFILES = \ aout64.c \ @@ -431,7 +431,6 @@ BFD64_BACKENDS_CFILES = \ elf64-x86-64.c \ elf64-alpha.c \ elf64-hppa.c \ - elf64-ia64.c \ elf64-gen.c \ elf64-mips.c \ elf64-sparc.c \ @@ -469,13 +468,18 @@ TDEFAULTS = @tdefaults@ INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl # C source files that correspond to .o's. -CFILES = \ +SOURCE_CFILES = \ $(BFD_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 + +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 \ @@ -485,15 +489,32 @@ SOURCE_HFILES = \ libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \ nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h -HFILES = \ - elf32-target.h elf64-target.h targmatch.h \ - $(SOURCE_HFILES) +## ... and all .h files which are in the build tree. +BUILD_HFILES = \ + elf32-target.h elf64-target.h targmatch.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 | sort > tmp \ + && mv tmp $(srcdir)/po/SRC-POTFILES.in + +po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES) + for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp \ + && mv tmp $(srcdir)/po/BLD-POTFILES.in -POTFILES = $(CFILES) $(SOURCE_HFILES) +# The following target is retained for upgrade purposes. +# This target used to exist in older versions of this makefile, and was +# referenced by /po/Makefile (which is created from /po/Make-in) +# So old versions of /po/Makefile will try to regenerate themselves +# when make is next run, but that dependency cannot be completed without a build +# of po/POTFILES.in. Hence the presence of this rule. This rule will be deleted +# once it is no longer needed - probably in the fall of 2001. +po/POTFILES.in: -po/POTFILES.in: @MAINT@ Makefile - for file in $(POTFILES); do echo $$file; done | sort > tmp \ - && mv tmp $(srcdir)/po/POTFILES.in diststuff: info @@ -535,6 +556,7 @@ 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 @@ -578,6 +600,16 @@ elf64-ia64.c : elfxx-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 + BFD_H_DEPS= $(INCDIR)/ansidecl.h LOCAL_H_DEPS= libbfd.h sysdep.h config.h $(BFD_LIBS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) @@ -690,12 +722,13 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) $(SHELL) $(srcdir)/../move-if-change libcoff.h-new $(srcdir)/libcoff.h touch stmp-lcoff-h -MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles \ - targmatch.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) + # We want to rerun configure if config.bfd or configure.host change. config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host $(SHELL) ./config.status --recheck @@ -737,6 +770,9 @@ stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def +dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h @@ -905,9 +941,6 @@ cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf.h -dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h ecoff.lo: ecoff.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def libaout.h $(INCDIR)/aout/aout64.h \ @@ -978,10 +1011,6 @@ elf32-i960.lo: elf32-i960.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/i960.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \ @@ -1185,9 +1214,6 @@ pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ libpei.h -peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h libpei.h ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ genlink.h $(INCDIR)/coff/internal.h libcoff.h @@ -1242,6 +1268,10 @@ efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \ coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ peicode.h libpei.h +elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/x86-64.h \ + $(INCDIR)/elf/reloc-macros.h elf64-target.h elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/alpha.h \ @@ -1249,18 +1279,11 @@ elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.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 elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.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-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ - $(INCDIR)/elf/reloc-macros.h elf64-target.h -elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/opcode/i386.h $(INCDIR)/elf/x86-64.h \ - $(INCDIR)/elf/reloc-macros.h elf64-target.h +elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ + $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.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 elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h elf64-target.h @@ -1296,4 +1319,18 @@ sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h libaout.h \ trad-core.lo: trad-core.c $(INCDIR)/filenames.h libaout.h \ $(INCDIR)/bfdlink.h cisco-core.lo: cisco-core.c $(INCDIR)/filenames.h +elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ + $(INCDIR)/elf/reloc-macros.h elf64-target.h +peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \ + $(INCDIR)/bfdlink.h libpei.h +pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/ia64.h $(INCDIR)/coff/pe.h libcoff.h \ + $(INCDIR)/bfdlink.h libpei.h # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/contrib/binutils/bfd/Makefile.in b/contrib/binutils/bfd/Makefile.in index 0c60c1c..10beb2d 100644 --- a/contrib/binutils/bfd/Makefile.in +++ b/contrib/binutils/bfd/Makefile.in @@ -144,41 +144,447 @@ BFD_H = bfd.h # 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). -BFD_LIBS = archive.lo archures.lo bfd.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 dwarf2.lo +BFD_LIBS = \ + archive.lo archures.lo bfd.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 \ + dwarf2.lo -BFD_LIBS_CFILES = archive.c archures.c bfd.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 dwarf2.c +BFD_LIBS_CFILES = \ + archive.c archures.c bfd.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 \ + dwarf2.c # This list is alphabetized to make it easier to keep in sync # with the decls and initializer in archures.c. -ALL_MACHINES = cpu-a29k.lo cpu-alpha.lo cpu-arc.lo cpu-arm.lo cpu-avr.lo cpu-cris.lo cpu-d10v.lo cpu-d30v.lo cpu-fr30.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-m32r.lo cpu-m68hc11.lo cpu-m68hc12.lo cpu-m68k.lo cpu-m88k.lo cpu-m10200.lo cpu-m10300.lo cpu-mcore.lo cpu-mips.lo cpu-ns32k.lo cpu-pj.lo cpu-powerpc.lo cpu-rs6000.lo cpu-sh.lo cpu-sparc.lo cpu-tic30.lo cpu-tic54x.lo cpu-tic80.lo cpu-v850.lo cpu-vax.lo cpu-we32k.lo cpu-w65.lo cpu-z8k.lo - - -ALL_MACHINES_CFILES = cpu-a29k.c cpu-alpha.c cpu-arc.c cpu-arm.c cpu-avr.c cpu-cris.c cpu-d10v.c cpu-d30v.c cpu-fr30.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-m32r.c cpu-m68hc11.c cpu-m68hc12.c cpu-m68k.c cpu-m88k.c cpu-m10200.c cpu-m10300.c cpu-mcore.c cpu-mips.c cpu-ns32k.c cpu-pj.c cpu-powerpc.c cpu-rs6000.c cpu-sh.c cpu-sparc.c cpu-tic30.c cpu-tic54x.c cpu-tic80.c cpu-v850.c cpu-vax.c cpu-we32k.c cpu-w65.c cpu-z8k.c +ALL_MACHINES = \ + cpu-a29k.lo \ + cpu-alpha.lo \ + cpu-arc.lo \ + cpu-arm.lo \ + cpu-avr.lo \ + cpu-cris.lo \ + cpu-d10v.lo \ + cpu-d30v.lo \ + cpu-fr30.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-m32r.lo \ + cpu-m68hc11.lo \ + cpu-m68hc12.lo \ + cpu-m68k.lo \ + cpu-m88k.lo \ + cpu-m10200.lo \ + cpu-m10300.lo \ + cpu-mcore.lo \ + cpu-mips.lo \ + cpu-ns32k.lo \ + cpu-pj.lo \ + cpu-powerpc.lo \ + cpu-rs6000.lo \ + cpu-sh.lo \ + cpu-sparc.lo \ + cpu-tic30.lo \ + cpu-tic54x.lo \ + cpu-tic80.lo \ + cpu-v850.lo \ + cpu-vax.lo \ + cpu-we32k.lo \ + cpu-w65.lo \ + cpu-z8k.lo + + +ALL_MACHINES_CFILES = \ + cpu-a29k.c \ + cpu-alpha.c \ + cpu-arc.c \ + cpu-arm.c \ + cpu-avr.c \ + cpu-cris.c \ + cpu-d10v.c \ + cpu-d30v.c \ + cpu-fr30.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-m32r.c \ + cpu-m68hc11.c \ + cpu-m68hc12.c \ + cpu-m68k.c \ + cpu-m88k.c \ + cpu-m10200.c \ + cpu-m10300.c \ + cpu-mcore.c \ + cpu-mips.c \ + cpu-ns32k.c \ + cpu-pj.c \ + cpu-powerpc.c \ + cpu-rs6000.c \ + cpu-sh.c \ + cpu-sparc.c \ + cpu-tic30.c \ + cpu-tic54x.c \ + cpu-tic80.c \ + cpu-v850.c \ + cpu-vax.c \ + cpu-we32k.c \ + cpu-w65.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-m68klynx.lo cf-sparclynx.lo coff-a29k.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-mips.lo coff-pmac.lo coff-rs6000.lo coff-sh.lo coff-sparc.lo coff-stgo32.lo coff-svm68k.lo coff-tic30.lo coff-tic54x.lo coff-tic80.lo coff-u68k.lo coff-we32k.lo coff-w65.lo coff-z8k.lo cofflink.lo dwarf1.lo ecoff.lo ecofflink.lo efi-app-ia32.lo elf.lo elf32-arc.lo elfarm-oabi.lo elfarm-nabi.lo elf32-avr.lo elf32-cris.lo elf32-d10v.lo elf32-d30v.lo elf32-fr30.lo elf32-gen.lo elf32-hppa.lo elf32-i370.lo elf32-i386.lo elf32-i860.lo elf32-i960.lo elf32-ia64.lo elf32-m32r.lo elf32-m68hc11.lo elf32-m68hc12.lo elf32-m68k.lo elf32-m88k.lo elf-m10200.lo elf-m10300.lo elf32-mcore.lo elf32-mips.lo elf32-pj.lo elf32-ppc.lo elf32-sh.lo elf32-sh-lin.lo elf32-sparc.lo elf32-v850.lo elf32.lo elflink.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 m68klynx.lo m68knetbsd.lo m88kmach3.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 pe-arm.lo pei-arm.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 versados.lo vms.lo vms-gsd.lo vms-hdr.lo vms-misc.lo vms-tir.lo xcofflink.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-m68klynx.c cf-sparclynx.c coff-a29k.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-mips.c coff-pmac.c coff-rs6000.c coff-sh.c coff-sparc.c coff-stgo32.c coff-svm68k.c coff-tic30.c coff-tic54x.c coff-tic80.c coff-u68k.c coff-we32k.c coff-w65.c coff-z8k.c cofflink.c dwarf1.c ecoff.c ecofflink.c efi-app-ia32.c elf.c elf32-arc.c elfarm-oabi.c elfarm-nabi.c elf32-avr.c elf32-cris.c elf32-d10v.c elf32-d30v.c elf32-fr30.c elf32-gen.c elf32-hppa.c elf32-i370.c elf32-i386.c elf32-i860.c elf32-i960.c elf32-m32r.c elf32-m68k.c elf32-m68hc11.c elf32-m68hc12.c elf32-m88k.c elf-m10200.c elf-m10300.c elf32-mcore.c elf32-mips.c elf32-pj.c elf32-ppc.c elf32-sh.c elf32-sh-lin.c elf32-sparc.c elf32-v850.c elf32.c elflink.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 m68klynx.c m68knetbsd.c m88kmach3.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 pe-arm.c pei-arm.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 peigen.c ppcboot.c reloc16.c riscix.c sparclinux.c sparclynx.c sparcnetbsd.c sunos.c vaxnetbsd.c versados.c vms.c vms-gsd.c vms-hdr.c vms-misc.c vms-tir.c xcofflink.c +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-m68klynx.lo \ + cf-sparclynx.lo \ + coff-a29k.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-mips.lo \ + coff-pmac.lo \ + coff-rs6000.lo \ + coff-sh.lo \ + coff-sparc.lo \ + coff-stgo32.lo \ + coff-svm68k.lo \ + coff-tic30.lo \ + coff-tic54x.lo \ + coff-tic80.lo \ + coff-u68k.lo \ + coff-we32k.lo \ + coff-w65.lo \ + coff-z8k.lo \ + cofflink.lo \ + dwarf1.lo \ + ecoff.lo \ + ecofflink.lo \ + efi-app-ia32.lo \ + elf.lo \ + elf32-arc.lo \ + elfarm-oabi.lo \ + elfarm-nabi.lo \ + elf32-avr.lo \ + elf32-cris.lo \ + elf32-d10v.lo \ + elf32-d30v.lo \ + elf32-fr30.lo \ + elf32-gen.lo \ + elf32-hppa.lo \ + elf32-i370.lo \ + elf32-i386.lo \ + elf32-i860.lo \ + elf32-i960.lo \ + elf32-ia64.lo \ + elf32-m32r.lo \ + elf32-m68hc11.lo \ + elf32-m68hc12.lo \ + elf32-m68k.lo \ + elf32-m88k.lo \ + elf-m10200.lo \ + elf-m10300.lo \ + elf32-mcore.lo \ + elf32-mips.lo \ + elf32-pj.lo \ + elf32-ppc.lo \ + elf32-sh.lo \ + elf32-sh-lin.lo \ + elf32-sparc.lo \ + elf32-v850.lo \ + elf32.lo \ + elflink.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 \ + m68klynx.lo \ + m68knetbsd.lo \ + m88kmach3.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 \ + pe-arm.lo \ + pei-arm.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 \ + versados.lo \ + vms.lo \ + vms-gsd.lo \ + vms-hdr.lo \ + vms-misc.lo \ + vms-tir.lo \ + xcofflink.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-m68klynx.c \ + cf-sparclynx.c \ + coff-a29k.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-mips.c \ + coff-pmac.c \ + coff-rs6000.c \ + coff-sh.c \ + coff-sparc.c \ + coff-stgo32.c \ + coff-svm68k.c \ + coff-tic30.c \ + coff-tic54x.c \ + coff-tic80.c \ + coff-u68k.c \ + coff-we32k.c \ + coff-w65.c \ + coff-z8k.c \ + cofflink.c \ + dwarf1.c \ + ecoff.c \ + ecofflink.c \ + efi-app-ia32.c \ + elf.c \ + elf32-arc.c \ + elfarm-oabi.c \ + elfarm-nabi.c \ + elf32-avr.c \ + elf32-cris.c \ + elf32-d10v.c \ + elf32-d30v.c \ + elf32-fr30.c \ + elf32-gen.c \ + elf32-hppa.c \ + elf32-i370.c \ + elf32-i386.c \ + elf32-i860.c \ + elf32-i960.c \ + elf32-m32r.c \ + elf32-m68k.c \ + elf32-m68hc11.c \ + elf32-m68hc12.c \ + elf32-m88k.c \ + elf-m10200.c \ + elf-m10300.c \ + elf32-mcore.c \ + elf32-mips.c \ + elf32-pj.c \ + elf32-ppc.c \ + elf32-sh.c \ + elf32-sh-lin.c \ + elf32-sparc.c \ + elf32-v850.c \ + elf32.c \ + elflink.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 \ + m68klynx.c \ + m68knetbsd.c \ + m88kmach3.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 \ + pe-arm.c \ + pei-arm.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 \ + versados.c \ + vms.c \ + vms-gsd.c \ + vms-hdr.c \ + vms-misc.c \ + vms-tir.c \ + xcofflink.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. -BFD64_BACKENDS = aout64.lo coff-alpha.lo coff64-rs6000.lo demo64.lo efi-app-ia64.lo elf64-x86-64.lo elf64-alpha.lo elf64-hppa.lo elf64-ia64.lo elf64-gen.lo elf64-mips.lo elf64-sparc.lo elf64.lo nlm32-alpha.lo nlm64.lo - - -BFD64_BACKENDS_CFILES = aout64.c coff-alpha.c coff64-rs6000.c demo64.c efi-app-ia64.c elf64-x86-64.c elf64-alpha.c elf64-hppa.c elf64-ia64.c elf64-gen.c elf64-mips.c elf64-sparc.c elf64.c nlm32-alpha.c nlm64.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 +BFD64_BACKENDS = \ + aout64.lo \ + coff-alpha.lo \ + coff64-rs6000.lo \ + demo64.lo \ + efi-app-ia64.lo \ + elf64-x86-64.lo \ + elf64-alpha.lo \ + elf64-hppa.lo \ + elf64-ia64.lo \ + elf64-gen.lo \ + elf64-mips.lo \ + elf64-sparc.lo \ + elf64.lo \ + nlm32-alpha.lo \ + nlm64.lo \ + pepigen.lo + + +BFD64_BACKENDS_CFILES = \ + aout64.c \ + coff-alpha.c \ + coff64-rs6000.c \ + demo64.c \ + efi-app-ia64.c \ + elf64-x86-64.c \ + elf64-alpha.c \ + elf64-hppa.c \ + elf64-gen.c \ + elf64-mips.c \ + elf64-sparc.c \ + elf64.c \ + nlm32-alpha.c \ + nlm64.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 # These are defined by configure.in: @@ -191,16 +597,37 @@ TDEFAULTS = @tdefaults@ INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl # C source files that correspond to .o's. -CFILES = $(BFD_LIBS_CFILES) $(ALL_MACHINES_CFILES) $(BFD32_BACKENDS_CFILES) $(BFD64_BACKENDS_CFILES) $(OPTIONAL_BACKENDS_CFILES) +SOURCE_CFILES = \ + $(BFD_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 + + +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-arm.h elf32-hppa.h elf64-hppa.h \ + elfcode.h elfcore.h elflink.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 netbsd.h nlm-target.h \ + nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h -SOURCE_HFILES = aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h elfcode.h elfcore.h elflink.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 netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h +BUILD_HFILES = \ + elf32-target.h elf64-target.h targmatch.h -HFILES = elf32-target.h elf64-target.h targmatch.h $(SOURCE_HFILES) +HFILES = $(SOURCE_HFILES) $(BUILD_HFILES) -POTFILES = $(CFILES) $(SOURCE_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. @@ -224,16 +651,19 @@ libbfd_a_SOURCES = BFD_H_DEPS = $(INCDIR)/ansidecl.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 archive.c corefile.c targets.c format.c +BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \ + reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c LIBCOFF_H_FILES = libcoff-in.h coffcode.h -MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles targmatch.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 -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) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = config.h @@ -526,7 +956,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -585,6 +1015,7 @@ clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-noinstLIBRARIES \ @@ -642,9 +1073,22 @@ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean -po/POTFILES.in: @MAINT@ Makefile - for file in $(POTFILES); do echo $$file; done | sort > tmp \ - && mv tmp $(srcdir)/po/POTFILES.in +po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES) + for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp \ + && mv tmp $(srcdir)/po/SRC-POTFILES.in + +po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES) + for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp \ + && mv tmp $(srcdir)/po/BLD-POTFILES.in + +# The following target is retained for upgrade purposes. +# This target used to exist in older versions of this makefile, and was +# referenced by /po/Makefile (which is created from /po/Make-in) +# So old versions of /po/Makefile will try to regenerate themselves +# when make is next run, but that dependency cannot be completed without a build +# of po/POTFILES.in. Hence the presence of this rule. This rule will be deleted +# once it is no longer needed - probably in the fall of 2001. +po/POTFILES.in: diststuff: info @@ -667,6 +1111,7 @@ 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 @@ -709,6 +1154,16 @@ 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 $(BFD_LIBS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) $(BFD_MACHINES): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) $(BFD_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) @@ -853,6 +1308,9 @@ stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def +dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h @@ -1021,9 +1479,6 @@ cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf.h -dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h ecoff.lo: ecoff.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def libaout.h $(INCDIR)/aout/aout64.h \ @@ -1094,10 +1549,6 @@ elf32-i960.lo: elf32-i960.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/i960.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ - $(INCDIR)/elf/reloc-macros.h elf32-target.h elf32-m32r.lo: elf32-m32r.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \ @@ -1301,9 +1752,6 @@ pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ libpei.h -peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h libpei.h ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ genlink.h $(INCDIR)/coff/internal.h libcoff.h @@ -1358,6 +1806,10 @@ efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \ coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ peicode.h libpei.h +elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/x86-64.h \ + $(INCDIR)/elf/reloc-macros.h elf64-target.h elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/alpha.h \ @@ -1365,18 +1817,11 @@ elf64-alpha.lo: elf64-alpha.c $(INCDIR)/filenames.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 elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.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-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ - $(INCDIR)/elf/reloc-macros.h elf64-target.h -elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/opcode/i386.h $(INCDIR)/elf/x86-64.h \ - $(INCDIR)/elf/reloc-macros.h elf64-target.h +elf64-hppa.lo: elf64-hppa.c $(INCDIR)/alloca-conf.h \ + $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.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 elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h elf64-target.h @@ -1412,6 +1857,20 @@ sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h libaout.h \ trad-core.lo: trad-core.c $(INCDIR)/filenames.h libaout.h \ $(INCDIR)/bfdlink.h cisco-core.lo: cisco-core.c $(INCDIR)/filenames.h +elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \ + $(INCDIR)/elf/reloc-macros.h elf64-target.h +peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \ + $(INCDIR)/bfdlink.h libpei.h +pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/ia64.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. diff --git a/contrib/binutils/bfd/aclocal.m4 b/contrib/binutils/bfd/aclocal.m4 index 45cc339..9f18aaf 100644 --- a/contrib/binutils/bfd/aclocal.m4 +++ b/contrib/binutils/bfd/aclocal.m4 @@ -136,24 +136,6 @@ AC_DEFUN([CY_WITH_NLS],) AC_SUBST(INTLLIBS) ]) -#serial 1 -# This test replaces the one in autoconf. -# Currently this macro should have the same name as the autoconf macro -# because gettext's gettext.m4 (distributed in the automake package) -# still uses it. Otherwise, the use in gettext.m4 makes autoheader -# give these diagnostics: -# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX -# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX - -undefine([AC_ISC_POSIX]) - -AC_DEFUN(AC_ISC_POSIX, - [ - dnl This test replaces the obsolescent AC_ISC_POSIX kludge. - AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) - ] -) - # Do all the work for Automake. 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. diff --git a/contrib/binutils/bfd/aout-arm.c b/contrib/binutils/bfd/aout-arm.c index 182c1c6..ddb0325 100644 --- a/contrib/binutils/bfd/aout-arm.c +++ b/contrib/binutils/bfd/aout-arm.c @@ -1,5 +1,6 @@ /* BFD back-end for raw ARM a.out binaries. - Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1994, 1995, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/aout-encap.c b/contrib/binutils/bfd/aout-encap.c index 5f8a511..77d6358 100644 --- a/contrib/binutils/bfd/aout-encap.c +++ b/contrib/binutils/bfd/aout-encap.c @@ -1,5 +1,5 @@ /* BFD back-end for a.out files encapsulated with COFF headers. - Copyright (C) 1990, 1991 Free Software Foundation, Inc. + Copyright 1990, 1991, 1994, 1995, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/aout-sparcle.c b/contrib/binutils/bfd/aout-sparcle.c index 903b136..d8ad8a5 100644 --- a/contrib/binutils/bfd/aout-sparcle.c +++ b/contrib/binutils/bfd/aout-sparcle.c @@ -1,5 +1,5 @@ /* BFD backend for sparc little-endian aout binaries. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright 1996 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/aout-target.h b/contrib/binutils/bfd/aout-target.h index 1902cdf..2e74e37 100644 --- a/contrib/binutils/bfd/aout-target.h +++ b/contrib/binutils/bfd/aout-target.h @@ -1,5 +1,6 @@ /* Define a target vector and some small routines for a variant of a.out. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/aout-tic30.c b/contrib/binutils/bfd/aout-tic30.c index f0f4d3d..a3e977d 100644 --- a/contrib/binutils/bfd/aout-tic30.c +++ b/contrib/binutils/bfd/aout-tic30.c @@ -1,5 +1,5 @@ /* BFD back-end for TMS320C30 a.out binaries. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/aout0.c b/contrib/binutils/bfd/aout0.c index 5bc7ae0..1d4c66e 100644 --- a/contrib/binutils/bfd/aout0.c +++ b/contrib/binutils/bfd/aout0.c @@ -1,5 +1,6 @@ /* BFD backend for SunOS style a.out with flags set to 0 - Copyright (C) 1990, 91, 92, 93, 1994 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994, 1995 + Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/aout32.c b/contrib/binutils/bfd/aout32.c index bfc40b4..afe7fa2 100644 --- a/contrib/binutils/bfd/aout32.c +++ b/contrib/binutils/bfd/aout32.c @@ -1,5 +1,5 @@ /* BFD back-end for 32-bit a.out files. - Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/aout64.c b/contrib/binutils/bfd/aout64.c index 84036c8..0f31dab 100644 --- a/contrib/binutils/bfd/aout64.c +++ b/contrib/binutils/bfd/aout64.c @@ -1,5 +1,5 @@ /* BFD back-end for 64-bit a.out files. - Copyright 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1994 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/aoutf1.h b/contrib/binutils/bfd/aoutf1.h index 4ad49a1..a62c68d 100644 --- a/contrib/binutils/bfd/aoutf1.h +++ b/contrib/binutils/bfd/aoutf1.h @@ -1,5 +1,5 @@ /* A.out "format 1" file handling code for BFD. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/contrib/binutils/bfd/aoutx.h b/contrib/binutils/bfd/aoutx.h index 94a46b0..490ead7 100644 --- a/contrib/binutils/bfd/aoutx.h +++ b/contrib/binutils/bfd/aoutx.h @@ -1,5 +1,6 @@ /* BFD semi-generic back-end for a.out binaries. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, + 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -775,6 +776,7 @@ NAME(aout,machine_type) (arch, machine, unknown) case bfd_mach_mips4650: case bfd_mach_mips8000: case bfd_mach_mips10000: + case bfd_mach_mips12000: case bfd_mach_mips16: case bfd_mach_mips32: case bfd_mach_mips32_4k: @@ -2906,7 +2908,8 @@ NAME(aout,bfd_free_cached_info) (abfd) { asection *o; - if (bfd_get_format (abfd) != bfd_object) + if (bfd_get_format (abfd) != bfd_object + || abfd->tdata.aout_data == NULL) return true; #define BFCI_FREE(x) if (x != NULL) { free (x); x = NULL; } diff --git a/contrib/binutils/bfd/archive.c b/contrib/binutils/bfd/archive.c index 14dc770..0a6f023 100644 --- a/contrib/binutils/bfd/archive.c +++ b/contrib/binutils/bfd/archive.c @@ -1,5 +1,6 @@ /* BFD back-end for archive files (libraries). - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000 Free Software Foundation, Inc. Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault. diff --git a/contrib/binutils/bfd/archures.c b/contrib/binutils/bfd/archures.c index 84b7744..8f7f9de 100644 --- a/contrib/binutils/bfd/archures.c +++ b/contrib/binutils/bfd/archures.c @@ -1,5 +1,6 @@ /* BFD library support routines for architectures. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Hacked by John Gilmore and Steve Chamberlain of Cygnus Support. @@ -79,6 +80,10 @@ DESCRIPTION .#define bfd_mach_m68040 6 .#define bfd_mach_m68060 7 .#define bfd_mach_cpu32 8 +.#define bfd_mach_mcf5200 9 +.#define bfd_mach_mcf5206e 10 +.#define bfd_mach_mcf5307 11 +.#define bfd_mach_mcf5407 12 . bfd_arch_vax, {* DEC Vax *} . bfd_arch_i960, {* Intel 960 *} . {* The order of the following is important. @@ -130,6 +135,7 @@ DESCRIPTION .#define bfd_mach_mips6000 6000 .#define bfd_mach_mips8000 8000 .#define bfd_mach_mips10000 10000 +.#define bfd_mach_mips12000 12000 .#define bfd_mach_mips16 16 .#define bfd_mach_mips32 32 .#define bfd_mach_mips32_4k 3204113 {* 32, 04, octal 'K' *} @@ -848,6 +854,22 @@ bfd_default_scan (info, string) arch = bfd_arch_m68k; number = bfd_mach_cpu32; break; + case 5200: + arch = bfd_arch_m68k; + number = bfd_mach_mcf5200; + break; + case 5206: + arch = bfd_arch_m68k; + number = bfd_mach_mcf5206e; + break; + case 5307: + arch = bfd_arch_m68k; + number = bfd_mach_mcf5307; + break; + case 5407: + arch = bfd_arch_m68k; + number = bfd_mach_mcf5407; + break; case 32000: arch = bfd_arch_we32k; diff --git a/contrib/binutils/bfd/armnetbsd.c b/contrib/binutils/bfd/armnetbsd.c index 05d8ad0..aa6a882 100644 --- a/contrib/binutils/bfd/armnetbsd.c +++ b/contrib/binutils/bfd/armnetbsd.c @@ -1,5 +1,5 @@ /* BFD back-end for NetBSD/ARM a.out-ish binaries. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/bfd-in.h b/contrib/binutils/bfd/bfd-in.h index 683aa0f..62ce58b 100644 --- a/contrib/binutils/bfd/bfd-in.h +++ b/contrib/binutils/bfd/bfd-in.h @@ -1,5 +1,6 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Contributed by Cygnus Support. diff --git a/contrib/binutils/bfd/bfd-in2.h b/contrib/binutils/bfd/bfd-in2.h index b8e864b..08456db 100644 --- a/contrib/binutils/bfd/bfd-in2.h +++ b/contrib/binutils/bfd/bfd-in2.h @@ -1,5 +1,6 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -1114,6 +1115,10 @@ typedef struct sec /* A mark flag used by some of the linker backends. */ unsigned int linker_mark : 1; + /* Another mark flag used by some of the linker backends. Set for + output sections that have a input section. */ + unsigned int linker_has_input : 1; + /* A mark flag used by some linker backends for garbage collection. */ unsigned int gc_mark : 1; @@ -1348,6 +1353,10 @@ enum bfd_architecture #define bfd_mach_m68040 6 #define bfd_mach_m68060 7 #define bfd_mach_cpu32 8 +#define bfd_mach_mcf5200 9 +#define bfd_mach_mcf5206e 10 +#define bfd_mach_mcf5307 11 +#define bfd_mach_mcf5407 12 bfd_arch_vax, /* DEC Vax */ bfd_arch_i960, /* Intel 960 */ /* The order of the following is important. @@ -1399,6 +1408,7 @@ enum bfd_architecture #define bfd_mach_mips6000 6000 #define bfd_mach_mips8000 8000 #define bfd_mach_mips10000 10000 +#define bfd_mach_mips12000 12000 #define bfd_mach_mips16 16 #define bfd_mach_mips32 32 #define bfd_mach_mips32_4k 3204113 /* 32, 04, octal 'K' */ @@ -1897,7 +1907,9 @@ relocation types already defined. */ BFD_RELOC_SPARC_GLOB_DAT, BFD_RELOC_SPARC_JMP_SLOT, BFD_RELOC_SPARC_RELATIVE, + BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32, + BFD_RELOC_SPARC_UA64, /* I think these are specific to SPARC a.out (e.g., Sun 4). */ BFD_RELOC_SPARC_BASE13, @@ -2049,6 +2061,17 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_MIPS_GOT_PAGE, BFD_RELOC_MIPS_GOT_OFST, BFD_RELOC_MIPS_GOT_DISP, + BFD_RELOC_MIPS_SHIFT5, + BFD_RELOC_MIPS_SHIFT6, + BFD_RELOC_MIPS_INSERT_A, + BFD_RELOC_MIPS_INSERT_B, + BFD_RELOC_MIPS_DELETE, + BFD_RELOC_MIPS_HIGHEST, + BFD_RELOC_MIPS_HIGHER, + BFD_RELOC_MIPS_SCN_DISP, + BFD_RELOC_MIPS_REL16, + BFD_RELOC_MIPS_RELGOT, + BFD_RELOC_MIPS_JALR, /* i386/elf relocations */ diff --git a/contrib/binutils/bfd/bfd.c b/contrib/binutils/bfd/bfd.c index 2e172c9..3afcd3d 100644 --- a/contrib/binutils/bfd/bfd.c +++ b/contrib/binutils/bfd/bfd.c @@ -1,5 +1,6 @@ /* Generic BFD library interface and support routines. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/contrib/binutils/bfd/binary.c b/contrib/binutils/bfd/binary.c index 771e431..b80343b 100644 --- a/contrib/binutils/bfd/binary.c +++ b/contrib/binutils/bfd/binary.c @@ -1,5 +1,6 @@ /* BFD back-end for binary objects. - Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support, This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/cache.c b/contrib/binutils/bfd/cache.c index 063373c..da16409 100644 --- a/contrib/binutils/bfd/cache.c +++ b/contrib/binutils/bfd/cache.c @@ -1,5 +1,5 @@ /* BFD library -- caching of file descriptors. - Copyright 1990, 91, 92, 93, 94, 95, 1996, 2000, 2001 + Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com). diff --git a/contrib/binutils/bfd/coff-alpha.c b/contrib/binutils/bfd/coff-alpha.c index 41e4710..b3cd0c7 100644 --- a/contrib/binutils/bfd/coff-alpha.c +++ b/contrib/binutils/bfd/coff-alpha.c @@ -1,5 +1,6 @@ /* BFD back-end for ALPHA Extended-Coff files. - Copyright 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. Modified from coff-mips.c by Steve Chamberlain and Ian Lance Taylor . @@ -127,13 +128,13 @@ reloc_nil PARAMS ((bfd *, arelent *, asymbol *, PTR, static bfd_reloc_status_type reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message) - bfd *abfd; - arelent *reloc; - asymbol *sym; - PTR data; - asection *sec; - bfd *output_bfd; - char **error_message; + bfd *abfd ATTRIBUTE_UNUSED; + arelent *reloc ATTRIBUTE_UNUSED; + asymbol *sym ATTRIBUTE_UNUSED; + PTR data ATTRIBUTE_UNUSED; + asection *sec ATTRIBUTE_UNUSED; + bfd *output_bfd ATTRIBUTE_UNUSED; + char **error_message ATTRIBUTE_UNUSED; { return bfd_reloc_ok; } @@ -472,7 +473,7 @@ alpha_ecoff_object_p (abfd) static boolean alpha_ecoff_bad_format_hook (abfd, filehdr) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; PTR filehdr; { struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; @@ -707,7 +708,7 @@ alpha_adjust_reloc_in (abfd, intern, rptr) static void alpha_adjust_reloc_out (abfd, rel, intern) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; const arelent *rel; struct internal_reloc *intern; { @@ -1175,7 +1176,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order, static reloc_howto_type * alpha_bfd_reloc_type_lookup (abfd, code) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; bfd_reloc_code_real_type code; { int alpha_type; @@ -1249,7 +1250,7 @@ alpha_bfd_reloc_type_lookup (abfd, code) static bfd_vma alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h) - bfd *output_bfd; + bfd *output_bfd ATTRIBUTE_UNUSED; struct bfd_link_info *info; bfd *input_bfd; struct external_reloc *ext_rel; @@ -2012,7 +2013,7 @@ static boolean alpha_adjust_headers (abfd, fhdr, ahdr) bfd *abfd; struct internal_filehdr *fhdr; - struct internal_aouthdr *ahdr; + struct internal_aouthdr *ahdr ATTRIBUTE_UNUSED; { if ((abfd->flags & (DYNAMIC | EXEC_P)) == (DYNAMIC | EXEC_P)) fhdr->f_flags |= F_ALPHA_CALL_SHARED; diff --git a/contrib/binutils/bfd/coff-arm.c b/contrib/binutils/bfd/coff-arm.c index 7ec7b8e..8bb4e6c 100644 --- a/contrib/binutils/bfd/coff-arm.c +++ b/contrib/binutils/bfd/coff-arm.c @@ -1,5 +1,6 @@ /* BFD back-end for ARM COFF files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -853,6 +854,7 @@ coff_arm_reloc_type_lookup (abfd, code) ASTD (BFD_RELOC_THUMB_PCREL_BRANCH9, ARM_THUMB9); ASTD (BFD_RELOC_THUMB_PCREL_BRANCH12, ARM_THUMB12); ASTD (BFD_RELOC_THUMB_PCREL_BRANCH23, ARM_THUMB23); + ASTD (BFD_RELOC_THUMB_PCREL_BLX, ARM_THUMB23); #endif default: return (CONST struct reloc_howto_struct *) 0; } @@ -1242,12 +1244,18 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, { if (info->relocateable) continue; -#if 0 /* We must not ignore the symbol value. If the symbol is - within the same section, the relocation should have already - been fixed, but if it is not, we'll be handed a reloc into - the beginning of the symbol's section, so we must not cancel - out the symbol's value, otherwise we'll be adding it in - twice. */ + /* FIXME - it is not clear which targets need this next test + and which do not. It is known that it is needed for the + VXworks target (hence the #ifdef), but it is also known + that it was supressed for other (arm) targets. This ought + to be sorted out one day. */ +#ifdef VXWORKS + /* We must not ignore the symbol value. If the symbol is + within the same section, the relocation should have already + been fixed, but if it is not, we'll be handed a reloc into + the beginning of the symbol's section, so we must not cancel + out the symbol's value, otherwise we'll be adding it in + twice. */ if (sym != NULL && sym->n_scnum != 0) addend += sym->n_value; #endif @@ -1587,18 +1595,18 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, BFD_ASSERT (size == 4); - /* howto->pc_relative should be TRUE for type 14 BRANCH23 */ + /* howto->pc_relative should be TRUE for type 14 BRANCH23. */ relocation -= (input_section->output_section->vma + input_section->output_offset); - /* howto->pcrel_offset should be TRUE for type 14 BRANCH23 */ + /* howto->pcrel_offset should be TRUE for type 14 BRANCH23. */ relocation -= address; /* No need to negate the relocation with BRANCH23. */ /* howto->complain_on_overflow == complain_overflow_signed for BRANCH23. */ /* howto->rightshift == 1 */ - /* Drop unwanted bits from the value we are relocating to. */ + /* Drop unwanted bits from the value we are relocating to. */ check = relocation >> howto->rightshift; /* If this is a signed value, the rightshift just dropped @@ -1612,13 +1620,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, /* Get the value from the object file. */ if (bfd_big_endian (input_bfd)) - { - add = (((x) & 0x07ff0000) >> 4) | (((x) & 0x7ff) << 1); - } + add = (((x) & 0x07ff0000) >> 4) | (((x) & 0x7ff) << 1); else - { - add = ((((x) & 0x7ff) << 12) | (((x) & 0x07ff0000) >> 15)); - } + add = ((((x) & 0x7ff) << 12) | (((x) & 0x07ff0000) >> 15)); /* Get the value from the object file with an appropriate sign. The expression involving howto->src_mask isolates the upper @@ -1628,18 +1632,16 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, can not get the upper bit, but that does not matter since signed_add needs no adjustment to become negative in that case. */ - signed_add = add; if ((add & (((~ src_mask) >> 1) & src_mask)) != 0) signed_add -= (((~ src_mask) >> 1) & src_mask) << 1; + /* howto->bitpos == 0 */ /* Add the value from the object file, shifted so that it is a straight number. */ - /* howto->bitpos == 0 */ - signed_check += signed_add; - relocation += signed_add; + relocation += signed_add; BFD_ASSERT (howto->complain_on_overflow == complain_overflow_signed); @@ -1648,21 +1650,26 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, || signed_check < reloc_signed_min) overflow = true; - /* Put RELOCATION into the correct bits: */ - + /* For the BLX(1) instruction remove bit 0 of the adjusted offset. + Bit 0 can only be set if the upper insn is at a half-word boundary, + since the destination address, an ARM instruction, must always be + on a word boundary. The semantics of the BLX (1) instruction, + however, are that bit 0 in the offset must always be 0, and the + corresponding bit 1 in the target address will be set from bit + 1 of the source address. */ + if ((x & 0x18000000) == 0x08000000) + relocation &= ~0x2; + + /* Put the relocation into the correct bits. */ if (bfd_big_endian (input_bfd)) - { - relocation = (((relocation & 0xffe) >> 1) | ((relocation << 4) & 0x07ff0000)); - } + relocation = (((relocation & 0xffe) >> 1) | ((relocation << 4) & 0x07ff0000)); else - { - relocation = (((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff)); - } + relocation = (((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff)); - /* Add RELOCATION to the correct bits of X: */ + /* Add the relocation to the correct bits of X. */ x = ((x & ~howto->dst_mask) | relocation); - /* Put the relocated value back in the object file: */ + /* Put the relocated value back in the object file. */ bfd_put_32 (input_bfd, x, location); rstat = overflow ? bfd_reloc_overflow : bfd_reloc_ok; diff --git a/contrib/binutils/bfd/coff-aux.c b/contrib/binutils/bfd/coff-aux.c index 5bc9b8b..53822f0 100644 --- a/contrib/binutils/bfd/coff-aux.c +++ b/contrib/binutils/bfd/coff-aux.c @@ -1,5 +1,5 @@ /* BFD back-end for Apple M68K COFF A/UX 3.x files. - Copyright 1996, 1997 Free Software Foundation, Inc. + Copyright 1996, 1997, 2000 Free Software Foundation, Inc. Written by Richard Henderson . This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/coff-i386.c b/contrib/binutils/bfd/coff-i386.c index 83d67c4..7d4ab5a 100644 --- a/contrib/binutils/bfd/coff-i386.c +++ b/contrib/binutils/bfd/coff-i386.c @@ -1,5 +1,6 @@ /* BFD back-end for Intel 386 COFF files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -128,7 +129,9 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, #ifdef COFF_WITH_PE /* FIXME: How should this case be handled? */ - if (reloc_entry->howto->type == R_IMAGEBASE) + if (reloc_entry->howto->type == R_IMAGEBASE + && output_bfd != NULL + && bfd_get_flavour(output_bfd) == bfd_target_coff_flavour) diff -= pe_data (output_bfd)->pe_opthdr.ImageBase; #endif @@ -488,7 +491,9 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp) *addendp -= sym->n_value; } - if (rel->r_type == R_IMAGEBASE) + if (rel->r_type == R_IMAGEBASE + && (bfd_get_flavour(sec->output_section->owner) + == bfd_target_coff_flavour)) { *addendp -= pe_data(sec->output_section->owner)->pe_opthdr.ImageBase; } @@ -575,7 +580,7 @@ const bfd_target (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */ #ifdef COFF_WITH_PE - | SEC_LINK_ONCE | SEC_LINK_DUPLICATES + | SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY #endif | SEC_CODE | SEC_DATA), diff --git a/contrib/binutils/bfd/coff-ppc.c b/contrib/binutils/bfd/coff-ppc.c index 798399d..2bf296a 100644 --- a/contrib/binutils/bfd/coff-ppc.c +++ b/contrib/binutils/bfd/coff-ppc.c @@ -1,5 +1,6 @@ /* BFD back-end for PowerPC Microsoft Portable Executable files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Original version pieced together by Kim Knuttila (krk@cygnus.com) diff --git a/contrib/binutils/bfd/coff-sparc.c b/contrib/binutils/bfd/coff-sparc.c index 9367770..0f592de 100644 --- a/contrib/binutils/bfd/coff-sparc.c +++ b/contrib/binutils/bfd/coff-sparc.c @@ -1,5 +1,5 @@ /* BFD back-end for Sparc COFF files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/contrib/binutils/bfd/coff-tic30.c b/contrib/binutils/bfd/coff-tic30.c index 267ca97..5b8ffd4 100644 --- a/contrib/binutils/bfd/coff-tic30.c +++ b/contrib/binutils/bfd/coff-tic30.c @@ -1,5 +1,5 @@ /* BFD back-end for TMS320C30 coff binaries. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/coff-z8k.c b/contrib/binutils/bfd/coff-z8k.c index 7ad0630..817b6dc 100644 --- a/contrib/binutils/bfd/coff-z8k.c +++ b/contrib/binutils/bfd/coff-z8k.c @@ -1,5 +1,6 @@ /* BFD back-end for Zilog Z800n COFF binaries. - Copyright 1992, 93, 94, 95, 1997 Free Software Foundation, Inc. + Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001 + Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Steve Chamberlain, . diff --git a/contrib/binutils/bfd/coffcode.h b/contrib/binutils/bfd/coffcode.h index fce0491..2cdc137 100644 --- a/contrib/binutils/bfd/coffcode.h +++ b/contrib/binutils/bfd/coffcode.h @@ -1,5 +1,6 @@ /* Support for the generic parts of most COFF variants, for BFD. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -339,6 +340,9 @@ static long coff_canonicalize_reloc #ifndef coff_mkobject_hook static PTR coff_mkobject_hook PARAMS ((bfd *, PTR, PTR)); #endif +#ifdef COFF_WITH_PE +static flagword handle_COMDAT PARAMS ((bfd *, flagword, PTR, const char *, asection *)); +#endif /* void warning(); */ @@ -698,329 +702,382 @@ styp_to_sec_flags (abfd, hdr, name, section) #else /* COFF_WITH_PE */ -/* The PE version; see above for the general comments. - - Since to set the SEC_LINK_ONCE and associated flags, we have to - look at the symbol table anyway, we return the symbol table index - of the symbol being used as the COMDAT symbol. This is admittedly - ugly, but there's really nowhere else that we have access to the - required information. FIXME: Is the COMDAT symbol index used for - any purpose other than objdump? */ - static flagword -styp_to_sec_flags (abfd, hdr, name, section) - bfd *abfd ATTRIBUTE_UNUSED; +handle_COMDAT (abfd, sec_flags, hdr, name, section) + bfd * abfd; + flagword sec_flags; PTR hdr; const char *name; asection *section; { struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr; - long styp_flags = internal_s->s_flags; - flagword sec_flags = 0; - - if (styp_flags & STYP_DSECT) - abort (); /* Don't know what to do */ -#ifdef SEC_NEVER_LOAD - if (styp_flags & STYP_NOLOAD) - sec_flags |= SEC_NEVER_LOAD; -#endif - if (styp_flags & STYP_GROUP) - abort (); /* Don't know what to do */ - /* skip IMAGE_SCN_TYPE_NO_PAD */ - if (styp_flags & STYP_COPY) - abort (); /* Don't know what to do */ - if (styp_flags & IMAGE_SCN_CNT_CODE) - sec_flags |= SEC_CODE | SEC_ALLOC | SEC_LOAD; - if (styp_flags & IMAGE_SCN_CNT_INITIALIZED_DATA) - sec_flags |= SEC_DATA | SEC_ALLOC | SEC_LOAD; - if (styp_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) - sec_flags |= SEC_ALLOC; - if (styp_flags & IMAGE_SCN_LNK_OTHER) - abort (); /* Don't know what to do */ - if (styp_flags & IMAGE_SCN_LNK_INFO) - { - /* We mark these as SEC_DEBUGGING, but only if COFF_PAGE_SIZE is - defined. coff_compute_section_file_positions uses - COFF_PAGE_SIZE to ensure that the low order bits of the - section VMA and the file offset match. If we don't know - COFF_PAGE_SIZE, we can't ensure the correct correspondence, - and demand page loading of the file will fail. */ -#ifdef COFF_PAGE_SIZE - sec_flags |= SEC_DEBUGGING; -#endif - } - if (styp_flags & STYP_OVER) - abort (); /* Don't know what to do */ - if (styp_flags & IMAGE_SCN_LNK_REMOVE) - sec_flags |= SEC_EXCLUDE; - - if (styp_flags & IMAGE_SCN_MEM_SHARED) - sec_flags |= SEC_SHARED; - /* COMDAT: see below */ - if (styp_flags & IMAGE_SCN_MEM_DISCARDABLE) - sec_flags |= SEC_DEBUGGING; - if (styp_flags & IMAGE_SCN_MEM_NOT_CACHED) - abort ();/* Don't know what to do */ - if (styp_flags & IMAGE_SCN_MEM_NOT_PAGED) - abort (); /* Don't know what to do */ - - /* We infer from the distinct read/write/execute bits the settings - of some of the bfd flags; the actual values, should we need them, - are also in pei_section_data (abfd, section)->pe_flags. */ - - if (styp_flags & IMAGE_SCN_MEM_EXECUTE) - sec_flags |= SEC_CODE; /* Probably redundant */ - /* IMAGE_SCN_MEM_READ is simply ignored, assuming it always to be true. */ - if ((styp_flags & IMAGE_SCN_MEM_WRITE) == 0) - sec_flags |= SEC_READONLY; - - /* COMDAT gets very special treatment. */ - if (styp_flags & IMAGE_SCN_LNK_COMDAT) + bfd_byte *esymstart, *esym, *esymend; + int seen_state = 0; + char *target_name = NULL; + + sec_flags |= SEC_LINK_ONCE; + + /* Unfortunately, the PE format stores essential information in + the symbol table, of all places. We need to extract that + information now, so that objdump and the linker will know how + to handle the section without worrying about the symbols. We + can't call slurp_symtab, because the linker doesn't want the + swapped symbols. */ + + /* COMDAT sections are special. The first symbol is the section + symbol, which tells what kind of COMDAT section it is. The + second symbol is the "comdat symbol" - the one with the + unique name. GNU uses the section symbol for the unique + name; MS uses ".text" for every comdat section. Sigh. - DJ */ + + /* This is not mirrored in sec_to_styp_flags(), but there + doesn't seem to be a need to, either, and it would at best be + rather messy. */ + + if (! _bfd_coff_get_external_symbols (abfd)) + return sec_flags; + + esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd); + esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd); + + while (esym < esymend) { - sec_flags |= SEC_LINK_ONCE; - - /* Unfortunately, the PE format stores essential information in - the symbol table, of all places. We need to extract that - information now, so that objdump and the linker will know how - to handle the section without worrying about the symbols. We - can't call slurp_symtab, because the linker doesn't want the - swapped symbols. */ - - /* COMDAT sections are special. The first symbol is the section - symbol, which tells what kind of COMDAT section it is. The - second symbol is the "comdat symbol" - the one with the - unique name. GNU uses the section symbol for the unique - name; MS uses ".text" for every comdat section. Sigh. - DJ */ - - /* This is not mirrored in sec_to_styp_flags(), but there - doesn't seem to be a need to, either, and it would at best be - rather messy. */ - - if (_bfd_coff_get_external_symbols (abfd)) + struct internal_syment isym; + char buf[SYMNMLEN + 1]; + const char *symname; + + bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &isym); + + if (sizeof (internal_s->s_name) > SYMNMLEN) { - bfd_byte *esymstart, *esym, *esymend; - int seen_state = 0; - char *target_name = NULL; + /* This case implies that the matching + symbol name will be in the string table. */ + abort (); + } - esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd); - esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd); + if (isym.n_scnum == section->target_index) + { + /* According to the MSVC documentation, the first + TWO entries with the section # are both of + interest to us. The first one is the "section + symbol" (section name). The second is the comdat + symbol name. Here, we've found the first + qualifying entry; we distinguish it from the + second with a state flag. + + In the case of gas-generated (at least until that + is fixed) .o files, it isn't necessarily the + second one. It may be some other later symbol. + + Since gas also doesn't follow MS conventions and + emits the section similar to .text$, where + is the name we're looking for, we + distinguish the two as follows: + + If the section name is simply a section name (no + $) we presume it's MS-generated, and look at + precisely the second symbol for the comdat name. + If the section name has a $, we assume it's + gas-generated, and look for (whatever + follows the $) as the comdat symbol. */ + + /* All 3 branches use this */ + symname = _bfd_coff_internal_syment_name (abfd, &isym, buf); + + if (symname == NULL) + abort (); - while (esym < esymend) + switch (seen_state) { - struct internal_syment isym; - char buf[SYMNMLEN + 1]; - const char *symname; + case 0: + { + /* The first time we've seen the symbol. */ + union internal_auxent aux; + + seen_state = 1; + + /* If it isn't the stuff we're expecting, die; + The MS documentation is vague, but it + appears that the second entry serves BOTH + as the comdat symbol and the defining + symbol record (either C_STAT or C_EXT, + possibly with an aux entry with debug + information if it's a function.) It + appears the only way to find the second one + is to count. (On Intel, they appear to be + adjacent, but on Alpha, they have been + found separated.) + + Here, we think we've found the first one, + but there's some checking we can do to be + sure. */ + + if (! (isym.n_sclass == C_STAT + && isym.n_type == T_NULL + && isym.n_value == 0)) + abort (); - bfd_coff_swap_sym_in (abfd, (PTR) esym, (PTR) &isym); + /* FIXME LATER: MSVC generates section names + like .text for comdats. Gas generates + names like .text$foo__Fv (in the case of a + function). See comment above for more. */ - if (sizeof (internal_s->s_name) > SYMNMLEN) - { - /* This case implies that the matching symbol name - will be in the string table. */ + if (strcmp (name, symname) != 0) abort (); - } - if (isym.n_scnum == section->target_index) - { - /* According to the MSVC documentation, the first - TWO entries with the section # are both of - interest to us. The first one is the "section - symbol" (section name). The second is the comdat - symbol name. Here, we've found the first - qualifying entry; we distinguish it from the - second with a state flag. - - In the case of gas-generated (at least until that - is fixed) .o files, it isn't necessarily the - second one. It may be some other later symbol. - - Since gas also doesn't follow MS conventions and - emits the section similar to .text$, where - is the name we're looking for, we - distinguish the two as follows: - - If the section name is simply a section name (no - $) we presume it's MS-generated, and look at - precisely the second symbol for the comdat name. - If the section name has a $, we assume it's - gas-generated, and look for (whatever - follows the $) as the comdat symbol. */ - - /* All 3 branches use this */ - symname = _bfd_coff_internal_syment_name (abfd, &isym, buf); - - if (symname == NULL) - abort (); - - switch (seen_state) - { - case 0: - { - /* The first time we've seen the symbol. */ - union internal_auxent aux; - - seen_state = 1; - - /* If it isn't the stuff we're expecting, die; - The MS documentation is vague, but it - appears that the second entry serves BOTH - as the comdat symbol and the defining - symbol record (either C_STAT or C_EXT, - possibly with an aux entry with debug - information if it's a function.) It - appears the only way to find the second one - is to count. (On Intel, they appear to be - adjacent, but on Alpha, they have been - found separated.) - - Here, we think we've found the first one, - but there's some checking we can do to be - sure. */ - - if (! (isym.n_sclass == C_STAT - && isym.n_type == T_NULL - && isym.n_value == 0)) - abort (); - - /* FIXME LATER: MSVC generates section names - like .text for comdats. Gas generates - names like .text$foo__Fv (in the case of a - function). See comment above for more. */ - - if (strcmp (name, symname) != 0) - abort (); - - /* This is the section symbol. */ - - bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)), - isym.n_type, isym.n_sclass, - 0, isym.n_numaux, (PTR) &aux); - - target_name = strchr (name, '$'); - if (target_name != NULL) - { - /* Gas mode. */ - seen_state = 2; - /* Skip the `$'. */ - target_name += 1; - } - - /* FIXME: Microsoft uses NODUPLICATES and - ASSOCIATIVE, but gnu uses ANY and - SAME_SIZE. Unfortunately, gnu doesn't do - the comdat symbols right. So, until we can - fix it to do the right thing, we are - temporarily disabling comdats for the MS - types (they're used in DLLs and C++, but we - don't support *their* C++ libraries anyway - - DJ. */ - - /* Cygwin does not follow the MS style, and - uses ANY and SAME_SIZE where NODUPLICATES - and ASSOCIATIVE should be used. For - Interix, we just do the right thing up - front. */ - - switch (aux.x_scn.x_comdat) - { - case IMAGE_COMDAT_SELECT_NODUPLICATES: + /* This is the section symbol. */ + bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)), + isym.n_type, isym.n_sclass, + 0, isym.n_numaux, (PTR) &aux); + + target_name = strchr (name, '$'); + if (target_name != NULL) + { + /* Gas mode. */ + seen_state = 2; + /* Skip the `$'. */ + target_name += 1; + } + + /* FIXME: Microsoft uses NODUPLICATES and + ASSOCIATIVE, but gnu uses ANY and + SAME_SIZE. Unfortunately, gnu doesn't do + the comdat symbols right. So, until we can + fix it to do the right thing, we are + temporarily disabling comdats for the MS + types (they're used in DLLs and C++, but we + don't support *their* C++ libraries anyway + - DJ. */ + + /* Cygwin does not follow the MS style, and + uses ANY and SAME_SIZE where NODUPLICATES + and ASSOCIATIVE should be used. For + Interix, we just do the right thing up + front. */ + + switch (aux.x_scn.x_comdat) + { + case IMAGE_COMDAT_SELECT_NODUPLICATES: #ifdef STRICT_PE_FORMAT - sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY; + sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY; #else - sec_flags &= ~SEC_LINK_ONCE; + sec_flags &= ~SEC_LINK_ONCE; #endif - break; + break; - case IMAGE_COMDAT_SELECT_ANY: - sec_flags |= SEC_LINK_DUPLICATES_DISCARD; - break; + case IMAGE_COMDAT_SELECT_ANY: + sec_flags |= SEC_LINK_DUPLICATES_DISCARD; + break; - case IMAGE_COMDAT_SELECT_SAME_SIZE: - sec_flags |= SEC_LINK_DUPLICATES_SAME_SIZE; - break; + case IMAGE_COMDAT_SELECT_SAME_SIZE: + sec_flags |= SEC_LINK_DUPLICATES_SAME_SIZE; + break; - case IMAGE_COMDAT_SELECT_EXACT_MATCH: - /* Not yet fully implemented ??? */ - sec_flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS; - break; + case IMAGE_COMDAT_SELECT_EXACT_MATCH: + /* Not yet fully implemented ??? */ + sec_flags |= SEC_LINK_DUPLICATES_SAME_CONTENTS; + break; - /* debug$S gets this case; other - implications ??? */ + /* debug$S gets this case; other + implications ??? */ - /* There may be no symbol... we'll search - the whole table... Is this the right - place to play this game? Or should we do - it when reading it in. */ - case IMAGE_COMDAT_SELECT_ASSOCIATIVE: + /* There may be no symbol... we'll search + the whole table... Is this the right + place to play this game? Or should we do + it when reading it in. */ + case IMAGE_COMDAT_SELECT_ASSOCIATIVE: #ifdef STRICT_PE_FORMAT - /* FIXME: This is not currently implemented. */ - sec_flags |= SEC_LINK_DUPLICATES_DISCARD; + /* FIXME: This is not currently implemented. */ + sec_flags |= SEC_LINK_DUPLICATES_DISCARD; #else - sec_flags &= ~SEC_LINK_ONCE; + sec_flags &= ~SEC_LINK_ONCE; #endif - break; + break; - default: /* 0 means "no symbol" */ - /* debug$F gets this case; other - implications ??? */ - sec_flags |= SEC_LINK_DUPLICATES_DISCARD; - break; - } - } - break; + default: /* 0 means "no symbol" */ + /* debug$F gets this case; other + implications ??? */ + sec_flags |= SEC_LINK_DUPLICATES_DISCARD; + break; + } + } + break; - case 2: - /* Gas mode: the first matching on partial name. */ + case 2: + /* Gas mode: the first matching on partial name. */ #ifndef TARGET_UNDERSCORE #define TARGET_UNDERSCORE 0 #endif - /* Is this the name we're looking for? */ - if (strcmp (target_name, - symname + (TARGET_UNDERSCORE ? 1 : 0)) != 0) - { - /* Not the name we're looking for */ - esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); - continue; - } - /* Fall through. */ - case 1: - /* MSVC mode: the lexically second symbol (or - drop through from the above). */ - { - char *newname; - - /* This must the the second symbol with the - section #. It is the actual symbol name. - Intel puts the two adjacent, but Alpha (at - least) spreads them out. */ - - section->comdat = - bfd_alloc (abfd, sizeof (struct bfd_comdat_info)); - if (section->comdat == NULL) - abort (); - section->comdat->symbol = - (esym - esymstart) / bfd_coff_symesz (abfd); - - newname = bfd_alloc (abfd, strlen (symname) + 1); - if (newname == NULL) - abort (); - - strcpy (newname, symname); - section->comdat->name = newname; - - } - - goto breakloop; - } + /* Is this the name we're looking for? */ + if (strcmp (target_name, + symname + (TARGET_UNDERSCORE ? 1 : 0)) != 0) + { + /* Not the name we're looking for */ + esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); + continue; } + /* Fall through. */ + case 1: + /* MSVC mode: the lexically second symbol (or + drop through from the above). */ + { + char *newname; - esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); + /* This must the the second symbol with the + section #. It is the actual symbol name. + Intel puts the two adjacent, but Alpha (at + least) spreads them out. */ + + section->comdat = + bfd_alloc (abfd, sizeof (struct bfd_comdat_info)); + if (section->comdat == NULL) + abort (); + + section->comdat->symbol = + (esym - esymstart) / bfd_coff_symesz (abfd); + + newname = bfd_alloc (abfd, strlen (symname) + 1); + if (newname == NULL) + abort (); + + strcpy (newname, symname); + section->comdat->name = newname; + } + + goto breakloop; } - breakloop: - /* SunOS requires a statement after any label. */ - ; } + + esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); + } + + breakloop: + return sec_flags; +} + + +/* The PE version; see above for the general comments. + + Since to set the SEC_LINK_ONCE and associated flags, we have to + look at the symbol table anyway, we return the symbol table index + of the symbol being used as the COMDAT symbol. This is admittedly + ugly, but there's really nowhere else that we have access to the + required information. FIXME: Is the COMDAT symbol index used for + any purpose other than objdump? */ + +static flagword +styp_to_sec_flags (abfd, hdr, name, section) + bfd *abfd; + PTR hdr; + const char *name; + asection *section; +{ + struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr; + long styp_flags = internal_s->s_flags; + flagword sec_flags; + + /* Assume read only unless IMAGE_SCN_MEM_WRITE is specified. */ + sec_flags = SEC_READONLY; + + /* Process each flag bit in styp_flags in turn. */ + while (styp_flags) + { + long flag = styp_flags & - styp_flags; + char * unhandled = NULL; + + styp_flags &= ~ flag; + + /* We infer from the distinct read/write/execute bits the settings + of some of the bfd flags; the actual values, should we need them, + are also in pei_section_data (abfd, section)->pe_flags. */ + + switch (flag) + { + case STYP_DSECT: + unhandled = "STYP_DSECT"; + break; + case STYP_GROUP: + unhandled = "STYP_GROUP"; + break; + case STYP_COPY: + unhandled = "STYP_COPY"; + break; + case STYP_OVER: + unhandled = "STYP_OVER"; + break; +#ifdef SEC_NEVER_LOAD + case STYP_NOLOAD: + sec_flags |= SEC_NEVER_LOAD; + break; +#endif + case IMAGE_SCN_MEM_READ: + /* Ignored, assume it always to be true. */ + break; + case IMAGE_SCN_TYPE_NO_PAD: + /* Skip. */ + break; + case IMAGE_SCN_LNK_OTHER: + unhandled = "IMAGE_SCN_LNK_OTHER"; + break; + case IMAGE_SCN_MEM_NOT_CACHED: + unhandled = "IMAGE_SCN_MEM_NOT_CACHED"; + break; + case IMAGE_SCN_MEM_NOT_PAGED: + unhandled = "IMAGE_SCN_MEM_NOT_PAGED"; + break; + case IMAGE_SCN_MEM_EXECUTE: + sec_flags |= SEC_CODE; + break; + case IMAGE_SCN_MEM_WRITE: + sec_flags &= ~ SEC_READONLY; + break; + case IMAGE_SCN_MEM_DISCARDABLE: + sec_flags |= SEC_DEBUGGING; + break; + case IMAGE_SCN_MEM_SHARED: + sec_flags |= SEC_SHARED; + break; + case IMAGE_SCN_LNK_REMOVE: + sec_flags |= SEC_EXCLUDE; + break; + case IMAGE_SCN_CNT_CODE: + sec_flags |= SEC_CODE | SEC_ALLOC | SEC_LOAD; + break; + case IMAGE_SCN_CNT_INITIALIZED_DATA: + sec_flags |= SEC_DATA | SEC_ALLOC | SEC_LOAD; + break; + case IMAGE_SCN_CNT_UNINITIALIZED_DATA: + sec_flags |= SEC_ALLOC; + break; + case IMAGE_SCN_LNK_INFO: + /* We mark these as SEC_DEBUGGING, but only if COFF_PAGE_SIZE is + defined. coff_compute_section_file_positions uses + COFF_PAGE_SIZE to ensure that the low order bits of the + section VMA and the file offset match. If we don't know + COFF_PAGE_SIZE, we can't ensure the correct correspondence, + and demand page loading of the file will fail. */ +#ifdef COFF_PAGE_SIZE + sec_flags |= SEC_DEBUGGING; +#endif + break; + case IMAGE_SCN_LNK_COMDAT: + /* COMDAT gets very special treatment. */ + sec_flags = handle_COMDAT (abfd, sec_flags, hdr, name, section); + break; + default: + /* Silently ignore for now. */ + break; + } + + /* If the section flag was not handled, report it here. This will allow + users of the BFD library to report a problem but continue executing. + Tools which need to be aware of these problems (such as the linker) + can override the default bfd_error_handler to intercept these reports. */ + if (unhandled != NULL) + (*_bfd_error_handler) + (_("%s (%s): Section flag %s (0x%x) ignored"), + bfd_get_filename (abfd), name, unhandled, flag); } #if defined (COFF_LONG_SECTION_NAMES) && defined (COFF_SUPPORT_GNU_LINKONCE) @@ -3965,7 +4022,7 @@ coff_write_object_contents (abfd) if (buff == NULL) return false; - coff_swap_filehdr_out (abfd, (PTR) & internal_f, (PTR) buff); + bfd_coff_swap_filehdr_out (abfd, (PTR) & internal_f, (PTR) buff); amount = bfd_write ((PTR) buff, 1, bfd_coff_filhsz (abfd), abfd); free (buff); diff --git a/contrib/binutils/bfd/coffgen.c b/contrib/binutils/bfd/coffgen.c index 35e8f71..82bfdc8 100644 --- a/contrib/binutils/bfd/coffgen.c +++ b/contrib/binutils/bfd/coffgen.c @@ -1,5 +1,6 @@ /* Support for the generic parts of COFF, for BFD. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/contrib/binutils/bfd/cofflink.c b/contrib/binutils/bfd/cofflink.c index 223ccbf..96b005b 100644 --- a/contrib/binutils/bfd/cofflink.c +++ b/contrib/binutils/bfd/cofflink.c @@ -1,5 +1,6 @@ /* COFF specific linker code. - Copyright 1994, 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/coffswap.h b/contrib/binutils/bfd/coffswap.h index 2f89afb..2ff0a32 100644 --- a/contrib/binutils/bfd/coffswap.h +++ b/contrib/binutils/bfd/coffswap.h @@ -1,5 +1,5 @@ /* Generic COFF swapping routines, for BFD. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -286,6 +286,7 @@ coff_swap_filehdr_in (abfd, src, dst) { FILHDR *filehdr_src = (FILHDR *) src; struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst; + #ifdef COFF_ADJUST_FILEHDR_IN_PRE COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst); #endif diff --git a/contrib/binutils/bfd/config.bfd b/contrib/binutils/bfd/config.bfd index cd4abc3..c2eb274 100755 --- a/contrib/binutils/bfd/config.bfd +++ b/contrib/binutils/bfd/config.bfd @@ -139,6 +139,12 @@ case "${targ}" in targ_selvecs=armcoff_big_vec targ_underscore=yes ;; + arm-*-vxworks*) + targ_defvec=armcoff_little_vec + targ_selvecs=armcoff_big_vec + targ_underscore=yes + targ_cflags=-DVXWORKS + ;; arm-*-rtems*) targ_defvec=bfd_elf32_littlearm_vec targ_selvecs=bfd_elf32_bigarm_vec @@ -657,14 +663,22 @@ case "${targ}" in targ_defvec=bfd_elf32_bigmips_vec targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec" ;; - mips*el*-*-linux-gnu* | mips*el*-*-openbsd*) + mips*el*-*-openbsd*) targ_defvec=bfd_elf32_littlemips_vec targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec" ;; - mips*-*-linux-gnu* | mips*-*-openbsd*) + mips*el*-*-linux-gnu*) + targ_defvec=bfd_elf32_tradlittlemips_vec + targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec" + ;; + mips*-*-openbsd*) targ_defvec=bfd_elf32_bigmips_vec targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec" ;; + mips*-*-linux-gnu*) + targ_defvec=bfd_elf32_tradbigmips_vec + targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" + ;; mn10200-*-*) targ_defvec=bfd_elf32_mn10200_vec diff --git a/contrib/binutils/bfd/config.in b/contrib/binutils/bfd/config.in index 74af3d3..9440d71 100644 --- a/contrib/binutils/bfd/config.in +++ b/contrib/binutils/bfd/config.in @@ -25,6 +25,9 @@ /* Define to `long' if doesn't define. */ #undef off_t +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + /* Define to `unsigned' if doesn't define. */ #undef size_t diff --git a/contrib/binutils/bfd/configure b/contrib/binutils/bfd/configure index d348425..75270e2 100755 --- a/contrib/binutils/bfd/configure +++ b/contrib/binutils/bfd/configure @@ -732,49 +732,249 @@ test "$host_alias" != "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:739: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi - echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:738: checking for strerror in -lcposix" >&5 -ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:769: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lcposix $LIBS" -cat > conftest.$ac_ext <&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:820: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 863 "configure" #include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* 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; } +main(){return(0);} EOF -if { (eval echo configure:757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +if { (eval echo configure:868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:899: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:927: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no fi rm -f conftest* -LIBS="$ac_save_LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:959: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lcposix" + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi else echo "$ac_t""no" 1>&6 + ISC= fi - - # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -788,7 +988,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:792: checking for a BSD compatible install" >&5 +echo "configure:992: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -841,7 +1041,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:845: checking whether build environment is sane" >&5 +echo "configure:1045: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -898,7 +1098,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:902: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1102: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -927,7 +1127,7 @@ fi PACKAGE=bfd -VERSION=2.11 +VERSION=2.11.2 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -944,7 +1144,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:948: checking for working aclocal" >&5 +echo "configure:1148: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -957,7 +1157,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:961: checking for working autoconf" >&5 +echo "configure:1161: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -970,7 +1170,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:974: checking for working automake" >&5 +echo "configure:1174: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -983,7 +1183,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:987: checking for working autoheader" >&5 +echo "configure:1187: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -996,7 +1196,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1000: checking for working makeinfo" >&5 +echo "configure:1200: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1019,7 +1219,7 @@ fi # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1023: checking for $ac_word" >&5 +echo "configure:1223: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1051,7 +1251,7 @@ fi # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1055: checking for $ac_word" >&5 +echo "configure:1255: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1083,7 +1283,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1087: checking for $ac_word" >&5 +echo "configure:1287: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1186,228 +1386,6 @@ else enable_fast_install=yes fi -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1193: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1223: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1274: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1306: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 1317 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1348: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1353: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1381: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" @@ -1420,7 +1398,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1424: checking for ld used by GCC" >&5 +echo "configure:1402: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1450,10 +1428,10 @@ echo "configure:1424: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1454: checking for GNU ld" >&5 +echo "configure:1432: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1457: checking for non-GNU ld" >&5 +echo "configure:1435: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1488,7 +1466,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1492: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1470: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1505,7 +1483,7 @@ with_gnu_ld=$ac_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1509: checking for $LD option to reload object files" >&5 +echo "configure:1487: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1517,7 +1495,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1521: checking for BSD-compatible nm" >&5 +echo "configure:1499: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1555,7 +1533,7 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1559: checking whether ln -s works" >&5 +echo "configure:1537: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1576,7 +1554,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1580: checking how to recognise dependant libraries" >&5 +echo "configure:1558: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1719,13 +1697,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1723: checking for object suffix" >&5 +echo "configure:1701: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1745,7 +1723,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1749: checking for executable suffix" >&5 +echo "configure:1727: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1755,7 +1733,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -1782,7 +1760,7 @@ case "$deplibs_check_method" in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1786: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1764: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1844,7 +1822,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1848: checking for file" >&5 +echo "configure:1826: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1915,7 +1893,7 @@ esac # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1919: checking for $ac_word" >&5 +echo "configure:1897: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1947,7 +1925,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1951: checking for $ac_word" >&5 +echo "configure:1929: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1982,7 +1960,7 @@ fi # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1986: checking for $ac_word" >&5 +echo "configure:1964: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2014,7 +1992,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2018: checking for $ac_word" >&5 +echo "configure:1996: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2081,8 +2059,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2085 "configure"' > conftest.$ac_ext - if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2063 "configure"' > conftest.$ac_ext + if { (eval echo configure:2064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -2103,7 +2081,7 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2107: checking whether the C compiler needs -belf" >&5 +echo "configure:2085: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2116,14 +2094,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2333,7 +2311,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:2337: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2315: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -2358,7 +2336,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:2362: checking for executable suffix" >&5 +echo "configure:2340: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2368,7 +2346,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -2397,7 +2375,7 @@ target64=false # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2401: checking for $ac_word" >&5 +echo "configure:2379: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2427,7 +2405,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2431: checking for $ac_word" >&5 +echo "configure:2409: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2478,7 +2456,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2482: checking for $ac_word" >&5 +echo "configure:2460: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2510,7 +2488,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2514: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2492: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2521,12 +2499,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2525 "configure" +#line 2503 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2552,12 +2530,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2556: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2534: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2561: checking whether we are using GNU C" >&5 +echo "configure:2539: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2566,7 +2544,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2585,7 +2563,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2589: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2567: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2619,7 +2597,7 @@ fi ALL_LINGUAS= echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2623: checking how to run the C preprocessor" >&5 +echo "configure:2601: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2634,13 +2612,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2651,13 +2629,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2668,13 +2646,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2701,7 +2679,7 @@ echo "$ac_t""$CPP" 1>&6 # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2705: checking for $ac_word" >&5 +echo "configure:2683: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2729,12 +2707,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2733: checking for ANSI C header files" >&5 +echo "configure:2711: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2742,7 +2720,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2759,7 +2737,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2777,7 +2755,7 @@ 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 < EOF @@ -2798,7 +2776,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2809,7 +2787,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2833,12 +2811,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2837: checking for working const" >&5 +echo "configure:2815: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2908,21 +2886,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2912: checking for inline" >&5 +echo "configure:2890: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2948,12 +2926,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2952: checking for off_t" >&5 +echo "configure:2930: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2981,12 +2959,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2985: checking for size_t" >&5 +echo "configure:2963: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3016,19 +2994,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3020: checking for working alloca.h" >&5 +echo "configure:2998: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3049,12 +3027,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3053: checking for alloca" >&5 +echo "configure:3031: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3114,12 +3092,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3118: checking whether alloca needs Cray hooks" >&5 +echo "configure:3096: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3148: checking for $ac_func" >&5 +echo "configure:3126: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3199,7 +3177,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3203: checking stack direction for C alloca" >&5 +echo "configure:3181: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3207,7 +3185,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3251,17 +3229,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3255: checking for $ac_hdr" >&5 +echo "configure:3233: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3290,12 +3268,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3294: checking for $ac_func" >&5 +echo "configure:3272: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3343,7 +3321,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3347: checking for working mmap" >&5 +echo "configure:3325: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3351,7 +3329,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3519,17 +3497,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3523: checking for $ac_hdr" >&5 +echo "configure:3501: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3559,12 +3537,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3563: checking for $ac_func" >&5 +echo "configure:3541: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3616,12 +3594,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3620: checking for $ac_func" >&5 +echo "configure:3598: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3678,19 +3656,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3682: checking for LC_MESSAGES" >&5 +echo "configure:3660: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3711,7 +3689,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3715: checking whether NLS is requested" >&5 +echo "configure:3693: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3731,7 +3709,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3735: checking whether included gettext is requested" >&5 +echo "configure:3713: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3750,17 +3728,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3754: checking for libintl.h" >&5 +echo "configure:3732: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3777,19 +3755,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3781: checking for gettext in libc" >&5 +echo "configure:3759: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3805,7 +3783,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3809: checking for bindtextdomain in -lintl" >&5 +echo "configure:3787: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3813,7 +3791,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3840,19 +3818,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3844: checking for gettext in libintl" >&5 +echo "configure:3822: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3880,7 +3858,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3884: checking for $ac_word" >&5 +echo "configure:3862: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3914,12 +3892,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3918: checking for $ac_func" >&5 +echo "configure:3896: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3969,7 +3947,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3973: checking for $ac_word" >&5 +echo "configure:3951: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4005,7 +3983,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4009: checking for $ac_word" >&5 +echo "configure:3987: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4037,7 +4015,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4077,7 +4055,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4081: checking for $ac_word" >&5 +echo "configure:4059: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4111,7 +4089,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4115: checking for $ac_word" >&5 +echo "configure:4093: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4147,7 +4125,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4151: checking for $ac_word" >&5 +echo "configure:4129: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4237,7 +4215,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4241: checking for catalogs to be installed" >&5 +echo "configure:4219: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4265,17 +4243,17 @@ echo "configure:4241: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4269: checking for linux/version.h" >&5 +echo "configure:4247: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4353,7 +4331,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:4357: checking for a BSD compatible install" >&5 +echo "configure:4335: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4436,7 +4414,7 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4440: checking for build system executable suffix" >&5 +echo "configure:4418: checking for build system executable suffix" >&5 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4464,17 +4442,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4468: checking for $ac_hdr" >&5 +echo "configure:4446: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4504,17 +4482,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4508: checking for $ac_hdr" >&5 +echo "configure:4486: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4541,12 +4519,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4545: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4523: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4555,7 +4533,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4580,12 +4558,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4584: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4562: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4593,7 +4571,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4618,7 +4596,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4622: checking for opendir in -ldir" >&5 +echo "configure:4600: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4626,7 +4604,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4659,7 +4637,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4663: checking for opendir in -lx" >&5 +echo "configure:4641: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4667,7 +4645,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4703,12 +4681,12 @@ fi for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4707: checking for $ac_func" >&5 +echo "configure:4685: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4766,12 +4744,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4770: checking whether strstr must be declared" >&5 +echo "configure:4748: checking whether strstr must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4792,7 +4770,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4813,12 +4791,12 @@ EOF fi echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:4817: checking whether malloc must be declared" >&5 +echo "configure:4795: checking whether malloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4839,7 +4817,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -4860,12 +4838,12 @@ EOF fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:4864: checking whether realloc must be declared" >&5 +echo "configure:4842: checking whether realloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4886,7 +4864,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:4890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -4907,12 +4885,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:4911: checking whether free must be declared" >&5 +echo "configure:4889: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4933,7 +4911,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4954,12 +4932,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4958: checking whether getenv must be declared" >&5 +echo "configure:4936: checking whether getenv must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4980,7 +4958,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -5152,12 +5130,12 @@ if test "${target}" = "${host}"; then ;; rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; rs6000-*-*) COREFILE=rs6000-core.lo ;; - powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; powerpc-*-aix4*) COREFILE=rs6000-core.lo ;; powerpc-*-aix*) COREFILE=rs6000-core.lo ;; powerpc-*-beos*) ;; powerpc-*-freebsd*) COREFILE='' ;; powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;; + powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; sparc-*-netbsd* | sparc-*-openbsd*) COREFILE=netbsd-core.lo ;; @@ -5199,17 +5177,17 @@ if test "${target}" = "${host}"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5203: checking for $ac_hdr" >&5 +echo "configure:5181: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5237,12 +5215,12 @@ done if test "$ac_cv_header_sys_procfs_h" = yes; then echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5241: checking for prstatus_t in sys/procfs.h" >&5 +echo "configure:5219: checking for prstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -5273,12 +5251,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5277: checking for prstatus32_t in sys/procfs.h" >&5 +echo "configure:5255: checking for prstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus32_t=yes else @@ -5309,12 +5287,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6 echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5313: checking for prstatus_t.pr_who in sys/procfs.h" >&5 +echo "configure:5291: checking for prstatus_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes else @@ -5345,12 +5323,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5349: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 +echo "configure:5327: checking for prstatus32_t.pr_who in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes else @@ -5381,12 +5359,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5385: checking for pstatus_t in sys/procfs.h" >&5 +echo "configure:5363: checking for pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -5417,12 +5395,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5421: checking for pxstatus_t in sys/procfs.h" >&5 +echo "configure:5399: checking for pxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pxstatus_t=yes else @@ -5453,12 +5431,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6 echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5457: checking for pstatus32_t in sys/procfs.h" >&5 +echo "configure:5435: checking for pstatus32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus32_t=yes else @@ -5489,12 +5467,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6 echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5493: checking for prpsinfo_t in sys/procfs.h" >&5 +echo "configure:5471: checking for prpsinfo_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -5525,12 +5503,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5529: checking for prpsinfo32_t in sys/procfs.h" >&5 +echo "configure:5507: checking for prpsinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes else @@ -5561,12 +5539,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6 echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5565: checking for psinfo_t in sys/procfs.h" >&5 +echo "configure:5543: checking for psinfo_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -5597,12 +5575,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5601: checking for psinfo32_t in sys/procfs.h" >&5 +echo "configure:5579: checking for psinfo32_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo32_t=yes else @@ -5633,12 +5611,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6 echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5637: checking for lwpstatus_t in sys/procfs.h" >&5 +echo "configure:5615: checking for lwpstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -5669,12 +5647,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5673: checking for lwpxstatus_t in sys/procfs.h" >&5 +echo "configure:5651: checking for lwpxstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes else @@ -5705,12 +5683,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5709: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 +echo "configure:5687: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes else @@ -5741,12 +5719,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5745: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 +echo "configure:5723: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes else @@ -5777,12 +5755,12 @@ EOF echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6 -echo "configure:5781: checking for win32_pstatus_t in sys/procfs.h" >&5 +echo "configure:5759: checking for win32_pstatus_t in sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else @@ -5934,7 +5912,7 @@ do 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_app_ia64_vec) tb="$tb efi-app-ia64.lo peigen.lo cofflink.lo" + bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo" target64=true ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf" target64=true ;; @@ -6002,6 +5980,10 @@ do target64=true ;; bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf" target64=true ;; + bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" + target64=true ;; + bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" + target64=true ;; cisco_core_big_vec) tb="$tb cisco-core.lo" ;; cisco_core_little_vec) tb="$tb cisco-core.lo" ;; cris_aout_vec) tb="$tb aout-cris.lo" ;; @@ -6185,17 +6167,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6189: checking for $ac_hdr" >&5 +echo "configure:6171: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6224,12 +6206,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6228: checking for $ac_func" >&5 +echo "configure:6210: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6277,7 +6259,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6281: checking for working mmap" >&5 +echo "configure:6263: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6285,7 +6267,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -6450,12 +6432,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6454: checking for $ac_func" >&5 +echo "configure:6436: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6658,6 +6640,7 @@ s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g +s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g @@ -6671,7 +6654,6 @@ s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g s%@AR@%$AR%g s%@RANLIB@%$RANLIB%g -s%@CC@%$CC%g s%@LN_S@%$LN_S%g s%@OBJEXT@%$OBJEXT%g s%@EXEEXT@%$EXEEXT%g @@ -6934,10 +6916,11 @@ cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h -sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile +sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/contrib/binutils/bfd/configure.in b/contrib/binutils/bfd/configure.in index eeb3eb7..b639e3b 100644 --- a/contrib/binutils/bfd/configure.in +++ b/contrib/binutils/bfd/configure.in @@ -7,7 +7,7 @@ AC_INIT(libbfd.c) AC_CANONICAL_SYSTEM AC_ISC_POSIX -AM_INIT_AUTOMAKE(bfd, 2.11) +AM_INIT_AUTOMAKE(bfd, 2.11.2) dnl These must be called before AM_PROG_LIBTOOL, because it may want dnl to call AC_CHECK_PROG. @@ -304,12 +304,12 @@ changequote([,])dnl ;; rs6000-*-aix4*) COREFILE=rs6000-core.lo ;; rs6000-*-*) COREFILE=rs6000-core.lo ;; - powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; powerpc-*-aix4*) COREFILE=rs6000-core.lo ;; powerpc-*-aix*) COREFILE=rs6000-core.lo ;; powerpc-*-beos*) ;; powerpc-*-freebsd*) COREFILE='' ;; powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;; + powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;; sparc-*-netbsd* | sparc-*-openbsd*) COREFILE=netbsd-core.lo ;; @@ -485,7 +485,7 @@ do 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_app_ia64_vec) tb="$tb efi-app-ia64.lo peigen.lo cofflink.lo" + bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo" target64=true ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf" target64=true ;; @@ -553,6 +553,10 @@ do target64=true ;; bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf" target64=true ;; + bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" + target64=true ;; + bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo" + target64=true ;; cisco_core_big_vec) tb="$tb cisco-core.lo" ;; cisco_core_little_vec) tb="$tb cisco-core.lo" ;; cris_aout_vec) tb="$tb aout-cris.lo" ;; @@ -741,4 +745,5 @@ esac rm -f doc/config.status AC_OUTPUT(Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in, -[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]) +[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile]) + diff --git a/contrib/binutils/bfd/corefile.c b/contrib/binutils/bfd/corefile.c index 061383f..3ce0785 100644 --- a/contrib/binutils/bfd/corefile.c +++ b/contrib/binutils/bfd/corefile.c @@ -1,5 +1,6 @@ /* Core file generic interface routines for BFD. - Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994, 2000 + Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/cpu-alpha.c b/contrib/binutils/bfd/cpu-alpha.c index 48a16e3..93fc69c 100644 --- a/contrib/binutils/bfd/cpu-alpha.c +++ b/contrib/binutils/bfd/cpu-alpha.c @@ -1,5 +1,5 @@ /* BFD support for the Alpha architecture. - Copyright 1992 Free Software Foundation, Inc. + Copyright 1992, 1993, 1998, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/cpu-arm.c b/contrib/binutils/bfd/cpu-arm.c index 91507f8..8cd64e9 100644 --- a/contrib/binutils/bfd/cpu-arm.c +++ b/contrib/binutils/bfd/cpu-arm.c @@ -1,5 +1,5 @@ /* BFD support for the ARM processor - Copyright 1994, 95, 97, 1999 Free Software Foundation, Inc. + Copyright 1994, 1997, 1999, 2000 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/cpu-i386.c b/contrib/binutils/bfd/cpu-i386.c index c3e9baf..860d91a 100644 --- a/contrib/binutils/bfd/cpu-i386.c +++ b/contrib/binutils/bfd/cpu-i386.c @@ -1,5 +1,6 @@ /* BFD support for the Intel 386 architecture. - Copyright 1992, 94, 95, 1996 Free Software Foundation, Inc. + Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/cpu-powerpc.c b/contrib/binutils/bfd/cpu-powerpc.c index 2e41899..235ec29 100644 --- a/contrib/binutils/bfd/cpu-powerpc.c +++ b/contrib/binutils/bfd/cpu-powerpc.c @@ -1,5 +1,5 @@ /* BFD PowerPC CPU definition - Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright 1994, 1995, 1996, 2000 Free Software Foundation, Inc. Contributed by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/cpu-sparc.c b/contrib/binutils/bfd/cpu-sparc.c index 5c777d2..dbc83ba 100644 --- a/contrib/binutils/bfd/cpu-sparc.c +++ b/contrib/binutils/bfd/cpu-sparc.c @@ -1,5 +1,5 @@ /* BFD support for the SPARC architecture. - Copyright (C) 1992, 94, 95, 96, 97, 2000 Free Software Foundation, Inc. + Copyright 1992, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/cpu-v850.c b/contrib/binutils/bfd/cpu-v850.c index 55606f8..5eb5b74 100644 --- a/contrib/binutils/bfd/cpu-v850.c +++ b/contrib/binutils/bfd/cpu-v850.c @@ -1,5 +1,5 @@ /* BFD support for the NEC V850 processor - Copyright 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/cpu-z8k.c b/contrib/binutils/bfd/cpu-z8k.c index 29682c1..643932a 100644 --- a/contrib/binutils/bfd/cpu-z8k.c +++ b/contrib/binutils/bfd/cpu-z8k.c @@ -1,5 +1,5 @@ /* BFD library support routines for the Z800n architecture. - Copyright (C) 1992 Free Software Foundation, Inc. + Copyright 1992, 1993, 1994, 2000 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/contrib/binutils/bfd/demo64.c b/contrib/binutils/bfd/demo64.c index c91381d..b64499b 100644 --- a/contrib/binutils/bfd/demo64.c +++ b/contrib/binutils/bfd/demo64.c @@ -1,5 +1,5 @@ /* BFD backend for demonstration 64-bit a.out binaries. - Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/doc/ChangeLog b/contrib/binutils/bfd/doc/ChangeLog index 57326a9..363ea91 100644 --- a/contrib/binutils/bfd/doc/ChangeLog +++ b/contrib/binutils/bfd/doc/ChangeLog @@ -1,3 +1,8 @@ +2001-06-11 Alan Modra + + * bfdint.texi (BFD target vector miscellaneous): --oformat, not + -oformat. + 2001-01-25 Kazu Hirata * chew.c: Do not output trailing whitespaces in type and diff --git a/contrib/binutils/bfd/doc/Makefile.in b/contrib/binutils/bfd/doc/Makefile.in index dfc33e1..d4c30a6 100644 --- a/contrib/binutils/bfd/doc/Makefile.in +++ b/contrib/binutils/bfd/doc/Makefile.in @@ -194,7 +194,7 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/contrib/binutils/bfd/doc/archures.texi b/contrib/binutils/bfd/doc/archures.texi index b363780..5924e7b 100644 --- a/contrib/binutils/bfd/doc/archures.texi +++ b/contrib/binutils/bfd/doc/archures.texi @@ -46,6 +46,10 @@ enum bfd_architecture #define bfd_mach_m68040 6 #define bfd_mach_m68060 7 #define bfd_mach_cpu32 8 +#define bfd_mach_mcf5200 9 +#define bfd_mach_mcf5206e 10 +#define bfd_mach_mcf5307 11 +#define bfd_mach_mcf5407 12 bfd_arch_vax, /* DEC Vax */ bfd_arch_i960, /* Intel 960 */ /* The order of the following is important. @@ -97,6 +101,7 @@ enum bfd_architecture #define bfd_mach_mips6000 6000 #define bfd_mach_mips8000 8000 #define bfd_mach_mips10000 10000 +#define bfd_mach_mips12000 12000 #define bfd_mach_mips16 16 #define bfd_mach_mips32 32 #define bfd_mach_mips32_4k 3204113 /* 32, 04, octal 'K' */ diff --git a/contrib/binutils/bfd/doc/bfd.texinfo b/contrib/binutils/bfd/doc/bfd.texinfo index 9803371..bcc9c38 100644 --- a/contrib/binutils/bfd/doc/bfd.texinfo +++ b/contrib/binutils/bfd/doc/bfd.texinfo @@ -1,6 +1,8 @@ \input texinfo.tex @setfilename bfd.info -@c $Id: bfd.texinfo,v 1.2 2000/11/15 18:24:49 nickc Exp $ +@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000 +@c Free Software Foundation, Inc. +@c @tex % NOTE LOCAL KLUGE TO AVOID TOO MUCH WHITESPACE \global\long\def\example{% @@ -62,7 +64,7 @@ notice identical to this one except for the removal of this paragraph @tex \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$ -\xdef\manvers{\$Revision: 1.2 $} % For use in headers, footers too +\xdef\manvers{\$Revision: 1.2.2.1 $} % For use in headers, footers too {\parskip=0pt \hfill Cygnus Support\par \hfill sac\@cygnus.com\par diff --git a/contrib/binutils/bfd/doc/bfdint.texi b/contrib/binutils/bfd/doc/bfdint.texi index b0a0182..5aa8ed3 100644 --- a/contrib/binutils/bfd/doc/bfdint.texi +++ b/contrib/binutils/bfd/doc/bfdint.texi @@ -1,4 +1,7 @@ \input texinfo +@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, +@c 2000 +@c Free Software Foundation, Inc. @setfilename bfdint.info @settitle BFD Internals @@ -293,7 +296,7 @@ The target vector starts with a set of constants. @item name The name of the target vector. This is an arbitrary string. This is how the target vector is named in command line options for tools which -use BFD, such as the @samp{-oformat} linker option. +use BFD, such as the @samp{--oformat} linker option. @item flavour A general description of the type of target. The following flavours are diff --git a/contrib/binutils/bfd/doc/chew.c b/contrib/binutils/bfd/doc/chew.c index 7b98ccf..843e441 100644 --- a/contrib/binutils/bfd/doc/chew.c +++ b/contrib/binutils/bfd/doc/chew.c @@ -1,5 +1,5 @@ /* chew - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1998, 2000, 2001 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc. Contributed by steve chamberlain @cygnus diff --git a/contrib/binutils/bfd/doc/reloc.texi b/contrib/binutils/bfd/doc/reloc.texi index eb31eca..52fa2bd 100644 --- a/contrib/binutils/bfd/doc/reloc.texi +++ b/contrib/binutils/bfd/doc/reloc.texi @@ -599,7 +599,9 @@ Reloc types used for i960/b.out. @deffnx {} BFD_RELOC_SPARC_GLOB_DAT @deffnx {} BFD_RELOC_SPARC_JMP_SLOT @deffnx {} BFD_RELOC_SPARC_RELATIVE +@deffnx {} BFD_RELOC_SPARC_UA16 @deffnx {} BFD_RELOC_SPARC_UA32 +@deffnx {} BFD_RELOC_SPARC_UA64 SPARC ELF relocations. There is probably some overlap with other relocation types already defined. @end deffn @@ -752,6 +754,17 @@ Relocation against a MIPS literal section. @deffnx {} BFD_RELOC_MIPS_GOT_PAGE @deffnx {} BFD_RELOC_MIPS_GOT_OFST @deffnx {} BFD_RELOC_MIPS_GOT_DISP +@deffnx {} BFD_RELOC_MIPS_SHIFT5 +@deffnx {} BFD_RELOC_MIPS_SHIFT6 +@deffnx {} BFD_RELOC_MIPS_INSERT_A +@deffnx {} BFD_RELOC_MIPS_INSERT_B +@deffnx {} BFD_RELOC_MIPS_DELETE +@deffnx {} BFD_RELOC_MIPS_HIGHEST +@deffnx {} BFD_RELOC_MIPS_HIGHER +@deffnx {} BFD_RELOC_MIPS_SCN_DISP +@deffnx {} BFD_RELOC_MIPS_REL16 +@deffnx {} BFD_RELOC_MIPS_RELGOT +@deffnx {} BFD_RELOC_MIPS_JALR MIPS ELF relocations. @end deffn @deffn {} BFD_RELOC_386_GOT32 diff --git a/contrib/binutils/bfd/doc/section.texi b/contrib/binutils/bfd/doc/section.texi index 4b0ec017..0167def 100644 --- a/contrib/binutils/bfd/doc/section.texi +++ b/contrib/binutils/bfd/doc/section.texi @@ -321,6 +321,10 @@ typedef struct sec /* A mark flag used by some of the linker backends. */ unsigned int linker_mark : 1; + /* Another mark flag used by some of the linker backends. Set for + output sections that have a input section. */ + unsigned int linker_has_input : 1; + /* A mark flag used by some linker backends for garbage collection. */ unsigned int gc_mark : 1; diff --git a/contrib/binutils/bfd/dwarf1.c b/contrib/binutils/bfd/dwarf1.c index b96adc5..2fef2ef 100644 --- a/contrib/binutils/bfd/dwarf1.c +++ b/contrib/binutils/bfd/dwarf1.c @@ -458,7 +458,7 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, struct dwarf1_unit* eachUnit; /* What address are we looking for? */ - bfd_vma addr = offset + section->vma; + unsigned long addr = (unsigned long)(offset + section->vma); *filename_ptr = NULL; *functionname_ptr = NULL; diff --git a/contrib/binutils/bfd/dwarf2.c b/contrib/binutils/bfd/dwarf2.c index 141c686..4a03273 100644 --- a/contrib/binutils/bfd/dwarf2.c +++ b/contrib/binutils/bfd/dwarf2.c @@ -1,5 +1,6 @@ /* DWARF 2 support. - Copyright 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions (gavin@cygnus.com). @@ -436,9 +437,9 @@ read_abbrevs (abfd, offset, stash) return 0; } - if (offset > stash->dwarf_abbrev_size) + if (offset >= stash->dwarf_abbrev_size) { - (*_bfd_error_handler) (_("Dwarf Error: Abbrev offset (%u) bigger than abbrev size (%u)."), + (*_bfd_error_handler) (_("Dwarf Error: Abbrev offset (%u) greater than or equal to abbrev size (%u)."), offset, stash->dwarf_abbrev_size ); bfd_set_error (bfd_error_bad_value); return 0; @@ -803,7 +804,7 @@ decode_line_info (unit, stash) below. */ if (unit->line_offset >= stash->dwarf_line_size) { - (*_bfd_error_handler) (_("Dwarf Error: Line offset (%u) bigger than line size (%u)."), + (*_bfd_error_handler) (_("Dwarf Error: Line offset (%u) greater than or equal to line size (%u)."), unit->line_offset, stash->dwarf_line_size); bfd_set_error (bfd_error_bad_value); return 0; diff --git a/contrib/binutils/bfd/ecoff.c b/contrib/binutils/bfd/ecoff.c index f22112b..db60638 100644 --- a/contrib/binutils/bfd/ecoff.c +++ b/contrib/binutils/bfd/ecoff.c @@ -1,5 +1,5 @@ /* Generic ECOFF (Extended-COFF) routines. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Original version by Per Bothner. Full support added by Ian Lance Taylor, ian@cygnus.com. @@ -74,20 +74,28 @@ static unsigned int ecoff_armap_hash PARAMS ((CONST char *s, static asection bfd_debug_section = { - /* name, index, next, flags, set_vma, reloc_done, linker_mark, gc_mark */ - "*DEBUG*", 0, 0, 0, 0, 0, 0, 0, - /* vma, lma, _cooked_size, _raw_size, output_offset, output_section, */ - 0, 0, 0, 0, 0, NULL, - /* alig, reloc..., orel..., reloc_count, filepos, rel_..., line_... */ - 0, 0, 0, 0, 0, 0, 0, - /* userdata, contents, lineno, lineno_count */ - 0, 0, 0, 0, - /* comdat_info, moving_line_filepos, target_index, used_by_bfd, */ - NULL, 0, 0, 0, - /* cons, owner, symbol */ - 0, 0, (struct symbol_cache_entry *) NULL, - /* symbol_ptr_ptr, link_order_head, ..._tail */ - (struct symbol_cache_entry **) NULL, NULL, NULL + /* name, id, index, next, flags, user_set_vma, reloc_done, */ + "*DEBUG*", 0, 0, NULL, 0, 0, 0, + /* linker_mark, linker_has_input, gc_mark, segment_mark, */ + 0, 0, 0, 0, + /* vma, lma, _cooked_size, _raw_size, */ + 0, 0, 0, 0, + /* output_offset, output_section, alignment_power, */ + 0, NULL, 0, + /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ + NULL, NULL, 0, 0, 0, + /* line_filepos, userdata, contents, lineno, lineno_count, */ + 0, NULL, NULL, NULL, 0, + /* comdat, kept_section, moving_line_filepos, */ + NULL, NULL, 0, + /* target_index, used_by_bfd, constructor_chain, owner, */ + 0, NULL, NULL, NULL, + /* symbol, */ + (struct symbol_cache_entry *) NULL, + /* symbol_ptr_ptr, */ + (struct symbol_cache_entry **) NULL, + /* link_order_head, link_order_tail */ + NULL, NULL }; /* Create an ECOFF object. */ diff --git a/contrib/binutils/bfd/ecofflink.c b/contrib/binutils/bfd/ecofflink.c index 9b2e0f5..37b3538 100644 --- a/contrib/binutils/bfd/ecofflink.c +++ b/contrib/binutils/bfd/ecofflink.c @@ -1,5 +1,6 @@ /* Routines to link ECOFF debugging information. - Copyright 1993, 94, 95, 96, 97, 99, 2000 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1997, 2000 + Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support, . This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/ecoffswap.h b/contrib/binutils/bfd/ecoffswap.h index 70d548d..dd6fa6f 100644 --- a/contrib/binutils/bfd/ecoffswap.h +++ b/contrib/binutils/bfd/ecoffswap.h @@ -1,5 +1,6 @@ /* Generic ECOFF swapping routines, for BFD. - Copyright 1992, 1993, 1994, 1995, 1996, 2000 Free Software Foundation, Inc. + Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001 + Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -195,7 +196,7 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern) intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->f_adr); intern->rss = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rss); #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) - if (intern->rss == 0xffffffff) + if (intern->rss == (signed long) 0xffffffff) intern->rss = -1; #endif intern->issBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_issBase); diff --git a/contrib/binutils/bfd/elf-bfd.h b/contrib/binutils/bfd/elf-bfd.h index 4a36629..b162290 100644 --- a/contrib/binutils/bfd/elf-bfd.h +++ b/contrib/binutils/bfd/elf-bfd.h @@ -1,6 +1,6 @@ /* BFD back-end data structures for ELF files. - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000 Free Software - Foundation, Inc. + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -27,6 +27,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "elf/external.h" #include "bfdlink.h" +/* The number of entries in a section is its size divided by the size + of a single entry. This is normally only applicaable to reloc and + symbol table sections. */ +#define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_size / (shdr)->sh_entsize) + /* If size isn't specified as 64 or 32, NAME macro should fail. */ #ifndef NAME #if ARCH_SIZE==64 diff --git a/contrib/binutils/bfd/elf.c b/contrib/binutils/bfd/elf.c index 5ae24ee..f98b49c 100644 --- a/contrib/binutils/bfd/elf.c +++ b/contrib/binutils/bfd/elf.c @@ -1,5 +1,6 @@ /* ELF executable support for BFD. - Copyright 1993, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -56,6 +57,10 @@ static INLINE int sym_is_global PARAMS ((bfd *, asymbol *)); static boolean elf_map_symbols PARAMS ((bfd *)); static bfd_size_type get_program_header_size PARAMS ((bfd *)); static boolean elfcore_read_notes PARAMS ((bfd *, bfd_vma, bfd_vma)); +static boolean elf_find_function PARAMS ((bfd *, asection *, + asymbol **, + bfd_vma, const char **, + const char **)); /* Swap version information in and out. The version information is currently size independent. If that ever changes, this code will @@ -805,8 +810,8 @@ bfd_elf_print_symbol (abfd, filep, symbol, how) break; case bfd_print_symbol_all: { - CONST char *section_name; - CONST char *name = NULL; + const char *section_name; + const char *name = NULL; struct elf_backend_data *bed; unsigned char st_other; @@ -1002,8 +1007,9 @@ _bfd_elf_link_hash_hide_symbol (info, h) struct elf_link_hash_entry *h; { h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; - h->dynindx = -1; h->plt.offset = (bfd_vma) -1; + if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0) + h->dynindx = -1; } /* Initialize an ELF linker hash table. */ @@ -1423,7 +1429,7 @@ bfd_section_from_shdr (abfd, shindex) } *hdr2 = *hdr; elf_elfsections (abfd)[shindex] = hdr2; - target_sect->reloc_count += hdr->sh_size / hdr->sh_entsize; + target_sect->reloc_count += NUM_SHDR_ENTRIES (hdr); target_sect->flags |= SEC_RELOC; target_sect->relocation = NULL; target_sect->rel_filepos = hdr->sh_offset; @@ -3390,7 +3396,7 @@ prep_headers (abfd) case bfd_arch_cris: i_ehdrp->e_machine = EM_CRIS; break; - /* also note that EM_M32, AT&T WE32100 is unknown to bfd */ + /* Also note that EM_M32, AT&T WE32100 is unknown to bfd. */ default: i_ehdrp->e_machine = EM_NONE; } @@ -4727,8 +4733,8 @@ _bfd_elf_slurp_version_tables (abfd) { _bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem); - if ((iverdefmem.vd_ndx & VERSYM_VERSION) > maxidx) - maxidx = iverdefmem.vd_ndx & VERSYM_VERSION; + if ((iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION)) > maxidx) + maxidx = iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION); everdef = ((Elf_External_Verdef *) ((bfd_byte *) everdef + iverdefmem.vd_next)); @@ -4971,53 +4977,24 @@ _bfd_elf_set_arch_mach (abfd, arch, machine) return bfd_default_set_arch_mach (abfd, arch, machine); } -/* Find the nearest line to a particular section and offset, for error - reporting. */ +/* Find the function to a particular section and offset, + for error reporting. */ -boolean -_bfd_elf_find_nearest_line (abfd, - section, - symbols, - offset, - filename_ptr, - functionname_ptr, - line_ptr) - bfd *abfd; +static boolean +elf_find_function (abfd, section, symbols, offset, + filename_ptr, functionname_ptr) + bfd *abfd ATTRIBUTE_UNUSED; asection *section; asymbol **symbols; bfd_vma offset; - CONST char **filename_ptr; - CONST char **functionname_ptr; - unsigned int *line_ptr; + const char **filename_ptr; + const char **functionname_ptr; { - boolean found; const char *filename; asymbol *func; bfd_vma low_func; asymbol **p; - if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, - filename_ptr, functionname_ptr, - line_ptr)) - return true; - - if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, - filename_ptr, functionname_ptr, - line_ptr, 0, - &elf_tdata (abfd)->dwarf2_find_line_info)) - return true; - - if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, - &found, filename_ptr, - functionname_ptr, line_ptr, - &elf_tdata (abfd)->line_info)) - return false; - if (found) - return true; - - if (symbols == NULL) - return false; - filename = NULL; func = NULL; low_func = 0; @@ -5054,8 +5031,70 @@ _bfd_elf_find_nearest_line (abfd, if (func == NULL) return false; - *filename_ptr = filename; - *functionname_ptr = bfd_asymbol_name (func); + if (filename_ptr) + *filename_ptr = filename; + if (functionname_ptr) + *functionname_ptr = bfd_asymbol_name (func); + + return true; +} + +/* Find the nearest line to a particular section and offset, + for error reporting. */ + +boolean +_bfd_elf_find_nearest_line (abfd, section, symbols, offset, + filename_ptr, functionname_ptr, line_ptr) + bfd *abfd; + asection *section; + asymbol **symbols; + bfd_vma offset; + const char **filename_ptr; + const char **functionname_ptr; + unsigned int *line_ptr; +{ + boolean found; + + if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, + filename_ptr, functionname_ptr, + line_ptr)) + { + if (!*functionname_ptr) + elf_find_function (abfd, section, symbols, offset, + *filename_ptr ? NULL : filename_ptr, + functionname_ptr); + + return true; + } + + if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, + filename_ptr, functionname_ptr, + line_ptr, 0, + &elf_tdata (abfd)->dwarf2_find_line_info)) + { + if (!*functionname_ptr) + elf_find_function (abfd, section, symbols, offset, + *filename_ptr ? NULL : filename_ptr, + functionname_ptr); + + return true; + } + + if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, + &found, filename_ptr, + functionname_ptr, line_ptr, + &elf_tdata (abfd)->line_info)) + return false; + if (found) + return true; + + if (symbols == NULL) + return false; + + if (! elf_find_function (abfd, section, symbols, offset, + filename_ptr, functionname_ptr)) + return false; + *line_ptr = 0; return true; } diff --git a/contrib/binutils/bfd/elf32-arm.h b/contrib/binutils/bfd/elf32-arm.h index 0f2ac8a..66edd6d 100644 --- a/contrib/binutils/bfd/elf32-arm.h +++ b/contrib/binutils/bfd/elf32-arm.h @@ -1,5 +1,5 @@ /* 32-bit ELF support for ARM - Copyright 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -78,22 +78,22 @@ static int elf32_thumb_to_arm_stub this. It is set up so that any shared library function that is called before the relocation has been set up calls the dynamic linker first. */ -static const bfd_byte elf32_arm_plt0_entry [PLT_ENTRY_SIZE] = +static const unsigned long elf32_arm_plt0_entry [PLT_ENTRY_SIZE / 4] = { - 0x04, 0xe0, 0x2d, 0xe5, /* str lr, [sp, #-4]! */ - 0x10, 0xe0, 0x9f, 0xe5, /* ldr lr, [pc, #16] */ - 0x0e, 0xe0, 0x8f, 0xe0, /* adr lr, pc, lr */ - 0x08, 0xf0, 0xbe, 0xe5 /* ldr pc, [lr, #8]! */ + 0xe52de004, /* str lr, [sp, #-4]! */ + 0xe59fe010, /* ldr lr, [pc, #16] */ + 0xe08fe00e, /* add lr, pc, lr */ + 0xe5bef008 /* ldr pc, [lr, #8]! */ }; /* Subsequent entries in a procedure linkage table look like this. */ -static const bfd_byte elf32_arm_plt_entry [PLT_ENTRY_SIZE] = +static const unsigned long elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] = { - 0x04, 0xc0, 0x9f, 0xe5, /* ldr ip, [pc, #4] */ - 0x0c, 0xc0, 0x8f, 0xe0, /* add ip, pc, ip */ - 0x00, 0xf0, 0x9c, 0xe5, /* ldr pc, [ip] */ - 0x00, 0x00, 0x00, 0x00 /* offset to symbol in got */ + 0xe59fc004, /* ldr ip, [pc, #4] */ + 0xe08fc00c, /* add ip, pc, ip */ + 0xe59cf000, /* ldr pc, [ip] */ + 0x00000000 /* offset to symbol in got */ }; /* The ARM linker needs to keep track of the number of relocs that it @@ -1019,6 +1019,18 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, bfd_signed_vma signed_addend; struct elf32_arm_link_hash_table * globals; + /* If the start address has been set, then set the EF_ARM_HASENTRY + flag. Setting this more than once is redundant, but the cost is + not too high, and it keeps the code simple. + + The test is done here, rather than somewhere else, because the + start address is only set just before the final link commences. + + Note - if the user deliberately sets a start address of 0, the + flag will not be set. */ + if (bfd_get_start_address (output_bfd) != 0) + elf_elfheader (output_bfd)->e_flags |= EF_ARM_HASENTRY; + globals = elf32_arm_hash_table (info); dynobj = elf_hash_table (info)->dynobj; @@ -1434,6 +1446,18 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, upper_insn = (upper_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 12) & 0x7ff); lower_insn = (lower_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 1) & 0x7ff); +#ifndef OLD_ARM_ABI + if (r_type == R_ARM_THM_XPC22 + && ((lower_insn & 0x1800) == 0x0800)) + /* Remove bit zero of the adjusted offset. Bit zero can only be + set if the upper insn is at a half-word boundary, since the + destination address, an ARM instruction, must always be on a + word boundary. The semantics of the BLX (1) instruction, however, + are that bit zero in the offset must always be zero, and the + corresponding bit one in the target address will be set from bit + one of the source address. */ + lower_insn &= ~1; +#endif /* Put the relocated value back in the object file: */ bfd_put_16 (input_bfd, upper_insn, hit_data); bfd_put_16 (input_bfd, lower_insn, hit_data + 2); @@ -3135,9 +3159,12 @@ elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym) got_offset = (plt_index + 3) * 4; /* Fill in the entry in the procedure linkage table. */ - memcpy (splt->contents + h->plt.offset, - elf32_arm_plt_entry, - PLT_ENTRY_SIZE); + bfd_put_32 (output_bfd, elf32_arm_plt_entry[0], + splt->contents + h->plt.offset + 0); + bfd_put_32 (output_bfd, elf32_arm_plt_entry[1], + splt->contents + h->plt.offset + 4); + bfd_put_32 (output_bfd, elf32_arm_plt_entry[2], + splt->contents + h->plt.offset + 8); bfd_put_32 (output_bfd, (sgot->output_section->vma + sgot->output_offset @@ -3333,7 +3360,12 @@ elf32_arm_finish_dynamic_sections (output_bfd, info) /* Fill in the first entry in the procedure linkage table. */ if (splt->_raw_size > 0) - memcpy (splt->contents, elf32_arm_plt0_entry, PLT_ENTRY_SIZE); + { + bfd_put_32 (output_bfd, elf32_arm_plt0_entry[0], splt->contents + 0); + bfd_put_32 (output_bfd, elf32_arm_plt0_entry[1], splt->contents + 4); + bfd_put_32 (output_bfd, elf32_arm_plt0_entry[2], splt->contents + 8); + bfd_put_32 (output_bfd, elf32_arm_plt0_entry[3], splt->contents + 12); + } /* UnixWare sets the entsize of .plt to 4, although that doesn't really seem like the right value. */ diff --git a/contrib/binutils/bfd/elf32-i386.c b/contrib/binutils/bfd/elf32-i386.c index 4ad2c2b..b838d3a 100644 --- a/contrib/binutils/bfd/elf32-i386.c +++ b/contrib/binutils/bfd/elf32-i386.c @@ -1,5 +1,5 @@ /* Intel 80386/80486-specific support for 32-bit ELF - Copyright 1993, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -501,6 +501,20 @@ elf_i386_check_relocs (abfd, info, sec, relocs) r_symndx = ELF32_R_SYM (rel->r_info); + if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr)) + { + if (abfd->my_archive) + (*_bfd_error_handler) (_("%s(%s): bad symbol index: %d"), + bfd_get_filename (abfd->my_archive), + bfd_get_filename (abfd), + r_symndx); + else + (*_bfd_error_handler) (_("%s: bad symbol index: %d"), + bfd_get_filename (abfd), + r_symndx); + return false; + } + if (r_symndx < symtab_hdr->sh_info) h = NULL; else @@ -686,7 +700,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs) (*_bfd_error_handler) (_("%s: bad relocation section name `%s\'"), bfd_get_filename (abfd), name); - } + } sreloc = bfd_get_section_by_name (dynobj, name); if (sreloc == NULL) @@ -818,7 +832,7 @@ elf_i386_gc_mark_hook (abfd, info, rel, h, sym) static boolean elf_i386_gc_sweep_hook (abfd, info, sec, relocs) bfd *abfd; - struct bfd_link_info *info ATTRIBUTE_UNUSED; + struct bfd_link_info *info; asection *sec; const Elf_Internal_Rela *relocs; { @@ -2066,6 +2080,44 @@ elf_i386_finish_dynamic_sections (output_bfd, info) return true; } +/* Set the correct type for an x86 ELF section. We do this by the + section name, which is a hack, but ought to work. */ + +static boolean +elf_i386_fake_sections (abfd, hdr, sec) + bfd *abfd ATTRIBUTE_UNUSED; + Elf32_Internal_Shdr *hdr; + asection *sec; +{ + register const char *name; + + name = bfd_get_section_name (abfd, sec); + + if (strcmp (name, ".reloc") == 0) + /* + * This is an ugly, but unfortunately necessary hack that is + * needed when producing EFI binaries on x86. It tells + * elf.c:elf_fake_sections() not to consider ".reloc" as a section + * containing ELF relocation info. We need this hack in order to + * be able to generate ELF binaries that can be translated into + * EFI applications (which are essentially COFF objects). Those + * files contain a COFF ".reloc" section inside an ELFNN object, + * which would normally cause BFD to segfault because it would + * attempt to interpret this section as containing relocation + * entries for section "oc". With this hack enabled, ".reloc" + * will be treated as a normal data section, which will avoid the + * segfault. However, you won't be able to create an ELFNN binary + * with a section named "oc" that needs relocations, but that's + * the kind of ugly side-effects you get when detecting section + * types based on their names... In practice, this limitation is + * unlikely to bite. + */ + hdr->sh_type = SHT_PROGBITS; + + return true; +} + + #define TARGET_LITTLE_SYM bfd_elf32_i386_vec #define TARGET_LITTLE_NAME "elf32-i386" #define ELF_ARCH bfd_arch_i386 @@ -2096,5 +2148,6 @@ elf_i386_finish_dynamic_sections (output_bfd, info) #define elf_backend_gc_sweep_hook elf_i386_gc_sweep_hook #define elf_backend_relocate_section elf_i386_relocate_section #define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections +#define elf_backend_fake_sections elf_i386_fake_sections #include "elf32-target.h" diff --git a/contrib/binutils/bfd/elf32-ppc.c b/contrib/binutils/bfd/elf32-ppc.c index d3152ce..ab803f4 100644 --- a/contrib/binutils/bfd/elf32-ppc.c +++ b/contrib/binutils/bfd/elf32-ppc.c @@ -1,5 +1,6 @@ /* PowerPC-specific support for 32-bit ELF - Copyright 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/elf32-sparc.c b/contrib/binutils/bfd/elf32-sparc.c index 4e9c6c2..091cd39 100644 --- a/contrib/binutils/bfd/elf32-sparc.c +++ b/contrib/binutils/bfd/elf32-sparc.c @@ -1,5 +1,5 @@ /* SPARC-specific support for 32-bit ELF - Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -85,7 +85,7 @@ reloc_howto_type _bfd_sparc_elf_howto_table[] = HOWTO(R_SPARC_GLOB_DAT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GLOB_DAT",false,0,0x00000000,true), HOWTO(R_SPARC_JMP_SLOT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_SLOT",false,0,0x00000000,true), HOWTO(R_SPARC_RELATIVE, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",false,0,0x00000000,true), - HOWTO(R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0x00000000,true), + HOWTO(R_SPARC_UA32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0xffffffff,true), HOWTO(R_SPARC_PLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PLT32", false,0,0x00000000,true), HOWTO(R_SPARC_HIPLT22, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_HIPLT22", false,0,0x00000000,true), HOWTO(R_SPARC_LOPLT10, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_LOPLT10", false,0,0x00000000,true), @@ -120,9 +120,9 @@ reloc_howto_type _bfd_sparc_elf_howto_table[] = HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true), HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true), HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true), - HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true), - HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true), - HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true), + HOWTO(R_SPARC_UA64, 0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA64", false,0,(~ (bfd_vma)0), true), + HOWTO(R_SPARC_UA16, 0,1,16,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", false,0,0x0000ffff,true), + HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true), }; static reloc_howto_type elf32_sparc_vtinherit_howto = HOWTO (R_SPARC_GNU_VTINHERIT, 0,2,0,false,0,complain_overflow_dont, NULL, "R_SPARC_GNU_VTINHERIT", false,0, 0, false); @@ -159,26 +159,27 @@ static CONST struct elf_reloc_map sparc_reloc_map[] = { BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT }, { BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE }, { BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 }, - /* ??? Doesn't dwarf use this? */ -/*{ BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, not used?? */ - {BFD_RELOC_SPARC_10, R_SPARC_10}, - {BFD_RELOC_SPARC_11, R_SPARC_11}, - {BFD_RELOC_SPARC_64, R_SPARC_64}, - {BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10}, - {BFD_RELOC_SPARC_HH22, R_SPARC_HH22}, - {BFD_RELOC_SPARC_HM10, R_SPARC_HM10}, - {BFD_RELOC_SPARC_LM22, R_SPARC_LM22}, - {BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22}, - {BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10}, - {BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22}, - {BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16}, - {BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19}, - {BFD_RELOC_SPARC_7, R_SPARC_7}, - {BFD_RELOC_SPARC_5, R_SPARC_5}, - {BFD_RELOC_SPARC_6, R_SPARC_6}, - {BFD_RELOC_SPARC_REV32, R_SPARC_REV32 }, - {BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT}, - {BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY}, + { BFD_RELOC_SPARC_UA16, R_SPARC_UA16 }, + { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, + { BFD_RELOC_SPARC_UA64, R_SPARC_UA64 }, + { BFD_RELOC_SPARC_10, R_SPARC_10 }, + { BFD_RELOC_SPARC_11, R_SPARC_11 }, + { BFD_RELOC_SPARC_64, R_SPARC_64 }, + { BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10 }, + { BFD_RELOC_SPARC_HH22, R_SPARC_HH22 }, + { BFD_RELOC_SPARC_HM10, R_SPARC_HM10 }, + { BFD_RELOC_SPARC_LM22, R_SPARC_LM22 }, + { BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22 }, + { BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10 }, + { BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22 }, + { BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16 }, + { BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19 }, + { BFD_RELOC_SPARC_7, R_SPARC_7 }, + { BFD_RELOC_SPARC_5, R_SPARC_5 }, + { BFD_RELOC_SPARC_6, R_SPARC_6 }, + { BFD_RELOC_SPARC_REV32, R_SPARC_REV32 }, + { BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT }, + { BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY }, }; static reloc_howto_type * @@ -551,7 +552,9 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs) case R_SPARC_22: case R_SPARC_13: case R_SPARC_LO10: + case R_SPARC_UA16: case R_SPARC_UA32: + case R_SPARC_UA64: if (h != NULL) h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF; @@ -1218,7 +1221,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section, || r_type == R_SPARC_22 || r_type == R_SPARC_13 || r_type == R_SPARC_LO10 + || r_type == R_SPARC_UA16 || r_type == R_SPARC_UA32 + || r_type == R_SPARC_UA64 || ((r_type == R_SPARC_PC10 || r_type == R_SPARC_PC22) && strcmp (h->root.root.string, @@ -1405,7 +1410,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section, case R_SPARC_22: case R_SPARC_13: case R_SPARC_LO10: + case R_SPARC_UA16: case R_SPARC_UA32: + case R_SPARC_UA64: if (info->shared) { Elf_Internal_Rela outrel; @@ -1759,6 +1766,13 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym) /* Mark the symbol as undefined, rather than as defined in the .plt section. Leave the value alone. */ sym->st_shndx = SHN_UNDEF; + /* If the symbol is weak, we do need to clear the value. + Otherwise, the PLT entry would provide a definition for + the symbol even if the symbol wasn't defined anywhere, + and so the symbol would never be NULL. */ + if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK) + == 0) + sym->st_value = 0; } } diff --git a/contrib/binutils/bfd/elf32-v850.c b/contrib/binutils/bfd/elf32-v850.c index e71866c..3df0914 100644 --- a/contrib/binutils/bfd/elf32-v850.c +++ b/contrib/binutils/bfd/elf32-v850.c @@ -1,5 +1,6 @@ /* V850-specific support for 32-bit ELF - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1325,7 +1326,6 @@ v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err) relocation -= reloc->address; } #endif - reloc->addend = relocation; return bfd_reloc_ok; } diff --git a/contrib/binutils/bfd/elf32.c b/contrib/binutils/bfd/elf32.c index 2d3bebf..bfadd5c 100644 --- a/contrib/binutils/bfd/elf32.c +++ b/contrib/binutils/bfd/elf32.c @@ -1,5 +1,5 @@ /* ELF 32-bit executable support for BFD. - Copyright 1993 Free Software Foundation, Inc. + Copyright 1993, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/elf64-alpha.c b/contrib/binutils/bfd/elf64-alpha.c index 197dcff..bd89a7b 100644 --- a/contrib/binutils/bfd/elf64-alpha.c +++ b/contrib/binutils/bfd/elf64-alpha.c @@ -1,5 +1,6 @@ /* Alpha specific support for 64-bit ELF - Copyright 1996, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. Contributed by Richard Henderson . This file is part of BFD, the Binary File Descriptor library. @@ -240,13 +241,24 @@ alpha_elf_dynamic_symbol_p (h, info) if (h->dynindx == -1) return false; - if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT) - return false; if (h->root.type == bfd_link_hash_undefweak || h->root.type == bfd_link_hash_defweak) return true; + switch (ELF_ST_VISIBILITY (h->other)) + { + case STV_DEFAULT: + break; + case STV_HIDDEN: + case STV_INTERNAL: + return false; + case STV_PROTECTED: + if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) + return false; + break; + } + if ((info->shared && !info->symbolic) || ((h->elf_link_hash_flags & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)) @@ -554,7 +566,7 @@ static reloc_howto_type elf64_alpha_howto_table[] = false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - false), /* pcrel_offset */ + true), /* pcrel_offset */ /* 32 bit PC relative offset. */ HOWTO (R_ALPHA_SREL32, /* type */ @@ -569,7 +581,7 @@ static reloc_howto_type elf64_alpha_howto_table[] = false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - false), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 64 bit PC relative offset. */ HOWTO (R_ALPHA_SREL64, /* type */ @@ -584,7 +596,7 @@ static reloc_howto_type elf64_alpha_howto_table[] = false, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - false), /* pcrel_offset */ + true), /* pcrel_offset */ /* Push a value on the reloc evaluation stack. */ /* Not implemented -- it's dumb. */ @@ -855,13 +867,13 @@ static reloc_howto_type elf64_alpha_howto_table[] = static bfd_reloc_status_type elf64_alpha_reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; arelent *reloc; - asymbol *sym; - PTR data; + asymbol *sym ATTRIBUTE_UNUSED; + PTR data ATTRIBUTE_UNUSED; asection *sec; bfd *output_bfd; - char **error_message; + char **error_message ATTRIBUTE_UNUSED; { if (output_bfd) reloc->address += sec->output_offset; @@ -872,13 +884,13 @@ elf64_alpha_reloc_nil (abfd, reloc, sym, data, sec, output_bfd, error_message) static bfd_reloc_status_type elf64_alpha_reloc_bad (abfd, reloc, sym, data, sec, output_bfd, error_message) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; arelent *reloc; - asymbol *sym; - PTR data; + asymbol *sym ATTRIBUTE_UNUSED; + PTR data ATTRIBUTE_UNUSED; asection *sec; bfd *output_bfd; - char **error_message; + char **error_message ATTRIBUTE_UNUSED; { if (output_bfd) reloc->address += sec->output_offset; @@ -935,7 +947,7 @@ elf64_alpha_reloc_gpdisp (abfd, reloc_entry, sym, data, input_section, output_bfd, err_msg) bfd *abfd; arelent *reloc_entry; - asymbol *sym; + asymbol *sym ATTRIBUTE_UNUSED; PTR data; asection *input_section; bfd *output_bfd; @@ -1016,7 +1028,7 @@ static const struct elf_reloc_map elf64_alpha_reloc_map[] = static reloc_howto_type * elf64_alpha_bfd_reloc_type_lookup (abfd, code) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; bfd_reloc_code_real_type code; { const struct elf_reloc_map *i, *e; @@ -1034,7 +1046,7 @@ elf64_alpha_bfd_reloc_type_lookup (abfd, code) static void elf64_alpha_info_to_howto (abfd, cache_ptr, dst) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; arelent *cache_ptr; Elf64_Internal_Rela *dst; { @@ -1836,8 +1848,8 @@ elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) bfd *abfd; struct bfd_link_info *info; const Elf_Internal_Sym *sym; - const char **namep; - flagword *flagsp; + const char **namep ATTRIBUTE_UNUSED; + flagword *flagsp ATTRIBUTE_UNUSED; asection **secp; bfd_vma *valp; { @@ -1872,7 +1884,7 @@ elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) static boolean elf64_alpha_create_got_section(abfd, info) bfd *abfd; - struct bfd_link_info *info; + struct bfd_link_info *info ATTRIBUTE_UNUSED; { asection *s; @@ -2075,7 +2087,7 @@ elf64_alpha_read_ecoff_info (abfd, section, debug) static boolean elf64_alpha_is_local_label_name (abfd, name) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; const char *name; { return name[0] == '$'; @@ -2727,7 +2739,7 @@ elf64_alpha_adjust_dynamic_symbol (info, h) static boolean elf64_alpha_merge_ind_symbols (hi, dummy) struct alpha_elf_link_hash_entry *hi; - PTR dummy; + PTR dummy ATTRIBUTE_UNUSED; { struct alpha_elf_link_hash_entry *hs; @@ -2819,7 +2831,7 @@ elf64_alpha_can_merge_gots (a, b) Elf_Internal_Shdr *symtab_hdr = &elf_tdata (bsub)->symtab_hdr; int i, n; - n = symtab_hdr->sh_size / symtab_hdr->sh_entsize - symtab_hdr->sh_info; + n = NUM_SHDR_ENTRIES (symtab_hdr) - symtab_hdr->sh_info; for (i = 0; i < n; ++i) { struct alpha_elf_got_entry *ae, *be; @@ -2891,7 +2903,7 @@ elf64_alpha_merge_gots (a, b) hashes = alpha_elf_sym_hashes (bsub); symtab_hdr = &elf_tdata (bsub)->symtab_hdr; - n = symtab_hdr->sh_size / symtab_hdr->sh_entsize - symtab_hdr->sh_info; + n = NUM_SHDR_ENTRIES (symtab_hdr) - symtab_hdr->sh_info; for (i = 0; i < n; ++i) { struct alpha_elf_got_entry *ae, *be, **pbe, **start; @@ -4715,8 +4727,8 @@ const struct elf_size_info alpha_elf_size_info = #define TARGET_LITTLE_SYM bfd_elf64_alpha_vec #define TARGET_LITTLE_NAME "elf64-alpha" #define ELF_ARCH bfd_arch_alpha -#define ELF_MACHINE_CODE EM_ALPHA -#define ELF_MAXPAGESIZE 0x10000 +#define ELF_MACHINE_CODE EM_ALPHA +#define ELF_MAXPAGESIZE 0x10000 #define bfd_elf64_bfd_link_hash_table_create \ elf64_alpha_bfd_link_hash_table_create diff --git a/contrib/binutils/bfd/elf64-gen.c b/contrib/binutils/bfd/elf64-gen.c index c071934..db68a07 100644 --- a/contrib/binutils/bfd/elf64-gen.c +++ b/contrib/binutils/bfd/elf64-gen.c @@ -1,5 +1,5 @@ /* Generic support for 64-bit ELF - Copyright 1993, 1995, 1998 Free Software Foundation, Inc. + Copyright 1993, 1995, 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -42,23 +42,23 @@ static reloc_howto_type dummy = static void elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; arelent *bfd_reloc; - Elf64_Internal_Rela *elf_reloc; + Elf64_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED; { bfd_reloc->howto = &dummy; } static void elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; arelent *bfd_reloc; - Elf64_Internal_Rel *elf_reloc; + Elf64_Internal_Rel *elf_reloc ATTRIBUTE_UNUSED; { bfd_reloc->howto = &dummy; } -static boolean +static boolean elf64_generic_link_add_symbols (abfd, info) bfd *abfd; struct bfd_link_info *info; diff --git a/contrib/binutils/bfd/elf64-sparc.c b/contrib/binutils/bfd/elf64-sparc.c index 0627913..bd32b6e 100644 --- a/contrib/binutils/bfd/elf64-sparc.c +++ b/contrib/binutils/bfd/elf64-sparc.c @@ -1,5 +1,5 @@ /* SPARC-specific support for 64-bit ELF - Copyright (C) 1993, 95, 96, 97, 98, 99, 2000 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -63,6 +63,8 @@ static boolean sparc64_elf_add_symbol_hook static void sparc64_elf_symbol_processing PARAMS ((bfd *, asymbol *)); +static boolean sparc64_elf_copy_private_bfd_data + PARAMS ((bfd *, bfd *)); static boolean sparc64_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *)); @@ -118,7 +120,7 @@ static reloc_howto_type sparc64_elf_howto_table[] = HOWTO(R_SPARC_GLOB_DAT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GLOB_DAT",false,0,0x00000000,true), HOWTO(R_SPARC_JMP_SLOT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_SLOT",false,0,0x00000000,true), HOWTO(R_SPARC_RELATIVE, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",false,0,0x00000000,true), - HOWTO(R_SPARC_UA32, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0x00000000,true), + HOWTO(R_SPARC_UA32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0xffffffff,true), #ifndef SPARC64_OLD_RELOCS /* These aren't implemented yet. */ HOWTO(R_SPARC_PLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PLT32", false,0,0x00000000,true), @@ -186,31 +188,32 @@ static CONST struct elf_reloc_map sparc_reloc_map[] = { BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT }, { BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE }, { BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 }, - /* ??? Doesn't dwarf use this? */ -/*{ BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, not used?? */ - {BFD_RELOC_SPARC_10, R_SPARC_10}, - {BFD_RELOC_SPARC_11, R_SPARC_11}, - {BFD_RELOC_SPARC_64, R_SPARC_64}, - {BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10}, - {BFD_RELOC_SPARC_HH22, R_SPARC_HH22}, - {BFD_RELOC_SPARC_HM10, R_SPARC_HM10}, - {BFD_RELOC_SPARC_LM22, R_SPARC_LM22}, - {BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22}, - {BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10}, - {BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22}, - {BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16}, - {BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19}, - {BFD_RELOC_SPARC_7, R_SPARC_7}, - {BFD_RELOC_SPARC_5, R_SPARC_5}, - {BFD_RELOC_SPARC_6, R_SPARC_6}, - {BFD_RELOC_SPARC_DISP64, R_SPARC_DISP64}, - {BFD_RELOC_SPARC_PLT64, R_SPARC_PLT64}, - {BFD_RELOC_SPARC_HIX22, R_SPARC_HIX22}, - {BFD_RELOC_SPARC_LOX10, R_SPARC_LOX10}, - {BFD_RELOC_SPARC_H44, R_SPARC_H44}, - {BFD_RELOC_SPARC_M44, R_SPARC_M44}, - {BFD_RELOC_SPARC_L44, R_SPARC_L44}, - {BFD_RELOC_SPARC_REGISTER, R_SPARC_REGISTER} + { BFD_RELOC_SPARC_UA16, R_SPARC_UA16 }, + { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, + { BFD_RELOC_SPARC_UA64, R_SPARC_UA64 }, + { BFD_RELOC_SPARC_10, R_SPARC_10 }, + { BFD_RELOC_SPARC_11, R_SPARC_11 }, + { BFD_RELOC_SPARC_64, R_SPARC_64 }, + { BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10 }, + { BFD_RELOC_SPARC_HH22, R_SPARC_HH22 }, + { BFD_RELOC_SPARC_HM10, R_SPARC_HM10 }, + { BFD_RELOC_SPARC_LM22, R_SPARC_LM22 }, + { BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22 }, + { BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10 }, + { BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22 }, + { BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16 }, + { BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19 }, + { BFD_RELOC_SPARC_7, R_SPARC_7 }, + { BFD_RELOC_SPARC_5, R_SPARC_5 }, + { BFD_RELOC_SPARC_6, R_SPARC_6 }, + { BFD_RELOC_SPARC_DISP64, R_SPARC_DISP64 }, + { BFD_RELOC_SPARC_PLT64, R_SPARC_PLT64 }, + { BFD_RELOC_SPARC_HIX22, R_SPARC_HIX22 }, + { BFD_RELOC_SPARC_LOX10, R_SPARC_LOX10 }, + { BFD_RELOC_SPARC_H44, R_SPARC_H44 }, + { BFD_RELOC_SPARC_M44, R_SPARC_M44 }, + { BFD_RELOC_SPARC_L44, R_SPARC_L44 }, + { BFD_RELOC_SPARC_REGISTER, R_SPARC_REGISTER } }; static reloc_howto_type * @@ -394,7 +397,7 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic) return true; rel_hdr = &d->this_hdr; - asect->reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize; + asect->reloc_count = NUM_SHDR_ENTRIES (rel_hdr); rel_hdr2 = NULL; } @@ -994,7 +997,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs) srelgot = NULL; sreloc = NULL; - rel_end = relocs + sec->reloc_count; + rel_end = relocs + NUM_SHDR_ENTRIES (& elf_section_data (sec)->rel_hdr); for (rel = relocs; rel < rel_end; rel++) { unsigned long r_symndx; @@ -1900,7 +1903,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, sgot = splt = sreloc = NULL; rel = relocs; - relend = relocs + input_section->reloc_count; + relend = relocs + NUM_SHDR_ENTRIES (& elf_section_data (input_section)->rel_hdr); for (; rel < relend; rel++) { int r_type; @@ -2705,6 +2708,13 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym) /* Mark the symbol as undefined, rather than as defined in the .plt section. Leave the value alone. */ sym->st_shndx = SHN_UNDEF; + /* If the symbol is weak, we do need to clear the value. + Otherwise, the PLT entry would provide a definition for + the symbol even if the symbol wasn't defined anywhere, + and so the symbol would never be NULL. */ + if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK) + == 0) + sym->st_value = 0; } } @@ -2893,6 +2903,24 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info) /* Functions for dealing with the e_flags field. */ +/* Copy backend specific data from one object module to another */ +static boolean +sparc64_elf_copy_private_bfd_data (ibfd, obfd) + bfd *ibfd, *obfd; +{ + if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour + || bfd_get_flavour (obfd) != bfd_target_elf_flavour) + return true; + + BFD_ASSERT (!elf_flags_init (obfd) + || (elf_elfheader (obfd)->e_flags + == elf_elfheader (ibfd)->e_flags)); + + elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags; + elf_flags_init (obfd) = true; + return true; +} + /* Merge backend specific data from an object file to the output object file when linking. */ @@ -3114,7 +3142,8 @@ const struct elf_size_info sparc64_elf_size_info = sparc64_elf_print_symbol_all #define elf_backend_output_arch_syms \ sparc64_elf_output_arch_syms - +#define bfd_elf64_bfd_copy_private_bfd_data \ + sparc64_elf_copy_private_bfd_data #define bfd_elf64_bfd_merge_private_bfd_data \ sparc64_elf_merge_private_bfd_data diff --git a/contrib/binutils/bfd/elfarm-nabi.c b/contrib/binutils/bfd/elfarm-nabi.c index 55e1f03..ee91e36 100644 --- a/contrib/binutils/bfd/elfarm-nabi.c +++ b/contrib/binutils/bfd/elfarm-nabi.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for ARM new abi option. - Copyright 1999 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/elfarm-oabi.c b/contrib/binutils/bfd/elfarm-oabi.c index e49ea9c..b4f93f0 100644 --- a/contrib/binutils/bfd/elfarm-oabi.c +++ b/contrib/binutils/bfd/elfarm-oabi.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for ARM old abi option. - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/elfcode.h b/contrib/binutils/bfd/elfcode.h index 1a5f63a..b02a399 100644 --- a/contrib/binutils/bfd/elfcode.h +++ b/contrib/binutils/bfd/elfcode.h @@ -1,6 +1,6 @@ /* ELF executable support for BFD. - Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 1999, 2000 Free - Software Foundation, Inc. + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. Written by Fred Fish @ Cygnus Support, from information published in "UNIX System V Release 4, Programmers Guide: ANSI C and @@ -1372,11 +1372,9 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic) return true; rel_hdr = &d->rel_hdr; - reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize; + reloc_count = NUM_SHDR_ENTRIES (rel_hdr); rel_hdr2 = d->rel_hdr2; - reloc_count2 = (rel_hdr2 - ? (rel_hdr2->sh_size / rel_hdr2->sh_entsize) - : 0); + reloc_count2 = (rel_hdr2 ? NUM_SHDR_ENTRIES (rel_hdr2) : 0); BFD_ASSERT (asect->reloc_count == reloc_count + reloc_count2); BFD_ASSERT (asect->rel_filepos == rel_hdr->sh_offset @@ -1393,7 +1391,7 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic) return true; rel_hdr = &d->this_hdr; - reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize; + reloc_count = NUM_SHDR_ENTRIES (rel_hdr); rel_hdr2 = NULL; reloc_count2 = 0; } diff --git a/contrib/binutils/bfd/elfcore.h b/contrib/binutils/bfd/elfcore.h index 2c99e8b..ef71762 100644 --- a/contrib/binutils/bfd/elfcore.h +++ b/contrib/binutils/bfd/elfcore.h @@ -1,5 +1,6 @@ /* ELF core file support for BFD. - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 2000, 2001 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c index bfaf44b..b971311 100644 --- a/contrib/binutils/bfd/elflink.c +++ b/contrib/binutils/bfd/elflink.c @@ -1,5 +1,6 @@ /* ELF linking support for BFD. - Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -107,7 +108,7 @@ _bfd_elf_create_dynamic_sections (abfd, info) flagword flags, pltflags; register asection *s; struct elf_backend_data *bed = get_elf_backend_data (abfd); - int ptralign = 0; + int ptralign; switch (bed->s->arch_size) { @@ -332,7 +333,7 @@ elf_link_renumber_hash_table_dynsyms (h, data) return true; } -/* Assign dynsym indicies. In a shared library we generate a section +/* Assign dynsym indices. In a shared library we generate a section symbol for each output section, which come first. Next come all of the back-end allocated local dynamic syms, followed by the rest of the global symbols. */ diff --git a/contrib/binutils/bfd/elflink.h b/contrib/binutils/bfd/elflink.h index d3b44e8..26808ab 100644 --- a/contrib/binutils/bfd/elflink.h +++ b/contrib/binutils/bfd/elflink.h @@ -1,5 +1,6 @@ /* ELF linker support. - Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -80,9 +81,9 @@ elf_bfd_link_add_symbols (abfd, info) } } -/* Return true iff this is a non-common definition of a symbol. */ +/* Return true iff this is a non-common, definition of a non-function symbol. */ static boolean -is_global_symbol_definition (abfd, sym) +is_global_data_symbol_definition (abfd, sym) bfd * abfd ATTRIBUTE_UNUSED; Elf_Internal_Sym * sym; { @@ -91,6 +92,10 @@ is_global_symbol_definition (abfd, sym) && ELF_ST_BIND (sym->st_info) < STB_LOOS) return false; + /* Function symbols do not count. */ + if (ELF_ST_TYPE (sym->st_info) == STT_FUNC) + return false; + /* If the section is undefined, then so is the symbol. */ if (sym->st_shndx == SHN_UNDEF) return false; @@ -116,7 +121,7 @@ is_global_symbol_definition (abfd, sym) } /* Search the symbol table of the archive element of the archive ABFD - whoes archove map contains a mention of SYMDEF, and determine if + whose archive map contains a mention of SYMDEF, and determine if the symbol is defined in this element. */ static boolean elf_link_is_defined_archive_symbol (abfd, symdef) @@ -201,7 +206,7 @@ elf_link_is_defined_archive_symbol (abfd, symdef) if (strcmp (name, symdef->name) == 0) { - result = is_global_symbol_definition (abfd, & sym); + result = is_global_data_symbol_definition (abfd, & sym); break; } } @@ -890,7 +895,6 @@ elf_link_add_object_symbols (abfd, info) Elf_External_Sym *buf = NULL; struct elf_link_hash_entry **sym_hash; boolean dynamic; - bfd_byte *dynver = NULL; Elf_External_Versym *extversym = NULL; Elf_External_Versym *ever; Elf_External_Dyn *dynbuf = NULL; @@ -1018,7 +1022,7 @@ elf_link_add_object_symbols (abfd, info) Elf_Internal_Shdr *versymhdr; versymhdr = &elf_tdata (abfd)->dynversym_hdr; - extversym = (Elf_External_Versym *) bfd_malloc (hdr->sh_size); + extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size); if (extversym == NULL) goto error_return; if (bfd_seek (abfd, versymhdr->sh_offset, SEEK_SET) != 0 @@ -2169,8 +2173,6 @@ elf_link_add_object_symbols (abfd, info) free (buf); if (dynbuf != NULL) free (dynbuf); - if (dynver != NULL) - free (dynver); if (extversym != NULL) free (extversym); return false; @@ -2451,13 +2453,13 @@ elf_link_read_relocs_from_section (abfd, shdr, external_relocs, Elf_Internal_Rel *irel; erel = (Elf_External_Rel *) external_relocs; - erelend = erel + shdr->sh_size / shdr->sh_entsize; + erelend = erel + NUM_SHDR_ENTRIES (shdr); irela = internal_relocs; irel = bfd_alloc (abfd, (bed->s->int_rels_per_ext_rel * sizeof (Elf_Internal_Rel))); for (; erel < erelend; erel++, irela += bed->s->int_rels_per_ext_rel) { - unsigned char i; + unsigned int i; if (bed->s->swap_reloc_in) (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, irel); @@ -2481,7 +2483,7 @@ elf_link_read_relocs_from_section (abfd, shdr, external_relocs, BFD_ASSERT (shdr->sh_entsize == sizeof (Elf_External_Rela)); erela = (Elf_External_Rela *) external_relocs; - erelaend = erela + shdr->sh_size / shdr->sh_entsize; + erelaend = erela + NUM_SHDR_ENTRIES (shdr); irela = internal_relocs; for (; erela < erelaend; erela++, irela += bed->s->int_rels_per_ext_rel) { @@ -2561,7 +2563,7 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs, (abfd, elf_section_data (o)->rel_hdr2, ((bfd_byte *) external_relocs) + rel_hdr->sh_size, - internal_relocs + (rel_hdr->sh_size / rel_hdr->sh_entsize + internal_relocs + (NUM_SHDR_ENTRIES (rel_hdr) * bed->s->int_rels_per_ext_rel))) goto error_return; @@ -2952,14 +2954,13 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, } } + eif.info = info; + eif.failed = false; + /* If we are supposed to export all symbols into the dynamic symbol table (this is not the normal case), then do so. */ if (export_dynamic) { - struct elf_info_failed eif; - - eif.failed = false; - eif.info = info; elf_link_hash_traverse (elf_hash_table (info), elf_export_symbol, (PTR) &eif); if (eif.failed) @@ -2981,8 +2982,6 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, /* Find all symbols which were defined in a dynamic object and make the backend pick a reasonable value for them. */ - eif.failed = false; - eif.info = info; elf_link_hash_traverse (elf_hash_table (info), elf_adjust_dynamic_symbol, (PTR) &eif); @@ -3513,16 +3512,24 @@ elf_fix_symbol_flags (h, eif) /* If -Bsymbolic was used (which means to bind references to global symbols to the definition within the shared object), and this symbol was defined in a regular object, then it actually doesn't - need a PLT entry. Likewise, if the symbol has any kind of - visibility (internal, hidden, or protected), it doesn't need a - PLT. */ + need a PLT entry, and we can accomplish that by forcing it local. + Likewise, if the symbol has hidden or internal visibility. + FIXME: It might be that we also do not need a PLT for other + non-hidden visibilities, but we would have to tell that to the + backend specifically; we can't just clear PLT-related data here. */ if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0 && eif->info->shared - && (eif->info->symbolic || ELF_ST_VISIBILITY (h->other)) + && (eif->info->symbolic + || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL + || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0) { - h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT; - h->plt.offset = (bfd_vma) -1; + struct elf_backend_data *bed; + bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj); + if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL + || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) + h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; + (*bed->elf_backend_hide_symbol) (eif->info, h); } /* If this is a weak defined symbol in a dynamic object, and we know @@ -4086,7 +4093,6 @@ elf_link_size_reloc_section (abfd, rel_hdr, o) Elf_Internal_Shdr *rel_hdr; asection *o; { - register struct elf_link_hash_entry **p, **pend; unsigned reloc_count; /* Figure out how many relocations there will be. */ @@ -4110,16 +4116,15 @@ elf_link_size_reloc_section (abfd, rel_hdr, o) first time we are called. */ if (elf_section_data (o)->rel_hashes == NULL) { + struct elf_link_hash_entry **p; + p = ((struct elf_link_hash_entry **) - bfd_malloc (o->reloc_count - * sizeof (struct elf_link_hash_entry *))); + bfd_zmalloc (o->reloc_count + * sizeof (struct elf_link_hash_entry *))); if (p == NULL && o->reloc_count != 0) return false; elf_section_data (o)->rel_hashes = p; - pend = p + o->reloc_count; - for (; p < pend; p++) - *p = NULL; } return true; @@ -4139,6 +4144,24 @@ elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash) { unsigned int i; struct elf_backend_data *bed = get_elf_backend_data (abfd); + Elf_Internal_Rel *irel; + Elf_Internal_Rela *irela; + + irel = (Elf_Internal_Rel *) bfd_zmalloc (sizeof (Elf_Internal_Rel) + * bed->s->int_rels_per_ext_rel); + if (irel == NULL) + { + (*_bfd_error_handler) (_("Error: out of memory")); + abort (); + } + + irela = (Elf_Internal_Rela *) bfd_zmalloc (sizeof (Elf_Internal_Rela) + * bed->s->int_rels_per_ext_rel); + if (irela == NULL) + { + (*_bfd_error_handler) (_("Error: out of memory")); + abort (); + } for (i = 0; i < count; i++, rel_hash++) { @@ -4150,41 +4173,50 @@ elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash) if (rel_hdr->sh_entsize == sizeof (Elf_External_Rel)) { Elf_External_Rel *erel; - Elf_Internal_Rel irel; + unsigned int j; erel = (Elf_External_Rel *) rel_hdr->contents + i; if (bed->s->swap_reloc_in) - (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, &irel); + (*bed->s->swap_reloc_in) (abfd, (bfd_byte *) erel, irel); else - elf_swap_reloc_in (abfd, erel, &irel); - irel.r_info = ELF_R_INFO ((*rel_hash)->indx, - ELF_R_TYPE (irel.r_info)); + elf_swap_reloc_in (abfd, erel, irel); + + for (j = 0; j < bed->s->int_rels_per_ext_rel; j++) + irel[j].r_info = ELF_R_INFO ((*rel_hash)->indx, + ELF_R_TYPE (irel[j].r_info)); + if (bed->s->swap_reloc_out) - (*bed->s->swap_reloc_out) (abfd, &irel, (bfd_byte *) erel); + (*bed->s->swap_reloc_out) (abfd, irel, (bfd_byte *) erel); else - elf_swap_reloc_out (abfd, &irel, erel); + elf_swap_reloc_out (abfd, irel, erel); } else { Elf_External_Rela *erela; - Elf_Internal_Rela irela; + unsigned int j; BFD_ASSERT (rel_hdr->sh_entsize == sizeof (Elf_External_Rela)); erela = (Elf_External_Rela *) rel_hdr->contents + i; if (bed->s->swap_reloca_in) - (*bed->s->swap_reloca_in) (abfd, (bfd_byte *) erela, &irela); + (*bed->s->swap_reloca_in) (abfd, (bfd_byte *) erela, irela); else - elf_swap_reloca_in (abfd, erela, &irela); - irela.r_info = ELF_R_INFO ((*rel_hash)->indx, - ELF_R_TYPE (irela.r_info)); + elf_swap_reloca_in (abfd, erela, irela); + + for (j = 0; j < bed->s->int_rels_per_ext_rel; j++) + irela[j].r_info = ELF_R_INFO ((*rel_hash)->indx, + ELF_R_TYPE (irela[j].r_info)); + if (bed->s->swap_reloca_out) - (*bed->s->swap_reloca_out) (abfd, &irela, (bfd_byte *) erela); + (*bed->s->swap_reloca_out) (abfd, irela, (bfd_byte *) erela); else - elf_swap_reloca_out (abfd, &irela, erela); + elf_swap_reloca_out (abfd, irela, erela); } } + + free (irel); + free (irela); } /* Do the final step of an ELF link. */ @@ -4382,11 +4414,9 @@ elf_bfd_final_link (abfd, info) rel_count2 = &esdo->rel_count; } - *rel_count += (esdi->rel_hdr.sh_size - / esdi->rel_hdr.sh_entsize); + *rel_count += NUM_SHDR_ENTRIES (& esdi->rel_hdr); if (esdi->rel_hdr2) - *rel_count2 += (esdi->rel_hdr2->sh_size - / esdi->rel_hdr2->sh_entsize); + *rel_count2 += NUM_SHDR_ENTRIES (esdi->rel_hdr2); } } @@ -4431,7 +4461,7 @@ elf_bfd_final_link (abfd, info) /* sh_link is set in assign_section_numbers. */ /* sh_info is set below. */ /* sh_offset is set just below. */ - symtab_hdr->sh_addralign = 4; /* FIXME: system dependent? */ + symtab_hdr->sh_addralign = bed->s->file_align; off = elf_tdata (abfd)->next_file_pos; off = _bfd_elf_assign_file_position_for_section (symtab_hdr, off, true); @@ -5384,33 +5414,50 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, bed = get_elf_backend_data (output_bfd); irela = internal_relocs; - irelaend = irela + input_rel_hdr->sh_size / input_rel_hdr->sh_entsize; + irelaend = irela + NUM_SHDR_ENTRIES (input_rel_hdr) + * bed->s->int_rels_per_ext_rel; + if (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rel)) { Elf_External_Rel *erel; + Elf_Internal_Rel *irel; + + irel = (Elf_Internal_Rel *) bfd_zmalloc (bed->s->int_rels_per_ext_rel + * sizeof (Elf_Internal_Rel)); + if (irel == NULL) + { + (*_bfd_error_handler) (_("Error: out of memory")); + abort (); + } erel = ((Elf_External_Rel *) output_rel_hdr->contents + *rel_countp); - for (; irela < irelaend; irela++, erel++) + for (; irela < irelaend; irela += bed->s->int_rels_per_ext_rel, erel++) { - Elf_Internal_Rel irel; + unsigned int i; + + for (i = 0; i < bed->s->int_rels_per_ext_rel; i++) + { + irel[i].r_offset = irela[i].r_offset; + irel[i].r_info = irela[i].r_info; + BFD_ASSERT (irela[i].r_addend == 0); + } - irel.r_offset = irela->r_offset; - irel.r_info = irela->r_info; - BFD_ASSERT (irela->r_addend == 0); if (bed->s->swap_reloc_out) - (*bed->s->swap_reloc_out) (output_bfd, &irel, (PTR) erel); + (*bed->s->swap_reloc_out) (output_bfd, irel, (PTR) erel); else - elf_swap_reloc_out (output_bfd, &irel, erel); + elf_swap_reloc_out (output_bfd, irel, erel); } + + free (irel); } else { Elf_External_Rela *erela; - BFD_ASSERT (input_rel_hdr->sh_entsize - == sizeof (Elf_External_Rela)); + BFD_ASSERT (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rela)); + erela = ((Elf_External_Rela *) output_rel_hdr->contents + *rel_countp); - for (; irela < irelaend; irela++, erela++) + for (; irela < irelaend; irela += bed->s->int_rels_per_ext_rel, erela++) if (bed->s->swap_reloca_out) (*bed->s->swap_reloca_out) (output_bfd, irela, (PTR) erela); else @@ -5419,7 +5466,7 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, /* Bump the counter, so that we know where to add the next set of relocations. */ - *rel_countp += input_rel_hdr->sh_size / input_rel_hdr->sh_entsize; + *rel_countp += NUM_SHDR_ENTRIES (input_rel_hdr); } /* Link an input file into the linker output file. This function @@ -5511,14 +5558,24 @@ elf_link_input_bfd (finfo, input_bfd) } } + name = NULL; if (isym->st_shndx == SHN_UNDEF) - isec = bfd_und_section_ptr; + { + isec = bfd_und_section_ptr; + name = isec->name; + } else if (isym->st_shndx > 0 && isym->st_shndx < SHN_LORESERVE) isec = section_from_elf_index (input_bfd, isym->st_shndx); else if (isym->st_shndx == SHN_ABS) - isec = bfd_abs_section_ptr; + { + isec = bfd_abs_section_ptr; + name = isec->name; + } else if (isym->st_shndx == SHN_COMMON) - isec = bfd_com_section_ptr; + { + isec = bfd_com_section_ptr; + name = isec->name; + } else { /* Who knows? */ @@ -5537,7 +5594,18 @@ elf_link_input_bfd (finfo, input_bfd) /* Save away all section symbol values. */ if (isec != NULL) - isec->symbol->value = isym->st_value; + { + if (name) + { + if (isec->symbol->value != isym->st_value) + (*_bfd_error_handler) + (_("%s: invalid section symbol index 0x%x (%s) ingored"), + bfd_get_filename (input_bfd), isym->st_shndx, + name); + continue; + } + isec->symbol->value = isym->st_value; + } /* If this is a discarded link-once section symbol, update it's value to that of the kept section symbol. The @@ -5711,21 +5779,28 @@ elf_link_input_bfd (finfo, input_bfd) Elf_Internal_Rela *irelaend; struct elf_link_hash_entry **rel_hash; Elf_Internal_Shdr *input_rel_hdr; + unsigned int next_erel; /* Adjust the reloc addresses and symbol indices. */ irela = internal_relocs; - irelaend = - irela + o->reloc_count * bed->s->int_rels_per_ext_rel; + irelaend = irela + + o->reloc_count * bed->s->int_rels_per_ext_rel; rel_hash = (elf_section_data (o->output_section)->rel_hashes + elf_section_data (o->output_section)->rel_count + elf_section_data (o->output_section)->rel_count2); - for (; irela < irelaend; irela++, rel_hash++) + for (next_erel = 0; irela < irelaend; irela++, next_erel++) { unsigned long r_symndx; Elf_Internal_Sym *isym; asection *sec; + if (next_erel == bed->s->int_rels_per_ext_rel) + { + rel_hash++; + next_erel = 0; + } + irela->r_offset += o->output_offset; /* Relocs in an executable have to be virtual addresses. */ @@ -5742,7 +5817,7 @@ elf_link_input_bfd (finfo, input_bfd) && finfo->sections[r_symndx] == NULL)) { struct elf_link_hash_entry *rh; - long indx; + unsigned long indx; /* This is a reloc against a global symbol. We have not yet output all the local symbols, so @@ -5850,8 +5925,8 @@ elf_link_input_bfd (finfo, input_bfd) elf_link_output_relocs (output_bfd, o, input_rel_hdr, internal_relocs); - internal_relocs - += input_rel_hdr->sh_size / input_rel_hdr->sh_entsize; + internal_relocs += NUM_SHDR_ENTRIES (input_rel_hdr) + * bed->s->int_rels_per_ext_rel; input_rel_hdr = elf_section_data (o)->rel_hdr2; if (input_rel_hdr) elf_link_output_relocs (output_bfd, o, @@ -6018,32 +6093,52 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order) if (rel_hdr->sh_type == SHT_REL) { - Elf_Internal_Rel irel; + Elf_Internal_Rel *irel; Elf_External_Rel *erel; + unsigned int i; + + irel = (Elf_Internal_Rel *) bfd_zmalloc (bed->s->int_rels_per_ext_rel + * sizeof (Elf_Internal_Rel)); + if (irel == NULL) + return false; + + for (i = 0; i < bed->s->int_rels_per_ext_rel; i++) + irel[i].r_offset = offset; + irel[0].r_info = ELF_R_INFO (indx, howto->type); - irel.r_offset = offset; - irel.r_info = ELF_R_INFO (indx, howto->type); erel = ((Elf_External_Rel *) rel_hdr->contents + elf_section_data (output_section)->rel_count); + if (bed->s->swap_reloc_out) - (*bed->s->swap_reloc_out) (output_bfd, &irel, (bfd_byte *) erel); + (*bed->s->swap_reloc_out) (output_bfd, irel, (bfd_byte *) erel); else - elf_swap_reloc_out (output_bfd, &irel, erel); + elf_swap_reloc_out (output_bfd, irel, erel); + + free (irel); } else { - Elf_Internal_Rela irela; + Elf_Internal_Rela *irela; Elf_External_Rela *erela; + unsigned int i; + + irela = (Elf_Internal_Rela *) bfd_zmalloc (bed->s->int_rels_per_ext_rel + * sizeof (Elf_Internal_Rela)); + if (irela == NULL) + return false; + + for (i = 0; i < bed->s->int_rels_per_ext_rel; i++) + irela[i].r_offset = offset; + irela[0].r_info = ELF_R_INFO (indx, howto->type); + irela[0].r_addend = addend; - irela.r_offset = offset; - irela.r_info = ELF_R_INFO (indx, howto->type); - irela.r_addend = addend; erela = ((Elf_External_Rela *) rel_hdr->contents + elf_section_data (output_section)->rel_count); + if (bed->s->swap_reloca_out) - (*bed->s->swap_reloca_out) (output_bfd, &irela, (bfd_byte *) erela); + (*bed->s->swap_reloca_out) (output_bfd, irela, (bfd_byte *) erela); else - elf_swap_reloca_out (output_bfd, &irela, erela); + elf_swap_reloca_out (output_bfd, irela, erela); } ++elf_section_data (output_section)->rel_count; @@ -6180,7 +6275,7 @@ elf_create_pointer_linker_section (abfd, info, lsect, h, rel) #define bfd_put_ptr(BFD,VAL,ADDR) bfd_put_32 (BFD, VAL, ADDR) #endif -/* Fill in the address for a pointer generated in alinker section. */ +/* Fill in the address for a pointer generated in a linker section. */ bfd_vma elf_finish_pointer_linker_section (output_bfd, input_bfd, info, lsect, h, relocation, rel, relative_reloc) @@ -6247,7 +6342,17 @@ elf_finish_pointer_linker_section (output_bfd, input_bfd, info, lsect, h, reloca if (info->shared) { asection *srel = lsect->rel_section; - Elf_Internal_Rela outrel; + Elf_Internal_Rela *outrel; + struct elf_backend_data *bed = get_elf_backend_data (output_bfd); + unsigned int i; + + outrel = (Elf_Internal_Rela *) bfd_zmalloc (sizeof (Elf_Internal_Rela) + * bed->s->int_rels_per_ext_rel); + if (outrel == NULL) + { + (*_bfd_error_handler) (_("Error: out of memory")); + return 0; + } /* We need to generate a relative reloc for the dynamic linker. */ if (!srel) @@ -6256,16 +6361,19 @@ elf_finish_pointer_linker_section (output_bfd, input_bfd, info, lsect, h, reloca BFD_ASSERT (srel != NULL); - outrel.r_offset = (lsect->section->output_section->vma - + lsect->section->output_offset - + linker_section_ptr->offset); - outrel.r_info = ELF_R_INFO (0, relative_reloc); - outrel.r_addend = 0; - elf_swap_reloca_out (output_bfd, &outrel, + for (i = 0; i < bed->s->int_rels_per_ext_rel; i++) + outrel[i].r_offset = (lsect->section->output_section->vma + + lsect->section->output_offset + + linker_section_ptr->offset); + outrel[0].r_info = ELF_R_INFO (0, relative_reloc); + outrel[0].r_addend = 0; + elf_swap_reloca_out (output_bfd, outrel, (((Elf_External_Rela *) lsect->section->contents) + elf_section_data (lsect->section)->rel_count)); ++elf_section_data (lsect->section)->rel_count; + + free (outrel); } } } diff --git a/contrib/binutils/bfd/elfxx-target.h b/contrib/binutils/bfd/elfxx-target.h index e69036f..3ec9820 100644 --- a/contrib/binutils/bfd/elfxx-target.h +++ b/contrib/binutils/bfd/elfxx-target.h @@ -1,5 +1,6 @@ /* Target definitions for NN-bit ELF - Copyright 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -110,8 +111,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define bfd_elfNN_bfd_gc_sections _bfd_elfNN_gc_sections #endif +#ifndef bfd_elfNN_bfd_make_debug_symbol #define bfd_elfNN_bfd_make_debug_symbol \ ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr) +#endif #ifndef bfd_elfNN_bfd_copy_private_symbol_data #define bfd_elfNN_bfd_copy_private_symbol_data \ diff --git a/contrib/binutils/bfd/format.c b/contrib/binutils/bfd/format.c index ad4a6a8..6afcb60 100644 --- a/contrib/binutils/bfd/format.c +++ b/contrib/binutils/bfd/format.c @@ -1,5 +1,6 @@ /* Generic BFD support for file formats. - Copyright (C) 1990, 91, 92, 93, 94, 95, 1999 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001 + Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/freebsd.h b/contrib/binutils/bfd/freebsd.h index 0203d99..c2e3af0 100644 --- a/contrib/binutils/bfd/freebsd.h +++ b/contrib/binutils/bfd/freebsd.h @@ -1,5 +1,6 @@ /* BFD back-end definitions used by all FreeBSD targets. - Copyright (C) 1990, 1991, 1992, 1996, 2000 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1996, 1997, 2000, 2001 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/gen-aout.c b/contrib/binutils/bfd/gen-aout.c index b5ed91a..088fc09 100644 --- a/contrib/binutils/bfd/gen-aout.c +++ b/contrib/binutils/bfd/gen-aout.c @@ -1,5 +1,6 @@ /* Generate parameters for an a.out system. - Copyright (C) 1990, 91, 92, 93, 94, 98 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994, 1995 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/genlink.h b/contrib/binutils/bfd/genlink.h index 0e0a8de..215666a 100644 --- a/contrib/binutils/bfd/genlink.h +++ b/contrib/binutils/bfd/genlink.h @@ -1,5 +1,5 @@ /* genlink.h -- interface to the BFD generic linker - Copyright 1993, 1994 Free Software Foundation, Inc. + Copyright 1993, 1994, 1996 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/hash.c b/contrib/binutils/bfd/hash.c index a1bca28..11d54fd 100644 --- a/contrib/binutils/bfd/hash.c +++ b/contrib/binutils/bfd/hash.c @@ -1,5 +1,6 @@ /* hash.c -- hash table routines for BFD - Copyright (C) 1993, 94, 95, 97, 1999 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1997, 1999, 2001 + Free Software Foundation, Inc. Written by Steve Chamberlain This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/host-aout.c b/contrib/binutils/bfd/host-aout.c index 99643dc..a53cf09 100644 --- a/contrib/binutils/bfd/host-aout.c +++ b/contrib/binutils/bfd/host-aout.c @@ -1,5 +1,5 @@ /* BFD backend for local host's a.out binaries - Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1994, 1995 Free Software Foundation, Inc. Written by Cygnus Support. Probably John Gilmore's fault. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/i386aout.c b/contrib/binutils/bfd/i386aout.c index d0b2cff..1192dd4 100644 --- a/contrib/binutils/bfd/i386aout.c +++ b/contrib/binutils/bfd/i386aout.c @@ -1,5 +1,6 @@ /* BFD back-end for i386 a.out binaries. - Copyright 1990, 91, 92, 94, 95, 96, 1997 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1994, 1996, 1997 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/i386bsd.c b/contrib/binutils/bfd/i386bsd.c index 2328fe3..98c48cd 100644 --- a/contrib/binutils/bfd/i386bsd.c +++ b/contrib/binutils/bfd/i386bsd.c @@ -1,5 +1,5 @@ /* BFD back-end for i386 a.out binaries under BSD. - Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/i386freebsd.c b/contrib/binutils/bfd/i386freebsd.c index 7a6371b..f9684e4 100644 --- a/contrib/binutils/bfd/i386freebsd.c +++ b/contrib/binutils/bfd/i386freebsd.c @@ -1,5 +1,5 @@ /* BFD back-end for FreeBSD/386 a.out-ish binaries. - Copyright (C) 1990, 1991, 1992, 1996 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1996 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/i386linux.c b/contrib/binutils/bfd/i386linux.c index 5df2a11..5fee098 100644 --- a/contrib/binutils/bfd/i386linux.c +++ b/contrib/binutils/bfd/i386linux.c @@ -1,5 +1,5 @@ /* BFD back-end for linux flavored i386 a.out binaries. - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/i386netbsd.c b/contrib/binutils/bfd/i386netbsd.c index 327b6f9..0e01763 100644 --- a/contrib/binutils/bfd/i386netbsd.c +++ b/contrib/binutils/bfd/i386netbsd.c @@ -1,5 +1,6 @@ /* BFD back-end for NetBSD/386 a.out-ish binaries. - Copyright (C) 1990, 91, 92, 94, 95, 96, 1998 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/ieee.c b/contrib/binutils/bfd/ieee.c index 70f0d13..8414424 100644 --- a/contrib/binutils/bfd/ieee.c +++ b/contrib/binutils/bfd/ieee.c @@ -1,5 +1,6 @@ /* BFD back-end for ieee-695 objects. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. @@ -3581,6 +3582,10 @@ ieee_write_processor (abfd) case bfd_mach_m68040: id = "68040"; break; case bfd_mach_m68060: id = "68060"; break; case bfd_mach_cpu32: id = "cpu32"; break; + case bfd_mach_mcf5200:id = "5200"; break; + case bfd_mach_mcf5206e:id = "5206e"; break; + case bfd_mach_mcf5307:id = "5307"; break; + case bfd_mach_mcf5407:id = "5407"; break; } if (! ieee_write_id (abfd, id)) diff --git a/contrib/binutils/bfd/ihex.c b/contrib/binutils/bfd/ihex.c index d00c59b..738da81 100644 --- a/contrib/binutils/bfd/ihex.c +++ b/contrib/binutils/bfd/ihex.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel Hex objects. - Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor of Cygnus Support . This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/init.c b/contrib/binutils/bfd/init.c index 1fa1d50..198b979 100644 --- a/contrib/binutils/bfd/init.c +++ b/contrib/binutils/bfd/init.c @@ -1,5 +1,6 @@ /* bfd initialization stuff - Copyright (C) 1990, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1993, 1994, 1995 + 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/contrib/binutils/bfd/libaout.h b/contrib/binutils/bfd/libaout.h index 1682428..b3efdce 100644 --- a/contrib/binutils/bfd/libaout.h +++ b/contrib/binutils/bfd/libaout.h @@ -1,5 +1,6 @@ /* BFD back-end data structures for a.out (and similar) files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/contrib/binutils/bfd/libbfd-in.h b/contrib/binutils/bfd/libbfd-in.h index fb5f210..dc2cd11 100644 --- a/contrib/binutils/bfd/libbfd-in.h +++ b/contrib/binutils/bfd/libbfd-in.h @@ -1,6 +1,7 @@ /* libbfd.h -- Declarations used by bfd library *implementation*. (This include file is not for users of the library.) - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -521,7 +522,7 @@ extern bfd *bfd_last_cache; /* List of supported target vectors, and the default vector (if bfd_default_vector[0] is NULL, there is no default). */ -extern const bfd_target * const bfd_target_vector[]; +extern const bfd_target * const *bfd_target_vector; extern const bfd_target *bfd_default_vector[]; /* Functions shared by the ECOFF and MIPS ELF backends, which have no diff --git a/contrib/binutils/bfd/libbfd.c b/contrib/binutils/bfd/libbfd.c index 8b846f0..695df8d 100644 --- a/contrib/binutils/bfd/libbfd.c +++ b/contrib/binutils/bfd/libbfd.c @@ -1,5 +1,6 @@ /* Assorted BFD support routines, only used internally. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -231,6 +232,7 @@ real_read (where, a,b, file) if (a == 0 || b == 0) return 0; + #if defined (__VAX) && defined (VMS) /* Apparently fread on Vax VMS does not keep the record length information. */ @@ -746,7 +748,6 @@ bfd_seek (abfd, position, direction) file_position += abfd->origin; result = fseek (f, file_position, direction); - if (result != 0) { int hold_errno = errno; @@ -959,7 +960,7 @@ bfd_putb16 (data, addr) register bfd_byte *addr; { addr[0] = (bfd_byte) (data >> 8); - addr[1] = (bfd_byte )data; + addr[1] = (bfd_byte) data; } void @@ -967,7 +968,7 @@ bfd_putl16 (data, addr) bfd_vma data; register bfd_byte *addr; { - addr[0] = (bfd_byte )data; + addr[0] = (bfd_byte) data; addr[1] = (bfd_byte) (data >> 8); } @@ -1126,7 +1127,7 @@ bfd_putb32 (data, addr) addr[0] = (bfd_byte) (data >> 24); addr[1] = (bfd_byte) (data >> 16); addr[2] = (bfd_byte) (data >> 8); - addr[3] = (bfd_byte)data; + addr[3] = (bfd_byte) data; } void @@ -1134,7 +1135,7 @@ bfd_putl32 (data, addr) bfd_vma data; register bfd_byte *addr; { - addr[0] = (bfd_byte)data; + addr[0] = (bfd_byte) data; addr[1] = (bfd_byte) (data >> 8); addr[2] = (bfd_byte) (data >> 16); addr[3] = (bfd_byte) (data >> 24); diff --git a/contrib/binutils/bfd/libbfd.h b/contrib/binutils/bfd/libbfd.h index d6e3939..997856a 100644 --- a/contrib/binutils/bfd/libbfd.h +++ b/contrib/binutils/bfd/libbfd.h @@ -1,6 +1,7 @@ /* libbfd.h -- Declarations used by bfd library *implementation*. (This include file is not for users of the library.) - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -521,7 +522,7 @@ extern bfd *bfd_last_cache; /* List of supported target vectors, and the default vector (if bfd_default_vector[0] is NULL, there is no default). */ -extern const bfd_target * const bfd_target_vector[]; +extern const bfd_target * const *bfd_target_vector; extern const bfd_target *bfd_default_vector[]; /* Functions shared by the ECOFF and MIPS ELF backends, which have no @@ -646,7 +647,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_SPARC_GLOB_DAT", "BFD_RELOC_SPARC_JMP_SLOT", "BFD_RELOC_SPARC_RELATIVE", + "BFD_RELOC_SPARC_UA16", "BFD_RELOC_SPARC_UA32", + "BFD_RELOC_SPARC_UA64", "BFD_RELOC_SPARC_BASE13", "BFD_RELOC_SPARC_BASE22", "BFD_RELOC_SPARC_10", @@ -706,6 +709,17 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_MIPS_GOT_PAGE", "BFD_RELOC_MIPS_GOT_OFST", "BFD_RELOC_MIPS_GOT_DISP", + "BFD_RELOC_MIPS_SHIFT5", + "BFD_RELOC_MIPS_SHIFT6", + "BFD_RELOC_MIPS_INSERT_A", + "BFD_RELOC_MIPS_INSERT_B", + "BFD_RELOC_MIPS_DELETE", + "BFD_RELOC_MIPS_HIGHEST", + "BFD_RELOC_MIPS_HIGHER", + "BFD_RELOC_MIPS_SCN_DISP", + "BFD_RELOC_MIPS_REL16", + "BFD_RELOC_MIPS_RELGOT", + "BFD_RELOC_MIPS_JALR", "BFD_RELOC_386_GOT32", "BFD_RELOC_386_PLT32", diff --git a/contrib/binutils/bfd/libcoff-in.h b/contrib/binutils/bfd/libcoff-in.h index e5f5f9e..8368cc8 100644 --- a/contrib/binutils/bfd/libcoff-in.h +++ b/contrib/binutils/bfd/libcoff-in.h @@ -1,5 +1,6 @@ /* BFD COFF object file private structure. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -121,6 +122,8 @@ typedef struct pe_tdata int has_reloc_section; boolean (*in_reloc_p) PARAMS((bfd *, reloc_howto_type *)); flagword real_flags; + int target_subsystem; + boolean force_minimum_alignment; } pe_data_type; #define pe_data(bfd) ((bfd)->tdata.pe_obj_data) @@ -160,10 +163,10 @@ struct xcoff_tdata short cputype; /* maxdata from optional header. */ - bfd_size_type maxdata; + bfd_vma maxdata; /* maxstack from optional header. */ - bfd_size_type maxstack; + bfd_vma maxstack; /* Used by the XCOFF backend linker. */ asection **csects; diff --git a/contrib/binutils/bfd/libcoff.h b/contrib/binutils/bfd/libcoff.h index 5115538..34fed2d 100644 --- a/contrib/binutils/bfd/libcoff.h +++ b/contrib/binutils/bfd/libcoff.h @@ -1,5 +1,6 @@ /* BFD COFF object file private structure. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -121,6 +122,8 @@ typedef struct pe_tdata int has_reloc_section; boolean (*in_reloc_p) PARAMS((bfd *, reloc_howto_type *)); flagword real_flags; + int target_subsystem; + boolean force_minimum_alignment; } pe_data_type; #define pe_data(bfd) ((bfd)->tdata.pe_obj_data) @@ -160,10 +163,10 @@ struct xcoff_tdata short cputype; /* maxdata from optional header. */ - bfd_size_type maxdata; + bfd_vma maxdata; /* maxstack from optional header. */ - bfd_size_type maxstack; + bfd_vma maxstack; /* Used by the XCOFF backend linker. */ asection **csects; diff --git a/contrib/binutils/bfd/libecoff.h b/contrib/binutils/bfd/libecoff.h index 4561805..934ada1 100644 --- a/contrib/binutils/bfd/libecoff.h +++ b/contrib/binutils/bfd/libecoff.h @@ -1,5 +1,5 @@ /* BFD ECOFF object file private structure. - Copyright (C) 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/libieee.h b/contrib/binutils/bfd/libieee.h index 30e806e..aba9cb9 100644 --- a/contrib/binutils/bfd/libieee.h +++ b/contrib/binutils/bfd/libieee.h @@ -1,5 +1,5 @@ /* IEEE-695 object file formats: definitions internal to BFD. - Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1994, 1996 Free Software Foundation, Inc. Written by Cygnus Support. Mostly Steve Chamberlain's fault. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/linker.c b/contrib/binutils/bfd/linker.c index 1fb3cc5..82805f9 100644 --- a/contrib/binutils/bfd/linker.c +++ b/contrib/binutils/bfd/linker.c @@ -1,5 +1,5 @@ /* linker.c -- BFD linker routines - Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support @@ -1801,6 +1801,15 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value, copy, false); if (inh == (struct bfd_link_hash_entry *) NULL) return false; + if (inh->type == bfd_link_hash_indirect + && inh->u.i.link == h) + { + (*_bfd_error_handler) + (_("%s: indirect symbol `%s' to `%s' is a loop"), + bfd_get_filename (abfd), name, string); + bfd_set_error (bfd_error_invalid_operation); + return false; + } if (inh->type == bfd_link_hash_new) { inh->type = bfd_link_hash_undefined; diff --git a/contrib/binutils/bfd/netbsd-core.c b/contrib/binutils/bfd/netbsd-core.c index b94c4a1..c93d6a4 100644 --- a/contrib/binutils/bfd/netbsd-core.c +++ b/contrib/binutils/bfd/netbsd-core.c @@ -1,5 +1,6 @@ /* BFD back end for NetBSD style core files - Copyright 1988, 89, 91, 92, 93, 96, 1998 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000 + Free Software Foundation, Inc. Written by Paul Kranenburg, EUR This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/netbsd.h b/contrib/binutils/bfd/netbsd.h index d717824..0558032 100644 --- a/contrib/binutils/bfd/netbsd.h +++ b/contrib/binutils/bfd/netbsd.h @@ -1,5 +1,5 @@ /* BFD back-end definitions used by all NetBSD targets. - Copyright (C) 1990, 91, 92, 94, 95, 96, 97, 98, 2000 + Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/opncls.c b/contrib/binutils/bfd/opncls.c index 39947da..0c3d2c9 100644 --- a/contrib/binutils/bfd/opncls.c +++ b/contrib/binutils/bfd/opncls.c @@ -1,5 +1,6 @@ /* opncls.c -- open and close a BFD. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997, 2001 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, + 2001 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/contrib/binutils/bfd/osf-core.c b/contrib/binutils/bfd/osf-core.c index 4f4fc12..c458ecf 100644 --- a/contrib/binutils/bfd/osf-core.c +++ b/contrib/binutils/bfd/osf-core.c @@ -1,5 +1,5 @@ /* BFD back-end for OSF/1 core files. - Copyright 1993, 94, 95, 97, 1998 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1998, 1999 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/pe-arm.c b/contrib/binutils/bfd/pe-arm.c index a4e128b..dbb4789 100644 --- a/contrib/binutils/bfd/pe-arm.c +++ b/contrib/binutils/bfd/pe-arm.c @@ -1,5 +1,5 @@ /* BFD back-end for ARM PECOFF files. - Copyright 1995, 1999 Free Software Foundation, Inc. + Copyright 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/pe-i386.c b/contrib/binutils/bfd/pe-i386.c index 1e7e66e..7ced147 100644 --- a/contrib/binutils/bfd/pe-i386.c +++ b/contrib/binutils/bfd/pe-i386.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 PECOFF files. - Copyright 1995, 1996, 1999 Free Software Foundation, Inc. + Copyright 1995, 1996, 1999, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/pe-ppc.c b/contrib/binutils/bfd/pe-ppc.c index f96e68b..adbf317 100644 --- a/contrib/binutils/bfd/pe-ppc.c +++ b/contrib/binutils/bfd/pe-ppc.c @@ -1,5 +1,5 @@ /* BFD back-end for PowerPC PECOFF files. - Copyright 1995 Free Software Foundation, Inc. + Copyright 1995, 1996, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/peXXigen.c b/contrib/binutils/bfd/peXXigen.c new file mode 100644 index 0000000..0e1eaea --- /dev/null +++ b/contrib/binutils/bfd/peXXigen.c @@ -0,0 +1,2043 @@ +/* Support for the generic parts of PE/PEI; the common executable parts. + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. + Written by Cygnus Solutions. + +This file is part of BFD, the Binary File Descriptor library. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Most of this hacked by Steve Chamberlain . + + PE/PEI rearrangement (and code added): Donn Terry + Softway Systems, Inc. +*/ + +/* Hey look, some documentation [and in a place you expect to find it]! + + The main reference for the pei format is "Microsoft Portable Executable + and Common Object File Format Specification 4.1". Get it if you need to + do some serious hacking on this code. + + Another reference: + "Peering Inside the PE: A Tour of the Win32 Portable Executable + File Format", MSJ 1994, Volume 9. + + The *sole* difference between the pe format and the pei format is that the + latter has an MSDOS 2.0 .exe header on the front that prints the message + "This app must be run under Windows." (or some such). + (FIXME: Whether that statement is *really* true or not is unknown. + Are there more subtle differences between pe and pei formats? + For now assume there aren't. If you find one, then for God sakes + document it here!) + + The Microsoft docs use the word "image" instead of "executable" because + the former can also refer to a DLL (shared library). Confusion can arise + because the `i' in `pei' also refers to "image". The `pe' format can + also create images (i.e. executables), it's just that to run on a win32 + system you need to use the pei format. + + FIXME: Please add more docs here so the next poor fool that has to hack + on this code has a chance of getting something accomplished without + wasting too much time. +*/ + +/* This expands into COFF_WITH_pe or COFF_WITH_pep depending on whether + we're compiling for straight PE or PE+. */ +#define COFF_WITH_XX + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" +#include "coff/internal.h" + +/* NOTE: it's strange to be including an architecture specific header + in what's supposed to be general (to PE/PEI) code. However, that's + where the definitions are, and they don't vary per architecture + within PE/PEI, so we get them from there. FIXME: The lack of + variance is an assumption which may prove to be incorrect if new + PE/PEI targets are created. */ +#ifdef COFF_WITH_pep +# include "coff/ia64.h" +#else +# include "coff/i386.h" +#endif + +#include "coff/pe.h" +#include "libcoff.h" +#include "libpei.h" + +#ifdef COFF_WITH_pep +# undef AOUTSZ +# define AOUTSZ PEPAOUTSZ +# define PEAOUTHDR PEPAOUTHDR +#endif + +/* FIXME: This file has various tests of POWERPC_LE_PE. Those tests + worked when the code was in peicode.h, but no longer work now that + the code is in peigen.c. PowerPC NT is said to be dead. If + anybody wants to revive the code, you will have to figure out how + to handle those issues. */ + +static void add_data_entry + PARAMS ((bfd *, struct internal_extra_pe_aouthdr *, int, char *, bfd_vma)); +static boolean pe_print_pdata PARAMS ((bfd *, PTR)); +static boolean pe_print_reloc PARAMS ((bfd *, PTR)); + +/**********************************************************************/ + +void +_bfd_XXi_swap_sym_in (abfd, ext1, in1) + bfd *abfd; + PTR ext1; + PTR in1; +{ + SYMENT *ext = (SYMENT *) ext1; + struct internal_syment *in = (struct internal_syment *) in1; + + if (ext->e.e_name[0] == 0) + { + in->_n._n_n._n_zeroes = 0; + in->_n._n_n._n_offset = + bfd_h_get_32 (abfd, (bfd_byte *) ext->e.e.e_offset); + } + else + { + memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN); + } + + in->n_value = bfd_h_get_32 (abfd, (bfd_byte *) ext->e_value); + in->n_scnum = bfd_h_get_16 (abfd, (bfd_byte *) ext->e_scnum); + if (sizeof (ext->e_type) == 2) + { + in->n_type = bfd_h_get_16 (abfd, (bfd_byte *) ext->e_type); + } + else + { + in->n_type = bfd_h_get_32 (abfd, (bfd_byte *) ext->e_type); + } + in->n_sclass = bfd_h_get_8 (abfd, ext->e_sclass); + in->n_numaux = bfd_h_get_8 (abfd, ext->e_numaux); + +#ifndef STRICT_PE_FORMAT + /* This is for Gnu-created DLLs. */ + + /* The section symbols for the .idata$ sections have class 0x68 + (C_SECTION), which MS documentation indicates is a section + symbol. Unfortunately, the value field in the symbol is simply a + copy of the .idata section's flags rather than something useful. + When these symbols are encountered, change the value to 0 so that + they will be handled somewhat correctly in the bfd code. */ + if (in->n_sclass == C_SECTION) + { + in->n_value = 0x0; + +#if 0 + /* FIXME: This is clearly wrong. The problem seems to be that + undefined C_SECTION symbols appear in the first object of a + MS generated .lib file, and the symbols are not defined + anywhere. */ + in->n_scnum = 1; + + /* I have tried setting the class to 3 and using the following + to set the section number. This will put the address of the + pointer to the string kernel32.dll at addresses 0 and 0x10 + off start of idata section which is not correct. */ +#if 0 + if (strcmp (in->_n._n_name, ".idata$4") == 0) + in->n_scnum = 3; + else + in->n_scnum = 2; +#endif +#else + /* Create synthetic empty sections as needed. DJ */ + if (in->n_scnum == 0) + { + 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; + } + } + } + if (in->n_scnum == 0) + { + int unused_section_number = 0; + asection *sec; + char *name; + 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, strlen (in->n_name) + 10); + if (name == NULL) + return; + strcpy (name, in->n_name); + sec = bfd_make_section_anyway (abfd, name); + + sec->vma = 0; + sec->lma = 0; + sec->_cooked_size = 0; + sec->_raw_size = 0; + sec->filepos = 0; + sec->rel_filepos = 0; + sec->reloc_count = 0; + sec->line_filepos = 0; + sec->lineno_count = 0; + sec->userdata = NULL; + sec->next = (asection *) NULL; + sec->flags = 0; + sec->alignment_power = 2; + sec->flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_DATA | SEC_LOAD; + + sec->target_index = unused_section_number; + + in->n_scnum = unused_section_number; + } + in->n_sclass = C_STAT; +#endif + } +#endif + +#ifdef coff_swap_sym_in_hook + /* This won't work in peigen.c, but since it's for PPC PE, it's not + worth fixing. */ + coff_swap_sym_in_hook (abfd, ext1, in1); +#endif +} + +unsigned int +_bfd_XXi_swap_sym_out (abfd, inp, extp) + bfd *abfd; + PTR inp; + PTR extp; +{ + struct internal_syment *in = (struct internal_syment *) inp; + SYMENT *ext = (SYMENT *) extp; + if (in->_n._n_name[0] == 0) + { + bfd_h_put_32 (abfd, 0, (bfd_byte *) ext->e.e.e_zeroes); + bfd_h_put_32 (abfd, in->_n._n_n._n_offset, (bfd_byte *) ext->e.e.e_offset); + } + else + { + memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN); + } + + bfd_h_put_32 (abfd, in->n_value, (bfd_byte *) ext->e_value); + bfd_h_put_16 (abfd, in->n_scnum, (bfd_byte *) ext->e_scnum); + if (sizeof (ext->e_type) == 2) + { + bfd_h_put_16 (abfd, in->n_type, (bfd_byte *) ext->e_type); + } + else + { + bfd_h_put_32 (abfd, in->n_type, (bfd_byte *) ext->e_type); + } + bfd_h_put_8 (abfd, in->n_sclass, ext->e_sclass); + bfd_h_put_8 (abfd, in->n_numaux, ext->e_numaux); + + return SYMESZ; +} + +void +_bfd_XXi_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) + bfd *abfd; + PTR ext1; + int type; + int class; + int indx ATTRIBUTE_UNUSED; + int numaux ATTRIBUTE_UNUSED; + PTR in1; +{ + AUXENT *ext = (AUXENT *) ext1; + union internal_auxent *in = (union internal_auxent *) in1; + + switch (class) + { + case C_FILE: + if (ext->x_file.x_fname[0] == 0) + { + in->x_file.x_n.x_zeroes = 0; + in->x_file.x_n.x_offset = + bfd_h_get_32 (abfd, (bfd_byte *) ext->x_file.x_n.x_offset); + } + else + { + memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN); + } + return; + + case C_STAT: + case C_LEAFSTAT: + case C_HIDDEN: + if (type == T_NULL) + { + in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext); + in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext); + in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext); + in->x_scn.x_checksum = + bfd_h_get_32 (abfd, (bfd_byte *) ext->x_scn.x_checksum); + in->x_scn.x_associated = + bfd_h_get_16 (abfd, (bfd_byte *) ext->x_scn.x_associated); + in->x_scn.x_comdat = + bfd_h_get_8 (abfd, (bfd_byte *) ext->x_scn.x_comdat); + return; + } + break; + } + + in->x_sym.x_tagndx.l = bfd_h_get_32 (abfd, (bfd_byte *) ext->x_sym.x_tagndx); + in->x_sym.x_tvndx = bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_tvndx); + + if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (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); + } + else + { + in->x_sym.x_fcnary.x_ary.x_dimen[0] = + bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]); + in->x_sym.x_fcnary.x_ary.x_dimen[1] = + bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]); + in->x_sym.x_fcnary.x_ary.x_dimen[2] = + bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]); + in->x_sym.x_fcnary.x_ary.x_dimen[3] = + bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]); + } + + if (ISFCN (type)) + { + in->x_sym.x_misc.x_fsize = + bfd_h_get_32 (abfd, (bfd_byte *) ext->x_sym.x_misc.x_fsize); + } + else + { + in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext); + in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext); + } +} + +unsigned int +_bfd_XXi_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) + bfd *abfd; + PTR inp; + int type; + int class; + int indx ATTRIBUTE_UNUSED; + int numaux ATTRIBUTE_UNUSED; + PTR extp; +{ + union internal_auxent *in = (union internal_auxent *) inp; + AUXENT *ext = (AUXENT *) extp; + + memset ((PTR) ext, 0, AUXESZ); + switch (class) + { + case C_FILE: + if (in->x_file.x_fname[0] == 0) + { + bfd_h_put_32 (abfd, 0, (bfd_byte *) ext->x_file.x_n.x_zeroes); + bfd_h_put_32 (abfd, + in->x_file.x_n.x_offset, + (bfd_byte *) ext->x_file.x_n.x_offset); + } + else + { + memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN); + } + return AUXESZ; + + case C_STAT: + case C_LEAFSTAT: + case C_HIDDEN: + if (type == T_NULL) + { + PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext); + PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext); + PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext); + bfd_h_put_32 (abfd, in->x_scn.x_checksum, + (bfd_byte *) ext->x_scn.x_checksum); + bfd_h_put_16 (abfd, in->x_scn.x_associated, + (bfd_byte *) ext->x_scn.x_associated); + bfd_h_put_8 (abfd, in->x_scn.x_comdat, + (bfd_byte *) ext->x_scn.x_comdat); + return AUXESZ; + } + break; + } + + bfd_h_put_32 (abfd, in->x_sym.x_tagndx.l, (bfd_byte *) ext->x_sym.x_tagndx); + bfd_h_put_16 (abfd, in->x_sym.x_tvndx, (bfd_byte *) ext->x_sym.x_tvndx); + + if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (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); + } + else + { + bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0], + (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]); + bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1], + (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]); + bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2], + (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]); + bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3], + (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]); + } + + if (ISFCN (type)) + bfd_h_put_32 (abfd, in->x_sym.x_misc.x_fsize, + (bfd_byte *) ext->x_sym.x_misc.x_fsize); + else + { + PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext); + PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext); + } + + return AUXESZ; +} + +void +_bfd_XXi_swap_lineno_in (abfd, ext1, in1) + bfd *abfd; + PTR ext1; + PTR in1; +{ + LINENO *ext = (LINENO *) ext1; + struct internal_lineno *in = (struct internal_lineno *) in1; + + in->l_addr.l_symndx = bfd_h_get_32 (abfd, (bfd_byte *) ext->l_addr.l_symndx); + in->l_lnno = GET_LINENO_LNNO (abfd, ext); +} + +unsigned int +_bfd_XXi_swap_lineno_out (abfd, inp, outp) + bfd *abfd; + PTR inp; + PTR outp; +{ + struct internal_lineno *in = (struct internal_lineno *) inp; + struct external_lineno *ext = (struct external_lineno *) outp; + bfd_h_put_32 (abfd, in->l_addr.l_symndx, (bfd_byte *) + ext->l_addr.l_symndx); + + PUT_LINENO_LNNO (abfd, in->l_lnno, ext); + return LINESZ; +} + +void +_bfd_XXi_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1) + bfd *abfd; + PTR aouthdr_ext1; + PTR aouthdr_int1; +{ + struct internal_extra_pe_aouthdr *a; + PEAOUTHDR *src = (PEAOUTHDR *) (aouthdr_ext1); + AOUTHDR *aouthdr_ext = (AOUTHDR *) aouthdr_ext1; + struct internal_aouthdr *aouthdr_int = (struct internal_aouthdr *)aouthdr_int1; + + aouthdr_int->magic = bfd_h_get_16 (abfd, (bfd_byte *) aouthdr_ext->magic); + aouthdr_int->vstamp = bfd_h_get_16 (abfd, (bfd_byte *) aouthdr_ext->vstamp); + aouthdr_int->tsize = + GET_AOUTHDR_TSIZE (abfd, (bfd_byte *) aouthdr_ext->tsize); + aouthdr_int->dsize = + GET_AOUTHDR_DSIZE (abfd, (bfd_byte *) aouthdr_ext->dsize); + aouthdr_int->bsize = + GET_AOUTHDR_BSIZE (abfd, (bfd_byte *) aouthdr_ext->bsize); + aouthdr_int->entry = + GET_AOUTHDR_ENTRY (abfd, (bfd_byte *) aouthdr_ext->entry); + aouthdr_int->text_start = + GET_AOUTHDR_TEXT_START (abfd, (bfd_byte *) aouthdr_ext->text_start); +#ifndef COFF_WITH_pep + /* PE32+ does not have data_start member! */ + aouthdr_int->data_start = + GET_AOUTHDR_DATA_START (abfd, (bfd_byte *) aouthdr_ext->data_start); +#endif + + a = &aouthdr_int->pe; + a->ImageBase = GET_OPTHDR_IMAGE_BASE (abfd, (bfd_byte *) src->ImageBase); + a->SectionAlignment = bfd_h_get_32 (abfd, (bfd_byte *) src->SectionAlignment); + a->FileAlignment = bfd_h_get_32 (abfd, (bfd_byte *) src->FileAlignment); + a->MajorOperatingSystemVersion = + bfd_h_get_16 (abfd, (bfd_byte *) src->MajorOperatingSystemVersion); + a->MinorOperatingSystemVersion = + bfd_h_get_16 (abfd, (bfd_byte *) src->MinorOperatingSystemVersion); + a->MajorImageVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MajorImageVersion); + a->MinorImageVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MinorImageVersion); + a->MajorSubsystemVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MajorSubsystemVersion); + a->MinorSubsystemVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MinorSubsystemVersion); + a->Reserved1 = bfd_h_get_32 (abfd, (bfd_byte *) src->Reserved1); + a->SizeOfImage = bfd_h_get_32 (abfd, (bfd_byte *) src->SizeOfImage); + a->SizeOfHeaders = bfd_h_get_32 (abfd, (bfd_byte *) src->SizeOfHeaders); + a->CheckSum = bfd_h_get_32 (abfd, (bfd_byte *) src->CheckSum); + a->Subsystem = bfd_h_get_16 (abfd, (bfd_byte *) src->Subsystem); + a->DllCharacteristics = bfd_h_get_16 (abfd, (bfd_byte *) src->DllCharacteristics); + a->SizeOfStackReserve = GET_OPTHDR_SIZE_OF_STACK_RESERVE (abfd, (bfd_byte *) src->SizeOfStackReserve); + a->SizeOfStackCommit = GET_OPTHDR_SIZE_OF_STACK_COMMIT (abfd, (bfd_byte *) src->SizeOfStackCommit); + a->SizeOfHeapReserve = GET_OPTHDR_SIZE_OF_HEAP_RESERVE (abfd, (bfd_byte *) src->SizeOfHeapReserve); + a->SizeOfHeapCommit = GET_OPTHDR_SIZE_OF_HEAP_COMMIT (abfd, (bfd_byte *) src->SizeOfHeapCommit); + a->LoaderFlags = bfd_h_get_32 (abfd, (bfd_byte *) src->LoaderFlags); + a->NumberOfRvaAndSizes = bfd_h_get_32 (abfd, (bfd_byte *) src->NumberOfRvaAndSizes); + + { + int idx; + for (idx = 0; idx < 16; idx++) + { + /* If data directory is empty, rva also should be 0. */ + int size = + bfd_h_get_32 (abfd, (bfd_byte *) src->DataDirectory[idx][1]); + a->DataDirectory[idx].Size = size; + + if (size) + { + a->DataDirectory[idx].VirtualAddress = + bfd_h_get_32 (abfd, (bfd_byte *) src->DataDirectory[idx][0]); + } + else + a->DataDirectory[idx].VirtualAddress = 0; + } + } + + if (aouthdr_int->entry) + { + aouthdr_int->entry += a->ImageBase; +#ifndef COFF_WITH_pep + aouthdr_int->entry &= 0xffffffff; +#endif + } + if (aouthdr_int->tsize) + { + aouthdr_int->text_start += a->ImageBase; +#ifndef COFF_WITH_pep + aouthdr_int->text_start &= 0xffffffff; +#endif + } +#ifndef COFF_WITH_pep + /* PE32+ does not have data_start member! */ + if (aouthdr_int->dsize) + { + aouthdr_int->data_start += a->ImageBase; + aouthdr_int->data_start &= 0xffffffff; + } +#endif + +#ifdef POWERPC_LE_PE + /* These three fields are normally set up by ppc_relocate_section. + In the case of reading a file in, we can pick them up from the + DataDirectory. */ + first_thunk_address = a->DataDirectory[12].VirtualAddress; + thunk_size = a->DataDirectory[12].Size; + import_table_size = a->DataDirectory[1].Size; +#endif + +} + +/* A support function for below. */ + +static void +add_data_entry (abfd, aout, idx, name, base) + bfd *abfd; + struct internal_extra_pe_aouthdr *aout; + int idx; + char *name; + bfd_vma base; +{ + asection *sec = bfd_get_section_by_name (abfd, name); + + /* add import directory information if it exists */ + if ((sec != NULL) + && (coff_section_data (abfd, sec) != NULL) + && (pei_section_data (abfd, sec) != NULL)) + { + /* If data directory is empty, rva also should be 0 */ + int size = pei_section_data (abfd, sec)->virt_size; + aout->DataDirectory[idx].Size = size; + + if (size) + { + aout->DataDirectory[idx].VirtualAddress = + (sec->vma - base) & 0xffffffff; + sec->flags |= SEC_DATA; + } + } +} + +unsigned int +_bfd_XXi_swap_aouthdr_out (abfd, in, out) + bfd *abfd; + PTR in; + PTR out; +{ + struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in; + pe_data_type *pe = pe_data (abfd); + struct internal_extra_pe_aouthdr *extra = &pe->pe_opthdr; + PEAOUTHDR *aouthdr_out = (PEAOUTHDR *) out; + bfd_vma sa, fa, ib; + + 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; + + if (aouthdr_in->tsize) + { + aouthdr_in->text_start -= ib; +#ifndef COFF_WITH_pep + aouthdr_in->text_start &= 0xffffffff; +#endif + } + if (aouthdr_in->dsize) + { + aouthdr_in->data_start -= ib; +#ifndef COFF_WITH_pep + aouthdr_in->data_start &= 0xffffffff; +#endif + } + if (aouthdr_in->entry) + { + aouthdr_in->entry -= ib; +#ifndef COFF_WITH_pep + aouthdr_in->entry &= 0xffffffff; +#endif + } + +#define FA(x) (((x) + fa -1 ) & (- fa)) +#define SA(x) (((x) + sa -1 ) & (- sa)) + + /* We like to have the sizes aligned. */ + + aouthdr_in->bsize = FA (aouthdr_in->bsize); + + extra->NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; + + /* first null out all data directory entries .. */ + memset (extra->DataDirectory, sizeof (extra->DataDirectory), 0); + + add_data_entry (abfd, extra, 0, ".edata", ib); + + /* Don't call add_data_entry for .idata$2 or .idata$5. It's done in + bfd_coff_final_link where all the required information is + available. */ + + /* However, until other .idata fixes are made (pending patch), the + entry for .idata is needed for backwards compatability. FIXME. */ + add_data_entry (abfd, extra, 1, ".idata", ib); + + add_data_entry (abfd, extra, 2, ".rsrc", ib); + + add_data_entry (abfd, extra, 3, ".pdata", ib); + + /* For some reason, the virtual size (which is what's set by + add_data_entry) for .reloc is not the same as the size recorded + in this slot by MSVC; it doesn't seem to cause problems (so far), + but since it's the best we've got, use it. It does do the right + thing for .pdata. */ + if (pe->has_reloc_section) + add_data_entry (abfd, extra, 5, ".reloc", ib); + + { + asection *sec; + bfd_vma dsize = 0; + bfd_vma isize = SA(abfd->sections->filepos); + bfd_vma tsize = 0; + + for (sec = abfd->sections; sec; sec = sec->next) + { + int rounded = FA(sec->_raw_size); + + if (sec->flags & SEC_DATA) + dsize += rounded; + if (sec->flags & SEC_CODE) + tsize += rounded; + /* The image size is the total VIRTUAL size (which is what is + in the virt_size field). Files have been seen (from MSVC + 5.0 link.exe) where the file size of the .data segment is + quite small compared to the virtual size. Without this + fix, strip munges the file. */ + isize += SA (FA (pei_section_data (abfd, sec)->virt_size)); + } + + aouthdr_in->dsize = dsize; + aouthdr_in->tsize = tsize; + extra->SizeOfImage = isize; + } + + extra->SizeOfHeaders = abfd->sections->filepos; + bfd_h_put_16 (abfd, aouthdr_in->magic, (bfd_byte *) aouthdr_out->standard.magic); + +#define LINKER_VERSION 256 /* That is, 2.56 */ + + /* This piece of magic sets the "linker version" field to + LINKER_VERSION. */ + bfd_h_put_16 (abfd, + LINKER_VERSION / 100 + (LINKER_VERSION % 100) * 256, + (bfd_byte *) aouthdr_out->standard.vstamp); + + PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, (bfd_byte *) aouthdr_out->standard.tsize); + PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, (bfd_byte *) aouthdr_out->standard.dsize); + PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, (bfd_byte *) aouthdr_out->standard.bsize); + PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, (bfd_byte *) aouthdr_out->standard.entry); + PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start, + (bfd_byte *) aouthdr_out->standard.text_start); + +#ifndef COFF_WITH_pep + /* PE32+ does not have data_start member! */ + PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start, + (bfd_byte *) aouthdr_out->standard.data_start); +#endif + + PUT_OPTHDR_IMAGE_BASE (abfd, extra->ImageBase, + (bfd_byte *) aouthdr_out->ImageBase); + bfd_h_put_32 (abfd, extra->SectionAlignment, + (bfd_byte *) aouthdr_out->SectionAlignment); + bfd_h_put_32 (abfd, extra->FileAlignment, + (bfd_byte *) aouthdr_out->FileAlignment); + bfd_h_put_16 (abfd, extra->MajorOperatingSystemVersion, + (bfd_byte *) aouthdr_out->MajorOperatingSystemVersion); + bfd_h_put_16 (abfd, extra->MinorOperatingSystemVersion, + (bfd_byte *) aouthdr_out->MinorOperatingSystemVersion); + bfd_h_put_16 (abfd, extra->MajorImageVersion, + (bfd_byte *) aouthdr_out->MajorImageVersion); + bfd_h_put_16 (abfd, extra->MinorImageVersion, + (bfd_byte *) aouthdr_out->MinorImageVersion); + bfd_h_put_16 (abfd, extra->MajorSubsystemVersion, + (bfd_byte *) aouthdr_out->MajorSubsystemVersion); + bfd_h_put_16 (abfd, extra->MinorSubsystemVersion, + (bfd_byte *) aouthdr_out->MinorSubsystemVersion); + bfd_h_put_32 (abfd, extra->Reserved1, + (bfd_byte *) aouthdr_out->Reserved1); + bfd_h_put_32 (abfd, extra->SizeOfImage, + (bfd_byte *) aouthdr_out->SizeOfImage); + bfd_h_put_32 (abfd, extra->SizeOfHeaders, + (bfd_byte *) aouthdr_out->SizeOfHeaders); + bfd_h_put_32 (abfd, extra->CheckSum, + (bfd_byte *) aouthdr_out->CheckSum); + bfd_h_put_16 (abfd, extra->Subsystem, + (bfd_byte *) aouthdr_out->Subsystem); + bfd_h_put_16 (abfd, extra->DllCharacteristics, + (bfd_byte *) aouthdr_out->DllCharacteristics); + PUT_OPTHDR_SIZE_OF_STACK_RESERVE (abfd, extra->SizeOfStackReserve, + (bfd_byte *) aouthdr_out->SizeOfStackReserve); + PUT_OPTHDR_SIZE_OF_STACK_COMMIT (abfd, extra->SizeOfStackCommit, + (bfd_byte *) aouthdr_out->SizeOfStackCommit); + PUT_OPTHDR_SIZE_OF_HEAP_RESERVE (abfd, extra->SizeOfHeapReserve, + (bfd_byte *) aouthdr_out->SizeOfHeapReserve); + PUT_OPTHDR_SIZE_OF_HEAP_COMMIT (abfd, extra->SizeOfHeapCommit, + (bfd_byte *) aouthdr_out->SizeOfHeapCommit); + bfd_h_put_32 (abfd, extra->LoaderFlags, + (bfd_byte *) aouthdr_out->LoaderFlags); + bfd_h_put_32 (abfd, extra->NumberOfRvaAndSizes, + (bfd_byte *) aouthdr_out->NumberOfRvaAndSizes); + { + int idx; + for (idx = 0; idx < 16; idx++) + { + bfd_h_put_32 (abfd, extra->DataDirectory[idx].VirtualAddress, + (bfd_byte *) aouthdr_out->DataDirectory[idx][0]); + bfd_h_put_32 (abfd, extra->DataDirectory[idx].Size, + (bfd_byte *) aouthdr_out->DataDirectory[idx][1]); + } + } + + return AOUTSZ; +} + +unsigned int +_bfd_XXi_only_swap_filehdr_out (abfd, in, out) + bfd *abfd; + PTR in; + PTR out; +{ + int idx; + struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; + struct external_PEI_filehdr *filehdr_out = (struct external_PEI_filehdr *) out; + + if (pe_data (abfd)->has_reloc_section) + filehdr_in->f_flags &= ~F_RELFLG; + + if (pe_data (abfd)->dll) + filehdr_in->f_flags |= F_DLL; + + filehdr_in->pe.e_magic = DOSMAGIC; + filehdr_in->pe.e_cblp = 0x90; + filehdr_in->pe.e_cp = 0x3; + filehdr_in->pe.e_crlc = 0x0; + filehdr_in->pe.e_cparhdr = 0x4; + filehdr_in->pe.e_minalloc = 0x0; + filehdr_in->pe.e_maxalloc = 0xffff; + filehdr_in->pe.e_ss = 0x0; + filehdr_in->pe.e_sp = 0xb8; + filehdr_in->pe.e_csum = 0x0; + filehdr_in->pe.e_ip = 0x0; + filehdr_in->pe.e_cs = 0x0; + filehdr_in->pe.e_lfarlc = 0x40; + filehdr_in->pe.e_ovno = 0x0; + + for (idx = 0; idx < 4; idx++) + filehdr_in->pe.e_res[idx] = 0x0; + + filehdr_in->pe.e_oemid = 0x0; + filehdr_in->pe.e_oeminfo = 0x0; + + for (idx = 0; idx < 10; idx++) + filehdr_in->pe.e_res2[idx] = 0x0; + + filehdr_in->pe.e_lfanew = 0x80; + + /* This next collection of data are mostly just characters. It + appears to be constant within the headers put on NT exes. */ + filehdr_in->pe.dos_message[0] = 0x0eba1f0e; + filehdr_in->pe.dos_message[1] = 0xcd09b400; + filehdr_in->pe.dos_message[2] = 0x4c01b821; + filehdr_in->pe.dos_message[3] = 0x685421cd; + filehdr_in->pe.dos_message[4] = 0x70207369; + filehdr_in->pe.dos_message[5] = 0x72676f72; + filehdr_in->pe.dos_message[6] = 0x63206d61; + filehdr_in->pe.dos_message[7] = 0x6f6e6e61; + filehdr_in->pe.dos_message[8] = 0x65622074; + filehdr_in->pe.dos_message[9] = 0x6e757220; + filehdr_in->pe.dos_message[10] = 0x206e6920; + filehdr_in->pe.dos_message[11] = 0x20534f44; + filehdr_in->pe.dos_message[12] = 0x65646f6d; + filehdr_in->pe.dos_message[13] = 0x0a0d0d2e; + filehdr_in->pe.dos_message[14] = 0x24; + filehdr_in->pe.dos_message[15] = 0x0; + filehdr_in->pe.nt_signature = NT_SIGNATURE; + + bfd_h_put_16 (abfd, filehdr_in->f_magic, (bfd_byte *) filehdr_out->f_magic); + bfd_h_put_16 (abfd, filehdr_in->f_nscns, (bfd_byte *) filehdr_out->f_nscns); + + bfd_h_put_32 (abfd, time (0), (bfd_byte *) filehdr_out->f_timdat); + PUT_FILEHDR_SYMPTR (abfd, (bfd_vma) filehdr_in->f_symptr, + (bfd_byte *) filehdr_out->f_symptr); + bfd_h_put_32 (abfd, filehdr_in->f_nsyms, (bfd_byte *) filehdr_out->f_nsyms); + bfd_h_put_16 (abfd, filehdr_in->f_opthdr, (bfd_byte *) filehdr_out->f_opthdr); + bfd_h_put_16 (abfd, filehdr_in->f_flags, (bfd_byte *) filehdr_out->f_flags); + + /* put in extra dos header stuff. This data remains essentially + constant, it just has to be tacked on to the beginning of all exes + for NT */ + bfd_h_put_16 (abfd, filehdr_in->pe.e_magic, (bfd_byte *) filehdr_out->e_magic); + bfd_h_put_16 (abfd, filehdr_in->pe.e_cblp, (bfd_byte *) filehdr_out->e_cblp); + bfd_h_put_16 (abfd, filehdr_in->pe.e_cp, (bfd_byte *) filehdr_out->e_cp); + bfd_h_put_16 (abfd, filehdr_in->pe.e_crlc, (bfd_byte *) filehdr_out->e_crlc); + bfd_h_put_16 (abfd, filehdr_in->pe.e_cparhdr, + (bfd_byte *) filehdr_out->e_cparhdr); + bfd_h_put_16 (abfd, filehdr_in->pe.e_minalloc, + (bfd_byte *) filehdr_out->e_minalloc); + bfd_h_put_16 (abfd, filehdr_in->pe.e_maxalloc, + (bfd_byte *) filehdr_out->e_maxalloc); + bfd_h_put_16 (abfd, filehdr_in->pe.e_ss, (bfd_byte *) filehdr_out->e_ss); + bfd_h_put_16 (abfd, filehdr_in->pe.e_sp, (bfd_byte *) filehdr_out->e_sp); + bfd_h_put_16 (abfd, filehdr_in->pe.e_csum, (bfd_byte *) filehdr_out->e_csum); + bfd_h_put_16 (abfd, filehdr_in->pe.e_ip, (bfd_byte *) filehdr_out->e_ip); + bfd_h_put_16 (abfd, filehdr_in->pe.e_cs, (bfd_byte *) filehdr_out->e_cs); + bfd_h_put_16 (abfd, filehdr_in->pe.e_lfarlc, (bfd_byte *) filehdr_out->e_lfarlc); + bfd_h_put_16 (abfd, filehdr_in->pe.e_ovno, (bfd_byte *) filehdr_out->e_ovno); + { + int idx; + for (idx = 0; idx < 4; idx++) + bfd_h_put_16 (abfd, filehdr_in->pe.e_res[idx], + (bfd_byte *) filehdr_out->e_res[idx]); + } + bfd_h_put_16 (abfd, filehdr_in->pe.e_oemid, (bfd_byte *) filehdr_out->e_oemid); + bfd_h_put_16 (abfd, filehdr_in->pe.e_oeminfo, + (bfd_byte *) filehdr_out->e_oeminfo); + { + int idx; + for (idx = 0; idx < 10; idx++) + bfd_h_put_16 (abfd, filehdr_in->pe.e_res2[idx], + (bfd_byte *) filehdr_out->e_res2[idx]); + } + bfd_h_put_32 (abfd, filehdr_in->pe.e_lfanew, (bfd_byte *) filehdr_out->e_lfanew); + + { + int idx; + for (idx = 0; idx < 16; idx++) + bfd_h_put_32 (abfd, filehdr_in->pe.dos_message[idx], + (bfd_byte *) filehdr_out->dos_message[idx]); + } + + /* Also put in the NT signature. */ + bfd_h_put_32 (abfd, filehdr_in->pe.nt_signature, + (bfd_byte *) filehdr_out->nt_signature); + + return FILHSZ; +} + +unsigned int +_bfd_XX_only_swap_filehdr_out (abfd, in, out) + bfd *abfd; + PTR in; + PTR out; +{ + struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in; + FILHDR *filehdr_out = (FILHDR *) out; + + bfd_h_put_16 (abfd, filehdr_in->f_magic, (bfd_byte *) filehdr_out->f_magic); + bfd_h_put_16 (abfd, filehdr_in->f_nscns, (bfd_byte *) filehdr_out->f_nscns); + bfd_h_put_32 (abfd, filehdr_in->f_timdat, (bfd_byte *) filehdr_out->f_timdat); + PUT_FILEHDR_SYMPTR (abfd, (bfd_vma) filehdr_in->f_symptr, + (bfd_byte *) filehdr_out->f_symptr); + bfd_h_put_32 (abfd, filehdr_in->f_nsyms, (bfd_byte *) filehdr_out->f_nsyms); + bfd_h_put_16 (abfd, filehdr_in->f_opthdr, (bfd_byte *) filehdr_out->f_opthdr); + bfd_h_put_16 (abfd, filehdr_in->f_flags, (bfd_byte *) filehdr_out->f_flags); + + return FILHSZ; +} + +unsigned int +_bfd_XXi_swap_scnhdr_out (abfd, in, out) + bfd *abfd; + PTR in; + PTR out; +{ + struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in; + SCNHDR *scnhdr_ext = (SCNHDR *) out; + unsigned int ret = SCNHSZ; + bfd_vma ps; + bfd_vma ss; + + memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); + + PUT_SCNHDR_VADDR (abfd, + ((scnhdr_int->s_vaddr + - pe_data (abfd)->pe_opthdr.ImageBase) + & 0xffffffff), + (bfd_byte *) scnhdr_ext->s_vaddr); + + /* NT wants the size data to be rounded up to the next + NT_FILE_ALIGNMENT, but zero if it has no content (as in .bss, + sometimes). */ + + if ((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0) + { + ps = scnhdr_int->s_size; + ss = 0; + } + else + { + ps = scnhdr_int->s_paddr; + ss = scnhdr_int->s_size; + } + + PUT_SCNHDR_SIZE (abfd, ss, + (bfd_byte *) scnhdr_ext->s_size); + + /* s_paddr in PE is really the virtual size. */ + PUT_SCNHDR_PADDR (abfd, ps, (bfd_byte *) scnhdr_ext->s_paddr); + + PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, + (bfd_byte *) scnhdr_ext->s_scnptr); + PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, + (bfd_byte *) scnhdr_ext->s_relptr); + PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, + (bfd_byte *) scnhdr_ext->s_lnnoptr); + + /* Extra flags must be set when dealing with NT. All sections should also + have the IMAGE_SCN_MEM_READ (0x40000000) flag set. In addition, the + .text section must have IMAGE_SCN_MEM_EXECUTE (0x20000000) and the data + sections (.idata, .data, .bss, .CRT) must have IMAGE_SCN_MEM_WRITE set + (this is especially important when dealing with the .idata section since + the addresses for routines from .dlls must be overwritten). If .reloc + section data is ever generated, we must add IMAGE_SCN_MEM_DISCARDABLE + (0x02000000). Also, the resource data should also be read and + writable. */ + + /* FIXME: alignment is also encoded in this field, at least on ppc (krk) */ + /* FIXME: even worse, I don't see how to get the original alignment field*/ + /* back... */ + + { + int flags = scnhdr_int->s_flags; + bfd_h_put_32 (abfd, flags, (bfd_byte *) scnhdr_ext->s_flags); + } + + if (coff_data (abfd)->link_info + && ! coff_data (abfd)->link_info->relocateable + && ! coff_data (abfd)->link_info->shared + && strcmp (scnhdr_int->s_name, ".text") == 0) + { + /* By inference from looking at MS output, the 32 bit field + which is the combintion of the number_of_relocs and + number_of_linenos is used for the line number count in + executables. A 16-bit field won't do for cc1. The MS + document says that the number of relocs is zero for + executables, but the 17-th bit has been observed to be there. + Overflow is not an issue: a 4G-line program will overflow a + bunch of other fields long before this! */ + bfd_h_put_16 (abfd, scnhdr_int->s_nlnno & 0xffff, + (bfd_byte *) scnhdr_ext->s_nlnno); + bfd_h_put_16 (abfd, scnhdr_int->s_nlnno >> 16, + (bfd_byte *) scnhdr_ext->s_nreloc); + } + else + { + if (scnhdr_int->s_nlnno <= 0xffff) + bfd_h_put_16 (abfd, scnhdr_int->s_nlnno, + (bfd_byte *) scnhdr_ext->s_nlnno); + else + { + (*_bfd_error_handler) (_("%s: line number overflow: 0x%lx > 0xffff"), + bfd_get_filename (abfd), + scnhdr_int->s_nlnno); + bfd_set_error (bfd_error_file_truncated); + bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nlnno); + ret = 0; + } + if (scnhdr_int->s_nreloc <= 0xffff) + bfd_h_put_16 (abfd, scnhdr_int->s_nreloc, + (bfd_byte *) scnhdr_ext->s_nreloc); + else + { + /* PE can deal with large #s of relocs, but not here */ + bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc); + scnhdr_int->s_flags |= IMAGE_SCN_LNK_NRELOC_OVFL; + bfd_h_put_32 (abfd, scnhdr_int->s_flags, + (bfd_byte *) scnhdr_ext->s_flags); +#if 0 + (*_bfd_error_handler) (_("%s: reloc overflow 1: 0x%lx > 0xffff"), + bfd_get_filename (abfd), + scnhdr_int->s_nreloc); + bfd_set_error (bfd_error_file_truncated); + bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc); + ret = 0; +#endif + } + } + return ret; +} + +static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] = { + N_("Export Directory [.edata (or where ever we found it)]"), + N_("Import Directory [parts of .idata]"), + N_("Resource Directory [.rsrc]"), + N_("Exception Directory [.pdata]"), + N_("Security Directory"), + N_("Base Relocation Directory [.reloc]"), + N_("Debug Directory"), + N_("Description Directory"), + N_("Special Directory"), + N_("Thread Storage Directory [.tls]"), + N_("Load Configuration Directory"), + N_("Bound Import Directory"), + N_("Import Address Table Directory"), + N_("Delay Import Directory"), + N_("Reserved"), + N_("Reserved") +}; + +/**********************************************************************/ +#ifdef POWERPC_LE_PE +/* The code for the PPC really falls in the "architecture dependent" + category. However, it's not clear that anyone will ever care, so + we're ignoring the issue for now; if/when PPC matters, some of this + may need to go into peicode.h, or arguments passed to enable the + PPC- specific code. */ +#endif + +/**********************************************************************/ +static boolean +pe_print_idata (abfd, vfile) + bfd *abfd; + PTR vfile; +{ + FILE *file = (FILE *) vfile; + bfd_byte *data; + asection *section; + bfd_signed_vma adj; + +#ifdef POWERPC_LE_PE + asection *rel_section = bfd_get_section_by_name (abfd, ".reldata"); +#endif + + bfd_size_type datasize = 0; + bfd_size_type dataoff; + bfd_size_type i; + int onaline = 20; + + pe_data_type *pe = pe_data (abfd); + struct internal_extra_pe_aouthdr *extra = &pe->pe_opthdr; + + bfd_vma addr; + + addr = extra->DataDirectory[1].VirtualAddress; + + if (addr == 0 && extra->DataDirectory[1].Size == 0) + { + /* Maybe the extra header isn't there. Look for the section. */ + section = bfd_get_section_by_name (abfd, ".idata"); + if (section == NULL) + return true; + + addr = section->vma; + datasize = bfd_section_size (abfd, section); + if (datasize == 0) + return true; + } + else + { + addr += extra->ImageBase; + for (section = abfd->sections; section != NULL; section = section->next) + { + datasize = bfd_section_size (abfd, section); + if (addr >= section->vma && addr < section->vma + datasize) + break; + } + + if (section == NULL) + { + fprintf (file, + _("\nThere is an import table, but the section containing it could not be found\n")); + return true; + } + } + + fprintf (file, _("\nThere is an import table in %s at 0x%lx\n"), + section->name, (unsigned long) addr); + + dataoff = addr - section->vma; + datasize -= dataoff; + +#ifdef POWERPC_LE_PE + if (rel_section != 0 && bfd_section_size (abfd, rel_section) != 0) + { + /* The toc address can be found by taking the starting address, + which on the PPC locates a function descriptor. The + descriptor consists of the function code starting address + followed by the address of the toc. The starting address we + get from the bfd, and the descriptor is supposed to be in the + .reldata section. */ + + bfd_vma loadable_toc_address; + bfd_vma toc_address; + bfd_vma start_address; + bfd_byte *data = 0; + int offset; + + data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, + rel_section)); + if (data == NULL && bfd_section_size (abfd, rel_section) != 0) + return false; + + bfd_get_section_contents (abfd, + rel_section, + (PTR) data, 0, + bfd_section_size (abfd, rel_section)); + + offset = abfd->start_address - rel_section->vma; + + start_address = bfd_get_32 (abfd, data + offset); + loadable_toc_address = bfd_get_32 (abfd, data + offset + 4); + toc_address = loadable_toc_address - 32768; + + fprintf (file, + _("\nFunction descriptor located at the start address: %04lx\n"), + (unsigned long int) (abfd->start_address)); + fprintf (file, + _("\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"), + start_address, loadable_toc_address, toc_address); + } + else + { + fprintf (file, + _("\nNo reldata section! Function descriptor not decoded.\n")); + } +#endif + + fprintf (file, + _("\nThe Import Tables (interpreted %s section contents)\n"), + section->name); + fprintf (file, + _(" vma: Hint Time Forward DLL First\n")); + fprintf (file, + _(" Table Stamp Chain Name Thunk\n")); + + data = (bfd_byte *) bfd_malloc (dataoff + datasize); + if (data == NULL) + return false; + + /* Read the whole section. Some of the fields might be before dataoff. */ + if (! bfd_get_section_contents (abfd, section, (PTR) data, + 0, dataoff + datasize)) + return false; + + adj = section->vma - extra->ImageBase; + + for (i = 0; i < datasize; i += onaline) + { + bfd_vma hint_addr; + bfd_vma time_stamp; + bfd_vma forward_chain; + bfd_vma dll_name; + bfd_vma first_thunk; + int idx = 0; + bfd_size_type j; + char *dll; + + /* print (i + extra->DataDirectory[1].VirtualAddress) */ + fprintf (file, " %08lx\t", (unsigned long) (i + adj + dataoff)); + + if (i + 20 > datasize) + { + /* Check stuff. */ + ; + } + + hint_addr = bfd_get_32 (abfd, data + i + dataoff); + time_stamp = bfd_get_32 (abfd, data + i + 4 + dataoff); + forward_chain = bfd_get_32 (abfd, data + i + 8 + dataoff); + dll_name = bfd_get_32 (abfd, data + i + 12 + dataoff); + first_thunk = bfd_get_32 (abfd, data + i + 16 + dataoff); + + fprintf (file, "%08lx %08lx %08lx %08lx %08lx\n", + (unsigned long) hint_addr, + (unsigned long) time_stamp, + (unsigned long) forward_chain, + (unsigned long) dll_name, + (unsigned long) first_thunk); + + if (hint_addr == 0 && first_thunk == 0) + break; + + dll = (char *) data + dll_name - adj; + fprintf (file, _("\n\tDLL Name: %s\n"), dll); + + if (hint_addr != 0) + { + fprintf (file, _("\tvma: Hint/Ord Member-Name\n")); + + idx = hint_addr - adj; + + for (j = 0; j < datasize; j += 4) + { + unsigned long member = bfd_get_32 (abfd, data + idx + j); + + if (member == 0) + break; + if (member & 0x80000000) + fprintf (file, "\t%04lx\t %4lu", member, + member & 0x7fffffff); + else + { + int ordinal; + char *member_name; + + ordinal = bfd_get_16 (abfd, data + member - adj); + member_name = (char *) data + member - adj + 2; + fprintf (file, "\t%04lx\t %4d %s", + member, ordinal, member_name); + } + + /* If the time stamp is not zero, the import address + table holds actual addresses. */ + if (time_stamp != 0 + && first_thunk != 0 + && first_thunk != hint_addr) + fprintf (file, "\t%04lx", + (long) bfd_get_32 (abfd, data + first_thunk - adj + j)); + + fprintf (file, "\n"); + } + } + + if (hint_addr != first_thunk && time_stamp == 0) + { + int differ = 0; + int idx2; + + idx2 = first_thunk - adj; + + for (j = 0; j < datasize; j += 4) + { + int ordinal; + char *member_name; + bfd_vma hint_member = 0; + bfd_vma iat_member; + + if (hint_addr != 0) + hint_member = bfd_get_32 (abfd, data + idx + j); + iat_member = bfd_get_32 (abfd, data + idx2 + j); + + if (hint_addr == 0 && iat_member == 0) + break; + + if (hint_addr == 0 || hint_member != iat_member) + { + if (differ == 0) + { + fprintf (file, + _("\tThe Import Address Table (difference found)\n")); + fprintf (file, _("\tvma: Hint/Ord Member-Name\n")); + differ = 1; + } + if (iat_member == 0) + { + fprintf (file, + _("\t>>> Ran out of IAT members!\n")); + } + else + { + ordinal = bfd_get_16 (abfd, data + iat_member - adj); + member_name = (char *) data + iat_member - adj + 2; + fprintf (file, "\t%04lx\t %4d %s\n", + (unsigned long) iat_member, + ordinal, + member_name); + } + } + + if (hint_addr != 0 && hint_member == 0) + break; + } + if (differ == 0) + { + fprintf (file, + _("\tThe Import Address Table is identical\n")); + } + } + + fprintf (file, "\n"); + + } + + free (data); + + return true; +} + +static boolean +pe_print_edata (abfd, vfile) + bfd *abfd; + PTR vfile; +{ + FILE *file = (FILE *) vfile; + bfd_byte *data; + asection *section; + + bfd_size_type datasize = 0; + bfd_size_type dataoff; + bfd_size_type i; + + bfd_signed_vma adj; + struct EDT_type { + long export_flags; /* reserved - should be zero */ + long time_stamp; + short major_ver; + short minor_ver; + bfd_vma name; /* rva - relative to image base */ + long base; /* ordinal base */ + unsigned long num_functions; /* Number in the export address table */ + unsigned long num_names; /* Number in the name pointer table */ + bfd_vma eat_addr; /* rva to the export address table */ + bfd_vma npt_addr; /* rva to the Export Name Pointer Table */ + bfd_vma ot_addr; /* rva to the Ordinal Table */ + } edt; + + pe_data_type *pe = pe_data (abfd); + struct internal_extra_pe_aouthdr *extra = &pe->pe_opthdr; + + bfd_vma addr; + + addr = extra->DataDirectory[0].VirtualAddress; + + if (addr == 0 && extra->DataDirectory[0].Size == 0) + { + /* Maybe the extra header isn't there. Look for the section. */ + section = bfd_get_section_by_name (abfd, ".edata"); + if (section == NULL) + return true; + + addr = section->vma; + datasize = bfd_section_size (abfd, section); + if (datasize == 0) + return true; + } + else + { + addr += extra->ImageBase; + for (section = abfd->sections; section != NULL; section = section->next) + { + datasize = bfd_section_size (abfd, section); + if (addr >= section->vma && addr < section->vma + datasize) + break; + } + + if (section == NULL) + { + fprintf (file, + _("\nThere is an export table, but the section containing it could not be found\n")); + return true; + } + } + + fprintf (file, _("\nThere is an export table in %s at 0x%lx\n"), + section->name, (unsigned long) addr); + + dataoff = addr - section->vma; + datasize -= dataoff; + + data = (bfd_byte *) bfd_malloc (datasize); + if (data == NULL) + return false; + + if (! bfd_get_section_contents (abfd, section, (PTR) data, dataoff, + datasize)) + return false; + + /* Go get Export Directory Table. */ + edt.export_flags = bfd_get_32 (abfd, data + 0); + edt.time_stamp = bfd_get_32 (abfd, data + 4); + edt.major_ver = bfd_get_16 (abfd, data + 8); + edt.minor_ver = bfd_get_16 (abfd, data + 10); + edt.name = bfd_get_32 (abfd, data + 12); + edt.base = bfd_get_32 (abfd, data + 16); + edt.num_functions = bfd_get_32 (abfd, data + 20); + edt.num_names = bfd_get_32 (abfd, data + 24); + edt.eat_addr = bfd_get_32 (abfd, data + 28); + edt.npt_addr = bfd_get_32 (abfd, data + 32); + edt.ot_addr = bfd_get_32 (abfd, data + 36); + + adj = section->vma - extra->ImageBase + dataoff; + + /* Dump the EDT first first */ + fprintf (file, + _("\nThe Export Tables (interpreted %s section contents)\n\n"), + section->name); + + fprintf (file, + _("Export Flags \t\t\t%lx\n"), (unsigned long) edt.export_flags); + + fprintf (file, + _("Time/Date stamp \t\t%lx\n"), (unsigned long) edt.time_stamp); + + fprintf (file, + _("Major/Minor \t\t\t%d/%d\n"), edt.major_ver, edt.minor_ver); + + fprintf (file, + _("Name \t\t\t\t")); + fprintf_vma (file, edt.name); + fprintf (file, + " %s\n", data + edt.name - adj); + + fprintf (file, + _("Ordinal Base \t\t\t%ld\n"), edt.base); + + fprintf (file, + _("Number in:\n")); + + fprintf (file, + _("\tExport Address Table \t\t%08lx\n"), + edt.num_functions); + + fprintf (file, + _("\t[Name Pointer/Ordinal] Table\t%08lx\n"), edt.num_names); + + fprintf (file, + _("Table Addresses\n")); + + fprintf (file, + _("\tExport Address Table \t\t")); + fprintf_vma (file, edt.eat_addr); + fprintf (file, "\n"); + + fprintf (file, + _("\tName Pointer Table \t\t")); + fprintf_vma (file, edt.npt_addr); + fprintf (file, "\n"); + + fprintf (file, + _("\tOrdinal Table \t\t\t")); + fprintf_vma (file, edt.ot_addr); + fprintf (file, "\n"); + + /* The next table to find is the Export Address Table. It's basically + a list of pointers that either locate a function in this dll, or + forward the call to another dll. Something like: + typedef union { + long export_rva; + long forwarder_rva; + } export_address_table_entry; + */ + + fprintf (file, + _("\nExport Address Table -- Ordinal Base %ld\n"), + edt.base); + + for (i = 0; i < edt.num_functions; ++i) + { + bfd_vma eat_member = bfd_get_32 (abfd, + data + edt.eat_addr + (i * 4) - adj); + if (eat_member == 0) + continue; + + if (eat_member - adj <= datasize) + { + /* This rva is to a name (forwarding function) in our section. */ + /* Should locate a function descriptor. */ + fprintf (file, + "\t[%4ld] +base[%4ld] %04lx %s -- %s\n", + (long) i, + (long) (i + edt.base), + (unsigned long) eat_member, + _("Forwarder RVA"), + data + eat_member - adj); + } + else + { + /* Should locate a function descriptor in the reldata section. */ + fprintf (file, + "\t[%4ld] +base[%4ld] %04lx %s\n", + (long) i, + (long) (i + edt.base), + (unsigned long) eat_member, + _("Export RVA")); + } + } + + /* The Export Name Pointer Table is paired with the Export Ordinal Table. */ + /* Dump them in parallel for clarity. */ + fprintf (file, + _("\n[Ordinal/Name Pointer] Table\n")); + + for (i = 0; i < edt.num_names; ++i) + { + bfd_vma name_ptr = bfd_get_32 (abfd, + data + + edt.npt_addr + + (i*4) - adj); + + char *name = (char *) data + name_ptr - adj; + + bfd_vma ord = bfd_get_16 (abfd, + data + + edt.ot_addr + + (i*2) - adj); + fprintf (file, + "\t[%4ld] %s\n", (long) ord, name); + } + + free (data); + + return true; +} + +/* This really is architecture dependent. On IA-64, a .pdata entry + consists of three dwords containing relative virtual addresses that + specify the start and end address of the code range the entry + covers and the address of the corresponding unwind info data. */ + +static boolean +pe_print_pdata (abfd, vfile) + bfd *abfd; + PTR vfile; +{ +#ifdef COFF_WITH_pep +# define PDATA_ROW_SIZE (3*8) +#else +# define PDATA_ROW_SIZE (5*4) +#endif + FILE *file = (FILE *) vfile; + bfd_byte *data = 0; + 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")); +#ifdef COFF_WITH_pep + fprintf (file, + _(" vma:\t\t\tBegin Address End Address Unwind Info\n")); +#else + fprintf (file, + _(" vma:\t\tBegin End EH EH PrologEnd Exception\n")); + fprintf (file, + _(" \t\tAddress Address Handler Data Address Mask\n")); +#endif + + if (bfd_section_size (abfd, section) == 0) + return true; + + data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, section)); + datasize = bfd_section_size (abfd, section); + if (data == NULL && datasize != 0) + return false; + + bfd_get_section_contents (abfd, + section, + (PTR) data, 0, + bfd_section_size (abfd, section)); + + start = 0; + + for (i = start; i < stop; i += onaline) + { + bfd_vma begin_addr; + bfd_vma end_addr; + bfd_vma eh_handler; + bfd_vma eh_data; + bfd_vma prolog_end_addr; + int em_data; + + if (i + PDATA_ROW_SIZE > stop) + break; + + begin_addr = GET_PDATA_ENTRY (abfd, data + i ); + end_addr = GET_PDATA_ENTRY (abfd, data + i + 4); + eh_handler = GET_PDATA_ENTRY (abfd, data + i + 8); + eh_data = GET_PDATA_ENTRY (abfd, data + i + 12); + prolog_end_addr = GET_PDATA_ENTRY (abfd, data + i + 16); + + if (begin_addr == 0 && end_addr == 0 && eh_handler == 0 + && eh_data == 0 && prolog_end_addr == 0) + { + /* We are probably into the padding of the section now. */ + break; + } + + em_data = ((eh_handler & 0x1) << 2) | (prolog_end_addr & 0x3); + eh_handler &= ~(bfd_vma) 0x3; + 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); +#ifndef COFF_WITH_pep + fputc (' ', file); + fprintf_vma (file, eh_data); fputc (' ', file); + fprintf_vma (file, prolog_end_addr); + fprintf (file, " %x", em_data); +#endif + +#ifdef POWERPC_LE_PE + if (eh_handler == 0 && eh_data != 0) + { + /* Special bits here, although the meaning may be a little + mysterious. The only one I know for sure is 0x03. */ + /* Code Significance */ + /* 0x00 None */ + /* 0x01 Register Save Millicode */ + /* 0x02 Register Restore Millicode */ + /* 0x03 Glue Code Sequence */ + switch (eh_data) + { + case 0x01: + fprintf (file, _(" Register save millicode")); + break; + case 0x02: + fprintf (file, _(" Register restore millicode")); + break; + case 0x03: + fprintf (file, _(" Glue code sequence")); + break; + default: + break; + } + } +#endif + fprintf (file, "\n"); + } + + free (data); + + return true; +} + +#define IMAGE_REL_BASED_HIGHADJ 4 +static const char * const tbl[] = { + "ABSOLUTE", + "HIGH", + "LOW", + "HIGHLOW", + "HIGHADJ", + "MIPS_JMPADDR", + "SECTION", + "REL32", + "RESERVED1", + "MIPS_JMPADDR16", + "DIR64", + "HIGH3ADJ" + "UNKNOWN", /* MUST be last */ +}; + +static boolean +pe_print_reloc (abfd, vfile) + bfd *abfd; + PTR vfile; +{ + FILE *file = (FILE *) vfile; + bfd_byte *data = 0; + asection *section = bfd_get_section_by_name (abfd, ".reloc"); + bfd_size_type datasize = 0; + bfd_size_type i; + bfd_size_type start, stop; + + if (section == NULL) + return true; + + if (bfd_section_size (abfd, section) == 0) + return true; + + fprintf (file, + _("\n\nPE File Base Relocations (interpreted .reloc section contents)\n")); + + data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, section)); + datasize = bfd_section_size (abfd, section); + if (data == NULL && datasize != 0) + return false; + + bfd_get_section_contents (abfd, + section, + (PTR) data, 0, + bfd_section_size (abfd, section)); + + start = 0; + + stop = bfd_section_size (abfd, section); + + for (i = start; i < stop;) + { + int j; + bfd_vma virtual_address; + long number, size; + + /* The .reloc section is a sequence of blocks, with a header consisting + of two 32 bit quantities, followed by a number of 16 bit entries */ + + virtual_address = bfd_get_32 (abfd, data+i); + size = bfd_get_32 (abfd, data+i+4); + number = (size - 8) / 2; + + if (size == 0) + { + break; + } + + fprintf (file, + _("\nVirtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"), + (unsigned long) virtual_address, size, size, number); + + for (j = 0; j < number; ++j) + { + unsigned short e = bfd_get_16 (abfd, data + i + 8 + j * 2); + unsigned int t = (e & 0xF000) >> 12; + int off = e & 0x0FFF; + + if (t >= sizeof (tbl) / sizeof (tbl[0])) + t = (sizeof (tbl) / sizeof (tbl[0])) - 1; + + fprintf (file, + _("\treloc %4d offset %4x [%4lx] %s"), + j, off, (long) (off + virtual_address), tbl[t]); + + /* HIGHADJ takes an argument, - the next record *is* the + low 16 bits of addend. */ + if (t == IMAGE_REL_BASED_HIGHADJ) + { + fprintf (file, " (%4x)", + ((unsigned int) + bfd_get_16 (abfd, data + i + 8 + j * 2 + 2))); + j++; + } + + fprintf (file, "\n"); + } + i += size; + } + + free (data); + + return true; +} + +/* Print out the program headers. */ + +boolean +_bfd_XX_print_private_bfd_data_common (abfd, vfile) + bfd *abfd; + PTR vfile; +{ + FILE *file = (FILE *) vfile; + int j; + pe_data_type *pe = pe_data (abfd); + struct internal_extra_pe_aouthdr *i = &pe->pe_opthdr; + const char *subsystem_name = NULL; + + /* The MS dumpbin program reportedly ands with 0xff0f before + printing the characteristics field. Not sure why. No reason to + emulate it here. */ + fprintf (file, _("\nCharacteristics 0x%x\n"), pe->real_flags); +#undef PF +#define PF(x, y) if (pe->real_flags & x) { fprintf (file, "\t%s\n", y); } + PF (F_RELFLG, "relocations stripped"); + PF (F_EXEC, "executable"); + PF (F_LNNO, "line numbers stripped"); + PF (F_LSYMS, "symbols stripped"); + PF (0x80, "little endian"); + PF (F_AR32WR, "32 bit words"); + PF (0x200, "debugging information removed"); + PF (0x1000, "system file"); + PF (F_DLL, "DLL"); + PF (0x8000, "big endian"); +#undef PF + + /* ctime implies '\n'. */ + fprintf (file, "\nTime/Date\t\t%s", ctime (&pe->coff.timestamp)); + fprintf (file, "\nImageBase\t\t"); + fprintf_vma (file, i->ImageBase); + fprintf (file, "\nSectionAlignment\t"); + fprintf_vma (file, i->SectionAlignment); + fprintf (file, "\nFileAlignment\t\t"); + fprintf_vma (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); + fprintf (file, "MinorImageVersion\t%d\n", i->MinorImageVersion); + fprintf (file, "MajorSubsystemVersion\t%d\n", i->MajorSubsystemVersion); + fprintf (file, "MinorSubsystemVersion\t%d\n", i->MinorSubsystemVersion); + fprintf (file, "Win32Version\t\t%08lx\n", i->Reserved1); + fprintf (file, "SizeOfImage\t\t%08lx\n", i->SizeOfImage); + fprintf (file, "SizeOfHeaders\t\t%08lx\n", i->SizeOfHeaders); + fprintf (file, "CheckSum\t\t%08lx\n", i->CheckSum); + switch (i->Subsystem) + { + case IMAGE_SUBSYSTEM_UNKNOWN: + subsystem_name = "unspecified"; + break; + case IMAGE_SUBSYSTEM_NATIVE: + subsystem_name = "NT native"; + break; + case IMAGE_SUBSYSTEM_WINDOWS_GUI: + subsystem_name = "Windows GUI"; + break; + case IMAGE_SUBSYSTEM_WINDOWS_CUI: + subsystem_name = "Windows CUI"; + break; + case IMAGE_SUBSYSTEM_POSIX_CUI: + subsystem_name = "POSIX CUI"; + break; + case IMAGE_SUBSYSTEM_WINDOWS_CE_GUI: + subsystem_name = "Wince CUI"; + break; + case IMAGE_SUBSYSTEM_EFI_APPLICATION: + subsystem_name = "EFI application"; + break; + case IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER: + subsystem_name = "EFI boot service driver"; + break; + case IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER: + subsystem_name = "EFI runtime driver"; + break; + } + fprintf (file, "Subsystem\t\t%08x", i->Subsystem); + if (subsystem_name) + fprintf (file, "\t(%s)", subsystem_name); + fprintf (file, "\nDllCharacteristics\t%08x\n", i->DllCharacteristics); + fprintf (file, "SizeOfStackReserve\t"); + fprintf_vma (file, i->SizeOfStackReserve); + fprintf (file, "\nSizeOfStackCommit\t"); + fprintf_vma (file, i->SizeOfStackCommit); + fprintf (file, "\nSizeOfHeapReserve\t"); + fprintf_vma (file, i->SizeOfHeapReserve); + fprintf (file, "\nSizeOfHeapCommit\t"); + fprintf_vma (file, i->SizeOfHeapCommit); + fprintf (file, "\nLoaderFlags\t\t%08lx\n", i->LoaderFlags); + fprintf (file, "NumberOfRvaAndSizes\t%08lx\n", i->NumberOfRvaAndSizes); + + fprintf (file, "\nThe Data Directory\n"); + for (j = 0; j < IMAGE_NUMBEROF_DIRECTORY_ENTRIES; j++) + { + fprintf (file, "Entry %1x ", j); + fprintf_vma (file, i->DataDirectory[j].VirtualAddress); + fprintf (file, " %08lx ", i->DataDirectory[j].Size); + fprintf (file, "%s\n", dir_names[j]); + } + + pe_print_idata (abfd, vfile); + pe_print_edata (abfd, vfile); + pe_print_pdata (abfd, vfile); + pe_print_reloc (abfd, vfile); + + return true; +} + +/* Copy any private info we understand from the input bfd + to the output bfd. */ + +boolean +_bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd) + bfd *ibfd, *obfd; +{ + /* One day we may try to grok other private data. */ + if (ibfd->xvec->flavour != bfd_target_coff_flavour + || obfd->xvec->flavour != bfd_target_coff_flavour) + return true; + + pe_data (obfd)->pe_opthdr = pe_data (ibfd)->pe_opthdr; + pe_data (obfd)->dll = pe_data (ibfd)->dll; + + /* for strip: if we removed .reloc, we'll make a real mess of things + if we don't remove this entry as well. */ + if (! pe_data (obfd)->has_reloc_section) + { + pe_data (obfd)->pe_opthdr.DataDirectory[5].VirtualAddress = 0; + pe_data (obfd)->pe_opthdr.DataDirectory[5].Size = 0; + } + return true; +} + +/* Copy private section data. */ +boolean +_bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec) + bfd *ibfd; + asection *isec; + bfd *obfd; + asection *osec; +{ + if (bfd_get_flavour (ibfd) != bfd_target_coff_flavour + || bfd_get_flavour (obfd) != bfd_target_coff_flavour) + return true; + + if (coff_section_data (ibfd, isec) != NULL + && pei_section_data (ibfd, isec) != NULL) + { + if (coff_section_data (obfd, osec) == NULL) + { + osec->used_by_bfd = + (PTR) bfd_zalloc (obfd, sizeof (struct coff_section_tdata)); + if (osec->used_by_bfd == NULL) + return false; + } + if (pei_section_data (obfd, osec) == NULL) + { + coff_section_data (obfd, osec)->tdata = + (PTR) bfd_zalloc (obfd, sizeof (struct pei_section_tdata)); + if (coff_section_data (obfd, osec)->tdata == NULL) + return false; + } + pei_section_data (obfd, osec)->virt_size = + pei_section_data (ibfd, isec)->virt_size; + pei_section_data (obfd, osec)->pe_flags = + pei_section_data (ibfd, isec)->pe_flags; + } + + return true; +} + +void +_bfd_XX_get_symbol_info (abfd, symbol, ret) + bfd *abfd; + asymbol *symbol; + symbol_info *ret; +{ + coff_get_symbol_info (abfd, symbol, ret); +#if 0 /* This code no longer appears to be necessary. + ImageBase has already been added in by coff_swap_scnhdr_in. */ + if (pe_data (abfd) != NULL + && ((symbol->flags & BSF_DEBUGGING) == 0 + || (symbol->flags & BSF_DEBUGGING_RELOC) != 0) + && ! bfd_is_abs_section (symbol->section)) + ret->value += pe_data (abfd)->pe_opthdr.ImageBase; +#endif +} + +/* Handle the .idata section and other things that need symbol table + access. */ + +boolean +_bfd_XXi_final_link_postscript (abfd, pfinfo) + bfd *abfd; + struct coff_final_link_info *pfinfo; +{ + struct coff_link_hash_entry *h1; + struct bfd_link_info *info = pfinfo->info; + + /* There are a few fields that need to be filled in now while we + have symbol table access. + + The .idata subsections aren't directly available as sections, but + they are in the symbol table, so get them from there. */ + + /* The import directory. This is the address of .idata$2, with size + of .idata$2 + .idata$3. */ + h1 = coff_link_hash_lookup (coff_hash_table (info), + ".idata$2", false, false, true); + if (h1 != NULL) + { + pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress = + (h1->root.u.def.value + + h1->root.u.def.section->output_section->vma + + h1->root.u.def.section->output_offset); + h1 = coff_link_hash_lookup (coff_hash_table (info), + ".idata$4", false, false, true); + pe_data (abfd)->pe_opthdr.DataDirectory[1].Size = + ((h1->root.u.def.value + + h1->root.u.def.section->output_section->vma + + h1->root.u.def.section->output_offset) + - pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress); + + /* The import address table. This is the size/address of + .idata$5. */ + h1 = coff_link_hash_lookup (coff_hash_table (info), + ".idata$5", false, false, true); + pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress = + (h1->root.u.def.value + + h1->root.u.def.section->output_section->vma + + h1->root.u.def.section->output_offset); + h1 = coff_link_hash_lookup (coff_hash_table (info), + ".idata$6", false, false, true); + pe_data (abfd)->pe_opthdr.DataDirectory[12].Size = + ((h1->root.u.def.value + + h1->root.u.def.section->output_section->vma + + h1->root.u.def.section->output_offset) + - pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress); + } + + /* If we couldn't find idata$2, we either have an excessively + trivial program or are in DEEP trouble; we have to assume trivial + program.... */ + return true; +} diff --git a/contrib/binutils/bfd/po/Make-in b/contrib/binutils/bfd/po/Make-in index 0552db1..2414748 100644 --- a/contrib/binutils/bfd/po/Make-in +++ b/contrib/binutils/bfd/po/Make-in @@ -46,10 +46,16 @@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = cat-id-tbl.c POFILES = @POFILES@ GMOFILES = @GMOFILES@ -DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ +DISTFILES = ChangeLog Makefile.in.in SRC-POTFILES.in BLD-POTFILES.in $(PACKAGE).pot \ stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) -POTFILES = \ +# Note - the following line gets processed by bfd/configure and amended +# to contain the full list of source dir POTFILES. +SRC-POTFILES = \ + +# Note - the following line gets processed by bfd/configure and amended +# to contain the full list of build dir POTFILES. +BLD-POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ @@ -82,10 +88,17 @@ all: all-@USE_NLS@ all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot all-no: -$(srcdir)/$(PACKAGE).pot: $(POTFILES) - $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ +$(srcdir)/$(PACKAGE).pot: $(SRC-POTFILES) $(BLD-POTFILES) + $(XGETTEXT) --default-domain=$(PACKAGE) \ + --directory=$(top_srcdir) \ + --add-comments --keyword=_ --keyword=N_ \ + --files-from=$(srcdir)/SRC-POTFILES.in + $(XGETTEXT) --default-domain=$(PACKAGE) \ + --directory=.. \ + --directory=. \ --add-comments --keyword=_ --keyword=N_ \ - --files-from=$(srcdir)/POTFILES.in + --join-existing \ + --files-from=$(srcdir)/BLD-POTFILES.in rm -f $(srcdir)/$(PACKAGE).pot mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot @@ -191,7 +204,8 @@ mostlyclean: clean: mostlyclean distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m + rm -f Makefile Makefile.in *.mo *.msg *.cat *.cat.m + rm -f SRC-POTFILES BLD-POTFILES SRC-POTFILES.in BLD-POTFILES.in maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @@ -225,23 +239,48 @@ update-po: Makefile fi; \ done -POTFILES: POTFILES.in +SRC-POTFILES: SRC-POTFILES.in ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ rm -f $@-t $@ \ - && (sed -e '/^#/d' -e '/^[ ]*$$/d' \ + && (sed -e '/^#/d' \ + -e '/^[ ]*$$/d' \ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ | sed -e '$$s/\\$$//') > $@-t \ && chmod a-w $@-t \ && mv $@-t $@ ) -POTFILES.in: @MAINT@ ../Makefile - cd .. && $(MAKE) po/POTFILES.in +BLD-POTFILES: BLD-POTFILES.in + ( rm -f $@-t $@ \ + && (sed -e '/^#/d' \ + -e '/^[ ]*$$/d' \ + -e "s@.*@ ../& \\\\@" < $(srcdir)/$@.in \ + | sed -e '$$s/\\$$//') > $@-t \ + && chmod a-w $@-t \ + && mv $@-t $@ ) + +SRC-POTFILES.in: @MAINT@ ../Makefile + cd .. && $(MAKE) po/SRC-POTFILES.in -Makefile: Make-in ../config.status POTFILES +BLD-POTFILES.in: @MAINT@ ../Makefile + cd .. && $(MAKE) po/BLD-POTFILES.in + +# Note - The presence of SRC-POTFILES and BLD-POTFILES as dependencies +# here breaks the implementation of the 'distclean' rule for maintainers. +# This is because if 'make distclean' is run in the BFD directory, the +# Makefile there will be deleted before 'distclean' is made here, and so +# the dependency SRC-POTFILES -> SRC-POTFILES.in -> ../Makefile cannot +# be satisfied. +# +# The SRC-POTFILES and BLD-POTFILES dependencies cannot be removed, +# however since it is necessary that these files be built during +# *configure* time, so that configure can insert them into the +# po/Makefile that it is creating, so that the Makefile will have +# the correct dependencies. +Makefile: Make-in ../config.status SRC-POTFILES BLD-POTFILES cd .. \ && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/contrib/binutils/bfd/ppcboot.c b/contrib/binutils/bfd/ppcboot.c index d92a0a6..b2250a0 100644 --- a/contrib/binutils/bfd/ppcboot.c +++ b/contrib/binutils/bfd/ppcboot.c @@ -1,5 +1,6 @@ /* BFD back-end for PPCbug boot records. - Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. Written by Michael Meissner, Cygnus Support, This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/ptrace-core.c b/contrib/binutils/bfd/ptrace-core.c index 2c19f6d..704391a 100644 --- a/contrib/binutils/bfd/ptrace-core.c +++ b/contrib/binutils/bfd/ptrace-core.c @@ -1,5 +1,6 @@ /* BFD backend for core files which use the ptrace_user structure - Copyright 1993, 94, 95, 96, 1998 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001 + 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/contrib/binutils/bfd/reloc.c b/contrib/binutils/bfd/reloc.c index f37a6a9..1c45f6f 100644 --- a/contrib/binutils/bfd/reloc.c +++ b/contrib/binutils/bfd/reloc.c @@ -1,5 +1,6 @@ /* BFD support for handling relocation entries. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -1799,7 +1800,11 @@ ENUMX ENUMX BFD_RELOC_SPARC_RELATIVE ENUMX + BFD_RELOC_SPARC_UA16 +ENUMX BFD_RELOC_SPARC_UA32 +ENUMX + BFD_RELOC_SPARC_UA64 ENUMDOC SPARC ELF relocations. There is probably some overlap with other relocation types already defined. @@ -2036,6 +2041,28 @@ ENUMX BFD_RELOC_MIPS_GOT_OFST ENUMX BFD_RELOC_MIPS_GOT_DISP +ENUMX + BFD_RELOC_MIPS_SHIFT5 +ENUMX + BFD_RELOC_MIPS_SHIFT6 +ENUMX + BFD_RELOC_MIPS_INSERT_A +ENUMX + BFD_RELOC_MIPS_INSERT_B +ENUMX + BFD_RELOC_MIPS_DELETE +ENUMX + BFD_RELOC_MIPS_HIGHEST +ENUMX + BFD_RELOC_MIPS_HIGHER +ENUMX + BFD_RELOC_MIPS_SCN_DISP +ENUMX + BFD_RELOC_MIPS_REL16 +ENUMX + BFD_RELOC_MIPS_RELGOT +ENUMX + BFD_RELOC_MIPS_JALR COMMENT ENUMDOC MIPS ELF relocations. diff --git a/contrib/binutils/bfd/reloc16.c b/contrib/binutils/bfd/reloc16.c index cb9636f..7de8d95 100644 --- a/contrib/binutils/bfd/reloc16.c +++ b/contrib/binutils/bfd/reloc16.c @@ -1,5 +1,5 @@ /* 8 and 16 bit COFF relocation functions, for BFD. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/contrib/binutils/bfd/sco5-core.c b/contrib/binutils/bfd/sco5-core.c index 5d5677e..62f9c98 100644 --- a/contrib/binutils/bfd/sco5-core.c +++ b/contrib/binutils/bfd/sco5-core.c @@ -1,5 +1,5 @@ /* BFD back end for SCO5 core files (U-area and raw sections) - Copyright 1998 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. Written by Jouke Numan This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/section.c b/contrib/binutils/bfd/section.c index 13e10d3..fc03ce9 100644 --- a/contrib/binutils/bfd/section.c +++ b/contrib/binutils/bfd/section.c @@ -1,5 +1,6 @@ /* Object file "section" support for the BFD library. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -362,6 +363,10 @@ CODE_FRAGMENT . {* A mark flag used by some of the linker backends. *} . unsigned int linker_mark : 1; . +. {* Another mark flag used by some of the linker backends. Set for +. output sections that have a input section. *} +. unsigned int linker_has_input : 1; +. . {* A mark flag used by some linker backends for garbage collection. *} . unsigned int gc_mark : 1; . @@ -564,11 +569,14 @@ static const asymbol global_syms[] = /* name, id, index, next, flags, user_set_vma, reloc_done, */ \ { NAME, IDX, 0, NULL, FLAGS, 0, 0, \ \ - /* linker_mark, gc_mark, segment_mark, vma, lma, _cooked_size, */ \ - 0, 1, 0, 0, 0, 0, \ + /* linker_mark, linker_has_input, gc_mark, segment_mark, */ \ + 0, 0, 1, 0, \ + \ + /* vma, lma, _cooked_size, _raw_size, */ \ + 0, 0, 0, 0, \ \ - /* _raw_size, output_offset, output_section, alignment_power, */ \ - 0, 0, (struct sec *) &SEC, 0, \ + /* output_offset, output_section, alignment_power, */ \ + 0, (struct sec *) &SEC, 0, \ \ /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \ NULL, NULL, 0, 0, 0, \ @@ -1203,6 +1211,11 @@ _bfd_strip_section_from_output (info, s) orders have not yet been set up. So why are we checking them? -- Ian */ os = s->output_section; + + /* Handle a section that wasn't output. */ + if (os == NULL) + return; + for (p = os->link_order_head, pp = NULL; p != NULL; pp = p, p = p->next) if (p->type == bfd_indirect_link_order && p->u.indirect.section == s) diff --git a/contrib/binutils/bfd/sparclinux.c b/contrib/binutils/bfd/sparclinux.c index 57bf6c6..b877018 100644 --- a/contrib/binutils/bfd/sparclinux.c +++ b/contrib/binutils/bfd/sparclinux.c @@ -1,5 +1,5 @@ /* BFD back-end for linux flavored sparc a.out binaries. - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/sparcnetbsd.c b/contrib/binutils/bfd/sparcnetbsd.c index c21f063..9cb9637 100644 --- a/contrib/binutils/bfd/sparcnetbsd.c +++ b/contrib/binutils/bfd/sparcnetbsd.c @@ -1,5 +1,6 @@ /* BFD back-end for NetBSD/sparc a.out-ish binaries. - Copyright (C) 1990, 91, 92, 94, 95, 97, 1998 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1994, 1995, 1997, 1998, 2000 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/srec.c b/contrib/binutils/bfd/srec.c index 5602239..33dfaa7 100644 --- a/contrib/binutils/bfd/srec.c +++ b/contrib/binutils/bfd/srec.c @@ -1,5 +1,6 @@ /* BFD back-end for s-record objects. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support . diff --git a/contrib/binutils/bfd/stab-syms.c b/contrib/binutils/bfd/stab-syms.c index 4b0827f..a685e31 100644 --- a/contrib/binutils/bfd/stab-syms.c +++ b/contrib/binutils/bfd/stab-syms.c @@ -1,5 +1,6 @@ /* Table of stab names for the BFD library. - Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. + Copyright 1990, 1991, 1992, 1994, 1995, 1996, 2000 + Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/stabs.c b/contrib/binutils/bfd/stabs.c index eb9ce8a..15b1af5 100644 --- a/contrib/binutils/bfd/stabs.c +++ b/contrib/binutils/bfd/stabs.c @@ -1,5 +1,5 @@ /* Stabs in sections linking support. - Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/syms.c b/contrib/binutils/bfd/syms.c index 8f4c92f..311806e 100644 --- a/contrib/binutils/bfd/syms.c +++ b/contrib/binutils/bfd/syms.c @@ -1,5 +1,6 @@ /* Generic symbol-table support for the BFD library. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000 Free Software Foundation, Inc. Written by Cygnus Support. diff --git a/contrib/binutils/bfd/sysdep.h b/contrib/binutils/bfd/sysdep.h index e344eaf..bab1c51 100644 --- a/contrib/binutils/bfd/sysdep.h +++ b/contrib/binutils/bfd/sysdep.h @@ -1,5 +1,6 @@ /* sysdep.h -- handle host dependencies for the BFD library - Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/bfd/targets.c b/contrib/binutils/bfd/targets.c index 8f831f0..cfbe6ad 100644 --- a/contrib/binutils/bfd/targets.c +++ b/contrib/binutils/bfd/targets.c @@ -1,5 +1,6 @@ /* Generic target-file-type support for the BFD library. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -560,6 +561,8 @@ extern const bfd_target bfd_elf64_ia64_big_vec; extern const bfd_target bfd_elf64_ia64_little_vec; extern const bfd_target bfd_elf64_little_generic_vec; extern const bfd_target bfd_elf64_littlemips_vec; +extern const bfd_target bfd_elf64_tradbigmips_vec; +extern const bfd_target bfd_elf64_tradlittlemips_vec; extern const bfd_target bfd_elf64_sparc_vec; extern const bfd_target bfd_elf64_x86_64_vec; extern const bfd_target bfd_powerpc_pe_vec; @@ -682,7 +685,7 @@ extern const bfd_target sco5_core_vec; extern const bfd_target trad_core_vec; extern const bfd_target ptrace_core_vec; -const bfd_target * const bfd_target_vector[] = { +static const bfd_target * const _bfd_target_vector[] = { #ifdef SELECT_VECS @@ -762,18 +765,21 @@ const bfd_target * const bfd_target_vector[] = { &bfd_elf32_m68hc12_vec, &bfd_elf32_m68k_vec, &bfd_elf32_m88k_vec, - &bfd_elf32_sparc_vec, &bfd_elf32_pj_vec, &bfd_elf32_pjl_vec, &bfd_elf32_powerpc_vec, &bfd_elf32_powerpcle_vec, + &bfd_elf32_sparc_vec, &bfd_elf32_v850_vec, &bfd_elf32_fr30_vec, &bfd_elf32_mcore_big_vec, &bfd_elf32_mcore_little_vec, &bfd_elf32_tradbigmips_vec, &bfd_elf32_tradlittlemips_vec, -#ifdef BFD64 /* No one seems to use this. */ +#ifdef BFD64 + &bfd_elf64_tradbigmips_vec, + &bfd_elf64_tradlittlemips_vec, + /* No one seems to use this. */ &bfd_elf64_big_generic_vec, &bfd_elf64_little_generic_vec, #endif @@ -971,6 +977,7 @@ const bfd_target * const bfd_target_vector[] = { NULL /* end of list marker */ }; +const bfd_target * const *bfd_target_vector = _bfd_target_vector; /* bfd_default_vector[0] contains either the address of the default vector, if there is one, or zero if there isn't. */ @@ -985,7 +992,7 @@ const bfd_target *bfd_default_vector[] = { /* When there is an ambiguous match, bfd_check_format_matches puts the names of the matching targets in an array. This variable is the maximum number of entries that the array could possibly need. */ -const size_t _bfd_target_vector_entries = sizeof (bfd_target_vector)/sizeof (*bfd_target_vector); +const size_t _bfd_target_vector_entries = sizeof (_bfd_target_vector)/sizeof (*_bfd_target_vector); /* This array maps configuration triplets onto BFD vectors. */ diff --git a/contrib/binutils/bfd/tekhex.c b/contrib/binutils/bfd/tekhex.c index e5fa95a..ccfe7d8 100644 --- a/contrib/binutils/bfd/tekhex.c +++ b/contrib/binutils/bfd/tekhex.c @@ -1,5 +1,5 @@ /* BFD backend for Extended Tektronix Hex Format objects. - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support . diff --git a/contrib/binutils/bfd/trad-core.c b/contrib/binutils/bfd/trad-core.c index 194da15..872ad54 100644 --- a/contrib/binutils/bfd/trad-core.c +++ b/contrib/binutils/bfd/trad-core.c @@ -1,5 +1,6 @@ /* BFD back end for traditional Unix core files (U-area and raw sections) - Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 99, 2000 + Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, + 2000 Free Software Foundation, Inc. Written by John Gilmore of Cygnus Support. diff --git a/contrib/binutils/binutils/ChangeLog b/contrib/binutils/binutils/ChangeLog index 37b784a..aefa36e 100644 --- a/contrib/binutils/binutils/ChangeLog +++ b/contrib/binutils/binutils/ChangeLog @@ -1,3 +1,118 @@ +2001-06-11 Alan Modra + + Merge from mainline. + 2001-02-27 Alan Modra + * configure.in (BFD_VERSION): New. + (AM_INIT_AUTOMAKE): Use $BFD_VERSION. + * configure: Regenerate. + + 2001-04-27 Michal Svec + * strings.c (isgraphic): Do not use isascii() unless it is needed + for isprint() to work. + (main): Set the locale domain to LC_ALL not just LC_MESSAGES. + + 2001-04-10 Alan Modra + * nm.c (print_symbol_info_bsd): Use a simple printf string. + + 2001-02-07 Todd Vierling + * bucomm.c (bfd_target_vector): Change extern array to pointer. + * objdump.c (bfd_target_vector): Likewise. + +2001-06-10 Philip Blundell + + * configure.in: Set version to 2.11.1. + * configure: Regenerate. + +2001-06-09 Alan Modra + + * NEWS: Mention hppa64-elf. Add binutils-2.11 marker. + + * MAINTAINERS: Replace with mainline version. + +2001-06-07 Alan Modra + + * Most files: Update copyright notices. + +2001-05-30 Honda Hiroki + + * objcopy.c: Add new switches: --keep-global-symbol, + --keep-symbols, --localize-symbols, --keep-global-symbols and + --weaken-symbols. + * binutils.texi: Document new switches. + * objcopy.1: Regenerate. + * NEWS: Announce new feature. + +2001-05-28 Philip Blundell + + From 2001-05-28 Andreas Jaeger + * readelf.c (display_debug_frames): Fix warnings: Remove unused + variables, fix format strings. + + From 2001-05-16 Richard Henderson + * readelf.c (do_debug_frames_interp): New. + (byte_get_little_endian): If BFD64, always read entire 8-byte fields. + (byte_get_big_endian): Likewise. + (parse_args) ['F']: Set do_debug_frames_interp. + (Frame_Chunk): Make data_factor signed, add fde_encoding. + (frame_display_row): Don't trunc pc_begin to int. + (size_of_encoded_value): New. + (display_debug_frames): Handle 64-bit targets. Print raw data + unless do_debug_frames_interp. + (debug_displays): Remove duplicate .debug_frame. + + From 2001-05-15 Ralf Baechle + * readelf.c: Replace uses of EM_MIPS_RS4_BE with EM_MIPS_RS3_LE. + The former constant was never in active use and is used otherwise + by the ABI. + + From 2001-05-11 Jakub Jelinek + * readelf.c (process_unwind): Print all unwind sections, not just + one. + + From 2001-05-07 Thiemo Seufer + * readelf.c (process_unwind): Remove const specifier. + + From 2001-03-30 H.J. Lu + * readelf.c (process_unwind): Just return if do_unwind is 0. + + From 2001-03-29 H.J. Lu + * readelf.c (process_unwind): Only do unwind sections for + IA64. + + From 2001-02-28 Nick Clifton + * readelf.c: (struct unw_aux_info): Remove const modifier for + 'strtab' field. + (process_unwind): Remove non-K&R compliant LHS type cast in call + to GET_DATA_ALLOC macro. + + From 2001-02-11 Michael Sokolov + * readelf.c (struct unw_aux_info): Remove const from the info member. + (process_unwind): Don't type-cast the third argument to the + GET_DATA_ALLOC macro. + + From 2001-02-11 Nick Clifton + * readelf.c (dump_relocations): Free corrected allocated + array. + (process_unwind): Fix compile time warning. + + From 2001-02-07 David Mosberger + * readelf.c (process_unwind): New function. + (slurp_ia64_unwind_table): Ditto. + (dump_ia64_unwind): Ditto. + (find_symbol_for_address): Ditto. + (slurp_rela_relocs): New function (split off from dump_relocations()). + (slurp_rel_relocs): Ditto. + (parse_args): Handle '-u' option. + * unwind-ia64.c: New file. + * unwind-ia64.h: New file. + * Makefile.am: Include unwind-ia64.c in readelf build. + * Makefile.in: Regenerate. + * po/binutils.pot: Regenerate. + +2001-04-06 Hans-Peter Nilsson + + * readelf.c (display_debug_lines): Fix typo for "Prologue". + 2001-03-16 Philip Blundell * configure: Regenerate. @@ -352,15 +467,15 @@ Mon Dec 11 14:30:21 MET 2000 Jan Hubicka 2000-07-20 H.J. Lu - * binutils/binutils.texi: Put back "@end table" deleted by + * binutils.texi: Put back "@end table" deleted by accident. 2000-07-05 Kenneth Block - * binutils/nm.c: Add optional style to demangle switch. - * binutils/objdump.c: Add optional style to demangle switch. - * binutils/addr2line.c: Add optional style to demangle switch. - * binutils/binutils.texi: Document optional style to demangle + * nm.c: Add optional style to demangle switch. + * objdump.c: Add optional style to demangle switch. + * addr2line.c: Add optional style to demangle switch. + * binutils.texi: Document optional style to demangle switch. 2000-07-20 Hans-Peter Nilsson @@ -673,7 +788,7 @@ Fri Apr 21 13:20:53 2000 Richard Henderson 2000-04-10 Philippe De Muyter - * readelf (dynamic_segment_mips_val): Call `sprintf', not + * readelf.c (dynamic_segment_mips_val): Call `sprintf', not `strftime' since strftime is not available on all systems. (process_mips_specific): Ditto. @@ -926,7 +1041,7 @@ Fri Apr 7 15:56:57 2000 Andrew Cagney * configure.in: Add arm-wince, mips-pe and sh-pe targets. * configure: Regenerate. - * dlltoolc.: Add support for sh-pe and mips-pe targets. + * dlltool.c: Add support for sh-pe and mips-pe targets. * rescoff.c: Add support for sh-pe and mips-pe targets. 2000-02-23 H.J. Lu @@ -971,7 +1086,7 @@ Fri Apr 7 15:56:57 2000 Andrew Cagney 2000-02-03 Timothy Wall - * binutils/objdump.c (dump_section_header, find_symbol_for_address, + * objdump.c (dump_section_header, find_symbol_for_address, show_line, disassemble_bytes, disassemble_data, dump_data): distinguish between octets and bytes. diff --git a/contrib/binutils/binutils/MAINTAINERS b/contrib/binutils/binutils/MAINTAINERS index 427dd3a..9c44f77 100644 --- a/contrib/binutils/binutils/MAINTAINERS +++ b/contrib/binutils/binutils/MAINTAINERS @@ -6,6 +6,9 @@ gas, gprof, ld, and opcodes subdirectories. The home page for binutils is http://sources.redhat.com/binutils/ and patches should be sent to binutils@sources.redhat.com with "[patch]" as part of the subject. +Note - patches to the top level configure.in and config.sub scripts +should be sent to config-patches@gnu.org and not to the binutils list. + --------- Blanket Write Privs --------- Nick Clifton (head maintainer) @@ -14,7 +17,7 @@ Ian Taylor Jeff Law Jim Wilson DJ Delorie -Alan Modra +Alan Modra Michael Meissner --------- Maintainers --------- @@ -33,10 +36,10 @@ other maintainers. ARM Nick Clifton AVR Denis Chertykov CRIS Hans-Peter Nilsson -HPPA elf32 Alan Modra +HPPA elf32 Alan Modra IA64 Jim Wilson i860 Jason Eckhardt -ix86 Alan Modra +ix86 Alan Modra ix86 COFF,PE DJ Delorie ix86 H.J.Lu ix86 INTEL MODE Diego Novillo @@ -76,3 +79,14 @@ one of the above lists (blanket write or maintainers). [It's a huge list, folks. You know who you are. If you have the *ability* to do binutils checkins, you're in this group. Just remember to get approval before checking anything in.] + + ------------- Obvious Fixes ------------- + +Fixes for obvious mistakes do not need approval, and can be checked in +right away, but the patch should still be sent to the binutils list. +The definition of obvious is a bit hazy, and if you are not sure, then +you should seek approval first. Obvious fixes include fixes for +spelling mistakes, blatantly incorrect code (where the correct code is +also blatantly obvious), and so on. Obvious fixes should always be +small, the larger they are, the more likely it is that they contain +some un-obvious side effect or consequence. diff --git a/contrib/binutils/binutils/Makefile.am b/contrib/binutils/binutils/Makefile.am index 1ddf2f7..d0adea0 100644 --- a/contrib/binutils/binutils/Makefile.am +++ b/contrib/binutils/binutils/Makefile.am @@ -161,7 +161,7 @@ objcopy_SOURCES = objcopy.c not-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS) strings_SOURCES = strings.c $(BULIBS) -readelf_SOURCES = readelf.c version.c +readelf_SOURCES = readelf.c version.c unwind-ia64.c readelf_LDADD = $(INTLLIBS) $(LIBIBERTY) strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS) diff --git a/contrib/binutils/binutils/Makefile.in b/contrib/binutils/binutils/Makefile.in index 1b2a296..c6dd977 100644 --- a/contrib/binutils/binutils/Makefile.in +++ b/contrib/binutils/binutils/Makefile.in @@ -253,7 +253,7 @@ objcopy_SOURCES = objcopy.c not-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS) strings_SOURCES = strings.c $(BULIBS) -readelf_SOURCES = readelf.c version.c +readelf_SOURCES = readelf.c version.c unwind-ia64.c readelf_LDADD = $(INTLLIBS) $(LIBIBERTY) strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS) @@ -394,7 +394,8 @@ version.$(OBJEXT) filemode.$(OBJEXT) addr2line_LDADD = $(LDADD) addr2line_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a addr2line_LDFLAGS = -readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) +readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) \ +unwind-ia64.$(OBJEXT) readelf_DEPENDENCIES = ../libiberty/libiberty.a readelf_LDFLAGS = nm_new_OBJECTS = nm.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \ @@ -437,7 +438,7 @@ configure.in deflex.c defparse.c nlmheader.c rclex.c rcparse.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(nlmconv_SOURCES) $(srconv_SOURCES) $(sysdump_SOURCES) $(coffdump_SOURCES) $(dlltool_SOURCES) $(windres_SOURCES) $(dllwrap_SOURCES) $(size_SOURCES) $(objdump_SOURCES) $(ar_SOURCES) $(strings_SOURCES) $(ranlib_SOURCES) $(objcopy_SOURCES) $(addr2line_SOURCES) $(readelf_SOURCES) $(nm_new_SOURCES) $(strip_new_SOURCES) $(cxxfilt_SOURCES) OBJECTS = $(nlmconv_OBJECTS) $(srconv_OBJECTS) $(sysdump_OBJECTS) $(coffdump_OBJECTS) $(dlltool_OBJECTS) $(windres_OBJECTS) $(dllwrap_OBJECTS) $(size_OBJECTS) $(objdump_OBJECTS) $(ar_OBJECTS) $(strings_OBJECTS) $(ranlib_OBJECTS) $(objcopy_OBJECTS) $(addr2line_OBJECTS) $(readelf_OBJECTS) $(nm_new_OBJECTS) $(strip_new_OBJECTS) $(cxxfilt_OBJECTS) diff --git a/contrib/binutils/binutils/NEWS b/contrib/binutils/binutils/NEWS index 62f858f..fd07a6d 100644 --- a/contrib/binutils/binutils/NEWS +++ b/contrib/binutils/binutils/NEWS @@ -1,5 +1,11 @@ -*- text -*- +* New command line switches added to objcopy to allow symbols to be kept as + global symbols, and also to specify files containing lists of such symbols. + by Honda Hiroki. + +Changes in binutils 2.11: + * Add support for ARM v5t and v5te architectures and Intel's XScale ARM extenstions. @@ -14,6 +20,8 @@ Changes in binutils 2.10: +* Support for 64-bit ELF on HPPA. + * New command line switch to objdump --file-start-context which shows the entire file contents up to the source line first encountered for a given file. diff --git a/contrib/binutils/binutils/aclocal.m4 b/contrib/binutils/binutils/aclocal.m4 index 37c162a..32e6c1f 100644 --- a/contrib/binutils/binutils/aclocal.m4 +++ b/contrib/binutils/binutils/aclocal.m4 @@ -27,23 +27,6 @@ AC_DEFUN([CY_WITH_NLS],) AC_SUBST(INTLLIBS) ]) -#serial 1 -# This test replaces the one in autoconf. -# Currently this macro should have the same name as the autoconf macro -# because gettext's gettext.m4 (distributed in the automake package) -# still uses it. Otherwise, the use in gettext.m4 makes autoheader -# give these diagnostics: -# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX -# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX - -undefine([AC_ISC_POSIX]) - -AC_DEFUN(AC_ISC_POSIX, - [ - dnl This test replaces the obsolescent AC_ISC_POSIX kludge. - AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) - ] -) dnl AM_PROG_LEX diff --git a/contrib/binutils/binutils/addr2line.c b/contrib/binutils/binutils/addr2line.c index ef01f47..daae503 100644 --- a/contrib/binutils/binutils/addr2line.c +++ b/contrib/binutils/binutils/addr2line.c @@ -1,5 +1,5 @@ /* addr2line.c -- convert addresses to line number and function name - Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Ulrich Lauther This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/ar.c b/contrib/binutils/binutils/ar.c index fe5709f..996476c 100644 --- a/contrib/binutils/binutils/ar.c +++ b/contrib/binutils/binutils/ar.c @@ -1,5 +1,5 @@ /* ar.c - Archive modify and extract. - Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/arlex.l b/contrib/binutils/binutils/arlex.l index 2fd94da..71ef56e 100644 --- a/contrib/binutils/binutils/arlex.l +++ b/contrib/binutils/binutils/arlex.l @@ -1,7 +1,7 @@ %{ /* arlex.l - Strange script language lexer */ -/* Copyright (C) 1992, 95, 1997 Free Software Foundation, Inc. +/* Copyright 1992, 1997, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/arparse.y b/contrib/binutils/binutils/arparse.y index a5e90fa..a03c2c4 100644 --- a/contrib/binutils/binutils/arparse.y +++ b/contrib/binutils/binutils/arparse.y @@ -1,7 +1,7 @@ %{ /* arparse.y - Stange script language parser */ -/* Copyright (C) 1992, 93, 95, 97, 98, 1999 Free Software Foundation, Inc. +/* Copyright 1992, 1993, 1995, 1997, 1999 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/arsup.c b/contrib/binutils/binutils/arsup.c index eebee99..0058c0d 100644 --- a/contrib/binutils/binutils/arsup.c +++ b/contrib/binutils/binutils/arsup.c @@ -1,5 +1,5 @@ /* arsup.c - Archive support for MRI compatibility - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1992, 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/arsup.h b/contrib/binutils/binutils/arsup.h index f54a34b..26538be 100644 --- a/contrib/binutils/binutils/arsup.h +++ b/contrib/binutils/binutils/arsup.h @@ -1,5 +1,5 @@ /* arsup.h - archive support header file - Copyright 1992 Free Software Foundation, Inc. + Copyright 1992, 1993, 1994, 1996 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/binutils.texi b/contrib/binutils/binutils/binutils.texi index 4114663..9fc11bc 100644 --- a/contrib/binutils/binutils/binutils.texi +++ b/contrib/binutils/binutils/binutils.texi @@ -877,6 +877,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ] [ -S | --strip-all ] [ -g | --strip-debug ] [ -K @var{symbolname} | --keep-symbol=@var{symbolname} ] [ -N @var{symbolname} | --strip-symbol=@var{symbolname} ] + [ -G @var{symbolname} | --keep-global-symbol=@var{symbolname}] [ -L @var{symbolname} | --localize-symbol=@var{symbolname} ] [ -W @var{symbolname} | --weaken-symbol=@var{symbolname} ] [ -x | --discard-all ] [ -X | --discard-locals ] @@ -897,6 +898,11 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ] [ --change-leading-char ] [ --remove-leading-char ] [ --srec-len=@var{ival} ] [ --srec-forceS3 ] [ --redefine-sym @var{old}=@var{new} ] [ --weaken ] + [ --keep-symbols=@var{filename} ] + [ --strip-symbols=@var{filename} ] + [ --keep-global-symbols=@var{filename} ] + [ --localize-symbols=@var{filename} ] + [ --weaken-symbols=@var{filename} ] [ -v | --verbose ] [ -V | --version ] [ --help ] @var{infile} [@var{outfile}] @end smallexample @@ -993,6 +999,12 @@ be given more than once. Do not copy symbol @var{symbolname} from the source file. This option may be given more than once. +@item -G @var{symbolname} +@itemx --keep-global-symbol=@var{symbolname} +Keep only symbol @var{symbolname} global. Make all other symbols local +to the file, so that they are not visible externally. This option may +be given more than once. + @item -L @var{symbolname} @itemx --localize-symbol=@var{symbolname} Make symbol @var{symbolname} local to the file, so that it is not @@ -1176,6 +1188,36 @@ when building an object which will be linked against other objects using the @code{-R} option to the linker. This option is only effective when using an object file format which supports weak symbols. +@item --keep-symbols=@var{filename} +Apply @samp{--keep-symbol} option to each symbol listed in the file +@var{filename}. @var{filename} is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. + +@item --strip-symbols=@var{filename} +Apply @samp{--strip-symbol} option to each symbol listed in the file +@var{filename}. @var{filename} is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. + +@item --keep-global-symbols=@var{filename} +Apply @samp{--keep-global-symbol} option to each symbol listed in the +file @var{filename}. @var{filename} is simply a flat file, with one +symbol name per line. Line comments may be introduced by the hash +character. This option may be given more than once. + +@item --localize-symbols=@var{filename} +Apply @samp{--localize-symbol} option to each symbol listed in the file +@var{filename}. @var{filename} is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. + +@item --weaken-symbols=@var{filename} +Apply @samp{--weaken-symbol} option to each symbol listed in the file +@var{filename}. @var{filename} is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. + @item -V @itemx --version Show the version number of @code{objcopy}. diff --git a/contrib/binutils/binutils/bucomm.c b/contrib/binutils/binutils/bucomm.c index 86c327f..401a3e4 100644 --- a/contrib/binutils/binutils/bucomm.c +++ b/contrib/binutils/binutils/bucomm.c @@ -1,5 +1,5 @@ /* bucomm.c -- Bin Utils COMmon code. - Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -157,7 +157,7 @@ list_supported_targets (name, f) const char *name; FILE *f; { - extern bfd_target *bfd_target_vector[]; + extern const bfd_target *const *bfd_target_vector; int t; if (name == NULL) diff --git a/contrib/binutils/binutils/bucomm.h b/contrib/binutils/binutils/bucomm.h index e9d675e..f8c8608 100644 --- a/contrib/binutils/binutils/bucomm.h +++ b/contrib/binutils/binutils/bucomm.h @@ -1,5 +1,5 @@ /* bucomm.h -- binutils common include file. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/budbg.h b/contrib/binutils/binutils/budbg.h index d8ee889..2bbf72e 100644 --- a/contrib/binutils/binutils/budbg.h +++ b/contrib/binutils/binutils/budbg.h @@ -1,5 +1,5 @@ /* budbg.c -- Interfaces to the generic debugging information routines. - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright 1995, 1996 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/coffdump.c b/contrib/binutils/binutils/coffdump.c index 77dbd33..80b0817 100644 --- a/contrib/binutils/binutils/coffdump.c +++ b/contrib/binutils/binutils/coffdump.c @@ -1,5 +1,5 @@ /* Coff file dumper. - Copyright (C) 1994, 95, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/coffgrok.c b/contrib/binutils/binutils/coffgrok.c index 3486c5f..1118fac 100644 --- a/contrib/binutils/binutils/coffgrok.c +++ b/contrib/binutils/binutils/coffgrok.c @@ -1,5 +1,5 @@ /* coffgrok.c - Copyright (C) 1994, 95, 97, 1998 Free Software Foundation, Inc. + Copyright 1994, 1995, 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/coffgrok.h b/contrib/binutils/binutils/coffgrok.h index c0ade42..e442bae 100644 --- a/contrib/binutils/binutils/coffgrok.h +++ b/contrib/binutils/binutils/coffgrok.h @@ -1,3 +1,22 @@ +/* coffgrok.h + Copyright 2001 Free Software Foundation, Inc. + +This file is part of GNU Binutils. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #define T_NULL 0 #define T_VOID 1 /* function argument (only used by compiler) */ #define T_CHAR 2 /* character */ diff --git a/contrib/binutils/binutils/config.in b/contrib/binutils/binutils/config.in index 8a0e1c5..7b70d16 100644 --- a/contrib/binutils/binutils/config.in +++ b/contrib/binutils/binutils/config.in @@ -28,6 +28,9 @@ /* Define to `long' if doesn't define. */ #undef off_t +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + /* Define to `unsigned' if doesn't define. */ #undef size_t diff --git a/contrib/binutils/binutils/config.texi b/contrib/binutils/binutils/config.texi index a9ad848..56bdd12 100644 --- a/contrib/binutils/binutils/config.texi +++ b/contrib/binutils/binutils/config.texi @@ -1 +1 @@ -@set VERSION 2.11 +@set VERSION 2.11.2 diff --git a/contrib/binutils/binutils/configure b/contrib/binutils/binutils/configure index bfadf47..a123770 100755 --- a/contrib/binutils/binutils/configure +++ b/contrib/binutils/binutils/configure @@ -728,50 +728,251 @@ test "$host_alias" != "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:735: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi - echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:734: checking for strerror in -lcposix" >&5 -ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:765: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lcposix $LIBS" -cat > conftest.$ac_ext <&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:816: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:848: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 859 "configure" #include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* 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; } +main(){return(0);} EOF -if { (eval echo configure:753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +if { (eval echo configure:864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:895: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:923: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no fi rm -f conftest* -LIBS="$ac_save_LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:955: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lcposix" + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi else echo "$ac_t""no" 1>&6 + ISC= fi - - +BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` # 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: @@ -784,7 +985,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:788: checking for a BSD compatible install" >&5 +echo "configure:989: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -837,7 +1038,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:841: checking whether build environment is sane" >&5 +echo "configure:1042: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -894,7 +1095,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:898: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1099: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -923,7 +1124,7 @@ fi PACKAGE=binutils -VERSION=2.11 +VERSION=${BFD_VERSION} if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -940,7 +1141,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:944: checking for working aclocal" >&5 +echo "configure:1145: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -953,7 +1154,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:957: checking for working autoconf" >&5 +echo "configure:1158: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -966,7 +1167,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:970: checking for working automake" >&5 +echo "configure:1171: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -979,7 +1180,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:983: checking for working autoheader" >&5 +echo "configure:1184: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -992,7 +1193,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:996: checking for working makeinfo" >&5 +echo "configure:1197: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1075,228 +1276,6 @@ else enable_fast_install=yes fi -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1082: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1112: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1163: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1195: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 1206 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1237: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1242: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1270: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" @@ -1309,7 +1288,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1313: checking for ld used by GCC" >&5 +echo "configure:1292: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1339,10 +1318,10 @@ echo "configure:1313: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1343: checking for GNU ld" >&5 +echo "configure:1322: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1346: checking for non-GNU ld" >&5 +echo "configure:1325: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1377,7 +1356,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1381: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1360: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1394,7 +1373,7 @@ with_gnu_ld=$ac_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1398: checking for $LD option to reload object files" >&5 +echo "configure:1377: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1406,7 +1385,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1410: checking for BSD-compatible nm" >&5 +echo "configure:1389: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1444,7 +1423,7 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1448: checking whether ln -s works" >&5 +echo "configure:1427: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1465,7 +1444,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1469: checking how to recognise dependant libraries" >&5 +echo "configure:1448: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1608,13 +1587,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1612: checking for object suffix" >&5 +echo "configure:1591: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1634,7 +1613,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1638: checking for executable suffix" >&5 +echo "configure:1617: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1644,7 +1623,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -1677,7 +1656,7 @@ case "$deplibs_check_method" in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1681: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1660: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1739,7 +1718,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1743: checking for file" >&5 +echo "configure:1722: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1810,7 +1789,7 @@ esac # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1814: checking for $ac_word" >&5 +echo "configure:1793: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1842,7 +1821,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1846: checking for $ac_word" >&5 +echo "configure:1825: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1877,7 +1856,7 @@ fi # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1881: checking for $ac_word" >&5 +echo "configure:1860: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1909,7 +1888,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1913: checking for $ac_word" >&5 +echo "configure:1892: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1976,8 +1955,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1980 "configure"' > conftest.$ac_ext - if { (eval echo configure:1981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1959 "configure"' > conftest.$ac_ext + if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1998,7 +1977,7 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2002: checking whether the C compiler needs -belf" >&5 +echo "configure:1981: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2011,14 +1990,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2192,7 +2171,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2196: checking for $ac_word" >&5 +echo "configure:2175: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2222,7 +2201,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2226: checking for $ac_word" >&5 +echo "configure:2205: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2273,7 +2252,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2277: checking for $ac_word" >&5 +echo "configure:2256: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2305,7 +2284,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2309: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2288: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2316,12 +2295,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2320 "configure" +#line 2299 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2347,12 +2326,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2351: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2330: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2356: checking whether we are using GNU C" >&5 +echo "configure:2335: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2361,7 +2340,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2380,7 +2359,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2384: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2363: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2417,7 +2396,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2421: checking for $ac_word" >&5 +echo "configure:2400: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2448,7 +2427,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2452: checking how to run the C preprocessor" >&5 +echo "configure:2431: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2463,13 +2442,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2480,13 +2459,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2497,13 +2476,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2533,7 +2512,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2537: checking for $ac_word" >&5 +echo "configure:2516: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2566,7 +2545,7 @@ test -n "$LEX" || LEX="$missing_dir/missing flex" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2570: checking for $ac_word" >&5 +echo "configure:2549: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2600,7 +2579,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:2604: checking for yywrap in -l$ac_lib" >&5 +echo "configure:2583: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2608,7 +2587,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2642,7 +2621,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:2646: checking lex output file root" >&5 +echo "configure:2625: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2663,7 +2642,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:2667: checking whether yytext is a pointer" >&5 +echo "configure:2646: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2675,14 +2654,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -2708,7 +2687,7 @@ ALL_LINGUAS= # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2712: checking for $ac_word" >&5 +echo "configure:2691: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2736,12 +2715,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2740: checking for ANSI C header files" >&5 +echo "configure:2719: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2749,7 +2728,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2766,7 +2745,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2784,7 +2763,7 @@ 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 < EOF @@ -2805,7 +2784,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2816,7 +2795,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2840,12 +2819,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2844: checking for working const" >&5 +echo "configure:2823: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2915,21 +2894,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2919: checking for inline" >&5 +echo "configure:2898: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2955,12 +2934,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2959: checking for off_t" >&5 +echo "configure:2938: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2988,12 +2967,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2992: checking for size_t" >&5 +echo "configure:2971: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3023,19 +3002,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3027: checking for working alloca.h" >&5 +echo "configure:3006: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3056,12 +3035,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3060: checking for alloca" >&5 +echo "configure:3039: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3121,12 +3100,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3125: checking whether alloca needs Cray hooks" >&5 +echo "configure:3104: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3155: checking for $ac_func" >&5 +echo "configure:3134: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3206,7 +3185,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3210: checking stack direction for C alloca" >&5 +echo "configure:3189: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3214,7 +3193,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3258,17 +3237,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3262: checking for $ac_hdr" >&5 +echo "configure:3241: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3272: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3297,12 +3276,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3301: checking for $ac_func" >&5 +echo "configure:3280: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3350,7 +3329,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3354: checking for working mmap" >&5 +echo "configure:3333: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3358,7 +3337,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3526,17 +3505,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3530: checking for $ac_hdr" >&5 +echo "configure:3509: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3566,12 +3545,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3570: checking for $ac_func" >&5 +echo "configure:3549: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3623,12 +3602,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3627: checking for $ac_func" >&5 +echo "configure:3606: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3685,19 +3664,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3689: checking for LC_MESSAGES" >&5 +echo "configure:3668: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3718,7 +3697,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3722: checking whether NLS is requested" >&5 +echo "configure:3701: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3738,7 +3717,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3742: checking whether included gettext is requested" >&5 +echo "configure:3721: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3757,17 +3736,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3761: checking for libintl.h" >&5 +echo "configure:3740: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3784,19 +3763,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3788: checking for gettext in libc" >&5 +echo "configure:3767: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3812,7 +3791,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3816: checking for bindtextdomain in -lintl" >&5 +echo "configure:3795: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3820,7 +3799,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3847,19 +3826,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3851: checking for gettext in libintl" >&5 +echo "configure:3830: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3887,7 +3866,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3891: checking for $ac_word" >&5 +echo "configure:3870: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3921,12 +3900,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3925: checking for $ac_func" >&5 +echo "configure:3904: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3976,7 +3955,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3980: checking for $ac_word" >&5 +echo "configure:3959: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4012,7 +3991,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4016: checking for $ac_word" >&5 +echo "configure:3995: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4044,7 +4023,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4084,7 +4063,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4088: checking for $ac_word" >&5 +echo "configure:4067: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4118,7 +4097,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4122: checking for $ac_word" >&5 +echo "configure:4101: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4154,7 +4133,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4158: checking for $ac_word" >&5 +echo "configure:4137: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4244,7 +4223,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4248: checking for catalogs to be installed" >&5 +echo "configure:4227: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4272,17 +4251,17 @@ echo "configure:4248: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4276: checking for linux/version.h" >&5 +echo "configure:4255: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4345,7 +4324,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4349: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4328: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -4370,7 +4349,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:4374: checking for executable suffix" >&5 +echo "configure:4353: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4380,7 +4359,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:4384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:4363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -4423,7 +4402,7 @@ AR=${AR-ar} # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4427: checking for $ac_word" >&5 +echo "configure:4406: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4462,7 +4441,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:4466: checking for a BSD compatible install" >&5 +echo "configure:4445: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4529,7 +4508,7 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:4533: checking for build system executable suffix" >&5 +echo "configure:4512: checking for build system executable suffix" >&5 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4564,17 +4543,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4568: checking for $ac_hdr" >&5 +echo "configure:4547: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4601,12 +4580,12 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4605: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4584: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4622,7 +4601,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4645,19 +4624,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:4649: checking for working alloca.h" >&5 +echo "configure:4628: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -4678,12 +4657,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:4682: checking for alloca" >&5 +echo "configure:4661: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -4743,12 +4722,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4747: checking whether alloca needs Cray hooks" >&5 +echo "configure:4726: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4777: checking for $ac_func" >&5 +echo "configure:4756: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4828,7 +4807,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4832: checking stack direction for C alloca" >&5 +echo "configure:4811: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4836,7 +4815,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -4879,12 +4858,12 @@ fi for ac_func in sbrk utimes setmode do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4883: checking for $ac_func" >&5 +echo "configure:4862: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4935,14 +4914,14 @@ done # Some systems have frexp only in -lm, not in -lc. echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6 -echo "configure:4939: checking for library containing frexp" >&5 +echo "configure:4918: checking for library containing frexp" >&5 if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_frexp="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_frexp="none required" else @@ -4964,7 +4943,7 @@ rm -f conftest* test "$ac_cv_search_frexp" = "no" && for i in m; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_frexp="-l$i" break @@ -4997,19 +4976,19 @@ else : fi echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6 -echo "configure:5001: checking for time_t in time.h" >&5 +echo "configure:4980: checking for time_t in time.h" >&5 if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { time_t i; ; return 0; } EOF -if { (eval echo configure:5013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_decl_time_t_time_h=yes else @@ -5030,19 +5009,19 @@ EOF fi echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:5034: checking for time_t in sys/types.h" >&5 +echo "configure:5013: checking for time_t in sys/types.h" >&5 if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { time_t i; ; return 0; } EOF -if { (eval echo configure:5046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_decl_time_t_types_h=yes else @@ -5065,12 +5044,12 @@ fi # Under Next 3.2 apparently does not define struct utimbuf # by default. echo $ac_n "checking for utime.h""... $ac_c" 1>&6 -echo "configure:5069: checking for utime.h" >&5 +echo "configure:5048: checking for utime.h" >&5 if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_TIME_H @@ -5081,7 +5060,7 @@ int main() { struct utimbuf s; ; return 0; } EOF -if { (eval echo configure:5085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_header_utime_h=yes else @@ -5102,12 +5081,12 @@ EOF fi echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6 -echo "configure:5106: checking whether fprintf must be declared" >&5 +echo "configure:5085: checking whether fprintf must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5128,7 +5107,7 @@ int main() { char *(*pfn) = (char *(*)) fprintf ; return 0; } EOF -if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_fprintf=no else @@ -5149,12 +5128,12 @@ EOF fi echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:5153: checking whether strstr must be declared" >&5 +echo "configure:5132: checking whether strstr must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5175,7 +5154,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:5179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -5196,12 +5175,12 @@ EOF fi echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 -echo "configure:5200: checking whether sbrk must be declared" >&5 +echo "configure:5179: checking whether sbrk must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5222,7 +5201,7 @@ int main() { char *(*pfn) = (char *(*)) sbrk ; return 0; } EOF -if { (eval echo configure:5226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_sbrk=no else @@ -5243,12 +5222,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:5247: checking whether getenv must be declared" >&5 +echo "configure:5226: checking whether getenv must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5269,7 +5248,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:5273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -5290,12 +5269,12 @@ EOF fi echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6 -echo "configure:5294: checking whether environ must be declared" >&5 +echo "configure:5273: checking whether environ must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5316,7 +5295,7 @@ int main() { char *(*pfn) = (char *(*)) environ ; return 0; } EOF -if { (eval echo configure:5320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_environ=no else @@ -5631,6 +5610,7 @@ s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g +s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g @@ -5642,7 +5622,6 @@ s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g -s%@CC@%$CC%g s%@LN_S@%$LN_S%g s%@OBJEXT@%$OBJEXT%g s%@EXEEXT@%$EXEEXT%g diff --git a/contrib/binutils/binutils/configure.in b/contrib/binutils/binutils/configure.in index 4923ab9..e2fed82 100644 --- a/contrib/binutils/binutils/configure.in +++ b/contrib/binutils/binutils/configure.in @@ -6,7 +6,10 @@ AC_INIT(ar.c) AC_CANONICAL_SYSTEM AC_ISC_POSIX -AM_INIT_AUTOMAKE(binutils, 2.11) +changequote(,)dnl +BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` +changequote([,])dnl +AM_INIT_AUTOMAKE(binutils, ${BFD_VERSION}) AM_PROG_LIBTOOL diff --git a/contrib/binutils/binutils/debug.c b/contrib/binutils/binutils/debug.c index 82a9094..ffdc766 100644 --- a/contrib/binutils/binutils/debug.c +++ b/contrib/binutils/binutils/debug.c @@ -1,5 +1,5 @@ /* debug.c -- Handle generic debugging information. - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/debug.h b/contrib/binutils/binutils/debug.h index 1b890b2..d60285d 100644 --- a/contrib/binutils/binutils/debug.h +++ b/contrib/binutils/binutils/debug.h @@ -1,5 +1,5 @@ /* debug.h -- Describe generic debugging information. - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright 1995, 1996 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/deflex.l b/contrib/binutils/binutils/deflex.l index 15a43c0..8ff72b8 100644 --- a/contrib/binutils/binutils/deflex.l +++ b/contrib/binutils/binutils/deflex.l @@ -1,6 +1,6 @@ %{/* deflex.l - Lexer for .def files */ -/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/defparse.c b/contrib/binutils/binutils/defparse.c index f36480f..42f0c9d 100644 --- a/contrib/binutils/binutils/defparse.c +++ b/contrib/binutils/binutils/defparse.c @@ -35,7 +35,7 @@ #line 1 "defparse.y" /* defparse.y - parser for .def files */ -/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -259,7 +259,7 @@ static const short yycheck[] = { 7, -1, -1, 47 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/misc/bison.simple" +#line 3 "/usr/share/bison/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -473,7 +473,7 @@ __yy_memcpy (char *to, char *from, unsigned int count) #endif #endif -#line 217 "/usr/share/misc/bison.simple" +#line 217 "/usr/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -979,7 +979,7 @@ case 58: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/share/misc/bison.simple" +#line 543 "/usr/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; diff --git a/contrib/binutils/binutils/defparse.y b/contrib/binutils/binutils/defparse.y index 5718d46..7e13965 100644 --- a/contrib/binutils/binutils/defparse.y +++ b/contrib/binutils/binutils/defparse.y @@ -1,6 +1,6 @@ %{ /* defparse.y - parser for .def files */ -/* Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/dlltool.c b/contrib/binutils/binutils/dlltool.c index e989f0c..9475b98 100644 --- a/contrib/binutils/binutils/dlltool.c +++ b/contrib/binutils/binutils/dlltool.c @@ -1,5 +1,6 @@ /* dlltool.c -- tool to generate stuff for PE style DLLs - Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/dlltool.h b/contrib/binutils/binutils/dlltool.h index b4167c8..29c825d 100644 --- a/contrib/binutils/binutils/dlltool.h +++ b/contrib/binutils/binutils/dlltool.h @@ -1,5 +1,5 @@ /* dlltool.h -- header file for dlltool - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright 1997, 1998 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/dllwrap.c b/contrib/binutils/binutils/dllwrap.c index 291abfd..8f83dda 100644 --- a/contrib/binutils/binutils/dllwrap.c +++ b/contrib/binutils/binutils/dllwrap.c @@ -1,5 +1,5 @@ /* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Mumit Khan (khan@xraylith.wisc.edu). This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/filemode.c b/contrib/binutils/binutils/filemode.c index f9811bc..7f9b1b7 100644 --- a/contrib/binutils/binutils/filemode.c +++ b/contrib/binutils/binutils/filemode.c @@ -1,5 +1,6 @@ /* filemode.c -- make a string describing file modes - Copyright (C) 1985, 90, 91, 94, 95, 97, 1999 Free Software Foundation, Inc. + Copyright 1985, 1990, 1991, 1994, 1995, 1997 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/contrib/binutils/binutils/ieee.c b/contrib/binutils/binutils/ieee.c index 52149b2..ad5ddc7 100644 --- a/contrib/binutils/binutils/ieee.c +++ b/contrib/binutils/binutils/ieee.c @@ -1,5 +1,5 @@ /* ieee.c -- Read and write IEEE-695 debugging information. - Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/nm.c b/contrib/binutils/binutils/nm.c index 3695d1e..7928375 100644 --- a/contrib/binutils/binutils/nm.c +++ b/contrib/binutils/binutils/nm.c @@ -1,5 +1,6 @@ /* nm.c -- Describe symbol table of a rel file. - Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -1474,10 +1475,9 @@ print_symbol_info_bsd (info, abfd) if (bfd_is_undefined_symclass (info->type)) { #ifdef BFD64 - printf ("%*s", 16, ""); -#else - printf ("%*s", 8, ""); + printf (" "); #endif + printf (" "); } else print_value (info->value); diff --git a/contrib/binutils/binutils/objcopy.1 b/contrib/binutils/binutils/objcopy.1 index d2eed15..a6aa181 100644 --- a/contrib/binutils/binutils/objcopy.1 +++ b/contrib/binutils/binutils/objcopy.1 @@ -1,700 +1,548 @@ -.\" Copyright (c) 1991, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation -.\" See section COPYING for conditions for redistribution -.TH objcopy 1 "05 April 2000" "Free Software Foundation" "GNU Development Tools" -.de BP -.sp -.ti \-.2i -\(** +.\" Automatically generated by Pod::Man version 1.02 +.\" Wed May 30 12:24:28 2001 +.\" +.\" Standard preamble: +.\" ====================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP .. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R -.SH NAME -objcopy \- copy and translate object files - -.SH SYNOPSIS +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used +.\" to do unbreakable dashes and therefore won't be available. \*(C` and +.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` ` +. ds C' ' +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr +.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and +.\" index entries marked with X<> in POD. Of course, you'll have to process +.\" the output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +. . +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it +.\" makes way too many mistakes in technical documents. .hy 0 -.na -.TP -.B objcopy -.RB "[\|" \-F\ \fIbfdname\fR\ |\ \fB\-\-target=\fIbfdname\fR "\|]" -.RB "[\|" \-I\ \fIbfdname\fR\ |\ \fB\-\-input\-target=\fIbfdname\fR "\|]" -.RB "[\|" \-O\ \fIbfdname\fR\ |\ \fB\-\-output\-target=\fIbfdname\fR "\|]" -.RB "[\|" \-j\ \fIsectionname\fR\ |\ \fB\-\-only\-section=\fIsectionname\fR "\|]" -.RB "[\|" \-R\ \fIsectionname\fR\ |\ \fB\-\-remove\-section=\fIsectionname\fR "\|]" -.RB "[\|" \-S\fR\ |\ \fB\-\-strip\-all\fR "\|]" -.RB "[\|" \-g\fR\ |\ \fB\-\-strip\-debug\fR "\|]" -.RB "[\|" \-\-strip\-unneeded\fR "\|]" -.RB "[\|" \-K\ \fIsymbolname\fR\ |\ \fB\-\-keep\-symbol=\fIsymbolname\fR "\|]" -.RB "[\|" \-N\ \fIsymbolname\fR\ |\ \fB\-\-strip\-symbol=\fIsymbolname\fR "\|]" -.RB "[\|" \-L\ \fIsymbolname\fR\ |\ \fB\-\-localize\-symbol=\fIsymbolname\fR "\|]" -.RB "[\|" \-W\ \fIsymbolname\fR\ |\ \fB\-\-weaken\-symbol=\fIsymbolname\fR "\|]" -.RB "[\|" \-x\fR\ |\ \fB\-\-discard\-all\fR "\|]" -.RB "[\|" \-X\fR\ |\ \fB\-\-discard\-locals\fR "\|]" -.RB "[\|" \-b\ \fIbyte\fR\ |\ \fB\-\-byte=\fIbyte\fR "\|]" -.RB "[\|" \-i\ \fIinterleave\fR\ |\ \fB\-\-interleave=\fIinterleave\fR "\|]" -.RB "[\|" \-p\fR\ |\ \fB\-\-preserve\-dates\fR "\|]" -.RB "[\|" \-\-debugging "\|]" -.RB "[\|" \-\-gap\-fill=\fIval\fR "\|]" -.RB "[\|" \-\-pad\-to=\fIaddress\fR "\|]" -.RB "[\|" \-\-set\-start=\fIval\fR "\|]" -.RB "[\|" \-\-change\-start=\fIincr\fR "\|]" -.RB "[\|" \-\-change\-addresses=\fIincr\fR "\|]" -.RB "[\|" \-\-change\-section\-address\ \fIsection{=,+,-}val\fR "\|]" -.RB "[\|" \-\-change\-section\-lma\ \fIsection{=,+,-}val\fR "\|]" -.RB "[\|" \-\-change\-section\-vma\ \fIsection{=,+,-}val\fR "\|]" -.RB "[\|" \-\-change\-warnings\fR "\|]" -.RB "[\|" \-\-no\-change\-warnings\fR "\|]" -.RB "[\|" \-\-set\-section\-flags\ \fIsection=flags\fR "\|]" -.RB "[\|" \-\-add\-section\ \fIsectionname=filename\fR "\|]" -.RB "[\|" \-\-change\-leading\-char\fR "\|]" -.RB "[\|" \-\-remove\-leading\-char\fR "\|]" -.RB "[\|" \-\-srec\-len=\fIval\fR "\|]" -.RB "[\|" \-\-srec\-forceS3\fR "\|]" -.RB "[\|" \-\-redefine\-sym\ \fIold=new\fR "\|]" -.RB "[\|" \-\-weaken\fR "\|]" -.RB "[\|" \-v\ |\ \-\-verbose\fR "\|]" -.RB "[\|" \-V\ |\ \-\-version\fR "\|]" -.RB "[\|" \-\-help\fR "\|]" -.B infile -.RB "[\|" outfile\fR "\|]" -.SH DESCRIPTION -The GNU -.B objcopy -utility copies the contents of an object file to another. -.B objcopy -uses the GNU BFD Library to read and write the object files. It can -write the destination object file in a format different from that of -the source object file. The exact behavior of -.B objcopy -is controlled by command-line options. +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +.bd B 3 +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ====================================================================== +.\" +.IX Title "OBJCOPY.1 1" +.TH OBJCOPY.1 1 "binutils-2.11.90" "2001-05-30" "GNU" +.UC +.SH "NAME" +objcopy \- copy and translate object files +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +objcopy [ \-F \fIbfdname\fR | \-\-target=\fIbfdname\fR ] + [ \-I \fIbfdname\fR | \-\-input-target=\fIbfdname\fR ] + [ \-O \fIbfdname\fR | \-\-output-target=\fIbfdname\fR ] + [ \-B \fIbfdarch\fR | \-\-binary-architecture=\fIbfdarch\fR ] + [ \-S | \-\-strip-all ] [ \-g | \-\-strip-debug ] + [ \-K \fIsymbolname\fR | \-\-keep-symbol=\fIsymbolname\fR ] + [ \-N \fIsymbolname\fR | \-\-strip-symbol=\fIsymbolname\fR ] + [ \-G \fIsymbolname\fR | \-\-keep-global-symbol=\fIsymbolname\fR] + [ \-L \fIsymbolname\fR | \-\-localize-symbol=\fIsymbolname\fR ] + [ \-W \fIsymbolname\fR | \-\-weaken-symbol=\fIsymbolname\fR ] + [ \-x | \-\-discard-all ] [ \-X | \-\-discard-locals ] + [ \-b \fIbyte\fR | \-\-byte=\fIbyte\fR ] + [ \-i \fIinterleave\fR | \-\-interleave=\fIinterleave\fR ] + [ \-j \fIsectionname\fR | \-\-only-section=\fIsectionname\fR ] + [ \-R \fIsectionname\fR | \-\-remove-section=\fIsectionname\fR ] + [ \-p | \-\-preserve-dates ] [ \-\-debugging ] + [ \-\-gap-fill=\fIval\fR ] [ \-\-pad-to=\fIaddress\fR ] + [ \-\-set-start=\fIval\fR ] [ \-\-adjust-start=\fIincr\fR ] + [ \-\-change-addresses=\fIincr\fR ] + [ \-\-change-section-address \fIsection\fR{=,+,\-}\fIval\fR ] + [ \-\-change-section-lma \fIsection\fR{=,+,\-}\fIval\fR ] + [ \-\-change-section-vma \fIsection\fR{=,+,\-}\fIval\fR ] + [ \-\-change-warnings ] [ \-\-no-change-warnings ] + [ \-\-set-section-flags \fIsection\fR=\fIflags\fR ] + [ \-\-add-section \fIsectionname\fR=\fIfilename\fR ] + [ \-\-change-leading-char ] [ \-\-remove-leading-char ] + [ \-\-srec-len=\fIival\fR ] [ \-\-srec-forceS3 ] + [ \-\-redefine-sym \fIold\fR=\fInew\fR ] [ \-\-weaken ] + [ \-\-keep-symbols=\fIfilename\fR ] + [ \-\-strip-symbols=\fIfilename\fR ] + [ \-\-keep-global-symbols=\fIfilename\fR ] + [ \-\-localize-symbols=\fIfilename\fR ] + [ \-\-weaken-symbols=\fIfilename\fR ] + [ \-v | \-\-verbose ] [ \-V | \-\-version ] [ \-\-help ] + \fIinfile\fR [\fIoutfile\fR] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +The \s-1GNU\s0 \f(CW\*(C`objcopy\*(C'\fR utility copies the contents of an object +file to another. \f(CW\*(C`objcopy\*(C'\fR uses the \s-1GNU\s0 \s-1BFD\s0 Library to +read and write the object files. It can write the destination object +file in a format different from that of the source object file. The +exact behavior of \f(CW\*(C`objcopy\*(C'\fR is controlled by command-line options. +Note that \f(CW\*(C`objcopy\*(C'\fR should be able to copy a fully linked file +between any two formats. However, copying a relocatable object file +between any two formats may not work as expected. .PP -.B objcopy -creates temporary files to do its translations and deletes them -afterward. -.B objcopy -uses BFD to do all its translation work; it knows about all the -formats BFD knows about, and thus is able to recognize most formats -without being told explicitly. +\&\f(CW\*(C`objcopy\*(C'\fR creates temporary files to do its translations and +deletes them afterward. \f(CW\*(C`objcopy\*(C'\fR uses \s-1BFD\s0 to do all its +translation work; it has access to all the formats described in \s-1BFD\s0 +and thus is able to recognize most formats without being told +explicitly. .PP -.B objcopy -can be used to generate S-records by using an output target of -.B srec -(e.g., use -.B -O srec). +\&\f(CW\*(C`objcopy\*(C'\fR can be used to generate S-records by using an output +target of \fBsrec\fR (e.g., use \fB\-O srec\fR). .PP -.B objcopy -can be used to generate a raw binary file by using an output target of -.B binary -(e.g., use -.B -O binary). -When -.B objcopy -generates a raw binary file, it will essentially produce a memory dump -of the contents of the input object file. All symbols and relocation -information will be discarded. The memory dump will start at the -virtual address of the lowest section copied into the output file. +\&\f(CW\*(C`objcopy\*(C'\fR can be used to generate a raw binary file by using an +output target of \fBbinary\fR (e.g., use \fB\-O binary\fR). When +\&\f(CW\*(C`objcopy\*(C'\fR generates a raw binary file, it will essentially produce +a memory dump of the contents of the input object file. All symbols and +relocation information will be discarded. The memory dump will start at +the load address of the lowest section copied into the output file. .PP When generating an S-record or a raw binary file, it may be helpful to -use -.B -S -to remove sections containing debugging information. In some cases -.B -R -will be useful to remove sections which contain information which is -not needed by the binary file. +use \fB\-S\fR to remove sections containing debugging information. In +some cases \fB\-R\fR will be useful to remove sections which contain +information that is not needed by the binary file. .PP -.I infile -and -.I outfile -are the source and output files respectively. If you do not specify -.IR outfile , -.B objcopy -creates a temporary file and destructively renames the result with the -name of the input file. - -.SH OPTIONS -.TP -.B \-I \fIbfdname\fR, \fB\-\-input\-target=\fIbfdname -Consider the source file's object format to be -.IR bfdname , -rather than attempting to deduce it. -.TP -.B \-O \fIbfdname\fR, \fB\-\-output\-target=\fIbfdname -Write the output file using the object format -.IR bfdname . -.TP -.B \-F \fIbfdname\fR, \fB\-\-target=\fIbfdname -Use -.I bfdname -as the object format for both the input and the output file; i.e. -simply transfer data from source to destination with no translation. -.TP -.B \-j \fIsectionname\fR, \fB\-\-only\-section=\fIsectionname -Copy only the named section from the input file to the output file, -discarding all other sections. This option may be given more than -once. Note that using this option inappropriately may make the output -file unusable. -.TP -.B \-R \fIsectionname\fR, \fB\-\-remove-section=\fIsectionname -Remove the named section from the file. This option may be given more -than once. Note that using this option inappropriately may make the -output file unusable. -.TP -.B \-S\fR, \fB\-\-strip\-all +Note \- \f(CW\*(C`objcopy\*(C'\fR is not able to change the endianness of its input +files. If the input format has an endianness, (some formats do not), +\&\f(CW\*(C`objcopy\*(C'\fR can only copy the inputs into file formats that have the +same endianness or which have no endianness (eg \fBsrec\fR). +.SH "OPTIONS" +.IX Header "OPTIONS" +.Ip "\f(CW\*(C`\f(CIinfile\f(CW\*(C'\fR" 4 +.IX Item "infile" +.Ip "\f(CW\*(C`\f(CIoutfile\f(CW\*(C'\fR" 4 +.IX Item "outfile" +The input and output files, respectively. +If you do not specify \fIoutfile\fR, \f(CW\*(C`objcopy\*(C'\fR creates a +temporary file and destructively renames the result with +the name of \fIinfile\fR. +.Ip "\f(CW\*(C`\-I \f(CIbfdname\f(CW \*(C'\fR" 4 +.IX Item "-I bfdname " +.Ip "\f(CW\*(C`\-\-input\-target=\f(CIbfdname\f(CW\*(C'\fR" 4 +.IX Item "--input-target=bfdname" +Consider the source file's object format to be \fIbfdname\fR, rather than +attempting to deduce it. +.Ip "\f(CW\*(C`\-O \f(CIbfdname\f(CW\*(C'\fR" 4 +.IX Item "-O bfdname" +.Ip "\f(CW\*(C`\-\-output\-target=\f(CIbfdname\f(CW\*(C'\fR" 4 +.IX Item "--output-target=bfdname" +Write the output file using the object format \fIbfdname\fR. +.Ip "\f(CW\*(C`\-F \f(CIbfdname\f(CW\*(C'\fR" 4 +.IX Item "-F bfdname" +.Ip "\f(CW\*(C`\-\-target=\f(CIbfdname\f(CW\*(C'\fR" 4 +.IX Item "--target=bfdname" +Use \fIbfdname\fR as the object format for both the input and the output +file; i.e., simply transfer data from source to destination with no +translation. +.Ip "\f(CW\*(C`\-B \f(CIbfdarch\f(CW\*(C'\fR" 4 +.IX Item "-B bfdarch" +.Ip "\f(CW\*(C`\-\-binary\-architecture=\f(CIbfdarch\f(CW\*(C'\fR" 4 +.IX Item "--binary-architecture=bfdarch" +Useful when transforming a raw binary input file into an object file. +In this case the output architecture can be set to \fIbfdarch\fR. This +option will be ignored if the input file has a known \fIbfdarch\fR. You +can access this binary data inside a program by referencing the special +symbols that are created by the conversion process. These symbols are +called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and +_binary_\fIobjfile\fR_size. e.g. you can transform a picture file into +an object file and then access it in your code using these symbols. +.Ip "\f(CW\*(C`\-j \f(CIsectionname\f(CW\*(C'\fR" 4 +.IX Item "-j sectionname" +.Ip "\f(CW\*(C`\-\-only\-section=\f(CIsectionname\f(CW\*(C'\fR" 4 +.IX Item "--only-section=sectionname" +Copy only the named section from the input file to the output file. +This option may be given more than once. Note that using this option +inappropriately may make the output file unusable. +.Ip "\f(CW\*(C`\-R \f(CIsectionname\f(CW\*(C'\fR" 4 +.IX Item "-R sectionname" +.Ip "\f(CW\*(C`\-\-remove\-section=\f(CIsectionname\f(CW\*(C'\fR" 4 +.IX Item "--remove-section=sectionname" +Remove any section named \fIsectionname\fR from the output file. This +option may be given more than once. Note that using this option +inappropriately may make the output file unusable. +.Ip "\f(CW\*(C`\-S\*(C'\fR" 4 +.IX Item "-S" +.Ip "\f(CW\*(C`\-\-strip\-all\*(C'\fR" 4 +.IX Item "--strip-all" Do not copy relocation and symbol information from the source file. -.TP -.B \-g\fR, \fB\-\-strip\-debug +.Ip "\f(CW\*(C`\-g\*(C'\fR" 4 +.IX Item "-g" +.Ip "\f(CW\*(C`\-\-strip\-debug\*(C'\fR" 4 +.IX Item "--strip-debug" Do not copy debugging symbols from the source file. -.TP -.B \-\-strip\-unneeded +.Ip "\f(CW\*(C`\-\-strip\-unneeded\*(C'\fR" 4 +.IX Item "--strip-unneeded" Strip all symbols that are not needed for relocation processing. -.TP -.B \-K \fIsymbolname\fR, \fB\-\-keep\-symbol=\fIsymbolname -Copy only symbol \fIsymbolname\fP from the source file. This option -may be given more than once. -.TP -.B \-N \fIsymbolname\fR, \fB\-\-strip\-symbol=\fIsymbolname -Do not copy symbol \fIsymbolname\fP from the source file. This option +.Ip "\f(CW\*(C`\-K \f(CIsymbolname\f(CW\*(C'\fR" 4 +.IX Item "-K symbolname" +.Ip "\f(CW\*(C`\-\-keep\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4 +.IX Item "--keep-symbol=symbolname" +Copy only symbol \fIsymbolname\fR from the source file. This option may +be given more than once. +.Ip "\f(CW\*(C`\-N \f(CIsymbolname\f(CW\*(C'\fR" 4 +.IX Item "-N symbolname" +.Ip "\f(CW\*(C`\-\-strip\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4 +.IX Item "--strip-symbol=symbolname" +Do not copy symbol \fIsymbolname\fR from the source file. This option may be given more than once. -.TP -.B \-L \fIsymbolname\fR, \fB\-\-localize\-symbol=\fIsymbolname -Make symbol \fIsymbolname\fP local to the file, so that it is not +.Ip "\f(CW\*(C`\-G \f(CIsymbolname\f(CW\*(C'\fR" 4 +.IX Item "-G symbolname" +.Ip "\f(CW\*(C`\-\-keep\-global\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4 +.IX Item "--keep-global-symbol=symbolname" +Keep only symbol \fIsymbolname\fR global. Make all other symbols local +to the file, so that they are not visible externally. This option may +be given more than once. +.Ip "\f(CW\*(C`\-L \f(CIsymbolname\f(CW\*(C'\fR" 4 +.IX Item "-L symbolname" +.Ip "\f(CW\*(C`\-\-localize\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4 +.IX Item "--localize-symbol=symbolname" +Make symbol \fIsymbolname\fR local to the file, so that it is not visible externally. This option may be given more than once. -.TP -.B \-W \fIsymbolname\fR, \fB\-\-weaken\-symbol=\fIsymbolname -Make symbol \fIsymbolname\fP weak. This option may be given more than once. -.TP -.B \-x\fR, \fB\-\-discard\-all +.Ip "\f(CW\*(C`\-W \f(CIsymbolname\f(CW\*(C'\fR" 4 +.IX Item "-W symbolname" +.Ip "\f(CW\*(C`\-\-weaken\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4 +.IX Item "--weaken-symbol=symbolname" +Make symbol \fIsymbolname\fR weak. This option may be given more than once. +.Ip "\f(CW\*(C`\-x\*(C'\fR" 4 +.IX Item "-x" +.Ip "\f(CW\*(C`\-\-discard\-all\*(C'\fR" 4 +.IX Item "--discard-all" Do not copy non-global symbols from the source file. -.TP -.B \-X\fR, \fB\-\-discard\-locals -Do not copy compiler-generated local symbols. (These usually start -with "L" or "."). -.TP -.B \-b \fIbyte\fR, \fB\-\-byte=\fIbyte -Keep only every \fIbyte\fPth byte of the input file (header data is -not affected). \fIbyte\fP can be in the range from 0 to the -interleave-1. This option is useful for creating files to program -ROMs. It is typically used with an srec output target. -.TP -.B \-i \fIinterleave\fR, \fB\-\-interleave=\fIinterleave -Only copy one out of every \fIinterleave\fP bytes. Which one to copy is -selected by the \fB\-b\fP or \fB\-\-byte\fP option. The default is 4. -The interleave is ignored if neither \fB\-b\fP nor \fB\-\-byte\fP is given. -.TP -.B \-p\fR, \fB\-\-preserve\-dates +.Ip "\f(CW\*(C`\-X\*(C'\fR" 4 +.IX Item "-X" +.Ip "\f(CW\*(C`\-\-discard\-locals\*(C'\fR" 4 +.IX Item "--discard-locals" +Do not copy compiler-generated local symbols. +(These usually start with \fBL\fR or \fB.\fR.) +.Ip "\f(CW\*(C`\-b \f(CIbyte\f(CW\*(C'\fR" 4 +.IX Item "-b byte" +.Ip "\f(CW\*(C`\-\-byte=\f(CIbyte\f(CW\*(C'\fR" 4 +.IX Item "--byte=byte" +Keep only every \fIbyte\fRth byte of the input file (header data is not +affected). \fIbyte\fR can be in the range from 0 to \fIinterleave\fR\-1, +where \fIinterleave\fR is given by the \fB\-i\fR or \fB\*(--interleave\fR +option, or the default of 4. This option is useful for creating files +to program \s-1ROM\s0. It is typically used with an \f(CW\*(C`srec\*(C'\fR output +target. +.Ip "\f(CW\*(C`\-i \f(CIinterleave\f(CW\*(C'\fR" 4 +.IX Item "-i interleave" +.Ip "\f(CW\*(C`\-\-interleave=\f(CIinterleave\f(CW\*(C'\fR" 4 +.IX Item "--interleave=interleave" +Only copy one out of every \fIinterleave\fR bytes. Select which byte to +copy with the \fI\-b\fR or \fB\*(--byte\fR option. The default is 4. +\&\f(CW\*(C`objcopy\*(C'\fR ignores this option if you do not specify either \fB\-b\fR or +\&\fB\*(--byte\fR. +.Ip "\f(CW\*(C`\-p\*(C'\fR" 4 +.IX Item "-p" +.Ip "\f(CW\*(C`\-\-preserve\-dates\*(C'\fR" 4 +.IX Item "--preserve-dates" Set the access and modification dates of the output file to be the same as those of the input file. -.TP -.B \-\-debugging +.Ip "\f(CW\*(C`\-\-debugging\*(C'\fR" 4 +.IX Item "--debugging" Convert debugging information, if possible. This is not the default because only certain debugging formats are supported, and the conversion process can be time consuming. -.TP -.B \-\-gap\-fill=\fIval -Fill gaps between sections with \fIval\fP. This operation applies to -the \fIload address\fP (LMA) of the sections. It is done by increasing +.Ip "\f(CW\*(C`\-\-gap\-fill \f(CIval\f(CW\*(C'\fR" 4 +.IX Item "--gap-fill val" +Fill gaps between sections with \fIval\fR. This operation applies to +the \fIload address\fR (\s-1LMA\s0) of the sections. It is done by increasing the size of the section with the lower address, and filling in the extra -space created with \fIval\fP. -.TP -.B \-\-pad\-to=\fIaddress -Pad the output file up to the load address \fIaddress\fP. This is +space created with \fIval\fR. +.Ip "\f(CW\*(C`\-\-pad\-to \f(CIaddress\f(CW\*(C'\fR" 4 +.IX Item "--pad-to address" +Pad the output file up to the load address \fIaddress\fR. This is done by increasing the size of the last section. The extra space is -filled in with the value specified by \fB\-\-gap\-fill\fP (default -zero). -.TP -.B \fB\-\-set\-start=\fIval -Set the start address of the new file to \fIval\fP. Not all object -file formats support setting the start address. -.TP -.B \fB\-\-change\-start=\fIincr\fR, \fB\-\-adjust\-start=\fIincr -Changes the start address by adding \fIincr\fP. Not all object file +filled in with the value specified by \fB\*(--gap-fill\fR (default zero). +.Ip "\f(CW\*(C`\-\-set\-start \f(CIval\f(CW\*(C'\fR" 4 +.IX Item "--set-start val" +Set the start address of the new file to \fIval\fR. Not all object file formats support setting the start address. -.TP -.B \fB\-\-change\-addresses=\fIincr\fR, \fB\-\-adjust\-vma=\fIincr -Changes the address of all sections, as well as the start address, by -adding \fIincr\fP. Some object file formats do not permit section -addresses to be changed arbitrarily. Note that this does not relocate -the sections; if the program expects sections to be loaded at a +.Ip "\f(CW\*(C`\-\-change\-start \f(CIincr\f(CW\*(C'\fR" 4 +.IX Item "--change-start incr" +.Ip "\f(CW\*(C`\-\-adjust\-start \f(CIincr\f(CW\*(C'\fR" 4 +.IX Item "--adjust-start incr" +Change the start address by adding \fIincr\fR. Not all object file +formats support setting the start address. +.Ip "\f(CW\*(C`\-\-change\-addresses \f(CIincr\f(CW\*(C'\fR" 4 +.IX Item "--change-addresses incr" +.Ip "\f(CW\*(C`\-\-adjust\-vma \f(CIincr\f(CW\*(C'\fR" 4 +.IX Item "--adjust-vma incr" +Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start +address, by adding \fIincr\fR. Some object file formats do not permit +section addresses to be changed arbitrarily. Note that this does not +relocate the sections; if the program expects sections to be loaded at a certain address, and this option is used to change the sections such -that they are loaded at a different address, the program may fail. -.TP -.B \fB\-\-change\-section\-address\ \fIsection{=,+,-}val\fR, \fB\-\-adjust\-section\-vma\ \fIsection{=,+,-}val -Set or changes the VMA and LMA addresses of the named \fIsection\fP. -If \fI=\fP is used, the section address is set to \fIval\fP. -Otherwise, \fIval\fP is added to or subtracted from the section -address. See the comments under \fB\-\-change\-addresses\fP, above. If -\fIsection\fP does not exist in the input file, a warning will be -issued, unless \fB\-\-no\-change\-warnings\fP is used. -.TP -.B \fB\-\-change\-section\-lma\ \fIsection{=,+,-}val -Set or change the LMA address of the named \fIsection\fP. If \fI=\fP is -used, the section address is set to \fIval\fP. Otherwise, \fIval\fP -is added to or subtracted from the section address. See the comments -under \fB\-\-change\-addresses\fP, above. If \fIsection\fP does not exist -in the input file, a warning will be issued, unless -\fB\-\-no\-change\-warnings\fP is used. -.TP -.B \fB\-\-change\-section\-vma\ \fIsection{=,+,-}val -Set or change the VMA address of the named \fIsection\fP. If \fI=\fP is -used, the section address is set to \fIval\fP. Otherwise, \fIval\fP -is added to or subtracted from the section address. See the comments -under \fB\-\-change\-addresses\fP, above. If \fIsection\fP does not exist -in the input file, a warning will be issued, unless -\fB\-\-no\-change\-warnings\fP is used. -.TP -.B \fB\-\-change\-warnings\fR, \fB\-\-adjust\-warnings -If \fB\-\-change\-section\-XXX\fP is used, and the named section does -not exist, issue a warning. This is the default. -.TP -.B \fB\-\-no\-change\-warnings\fR, \fB\-\-no\-adjust\-warnings -Do not issue a warning if \fB\-\-change\-section\-XXX\fP is used, even -if the named section does not exist. -.TP -.B \fB\-\-set\-section\-flags\ \fIsection=flags -Set the flags for the named section. The \fIflags\fP argument is a +that they are loaded at a different address, the program may fail. +.Ip "\f(CW\*(C`\-\-change\-section\-address \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4 +.IX Item "--change-section-address section{=,+,-}val" +.Ip "\f(CW\*(C`\-\-adjust\-section\-vma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4 +.IX Item "--adjust-section-vma section{=,+,-}val" +Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of the named +\&\fIsection\fR. If \fB=\fR is used, the section address is set to +\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the +section address. See the comments under \fB\*(--change-addresses\fR, +above. If \fIsection\fR does not exist in the input file, a warning will +be issued, unless \fB\*(--no-change-warnings\fR is used. +.Ip "\f(CW\*(C`\-\-change\-section\-lma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4 +.IX Item "--change-section-lma section{=,+,-}val" +Set or change the \s-1LMA\s0 address of the named \fIsection\fR. The \s-1LMA\s0 +address is the address where the section will be loaded into memory at +program load time. Normally this is the same as the \s-1VMA\s0 address, which +is the address of the section at program run time, but on some systems, +especially those where a program is held in \s-1ROM\s0, the two can be +different. If \fB=\fR is used, the section address is set to +\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the +section address. See the comments under \fB\*(--change-addresses\fR, +above. If \fIsection\fR does not exist in the input file, a warning +will be issued, unless \fB\*(--no-change-warnings\fR is used. +.Ip "\f(CW\*(C`\-\-change\-section\-vma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4 +.IX Item "--change-section-vma section{=,+,-}val" +Set or change the \s-1VMA\s0 address of the named \fIsection\fR. The \s-1VMA\s0 +address is the address where the section will be located once the +program has started executing. Normally this is the same as the \s-1LMA\s0 +address, which is the address where the section will be loaded into +memory, but on some systems, especially those where a program is held in +\&\s-1ROM\s0, the two can be different. If \fB=\fR is used, the section address +is set to \fIval\fR. Otherwise, \fIval\fR is added to or subtracted +from the section address. See the comments under +\&\fB\*(--change-addresses\fR, above. If \fIsection\fR does not exist in +the input file, a warning will be issued, unless +\&\fB\*(--no-change-warnings\fR is used. +.Ip "\f(CW\*(C`\-\-change\-warnings\*(C'\fR" 4 +.IX Item "--change-warnings" +.Ip "\f(CW\*(C`\-\-adjust\-warnings\*(C'\fR" 4 +.IX Item "--adjust-warnings" +If \fB\*(--change-section-address\fR or \fB\*(--change-section-lma\fR or +\&\fB\*(--change-section-vma\fR is used, and the named section does not +exist, issue a warning. This is the default. +.Ip "\f(CW\*(C`\-\-no\-change\-warnings\*(C'\fR" 4 +.IX Item "--no-change-warnings" +.Ip "\f(CW\*(C`\-\-no\-adjust\-warnings\*(C'\fR" 4 +.IX Item "--no-adjust-warnings" +Do not issue a warning if \fB\*(--change-section-address\fR or +\&\fB\*(--adjust-section-lma\fR or \fB\*(--adjust-section-vma\fR is used, even +if the named section does not exist. +.Ip "\f(CW\*(C`\-\-set\-section\-flags \f(CIsection\f(CW=\f(CIflags\f(CW\*(C'\fR" 4 +.IX Item "--set-section-flags section=flags" +Set the flags for the named section. The \fIflags\fR argument is a comma separated string of flag names. The recognized names are -\fIalloc\fP, \fIcontents\fP, \fIload\fP, \fInoload\fP, \fIreadonly\fP, -\fIcode\fP, \fIdata\fP, \fIrom\fP, \fIshare\fP, and \fIdebug\fP. Not -all flags are meaningful for all object file formats. -.TP -.B \fB\-\-add\-section\ \fIsectionname=filename +\&\fBalloc\fR, \fBcontents\fR, \fBload\fR, \fBnoload\fR, +\&\fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR, \fBshare\fR, and +\&\fBdebug\fR. You can set the \fBcontents\fR flag for a section which +does not have contents, but it is not meaningful to clear the +\&\fBcontents\fR flag of a section which does have contents\*(--just remove +the section instead. Not all flags are meaningful for all object file +formats. +.Ip "\f(CW\*(C`\-\-add\-section \f(CIsectionname\f(CW=\f(CIfilename\f(CW\*(C'\fR" 4 +.IX Item "--add-section sectionname=filename" Add a new section named \fIsectionname\fR while copying the file. The -contents of the new section are taken from the file \fIfilename\fR. -The size of the section will be the size of the file. This option -only works on file formats which can support sections with arbitrary -names. -.TP -.B \-\-change\-leading\-char +contents of the new section are taken from the file \fIfilename\fR. The +size of the section will be the size of the file. This option only +works on file formats which can support sections with arbitrary names. +.Ip "\f(CW\*(C`\-\-change\-leading\-char\*(C'\fR" 4 +.IX Item "--change-leading-char" Some object file formats use special characters at the start of symbols. The most common such character is underscore, which compilers -often add before every symbol. This option tells -.B objcopy -to change the leading character of every symbol when it converts -between object file formats. If the object file formats use the same -leading character, this option has no effect. Otherwise, it will add -a character, or remove a character, or change a character, as +often add before every symbol. This option tells \f(CW\*(C`objcopy\*(C'\fR to +change the leading character of every symbol when it converts between +object file formats. If the object file formats use the same leading +character, this option has no effect. Otherwise, it will add a +character, or remove a character, or change a character, as appropriate. -.TP -.B \-\-remove\-leading\-char +.Ip "\f(CW\*(C`\-\-remove\-leading\-char\*(C'\fR" 4 +.IX Item "--remove-leading-char" If the first character of a global symbol is a special symbol leading character used by the object file format, remove the character. The most common symbol leading character is underscore. This option will -remove a leading underscore from all global symbols. This can be -useful if you want to link together objects of different file formats -with different conventions for symbol names. This is different from -\fB\-\-change\-leading\-char\fP because it always changes the symbol name +remove a leading underscore from all global symbols. This can be useful +if you want to link together objects of different file formats with +different conventions for symbol names. This is different from +\&\f(CW\*(C`\-\-change\-leading\-char\*(C'\fR because it always changes the symbol name when appropriate, regardless of the object file format of the output -.TP -.B \fB\-\-srec\-len=\fIval -Meaningful only for srec output. Set the length of the Srecords to \fIval\fP. -This length covers both the address, data and crc fields. -.TP -.B \fB\-\-srec\-forceS3 -Meaningful only for srec output. Avoid generation of S1/S2 records, creating -S3-only record format. -.TP -.B \-\-redefine\-sym\ \fIold=new -Change the name of symbol \fIold\fR to \fInew\fR. This can be useful +file. +.Ip "\f(CW\*(C`\-\-srec\-len=\f(CIival\f(CW\*(C'\fR" 4 +.IX Item "--srec-len=ival" +Meaningful only for srec output. Set the maximum length of the Srecords +being produced to \fIival\fR. This length covers both address, data and +crc fields. +.Ip "\f(CW\*(C`\-\-srec\-forceS3\*(C'\fR" 4 +.IX Item "--srec-forceS3" +Meaningful only for srec output. Avoid generation of S1/S2 records, +creating S3\-only record format. +.Ip "\f(CW\*(C`\-\-redefine\-sym \f(CIold\f(CW=\f(CInew\f(CW\*(C'\fR" 4 +.IX Item "--redefine-sym old=new" +Change the name of a symbol \fIold\fR, to \fInew\fR. This can be useful when one is trying link two things together for which you have no source, and there are name collisions. -.TP -.B \-\-weaken -Change all global symbols in the file to be weak. -.TP -.B \-v\fR, \fB\-\-verbose +.Ip "\f(CW\*(C`\-\-weaken\*(C'\fR" 4 +.IX Item "--weaken" +Change all global symbols in the file to be weak. This can be useful +when building an object which will be linked against other objects using +the \f(CW\*(C`\-R\*(C'\fR option to the linker. This option is only effective when +using an object file format which supports weak symbols. +.Ip "\f(CW\*(C`\-\-keep\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4 +.IX Item "--keep-symbols=filename" +Apply \fB\*(--keep-symbol\fR option to each symbol listed in the file +\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. +.Ip "\f(CW\*(C`\-\-strip\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4 +.IX Item "--strip-symbols=filename" +Apply \fB\*(--strip-symbol\fR option to each symbol listed in the file +\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. +.Ip "\f(CW\*(C`\-\-keep\-global\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4 +.IX Item "--keep-global-symbols=filename" +Apply \fB\*(--keep-global-symbol\fR option to each symbol listed in the +file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one +symbol name per line. Line comments may be introduced by the hash +character. This option may be given more than once. +.Ip "\f(CW\*(C`\-\-localize\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4 +.IX Item "--localize-symbols=filename" +Apply \fB\*(--localize-symbol\fR option to each symbol listed in the file +\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. +.Ip "\f(CW\*(C`\-\-weaken\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4 +.IX Item "--weaken-symbols=filename" +Apply \fB\*(--weaken-symbol\fR option to each symbol listed in the file +\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. +.Ip "\f(CW\*(C`\-V\*(C'\fR" 4 +.IX Item "-V" +.Ip "\f(CW\*(C`\-\-version\*(C'\fR" 4 +.IX Item "--version" +Show the version number of \f(CW\*(C`objcopy\*(C'\fR. +.Ip "\f(CW\*(C`\-v\*(C'\fR" 4 +.IX Item "-v" +.Ip "\f(CW\*(C`\-\-verbose\*(C'\fR" 4 +.IX Item "--verbose" Verbose output: list all object files modified. In the case of -archives, "\fBobjcopy \-V\fR" lists all members of the archive. -.TP -.B \-V\fR, \fB\-\-version -Show the version number of -.B objcopy -and exit. -.TP -.B \-\-help -Show a summary of the options to -.B objcopy -and exit. +archives, \fBobjcopy \-V\fR lists all members of the archive. +.Ip "\f(CW\*(C`\-\-help\*(C'\fR" 4 +.IX Item "--help" +Show a summary of the options to \f(CW\*(C`objcopy\*(C'\fR. .SH "SEE ALSO" -.RB "`\|" binutils "\|'" -entry in -.B -info\c -\&; -.I -The GNU Binary Utilities\c -\&, Roland H. Pesch (June 1993). - -.SH COPYING -Copyright (c) 1993, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc. +.IX Header "SEE ALSO" +\&\fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR. +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. .PP -This document is distributed under the terms of the GNU Free -Documentation License, version 1.1. That license is described in the -sources for this manual page, but it is not displayed here in order to -make this manual more consise. Copies of this license can also be -obtained from: http://www.gnu.org/copyleft/. - -\" .SH GNU Free Documentation License -\" Version 1.1, March 2000 - -\" Copyright (C) 2000 Free Software Foundation, Inc. -\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -\" Everyone is permitted to copy and distribute verbatim -\" copies of this license document, but changing it is -\" not allowed. -\" .PP -\" 0. PREAMBLE -\" .PP -\" The purpose of this License is to make a manual, textbook, or other -\" written document "free" in the sense of freedom: to assure everyone -\" the effective freedom to copy and redistribute it, with or without -\" modifying it, either commercially or noncommercially. Secondarily, -\" this License preserves for the author and publisher a way to get -\" credit for their work, while not being considered responsible for -\" modifications made by others. -\" .PP -\" This License is a kind of "copyleft", which means that derivative -\" works of the document must themselves be free in the same sense. It -\" complements the GNU General Public License, which is a copyleft -\" license designed for free software. -\" .PP -\" We have designed this License in order to use it for manuals for free -\" software, because free software needs free documentation: a free -\" program should come with manuals providing the same freedoms that the -\" software does. But this License is not limited to software manuals; -\" it can be used for any textual work, regardless of subject matter or -\" whether it is published as a printed book. We recommend this License -\" principally for works whose purpose is instruction or reference. -\" .PP -\" 1. APPLICABILITY AND DEFINITIONS -\" .PP -\" This License applies to any manual or other work that contains a -\" notice placed by the copyright holder saying it can be distributed -\" under the terms of this License. The "Document", below, refers to any -\" such manual or work. Any member of the public is a licensee, and is -\" addressed as "you". -\" .PP -\" A "Modified Version" of the Document means any work containing the -\" Document or a portion of it, either copied verbatim, or with -\" modifications and/or translated into another language. -\" .PP -\" A "Secondary Section" is a named appendix or a front-matter section of -\" the Document that deals exclusively with the relationship of the -\" publishers or authors of the Document to the Document's overall subject -\" (or to related matters) and contains nothing that could fall directly -\" within that overall subject. (For example, if the Document is in part a -\" textbook of mathematics, a Secondary Section may not explain any -\" mathematics.) The relationship could be a matter of historical -\" connection with the subject or with related matters, or of legal, -\" commercial, philosophical, ethical or political position regarding -\" them. -\" .PP -\" The "Invariant Sections" are certain Secondary Sections whose titles -\" are designated, as being those of Invariant Sections, in the notice -\" that says that the Document is released under this License. -\" .PP -\" The "Cover Texts" are certain short passages of text that are listed, -\" as Front-Cover Texts or Back-Cover Texts, in the notice that says that -\" the Document is released under this License. -\" .PP -\" A "Transparent" copy of the Document means a machine-readable copy, -\" represented in a format whose specification is available to the -\" general public, whose contents can be viewed and edited directly and -\" straightforwardly with generic text editors or (for images composed of -\" pixels) generic paint programs or (for drawings) some widely available -\" drawing editor, and that is suitable for input to text formatters or -\" for automatic translation to a variety of formats suitable for input -\" to text formatters. A copy made in an otherwise Transparent file -\" format whose markup has been designed to thwart or discourage -\" subsequent modification by readers is not Transparent. A copy that is -\" not "Transparent" is called "Opaque". -\" .PP -\" Examples of suitable formats for Transparent copies include plain -\" ASCII without markup, Texinfo input format, LaTeX input format, SGML -\" or XML using a publicly available DTD, and standard-conforming simple -\" HTML designed for human modification. Opaque formats include -\" PostScript, PDF, proprietary formats that can be read and edited only -\" by proprietary word processors, SGML or XML for which the DTD and/or -\" processing tools are not generally available, and the -\" machine-generated HTML produced by some word processors for output -\" purposes only. -\" .PP -\" The "Title Page" means, for a printed book, the title page itself, -\" plus such following pages as are needed to hold, legibly, the material -\" this License requires to appear in the title page. For works in -\" formats which do not have any title page as such, "Title Page" means -\" the text near the most prominent appearance of the work's title, -\" preceding the beginning of the body of the text. -\" .PP -\" 2. VERBATIM COPYING -\" .PP -\" You may copy and distribute the Document in any medium, either -\" commercially or noncommercially, provided that this License, the -\" copyright notices, and the license notice saying this License applies -\" to the Document are reproduced in all copies, and that you add no other -\" conditions whatsoever to those of this License. You may not use -\" technical measures to obstruct or control the reading or further -\" copying of the copies you make or distribute. However, you may accept -\" compensation in exchange for copies. If you distribute a large enough -\" number of copies you must also follow the conditions in section 3. -\" .PP -\" You may also lend copies, under the same conditions stated above, and -\" you may publicly display copies. -\" .PP -\" 3. COPYING IN QUANTITY -\" .PP -\" If you publish printed copies of the Document numbering more than 100, -\" and the Document's license notice requires Cover Texts, you must enclose -\" the copies in covers that carry, clearly and legibly, all these Cover -\" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on -\" the back cover. Both covers must also clearly and legibly identify -\" you as the publisher of these copies. The front cover must present -\" the full title with all words of the title equally prominent and -\" visible. You may add other material on the covers in addition. -\" Copying with changes limited to the covers, as long as they preserve -\" the title of the Document and satisfy these conditions, can be treated -\" as verbatim copying in other respects. -\" .PP -\" If the required texts for either cover are too voluminous to fit -\" legibly, you should put the first ones listed (as many as fit -\" reasonably) on the actual cover, and continue the rest onto adjacent -\" pages. -\" .PP -\" If you publish or distribute Opaque copies of the Document numbering -\" more than 100, you must either include a machine-readable Transparent -\" copy along with each Opaque copy, or state in or with each Opaque copy -\" a publicly-accessible computer-network location containing a complete -\" Transparent copy of the Document, free of added material, which the -\" general network-using public has access to download anonymously at no -\" charge using public-standard network protocols. If you use the latter -\" option, you must take reasonably prudent steps, when you begin -\" distribution of Opaque copies in quantity, to ensure that this -\" Transparent copy will remain thus accessible at the stated location -\" until at least one year after the last time you distribute an Opaque -\" copy (directly or through your agents or retailers) of that edition to -\" the public. -\" .PP -\" It is requested, but not required, that you contact the authors of the -\" Document well before redistributing any large number of copies, to give -\" them a chance to provide you with an updated version of the Document. -\" .PP -\" 4. MODIFICATIONS -\" .PP -\" You may copy and distribute a Modified Version of the Document under -\" the conditions of sections 2 and 3 above, provided that you release -\" the Modified Version under precisely this License, with the Modified -\" Version filling the role of the Document, thus licensing distribution -\" and modification of the Modified Version to whoever possesses a copy -\" of it. In addition, you must do these things in the Modified Version: -\" .PP -\" A. Use in the Title Page (and on the covers, if any) a title distinct -\" from that of the Document, and from those of previous versions -\" (which should, if there were any, be listed in the History section -\" of the Document). You may use the same title as a previous version -\" if the original publisher of that version gives permission. -\" .PP -\" B. List on the Title Page, as authors, one or more persons or entities -\" responsible for authorship of the modifications in the Modified -\" Version, together with at least five of the principal authors of the -\" Document (all of its principal authors, if it has less than five). -\" .PP -\" C. State on the Title page the name of the publisher of the -\" Modified Version, as the publisher. -\" .PP -\" D. Preserve all the copyright notices of the Document. -\" .PP -\" E. Add an appropriate copyright notice for your modifications -\" adjacent to the other copyright notices. -\" .PP -\" F. Include, immediately after the copyright notices, a license notice -\" giving the public permission to use the Modified Version under the -\" terms of this License, in the form shown in the Addendum below. -\" Preserve in that license notice the full lists of Invariant Sections -\" and required Cover Texts given in the Document's license notice. -\" .PP -\" H. Include an unaltered copy of this License. -\" .PP -\" I. Preserve the section entitled "History", and its title, and add to -\" it an item stating at least the title, year, new authors, and -\" publisher of the Modified Version as given on the Title Page. If -\" there is no section entitled "History" in the Document, create one -\" stating the title, year, authors, and publisher of the Document as -\" given on its Title Page, then add an item describing the Modified -\" Version as stated in the previous sentence. -\" .PP -\" J. Preserve the network location, if any, given in the Document for -\" public access to a Transparent copy of the Document, and likewise -\" the network locations given in the Document for previous versions -\" it was based on. These may be placed in the "History" section. -\" You may omit a network location for a work that was published at -\" least four years before the Document itself, or if the original -\" publisher of the version it refers to gives permission. -\" .PP -\" K. In any section entitled "Acknowledgements" or "Dedications", -\" preserve the section's title, and preserve in the section all the -\" substance and tone of each of the contributor acknowledgements -\" and/or dedications given therein. -\" .PP -\" L. Preserve all the Invariant Sections of the Document, -\" unaltered in their text and in their titles. Section numbers -\" or the equivalent are not considered part of the section titles. -\" .PP -\" M. Delete any section entitled "Endorsements". Such a section -\" may not be included in the Modified Version. -\" .PP -\" N. Do not retitle any existing section as "Endorsements" -\" or to conflict in title with any Invariant Section. -\" .PP -\" If the Modified Version includes new front-matter sections or -\" appendices that qualify as Secondary Sections and contain no material -\" copied from the Document, you may at your option designate some or all -\" of these sections as invariant. To do this, add their titles to the -\" list of Invariant Sections in the Modified Version's license notice. -\" These titles must be distinct from any other section titles. -\" .PP -\" You may add a section entitled "Endorsements", provided it contains -\" nothing but endorsements of your Modified Version by various -\" parties--for example, statements of peer review or that the text has -\" been approved by an organization as the authoritative definition of a -\" standard. -\" .PP -\" You may add a passage of up to five words as a Front-Cover Text, and a -\" passage of up to 25 words as a Back-Cover Text, to the end of the list -\" of Cover Texts in the Modified Version. Only one passage of -\" Front-Cover Text and one of Back-Cover Text may be added by (or -\" through arrangements made by) any one entity. If the Document already -\" includes a cover text for the same cover, previously added by you or -\" by arrangement made by the same entity you are acting on behalf of, -\" you may not add another; but you may replace the old one, on explicit -\" permission from the previous publisher that added the old one. -\" .PP -\" The author(s) and publisher(s) of the Document do not by this License -\" give permission to use their names for publicity for or to assert or -\" imply endorsement of any Modified Version. -\" .PP - -\" 5. COMBINING DOCUMENTS -\" .PP -\" You may combine the Document with other documents released under this -\" License, under the terms defined in section 4 above for modified -\" versions, provided that you include in the combination all of the -\" Invariant Sections of all of the original documents, unmodified, and -\" list them all as Invariant Sections of your combined work in its -\" license notice. -\" .PP -\" The combined work need only contain one copy of this License, and -\" multiple identical Invariant Sections may be replaced with a single -\" copy. If there are multiple Invariant Sections with the same name but -\" different contents, make the title of each such section unique by -\" adding at the end of it, in parentheses, the name of the original -\" author or publisher of that section if known, or else a unique number. -\" Make the same adjustment to the section titles in the list of -\" Invariant Sections in the license notice of the combined work. -\" .PP -\" In the combination, you must combine any sections entitled "History" -\" in the various original documents, forming one section entitled -\" "History"; likewise combine any sections entitled "Acknowledgements", -\" and any sections entitled "Dedications". You must delete all sections -\" entitled "Endorsements." -\" .PP - -\" 6. COLLECTIONS OF DOCUMENTS -\" .PP -\" You may make a collection consisting of the Document and other documents -\" released under this License, and replace the individual copies of this -\" License in the various documents with a single copy that is included in -\" the collection, provided that you follow the rules of this License for -\" verbatim copying of each of the documents in all other respects. -\" .PP -\" You may extract a single document from such a collection, and distribute -\" it individually under this License, provided you insert a copy of this -\" License into the extracted document, and follow this License in all -\" other respects regarding verbatim copying of that document. -\" .PP - -\" 7. AGGREGATION WITH INDEPENDENT WORKS -\" .PP -\" A compilation of the Document or its derivatives with other separate -\" and independent documents or works, in or on a volume of a storage or -\" distribution medium, does not as a whole count as a Modified Version -\" of the Document, provided no compilation copyright is claimed for the -\" compilation. Such a compilation is called an "aggregate", and this -\" License does not apply to the other self-contained works thus compiled -\" with the Document, on account of their being thus compiled, if they -\" are not themselves derivative works of the Document. -\" .PP -\" If the Cover Text requirement of section 3 is applicable to these -\" copies of the Document, then if the Document is less than one quarter -\" of the entire aggregate, the Document's Cover Texts may be placed on -\" covers that surround only the Document within the aggregate. -\" Otherwise they must appear on covers around the whole aggregate. -\" .PP - -\" 8. TRANSLATION -\" .PP -\" Translation is considered a kind of modification, so you may -\" distribute translations of the Document under the terms of section 4. -\" Replacing Invariant Sections with translations requires special -\" permission from their copyright holders, but you may include -\" translations of some or all Invariant Sections in addition to the -\" original versions of these Invariant Sections. You may include a -\" translation of this License provided that you also include the -\" original English version of this License. In case of a disagreement -\" between the translation and the original English version of this -\" License, the original English version will prevail. -\" .PP - -\" 9. TERMINATION -\" .PP -\" You may not copy, modify, sublicense, or distribute the Document except -\" as expressly provided for under this License. Any other attempt to -\" copy, modify, sublicense or distribute the Document is void, and will -\" automatically terminate your rights under this License. However, -\" parties who have received copies, or rights, from you under this -\" License will not have their licenses terminated so long as such -\" parties remain in full compliance. -\" .PP - -\" 10. FUTURE REVISIONS OF THIS LICENSE -\" .PP -\" The Free Software Foundation may publish new, revised versions -\" of the GNU Free Documentation License from time to time. Such new -\" versions will be similar in spirit to the present version, but may -\" differ in detail to address new problems or concerns. See -\" http://www.gnu.org/copyleft/. -\" .PP -\" Each version of the License is given a distinguishing version number. -\" If the Document specifies that a particular numbered version of this -\" License "or any later version" applies to it, you have the option of -\" following the terms and conditions either of that specified version or -\" of any later version that has been published (not as a draft) by the -\" Free Software Foundation. If the Document does not specify a version -\" number of this License, you may choose any version ever published (not -\" as a draft) by the Free Software Foundation. -\" .PP - -\" ADDENDUM: How to use this License for your documents -\" .PP -\" To use this License in a document you have written, include a copy of -\" the License in the document and put the following copyright and -\" license notices just after the title page: -\" .PP -\" Copyright (c) YEAR YOUR NAME. -\" Permission is granted to copy, distribute and/or -\" modify this document under the terms of the GNU -\" Free Documentation License, Version 1.1 or any later -\" version published by the Free Software Foundation; -\" with the Invariant Sections being LIST THEIR TITLES, -\" with the Front-Cover Texts being LIST, and with the -\" Back-Cover Texts being LIST. A copy of the license -\" is included in the section entitled "GNU Free -\" Documentation License". -\" .PP -\" If you have no Invariant Sections, write "with no Invariant Sections" -\" instead of saying which ones are invariant. If you have no -\" Front-Cover Texts, write "no Front-Cover Texts" instead of -\" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. -\" .PP -\" If your document contains nontrivial examples of program code, we -\" recommend releasing these examples in parallel under your choice of -\" free software license, such as the GNU General Public License, -\" to permit their use in free software. +Permission is granted to copy, distribute and/or modify this document +under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1 +or any later version published by the Free Software Foundation; +with no Invariant Sections, with no Front-Cover Texts, and with no +Back-Cover Texts. A copy of the license is included in the +section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R". diff --git a/contrib/binutils/binutils/objcopy.c b/contrib/binutils/binutils/objcopy.c index cae66fc..cd3e9af 100644 --- a/contrib/binutils/binutils/objcopy.c +++ b/contrib/binutils/binutils/objcopy.c @@ -1,5 +1,6 @@ /* objcopy.c -- copy object file from input to output, optionally massaging it. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -56,6 +57,7 @@ static void copy_section PARAMS ((bfd *, asection *, PTR)); static void get_sections PARAMS ((bfd *, asection *, PTR)); static int compare_section_lma PARAMS ((const PTR, const PTR)); static void add_specific_symbol PARAMS ((const char *, struct symlist **)); +static void add_specific_symbols PARAMS ((const char *, struct symlist **)); static boolean is_specified_symbol PARAMS ((const char *, struct symlist *)); static boolean is_strip_section PARAMS ((bfd *, asection *)); static unsigned int filter_symbols @@ -183,11 +185,13 @@ static boolean change_leading_char = false; static boolean remove_leading_char = false; -/* List of symbols to strip, keep, localize, weaken, or redefine. */ +/* List of symbols to strip, keep, localize, keep-global, weaken, + or redefine. */ static struct symlist *strip_specific_list = NULL; static struct symlist *keep_specific_list = NULL; static struct symlist *localize_specific_list = NULL; +static struct symlist *keepglobal_specific_list = NULL; static struct symlist *weaken_specific_list = NULL; static struct redefine_node *redefine_sym_list = NULL; @@ -217,6 +221,11 @@ static boolean weaken = false; #define OPTION_REDEFINE_SYM (OPTION_WEAKEN + 1) #define OPTION_SREC_LEN (OPTION_REDEFINE_SYM + 1) #define OPTION_SREC_FORCES3 (OPTION_SREC_LEN + 1) +#define OPTION_STRIP_SYMBOLS (OPTION_SREC_FORCES3 + 1) +#define OPTION_KEEP_SYMBOLS (OPTION_STRIP_SYMBOLS + 1) +#define OPTION_LOCALIZE_SYMBOLS (OPTION_KEEP_SYMBOLS + 1) +#define OPTION_KEEPGLOBAL_SYMBOLS (OPTION_LOCALIZE_SYMBOLS + 1) +#define OPTION_WEAKEN_SYMBOLS (OPTION_KEEPGLOBAL_SYMBOLS + 1) /* Options to handle if running as "strip". */ @@ -278,6 +287,7 @@ static struct option copy_options[] = {"pad-to", required_argument, 0, OPTION_PAD_TO}, {"preserve-dates", no_argument, 0, 'p'}, {"localize-symbol", required_argument, 0, 'L'}, + {"keep-global-symbol", required_argument, 0, 'G'}, {"remove-leading-char", no_argument, 0, OPTION_REMOVE_LEADING_CHAR}, {"remove-section", required_argument, 0, 'R'}, {"set-section-flags", required_argument, 0, OPTION_SET_SECTION_FLAGS}, @@ -294,6 +304,11 @@ static struct option copy_options[] = {"redefine-sym", required_argument, 0, OPTION_REDEFINE_SYM}, {"srec-len", required_argument, 0, OPTION_SREC_LEN}, {"srec-forceS3", no_argument, 0, OPTION_SREC_FORCES3}, + {"keep-symbols", required_argument, 0, OPTION_KEEP_SYMBOLS}, + {"strip-symbols", required_argument, 0, OPTION_STRIP_SYMBOLS}, + {"keep-global-symbols", required_argument, 0, OPTION_KEEPGLOBAL_SYMBOLS}, + {"localize-symbols", required_argument, 0, OPTION_LOCALIZE_SYMBOLS}, + {"weaken-symbols", required_argument, 0, OPTION_WEAKEN_SYMBOLS}, {0, no_argument, 0, 0} }; @@ -335,6 +350,7 @@ copy_usage (stream, exit_status) -N --strip-symbol Do not copy symbol \n\ -K --keep-symbol Only copy symbol \n\ -L --localize-symbol Force symbol to be marked as a local\n\ + -G --keep-global-symbol Localize all symbols except \n\ -W --weaken-symbol Force symbol to be marked as a weak\n\ --weaken Force all global symbols to be marked as weak\n\ -x --discard-all Remove all non-global symbols\n\ @@ -364,6 +380,11 @@ copy_usage (stream, exit_status) --redefine-sym = Redefine symbol name to \n\ --srec-len Restrict the length of generated Srecords\n\ --srec-forceS3 Restrict the type of generated Srecords to S3\n\ + --strip-symbols -N for all symbols listed in \n\ + --keep-symbols -K for all symbols listed in \n\ + --localize-symbols -L for all symbols listed in \n\ + --keep-global-symbols -G for all symbols listed in \n\ + --weaken-symbols -W for all symbols listed in \n\ -v --verbose List all object files modified\n\ -V --version Display this program's version number\n\ -h --help Display this output\n\ @@ -512,6 +533,122 @@ add_specific_symbol (name, list) *list = tmp_list; } +/* Add symbols listed in `filename' to strip_specific_list. */ + +#define IS_WHITESPACE(c) ((c) == ' ' || (c) == '\t') +#define IS_LINE_TERMINATOR(c) ((c) == '\n' || (c) == '\r' || (c) == '\0') + +static void +add_specific_symbols (filename, list) + const char *filename; + struct symlist **list; +{ + struct stat st; + FILE * f; + char * line; + char * buffer; + unsigned int line_count; + + if (stat (filename, & st) < 0) + fatal (_("cannot stat: %s: %s"), filename, strerror (errno)); + if (st.st_size == 0) + return; + + buffer = (char *) xmalloc (st.st_size + 2); + f = fopen (filename, FOPEN_RT); + if (f == NULL) + fatal (_("cannot open: %s: %s"), filename, strerror (errno)); + + if (fread (buffer, 1, st.st_size, f) == 0 || ferror (f)) + fatal (_("%s: fread failed"), filename); + + fclose (f); + buffer [st.st_size] = '\n'; + buffer [st.st_size + 1] = '\0'; + + line_count = 1; + + for (line = buffer; * line != '\0'; line ++) + { + char * eol; + char * name; + char * name_end; + int finished = false; + + for (eol = line;; eol ++) + { + switch (* eol) + { + case '\n': + * eol = '\0'; + /* Cope with \n\r. */ + if (eol[1] == '\r') + ++ eol; + finished = true; + break; + + case '\r': + * eol = '\0'; + /* Cope with \r\n. */ + if (eol[1] == '\n') + ++ eol; + finished = true; + break; + + case 0: + finished = true; + break; + + case '#': + /* Line comment, Terminate the line here, in case a + name is present and then allow the rest of the + loop to find the real end of the line. */ + * eol = '\0'; + break; + + default: + break; + } + + if (finished) + break; + } + + /* A name may now exist somewhere between 'line' and 'eol'. + Strip off leading whitespace and trailing whitespace, + then add it to the list. */ + for (name = line; IS_WHITESPACE (* name); name ++) + ; + for (name_end = name; + (! IS_WHITESPACE (* name_end)) + && (! IS_LINE_TERMINATOR (* name_end)); + name_end ++) + ; + + if (! IS_LINE_TERMINATOR (* name_end)) + { + char * extra; + + for (extra = name_end + 1; IS_WHITESPACE (* extra); extra ++) + ; + + if (! IS_LINE_TERMINATOR (* extra)) + non_fatal (_("Ignoring rubbish found on line %d of %s"), + line_count, filename); + } + + * name_end = '\0'; + + if (name_end > name) + add_specific_symbol (name, list); + + /* Advance line pointer to end of line. The 'eol ++' in the for + loop above will then advance us to the start of the next line. */ + line = eol; + line_count ++; + } +} + /* See whether a symbol should be stripped or kept based on strip_specific_list and keep_symbols. */ @@ -630,6 +767,12 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount) else if (relocatable /* Relocatable file. */ && (flags & (BSF_GLOBAL | BSF_WEAK)) != 0) keep = 1; + else if (bfd_decode_symclass (sym) == 'I') + /* Global symbols in $idata sections need to be retained + even if relocatable is false. External users of the + library containing the $idata section may reference these + symbols. */ + keep = 1; else if ((flags & BSF_GLOBAL) != 0 /* Global symbol. */ || (flags & BSF_WEAK) != 0 || bfd_is_und_section (bfd_get_section (sym)) @@ -659,7 +802,9 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount) sym->flags |= BSF_WEAK; } if (keep && (flags & (BSF_GLOBAL | BSF_WEAK)) - && is_specified_symbol (name, localize_specific_list)) + && (is_specified_symbol (name, localize_specific_list) + || (keepglobal_specific_list != NULL + && ! is_specified_symbol (name, keepglobal_specific_list)))) { sym->flags &= ~(BSF_GLOBAL | BSF_WEAK); sym->flags |= BSF_LOCAL; @@ -971,6 +1116,7 @@ copy_object (ibfd, obfd) || strip_specific_list != NULL || keep_specific_list != NULL || localize_specific_list != NULL + || keepglobal_specific_list != NULL || weaken_specific_list != NULL || sections_removed || sections_copied @@ -1689,7 +1835,7 @@ strip_main (argc, argv) struct section_list *p; char *output_file = NULL; - while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXVv", + while ((c = getopt_long (argc, argv, "b:i:I:j:K:N:s:O:d:F:L:G:R:SpgxXVvW:", strip_options, (int *) 0)) != EOF) { switch (c) @@ -1892,6 +2038,10 @@ copy_main (argc, argv) add_specific_symbol (optarg, &localize_specific_list); break; + case 'G': + add_specific_symbol (optarg, &keepglobal_specific_list); + break; + case 'W': add_specific_symbol (optarg, &weaken_specific_list); break; @@ -2158,6 +2308,26 @@ copy_main (argc, argv) S3Forced = true; break; + case OPTION_STRIP_SYMBOLS: + add_specific_symbols (optarg, &strip_specific_list); + break; + + case OPTION_KEEP_SYMBOLS: + add_specific_symbols (optarg, &keep_specific_list); + break; + + case OPTION_LOCALIZE_SYMBOLS: + add_specific_symbols (optarg, &localize_specific_list); + break; + + case OPTION_KEEPGLOBAL_SYMBOLS: + add_specific_symbols (optarg, &keepglobal_specific_list); + break; + + case OPTION_WEAKEN_SYMBOLS: + add_specific_symbols (optarg, &weaken_specific_list); + break; + case 0: break; /* we've been given a long option */ diff --git a/contrib/binutils/binutils/objdump.c b/contrib/binutils/binutils/objdump.c index a665831..27002ab 100644 --- a/contrib/binutils/binutils/objdump.c +++ b/contrib/binutils/binutils/objdump.c @@ -1,5 +1,6 @@ /* objdump.c -- dump information about an object file. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -2644,14 +2645,14 @@ endian_string (endian) static void display_target_list () { - extern bfd_target *bfd_target_vector[]; + extern const bfd_target *const *bfd_target_vector; char *dummy_name; int t; dummy_name = make_temp_file (NULL); for (t = 0; bfd_target_vector[t]; t++) { - bfd_target *p = bfd_target_vector[t]; + const bfd_target *p = bfd_target_vector[t]; bfd *abfd = bfd_openw (dummy_name, p->name); int a; @@ -2692,7 +2693,7 @@ display_info_table (first, last) int first; int last; { - extern bfd_target *bfd_target_vector[]; + extern const bfd_target *const *bfd_target_vector; int t, a; char *dummy_name; @@ -2710,7 +2711,7 @@ display_info_table (first, last) bfd_printable_arch_mach (a, 0)); for (t = first; t < last && bfd_target_vector[t]; t++) { - bfd_target *p = bfd_target_vector[t]; + const bfd_target *p = bfd_target_vector[t]; boolean ok = true; bfd *abfd = bfd_openw (dummy_name, p->name); @@ -2761,7 +2762,7 @@ static void display_target_tables () { int t, columns; - extern bfd_target *bfd_target_vector[]; + extern const bfd_target *const *bfd_target_vector; char *colum; columns = 0; diff --git a/contrib/binutils/binutils/po/binutils.pot b/contrib/binutils/binutils/po/binutils.pot index b497a04..2919fb3 100644 --- a/contrib/binutils/binutils/po/binutils.pot +++ b/contrib/binutils/binutils/po/binutils.pot @@ -6,13 +6,13 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-01-11 12:02-0800\n" +"POT-Creation-Date: 2001-05-28 19:38+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: ENCODING\n" +"Content-Transfer-Encoding: 8-bit\n" #: addr2line.c:76 #, c-format @@ -23,7 +23,7 @@ msgid "" msgstr "" #: addr2line.c:83 ar.c:288 nlmconv.c:1119 objcopy.c:373 objcopy.c:405 -#: readelf.c:1876 size.c:91 strings.c:530 windres.c:737 +#: readelf.c:1974 size.c:91 strings.c:530 windres.c:737 #, c-format msgid "Report bugs to %s\n" msgstr "" @@ -185,7 +185,7 @@ msgstr "" msgid "internal error -- this option not implemented" msgstr "" -#: ar.c:824 ar.c:876 ar.c:1322 objcopy.c:1124 +#: ar.c:824 ar.c:876 ar.c:1322 objcopy.c:1131 #, c-format msgid "internal stat error on %s" msgstr "" @@ -1174,17 +1174,17 @@ msgstr "" msgid "IEEE string length overflow: %u\n" msgstr "" -#: ieee.c:5324 +#: ieee.c:5333 #, c-format msgid "IEEE unsupported integer type size %u\n" msgstr "" -#: ieee.c:5360 +#: ieee.c:5369 #, c-format msgid "IEEE unsupported float type size %u\n" msgstr "" -#: ieee.c:5396 +#: ieee.c:5405 #, c-format msgid "IEEE unsupported complex type size %u\n" msgstr "" @@ -1387,8 +1387,8 @@ msgid "" "names\n" " The STYLE, if specified, can be `auto' (the " "default),\n" -" `gnu', 'lucid', 'arm', 'hp', 'edg' or " -"'gnu-new-abi'\n" +" `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-new-" +"abi'\n" " --no-demangle Do not demangle low-level symbol names\n" " -D, --dynamic Display dynamic symbols instead of normal symbols\n" " --defined-only Display only defined symbols\n" @@ -1482,7 +1482,7 @@ msgid "" "\n" msgstr "" -#: nm.c:1552 +#: nm.c:1550 msgid "" "\n" "Archive index:\n" @@ -1618,138 +1618,142 @@ msgstr "" msgid "%s: Symbol \"%s\" is target of more than one redefinition" msgstr "" -#: objcopy.c:773 +#: objcopy.c:772 +msgid "Unable to change endianness of input file(s)" +msgstr "" + +#: objcopy.c:780 #, c-format msgid "copy from %s(%s) to %s(%s)\n" msgstr "" -#: objcopy.c:792 +#: objcopy.c:799 #, c-format msgid "Warning: Output file cannot represent architecture %s" msgstr "" -#: objcopy.c:819 +#: objcopy.c:826 #, c-format msgid "can't create section `%s': %s" msgstr "" -#: objcopy.c:905 +#: objcopy.c:912 #, c-format msgid "Can't fill gap after %s: %s" msgstr "" -#: objcopy.c:930 +#: objcopy.c:937 #, c-format msgid "Can't add padding to %s: %s" msgstr "" -#: objcopy.c:1068 +#: objcopy.c:1075 #, c-format msgid "%s: error copying private BFD data: %s" msgstr "" -#: objcopy.c:1102 +#: objcopy.c:1109 #, c-format msgid "cannot mkdir %s for archive copying (error: %s)" msgstr "" -#: objcopy.c:1291 +#: objcopy.c:1298 msgid "making" msgstr "" -#: objcopy.c:1300 +#: objcopy.c:1307 msgid "size" msgstr "" -#: objcopy.c:1314 +#: objcopy.c:1321 msgid "vma" msgstr "" -#: objcopy.c:1340 +#: objcopy.c:1347 msgid "alignment" msgstr "" -#: objcopy.c:1349 +#: objcopy.c:1356 msgid "flags" msgstr "" -#: objcopy.c:1363 +#: objcopy.c:1370 msgid "private data" msgstr "" -#: objcopy.c:1371 +#: objcopy.c:1378 #, c-format msgid "%s: section `%s': error in %s: %s" msgstr "" -#: objcopy.c:1645 +#: objcopy.c:1652 #, c-format msgid "%s: can't create debugging section: %s" msgstr "" -#: objcopy.c:1660 +#: objcopy.c:1667 #, c-format msgid "%s: can't set debugging section contents: %s" msgstr "" -#: objcopy.c:1669 +#: objcopy.c:1676 #, c-format msgid "%s: don't know how to write debugging information for %s" msgstr "" -#: objcopy.c:1775 +#: objcopy.c:1782 #, c-format msgid "%s: cannot stat: %s" msgstr "" -#: objcopy.c:1825 +#: objcopy.c:1832 msgid "byte number must be non-negative" msgstr "" -#: objcopy.c:1831 +#: objcopy.c:1838 msgid "interleave must be positive" msgstr "" -#: objcopy.c:1851 objcopy.c:1859 +#: objcopy.c:1858 objcopy.c:1866 #, c-format msgid "%s both copied and removed" msgstr "" -#: objcopy.c:1928 objcopy.c:1998 objcopy.c:2099 objcopy.c:2127 +#: objcopy.c:1935 objcopy.c:2005 objcopy.c:2106 objcopy.c:2134 #, c-format msgid "bad format for %s" msgstr "" -#: objcopy.c:1931 +#: objcopy.c:1938 #, c-format msgid "cannot stat: %s: %s" msgstr "" -#: objcopy.c:1949 +#: objcopy.c:1956 #, c-format msgid "cannot open: %s: %s" msgstr "" -#: objcopy.c:1953 +#: objcopy.c:1960 #, c-format msgid "%s: fread failed" msgstr "" -#: objcopy.c:2067 +#: objcopy.c:2074 #, c-format msgid "Warning: truncating gap-fill from 0x%s to 0x%x" msgstr "" -#: objcopy.c:2169 +#: objcopy.c:2176 msgid "byte number must be less than interleave" msgstr "" -#: objcopy.c:2188 +#: objcopy.c:2195 #, c-format msgid "Cannot stat: %s: %s" msgstr "" -#: objcopy.c:2228 objcopy.c:2242 +#: objcopy.c:2235 objcopy.c:2249 #, c-format msgid "%s %s%c0x%s never used" msgstr "" @@ -1812,15 +1816,15 @@ msgid "" "disassembling\n" " -EL --endian=little Assume little endian format when " "disassembling\n" -" --file-start-context Include context from start of file (with " -"-S)\n" +" --file-start-context Include context from start of file (with -" +"S)\n" " -l, --line-numbers Include line numbers and filenames in " "output\n" " -C, --demangle[=STYLE] Decode mangled/processed symbol names\n" " The STYLE, if specified, can be `auto', " "'gnu',\n" -" 'lucid', 'arm', 'hp', 'edg', or " -"'gnu-new-abi'\n" +" 'lucid', 'arm', 'hp', 'edg', or 'gnu-new-" +"abi'\n" " -w, --wide Format output for more than 80 columns\n" " -z, --disassemble-zeroes Do not skip blocks of zeroes when " "disassembling\n" @@ -1996,984 +2000,1017 @@ msgstr "" msgid "Last stabs entries before error:\n" msgstr "" -#: readelf.c:260 +#: readelf.c:271 #, c-format msgid "Unable to seek to start of %s at %x\n" msgstr "" -#: readelf.c:268 +#: readelf.c:279 #, c-format msgid "Out of memory allocating %d bytes for %s\n" msgstr "" -#: readelf.c:274 +#: readelf.c:285 #, c-format msgid "Unable to read in %d bytes of %s\n" msgstr "" -#: readelf.c:284 +#: readelf.c:295 #, c-format msgid "Unable to seek to %x for %s\n" msgstr "" -#: readelf.c:289 +#: readelf.c:300 #, c-format msgid "Unable to read data at %x for %s\n" msgstr "" -#: readelf.c:304 readelf.c:330 +#: readelf.c:315 readelf.c:341 #, c-format msgid "%s: Error: " msgstr "" -#: readelf.c:316 readelf.c:345 +#: readelf.c:327 readelf.c:356 #, c-format msgid "%s: Warning: " msgstr "" -#: readelf.c:395 readelf.c:533 +#: readelf.c:409 readelf.c:548 #, c-format msgid "Unhandled data length: %d\n" msgstr "" -#: readelf.c:597 +#: readelf.c:612 msgid "Don't know about relocations on this machine architecture\n" msgstr "" -#: readelf.c:637 readelf.c:666 readelf.c:698 readelf.c:726 +#: readelf.c:643 readelf.c:670 readelf.c:713 readelf.c:738 msgid "out of memory parsing relocs" msgstr "" -#: readelf.c:744 +#: readelf.c:787 msgid "" " Offset Info Type Symbol's Value Symbol's Name " "Addend\n" msgstr "" -#: readelf.c:747 +#: readelf.c:790 msgid " Offset Info Type Symbol's Value Symbol's Name\n" msgstr "" -#: readelf.c:907 readelf.c:909 +#: readelf.c:950 readelf.c:952 #, c-format msgid "unrecognised: %-7lx" msgstr "" -#: readelf.c:934 +#: readelf.c:977 #, c-format msgid "" msgstr "" -#: readelf.c:1147 +#: readelf.c:1193 #, c-format msgid "Processor Specific: %lx" msgstr "" -#: readelf.c:1166 +#: readelf.c:1212 #, c-format msgid "Operating System specific: %lx" msgstr "" -#: readelf.c:1169 readelf.c:1677 +#: readelf.c:1215 readelf.c:1756 #, c-format msgid ": %lx" msgstr "" -#: readelf.c:1183 +#: readelf.c:1229 msgid "NONE (None)" msgstr "" -#: readelf.c:1184 +#: readelf.c:1230 msgid "REL (Relocatable file)" msgstr "" -#: readelf.c:1185 +#: readelf.c:1231 msgid "EXEC (Executable file)" msgstr "" -#: readelf.c:1186 +#: readelf.c:1232 msgid "DYN (Shared object file)" msgstr "" -#: readelf.c:1187 +#: readelf.c:1233 msgid "CORE (Core file)" msgstr "" -#: readelf.c:1191 +#: readelf.c:1237 #, c-format msgid "Processor Specific: (%x)" msgstr "" -#: readelf.c:1193 +#: readelf.c:1239 #, c-format msgid "OS Specific: (%x)" msgstr "" -#: readelf.c:1195 readelf.c:1281 readelf.c:1811 +#: readelf.c:1241 readelf.c:1327 readelf.c:1907 #, c-format msgid ": %x" msgstr "" -#: readelf.c:1208 +#: readelf.c:1254 msgid "None" msgstr "" -#: readelf.c:1849 +#: readelf.c:1946 msgid "Usage: readelf {options} elf-file(s)\n" msgstr "" -#: readelf.c:1850 +#: readelf.c:1947 msgid " Options are:\n" msgstr "" -#: readelf.c:1851 +#: readelf.c:1948 msgid " -a or --all Equivalent to: -h -l -S -s -r -d -V -A -I\n" msgstr "" -#: readelf.c:1852 +#: readelf.c:1949 msgid " -h or --file-header Display the ELF file header\n" msgstr "" -#: readelf.c:1853 +#: readelf.c:1950 msgid " -l or --program-headers or --segments\n" msgstr "" -#: readelf.c:1854 +#: readelf.c:1951 msgid " Display the program headers\n" msgstr "" -#: readelf.c:1855 +#: readelf.c:1952 msgid " -S or --section-headers or --sections\n" msgstr "" -#: readelf.c:1856 +#: readelf.c:1953 msgid " Display the sections' header\n" msgstr "" -#: readelf.c:1857 +#: readelf.c:1954 msgid " -e or --headers Equivalent to: -h -l -S\n" msgstr "" -#: readelf.c:1858 +#: readelf.c:1955 msgid " -s or --syms or --symbols Display the symbol table\n" msgstr "" -#: readelf.c:1859 +#: readelf.c:1956 msgid " -n or --notes Display the core notes (if present)\n" msgstr "" -#: readelf.c:1860 +#: readelf.c:1957 msgid " -r or --relocs Display the relocations (if present)\n" msgstr "" -#: readelf.c:1861 +#: readelf.c:1958 +msgid " -u or --unwind Display the unwind info (if present)\n" +msgstr "" + +#: readelf.c:1959 msgid " -d or --dynamic Display the dynamic segment (if present)\n" msgstr "" -#: readelf.c:1862 +#: readelf.c:1960 msgid " -V or --version-info Display the version sections (if present)\n" msgstr "" -#: readelf.c:1863 +#: readelf.c:1961 msgid "" " -A or --arch-specific Display architecture specific information (if " "any).\n" msgstr "" -#: readelf.c:1864 +#: readelf.c:1962 msgid "" " -D or --use-dynamic Use the dynamic section info when displaying " "symbols\n" msgstr "" -#: readelf.c:1865 +#: readelf.c:1963 msgid " -x or --hex-dump=\n" msgstr "" -#: readelf.c:1866 +#: readelf.c:1964 msgid " Dump the contents of section \n" msgstr "" -#: readelf.c:1867 +#: readelf.c:1965 msgid "" " -w[liaprf] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames]\n" msgstr "" -#: readelf.c:1868 +#: readelf.c:1966 msgid "" " Display the contents of DWARF2 debug sections\n" msgstr "" -#: readelf.c:1870 +#: readelf.c:1968 msgid " -i or --instruction-dump=\n" msgstr "" -#: readelf.c:1871 +#: readelf.c:1969 msgid "" " Disassemble the contents of section \n" msgstr "" -#: readelf.c:1873 +#: readelf.c:1971 msgid " -I or --histogram Display histogram of bucket list lengths\n" msgstr "" -#: readelf.c:1874 +#: readelf.c:1972 msgid " -v or --version Display the version number of readelf\n" msgstr "" -#: readelf.c:1875 +#: readelf.c:1973 msgid " -H or --help Display this information\n" msgstr "" -#: readelf.c:1893 +#: readelf.c:1991 msgid "Out of memory allocating dump request table." msgstr "" -#: readelf.c:2033 +#: readelf.c:2136 #, c-format msgid "Unrecognised debug option '%s'\n" msgstr "" -#: readelf.c:2058 +#: readelf.c:2161 #, c-format msgid "Invalid option '-%c'\n" msgstr "" -#: readelf.c:2071 +#: readelf.c:2174 msgid "Nothing to do.\n" msgstr "" -#: readelf.c:2084 readelf.c:2101 readelf.c:3740 +#: readelf.c:2187 readelf.c:2204 readelf.c:4267 msgid "none" msgstr "" -#: readelf.c:2085 +#: readelf.c:2188 msgid "ELF32" msgstr "" -#: readelf.c:2086 +#: readelf.c:2189 msgid "ELF64" msgstr "" -#: readelf.c:2088 readelf.c:2105 readelf.c:2133 +#: readelf.c:2191 readelf.c:2208 readelf.c:2236 #, c-format msgid "" msgstr "" -#: readelf.c:2102 +#: readelf.c:2205 msgid "2's complement, little endian" msgstr "" -#: readelf.c:2103 +#: readelf.c:2206 msgid "2's complement, big endian" msgstr "" -#: readelf.c:2118 +#: readelf.c:2221 msgid "UNIX - System V" msgstr "" -#: readelf.c:2119 +#: readelf.c:2222 msgid "UNIX - HP-UX" msgstr "" -#: readelf.c:2120 +#: readelf.c:2223 msgid "UNIX - NetBSD" msgstr "" -#: readelf.c:2121 +#: readelf.c:2224 msgid "UNIX - Linux" msgstr "" -#: readelf.c:2122 +#: readelf.c:2225 msgid "GNU/Hurd" msgstr "" -#: readelf.c:2123 +#: readelf.c:2226 msgid "UNIX - Solaris" msgstr "" -#: readelf.c:2124 +#: readelf.c:2227 msgid "UNIX - AIX" msgstr "" -#: readelf.c:2125 +#: readelf.c:2228 msgid "UNIX - IRIX" msgstr "" -#: readelf.c:2126 +#: readelf.c:2229 msgid "UNIX - FreeBSD" msgstr "" -#: readelf.c:2127 +#: readelf.c:2230 msgid "UNIX - TRU64" msgstr "" -#: readelf.c:2128 +#: readelf.c:2231 msgid "Novell - Modesto" msgstr "" -#: readelf.c:2129 +#: readelf.c:2232 msgid "UNIX - OpenBSD" msgstr "" -#: readelf.c:2130 +#: readelf.c:2233 msgid "Standalone App" msgstr "" -#: readelf.c:2131 +#: readelf.c:2234 msgid "ARM" msgstr "" -#: readelf.c:2148 +#: readelf.c:2251 msgid "Not an ELF file - it has the wrong magic bytes at the start\n" msgstr "" -#: readelf.c:2156 +#: readelf.c:2259 msgid "ELF Header:\n" msgstr "" -#: readelf.c:2157 +#: readelf.c:2260 msgid " Magic: " msgstr "" -#: readelf.c:2161 +#: readelf.c:2264 #, c-format msgid " Class: %s\n" msgstr "" -#: readelf.c:2163 +#: readelf.c:2266 #, c-format msgid " Data: %s\n" msgstr "" -#: readelf.c:2165 +#: readelf.c:2268 #, c-format msgid " Version: %d %s\n" msgstr "" -#: readelf.c:2172 +#: readelf.c:2275 #, c-format msgid " OS/ABI: %s\n" msgstr "" -#: readelf.c:2174 +#: readelf.c:2277 #, c-format msgid " ABI Version: %d\n" msgstr "" -#: readelf.c:2176 +#: readelf.c:2279 #, c-format msgid " Type: %s\n" msgstr "" -#: readelf.c:2178 +#: readelf.c:2281 #, c-format msgid " Machine: %s\n" msgstr "" -#: readelf.c:2180 +#: readelf.c:2283 #, c-format msgid " Version: 0x%lx\n" msgstr "" -#: readelf.c:2183 +#: readelf.c:2286 msgid " Entry point address: " msgstr "" -#: readelf.c:2185 +#: readelf.c:2288 msgid "" "\n" " Start of program headers: " msgstr "" -#: readelf.c:2187 +#: readelf.c:2290 msgid "" " (bytes into file)\n" " Start of section headers: " msgstr "" -#: readelf.c:2189 +#: readelf.c:2292 msgid " (bytes into file)\n" msgstr "" -#: readelf.c:2191 +#: readelf.c:2294 #, c-format msgid " Flags: 0x%lx%s\n" msgstr "" -#: readelf.c:2194 +#: readelf.c:2297 #, c-format msgid " Size of this header: %ld (bytes)\n" msgstr "" -#: readelf.c:2196 +#: readelf.c:2299 #, c-format msgid " Size of program headers: %ld (bytes)\n" msgstr "" -#: readelf.c:2198 +#: readelf.c:2301 #, c-format msgid " Number of program headers: %ld\n" msgstr "" -#: readelf.c:2200 +#: readelf.c:2303 #, c-format msgid " Size of section headers: %ld (bytes)\n" msgstr "" -#: readelf.c:2202 +#: readelf.c:2305 #, c-format msgid " Number of section headers: %ld\n" msgstr "" -#: readelf.c:2204 +#: readelf.c:2307 #, c-format msgid " Section header string table index: %ld\n" msgstr "" -#: readelf.c:2289 +#: readelf.c:2392 msgid "" "\n" "There are no program headers in this file.\n" msgstr "" -#: readelf.c:2295 +#: readelf.c:2398 #, c-format msgid "" "\n" "Elf file type is %s\n" msgstr "" -#: readelf.c:2296 +#: readelf.c:2399 msgid "Entry point " msgstr "" -#: readelf.c:2298 +#: readelf.c:2401 #, c-format msgid "" "\n" "There are %d program headers, starting at offset " msgstr "" -#: readelf.c:2309 readelf.c:2485 readelf.c:2527 readelf.c:2570 readelf.c:2611 -#: readelf.c:3133 readelf.c:3174 readelf.c:3350 readelf.c:4358 readelf.c:4372 -#: readelf.c:7741 readelf.c:7781 +#: readelf.c:2412 readelf.c:2588 readelf.c:2630 readelf.c:2673 readelf.c:2714 +#: readelf.c:3660 readelf.c:3701 readelf.c:3877 readelf.c:4798 readelf.c:4812 +#: readelf.c:8251 readelf.c:8291 msgid "Out of memory\n" msgstr "" -#: readelf.c:2327 +#: readelf.c:2430 #, c-format msgid "" "\n" "Program Header%s:\n" msgstr "" -#: readelf.c:2331 +#: readelf.c:2434 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n" msgstr "" -#: readelf.c:2335 +#: readelf.c:2438 msgid " Type Offset VirtAddr PhysAddr\n" msgstr "" -#: readelf.c:2337 +#: readelf.c:2440 msgid " FileSiz MemSiz Flags Align\n" msgstr "" -#: readelf.c:2395 +#: readelf.c:2498 msgid "more than one dynamic segment\n" msgstr "" -#: readelf.c:2403 +#: readelf.c:2506 msgid "Unable to find program interpreter name\n" msgstr "" -#: readelf.c:2410 +#: readelf.c:2513 #, c-format msgid "" "\n" " [Requesting program interpreter: %s]" msgstr "" -#: readelf.c:2428 +#: readelf.c:2531 msgid "" "\n" " Section to Segment mapping:\n" msgstr "" -#: readelf.c:2429 +#: readelf.c:2532 msgid " Segment Sections...\n" msgstr "" -#: readelf.c:2693 +#: readelf.c:2796 msgid "" "\n" "There are no sections in this file.\n" msgstr "" -#: readelf.c:2699 +#: readelf.c:2802 #, c-format msgid "There are %d section headers, starting at offset 0x%lx:\n" msgstr "" -#: readelf.c:2739 +#: readelf.c:2840 msgid "File contains multiple dynamic symbol tables\n" msgstr "" -#: readelf.c:2752 +#: readelf.c:2853 msgid "File contains multiple dynamic string tables\n" msgstr "" -#: readelf.c:2786 +#: readelf.c:2888 #, c-format msgid "" "\n" "Section Header%s:\n" msgstr "" -#: readelf.c:2790 +#: readelf.c:2892 msgid "" " [Nr] Name Type Addr Off Size ES Flg Lk " "Inf Al\n" msgstr "" -#: readelf.c:2793 +#: readelf.c:2895 msgid " [Nr] Name Type Address Offset\n" msgstr "" -#: readelf.c:2794 +#: readelf.c:2896 msgid " Size EntSize Flags Link Info Align\n" msgstr "" -#: readelf.c:2841 +#: readelf.c:2943 msgid "Key to Flags:\n" msgstr "" -#: readelf.c:2842 +#: readelf.c:2944 msgid " W (write), A (alloc), X (execute), M (merge), S (strings)\n" msgstr "" -#: readelf.c:2843 +#: readelf.c:2945 msgid " I (info), L (link order), G (group), x (unknown)\n" msgstr "" -#: readelf.c:2844 +#: readelf.c:2946 msgid "" " O (extra OS processing required) o (OS specific), p (processor specific)\n" msgstr "" -#: readelf.c:2902 +#: readelf.c:3004 #, c-format msgid "" "\n" "Relocation section at offset 0x%lx contains %ld bytes:\n" msgstr "" -#: readelf.c:2909 +#: readelf.c:3011 msgid "" "\n" "There are no dynamic relocations in this file.\n" msgstr "" -#: readelf.c:2937 +#: readelf.c:3039 msgid "" "\n" "Relocation section " msgstr "" -#: readelf.c:2944 +#: readelf.c:3046 readelf.c:3480 #, c-format msgid " at offset 0x%lx contains %lu entries:\n" msgstr "" -#: readelf.c:2972 +#: readelf.c:3074 msgid "" "\n" "There are no relocations in this file.\n" msgstr "" -#: readelf.c:3227 +#: readelf.c:3318 readelf.c:3330 +#, c-format +msgid "Skipping unexpected symbol type %u" +msgstr "" + +#: readelf.c:3338 +#, c-format +msgid "Skipping unexpected relocation type %s" +msgstr "" + +#: readelf.c:3383 readelf.c:3408 +msgid "" +"\n" +"There are no unwind sections in this file.\n" +msgstr "" + +#: readelf.c:3459 +msgid "" +"\n" +"Could not find unwind info section for " +msgstr "" + +#: readelf.c:3473 +msgid "" +"\n" +"Unwind section " +msgstr "" + +#: readelf.c:3754 msgid "" "\n" "There is no dynamic segment in this file.\n" msgstr "" -#: readelf.c:3261 +#: readelf.c:3788 msgid "Unable to seek to end of file!" msgstr "" -#: readelf.c:3270 +#: readelf.c:3797 msgid "Unable to determine the number of symbols to load\n" msgstr "" -#: readelf.c:3300 +#: readelf.c:3827 msgid "Unable to seek to end of file\n" msgstr "" -#: readelf.c:3306 +#: readelf.c:3833 msgid "Unable to determine the length of the dynamic string table\n" msgstr "" -#: readelf.c:3367 +#: readelf.c:3894 #, c-format msgid "" "\n" "Dynamic segment at offset 0x%x contains %ld entries:\n" msgstr "" -#: readelf.c:3370 +#: readelf.c:3897 msgid " Tag Type Name/Value\n" msgstr "" -#: readelf.c:3406 +#: readelf.c:3933 msgid "Auxiliary library" msgstr "" -#: readelf.c:3410 +#: readelf.c:3937 msgid "Filter library" msgstr "" -#: readelf.c:3414 +#: readelf.c:3941 msgid "Configuration file" msgstr "" -#: readelf.c:3418 +#: readelf.c:3945 msgid "Dependency audit library" msgstr "" -#: readelf.c:3422 +#: readelf.c:3949 msgid "Audit library" msgstr "" -#: readelf.c:3440 readelf.c:3466 readelf.c:3492 +#: readelf.c:3967 readelf.c:3993 readelf.c:4019 msgid "Flags:" msgstr "" -#: readelf.c:3442 readelf.c:3468 readelf.c:3494 +#: readelf.c:3969 readelf.c:3995 readelf.c:4021 msgid " None\n" msgstr "" -#: readelf.c:3613 +#: readelf.c:4140 #, c-format msgid "Shared library: [%s]" msgstr "" -#: readelf.c:3616 +#: readelf.c:4143 msgid " program interpreter" msgstr "" -#: readelf.c:3620 +#: readelf.c:4147 #, c-format msgid "Library soname: [%s]" msgstr "" -#: readelf.c:3624 +#: readelf.c:4151 #, c-format msgid "Library rpath: [%s]" msgstr "" -#: readelf.c:3628 +#: readelf.c:4155 #, c-format msgid "Library runpath: [%s]" msgstr "" -#: readelf.c:3689 +#: readelf.c:4216 #, c-format msgid "Not needed object: [%s]\n" msgstr "" -#: readelf.c:3786 +#: readelf.c:4313 #, c-format msgid "" "\n" "Version definition section '%s' contains %ld entries:\n" msgstr "" -#: readelf.c:3789 +#: readelf.c:4316 msgid " Addr: 0x" msgstr "" -#: readelf.c:3791 readelf.c:3979 +#: readelf.c:4318 readelf.c:4506 #, c-format msgid " Offset: %#08lx Link: %lx (%s)\n" msgstr "" -#: readelf.c:3821 +#: readelf.c:4348 #, c-format msgid " %#06x: Rev: %d Flags: %s" msgstr "" -#: readelf.c:3824 +#: readelf.c:4351 #, c-format msgid " Index: %d Cnt: %d " msgstr "" -#: readelf.c:3835 +#: readelf.c:4362 #, c-format msgid "Name: %s\n" msgstr "" -#: readelf.c:3837 +#: readelf.c:4364 #, c-format msgid "Name index: %ld\n" msgstr "" -#: readelf.c:3852 +#: readelf.c:4379 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr "" -#: readelf.c:3855 +#: readelf.c:4382 #, c-format msgid " %#06x: Parent %d, name index: %ld\n" msgstr "" -#: readelf.c:3874 +#: readelf.c:4401 #, c-format msgid "" "\n" "Version needs section '%s' contains %ld entries:\n" msgstr "" -#: readelf.c:3877 +#: readelf.c:4404 msgid " Addr: 0x" msgstr "" -#: readelf.c:3879 +#: readelf.c:4406 #, c-format msgid " Offset: %#08lx Link to section: %ld (%s)\n" msgstr "" -#: readelf.c:3905 +#: readelf.c:4432 #, c-format msgid " %#06x: Version: %d" msgstr "" -#: readelf.c:3908 +#: readelf.c:4435 #, c-format msgid " File: %s" msgstr "" -#: readelf.c:3910 +#: readelf.c:4437 #, c-format msgid " File: %lx" msgstr "" -#: readelf.c:3912 +#: readelf.c:4439 #, c-format msgid " Cnt: %d\n" msgstr "" -#: readelf.c:3930 +#: readelf.c:4457 #, c-format msgid " %#06x: Name: %s" msgstr "" -#: readelf.c:3933 +#: readelf.c:4460 #, c-format msgid " %#06x: Name index: %lx" msgstr "" -#: readelf.c:3936 +#: readelf.c:4463 #, c-format msgid " Flags: %s Version: %d\n" msgstr "" -#: readelf.c:3974 +#: readelf.c:4501 #, c-format msgid "" "\n" "Version symbols section '%s' contains %d entries:\n" msgstr "" -#: readelf.c:3977 +#: readelf.c:4504 msgid " Addr: " msgstr "" -#: readelf.c:4007 +#: readelf.c:4535 msgid " 0 (*local*) " msgstr "" -#: readelf.c:4011 +#: readelf.c:4539 msgid " 1 (*global*) " msgstr "" -#: readelf.c:4233 +#: readelf.c:4673 msgid "" "\n" "No version information found in this file.\n" msgstr "" -#: readelf.c:4251 readelf.c:4286 +#: readelf.c:4691 readelf.c:4726 #, c-format msgid ": %d" msgstr "" -#: readelf.c:4253 readelf.c:4298 +#: readelf.c:4693 readelf.c:4738 #, c-format msgid ": %d" msgstr "" -#: readelf.c:4255 readelf.c:4301 +#: readelf.c:4695 readelf.c:4741 #, c-format msgid ": %d" msgstr "" -#: readelf.c:4364 +#: readelf.c:4804 msgid "Unable to read in dynamic data\n" msgstr "" -#: readelf.c:4406 +#: readelf.c:4846 msgid "Unable to seek to start of dynamic information" msgstr "" -#: readelf.c:4412 +#: readelf.c:4852 msgid "Failed to read in number of buckets\n" msgstr "" -#: readelf.c:4418 +#: readelf.c:4858 msgid "Failed to read in number of chains\n" msgstr "" -#: readelf.c:4438 +#: readelf.c:4878 msgid "" "\n" "Symbol table for image:\n" msgstr "" -#: readelf.c:4440 +#: readelf.c:4880 msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:4442 +#: readelf.c:4882 msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:4486 +#: readelf.c:4926 #, c-format msgid "" "\n" "Symbol table '%s' contains %lu entries:\n" msgstr "" -#: readelf.c:4490 +#: readelf.c:4930 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:4492 +#: readelf.c:4932 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:4601 +#: readelf.c:5042 msgid "bad dynamic symbol" msgstr "" -#: readelf.c:4660 +#: readelf.c:5102 msgid "" "\n" "Dynamic symbol information is not available for displaying symbols.\n" msgstr "" -#: readelf.c:4672 +#: readelf.c:5114 #, c-format msgid "" "\n" "Histogram for bucket list length (total of %d buckets):\n" msgstr "" -#: readelf.c:4674 +#: readelf.c:5116 +#, c-format msgid " Length Number %% of total Coverage\n" msgstr "" -#: readelf.c:4679 readelf.c:4698 readelf.c:7423 readelf.c:7616 +#: readelf.c:5121 readelf.c:5140 readelf.c:7933 readelf.c:8126 msgid "Out of memory" msgstr "" -#: readelf.c:4747 +#: readelf.c:5189 #, c-format msgid "" "\n" "Dynamic info segment at offset 0x%lx contains %d entries:\n" msgstr "" -#: readelf.c:4750 +#: readelf.c:5192 msgid " Num: Name BoundTo Flags\n" msgstr "" -#: readelf.c:4798 +#: readelf.c:5240 #, c-format msgid "" "\n" "Assembly dump of section %s\n" msgstr "" -#: readelf.c:4821 +#: readelf.c:5263 #, c-format msgid "" "\n" "Section '%s' has no data to dump.\n" msgstr "" -#: readelf.c:4826 +#: readelf.c:5268 #, c-format msgid "" "\n" "Hex dump of section '%s':\n" msgstr "" -#: readelf.c:4978 +#: readelf.c:5420 msgid "badly formed extended line op encountered!" msgstr "" -#: readelf.c:4985 +#: readelf.c:5427 #, c-format msgid " Extended opcode %d: " msgstr "" -#: readelf.c:4990 +#: readelf.c:5432 msgid "" "End of Sequence\n" "\n" msgstr "" -#: readelf.c:4996 +#: readelf.c:5438 #, c-format msgid "set Address to 0x%lx\n" msgstr "" -#: readelf.c:5001 +#: readelf.c:5443 msgid " define new File Table entry\n" msgstr "" -#: readelf.c:5002 readelf.c:5124 +#: readelf.c:5444 readelf.c:5566 msgid " Entry\tDir\tTime\tSize\tName\n" msgstr "" -#: readelf.c:5004 +#: readelf.c:5446 #, c-format msgid " %d\t" msgstr "" -#: readelf.c:5007 readelf.c:5009 readelf.c:5011 readelf.c:5136 readelf.c:5138 -#: readelf.c:5140 +#: readelf.c:5449 readelf.c:5451 readelf.c:5453 readelf.c:5578 readelf.c:5580 +#: readelf.c:5582 #, c-format msgid "%lu\t" msgstr "" -#: readelf.c:5012 +#: readelf.c:5454 #, c-format msgid "" "%s\n" "\n" msgstr "" -#: readelf.c:5016 +#: readelf.c:5458 #, c-format msgid "UNKNOWN: length %d\n" msgstr "" -#: readelf.c:5042 +#: readelf.c:5484 #, c-format msgid "" "\n" @@ -2981,503 +3018,503 @@ msgid "" "\n" msgstr "" -#: readelf.c:5054 +#: readelf.c:5496 msgid "The line info appears to be corrupt - the section is too small\n" msgstr "" -#: readelf.c:5062 +#: readelf.c:5504 msgid "Only DWARF version 2 line info is currently supported.\n" msgstr "" -#: readelf.c:5077 +#: readelf.c:5519 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:5078 +#: readelf.c:5520 #, c-format msgid " DWARF Version: %d\n" msgstr "" -#: readelf.c:5079 +#: readelf.c:5521 #, c-format -msgid " Prolgue Length: %d\n" +msgid " Prologue Length: %d\n" msgstr "" -#: readelf.c:5080 +#: readelf.c:5522 #, c-format msgid " Minimum Instruction Length: %d\n" msgstr "" -#: readelf.c:5081 +#: readelf.c:5523 #, c-format msgid " Initial value of 'is_stmt': %d\n" msgstr "" -#: readelf.c:5082 +#: readelf.c:5524 #, c-format msgid " Line Base: %d\n" msgstr "" -#: readelf.c:5083 +#: readelf.c:5525 #, c-format msgid " Line Range: %d\n" msgstr "" -#: readelf.c:5084 +#: readelf.c:5526 #, c-format msgid " Opcode Base: %d\n" msgstr "" -#: readelf.c:5093 +#: readelf.c:5535 msgid "" "\n" " Opcodes:\n" msgstr "" -#: readelf.c:5096 +#: readelf.c:5538 #, c-format msgid " Opcode %d has %d args\n" msgstr "" -#: readelf.c:5102 +#: readelf.c:5544 msgid "" "\n" " The Directory Table is empty.\n" msgstr "" -#: readelf.c:5105 +#: readelf.c:5547 msgid "" "\n" " The Directory Table:\n" msgstr "" -#: readelf.c:5109 +#: readelf.c:5551 #, c-format msgid " %s\n" msgstr "" -#: readelf.c:5120 +#: readelf.c:5562 msgid "" "\n" " The File Name Table is empty.\n" msgstr "" -#: readelf.c:5123 +#: readelf.c:5565 msgid "" "\n" " The File Name Table:\n" msgstr "" -#: readelf.c:5131 +#: readelf.c:5573 #, c-format msgid " %d\t" msgstr "" -#: readelf.c:5142 +#: readelf.c:5584 #, c-format msgid "%s\n" msgstr "" #. Now display the statements. -#: readelf.c:5150 +#: readelf.c:5592 msgid "" "\n" " Line Number Statements:\n" msgstr "" -#: readelf.c:5169 +#: readelf.c:5611 msgid " Copy\n" msgstr "" -#: readelf.c:5176 +#: readelf.c:5618 #, c-format msgid " Advance PC by %d to %lx\n" msgstr "" -#: readelf.c:5184 +#: readelf.c:5626 #, c-format msgid " Advance Line by %d to %d\n" msgstr "" -#: readelf.c:5191 +#: readelf.c:5633 #, c-format msgid " Set File Name to entry %d in the File Name Table\n" msgstr "" -#: readelf.c:5199 +#: readelf.c:5641 #, c-format msgid " Set column to %d\n" msgstr "" -#: readelf.c:5206 +#: readelf.c:5648 #, c-format msgid " Set is_stmt to %d\n" msgstr "" -#: readelf.c:5211 +#: readelf.c:5653 msgid " Set basic block\n" msgstr "" -#: readelf.c:5219 +#: readelf.c:5661 #, c-format msgid " Advance PC by constant %d to 0x%lx\n" msgstr "" -#: readelf.c:5227 +#: readelf.c:5669 #, c-format msgid " Advance PC by fixed size amount %d to 0x%lx\n" msgstr "" -#: readelf.c:5235 +#: readelf.c:5677 #, c-format msgid " Special opcode %d: advance Address by %d to 0x%lx" msgstr "" -#: readelf.c:5239 +#: readelf.c:5681 #, c-format msgid " and Line by %d to %d\n" msgstr "" -#: readelf.c:5262 readelf.c:5691 +#: readelf.c:5704 readelf.c:6133 #, c-format msgid "" "Contents of the %s section:\n" "\n" msgstr "" -#: readelf.c:5285 +#: readelf.c:5727 msgid "Only DWARF 2 pubnames are currently supported\n" msgstr "" -#: readelf.c:5292 +#: readelf.c:5734 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:5294 +#: readelf.c:5736 #, c-format msgid " Version: %d\n" msgstr "" -#: readelf.c:5296 +#: readelf.c:5738 #, c-format msgid " Offset into .debug_info section: %ld\n" msgstr "" -#: readelf.c:5298 +#: readelf.c:5740 #, c-format msgid " Size of area in .debug_info section: %ld\n" msgstr "" -#: readelf.c:5301 +#: readelf.c:5743 msgid "" "\n" " Offset\tName\n" msgstr "" -#: readelf.c:5383 +#: readelf.c:5825 #, c-format msgid "Unknown TAG value: %lx" msgstr "" -#: readelf.c:5478 +#: readelf.c:5920 #, c-format msgid "Unknown AT value: %lx" msgstr "" -#: readelf.c:5515 +#: readelf.c:5957 #, c-format msgid "Unknown FORM value: %lx" msgstr "" -#: readelf.c:5697 +#: readelf.c:6139 msgid " Number TAG\n" msgstr "" -#: readelf.c:5703 +#: readelf.c:6145 #, c-format msgid " %ld %s [%s]\n" msgstr "" -#: readelf.c:5706 +#: readelf.c:6148 msgid "has children" msgstr "" -#: readelf.c:5706 +#: readelf.c:6148 msgid "no children" msgstr "" -#: readelf.c:5710 +#: readelf.c:6152 #, c-format msgid " %-18s %s\n" msgstr "" -#: readelf.c:5729 +#: readelf.c:6171 #, c-format msgid " %lu byte block: " msgstr "" -#: readelf.c:6036 +#: readelf.c:6478 msgid "(User defined location op)" msgstr "" -#: readelf.c:6038 +#: readelf.c:6480 msgid "(Unknown location op)" msgstr "" -#: readelf.c:6165 +#: readelf.c:6607 #, c-format msgid "Unable to handle FORM: %d" msgstr "" -#: readelf.c:6169 +#: readelf.c:6611 #, c-format msgid "Unrecognised form: %d" msgstr "" -#: readelf.c:6182 +#: readelf.c:6624 msgid "(not inlined)" msgstr "" -#: readelf.c:6183 +#: readelf.c:6625 msgid "(inlined)" msgstr "" -#: readelf.c:6184 +#: readelf.c:6626 msgid "(declared as inline but ignored)" msgstr "" -#: readelf.c:6185 +#: readelf.c:6627 msgid "(declared as inline and inlined)" msgstr "" -#: readelf.c:6186 +#: readelf.c:6628 #, c-format msgid " (Unknown inline attribute value: %lx)" msgstr "" -#: readelf.c:6315 readelf.c:6441 +#: readelf.c:6757 readelf.c:6883 #, c-format msgid "" "The section %s contains:\n" "\n" msgstr "" -#: readelf.c:6337 +#: readelf.c:6779 #, c-format msgid " Compilation Unit @ %lx:\n" msgstr "" -#: readelf.c:6338 +#: readelf.c:6780 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:6339 +#: readelf.c:6781 #, c-format msgid " Version: %d\n" msgstr "" -#: readelf.c:6340 +#: readelf.c:6782 #, c-format msgid " Abbrev Offset: %ld\n" msgstr "" -#: readelf.c:6341 +#: readelf.c:6783 #, c-format msgid " Pointer Size: %d\n" msgstr "" -#: readelf.c:6345 +#: readelf.c:6787 msgid "Only version 2 DWARF debug information is currently supported.\n" msgstr "" -#: readelf.c:6367 +#: readelf.c:6809 msgid "Unable to locate .debug_abbrev section!\n" msgstr "" -#: readelf.c:6407 +#: readelf.c:6849 #, c-format msgid "Unable to locate entry %lu in the abbreviation table\n" msgstr "" -#: readelf.c:6412 +#: readelf.c:6854 #, c-format msgid " <%d><%x>: Abbrev Number: %lu (%s)\n" msgstr "" -#: readelf.c:6462 +#: readelf.c:6904 msgid "Only DWARF 2 aranges are currently supported.\n" msgstr "" -#: readelf.c:6466 +#: readelf.c:6908 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:6467 +#: readelf.c:6909 #, c-format msgid " Version: %d\n" msgstr "" -#: readelf.c:6468 +#: readelf.c:6910 #, c-format msgid " Offset into .debug_info: %lx\n" msgstr "" -#: readelf.c:6469 +#: readelf.c:6911 #, c-format msgid " Pointer Size: %d\n" msgstr "" -#: readelf.c:6470 +#: readelf.c:6912 #, c-format msgid " Segment Size: %d\n" msgstr "" -#: readelf.c:6472 +#: readelf.c:6914 msgid "" "\n" " Address Length\n" msgstr "" -#: readelf.c:6634 +#: readelf.c:7092 #, c-format msgid "The section %s contains:\n" msgstr "" -#: readelf.c:7109 +#: readelf.c:7620 #, c-format msgid "Displaying the debug contents of section %s is not yet supported.\n" msgstr "" -#: readelf.c:7173 +#: readelf.c:7683 #, c-format msgid "" "\n" "Section '%s' has no debugging data.\n" msgstr "" -#: readelf.c:7192 +#: readelf.c:7702 #, c-format msgid "Unrecognised debug section: %s\n" msgstr "" -#: readelf.c:7264 +#: readelf.c:7774 msgid "Some sections were not dumped because they do not exist!\n" msgstr "" -#: readelf.c:7447 +#: readelf.c:7957 #, c-format msgid "" "\n" "Section '%s' contains %d entries:\n" msgstr "" -#: readelf.c:7609 +#: readelf.c:8119 msgid "conflict list with without table" msgstr "" -#: readelf.c:7637 +#: readelf.c:8147 #, c-format msgid "" "\n" "Section '.conflict' contains %d entries:\n" msgstr "" -#: readelf.c:7638 +#: readelf.c:8148 msgid " Num: Index Value Name" msgstr "" -#: readelf.c:7663 +#: readelf.c:8173 msgid "NT_PRSTATUS (prstatus structure)" msgstr "" -#: readelf.c:7664 +#: readelf.c:8174 msgid "NT_FPREGSET (floating point registers)" msgstr "" -#: readelf.c:7665 +#: readelf.c:8175 msgid "NT_PRPSINFO (prpsinfo structure)" msgstr "" -#: readelf.c:7666 +#: readelf.c:8176 msgid "NT_TASKSTRUCT (task structure)" msgstr "" -#: readelf.c:7667 +#: readelf.c:8177 msgid "NT_PRXFPREG (user_xfpregs structure)" msgstr "" -#: readelf.c:7668 +#: readelf.c:8178 msgid "NT_PSTATUS (pstatus structure)" msgstr "" -#: readelf.c:7669 +#: readelf.c:8179 msgid "NT_FPREGS (floating point registers)" msgstr "" -#: readelf.c:7670 +#: readelf.c:8180 msgid "NT_PSINFO (psinfo structure)" msgstr "" -#: readelf.c:7671 +#: readelf.c:8181 msgid "NT_LWPSTATUS (lwpstatus_t structure)" msgstr "" -#: readelf.c:7672 +#: readelf.c:8182 msgid "NT_LWPSINFO (lwpsinfo_t structure)" msgstr "" -#: readelf.c:7673 +#: readelf.c:8183 msgid "NT_WIN32PSTATUS (win32_pstatus strcuture)" msgstr "" -#: readelf.c:7675 +#: readelf.c:8185 #, c-format msgid "Unknown note type: (0x%08x)" msgstr "" -#: readelf.c:7713 +#: readelf.c:8223 #, c-format msgid "" "\n" "Notes at offset 0x%08lx with length 0x%08lx:\n" msgstr "" -#: readelf.c:7715 +#: readelf.c:8225 msgid " Owner\t\tData size\tDescription\n" msgstr "" -#: readelf.c:7826 +#: readelf.c:8336 msgid "No note segments present in the core file.\n" msgstr "" -#: readelf.c:7904 +#: readelf.c:8414 msgid "This instance of readelf has been built without support for a\n" msgstr "" -#: readelf.c:7905 +#: readelf.c:8415 msgid "64 bit data type and so it cannot read 64 bit ELF files.\n" msgstr "" -#: readelf.c:7940 +#: readelf.c:8450 #, c-format msgid "Cannot stat input file %s.\n" msgstr "" -#: readelf.c:7947 +#: readelf.c:8457 #, c-format msgid "Input file %s not found.\n" msgstr "" -#: readelf.c:7953 +#: readelf.c:8463 #, c-format msgid "%s: Failed to read file header\n" msgstr "" -#: readelf.c:7967 +#: readelf.c:8477 #, c-format msgid "" "\n" @@ -3907,98 +3944,98 @@ msgstr "" msgid "unable to open output file %s" msgstr "" -#: stabs.c:349 stabs.c:1770 +#: stabs.c:343 stabs.c:1760 msgid "numeric overflow" msgstr "" -#: stabs.c:360 +#: stabs.c:354 #, c-format msgid "Bad stab: %s\n" msgstr "" -#: stabs.c:370 +#: stabs.c:364 #, c-format msgid "Warning: %s: %s\n" msgstr "" -#: stabs.c:492 +#: stabs.c:486 msgid "N_LBRAC not within function\n" msgstr "" -#: stabs.c:531 +#: stabs.c:525 msgid "Too many N_RBRACs\n" msgstr "" -#: stabs.c:780 +#: stabs.c:770 msgid "unknown C++ encoded name" msgstr "" #. Complain and keep going, so compilers can invent new #. cross-reference types. -#: stabs.c:1307 +#: stabs.c:1297 msgid "unrecognized cross reference type" msgstr "" #. Does this actually ever happen? Is that why we are worrying #. about dealing with it rather than just calling error_type? -#: stabs.c:1862 +#: stabs.c:1852 msgid "missing index type" msgstr "" -#: stabs.c:2189 +#: stabs.c:2179 msgid "unknown virtual character for baseclass" msgstr "" -#: stabs.c:2207 +#: stabs.c:2197 msgid "unknown visibility character for baseclass" msgstr "" -#: stabs.c:2399 +#: stabs.c:2389 msgid "unnamed $vb type" msgstr "" -#: stabs.c:2405 +#: stabs.c:2395 msgid "unrecognized C++ abbreviation" msgstr "" -#: stabs.c:2485 +#: stabs.c:2475 msgid "unknown visibility character for field" msgstr "" -#: stabs.c:2741 +#: stabs.c:2731 msgid "const/volatile indicator missing" msgstr "" -#: stabs.c:2981 +#: stabs.c:2971 #, c-format msgid "No mangling for \"%s\"\n" msgstr "" -#: stabs.c:3294 +#: stabs.c:3284 msgid "Undefined N_EXCL" msgstr "" -#: stabs.c:3382 +#: stabs.c:3372 #, c-format msgid "Type file number %d out of range\n" msgstr "" -#: stabs.c:3387 +#: stabs.c:3377 #, c-format msgid "Type index number %d out of range\n" msgstr "" -#: stabs.c:3474 +#: stabs.c:3464 #, c-format msgid "Unrecognized XCOFF type %d\n" msgstr "" -#: stabs.c:3773 +#: stabs.c:3763 #, c-format msgid "bad mangled name `%s'\n" msgstr "" -#: stabs.c:3869 +#: stabs.c:3859 msgid "no argument types in mangled string\n" msgstr "" @@ -4031,7 +4068,7 @@ msgid "cannot open input file %s" msgstr "" #: version.c:39 -msgid "Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.\n" +msgid "Copyright 1997, 98, 99, 2000, 2001 Free Software Foundation, Inc.\n" msgstr "" #: version.c:40 diff --git a/contrib/binutils/binutils/prdbg.c b/contrib/binutils/binutils/prdbg.c index abd684d..41c78cb 100644 --- a/contrib/binutils/binutils/prdbg.c +++ b/contrib/binutils/binutils/prdbg.c @@ -1,5 +1,5 @@ /* prdbg.c -- Print out generic debugging information. - Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. + Copyright 1995, 1996 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/rclex.c b/contrib/binutils/binutils/rclex.c index be3602e..d49f395 100644 --- a/contrib/binutils/binutils/rclex.c +++ b/contrib/binutils/binutils/rclex.c @@ -1,7 +1,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.4.1 2001/03/12 15:40:35 pb Exp $ + * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.4.2 2001/06/10 15:37:28 pb Exp $ */ #define FLEX_SCANNER @@ -635,7 +635,7 @@ char *yytext; #line 1 "rclex.l" #define INITIAL 0 #line 2 "rclex.l" -/* Copyright 1997, 1998 Free Software Foundation, Inc. +/* Copyright 1997, 1998, 1999 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/rclex.l b/contrib/binutils/binutils/rclex.l index 47b479b..d05d1c0 100644 --- a/contrib/binutils/binutils/rclex.l +++ b/contrib/binutils/binutils/rclex.l @@ -1,5 +1,5 @@ %{ /* rclex.l -- lexer for Windows rc files parser */ -/* Copyright 1997, 1998 Free Software Foundation, Inc. +/* Copyright 1997, 1998, 1999 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/rcparse.c b/contrib/binutils/binutils/rcparse.c index 63578af..8e050df 100644 --- a/contrib/binutils/binutils/rcparse.c +++ b/contrib/binutils/binutils/rcparse.c @@ -90,7 +90,7 @@ #line 1 "rcparse.y" /* rcparse.y -- parser for Windows rc files - Copyright 1997, 1998 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -764,7 +764,7 @@ static const short yycheck[] = { 3, 54, 55, 56, 88, 89, 90, 91, 92 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/misc/bison.simple" +#line 3 "/usr/share/bison/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -978,7 +978,7 @@ __yy_memcpy (char *to, char *from, unsigned int count) #endif #endif -#line 217 "/usr/share/misc/bison.simple" +#line 217 "/usr/share/bison/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -2919,7 +2919,7 @@ case 243: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/share/misc/bison.simple" +#line 543 "/usr/share/bison/bison.simple" yyvsp -= yylen; yyssp -= yylen; diff --git a/contrib/binutils/binutils/rcparse.y b/contrib/binutils/binutils/rcparse.y index b67338f..89004e7 100644 --- a/contrib/binutils/binutils/rcparse.y +++ b/contrib/binutils/binutils/rcparse.y @@ -1,5 +1,5 @@ %{ /* rcparse.y -- parser for Windows rc files - Copyright 1997, 1998 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/rdcoff.c b/contrib/binutils/binutils/rdcoff.c index 14f973e..0582895 100644 --- a/contrib/binutils/binutils/rdcoff.c +++ b/contrib/binutils/binutils/rdcoff.c @@ -1,5 +1,5 @@ /* stabs.c -- Parse COFF debugging information - Copyright (C) 1996, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1996, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/rddbg.c b/contrib/binutils/binutils/rddbg.c index f9fae05..e6ace77 100644 --- a/contrib/binutils/binutils/rddbg.c +++ b/contrib/binutils/binutils/rddbg.c @@ -1,5 +1,5 @@ /* rddbg.c -- Read debugging information into a generic form. - Copyright (C) 1995, 96, 97, 98, 2000 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/readelf.c b/contrib/binutils/binutils/readelf.c index d506925..bd6cfd2 100644 --- a/contrib/binutils/binutils/readelf.c +++ b/contrib/binutils/binutils/readelf.c @@ -1,5 +1,5 @@ /* readelf.c -- display contents of an ELF format file - Copyright (C) 1998, 99, 2000, 2001 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Originally developed by Eric Youngdale Modifications by Nick Clifton @@ -78,36 +78,37 @@ #include "bucomm.h" #include "getopt.h" -char * program_name = "readelf"; -unsigned int dynamic_addr; -bfd_size_type dynamic_size; -unsigned int rela_addr; -unsigned int rela_size; -char * dynamic_strings; +char * program_name = "readelf"; +unsigned int dynamic_addr; +bfd_size_type dynamic_size; +unsigned int rela_addr; +unsigned int rela_size; +char * dynamic_strings; char * string_table; unsigned long string_table_length; unsigned long num_dynamic_syms; -Elf_Internal_Sym * dynamic_symbols; +Elf_Internal_Sym * dynamic_symbols; Elf_Internal_Syminfo * dynamic_syminfo; -unsigned long dynamic_syminfo_offset; +unsigned long dynamic_syminfo_offset; unsigned int dynamic_syminfo_nent; -char program_interpreter [64]; -int dynamic_info[DT_JMPREL + 1]; -int version_info[16]; -int loadaddr = 0; +char program_interpreter [64]; +int dynamic_info[DT_JMPREL + 1]; +int version_info[16]; +int loadaddr = 0; Elf_Internal_Ehdr elf_header; Elf_Internal_Shdr * section_headers; Elf_Internal_Dyn * dynamic_segment; -int show_name; -int do_dynamic; -int do_syms; -int do_reloc; -int do_sections; -int do_segments; -int do_using_dynamic; -int do_header; -int do_dump; -int do_version; +int show_name; +int do_dynamic; +int do_syms; +int do_reloc; +int do_sections; +int do_segments; +int do_unwind; +int do_using_dynamic; +int do_header; +int do_dump; +int do_version; int do_histogram; int do_debugging; int do_debug_info; @@ -116,6 +117,7 @@ int do_debug_lines; int do_debug_pubnames; int do_debug_aranges; int do_debug_frames; +int do_debug_frames_interp; int do_arch; int do_notes; int is_32bit_elf; @@ -150,6 +152,8 @@ static const char * get_mips_dynamic_type PARAMS ((unsigned long)); static const char * get_sparc64_dynamic_type PARAMS ((unsigned long)); static const char * get_parisc_dynamic_type PARAMS ((unsigned long)); static const char * get_dynamic_type PARAMS ((unsigned long)); +static int slurp_rela_relocs PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rela **, unsigned long *)); +static int slurp_rel_relocs PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rel **, unsigned long *)); static int dump_relocations PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Sym *, unsigned long, char *, int)); static char * get_file_type PARAMS ((unsigned)); static char * get_machine_name PARAMS ((unsigned)); @@ -157,20 +161,23 @@ static void decode_ARM_machine_flags PARAMS ((unsigned, char [])); static char * get_machine_flags PARAMS ((unsigned, unsigned)); static const char * get_mips_segment_type PARAMS ((unsigned long)); static const char * get_parisc_segment_type PARAMS ((unsigned long)); +static const char * get_ia64_segment_type PARAMS ((unsigned long)); static const char * get_segment_type PARAMS ((unsigned long)); static const char * get_mips_section_type_name PARAMS ((unsigned int)); static const char * get_parisc_section_type_name PARAMS ((unsigned int)); +static const char * get_ia64_section_type_name PARAMS ((unsigned int)); static const char * get_section_type_name PARAMS ((unsigned int)); static const char * get_symbol_binding PARAMS ((unsigned int)); static const char * get_symbol_type PARAMS ((unsigned int)); static const char * get_symbol_visibility PARAMS ((unsigned int)); static const char * get_symbol_index_type PARAMS ((unsigned int)); -static const char * get_dynamic_flags PARAMS ((bfd_vma)); +static const char * get_dynamic_flags PARAMS ((bfd_vma)); static void usage PARAMS ((void)); static void parse_args PARAMS ((int, char **)); static int process_file_header PARAMS ((void)); static int process_program_headers PARAMS ((FILE *)); static int process_section_headers PARAMS ((FILE *)); +static int process_unwind PARAMS ((FILE *)); static void dynamic_segment_mips_val PARAMS ((Elf_Internal_Dyn *)); static void dynamic_segment_parisc_val PARAMS ((Elf_Internal_Dyn *)); static int process_dynamic_segment PARAMS ((FILE *)); @@ -187,14 +194,15 @@ static int get_64bit_program_headers PARAMS ((FILE *, Elf_Internal_Phdr *)) static int get_file_header PARAMS ((FILE *)); static Elf_Internal_Sym * get_32bit_elf_symbols PARAMS ((FILE *, unsigned long, unsigned long)); static Elf_Internal_Sym * get_64bit_elf_symbols PARAMS ((FILE *, unsigned long, unsigned long)); +static const char * get_elf_section_flags PARAMS ((bfd_vma)); static int * get_dynamic_data PARAMS ((FILE *, unsigned int)); static int get_32bit_dynamic_segment PARAMS ((FILE *)); static int get_64bit_dynamic_segment PARAMS ((FILE *)); #ifdef SUPPORT_DISASSEMBLY -static int disassemble_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); +static int disassemble_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); #endif -static int dump_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); -static int display_debug_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); +static int dump_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); +static int display_debug_section PARAMS ((Elf32_Internal_Shdr *, FILE *)); static int display_debug_info PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); static int display_debug_not_supported PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); static int display_debug_lines PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); @@ -219,11 +227,11 @@ static const char * get_elf_class PARAMS ((unsigned char)); static const char * get_data_encoding PARAMS ((unsigned char)); static const char * get_osabi_name PARAMS ((unsigned char)); static int guess_is_rela PARAMS ((unsigned long)); -static char * get_note_type PARAMS ((unsigned int)); +static char * get_note_type PARAMS ((unsigned int)); static int process_note PARAMS ((Elf32_Internal_Note *)); static int process_corefile_note_segment PARAMS ((FILE *, bfd_vma, bfd_vma)); static int process_corefile_note_segments PARAMS ((FILE *)); -static int process_corefile_contents PARAMS ((FILE *)); +static int process_corefile_contents PARAMS ((FILE *)); typedef int Elf32_Word; @@ -233,29 +241,29 @@ typedef int Elf32_Word; #endif #define UNKNOWN -1 -#define SECTION_NAME(X) ((X) == NULL ? "" : \ +#define SECTION_NAME(X) ((X) == NULL ? "" : \ ((X)->sh_name >= string_table_length \ ? "" : string_table + (X)->sh_name)) #define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */ -#define BYTE_GET(field) byte_get (field, sizeof (field)) +#define BYTE_GET(field) byte_get (field, sizeof (field)) /* If we can support a 64 bit data type then BFD64 should be defined and sizeof (bfd_vma) == 8. In this case when translating from an external 8 byte field to an internal field, we can assume that the - internal field is also 8 bytes wide and so we can extact all the data. + internal field is also 8 bytes wide and so we can extract all the data. If, however, BFD64 is not defined, then we must assume that the internal data structure only has 4 byte wide fields that are the equivalent of the 8 byte wide external counterparts, and so we must truncate the data. */ #ifdef BFD64 -#define BYTE_GET8(field) byte_get (field, -8) +#define BYTE_GET8(field) byte_get (field, -8) #else -#define BYTE_GET8(field) byte_get (field, 8) +#define BYTE_GET8(field) byte_get (field, 8) #endif -#define NUM_ELEM(array) (sizeof (array) / sizeof ((array)[0])) +#define NUM_ELEM(array) (sizeof (array) / sizeof ((array)[0])) #define GET_DATA_ALLOC(offset, size, var, type, reason) \ if (fseek (file, offset, SEEK_SET)) \ @@ -270,20 +278,20 @@ typedef int Elf32_Word; { \ error (_("Out of memory allocating %d bytes for %s\n"), size, reason); \ return 0; \ - } \ - \ - if (fread (var, size, 1, file) != 1) \ - { \ - error (_("Unable to read in %d bytes of %s\n"), size, reason); \ - free (var); \ + } \ + \ + if (fread (var, size, 1, file) != 1) \ + { \ + error (_("Unable to read in %d bytes of %s\n"), size, reason); \ + free (var); \ var = NULL; \ - return 0; \ + return 0; \ } -#define GET_DATA(offset, var, reason) \ +#define GET_DATA(offset, var, reason) \ if (fseek (file, offset, SEEK_SET)) \ - { \ + { \ error (_("Unable to seek to %x for %s\n"), offset, reason); \ return 0; \ } \ @@ -368,11 +376,13 @@ byte_get_little_endian (field, size) return ((unsigned int) (field [0])) | (((unsigned int) (field [1])) << 8); +#ifndef BFD64 case 8: /* We want to extract data from an 8 byte wide field and place it into a 4 byte wide field. Since this is a little endian source we can juts use the 4 byte extraction code. */ /* Fall through. */ +#endif case 4: return ((unsigned long) (field [0])) | (((unsigned long) (field [1])) << 8) @@ -380,6 +390,7 @@ byte_get_little_endian (field, size) | (((unsigned long) (field [3])) << 24); #ifdef BFD64 + case 8: case -8: /* This is a special case, generated by the BYTE_GET8 macro. It means that we are loading an 8 byte value from a field @@ -508,6 +519,7 @@ byte_get_big_endian (field, size) | (((unsigned long) (field [1])) << 16) | (((unsigned long) (field [0])) << 24); +#ifndef BFD64 case 8: /* Although we are extracing data from an 8 byte wide field, we are returning only 4 bytes of data. */ @@ -515,8 +527,8 @@ byte_get_big_endian (field, size) | (((unsigned long) (field [6])) << 8) | (((unsigned long) (field [5])) << 16) | (((unsigned long) (field [4])) << 24); - -#ifdef BFD64 +#else + case 8: case -8: /* This is a special case, generated by the BYTE_GET8 macro. It means that we are loading an 8 byte value from a field @@ -554,7 +566,7 @@ guess_is_rela (e_machine) case EM_CYGNUS_M32R: case EM_CYGNUS_D10V: case EM_MIPS: - case EM_MIPS_RS4_BE: + case EM_MIPS_RS3_LE: return FALSE; /* Targets that use RELA relocations. */ @@ -602,144 +614,172 @@ guess_is_rela (e_machine) } } -/* Display the contents of the relocation data found at the specified offset. */ static int -dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) - FILE * file; - unsigned long rel_offset; - unsigned long rel_size; - Elf_Internal_Sym * symtab; - unsigned long nsyms; - char * strtab; - int is_rela; +slurp_rela_relocs (file, rel_offset, rel_size, relasp, nrelasp) + FILE *file; + unsigned long rel_offset; + unsigned long rel_size; + Elf_Internal_Rela **relasp; + unsigned long *nrelasp; { - unsigned int i; - Elf_Internal_Rel * rels; - Elf_Internal_Rela * relas; + Elf_Internal_Rela *relas; + unsigned long nrelas; + unsigned int i; + if (is_32bit_elf) + { + Elf32_External_Rela * erelas; - if (is_rela == UNKNOWN) - is_rela = guess_is_rela (elf_header.e_machine); + GET_DATA_ALLOC (rel_offset, rel_size, erelas, + Elf32_External_Rela *, "relocs"); - if (is_rela) - { - if (is_32bit_elf) - { - Elf32_External_Rela * erelas; + nrelas = rel_size / sizeof (Elf32_External_Rela); - GET_DATA_ALLOC (rel_offset, rel_size, erelas, - Elf32_External_Rela *, "relocs"); + relas = (Elf_Internal_Rela *) + malloc (nrelas * sizeof (Elf_Internal_Rela)); - rel_size = rel_size / sizeof (Elf32_External_Rela); + if (relas == NULL) + { + error(_("out of memory parsing relocs")); + return 0; + } - relas = (Elf_Internal_Rela *) - malloc (rel_size * sizeof (Elf_Internal_Rela)); + for (i = 0; i < nrelas; i++) + { + relas[i].r_offset = BYTE_GET (erelas[i].r_offset); + relas[i].r_info = BYTE_GET (erelas[i].r_info); + relas[i].r_addend = BYTE_GET (erelas[i].r_addend); + } - if (relas == NULL) - { - error(_("out of memory parsing relocs")); - return 0; - } + free (erelas); + } + else + { + Elf64_External_Rela * erelas; - for (i = 0; i < rel_size; i++) - { - relas[i].r_offset = BYTE_GET (erelas[i].r_offset); - relas[i].r_info = BYTE_GET (erelas[i].r_info); - relas[i].r_addend = BYTE_GET (erelas[i].r_addend); - } + GET_DATA_ALLOC (rel_offset, rel_size, erelas, + Elf64_External_Rela *, "relocs"); + + nrelas = rel_size / sizeof (Elf64_External_Rela); - free (erelas); + relas = (Elf_Internal_Rela *) + malloc (nrelas * sizeof (Elf_Internal_Rela)); - rels = (Elf_Internal_Rel *) relas; + if (relas == NULL) + { + error(_("out of memory parsing relocs")); + return 0; } - else + + for (i = 0; i < nrelas; i++) { - Elf64_External_Rela * erelas; + relas[i].r_offset = BYTE_GET8 (erelas[i].r_offset); + relas[i].r_info = BYTE_GET8 (erelas[i].r_info); + relas[i].r_addend = BYTE_GET8 (erelas[i].r_addend); + } - GET_DATA_ALLOC (rel_offset, rel_size, erelas, - Elf64_External_Rela *, "relocs"); + free (erelas); + } + *relasp = relas; + *nrelasp = nrelas; + return 1; +} - rel_size = rel_size / sizeof (Elf64_External_Rela); +static int +slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp) + FILE *file; + unsigned long rel_offset; + unsigned long rel_size; + Elf_Internal_Rel **relsp; + unsigned long *nrelsp; +{ + Elf_Internal_Rel *rels; + unsigned long nrels; + unsigned int i; - relas = (Elf_Internal_Rela *) - malloc (rel_size * sizeof (Elf_Internal_Rela)); + if (is_32bit_elf) + { + Elf32_External_Rel * erels; - if (relas == NULL) - { - error(_("out of memory parsing relocs")); - return 0; - } + GET_DATA_ALLOC (rel_offset, rel_size, erels, + Elf32_External_Rel *, "relocs"); - for (i = 0; i < rel_size; i++) - { - relas[i].r_offset = BYTE_GET8 (erelas[i].r_offset); - relas[i].r_info = BYTE_GET8 (erelas[i].r_info); - relas[i].r_addend = BYTE_GET8 (erelas[i].r_addend); - } + nrels = rel_size / sizeof (Elf32_External_Rel); + + rels = (Elf_Internal_Rel *) malloc (nrels * sizeof (Elf_Internal_Rel)); - free (erelas); + if (rels == NULL) + { + error(_("out of memory parsing relocs")); + return 0; + } - rels = (Elf_Internal_Rel *) relas; + for (i = 0; i < nrels; i++) + { + rels[i].r_offset = BYTE_GET (erels[i].r_offset); + rels[i].r_info = BYTE_GET (erels[i].r_info); } + + free (erels); } else { - if (is_32bit_elf) - { - Elf32_External_Rel * erels; + Elf64_External_Rel * erels; - GET_DATA_ALLOC (rel_offset, rel_size, erels, - Elf32_External_Rel *, "relocs"); + GET_DATA_ALLOC (rel_offset, rel_size, erels, + Elf64_External_Rel *, "relocs"); - rel_size = rel_size / sizeof (Elf32_External_Rel); + nrels = rel_size / sizeof (Elf64_External_Rel); - rels = (Elf_Internal_Rel *) - malloc (rel_size * sizeof (Elf_Internal_Rel)); + rels = (Elf_Internal_Rel *) malloc (nrels * sizeof (Elf_Internal_Rel)); - if (rels == NULL) - { - error(_("out of memory parsing relocs")); - return 0; - } - - for (i = 0; i < rel_size; i++) - { - rels[i].r_offset = BYTE_GET (erels[i].r_offset); - rels[i].r_info = BYTE_GET (erels[i].r_info); - } - - free (erels); - - relas = (Elf_Internal_Rela *) rels; - } - else + if (rels == NULL) { - Elf64_External_Rel * erels; - - GET_DATA_ALLOC (rel_offset, rel_size, erels, - Elf64_External_Rel *, "relocs"); + error(_("out of memory parsing relocs")); + return 0; + } - rel_size = rel_size / sizeof (Elf64_External_Rel); + for (i = 0; i < nrels; i++) + { + rels[i].r_offset = BYTE_GET8 (erels[i].r_offset); + rels[i].r_info = BYTE_GET8 (erels[i].r_info); + } - rels = (Elf_Internal_Rel *) - malloc (rel_size * sizeof (Elf_Internal_Rel)); + free (erels); + } + *relsp = rels; + *nrelsp = nrels; + return 1; +} - if (rels == NULL) - { - error(_("out of memory parsing relocs")); - return 0; - } +/* Display the contents of the relocation data found at the specified offset. */ +static int +dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) + FILE * file; + unsigned long rel_offset; + unsigned long rel_size; + Elf_Internal_Sym * symtab; + unsigned long nsyms; + char * strtab; + int is_rela; +{ + unsigned int i; + Elf_Internal_Rel * rels; + Elf_Internal_Rela * relas; - for (i = 0; i < rel_size; i++) - { - rels[i].r_offset = BYTE_GET8 (erels[i].r_offset); - rels[i].r_info = BYTE_GET8 (erels[i].r_info); - } - free (erels); + if (is_rela == UNKNOWN) + is_rela = guess_is_rela (elf_header.e_machine); - relas = (Elf_Internal_Rela *) rels; - } + if (is_rela) + { + if (!slurp_rela_relocs (file, rel_offset, rel_size, &relas, &rel_size)) + return 0; + } + else + { + if (!slurp_rel_relocs (file, rel_offset, rel_size, &rels, &rel_size)) + return 0; } if (is_rela) @@ -864,7 +904,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) break; case EM_MIPS: - case EM_MIPS_RS4_BE: + case EM_MIPS_RS3_LE: rtype = elf_mips_reloc_type (type); break; @@ -956,7 +996,10 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) putchar ('\n'); } - free (relas); + if (is_rela) + free (relas); + else + free (rels); return 1; } @@ -1133,7 +1176,7 @@ get_dynamic_type (type) switch (elf_header.e_machine) { case EM_MIPS: - case EM_MIPS_RS4_BE: + case EM_MIPS_RS3_LE: result = get_mips_dynamic_type (type); break; case EM_SPARCV9: @@ -1208,32 +1251,32 @@ get_machine_name (e_machine) switch (e_machine) { - case EM_NONE: return _("None"); - case EM_M32: return "WE32100"; - case EM_SPARC: return "Sparc"; - case EM_386: return "Intel 80386"; - case EM_68K: return "MC68000"; - case EM_88K: return "MC88000"; - case EM_486: return "Intel 80486"; - case EM_860: return "Intel 80860"; - case EM_MIPS: return "MIPS R3000"; - case EM_S370: return "IBM System/370"; - case EM_MIPS_RS4_BE: return "MIPS R4000 big-endian"; + case EM_NONE: return _("None"); + case EM_M32: return "WE32100"; + case EM_SPARC: return "Sparc"; + case EM_386: return "Intel 80386"; + case EM_68K: return "MC68000"; + case EM_88K: return "MC88000"; + case EM_486: return "Intel 80486"; + case EM_860: return "Intel 80860"; + case EM_MIPS: return "MIPS R3000"; + case EM_S370: return "IBM System/370"; + case EM_MIPS_RS3_LE: return "MIPS R4000 big-endian"; case EM_OLD_SPARCV9: return "Sparc v9 (old)"; - case EM_PARISC: return "HPPA"; + case EM_PARISC: return "HPPA"; case EM_PPC_OLD: return "Power PC (old)"; - case EM_SPARC32PLUS: return "Sparc v8+" ; - case EM_960: return "Intel 90860"; - case EM_PPC: return "PowerPC"; - case EM_V800: return "NEC V800"; - case EM_FR20: return "Fujitsu FR20"; - case EM_RH32: return "TRW RH32"; + case EM_SPARC32PLUS: return "Sparc v8+" ; + case EM_960: return "Intel 90860"; + case EM_PPC: return "PowerPC"; + case EM_V800: return "NEC V800"; + case EM_FR20: return "Fujitsu FR20"; + case EM_RH32: return "TRW RH32"; case EM_MCORE: return "MCORE"; - case EM_ARM: return "ARM"; - case EM_OLD_ALPHA: return "Digital Alpha (old)"; - case EM_SH: return "Hitachi SH"; - case EM_SPARCV9: return "Sparc v9"; - case EM_TRICORE: return "Siemens Tricore"; + case EM_ARM: return "ARM"; + case EM_OLD_ALPHA: return "Digital Alpha (old)"; + case EM_SH: return "Hitachi SH"; + case EM_SPARCV9: return "Sparc v9"; + case EM_TRICORE: return "Siemens Tricore"; case EM_ARC: return "ARC"; case EM_H8_300: return "Hitachi H8/300"; case EM_H8_300H: return "Hitachi H8/300H"; @@ -1243,7 +1286,7 @@ get_machine_name (e_machine) case EM_MIPS_X: return "Stanford MIPS-X"; case EM_COLDFIRE: return "Motorola Coldfire"; case EM_68HC12: return "Motorola M68HC12"; - case EM_ALPHA: return "Alpha"; + case EM_ALPHA: return "Alpha"; case EM_CYGNUS_D10V: return "d10v"; case EM_CYGNUS_D30V: return "d30v"; case EM_CYGNUS_ARC: return "ARC"; @@ -1253,32 +1296,32 @@ get_machine_name (e_machine) case EM_CYGNUS_MN10200: return "mn10200"; case EM_CYGNUS_FR30: return "Fujitsu FR30"; case EM_PJ: return "picoJava"; - case EM_MMA: return "Fujitsu Multimedia Accelerator"; - case EM_PCP: return "Siemens PCP"; - case EM_NCPU: return "Sony nCPU embedded RISC processor"; - case EM_NDR1: return "Denso NDR1 microprocesspr"; - case EM_STARCORE: return "Motorola Star*Core processor"; - case EM_ME16: return "Toyota ME16 processor"; - case EM_ST100: return "STMicroelectronics ST100 processor"; - case EM_TINYJ: return "Advanced Logic Corp. TinyJ embedded processor"; - case EM_FX66: return "Siemens FX66 microcontroller"; - case EM_ST9PLUS: return "STMicroelectronics ST9+ 8/16 bit microcontroller"; - case EM_ST7: return "STMicroelectronics ST7 8-bit microcontroller"; - case EM_68HC16: return "Motorola MC68HC16 Microcontroller"; - case EM_68HC11: return "Motorola MC68HC11 Microcontroller"; - case EM_68HC08: return "Motorola MC68HC08 Microcontroller"; - case EM_68HC05: return "Motorola MC68HC05 Microcontroller"; - case EM_SVX: return "Silicon Graphics SVx"; - case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller"; - case EM_VAX: return "Digital VAX"; + case EM_MMA: return "Fujitsu Multimedia Accelerator"; + case EM_PCP: return "Siemens PCP"; + case EM_NCPU: return "Sony nCPU embedded RISC processor"; + case EM_NDR1: return "Denso NDR1 microprocesspr"; + case EM_STARCORE: return "Motorola Star*Core processor"; + case EM_ME16: return "Toyota ME16 processor"; + case EM_ST100: return "STMicroelectronics ST100 processor"; + case EM_TINYJ: return "Advanced Logic Corp. TinyJ embedded processor"; + case EM_FX66: return "Siemens FX66 microcontroller"; + case EM_ST9PLUS: return "STMicroelectronics ST9+ 8/16 bit microcontroller"; + case EM_ST7: return "STMicroelectronics ST7 8-bit microcontroller"; + case EM_68HC16: return "Motorola MC68HC16 Microcontroller"; + case EM_68HC11: return "Motorola MC68HC11 Microcontroller"; + case EM_68HC08: return "Motorola MC68HC08 Microcontroller"; + case EM_68HC05: return "Motorola MC68HC05 Microcontroller"; + case EM_SVX: return "Silicon Graphics SVx"; + case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller"; + case EM_VAX: return "Digital VAX"; case EM_AVR: return "Atmel AVR 8-bit microcontroller"; case EM_CRIS: return "Axis Communications 32-bit embedded processor"; - case EM_JAVELIN: return "Infineon Technologies 32-bit embedded cpu"; - case EM_FIREPATH: return "Element 14 64-bit DSP processor"; - case EM_ZSP: return "LSI Logic's 16-bit DSP processor"; + case EM_JAVELIN: return "Infineon Technologies 32-bit embedded cpu"; + case EM_FIREPATH: return "Element 14 64-bit DSP processor"; + case EM_ZSP: return "LSI Logic's 16-bit DSP processor"; case EM_MMIX: return "Donald Knuth's educational 64-bit processor"; - case EM_HUANY: return "Harvard Universitys's machine-independent object format"; - case EM_PRISM: return "SiTera Prism"; + case EM_HUANY: return "Harvard Universitys's machine-independent object format"; + case EM_PRISM: return "SiTera Prism"; case EM_X86_64: return "Advanced Micro Devices X86-64"; default: sprintf (buff, _(": %x"), e_machine); @@ -1456,7 +1499,7 @@ get_machine_flags (e_flags, e_machine) break; case EM_MIPS: - case EM_MIPS_RS4_BE: + case EM_MIPS_RS3_LE: if (e_flags & EF_MIPS_NOREORDER) strcat (buf, ", noreorder"); @@ -1565,6 +1608,21 @@ get_machine_flags (e_flags, e_machine) if ((e_flags & EF_PICOJAVA_GNUCALLS) == EF_PICOJAVA_GNUCALLS) strcat (buf, ", gnu calling convention"); break; + + case EM_IA_64: + if ((e_flags & EF_IA_64_ABI64)) + strcat (buf, ", 64-bit"); + else + strcat (buf, ", 32-bit"); + if ((e_flags & EF_IA_64_REDUCEDFP)) + strcat (buf, ", reduced fp model"); + if ((e_flags & EF_IA_64_NOFUNCDESC_CONS_GP)) + strcat (buf, ", no function descriptors, constant gp"); + else if ((e_flags & EF_IA_64_CONS_GP)) + strcat (buf, ", constant gp"); + if ((e_flags & EF_IA_64_ABSOLUTE)) + strcat (buf, ", absolute"); + break; } } @@ -1618,6 +1676,21 @@ get_parisc_segment_type (type) } static const char * +get_ia64_segment_type (type) + unsigned long type; +{ + switch (type) + { + case PT_IA_64_ARCHEXT: return "IA_64_ARCHEXT"; + case PT_IA_64_UNWIND: return "IA_64_UNWIND"; + default: + break; + } + + return NULL; +} + +static const char * get_segment_type (p_type) unsigned long p_type; { @@ -1641,12 +1714,15 @@ get_segment_type (p_type) switch (elf_header.e_machine) { case EM_MIPS: - case EM_MIPS_RS4_BE: + case EM_MIPS_RS3_LE: result = get_mips_segment_type (p_type); break; case EM_PARISC: result = get_parisc_segment_type (p_type); break; + case EM_IA_64: + result = get_ia64_segment_type (p_type); + break; default: result = NULL; break; @@ -1750,6 +1826,20 @@ get_parisc_section_type_name (sh_type) } static const char * +get_ia64_section_type_name (sh_type) + unsigned int sh_type; +{ + switch (sh_type) + { + case SHT_IA_64_EXT: return "IA_64_EXT"; + case SHT_IA_64_UNWIND: return "IA_64_UNWIND"; + default: + break; + } + return NULL; +} + +static const char * get_section_type_name (sh_type) unsigned int sh_type; { @@ -1790,12 +1880,15 @@ get_section_type_name (sh_type) switch (elf_header.e_machine) { case EM_MIPS: - case EM_MIPS_RS4_BE: + case EM_MIPS_RS3_LE: result = get_mips_section_type_name (sh_type); break; case EM_PARISC: result = get_parisc_section_type_name (sh_type); break; + case EM_IA_64: + result = get_ia64_section_type_name (sh_type); + break; default: result = NULL; break; @@ -1837,6 +1930,7 @@ struct option options [] = {"use-dynamic", no_argument, 0, 'D'}, {"hex-dump", required_argument, 0, 'x'}, {"debug-dump", optional_argument, 0, 'w'}, + {"unwind", no_argument, 0, 'u'}, #ifdef SUPPORT_DISASSEMBLY {"instruction-dump", required_argument, 0, 'i'}, #endif @@ -1861,6 +1955,7 @@ usage () fprintf (stdout, _(" -s or --syms or --symbols Display the symbol table\n")); fprintf (stdout, _(" -n or --notes Display the core notes (if present)\n")); fprintf (stdout, _(" -r or --relocs Display the relocations (if present)\n")); + fprintf (stdout, _(" -u or --unwind Display the unwind info (if present)\n")); fprintf (stdout, _(" -d or --dynamic Display the dynamic segment (if present)\n")); fprintf (stdout, _(" -V or --version-info Display the version sections (if present)\n")); fprintf (stdout, _(" -A or --arch-specific Display architecture specific information (if any).\n")); @@ -1923,7 +2018,7 @@ parse_args (argc, argv) usage (); while ((c = getopt_long - (argc, argv, "ersahnldSDAIw::x:i:vV", options, NULL)) != EOF) + (argc, argv, "ersuahnldSDAIw::x:i:vV", options, NULL)) != EOF) { char * cp; int section; @@ -1940,6 +2035,7 @@ parse_args (argc, argv) case 'a': do_syms ++; do_reloc ++; + do_unwind ++; do_dynamic ++; do_header ++; do_sections ++; @@ -1963,6 +2059,9 @@ parse_args (argc, argv) case 'r': do_reloc ++; break; + case 'u': + do_unwind ++; + break; case 'h': do_header ++; break; @@ -2027,8 +2126,9 @@ parse_args (argc, argv) do_debug_aranges = 1; break; - case 'f': case 'F': + do_debug_frames_interp = 1; + case 'f': do_debug_frames = 1; break; @@ -2065,7 +2165,7 @@ parse_args (argc, argv) } } - if (!do_dynamic && !do_syms && !do_reloc && !do_sections + if (!do_dynamic && !do_syms && !do_reloc && !do_unwind && !do_sections && !do_segments && !do_header && !do_dump && !do_version && !do_histogram && !do_debugging && !do_arch && !do_notes) usage (); @@ -2758,7 +2858,8 @@ process_section_headers (file) dynamic_strings, char *, "dynamic strings"); } else if ((do_debugging || do_debug_info || do_debug_abbrevs - || do_debug_lines || do_debug_pubnames || do_debug_aranges || do_debug_frames) + || do_debug_lines || do_debug_pubnames || do_debug_aranges + || do_debug_frames) && strncmp (name, ".debug_", 7) == 0) { name += 7; @@ -2912,8 +3013,8 @@ process_relocs (file) else { Elf32_Internal_Shdr * section; - unsigned long i; - int found = 0; + unsigned long i; + int found = 0; for (i = 0, section = section_headers; i < elf_header.e_shnum; @@ -2976,6 +3077,431 @@ process_relocs (file) return 1; } +#include "unwind-ia64.h" + +/* An absolute address consists of a section and an offset. If the + section is NULL, the offset itself is the address, otherwise, the + address equals to LOAD_ADDRESS(section) + offset. */ + +struct absaddr + { + unsigned short section; + bfd_vma offset; + }; + +struct unw_aux_info + { + struct unw_table_entry + { + struct absaddr start; + struct absaddr end; + struct absaddr info; + } + *table; /* Unwind table. */ + unsigned long table_len; /* Length of unwind table. */ + unsigned char * info; /* Unwind info. */ + unsigned long info_size; /* Size of unwind info. */ + bfd_vma info_addr; /* starting address of unwind info. */ + bfd_vma seg_base; /* Starting address of segment. */ + Elf_Internal_Sym * symtab; /* The symbol table. */ + unsigned long nsyms; /* Number of symbols. */ + char * strtab; /* The string table. */ + unsigned long strtab_size; /* Size of string table. */ + }; + +static void find_symbol_for_address PARAMS ((struct unw_aux_info *, + struct absaddr, const char **, + bfd_vma *)); +static void dump_ia64_unwind PARAMS ((struct unw_aux_info *)); +static int slurp_ia64_unwind_table PARAMS ((FILE *, struct unw_aux_info *, + Elf32_Internal_Shdr *)); + +static void +find_symbol_for_address (aux, addr, symname, offset) + struct unw_aux_info *aux; + struct absaddr addr; + const char **symname; + bfd_vma *offset; +{ + bfd_vma dist = (bfd_vma) 0x100000; + Elf_Internal_Sym *sym, *best = NULL; + unsigned long i; + + for (i = 0, sym = aux->symtab; i < aux->nsyms; ++i, ++sym) + { + if (ELF_ST_TYPE (sym->st_info) == STT_FUNC + && sym->st_name != 0 + && (addr.section == SHN_UNDEF || addr.section == sym->st_shndx) + && addr.offset >= sym->st_value + && addr.offset - sym->st_value < dist) + { + best = sym; + dist = addr.offset - sym->st_value; + if (!dist) + break; + } + } + if (best) + { + *symname = (best->st_name >= aux->strtab_size + ? "" : aux->strtab + best->st_name); + *offset = dist; + return; + } + *symname = NULL; + *offset = addr.offset; +} + +static void +dump_ia64_unwind (aux) + struct unw_aux_info *aux; +{ + bfd_vma addr_size; + struct unw_table_entry * tp; + int in_body; + + addr_size = is_32bit_elf ? 4 : 8; + + for (tp = aux->table; tp < aux->table + aux->table_len; ++tp) + { + bfd_vma stamp; + bfd_vma offset; + const unsigned char * dp; + const unsigned char * head; + const char * procname; + + find_symbol_for_address (aux, tp->start, &procname, &offset); + + fputs ("\n<", stdout); + + if (procname) + { + fputs (procname, stdout); + + if (offset) + printf ("+%lx", (unsigned long) offset); + } + + fputs (">: [", stdout); + print_vma (tp->start.offset, PREFIX_HEX); + fputc ('-', stdout); + print_vma (tp->end.offset, PREFIX_HEX); + printf ("), info at +0x%lx\n", + (unsigned long) (tp->info.offset - aux->seg_base)); + + head = aux->info + (tp->info.offset - aux->info_addr); + stamp = BYTE_GET8 ((unsigned char *) head); + + printf (" v%u, flags=0x%lx (%s%s ), len=%lu bytes\n", + (unsigned) UNW_VER (stamp), + (unsigned long) ((stamp & UNW_FLAG_MASK) >> 32), + UNW_FLAG_EHANDLER (stamp) ? " ehandler" : "", + UNW_FLAG_UHANDLER (stamp) ? " uhandler" : "", + (unsigned long) (addr_size * UNW_LENGTH (stamp))); + + if (UNW_VER (stamp) != 1) + { + printf ("\tUnknown version.\n"); + continue; + } + + in_body = 0; + for (dp = head + 8; dp < head + 8 + addr_size * UNW_LENGTH (stamp);) + dp = unw_decode (dp, in_body, & in_body); + } +} + +static int +slurp_ia64_unwind_table (file, aux, sec) + FILE *file; + struct unw_aux_info *aux; + Elf32_Internal_Shdr *sec; +{ + unsigned long size, addr_size, nrelas, i; + Elf_Internal_Phdr *prog_hdrs, *seg; + struct unw_table_entry *tep; + Elf32_Internal_Shdr *relsec; + Elf_Internal_Rela *rela, *rp; + unsigned char *table, *tp; + Elf_Internal_Sym *sym; + const char *relname; + int result; + + addr_size = is_32bit_elf ? 4 : 8; + + /* First, find the starting address of the segment that includes + this section: */ + + if (elf_header.e_phnum) + { + prog_hdrs = (Elf_Internal_Phdr *) + xmalloc (elf_header.e_phnum * sizeof (Elf_Internal_Phdr)); + + if (is_32bit_elf) + result = get_32bit_program_headers (file, prog_hdrs); + else + result = get_64bit_program_headers (file, prog_hdrs); + + if (!result) + { + free (prog_hdrs); + return 0; + } + + for (seg = prog_hdrs; seg < prog_hdrs + elf_header.e_phnum; ++seg) + { + if (seg->p_type != PT_LOAD) + continue; + + if (sec->sh_addr >= seg->p_vaddr + && (sec->sh_addr + sec->sh_size <= seg->p_vaddr + seg->p_memsz)) + { + aux->seg_base = seg->p_vaddr; + break; + } + } + + free (prog_hdrs); + } + + /* Second, build the unwind table from the contents of the unwind section: */ + size = sec->sh_size; + GET_DATA_ALLOC (sec->sh_offset, size, table, char *, "unwind table"); + + tep = aux->table = xmalloc (size / (3 * addr_size) * sizeof (aux->table[0])); + for (tp = table; tp < table + size; tp += 3 * addr_size, ++ tep) + { + tep->start.section = SHN_UNDEF; + tep->end.section = SHN_UNDEF; + tep->info.section = SHN_UNDEF; + if (is_32bit_elf) + { + tep->start.offset = byte_get ((unsigned char *) tp + 0, 4); + tep->end.offset = byte_get ((unsigned char *) tp + 4, 4); + tep->info.offset = byte_get ((unsigned char *) tp + 8, 4); + } + else + { + tep->start.offset = BYTE_GET8 ((unsigned char *) tp + 0); + tep->end.offset = BYTE_GET8 ((unsigned char *) tp + 8); + tep->info.offset = BYTE_GET8 ((unsigned char *) tp + 16); + } + tep->start.offset += aux->seg_base; + tep->end.offset += aux->seg_base; + tep->info.offset += aux->seg_base; + } + free (table); + + /* Third, apply any relocations to the unwind table: */ + + for (relsec = section_headers; + relsec < section_headers + elf_header.e_shnum; + ++relsec) + { + if (relsec->sh_type != SHT_RELA + || section_headers + relsec->sh_info != sec) + continue; + + if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size, + & rela, & nrelas)) + return 0; + + for (rp = rela; rp < rela + nrelas; ++rp) + { + if (is_32bit_elf) + { + relname = elf_ia64_reloc_type (ELF32_R_TYPE (rp->r_info)); + sym = aux->symtab + ELF32_R_SYM (rp->r_info); + + if (ELF32_ST_TYPE (sym->st_info) != STT_SECTION) + { + warn (_("Skipping unexpected symbol type %u"), + ELF32_ST_TYPE (sym->st_info)); + continue; + } + } + else + { + relname = elf_ia64_reloc_type (ELF64_R_TYPE (rp->r_info)); + sym = aux->symtab + ELF64_R_SYM (rp->r_info); + + if (ELF64_ST_TYPE (sym->st_info) != STT_SECTION) + { + warn (_("Skipping unexpected symbol type %u"), + ELF64_ST_TYPE (sym->st_info)); + continue; + } + } + + if (strncmp (relname, "R_IA64_SEGREL", 13) != 0) + { + warn (_("Skipping unexpected relocation type %s"), relname); + continue; + } + + i = rp->r_offset / (3 * addr_size); + + switch (rp->r_offset/addr_size % 3) + { + case 0: + aux->table[i].start.section = sym->st_shndx; + aux->table[i].start.offset += rp->r_addend; + break; + case 1: + aux->table[i].end.section = sym->st_shndx; + aux->table[i].end.offset += rp->r_addend; + break; + case 2: + aux->table[i].info.section = sym->st_shndx; + aux->table[i].info.offset += rp->r_addend; + break; + default: + break; + } + } + + free (rela); + } + + aux->table_len = size / (3 * addr_size); + return 1; +} + +static int +process_unwind (file) + FILE * file; +{ + Elf32_Internal_Shdr *sec, *unwsec = NULL, *strsec; + unsigned long i, addr_size, unwcount = 0, unwstart = 0; + struct unw_aux_info aux; + + if (!do_unwind) + return 1; + + if (elf_header.e_machine != EM_IA_64) + { + printf (_("\nThere are no unwind sections in this file.\n")); + return 1; + } + + memset (& aux, 0, sizeof (aux)); + + addr_size = is_32bit_elf ? 4 : 8; + + for (i = 0, sec = section_headers; i < elf_header.e_shnum; ++i, ++sec) + { + if (sec->sh_type == SHT_SYMTAB) + { + aux.nsyms = sec->sh_size / sec->sh_entsize; + aux.symtab = GET_ELF_SYMBOLS (file, sec->sh_offset, aux.nsyms); + + strsec = section_headers + sec->sh_link; + aux.strtab_size = strsec->sh_size; + GET_DATA_ALLOC (strsec->sh_offset, aux.strtab_size, + aux.strtab, char *, "string table"); + } + else if (sec->sh_type == SHT_IA_64_UNWIND) + unwcount++; + } + + if (!unwcount) + printf (_("\nThere are no unwind sections in this file.\n")); + + while (unwcount-- > 0) + { + char *suffix; + size_t len, len2; + + for (i = unwstart, sec = section_headers + unwstart; + i < elf_header.e_shnum; ++i, ++sec) + if (sec->sh_type == SHT_IA_64_UNWIND) + { + unwsec = sec; + break; + } + + unwstart = i + 1; + len = sizeof (ELF_STRING_ia64_unwind_once) - 1; + + if (strncmp (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind_once, + len) == 0) + { + /* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.ia64unwi.FOO */ + len2 = sizeof (ELF_STRING_ia64_unwind_info_once) - 1; + suffix = SECTION_NAME (unwsec) + len; + for (i = 0, sec = section_headers; i < elf_header.e_shnum; + ++i, ++sec) + if (strncmp (SECTION_NAME (sec), + ELF_STRING_ia64_unwind_info_once, len2) == 0 + && strcmp (SECTION_NAME (sec) + len2, suffix) == 0) + break; + } + else + { + /* .IA_64.unwindFOO -> .IA_64.unwind_infoFOO + .IA_64.unwind or BAR -> .IA_64.unwind_info */ + len = sizeof (ELF_STRING_ia64_unwind) - 1; + len2 = sizeof (ELF_STRING_ia64_unwind_info) - 1; + suffix = ""; + if (strncmp (SECTION_NAME (unwsec), ELF_STRING_ia64_unwind, + len) == 0) + suffix = SECTION_NAME (unwsec) + len; + for (i = 0, sec = section_headers; i < elf_header.e_shnum; + ++i, ++sec) + if (strncmp (SECTION_NAME (sec), + ELF_STRING_ia64_unwind_info, len2) == 0 + && strcmp (SECTION_NAME (sec) + len2, suffix) == 0) + break; + } + + if (i == elf_header.e_shnum) + { + printf (_("\nCould not find unwind info section for ")); + + if (string_table == NULL) + printf ("%d", unwsec->sh_name); + else + printf ("'%s'", SECTION_NAME (unwsec)); + } + else + { + aux.info_size = sec->sh_size; + aux.info_addr = sec->sh_addr; + GET_DATA_ALLOC (sec->sh_offset, aux.info_size, aux.info, + char *, "unwind info"); + + printf (_("\nUnwind section ")); + + if (string_table == NULL) + printf ("%d", unwsec->sh_name); + else + printf ("'%s'", SECTION_NAME (unwsec)); + + printf (_(" at offset 0x%lx contains %lu entries:\n"), + unwsec->sh_offset, + (unsigned long) (unwsec->sh_size / (3 * addr_size))); + + (void) slurp_ia64_unwind_table (file, & aux, unwsec); + + if (aux.table_len > 0) + dump_ia64_unwind (& aux); + + if (aux.table) + free ((char *) aux.table); + if (aux.info) + free ((char *) aux.info); + aux.table = NULL; + aux.info = NULL; + } + } + + if (aux.symtab) + free (aux.symtab); + if (aux.strtab) + free ((char *) aux.strtab); + + return 1; +} static void dynamic_segment_mips_val (entry) @@ -3711,7 +4237,7 @@ process_dynamic_segment (file) switch (elf_header.e_machine) { case EM_MIPS: - case EM_MIPS_RS4_BE: + case EM_MIPS_RS3_LE: dynamic_segment_mips_val (entry); break; case EM_PARISC: @@ -3951,12 +4477,12 @@ process_version_sections (file) case SHT_GNU_versym: { Elf32_Internal_Shdr * link_section; - int total; - int cnt; - unsigned char * edata; - unsigned short * data; - char * strtab; - Elf_Internal_Sym * symbols; + int total; + int cnt; + unsigned char * edata; + unsigned short * data; + char * strtab; + Elf_Internal_Sym * symbols; Elf32_Internal_Shdr * string_sec; link_section = section_headers + section->sh_link; @@ -4992,7 +5518,7 @@ display_debug_lines (section, start, file) printf (_(" Length: %ld\n"), info.li_length); printf (_(" DWARF Version: %d\n"), info.li_version); - printf (_(" Prolgue Length: %d\n"), info.li_prologue_length); + printf (_(" Prologue Length: %d\n"), info.li_prologue_length); printf (_(" Minimum Instruction Length: %d\n"), info.li_min_insn_length); printf (_(" Initial value of 'is_stmt': %d\n"), info.li_default_is_stmt); printf (_(" Line Base: %d\n"), info.li_line_base); @@ -6429,12 +6955,13 @@ typedef struct Frame_Chunk int * col_offset; char * augmentation; unsigned int code_factor; - unsigned int data_factor; + int data_factor; unsigned long pc_begin; unsigned long pc_range; int cfa_reg; int cfa_offset; int ra; + unsigned char fde_encoding; } Frame_Chunk; @@ -6496,7 +7023,7 @@ frame_display_row (fc, need_col_headers, max_regs) printf ("\n"); } - printf ("%08x ", (unsigned int) fc->pc_begin); + printf ("%08lx ", fc->pc_begin); sprintf (tmp, "r%d%+d", fc->cfa_reg, fc->cfa_offset); printf ("%-8s ", tmp); @@ -6528,6 +7055,20 @@ frame_display_row (fc, need_col_headers, max_regs) printf ("\n"); } +static int +size_of_encoded_value (encoding) + int encoding; +{ + switch (encoding & 0x7) + { + default: /* ??? */ + case 0: return is_32bit_elf ? 4 : 8; + case 2: return 2; + case 3: return 4; + case 4: return 8; + } +} + #define GET(N) byte_get (start, N); start += N #define LEB() read_leb128 (start, & length_return, 0); start += length_return #define SLEB() read_leb128 (start, & length_return, 1); start += length_return @@ -6546,6 +7087,7 @@ display_debug_frames (section, start, file) int is_eh = (strcmp (SECTION_NAME (section), ".eh_frame") == 0); int length_return; int max_regs = 0; + int addr_size = is_32bit_elf ? 4 : 8; printf (_("The section %s contains:\n"), SECTION_NAME (section)); @@ -6558,6 +7100,9 @@ display_debug_frames (section, start, file) Frame_Chunk * fc; Frame_Chunk * cie; int need_col_headers = 1; + unsigned char * augmentation_data = NULL; + unsigned long augmentation_data_len = 0; + int encoded_ptr_size = addr_size; saved_start = start; length = byte_get (start, 4); start += 4; @@ -6568,10 +7113,10 @@ display_debug_frames (section, start, file) block_end = saved_start + length + 4; cie_id = byte_get (start, 4); start += 4; - printf ("\n%08x %08lx %08lx ", saved_start - section_start, length, cie_id); - if (is_eh ? (cie_id == 0) : (cie_id == DW_CIE_ID)) { + int version; + fc = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk)); memset (fc, 0, sizeof (Frame_Chunk)); @@ -6583,27 +7128,23 @@ display_debug_frames (section, start, file) fc->col_offset = (int *) xmalloc (sizeof (int)); frame_need_space (fc, max_regs-1); - start ++; /* version */ - fc->augmentation = start; - - while (* start) - start++; + version = *start++; - start++; /* skip past NUL */ + fc->augmentation = start; + start = strchr (start, '\0') + 1; if (fc->augmentation[0] == 'z') { - int xtra; fc->code_factor = LEB (); fc->data_factor = SLEB (); fc->ra = byte_get (start, 1); start += 1; - xtra = LEB (); - printf ("skipping %d extra bytes\n", xtra); - start += xtra; + augmentation_data_len = LEB (); + augmentation_data = start; + start += augmentation_data_len; } else if (strcmp (fc->augmentation, "eh") == 0) { - start += 4; + start += addr_size; fc->code_factor = LEB (); fc->data_factor = SLEB (); fc->ra = byte_get (start, 1); start += 1; @@ -6615,8 +7156,55 @@ display_debug_frames (section, start, file) fc->ra = byte_get (start, 1); start += 1; } cie = fc; - printf ("CIE \"%s\" cf=%d df=%d ra=%d\n", - fc->augmentation, fc->code_factor, fc->data_factor, fc->ra); + + if (do_debug_frames_interp) + printf ("\n%08lx %08lx %08lx CIE \"%s\" cf=%d df=%d ra=%d\n", + (unsigned long)(saved_start - section_start), length, cie_id, + fc->augmentation, fc->code_factor, fc->data_factor, + fc->ra); + else + { + printf ("\n%08lx %08lx %08lx CIE\n", + (unsigned long)(saved_start - section_start), length, cie_id); + printf (" Version: %d\n", version); + printf (" Augmentation: \"%s\"\n", fc->augmentation); + printf (" Code alignment factor: %u\n", fc->code_factor); + printf (" Data alignment factor: %d\n", fc->data_factor); + printf (" Return address column: %d\n", fc->ra); + + if (augmentation_data_len) + { + unsigned long i; + printf (" Augmentation data: "); + for (i = 0; i < augmentation_data_len; ++i) + printf (" %02x", augmentation_data[i]); + putchar ('\n'); + } + putchar ('\n'); + } + + if (augmentation_data_len) + { + unsigned char *p, *q; + p = fc->augmentation + 1; + q = augmentation_data; + + while (1) + { + if (*p == 'L') + q++; + else if (*p == 'P') + q += 1 + size_of_encoded_value (*q); + else if (*p == 'R') + fc->fde_encoding = *q++; + else + break; + p++; + } + + if (fc->fde_encoding) + encoded_ptr_size = size_of_encoded_value (fc->fde_encoding); + } frame_need_space (fc, fc->ra); } @@ -6628,15 +7216,16 @@ display_debug_frames (section, start, file) fc = & fde_fc; memset (fc, 0, sizeof (Frame_Chunk)); - look_for = is_eh ? start-4-cie_id : (unsigned char *) cie_id; + look_for = is_eh ? start - 4 - cie_id : section_start + cie_id; - fc->pc_begin = byte_get (start, 4); start += 4; - fc->pc_range = byte_get (start, 4); start += 4; + for (cie=chunks; cie ; cie = cie->next) + if (cie->chunk_start == look_for) + break; - for (cie=chunks; cie && (cie->chunk_start != look_for); cie = cie->next); if (!cie) { - warn ("Invalid CIE pointer %08x in FDE at %08x\n", cie_id, saved_start); + warn ("Invalid CIE pointer %08lx in FDE at %08lx\n", + cie_id, saved_start); start = block_end; fc->ncols = 0; fc->col_type = (short int *) xmalloc (sizeof (short int)); @@ -6644,6 +7233,7 @@ display_debug_frames (section, start, file) frame_need_space (fc, max_regs - 1); cie = fc; fc->augmentation = ""; + fc->fde_encoding = 0; } else { @@ -6659,25 +7249,43 @@ display_debug_frames (section, start, file) fc->cfa_offset = cie->cfa_offset; fc->ra = cie->ra; frame_need_space (fc, max_regs-1); + fc->fde_encoding = cie->fde_encoding; } + if (fc->fde_encoding) + encoded_ptr_size = size_of_encoded_value (fc->fde_encoding); + + fc->pc_begin = byte_get (start, encoded_ptr_size); + start += encoded_ptr_size; + fc->pc_range = byte_get (start, encoded_ptr_size); + start += encoded_ptr_size; + if (cie->augmentation[0] == 'z') { - unsigned long l = LEB (); - start += l; + augmentation_data_len = LEB (); + augmentation_data = start; + start += augmentation_data_len; } - printf ("FDE cie=%08x pc=%08lx..%08lx\n", - cie->chunk_start-section_start, fc->pc_begin, + printf ("\n%08lx %08lx %08lx FDE cie=%08x pc=%08lx..%08lx\n", + (unsigned long)(saved_start - section_start), length, cie_id, + cie->chunk_start - section_start, fc->pc_begin, fc->pc_begin + fc->pc_range); + if (! do_debug_frames_interp && augmentation_data_len) + { + unsigned long i; + printf (" Augmentation data: "); + for (i = 0; i < augmentation_data_len; ++i) + printf (" %02x", augmentation_data[i]); + putchar ('\n'); + putchar ('\n'); + } } /* At this point, fc is the current chunk, cie (if any) is set, and we're about to interpret instructions for the chunk. */ - /* This exists for readelf maintainers. */ -#define FDEBUG 0 - + if (do_debug_frames_interp) { /* Start by making a pass over the chunk, allocating storage and taking note of what registers are used. */ @@ -6687,13 +7295,12 @@ display_debug_frames (section, start, file) { unsigned op, opa; unsigned long reg; - bfd_vma vma; - + op = * start ++; opa = op & 0x3f; if (op & 0xc0) op &= 0xc0; - + /* Warning: if you add any more cases to this switch, be sure to add them to the corresponding switch below. */ switch (op) @@ -6710,7 +7317,7 @@ display_debug_frames (section, start, file) fc->col_type[opa] = DW_CFA_undefined; break; case DW_CFA_set_loc: - start += sizeof (vma); + start += encoded_ptr_size; break; case DW_CFA_advance_loc1: start += 1; @@ -6760,15 +7367,15 @@ display_debug_frames (section, start, file) #endif case DW_CFA_GNU_args_size: LEB (); - break; + break; #ifndef DW_CFA_GNU_negative_offset_extended #define DW_CFA_GNU_negative_offset_extended 0x2f #endif case DW_CFA_GNU_negative_offset_extended: - reg = LEB (); LEB (); + reg = LEB (); LEB (); frame_need_space (fc, reg); fc->col_type[reg] = DW_CFA_undefined; - + default: break; } @@ -6796,103 +7403,104 @@ display_debug_frames (section, start, file) switch (op) { case DW_CFA_advance_loc: - frame_display_row (fc, &need_col_headers, &max_regs); -#if FDEBUG - printf (" DW_CFA_advance_loc: %08x = %08x + %d*%d\n", - fc->pc_begin + opa * fc->code_factor, fc->pc_begin, opa, fc->code_factor); -#endif + if (do_debug_frames_interp) + frame_display_row (fc, &need_col_headers, &max_regs); + else + printf (" DW_CFA_advance_loc: %d to %08lx\n", + opa * fc->code_factor, + fc->pc_begin + opa * fc->code_factor); fc->pc_begin += opa * fc->code_factor; break; case DW_CFA_offset: roffs = LEB (); -#if FDEBUG - printf (" DW_CFA_offset: r%d = cfa[%d*%d]\n", opa, roffs, fc->data_factor); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_offset: r%d at cfa%+ld\n", + opa, roffs * fc->data_factor); fc->col_type[opa] = DW_CFA_offset; fc->col_offset[opa] = roffs * fc->data_factor; break; case DW_CFA_restore: -#if FDEBUG - printf (" DW_CFA_restore: r%d\n", opa); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_restore: r%d\n", opa); fc->col_type[opa] = cie->col_type[opa]; fc->col_offset[opa] = cie->col_offset[opa]; break; case DW_CFA_set_loc: - frame_display_row (fc, &need_col_headers, &max_regs); - vma = byte_get (start, sizeof (vma)); start += sizeof (vma); -#if FDEBUG - printf (" DW_CFA_set_loc: %08x\n", vma); -#endif + vma = byte_get (start, encoded_ptr_size); + start += encoded_ptr_size; + if (do_debug_frames_interp) + frame_display_row (fc, &need_col_headers, &max_regs); + else + printf (" DW_CFA_set_loc: %08lx\n", (unsigned long)vma); fc->pc_begin = vma; break; case DW_CFA_advance_loc1: - frame_display_row (fc, &need_col_headers, &max_regs); ofs = byte_get (start, 1); start += 1; -#if FDEBUG - printf (" DW_CFA_advance_loc1: %08x = %08x + %d*%d\n", - fc->pc_begin + ofs * fc->code_factor, fc->pc_begin, ofs, fc->code_factor); -#endif + if (do_debug_frames_interp) + frame_display_row (fc, &need_col_headers, &max_regs); + else + printf (" DW_CFA_advance_loc1: %ld to %08lx\n", + ofs * fc->code_factor, + fc->pc_begin + ofs * fc->code_factor); fc->pc_begin += ofs * fc->code_factor; break; case DW_CFA_advance_loc2: - frame_display_row (fc, &need_col_headers, &max_regs); ofs = byte_get (start, 2); start += 2; -#if FDEBUG - printf (" DW_CFA_advance_loc2: %08x = %08x + %d*%d\n", - fc->pc_begin + ofs * fc->code_factor, fc->pc_begin, ofs, fc->code_factor); -#endif + if (do_debug_frames_interp) + frame_display_row (fc, &need_col_headers, &max_regs); + else + printf (" DW_CFA_advance_loc2: %ld to %08lx\n", + ofs * fc->code_factor, + fc->pc_begin + ofs * fc->code_factor); fc->pc_begin += ofs * fc->code_factor; break; case DW_CFA_advance_loc4: - frame_display_row (fc, &need_col_headers, &max_regs); ofs = byte_get (start, 4); start += 4; -#if FDEBUG - printf (" DW_CFA_advance_loc4: %08x = %08x + %d*%d\n", - fc->pc_begin + ofs * fc->code_factor, fc->pc_begin, ofs, fc->code_factor); -#endif + if (do_debug_frames_interp) + frame_display_row (fc, &need_col_headers, &max_regs); + else + printf (" DW_CFA_advance_loc4: %ld to %08lx\n", + ofs * fc->code_factor, + fc->pc_begin + ofs * fc->code_factor); fc->pc_begin += ofs * fc->code_factor; break; case DW_CFA_offset_extended: reg = LEB (); roffs = LEB (); -#if FDEBUG - printf (" DW_CFA_offset_extended: r%d = cfa[%d*%d]\n", reg, roffs, fc->data_factor); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_offset_extended: r%ld at cfa%+ld\n", + reg, roffs * fc->data_factor); fc->col_type[reg] = DW_CFA_offset; fc->col_offset[reg] = roffs * fc->data_factor; break; case DW_CFA_restore_extended: reg = LEB (); -#if FDEBUG - printf (" DW_CFA_restore_extended: r%d\n", reg); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_restore_extended: r%ld\n", reg); fc->col_type[reg] = cie->col_type[reg]; fc->col_offset[reg] = cie->col_offset[reg]; break; case DW_CFA_undefined: reg = LEB (); -#if FDEBUG - printf (" DW_CFA_undefined: r%d\n", reg); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_undefined: r%ld\n", reg); fc->col_type[reg] = DW_CFA_undefined; fc->col_offset[reg] = 0; break; case DW_CFA_same_value: reg = LEB (); -#if FDEBUG - printf (" DW_CFA_same_value: r%d\n", reg); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_same_value: r%ld\n", reg); fc->col_type[reg] = DW_CFA_same_value; fc->col_offset[reg] = 0; break; @@ -6900,17 +7508,15 @@ display_debug_frames (section, start, file) case DW_CFA_register: reg = LEB (); roffs = LEB (); -#if FDEBUG - printf (" DW_CFA_register: r%d\n", reg); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_register: r%ld\n", reg); fc->col_type[reg] = DW_CFA_register; fc->col_offset[reg] = roffs; break; case DW_CFA_remember_state: -#if FDEBUG - printf (" DW_CFA_remember_state\n"); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_remember_state\n"); rs = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk)); rs->ncols = fc->ncols; rs->col_type = (short int *) xmalloc (rs->ncols * sizeof (short int)); @@ -6922,9 +7528,8 @@ display_debug_frames (section, start, file) break; case DW_CFA_restore_state: -#if FDEBUG - printf (" DW_CFA_restore_state\n"); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_restore_state\n"); rs = remembered_state; remembered_state = rs->next; frame_need_space (fc, rs->ncols-1); @@ -6938,60 +7543,49 @@ display_debug_frames (section, start, file) case DW_CFA_def_cfa: fc->cfa_reg = LEB (); fc->cfa_offset = LEB (); -#if FDEBUG - printf (" DW_CFA_def_cfa: reg %d ofs %d\n", fc->cfa_reg, fc->cfa_offset); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_def_cfa: r%d ofs %d\n", + fc->cfa_reg, fc->cfa_offset); break; case DW_CFA_def_cfa_register: fc->cfa_reg = LEB (); -#if FDEBUG - printf (" DW_CFA_def_cfa_reg: %d\n", fc->cfa_reg); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_def_cfa_reg: r%d\n", fc->cfa_reg); break; case DW_CFA_def_cfa_offset: fc->cfa_offset = LEB (); -#if FDEBUG - printf (" DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_def_cfa_offset: %d\n", fc->cfa_offset); break; case DW_CFA_nop: -#if FDEBUG - printf (" DW_CFA_nop\n"); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_nop\n"); break; #ifndef DW_CFA_GNU_window_save #define DW_CFA_GNU_window_save 0x2d #endif case DW_CFA_GNU_window_save: -#if FDEBUG - printf (" DW_CFA_GNU_window_save\n"); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_GNU_window_save\n"); break; -#ifndef DW_CFA_GNU_args_size -#define DW_CFA_GNU_args_size 0x2e -#endif case DW_CFA_GNU_args_size: ul = LEB (); -#if FDEBUG - printf (" DW_CFA_GNU_args_size: %d\n", ul); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_GNU_args_size: %ld\n", ul); break; -#ifndef DW_CFA_GNU_negative_offset_extended -#define DW_CFA_GNU_negative_offset_extended 0x2f -#endif case DW_CFA_GNU_negative_offset_extended: reg = LEB (); l = - LEB (); frame_need_space (fc, reg); -#if FDEBUG - printf (" DW_CFA_GNU_negative_offset_extended: r%d = cfa[%d*%d]\n", reg, l, fc->data_factor); -#endif + if (! do_debug_frames_interp) + printf (" DW_CFA_GNU_negative_offset_extended: r%ld at cfa%+ld\n", + reg, l * fc->data_factor); fc->col_type[reg] = DW_CFA_offset; fc->col_offset[reg] = l * fc->data_factor; break; @@ -7002,7 +7596,8 @@ display_debug_frames (section, start, file) } } - frame_display_row (fc, &need_col_headers, &max_regs); + if (do_debug_frames_interp) + frame_display_row (fc, &need_col_headers, &max_regs); start = block_end; } @@ -7065,7 +7660,6 @@ debug_displays[] = { ".debug_frame", display_debug_frames, NULL }, { ".eh_frame", display_debug_frames, NULL }, { ".debug_macinfo", display_debug_not_supported, NULL }, - { ".debug_frame", display_debug_not_supported, NULL }, { ".debug_str", display_debug_not_supported, NULL }, { ".debug_static_func", display_debug_not_supported, NULL }, { ".debug_static_vars", display_debug_not_supported, NULL }, @@ -7095,7 +7689,7 @@ display_debug_section (section, file) /* See if we know how to display the contents of this section. */ if (strncmp (name, ".gnu.linkonce.wi.", 17) == 0) - name = ".debug_info"; + name = ".debug_info"; for (i = NUM_ELEM (debug_displays); i--;) if (strcmp (debug_displays[i].name, name) == 0) @@ -7122,7 +7716,7 @@ process_section_contents (file) FILE * file; { Elf32_Internal_Shdr * section; - unsigned int i; + unsigned int i; if (! do_dump) return 1; @@ -7604,7 +8198,7 @@ process_note (pnote) { printf (" %s\t\t0x%08lx\t%s\n", pnote->namesz ? pnote->namedata : "(NONE)", - pnote->descsz, get_note_type (pnote->type)); + pnote->descsz, get_note_type (pnote->type)); return 1; } @@ -7756,7 +8350,7 @@ process_arch_specific (file) switch (elf_header.e_machine) { case EM_MIPS: - case EM_MIPS_RS4_BE: + case EM_MIPS_RS3_LE: return process_mips_specific (file); break; default: @@ -7896,6 +8490,8 @@ process_file (file_name) process_relocs (file); + process_unwind (file); + process_symbol_table (file); process_syminfo (file); diff --git a/contrib/binutils/binutils/rename.c b/contrib/binutils/binutils/rename.c index 78ea9fd..a7be2c1 100644 --- a/contrib/binutils/binutils/rename.c +++ b/contrib/binutils/binutils/rename.c @@ -1,5 +1,5 @@ /* rename.c -- rename a file, preserving symlinks. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright 1999 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/resbin.c b/contrib/binutils/binutils/resbin.c index 8fc07fb..a545343 100644 --- a/contrib/binutils/binutils/resbin.c +++ b/contrib/binutils/binutils/resbin.c @@ -1,5 +1,5 @@ /* resbin.c -- manipulate the Windows binary resource format. - Copyright 1997, 1998 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/rescoff.c b/contrib/binutils/binutils/rescoff.c index 45161c3..e24402b 100644 --- a/contrib/binutils/binutils/rescoff.c +++ b/contrib/binutils/binutils/rescoff.c @@ -1,5 +1,5 @@ /* rescoff.c -- read and write resources in Windows COFF files. - Copyright 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/resrc.c b/contrib/binutils/binutils/resrc.c index 68bc7c4..fca874a 100644 --- a/contrib/binutils/binutils/resrc.c +++ b/contrib/binutils/binutils/resrc.c @@ -1,5 +1,5 @@ /* resrc.c -- read and write Windows rc files. - Copyright 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/size.c b/contrib/binutils/binutils/size.c index 4cf17b2..47a91ad 100644 --- a/contrib/binutils/binutils/size.c +++ b/contrib/binutils/binutils/size.c @@ -1,5 +1,5 @@ /* size.c -- report size of various sections of an executable file. - Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/srconv.c b/contrib/binutils/binutils/srconv.c index fb8996b..d5a2324 100644 --- a/contrib/binutils/binutils/srconv.c +++ b/contrib/binutils/binutils/srconv.c @@ -1,5 +1,6 @@ /* srconv.c -- Sysroff conversion program - Copyright (C) 1994, 95, 96, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1994, 1995, 1996, 1998, 1999, 2000 + Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/strings.c b/contrib/binutils/binutils/strings.c index a961e41..5d3aa6d 100644 --- a/contrib/binutils/binutils/strings.c +++ b/contrib/binutils/binutils/strings.c @@ -1,5 +1,5 @@ /* strings -- print the strings of printable characters in files - Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -76,7 +76,10 @@ #endif #endif -#ifdef isascii +/* Not all printable characters have ASCII codes (depending upon the + LOCALE set) but on some older systems it is not safe to test isprint + without first testing isascii... */ +#if defined isascii && !defined HAVE_LOCALE_H #define isgraphic(c) (isascii (c) && (isprint (c) || (c) == '\t')) #else #define isgraphic(c) (isprint (c) || (c) == '\t') @@ -141,7 +144,7 @@ main (argc, argv) boolean files_given = false; #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) - setlocale (LC_MESSAGES, ""); + setlocale (LC_ALL, ""); #endif bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); diff --git a/contrib/binutils/binutils/sysdump.c b/contrib/binutils/binutils/sysdump.c index 1f8a577..65d2ca6 100644 --- a/contrib/binutils/binutils/sysdump.c +++ b/contrib/binutils/binutils/sysdump.c @@ -1,5 +1,5 @@ /* Sysroff object format dumper. - Copyright (C) 1994, 95, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/sysinfo.y b/contrib/binutils/binutils/sysinfo.y index 0aa8737..fef16cb 100644 --- a/contrib/binutils/binutils/sysinfo.y +++ b/contrib/binutils/binutils/sysinfo.y @@ -1,3 +1,22 @@ +/* Copyright 2001 Free Software Foundation, Inc. + Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com). + +This file is part of GNU binutils. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + %{ #include #include diff --git a/contrib/binutils/binutils/syslex.l b/contrib/binutils/binutils/syslex.l index a394842..553cbdc 100644 --- a/contrib/binutils/binutils/syslex.l +++ b/contrib/binutils/binutils/syslex.l @@ -1,4 +1,23 @@ %{ +/* Copyright 2001 Free Software Foundation, Inc. + +This file is part of GLD, the Gnu Linker. + +GLD is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GLD is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GLD; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ + #include "sysinfo.h" char *word; int number; diff --git a/contrib/binutils/binutils/version.c b/contrib/binutils/binutils/version.c index 5bd1907..5a4aefe 100644 --- a/contrib/binutils/binutils/version.c +++ b/contrib/binutils/binutils/version.c @@ -1,5 +1,6 @@ /* version.c -- binutils version information - Copyright 1991, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. + Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/binutils/wrstabs.c b/contrib/binutils/binutils/wrstabs.c index c74af2e..0b29511 100644 --- a/contrib/binutils/binutils/wrstabs.c +++ b/contrib/binutils/binutils/wrstabs.c @@ -1,5 +1,5 @@ /* wrstabs.c -- Output stabs debugging information - Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. diff --git a/contrib/binutils/gas/ChangeLog b/contrib/binutils/gas/ChangeLog index 7f6a629..6d9ad98 100644 --- a/contrib/binutils/gas/ChangeLog +++ b/contrib/binutils/gas/ChangeLog @@ -1,3 +1,573 @@ +2001-06-18 Philip Blundell + + * config/tc-arm.c (do_msr): Remove restriction on usage of + immediate operands. + +2001-06-13 Philip Blundell + + * config/tc-arm.c (thumb_shift): Improve wording of error message. + (do_t_arit): Likewise. + +2001-06-13 Nick Clifton + + * config/tc-sh.c (md_pseudo_table): Only intercept the .file and + .loc pseudos if the dfwarf2 functions are available. + (md_assemble): Only call dwarf2_emit_insn if it is available. + +2001-06-13 Nick Clifton + + Merge from mainline: + 2001-05-11 Nick Clifton + * config/tc-arm.c (arm_handle_align): When truncating an aligned + block, ensure that the low order bits of the alignment are + preserved. + 2001-05-06 Nick Clifton + * config/tc-arm.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define. + * config/tc-arm.c (arm_handle_align): Do not insert more than + MAX_MEM_FOR_RS_ALIGN_CODE bytes. + (arm_frag_align_code): Use MAX_MEM_FOR_RS_ALIGN_CODE. + 2001-04-26 Nick Clifton + * config/tc-arm.c (arm_handle_align): New Function: Generate + no-op filled alignment frags. + (arm_frag_align_code): New Function: Create a code alignment frag. + (arm_init_frag): New Function: Initialse the target dependent + parts of a frag. + * config/tc-arm.h (TC_FRAG_TYPE): Define. + (TC_FRAG_INIT): Define. + (HANDLE_ALIGN): Define. + (md_do_align): Define. + 2001-03-12 Nick Clifton + * config/tc-arm.c (md_begin): Always set machine type based on + cpu_variant. + 2001-03-06 Nick Clifton + * config/tc-arm.c (md_apply_fix3): Clear bit zero of offset in + BLX(1) instruction. + +2001-06-12 Nick Clifton + + * doc/as.texinfo (Infix Ops): Document that comparison and + combiner operators can be used as infix operators. + +2001-06-12 Nick Clifton + + * config/tc-arm.c: Fix test for overlow of literal pool. + +2001-06-11 Alan Modra + + Merge from mainline. + 2001-06-08 Alan Modra + * config/tc-mips.c (mips16_mark_labels): Reduce number of calls to + S_GET_VALUE by using a temp. + (append_insn): Likewise, and for S_SET_VALUE too. + (mips_emit_delays): Likewise. + (my_getExpression): Likewise. + (md_apply_fix): Likewise. Use "valueT" rather than "long" for "value". + (mips16_extended_frag): Cater for first relaxation pass having + bogus addresses. Use relax_marker to reliably determine whether a + symbol frag has been reached on the current pass. + + 2001-06-07 H.J. Lu + * configure.in: Use MIPS_STABS_ELF for Linux/mips. + * configure: Regenerate. + + 2001-06-07 H.J. Lu + * config/tc-mips.c (mips_pseudo_table): Add "extern" if + MIPS_STABS_ELF is defined. + + 2001-06-06 Christian Groessler + * config/tc-z8k.c: Removed many warnings by removing unused + variables and tagging unused parameters as such. + (md_begin): Fixed a typo (","instead of ";"). + (struct ctrl_table): Add parentheses to initialize array + correctly. + (struct flag_table): Likewise. + (struct intr_table): Likewise. + (struct table): Likewise. + (check_operand): "#if 0"'ed since it doesn't seem to be used. + + 2001-06-06 Peter Jakubek + * gas/config/tc-m68k.c (md_show_usage): Add all supported ColdFire + options to list (e.g. m5206e, m5307, m5407). + + 2001-06-06 Alan Modra + * config/tc-i386.c (md_assemble): Handle Pentium4 branch hints. + : Remove dead code. + + 2001-06-05 Nick Clifton + * symbols.c (S_SET_EXTERNAL): Do not override a section symbol's + status. + + 2001-05-27 Alan Modra + * config/tc-m68k.c (md_assemble): Ensure variable part of frag is + allocated in the same chunk as the fixed part. + + 2001-05-25 Alan Modra + * configure.in: Replace linuxoldld with linux*oldld. + * configure: Regenerate. + + 2000-05-24 Tom Rix + * config/obj-coff.c (add_lineno): xcoff allows negative line + numbers + * config/tc-ppc.c (ppc_stabx): fix generated symbol + + 2001-05-23 Thiemo Seufer + * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit + architecture, remove erraneous ISA_MIPS32. + (md_show_usage): Add MIPS r12k support. + (mips_cpu_info_table): Add MIPS r12k support. + + 2001-05-22 Alan Modra + * config/tc-m68k.c (relaxable_symbol): Only treat external symbols + as relaxable if embedded system, make weak syms non-relaxable. + Move definition.. + (tc_m68k_fix_adjustable): ..so it can be used here. + (md_apply_fix_2): Sign extend without conditional. + + 2001-05-16 Jeff Johnston + * cgen.c (gas_cgen_tc_gen_reloc): Changed error message when + howto entry is not found. + + 2001-05-10 Alan Modra + * config/obj-vms.c (obj_crawl_symbol_chain): Don't take address of + symbol_next. + * config/tc-fr30.c (md_estimate_size_before_relax): Return size of + current variable part of frag. + * config/tc-m32r.c (md_estimate_size_before_relax): Likewise. + * config/tc-m68hc11.c (RELAX_STATE): Define. + (RELAX_LENGTH): Define. + (md_estimate_size_before_relax): Handle non-relaxable cases + separately from relaxable cases for clarity, and return correct + size for multi-pass relaxation. + * config/tc-tahoe.c (RELAX_LENGTH): Correct. + (md_estimate_size_before_relax): As for tc-m68hc11.c. + (md_convert_frag): Remove "length_code". + * config/tc-vax.c (RELAX_STATE): Define. + (RELAX_LENGTH): Define. + (md_relax_table): Add missing entry. + (md_estimate_size_before_relax): As for tc-m68hc11.c. + (md_convert_frag): Remove "length_code". + * config/tc-ns32k.c (md_estimate_size_before_relax): Simplify and + don't bother setting fr_var. Return correct size for multi-pass + relaxation. + * config/tc-h8500.c (md_convert_frag): Don't bother clearing fr_var. + (md_estimate_size_before_relax): No need to set fr_var. + * config/tc-mcore.c (md_convert_frag): Don't bother clearing fr_var. + (md_estimate_size_before_relax): No need to set fr_var. + + 2001-05-08 Andreas Schwab + * config/tc-m68k.c: Instead of replacing -1 by 64 in assignment to + fx_pcrel_adjust explicitly sign extend when reading it. + + 2001-05-03 Thiemo Seufer + * Makefile.am (TARG_ENV_HFILES): Add te-hppa64.h and te-hppalinux64.h. + Run "make dep-am". + * Makefile.in: Regenerate. + * configure.in: Remove duplicate mips-*-ecoff* entry. + * configure: Regenerate. + * config/obj-ecoff.c (obj_pseudo_table): Fix terminating entry. + (n_names): Cast away type mismatch. + (ecoff_sec_sym_ok_for_reloc): Add unused attribute. + (obj_ecoff_frob_symbol): Likewise. + * ecoff.c: (add_file): Add unused attribute. + (ecoff_directive_begin): Likewise. + (ecoff_directive_bend): Likewise. + (ecoff_directive_def): Likewise. + (ecoff_directive_dim): Likewise. + (ecoff_directive_scl): Likewise. + (ecoff_directive_size): Likewise. + (ecoff_directive_type): Likewise. + (ecoff_directive_tag): Likewise. + (ecoff_directive_val): Likewise. + (ecoff_directive_endef): Likewise. + (ecoff_directive_end): Likewise. + (ecoff_directive_ent): Likewise. + (ecoff_directive_extern): Likewise. + (ecoff_directive_file): Likewise. + (ecoff_directive_fmask): Likewise. + (ecoff_directive_frame): Likewise. + (ecoff_directive_mask): Likewise. + (ecoff_directive_loc): Likewise. + (mark_stabs): Likewise. + (ecoff_stab): Likewise. + (ecoff_frob_symbol): Cast away type mismatch. + (ecoff_padding_adjust): Likewise. + (ecoff_build_symbols): Likewise. + (ecoff_build_procs): Likewise. + (ecoff_build_aux): Likewise. + (ecoff_build_strings): Likewise. + (ecoff_build_fdr): Likewise. + (ecoff_build_debug): Likewise. + * itbl-ops.c (itbl_assemble): Variable initialization. + + 2001-04-29 Keith M Wesolowski + * config/tc-mips.c (md_parse_option): Also accept + elf64-tradbigmips and elf64-tradlittlemips for OPTION_64. + + 2001-04-27 Sean McNeil + * configure.in: Add arm-vxworks. + * configure: Regenerate. + + 2001-04-25 Nick Clifton + * config/obj-coff.c (do_linenos_for): Check to see if the filename + symbol has been initialised before extracting its symbol index. + + 2001-04-24 Christian Groessler + * config/tc-z8k.c (build_bytes): 12 and 16 bit displacements now + generate R_CALLR and R_REL16 relocations + + 2000-04-20 Jason Eckhardt + * config/tc-d10v.h (tc_frob_label): Update the symbol's frag + since frag_now can change after d10v_cleanup is called. + + 2001-04-12 Jason Merrill + * dwarf2dbg.c (process_entries): Don't optimize redundant line notes. + + 2001-04-07 Steven J. Hill + * config/tc-mips.c: Support ELF64 for traditional MIPS targets. + * Makefile.am: (TARG_ENV_HFILES): Add tc-mips.h. + * Makefile.in: Regenerated. + * configure.in: Use traditional MIPS targets for Linux/MIPS. + * configure: Regenerated. + + 2001-04-05 Alan Modra + * configure.in: Add h8500-*-coff and h8500-*-rtems targets. + * configure: Regenerate. + * config/tc-h8500.c (md_estimate_size_before_relax): Add missing + cases, and always return size based on current fr_subtype. + (md_begin): Move initialization of md_relax_table.. + (md_relax_table): ..to static initializer. Set rlx_length for + UNDEF_WORD_DISP cases. + * config/tc-w65.c (md_estimate_size_before_relax): Likewise. + (md_begin): Likewise. + (md_relax_table): Likewise. + * config/tc-mcore.c (md_estimate_size_before_relax): Likewise. + (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases. + Set rlx_backward and rlx_forward to zero for unused states. + * config/tc-sh.c (md_estimate_size_before_relax): Likewise. + (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases. + (UNCOND12, UNCOND32): Remove duplicate defines. + + 2001-03-30 Alan Modra + * dwarf2dbg.c (dwarf2_directive_file): Fix warnings. + + 2001-03-30 Alan Modra + * config/tc-sh.c (md_estimate_size_before_relax): Add extra + do-nothing cases to switch to avoid abort on a second relaxation + pass, and tidy code a little. + * config/tc-h8500.c (md_estimate_size_before_relax): Likewise. + * config/tc-w65.c (md_estimate_size_before_relax): Likewise. + * config/tc-mcore.c (COND12, UNCD12): Rename to DISP12 throughout. + (COND32, UNCD32): Rename to DISP32 throughout. + (UNDEF_WORD_DISP): Renumber to 3. + (md_estimate_size_before_relax): Add extra do-nothing cases. + * config/tc-mn10200.c (md_estimate_size_before_relax): Rewrite. + * config/tc-ns32k.c (md_estimate_size_before_relax): Add cases to + handle word and dword branches. + + 2001-03-17 Alan Modra + * read.c (do_org): Handle complex expressions. + * cgen.c (gas_cgen_finish_insn): Likewise. + + 2001-03-15 Alexandre Oliva + * config/tc-sh.c (parse_reg): Match capital MACH and MACL. + + 2001-03-06 Igor Shevlyakov + * config/tc-m68k.c : Add 5407 to archs[] table. + (HAVE_LONG_BRANCH): Add mcf5407. + (select_control_regs): Recognize 5407. + + 2001-03-02 Richard Sandiford + * config/atof-ieee.c (TC_LARGEST_EXPONENT_IS_NORMAL): New macro. + (gen_to_words): Print warnings if NaNs are found and the target CPU + does not support them. Allow largest exponent to be used in normal + numbers if TC_LARGEST_EXPONENT_IS_NORMAL evaluates to true. + + 2001-02-27 Alan Modra + * configure.in (BFD_VERSION): New. + (AM_INIT_AUTOMAKE): Use $BFD_VERSION. + * configure: Regenerate. + + 2001-02-26 Mark Elbrecht + * config/obj-coff.c [BFD_ASSEMBLER] (obj_coff_section): Set + SEC_NEVER_LOAD when the 'n' flag is used. + Add SEC_NEVER_LOAD to matchflags. + + 2001-02-24 Stephane Carrez + * symbols.c (decode_local_label_name): Initialize message_format + only when an error is reported (perf pb due to I18N). + + 2001-02-23 H.J. Lu + * dwarf2dbg.c (dwarf2_directive_file): Call s_app_file (0) if + BFD_ASSEMBLER is not defined. + + 2001-02-16 matthew green + * cgen.c (gas_cgen_md_apply_fix3): Support BFD_RELOC_64. + + 2001-02-11 Maciej W. Rozycki + * config/tc-mips.c (macro): For M_LA_AB emit a + BFD_RELOC_MIPS_CALL16 relocation or a + BFD_RELOC_MIPS_CALL_HI16/BFD_RELOC_MIPS_CALL_LO16 pair instead of + BFD_RELOC_MIPS_GOT16 and + BFD_RELOC_MIPS_GOT_HI16/BFD_RELOC_MIPS_GOT_LO16, respectively for + loading the jump register when generating SVR4_PIC code. + + 2001-02-10 Chris Demetriou + * configure.in: Make 'mipself' and 'mipsecoff' emulations + map to MIPS-specific files, as they used to do before the + change on 2000-05-21. + * configure: Regerate. + + 2001-02-10 Chris Demetriou + * config/tc-mips.c (md_parse_option): Don't try to compile + ELF-only option code if not ELF. + +2001-06-10 Philip Blundell + + * configure.in: Set version to 2.11.1. + * configure: Regenerate. + +2001-06-07 Alan Modra + + * Most files: Update copyright notices. + +2001-06-06 Hans-Peter Nilsson + + * config/tc-cris.c (cris_insn_first_word_frag): New. + (md_assemble): Call cris_insn_first_word_frag to get the first + frag in an insn, not frag_more. Don't call dwarf2_emit_insn at + end. Drop variable insn_size. + (gen_bdap): Call cris_insn_first_word_frag, not frag_more. + +2001-06-06 Nick Clifton + + * as.c (show_usage): Remove L from listing options. It is not a + generic option. + +2001-06-06 Tracy Kuhrt + + * as.c (parse_args): Correct option name "listing-lhs-width2". + +2001-05-30 Richard Henderson + + * read.c (emit_leb128_expr): Call md_cons_align. + +2001-05-28 Jeff Sturm + + * config/tc-sparc.c (md_apply_fix3): Handle BFD_RELOC_SPARC_UA16, + BFD_RELOC_SPARC_UA32 and BFD_RELOC_SPARC_UA64. + (tc_gen_reloc): Likewise. + (sparc_cons_align): Don't clear sparc_no_align_cons. + (cons_fix_new_sparc): Substitute BFD_RELOC_SPARC_UA{16|32|64} for + BFD_RELOC_{16|32|64} iff sparc_no_align_cons is set. + +2001-05-23 Alan Modra + + Merge from mainline. + 2001-05-22 Alan Modra + * config/tc-arc.c (md_assemble): Use is_end_of_line instead of + testing for NULs. + + 2001-05-16 Alan Modra + * config/tc-arc.c (md_assemble): Correct dwarf2_emit_insn param + for 8 byte insns. + * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn before + opcodes are output rather than after. Delete insn_size. + * config/tc-v850.c (md_assemble): Similarly, but delete + total_insn_size. Update copyright. + + 2001-05-03 Alan Modra + * config/tc-i386.c (i386_displacement): Call as_bad for bad GOTOFF + expressions rather than triggering an assert. + + 2001-03-30 Alan Modra + * config/tc-i386.c (UNCOND_JUMP, COND_JUMP, COND_JUMP86): Decrement. + (md_relax_table): Remove first four unused entries. Increment + rlx_length by one throughout table, and update comments to suit. + (md_estimate_size_before_relax): Return size of current variable + part of frag to reflect reality when relaxing more than once. + + 2001-03-25 Alan Modra + * config/tc-i386.c (i386_scale): Accept an absolute expression for + scale factor, and return the end of the expression. + (i386_operand): Modify for above. + + 2001-03-13 Alan Modra + * config/tc-i386.c (RELOC_ENUM): Define. Use throughout file. + (NUM_FLAG_CODE): Define. + (lex_got): New function. + (got_reloc): New global var. + (x86_cons_fix_new): New function. + (x86_cons): New function. + (i386_immediate): Use lex_got here, replacing inline code. Change + "ignoring junk.." error message to "junk.." + (i386_displacement): Likewise. + * config/tc-i386.h (TC_PARSE_CONS_EXPRESSION): Define. + (x86_cons): Declare. + (TC_CONS_FIX_NEW): Define. + (x86_cons_fix_new): Declare. + + 2001-03-07 Alan Modra + * config/tc-i386.c (struct _i386_insn): Rename disp_reloc to reloc. + (md_assemble) : Use correct field of i.op[] + union. + : Use correct i.disp_reloc[]. + : Likewise. + + 2001-02-13 Alan Modra + * doc/c-i386.texi (i386-Arch): Add "jumps"/"nojumps" blurb. + Mention effect of < 386 architectures on jump promotion. + (i386-Jumps): xref above. Don't assume long disp is 32 bits. + + * config/tc-i386.c (no_cond_jump_promotion): New. + (set_cpu_arch): Parse "jumps" arch modifier. + (insn_size): Modify usage comment. + (ENCODE_RELAX_STATE): Reformat and protect macro arg. + (SIZE_FROM_RELAX_STATE): Rename to DISP_SIZE_FROM_RELAX_STATE. + (TYPE_FROM_RELAX_STATE): New define. + (UNCOND_JUMP, COND_JUMP): Renumber. + (md_relax_table): Reorder to suit. + (COND_JUMP86): New define. + (md_relax_table): Handle COND_JUMP86 cases. Add a few comments. + (md_assemble): Create frag var for jumps of max size, encode relax + state for COND_JUMP86. + (md_estimate_size_before_relax): Handle COND_JUMP86 cases, and + leave conditional jumps small if no_cond_jump_promotion. + (md_convert_frag): Likewise. + + 2001-05-10 Alan Modra + * config/tc-v850.c (md_estimate_size_before_relax): Rewrite. + (md_convert_frag): Don't bother clearing fr_var. + (md_pseudo_table): Correct initialization. + + 2001-05-12 Peter Targett + * config/tc-arc.c: Update copyright and tidy source comments. + (md_pseudo_table): Add directive .cpu back as an alias for + .option. Add .file and .line for dwarf2 support. + (arc_mach_type): Make bfd_mach_arc_6 default. + (md_longopts): Add entry 'pre-v6' representing old command line + option when assembling for 'arc5' core versions. + (md_parse_option): Make OPTION_ARC same as OPTION_ARC6, for new + default behaviour. + (arc_code_symbol): Make symbol value for @h30 fixup expression + equal to O_constant. + (md_assemble): Call dwarf2_emit_insn. + Include "dwarf2dbg2.h". Formatting fixes throughout file. + * config/tc-arc.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. + * doc/c-arc.texi (ARC_CORE_DEFAULT): Update to new default. + + 2001-05-15 Alexandre Oliva + * config/tc-mn10300.c (mn10300_force_relocation): Don't + optimize differences between symbols in code sections to + constants. + (mn10300_fix_adjustable): Don't adjust to section+offset + relocations pointing at symbols in code sections. + + 2001-05-14 Alexandre Oliva + * config/tc-mn10300.c (md_assemble): Anchor dwarf2 line info + before a relaxable insns. + + 2001-05-13 Alexandre Oliva + * config/tc-mn10300.c (tc_gen_reloc): Don't reject differences + between symbols if the base symbol is in the current section; + emit a PC-relative relocation instead. + + 2001-05-09 Alexandre Oliva + * config/tc-mn10300.c (md_apply_fix3): Accept PC-relative relocs. + + 2001-05-06 Alexandre Oliva + * config/tc-mn10300.c (md_assemble): Subtract operand->shift + from offset in non-pcrel operands too. + + 2001-04-14 Alexandre Oliva + * config/tc-mn10300.c (md_assemble): Simplify offset adjustment of + pc-relative relocations not placed at the end of the instruction. + + 2001-04-06 Alexandre Oliva + * config/tc-mn10300.c (xr_registers): Added `pc'. + + 2001-03-30 Alan Modra + * config/tc-mn10300.c (md_estimate_size_before_relax): Rewrite. + + 2001-02-23 Richard Sandiford + * config/tc-mn10300.c (md_apply_fix3): Don't mark a fixup as + done if it's against a symbol. + + 2001-03-28 H.J. Lu + * read.c (equals): Set to local for COFF only if it hasn't been + defined before. + + 2001-03-27 Nick Papadonis + * read.c (equals): (for COFF) default symbols to being local. + + 2001-03-23 Richard Sandiford + * write.c (fix_new_exp): Print an error if passed a register. + + 2001-03-20 Alan Modra + * frags.h (struct frag): Add relax_marker. + * write.c (is_dnrange): Delete. + (relax_frag): Use correct types for `aim', `target', `address'. + Delete `offset', `was_address'. Test `relax_marker' instead of + using fragile (and slow) address test. + (relax_segment): Init and flip `relax_marker'. + + 2001-02-13 Ian Lance Taylor + * write.c (is_dnrange): Stop as soon as the address becomes + larger. + (relax_frag): Add segment parameter. Only call symbol_get_frag + once. Only call is_dnrange if the symbol is in the same segment, + and the symbol address is larger. + (relax_segment): Pass segment to md_relax_frag and relax_frag. + * write.h (relax_frag): Update declaration. + * config/tc-fr30.c (fr30_relax_frag): Add segment parameter. Pass + it to relax_frag. + * config/tc-m32r.c (m32r_relax_frag): Likewise. + * config/tc-m32r.h (md_relax_frag): Add segment parameter. + (m32r_relax_frag): Update declaration. + * config/tc-mips.h (md_relax_frag): Add segment parameter. + * config/tc-tic54x.h (md_relax_frag): Likewise. + * doc/internals.texi (CPU backend): Update documentation for + md_relax_frag. + + 2001-03-15 DJ Delorie + * stabs.c (s_stab_generic): Don't corrupt the notes obstack by + blindly freeing string if it isn't at the top of the obstack. + +2001-05-14 Richard Henderson + + * ehopt.c (eh_frame_convert_frag): Fix missed subtype adjustment + last change. + +2001-05-14 Richard Henderson + + * ehopt.c (get_cie_info): Rename from eh_frame_code_alignment; + also collect whether to expect an FDE augmentation. + (check_eh_frame): Rewrite as a state machine. Track where in + an FDE we are located, skip any augmentation. + (eh_frame_estimate_size_before_relax): Get code alignment from + the fragment subtype. + (eh_frame_relax_frag, eh_frame_convert_frag): Likewise. + * read.c (emit_leb128_expr): Call check_eh_frame. + +2001-05-09 Richard Henderson + + * config/tc-ia64.c (generate_unwind_image): Align the fragment + beginning a function's unwind info block. + +2001-04-27 David Mosberger + + * config/tc-ia64.c (dot_spillmem_p): Fix output_spill_?sprel_p() + argument passing order: predicate goes last, not first. + +2001-04-16 David O'Brien + + * configure.in: Add the em type for FreeBSD targets. + * configure: Regenerate. + +2001-04-13 Jim Wilson + + * tc-ia64.c (is_conditional_branch): Return true for br, brl, and br. + excluding br.i. + 2001-04-02 Philip Blundell From 2001-03-17 Richard Henderson @@ -107,7 +677,7 @@ * config/tc-i386.c (tc_i386_fix_adjustable): Fix GOTPCREL GOT entry. -001-02-18 David O'Brien +2001-02-18 David O'Brien * configure.in (cpu_type, arch): Add a generic FreeBSD specification as all FreeBSD platforms should look the same at this level. diff --git a/contrib/binutils/gas/Makefile.am b/contrib/binutils/gas/Makefile.am index 47b6253..357f3cf 100644 --- a/contrib/binutils/gas/Makefile.am +++ b/contrib/binutils/gas/Makefile.am @@ -77,7 +77,7 @@ CPU_TYPES = \ z8k # Object format types. This is only used for dependency information. -# We deliberately omit som, since it does not work as a cross assembler. +# We deliberately omit SOM, since it does not work as a cross assembler. OBJ_FORMATS = \ aout \ @@ -337,6 +337,8 @@ TARG_ENV_HFILES = \ config/te-go32.h \ config/te-hp300.h \ config/te-hppa.h \ + config/te-hppa64.h \ + config/te-hppalinux64.h \ config/te-i386aix.h \ config/te-ic960.h \ config/te-linux.h \ @@ -354,7 +356,8 @@ TARG_ENV_HFILES = \ config/te-sparcaout.h \ config/te-sun3.h \ config/te-svr4.h \ - config/te-sysv32.h + config/te-sysv32.h \ + config/te-tmips.h # Multi files in config @@ -945,13 +948,15 @@ DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \ $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c DEPTC_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ - $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h + struc-symbol.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ + $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h DEPTC_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \ - $(INCDIR)/elf/reloc-macros.h + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ + $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h DEPTC_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h DEPTC_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \ @@ -1179,7 +1184,7 @@ DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h \ - $(INCDIR)/elf/reloc-macros.h + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \ @@ -1303,11 +1308,11 @@ DEPOBJ_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ DEPOBJ_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h DEPOBJ_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/obstack.h subsegs.h + struc-symbol.h $(INCDIR)/obstack.h subsegs.h DEPOBJ_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h DEPOBJ_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/obstack.h @@ -1849,7 +1854,7 @@ BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE. #MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW. app.o: app.c as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \ - sb.h macro.h + sb.h macro.h dwarf2dbg.h atof-generic.o: atof-generic.c bignum-copy.o: bignum-copy.c cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h @@ -1879,7 +1884,8 @@ stabs.o: stabs.c $(INCDIR)/obstack.h subsegs.h ecoff.h \ subsegs.o: subsegs.c subsegs.h $(INCDIR)/obstack.h symbols.o: symbols.c $(INCDIR)/obstack.h subsegs.h \ struc-symbol.h -write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h +write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \ + dwarf2dbg.h gasp.o: gasp.c sb.h macro.h itbl-ops.o: itbl-ops.c itbl-ops.h e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h diff --git a/contrib/binutils/gas/Makefile.in b/contrib/binutils/gas/Makefile.in index bd1a89e..0e001a6 100644 --- a/contrib/binutils/gas/Makefile.in +++ b/contrib/binutils/gas/Makefile.in @@ -189,7 +189,7 @@ CPU_TYPES = \ # Object format types. This is only used for dependency information. -# We deliberately omit som, since it does not work as a cross assembler. +# We deliberately omit SOM, since it does not work as a cross assembler. OBJ_FORMATS = \ aout \ @@ -458,6 +458,8 @@ TARG_ENV_HFILES = \ config/te-go32.h \ config/te-hp300.h \ config/te-hppa.h \ + config/te-hppa64.h \ + config/te-hppalinux64.h \ config/te-i386aix.h \ config/te-ic960.h \ config/te-linux.h \ @@ -475,7 +477,8 @@ TARG_ENV_HFILES = \ config/te-sparcaout.h \ config/te-sun3.h \ config/te-svr4.h \ - config/te-sysv32.h + config/te-sysv32.h \ + config/te-tmips.h # Multi files in config @@ -659,14 +662,16 @@ DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \ DEPTC_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ - $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h + struc-symbol.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ + $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h DEPTC_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \ - $(INCDIR)/elf/reloc-macros.h + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ + $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h DEPTC_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h @@ -951,7 +956,7 @@ DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h \ - $(INCDIR)/elf/reloc-macros.h + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \ @@ -1110,12 +1115,12 @@ DEPOBJ_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ DEPOBJ_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h DEPOBJ_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/obstack.h subsegs.h + struc-symbol.h $(INCDIR)/obstack.h subsegs.h DEPOBJ_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h + $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h DEPOBJ_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ @@ -1877,7 +1882,7 @@ configure configure.in gdbinit.in itbl-lex.c itbl-parse.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES) $(gasp_new_SOURCES) OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS) $(gasp_new_OBJECTS) @@ -2695,7 +2700,7 @@ dep-am: DEP #MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW. app.o: app.c as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \ - sb.h macro.h + sb.h macro.h dwarf2dbg.h atof-generic.o: atof-generic.c bignum-copy.o: bignum-copy.c cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h @@ -2725,7 +2730,8 @@ stabs.o: stabs.c $(INCDIR)/obstack.h subsegs.h ecoff.h \ subsegs.o: subsegs.c subsegs.h $(INCDIR)/obstack.h symbols.o: symbols.c $(INCDIR)/obstack.h subsegs.h \ struc-symbol.h -write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h +write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \ + dwarf2dbg.h gasp.o: gasp.c sb.h macro.h itbl-ops.o: itbl-ops.c itbl-ops.h e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h diff --git a/contrib/binutils/gas/aclocal.m4 b/contrib/binutils/gas/aclocal.m4 index 338b221..2a3ccb7 100644 --- a/contrib/binutils/gas/aclocal.m4 +++ b/contrib/binutils/gas/aclocal.m4 @@ -83,24 +83,6 @@ AC_DEFUN([CY_WITH_NLS],) AC_SUBST(INTLLIBS) ]) -#serial 1 -# This test replaces the one in autoconf. -# Currently this macro should have the same name as the autoconf macro -# because gettext's gettext.m4 (distributed in the automake package) -# still uses it. Otherwise, the use in gettext.m4 makes autoheader -# give these diagnostics: -# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX -# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX - -undefine([AC_ISC_POSIX]) - -AC_DEFUN(AC_ISC_POSIX, - [ - dnl This test replaces the obsolescent AC_ISC_POSIX kludge. - AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) - ] -) - # Do all the work for Automake. 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. diff --git a/contrib/binutils/gas/app.c b/contrib/binutils/gas/app.c index 46273c2..5111598 100644 --- a/contrib/binutils/gas/app.c +++ b/contrib/binutils/gas/app.c @@ -1,5 +1,6 @@ /* This is the Assembler Pre-Processor - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/as.c b/contrib/binutils/gas/as.c index 8c7493d..e8c2212 100644 --- a/contrib/binutils/gas/as.c +++ b/contrib/binutils/gas/as.c @@ -1,5 +1,6 @@ /* as.c - GAS main program. - Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -231,7 +232,6 @@ Options:\n\ m include macro expansions\n\ n omit forms processing\n\ s include symbols\n\ - L include line debug statistics (if applicable)\n\ =FILE list to FILE (must be last sub-option)\n")); fprintf (stream, _("\ @@ -401,7 +401,7 @@ parse_args (pargc, pargv) #define OPTION_LISTING_LHS_WIDTH (OPTION_STD_BASE + 9) {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH}, #define OPTION_LISTING_LHS_WIDTH2 (OPTION_STD_BASE + 10) - {"listing-lhs-width", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2}, + {"listing-lhs-width2", required_argument, NULL, OPTION_LISTING_LHS_WIDTH2}, #define OPTION_LISTING_RHS_WIDTH (OPTION_STD_BASE + 11) {"listing-rhs-width", required_argument, NULL, OPTION_LISTING_RHS_WIDTH}, #define OPTION_LISTING_CONT_LINES (OPTION_STD_BASE + 12) diff --git a/contrib/binutils/gas/as.h b/contrib/binutils/gas/as.h index a98acfe..75abfa9 100644 --- a/contrib/binutils/gas/as.h +++ b/contrib/binutils/gas/as.h @@ -1,5 +1,6 @@ /* as.h - global header file - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/asintl.h b/contrib/binutils/gas/asintl.h index 5b6369f..41bb218 100644 --- a/contrib/binutils/gas/asintl.h +++ b/contrib/binutils/gas/asintl.h @@ -1,5 +1,5 @@ /* asintl.h - gas-specific header for gettext code. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. Written by Tom Tromey diff --git a/contrib/binutils/gas/atof-generic.c b/contrib/binutils/gas/atof-generic.c index 93eadc1..1309566 100644 --- a/contrib/binutils/gas/atof-generic.c +++ b/contrib/binutils/gas/atof-generic.c @@ -1,5 +1,5 @@ /* atof_generic.c - turn a string of digits into a Flonum - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/bignum-copy.c b/contrib/binutils/gas/bignum-copy.c index 8384ff1..b4ed7d1 100644 --- a/contrib/binutils/gas/bignum-copy.c +++ b/contrib/binutils/gas/bignum-copy.c @@ -1,5 +1,5 @@ /* bignum_copy.c - copy a bignum - Copyright (C) 1987, 1990, 1991, 1992, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/bignum.h b/contrib/binutils/gas/bignum.h index e3b2f16..42954cf 100644 --- a/contrib/binutils/gas/bignum.h +++ b/contrib/binutils/gas/bignum.h @@ -1,5 +1,5 @@ /* bignum.h-arbitrary precision integers - Copyright (C) 1987, 1992 Free Software Foundation, Inc. + Copyright 1987, 1992 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/bit_fix.h b/contrib/binutils/gas/bit_fix.h index b9768fd..3eedb3c 100644 --- a/contrib/binutils/gas/bit_fix.h +++ b/contrib/binutils/gas/bit_fix.h @@ -1,5 +1,5 @@ /* bit_fix.h - Copyright (C) 1987, 1992, 2000 Free Software Foundation, Inc. + Copyright 1987, 1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config.in b/contrib/binutils/gas/config.in index fc7ef2b..e2a6003 100644 --- a/contrib/binutils/gas/config.in +++ b/contrib/binutils/gas/config.in @@ -25,6 +25,9 @@ /* Define to `long' if doesn't define. */ #undef off_t +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + /* Define to `unsigned' if doesn't define. */ #undef size_t @@ -154,6 +157,9 @@ /* Use ELF stabs for MIPS, not ECOFF stabs */ #undef MIPS_STABS_ELF +/* Use ELF stabs for MIPS, not ECOFF stabs */ +#undef MIPS_STABS_ELF + /* Define if default target is PowerPC Solaris. */ #undef TARGET_SOLARIS_COMMENT @@ -163,6 +169,9 @@ /* Default architecture. */ #undef DEFAULT_ARCH +/* Default architecture. */ +#undef DEFAULT_ARCH + /* Using cgen code? */ #undef USING_CGEN diff --git a/contrib/binutils/gas/config/aout_gnu.h b/contrib/binutils/gas/config/aout_gnu.h index 52ea70d..82d744b 100644 --- a/contrib/binutils/gas/config/aout_gnu.h +++ b/contrib/binutils/gas/config/aout_gnu.h @@ -1,6 +1,7 @@ /* This file is aout_gnu.h - Copyright (C) 1987-1992 Free Software Foundation, Inc. + Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/atof-ieee.c b/contrib/binutils/gas/config/atof-ieee.c index 2a916cd..ce6afbb 100644 --- a/contrib/binutils/gas/config/atof-ieee.c +++ b/contrib/binutils/gas/config/atof-ieee.c @@ -1,5 +1,5 @@ /* atof_ieee.c - turn a Flonum into an IEEE floating point number - Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1987, 1992, 1994, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -19,6 +19,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* Some float formats are based on the IEEE standard, but use the + largest exponent for normal numbers instead of NaNs and infinites. + The macro TC_LARGEST_EXPONENT_IS_NORMAL should evaluate to true + if the target machine uses such a format. The macro can depend on + command line flags if necessary. There is no need to define the + macro if it would always be 0. */ + #include "as.h" /* Flonums returned here. */ @@ -40,6 +47,10 @@ extern const char EXP_CHARS[]; /* Length in LittleNums of guard bits. */ #define GUARD (2) +#ifndef TC_LARGEST_EXPONENT_IS_NORMAL +#define TC_LARGEST_EXPONENT_IS_NORMAL 0 +#endif + static const unsigned long mask[] = { 0x00000000, @@ -291,6 +302,8 @@ gen_to_words (words, precision, exponent_bits) /* NaN: Do the right thing. */ if (generic_floating_point_number.sign == 0) { + if (TC_LARGEST_EXPONENT_IS_NORMAL) + as_warn ("NaNs are not supported by this target\n"); if (precision == F_PRECISION) { words[0] = 0x7fff; @@ -328,6 +341,9 @@ gen_to_words (words, precision, exponent_bits) } else if (generic_floating_point_number.sign == 'P') { + if (TC_LARGEST_EXPONENT_IS_NORMAL) + as_warn ("Infinities are not supported by this target\n"); + /* +INF: Do the right thing. */ if (precision == F_PRECISION) { @@ -366,6 +382,9 @@ gen_to_words (words, precision, exponent_bits) } else if (generic_floating_point_number.sign == 'N') { + if (TC_LARGEST_EXPONENT_IS_NORMAL) + as_warn ("Infinities are not supported by this target\n"); + /* Negative INF. */ if (precision == F_PRECISION) { @@ -578,7 +597,9 @@ gen_to_words (words, precision, exponent_bits) return return_value; } - else if ((unsigned long) exponent_4 >= mask[exponent_bits]) + else if ((unsigned long) exponent_4 > mask[exponent_bits] + || (! TC_LARGEST_EXPONENT_IS_NORMAL + && (unsigned long) exponent_4 == mask[exponent_bits])) { /* Exponent overflow. Lose immediately. */ diff --git a/contrib/binutils/gas/config/obj-aout.c b/contrib/binutils/gas/config/obj-aout.c index 67bb18e..9d4f24a 100644 --- a/contrib/binutils/gas/config/obj-aout.c +++ b/contrib/binutils/gas/config/obj-aout.c @@ -1,5 +1,5 @@ /* a.out object file format - Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/obj-aout.h b/contrib/binutils/gas/config/obj-aout.h index d91cc48..54168d1 100644 --- a/contrib/binutils/gas/config/obj-aout.h +++ b/contrib/binutils/gas/config/obj-aout.h @@ -1,5 +1,5 @@ /* obj-aout.h, a.out object file format for gas, the assembler. - Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 98, 99, 2000 + Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/obj-coff.c b/contrib/binutils/gas/config/obj-coff.c index e16e5df..69e5558 100644 --- a/contrib/binutils/gas/config/obj-coff.c +++ b/contrib/binutils/gas/config/obj-coff.c @@ -1,5 +1,6 @@ /* coff object file format - Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS. @@ -445,12 +446,17 @@ add_lineno (frag, offset, num) { abort (); } + +#ifndef OBJ_XCOFF + /* The native aix assembler accepts negative line number */ + if (num <= 0) { /* Zero is used as an end marker in the file. */ as_warn (_("Line numbers must be positive integers\n")); num = 1; } +#endif /* OBJ_XCOFF */ new_line->next = line_nos; new_line->frag = frag; new_line->l.line_number = num; @@ -1434,7 +1440,7 @@ obj_coff_section (ignore) switch (*input_line_pointer) { case 'b': flags |= SEC_ALLOC; flags &=~ SEC_LOAD; break; - case 'n': flags &=~ SEC_LOAD; break; + case 'n': flags &=~ SEC_LOAD; flags |= SEC_NEVER_LOAD; break; case 'd': flags |= SEC_DATA | SEC_LOAD; /* fall through */ case 'w': flags &=~ SEC_READONLY; break; case 'x': flags |= SEC_CODE | SEC_LOAD; break; @@ -1487,8 +1493,8 @@ obj_coff_section (ignore) { /* This section's attributes have already been set. Warn if the attributes don't match. */ - flagword matchflags = SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE - | SEC_DATA | SEC_SHARED; + flagword matchflags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE + | SEC_DATA | SEC_SHARED | SEC_NEVER_LOAD); if ((flags ^ oldflags) & matchflags) as_warn (_("Ignoring changed section attributes for %s"), name); } @@ -2075,7 +2081,7 @@ fill_section (abfd, h, file_cursor) if (s->s_name[0]) { fragS *frag = segment_info[i].frchainP->frch_root; - char *buffer; + char *buffer = NULL; if (s->s_size == 0) s->s_scnptr = 0; @@ -3349,12 +3355,13 @@ do_linenos_for (abfd, h, file_cursor) line_ptr != (struct lineno_list *) NULL; line_ptr = line_ptr->next) { - if (line_ptr->line.l_lnno == 0) { - /* Turn a pointer to a symbol into the symbols' index */ - line_ptr->line.l_addr.l_symndx = - ((symbolS *) line_ptr->line.l_addr.l_symndx)->sy_number; + /* Turn a pointer to a symbol into the symbols' index, + provided that it has been initialised. */ + if (line_ptr->line.l_addr.l_symndx) + line_ptr->line.l_addr.l_symndx = + ((symbolS *) line_ptr->line.l_addr.l_symndx)->sy_number; } else { @@ -4056,10 +4063,10 @@ obj_coff_lcomm (ignore) } *p = 0; - symbolP = symbol_find_or_make(name); + symbolP = symbol_find_or_make (name); - if (S_GET_SEGMENT(symbolP) == SEG_UNKNOWN && - S_GET_VALUE(symbolP) == 0) + if (S_GET_SEGMENT (symbolP) == SEG_UNKNOWN && + S_GET_VALUE (symbolP) == 0) { if (! need_pass_2) { @@ -4073,14 +4080,14 @@ obj_coff_lcomm (ignore) (offsetT) temp, (char *) 0); *p = 0; subseg_set (current_seg, current_subseg); /* restore current seg */ - S_SET_SEGMENT(symbolP, SEG_E2); - S_SET_STORAGE_CLASS(symbolP, C_STAT); + S_SET_SEGMENT (symbolP, SEG_E2); + S_SET_STORAGE_CLASS (symbolP, C_STAT); } } else - as_bad(_("Symbol %s already defined"), name); + as_bad (_("Symbol %s already defined"), name); - demand_empty_rest_of_line(); + demand_empty_rest_of_line (); #endif } diff --git a/contrib/binutils/gas/config/obj-coff.h b/contrib/binutils/gas/config/obj-coff.h index 8cf7999..f862f77 100644 --- a/contrib/binutils/gas/config/obj-coff.h +++ b/contrib/binutils/gas/config/obj-coff.h @@ -1,5 +1,6 @@ /* coff object file format - Copyright (C) 1989, 90, 91, 92, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000 Free Software Foundation, Inc. This file is part of GAS. diff --git a/contrib/binutils/gas/config/obj-ecoff.c b/contrib/binutils/gas/config/obj-ecoff.c index 3f80e7d..d1eabce 100644 --- a/contrib/binutils/gas/config/obj-ecoff.c +++ b/contrib/binutils/gas/config/obj-ecoff.c @@ -1,5 +1,5 @@ /* ECOFF object file format. - Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Cygnus Support. This file was put together by Ian Lance Taylor . @@ -95,7 +95,7 @@ const pseudo_typeS obj_pseudo_table[] = { "verstamp", s_ignore, 0 }, /* Sentinel. */ - { NULL } + { NULL, s_ignore, 0 } }; /* Swap out the symbols and debugging information for BFD. */ @@ -141,7 +141,7 @@ ecoff_frob_file () /* bss segment */ ".sbss", ".bss", }; -#define n_names (sizeof (names) / sizeof (names[0])) +#define n_names ((int) (sizeof (names) / sizeof (names[0]))) addr = 0; { @@ -272,7 +272,7 @@ obj_ecoff_set_ext (sym, ext) static int ecoff_sec_sym_ok_for_reloc (sec) - asection *sec; + asection *sec ATTRIBUTE_UNUSED; { return 1; } @@ -280,7 +280,7 @@ ecoff_sec_sym_ok_for_reloc (sec) static void obj_ecoff_frob_symbol (sym, puntp) symbolS *sym; - int *puntp; + int *puntp ATTRIBUTE_UNUSED; { ecoff_frob_symbol (sym); } diff --git a/contrib/binutils/gas/config/obj-ecoff.h b/contrib/binutils/gas/config/obj-ecoff.h index 8bca254..01a67d7 100644 --- a/contrib/binutils/gas/config/obj-ecoff.h +++ b/contrib/binutils/gas/config/obj-ecoff.h @@ -1,5 +1,6 @@ /* ECOFF object file format header file. - Copyright (C) 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1997, 1999 + Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Ian Lance Taylor . diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c index d56eaa9..162f02f 100644 --- a/contrib/binutils/gas/config/obj-elf.c +++ b/contrib/binutils/gas/config/obj-elf.c @@ -1,5 +1,5 @@ /* ELF object file format - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/obj-elf.h b/contrib/binutils/gas/config/obj-elf.h index 43daf64..8e3ce7d 100644 --- a/contrib/binutils/gas/config/obj-elf.h +++ b/contrib/binutils/gas/config/obj-elf.h @@ -1,5 +1,5 @@ /* ELF object file format. - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/obj-generic.h b/contrib/binutils/gas/config/obj-generic.h index 00e4638..8cb8020 100644 --- a/contrib/binutils/gas/config/obj-generic.h +++ b/contrib/binutils/gas/config/obj-generic.h @@ -1,5 +1,6 @@ /* This file is obj-generic.h - Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. + Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/obj-ieee.c b/contrib/binutils/gas/config/obj-ieee.c index 35b49da..521a0d7 100644 --- a/contrib/binutils/gas/config/obj-ieee.c +++ b/contrib/binutils/gas/config/obj-ieee.c @@ -1,5 +1,5 @@ /* obj-format for ieee-695 records. - Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000 + Copyright 1991, 1992, 1993, 1994, 1997, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/obj-ieee.h b/contrib/binutils/gas/config/obj-ieee.h index fbef1cd..2652bc2 100644 --- a/contrib/binutils/gas/config/obj-ieee.h +++ b/contrib/binutils/gas/config/obj-ieee.h @@ -1,5 +1,6 @@ /* This file is obj-ieee.h - Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. + Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/obj-multi.h b/contrib/binutils/gas/config/obj-multi.h index 1d68a0c..225de2c 100644 --- a/contrib/binutils/gas/config/obj-multi.h +++ b/contrib/binutils/gas/config/obj-multi.h @@ -1,5 +1,5 @@ /* Multiple object format emulation. - Copyright (C) 1995, 96, 97, 99, 2000 + Copyright 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/tc-alpha.c b/contrib/binutils/gas/config/tc-alpha.c index ae42d95..ba42aaa 100644 --- a/contrib/binutils/gas/config/tc-alpha.c +++ b/contrib/binutils/gas/config/tc-alpha.c @@ -1,5 +1,6 @@ /* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU. - Copyright (C) 1989, 93-98, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. Contributed by Carnegie Mellon University, 1993. Written by Alessandro Forin, based on earlier gas-1.38 target CPU files. Modified by Ken Raeburn for gas-2.x and ECOFF support. diff --git a/contrib/binutils/gas/config/tc-alpha.h b/contrib/binutils/gas/config/tc-alpha.h index 7edc412..2fe20b7 100644 --- a/contrib/binutils/gas/config/tc-alpha.h +++ b/contrib/binutils/gas/config/tc-alpha.h @@ -1,5 +1,6 @@ /* This file is tc-alpha.h - Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. Written by Ken Raeburn . This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c index 514dba7..99aff8e 100644 --- a/contrib/binutils/gas/config/tc-arm.c +++ b/contrib/binutils/gas/config/tc-arm.c @@ -1,5 +1,5 @@ /* tc-arm.c -- Assemble for the ARM - Copyright (C) 1994, 95, 96, 97, 98, 1999, 2000 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) Modified by David Taylor (dtaylor@armltd.co.uk) @@ -1279,12 +1279,23 @@ add_to_lit_pool () == inst.reloc.exp.X_add_number) && literals[lit_count].exp.X_unsigned == inst.reloc.exp.X_unsigned) break; + + if (literals[lit_count].exp.X_op == inst.reloc.exp.X_op + && inst.reloc.exp.X_op == O_symbol + && (literals[lit_count].exp.X_add_number + == inst.reloc.exp.X_add_number) + && (literals[lit_count].exp.X_add_symbol + == inst.reloc.exp.X_add_symbol) + && (literals[lit_count].exp.X_op_symbol + == inst.reloc.exp.X_op_symbol)) + break; + lit_count++; } if (lit_count == next_literal_pool_place) /* New entry. */ { - if (next_literal_pool_place > MAX_LITERAL_POOL_SIZE) + if (next_literal_pool_place >= MAX_LITERAL_POOL_SIZE) { inst.error = _("Literal Pool Overflow"); return FAIL; @@ -2278,12 +2289,17 @@ do_msr (str, flags) return; } +#if 0 /* The first edition of the ARM architecture manual stated that + writing anything other than the flags with an immediate operation + had UNPREDICTABLE effects. This constraint was removed in the + second edition of the specification. */ if ((cpu_variant & ARM_EXT_V5) != ARM_EXT_V5 && inst.instruction & ((PSR_c | PSR_x | PSR_s) << PSR_SHIFT)) { inst.error = _("immediate value cannot be used to set this field"); return; } +#endif flags |= INST_IMMEDIATE; @@ -6014,7 +6030,7 @@ do_t_arit (str) if (Rs != Rd) { - inst.error = _("dest and source1 one must be the same register"); + inst.error = _("dest and source1 must be the same register"); return; } Rs = Rn; @@ -6513,29 +6529,26 @@ md_begin () } /* Catch special cases. */ - if (cpu_variant != (FPU_DEFAULT | CPU_DEFAULT)) + if (cpu_variant & ARM_EXT_XSCALE) + mach = bfd_mach_arm_XScale; + else if (cpu_variant & ARM_EXT_V5E) + mach = bfd_mach_arm_5TE; + else if (cpu_variant & ARM_EXT_V5) + { + if (cpu_variant & ARM_EXT_THUMB) + mach = bfd_mach_arm_5T; + else + mach = bfd_mach_arm_5; + } + else if (cpu_variant & ARM_EXT_HALFWORD) { - if (cpu_variant & ARM_EXT_XSCALE) - mach = bfd_mach_arm_XScale; - else if (cpu_variant & ARM_EXT_V5E) - mach = bfd_mach_arm_5TE; - else if (cpu_variant & ARM_EXT_V5) - { - if (cpu_variant & ARM_EXT_THUMB) - mach = bfd_mach_arm_5T; - else - mach = bfd_mach_arm_5; - } - else if (cpu_variant & ARM_EXT_HALFWORD) - { - if (cpu_variant & ARM_EXT_THUMB) - mach = bfd_mach_arm_4T; - else - mach = bfd_mach_arm_4; - } - else if (cpu_variant & ARM_EXT_LONGMUL) - mach = bfd_mach_arm_3M; + if (cpu_variant & ARM_EXT_THUMB) + mach = bfd_mach_arm_4T; + else + mach = bfd_mach_arm_4; } + else if (cpu_variant & ARM_EXT_LONGMUL) + mach = bfd_mach_arm_3M; bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach); } @@ -7149,6 +7162,15 @@ md_apply_fix3 (fixP, val, seg) newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12); newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1); + if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX) + /* Remove bit zero of the adjusted offset. Bit zero can only be + set if the upper insn is at a half-word boundary, since the + destination address, an ARM instruction, must always be on a + word boundary. The semantics of the BLX (1) instruction, however, + are that bit zero in the offset must always be zero, and the + corresponding bit one in the target address will be set from bit + one of the source address. */ + newval2 &= ~1; md_number_to_chars (buf, newval, THUMB_SIZE); md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE); } @@ -8418,7 +8440,38 @@ arm_frob_label (sym) ARM_SET_INTERWORK (sym, support_interwork); #endif - if (label_is_thumb_function_name) + /* Note - do not allow local symbols (.Lxxx) to be labeled + as Thumb functions. This is because these labels, whilst + they exist inside Thumb code, are not the entry points for + possible ARM->Thumb calls. Also, these labels can be used + as part of a computed goto or switch statement. eg gcc + can generate code that looks like this: + + ldr r2, [pc, .Laaa] + lsl r3, r3, #2 + ldr r2, [r3, r2] + mov pc, r2 + + .Lbbb: .word .Lxxx + .Lccc: .word .Lyyy + ..etc... + .Laaa: .word Lbbb + + The first instruction loads the address of the jump table. + The second instruction converts a table index into a byte offset. + The third instruction gets the jump address out of the table. + The fourth instruction performs the jump. + + If the address stored at .Laaa is that of a symbol which has the + Thumb_Func bit set, then the linker will arrange for this address + to have the bottom bit set, which in turn would mean that the + address computation performed by the third instruction would end + up with the bottom bit set. Since the ARM is capable of unaligned + word loads, the instruction would then load the incorrect address + out of the jump table, and chaos would ensue. */ + if (label_is_thumb_function_name + && (S_GET_NAME (sym)[0] != '.' || S_GET_NAME (sym)[1] != 'L') + && (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0) { /* When the address of a Thumb function is taken the bottom bit of that address should be set. This will allow @@ -8743,3 +8796,102 @@ s_arm_elf_cons (nbytes) } #endif /* OBJ_ELF */ + +/* This is called from HANDLE_ALIGN in write.c. Fill in the contents + of an rs_align_code fragment. */ + +void +arm_handle_align (fragP) + fragS *fragP; +{ + static char const arm_noop[4] = { 0x00, 0x00, 0xa0, 0xe1 }; + static char const thumb_noop[2] = { 0xc0, 0x46 }; + static char const arm_bigend_noop[4] = { 0xe1, 0xa0, 0x00, 0x00 }; + static char const thumb_bigend_noop[2] = { 0x46, 0xc0 }; + + int bytes, fix, noop_size; + char * p; + const char * noop; + + if (fragP->fr_type != rs_align_code) + return; + + bytes = fragP->fr_next->fr_address - fragP->fr_address - fragP->fr_fix; + p = fragP->fr_literal + fragP->fr_fix; + fix = 0; + + if (bytes > MAX_MEM_FOR_RS_ALIGN_CODE) + bytes &= MAX_MEM_FOR_RS_ALIGN_CODE; + + if (fragP->tc_frag_data) + { + if (target_big_endian) + noop = thumb_bigend_noop; + else + noop = thumb_noop; + noop_size = sizeof (thumb_noop); + } + else + { + if (target_big_endian) + noop = arm_bigend_noop; + else + noop = arm_noop; + noop_size = sizeof (arm_noop); + } + + if (bytes & (noop_size - 1)) + { + fix = bytes & (noop_size - 1); + memset (p, 0, fix); + p += fix; + bytes -= fix; + } + + while (bytes >= noop_size) + { + memcpy (p, noop, noop_size); + p += noop_size; + bytes -= noop_size; + fix += noop_size; + } + + fragP->fr_fix += fix; + fragP->fr_var = noop_size; +} + +/* Called from md_do_align. Used to create an alignment + frag in a code section. */ + +void +arm_frag_align_code (n, max) + int n; + int max; +{ + char * p; + + /* We assume that there will never be a requirment + to support alignments greater than 32 bytes. */ + if (max > MAX_MEM_FOR_RS_ALIGN_CODE) + as_fatal (_("alignments greater than 32 bytes not supported in .text sections.")); + + p = frag_var (rs_align_code, + MAX_MEM_FOR_RS_ALIGN_CODE, + 1, + (relax_substateT) max, + (symbolS *) NULL, + (offsetT) n, + (char *) NULL); + *p = 0; + +} + +/* Perform target specific initialisation of a frag. */ + +void +arm_init_frag (fragP) + fragS *fragP; +{ + /* Record whether this frag is in an ARM or a THUMB area. */ + fragP->tc_frag_data = thumb_mode; +} diff --git a/contrib/binutils/gas/config/tc-arm.h b/contrib/binutils/gas/config/tc-arm.h index 0a823dd..8de5704 100644 --- a/contrib/binutils/gas/config/tc-arm.h +++ b/contrib/binutils/gas/config/tc-arm.h @@ -1,5 +1,5 @@ /* This file is tc-arm.h - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) Modified by David Taylor (dtaylor@armltd.co.uk) @@ -214,3 +214,23 @@ void armelf_frob_symbol PARAMS ((symbolS *, int *)); #ifdef OBJ_ELF #define DWARF2_LINE_MIN_INSN_LENGTH 2 #endif + +#define MAX_MEM_FOR_RS_ALIGN_CODE 31 + +/* For frags in code sections we need to record whether they contain + ARM code or THUMB code. This is that if they have to be aligned, + they can contain the correct type of no-op instruction. */ +#define TC_FRAG_TYPE int +#define TC_FRAG_INIT(fragp) arm_init_frag (fragp) +extern void arm_init_frag PARAMS ((struct frag *)); + +#define HANDLE_ALIGN(fragp) arm_handle_align (fragp) +extern void arm_handle_align PARAMS ((struct frag *)); + +#define md_do_align(N, FILL, LEN, MAX, LABEL) \ + if (FILL == NULL && (N) != 0 && ! need_pass_2 && subseg_text_p (now_seg)) \ + { \ + arm_frag_align_code (N, MAX); \ + goto LABEL; \ + } +extern void arm_frag_align_code PARAMS ((int, int)); diff --git a/contrib/binutils/gas/config/tc-generic.h b/contrib/binutils/gas/config/tc-generic.h index 72df020..f3b676b 100644 --- a/contrib/binutils/gas/config/tc-generic.h +++ b/contrib/binutils/gas/config/tc-generic.h @@ -1,6 +1,6 @@ /* This file is tc-generic.h - Copyright (C) 1987, 91, 92, 95, 1997 Free Software Foundation, Inc. + Copyright 1987, 1991, 1992, 1995, 1997 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c index 05bdcdc..c235413 100644 --- a/contrib/binutils/gas/config/tc-i386.c +++ b/contrib/binutils/gas/config/tc-i386.c @@ -1,5 +1,6 @@ /* i386.c -- Assemble code for the Intel 80386 - Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -69,6 +70,9 @@ static void set_cpu_arch PARAMS ((int)); #ifdef BFD_ASSEMBLER static bfd_reloc_code_real_type reloc PARAMS ((int, int, int, bfd_reloc_code_real_type)); +#define RELOC_ENUM enum bfd_reloc_code_real +#else +#define RELOC_ENUM int #endif #ifndef DEFAULT_ARCH @@ -116,11 +120,7 @@ struct _i386_insn #define Operand_PCrel 1 /* Relocation type for operand */ -#ifdef BFD_ASSEMBLER - enum bfd_reloc_code_real disp_reloc[MAX_OPERANDS]; -#else - int disp_reloc[MAX_OPERANDS]; -#endif + RELOC_ENUM reloc[MAX_OPERANDS]; /* BASE_REG, INDEX_REG, and LOG2_SCALE_FACTOR are used to encode the base index byte below. */ @@ -240,6 +240,7 @@ enum flag_code { CODE_32BIT, CODE_16BIT, CODE_64BIT }; +#define NUM_FLAG_CODE ((int) CODE_64BIT + 1) static enum flag_code flag_code; static int use_rela_relocations = 0; @@ -273,15 +274,20 @@ static const char *cpu_arch_name = NULL; /* CPU feature flags. */ static unsigned int cpu_arch_flags = CpuUnknownFlags|CpuNo64; +/* If set, conditional jumps are not automatically promoted to handle + larger than a byte offset. */ +static unsigned int no_cond_jump_promotion = 0; + /* Interface to relax_segment. - There are 2 relax states for 386 jump insns: one for conditional & - one for unconditional jumps. This is because these two types of - jumps add different sizes to frags when we're figuring out what - sort of jump to choose to reach a given label. */ + There are 3 major relax states for 386 jump insns because the + different types of jumps add different sizes to frags when we're + figuring out what sort of jump to choose to reach a given label. */ /* Types. */ +#define UNCOND_JUMP 0 #define COND_JUMP 1 -#define UNCOND_JUMP 2 +#define COND_JUMP86 2 + /* Sizes. */ #define CODE16 1 #define SMALL 0 @@ -297,10 +303,12 @@ static unsigned int cpu_arch_flags = CpuUnknownFlags|CpuNo64; #endif #endif -#define ENCODE_RELAX_STATE(type,size) \ - ((relax_substateT) ((type<<2) | (size))) -#define SIZE_FROM_RELAX_STATE(s) \ - ( (((s) & 0x3) == BIG ? 4 : (((s) & 0x3) == BIG16 ? 2 : 1)) ) +#define ENCODE_RELAX_STATE(type, size) \ + ((relax_substateT) (((type) << 2) | (size))) +#define TYPE_FROM_RELAX_STATE(s) \ + ((s) >> 2) +#define DISP_SIZE_FROM_RELAX_STATE(s) \ + ((((s) & 3) == BIG ? 4 : (((s) & 3) == BIG16 ? 2 : 1))) /* This table is used by relax_frag to promote short jumps to long ones where necessary. SMALL (short) jumps may be promoted to BIG @@ -315,31 +323,38 @@ const relax_typeS md_relax_table[] = /* The fields are: 1) most positive reach of this state, 2) most negative reach of this state, - 3) how many bytes this mode will add to the size of the current frag + 3) how many bytes this mode will have in the variable part of the frag 4) which index into the table to try if we can't fit into this one. */ - {1, 1, 0, 0}, - {1, 1, 0, 0}, - {1, 1, 0, 0}, - {1, 1, 0, 0}, - - {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (COND_JUMP, BIG)}, - {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (COND_JUMP, BIG16)}, - /* dword conditionals adds 4 bytes to frag: - 1 extra opcode byte, 3 extra displacement bytes. */ + + /* UNCOND_JUMP states. */ + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG)}, + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16)}, + /* dword jmp adds 4 bytes to frag: + 0 extra opcode bytes, 4 displacement bytes. */ {0, 0, 4, 0}, - /* word conditionals add 2 bytes to frag: - 1 extra opcode byte, 1 extra displacement byte. */ + /* word jmp adds 2 byte2 to frag: + 0 extra opcode bytes, 2 displacement bytes. */ {0, 0, 2, 0}, - {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG)}, - {127 + 1, -128 + 1, 0, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16)}, - /* dword jmp adds 3 bytes to frag: - 0 extra opcode bytes, 3 extra displacement bytes. */ + /* COND_JUMP states. */ + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP, BIG)}, + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP, BIG16)}, + /* dword conditionals adds 5 bytes to frag: + 1 extra opcode byte, 4 displacement bytes. */ + {0, 0, 5, 0}, + /* word conditionals add 3 bytes to frag: + 1 extra opcode byte, 2 displacement bytes. */ {0, 0, 3, 0}, - /* word jmp adds 1 byte to frag: - 0 extra opcode bytes, 1 extra displacement byte. */ - {0, 0, 1, 0} + /* COND_JUMP86 states. */ + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP86, BIG)}, + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP86, BIG16)}, + /* dword conditionals adds 5 bytes to frag: + 1 extra opcode byte, 4 displacement bytes. */ + {0, 0, 5, 0}, + /* word conditionals add 4 bytes to frag: + 1 displacement byte and a 3 byte long branch insn. */ + {0, 0, 4, 0} }; static const arch_entry cpu_arch[] = { @@ -726,7 +741,8 @@ set_cpu_arch (dummy) if (strcmp (string, cpu_arch[i].name) == 0) { cpu_arch_name = cpu_arch[i].name; - cpu_arch_flags = cpu_arch[i].flags | (flag_code == CODE_64BIT ? Cpu64 : CpuNo64); + cpu_arch_flags = (cpu_arch[i].flags + | (flag_code == CODE_64BIT ? Cpu64 : CpuNo64)); break; } } @@ -738,6 +754,23 @@ set_cpu_arch (dummy) else as_bad (_("missing cpu architecture")); + no_cond_jump_promotion = 0; + if (*input_line_pointer == ',' + && ! is_end_of_line[(unsigned char) input_line_pointer[1]]) + { + char *string = ++input_line_pointer; + int e = get_symbol_end (); + + if (strcmp (string, "nojumps") == 0) + no_cond_jump_promotion = 1; + else if (strcmp (string, "jumps") == 0) + ; + else + as_bad (_("no such architecture modifier: `%s'"), string); + + *input_line_pointer = e; + } + demand_empty_rest_of_line (); } @@ -1198,9 +1231,6 @@ md_assemble (line) /* Points to template once we've found it. */ const template *t; - /* Count the size of the instruction generated. */ - int insn_size = 0; - int j; char mnemonic[MAX_MNEM_SIZE]; @@ -1208,7 +1238,7 @@ md_assemble (line) /* Initialize globals. */ memset (&i, '\0', sizeof (i)); for (j = 0; j < MAX_OPERANDS; j++) - i.disp_reloc[j] = NO_RELOC; + i.reloc[j] = NO_RELOC; memset (disp_expressions, '\0', sizeof (disp_expressions)); memset (im_expressions, '\0', sizeof (im_expressions)); save_stack_p = save_stack; @@ -1508,11 +1538,7 @@ md_assemble (line) { union i386_op temp_op; unsigned int temp_type; -#ifdef BFD_ASSEMBLER - enum bfd_reloc_code_real temp_reloc; -#else - int temp_reloc; -#endif + RELOC_ENUM temp_reloc; int xchg1 = 0; int xchg2 = 0; @@ -1532,9 +1558,9 @@ md_assemble (line) temp_op = i.op[xchg2]; i.op[xchg2] = i.op[xchg1]; i.op[xchg1] = temp_op; - temp_reloc = i.disp_reloc[xchg2]; - i.disp_reloc[xchg2] = i.disp_reloc[xchg1]; - i.disp_reloc[xchg1] = temp_reloc; + temp_reloc = i.reloc[xchg2]; + i.reloc[xchg2] = i.reloc[xchg1]; + i.reloc[xchg1] = temp_reloc; if (i.mem_operands == 2) { @@ -1654,7 +1680,7 @@ md_assemble (line) for (op = i.operands; --op >= 0;) if ((i.types[op] & Disp) - && i.op[op].imms->X_op == O_constant) + && i.op[op].disps->X_op == O_constant) { offsetT disp = i.op[op].disps->X_add_number; @@ -2672,10 +2698,14 @@ md_assemble (line) { register char *p; + /* Tie dwarf2 debug info to the address at the start of the insn. + We can't do this after the insn has been output as the current + frag may have been closed off. eg. by frag_var. */ + dwarf2_emit_insn (0); + /* Output jumps. */ if (i.tm.opcode_modifier & Jump) { - int size; int code16; int prefix; @@ -2690,16 +2720,19 @@ md_assemble (line) i.prefixes -= 1; code16 ^= CODE16; } + /* Pentium4 branch hints. */ + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */ + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */) + { + prefix++; + i.prefixes--; + } if (i.prefix[REX_PREFIX]) { prefix++; i.prefixes--; } - size = 4; - if (code16) - size = 2; - if (i.prefixes != 0 && !intel_syntax) as_warn (_("skipping prefixes on this instruction")); @@ -2708,23 +2741,27 @@ md_assemble (line) instruction we may generate in md_convert_frag. This is 2 bytes for the opcode and room for the prefix and largest displacement. */ - frag_grow (prefix + 2 + size); - insn_size += prefix + 1; + frag_grow (prefix + 2 + 4); /* Prefix and 1 opcode byte go in fr_fix. */ p = frag_more (prefix + 1); if (i.prefix[DATA_PREFIX]) *p++ = DATA_PREFIX_OPCODE; + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE) + *p++ = i.prefix[SEG_PREFIX]; if (i.prefix[REX_PREFIX]) *p++ = i.prefix[REX_PREFIX]; *p = i.tm.base_opcode; /* 1 possible extra opcode + displacement go in var part. Pass reloc in fr_var. */ frag_var (rs_machine_dependent, - 1 + size, - i.disp_reloc[0], + 1 + 4, + i.reloc[0], ((unsigned char) *p == JUMP_PC_RELATIVE ? ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL) | code16 - : ENCODE_RELAX_STATE (COND_JUMP, SMALL) | code16), + : ((cpu_arch_flags & Cpu386) != 0 + ? ENCODE_RELAX_STATE (COND_JUMP, SMALL) | code16 + : ENCODE_RELAX_STATE (COND_JUMP86, SMALL) | code16)), i.op[0].disps->X_add_symbol, i.op[0].disps->X_add_number, p); @@ -2739,10 +2776,16 @@ md_assemble (line) size = 1; if (i.prefix[ADDR_PREFIX]) { - insn_size += 1; FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE); i.prefixes -= 1; } + /* Pentium4 branch hints. */ + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */ + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */) + { + FRAG_APPEND_1_CHAR (i.prefix[SEG_PREFIX]); + i.prefixes--; + } } else { @@ -2754,7 +2797,6 @@ md_assemble (line) if (i.prefix[DATA_PREFIX]) { - insn_size += 1; FRAG_APPEND_1_CHAR (DATA_PREFIX_OPCODE); i.prefixes -= 1; code16 ^= CODE16; @@ -2768,29 +2810,17 @@ md_assemble (line) if (i.prefix[REX_PREFIX]) { FRAG_APPEND_1_CHAR (i.prefix[REX_PREFIX]); - insn_size++; i.prefixes -= 1; } if (i.prefixes != 0 && !intel_syntax) as_warn (_("skipping prefixes on this instruction")); - if (fits_in_unsigned_byte (i.tm.base_opcode)) - { - insn_size += 1 + size; - p = frag_more (1 + size); - } - else - { - /* Opcode can be at most two bytes. */ - insn_size += 2 + size; - p = frag_more (2 + size); - *p++ = (i.tm.base_opcode >> 8) & 0xff; - } - *p++ = i.tm.base_opcode & 0xff; + p = frag_more (1 + size); + *p++ = i.tm.base_opcode; fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[0].disps, 1, reloc (size, 1, 1, i.disp_reloc[0])); + i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0])); } else if (i.tm.opcode_modifier & JumpInterSegment) { @@ -2823,7 +2853,6 @@ md_assemble (line) as_warn (_("skipping prefixes on this instruction")); /* 1 opcode; 2 segment; offset */ - insn_size += prefix + 1 + 2 + size; p = frag_more (prefix + 1 + 2 + size); if (i.prefix[DATA_PREFIX]) @@ -2848,7 +2877,7 @@ md_assemble (line) } else fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[1].imms, 0, reloc (size, 0, 0, i.disp_reloc[0])); + i.op[1].imms, 0, reloc (size, 0, 0, i.reloc[1])); if (i.op[0].imms->X_op != O_constant) as_bad (_("can't handle non absolute segment in `%s'"), i.tm.name); @@ -2871,7 +2900,6 @@ md_assemble (line) { if (*q) { - insn_size += 1; p = frag_more (1); md_number_to_chars (p, (valueT) *q, 1); } @@ -2880,12 +2908,10 @@ md_assemble (line) /* Now the opcode; be careful about word order here! */ if (fits_in_unsigned_byte (i.tm.base_opcode)) { - insn_size += 1; FRAG_APPEND_1_CHAR (i.tm.base_opcode); } else { - insn_size += 2; p = frag_more (2); /* Put out high byte first: can't use md_number_to_chars! */ *p++ = (i.tm.base_opcode >> 8) & 0xff; @@ -2895,7 +2921,6 @@ md_assemble (line) /* Now the modrm byte and sib byte (if present). */ if (i.tm.opcode_modifier & Modrm) { - insn_size += 1; p = frag_more (1); md_number_to_chars (p, (valueT) (i.rm.regmem << 0 @@ -2910,7 +2935,6 @@ md_assemble (line) && i.rm.mode != 3 && !(i.base_reg && (i.base_reg->reg_type & Reg16) != 0)) { - insn_size += 1; p = frag_more (1); md_number_to_chars (p, (valueT) (i.sib.base << 0 @@ -2944,7 +2968,6 @@ md_assemble (line) } val = offset_in_range (i.op[n].disps->X_add_number, size); - insn_size += size; p = frag_more (size); md_number_to_chars (p, val, size); } @@ -2991,11 +3014,10 @@ md_assemble (line) size = 8; } - insn_size += size; p = frag_more (size); fix_new_exp (frag_now, p - frag_now->fr_literal, size, i.op[n].disps, pcrel, - reloc (size, pcrel, sign, i.disp_reloc[n])); + reloc (size, pcrel, sign, i.reloc[n])); } } } @@ -3026,7 +3048,6 @@ md_assemble (line) } val = offset_in_range (i.op[n].imms->X_add_number, size); - insn_size += size; p = frag_more (size); md_number_to_chars (p, val, size); } @@ -3036,11 +3057,7 @@ md_assemble (line) Need a 32-bit fixup (don't support 8bit non-absolute imms). Try to support other sizes ... */ -#ifdef BFD_ASSEMBLER - enum bfd_reloc_code_real reloc_type; -#else - int reloc_type; -#endif + RELOC_ENUM reloc_type; int size = 4; int sign = 0; @@ -3056,9 +3073,8 @@ md_assemble (line) size = 8; } - insn_size += size; p = frag_more (size); - reloc_type = reloc (size, 0, sign, i.disp_reloc[0]); + reloc_type = reloc (size, 0, sign, i.reloc[n]); #ifdef BFD_ASSEMBLER if (reloc_type == BFD_RELOC_32 && GOT_symbol @@ -3084,8 +3100,6 @@ md_assemble (line) } } - dwarf2_emit_insn (insn_size); - #ifdef DEBUG386 if (flag_debug) { @@ -3095,6 +3109,130 @@ md_assemble (line) } } +#ifndef LEX_AT +static char *lex_got PARAMS ((RELOC_ENUM *, int *)); + +/* Parse operands of the form + @GOTOFF+ + and similar .plt or .got references. + + If we find one, set up the correct relocation in RELOC and copy the + input string, minus the `@GOTOFF' into a malloc'd buffer for + parsing by the calling routine. Return this buffer, and if ADJUST + is non-null set it to the length of the string we removed from the + input line. Otherwise return NULL. */ +static char * +lex_got (reloc, adjust) + RELOC_ENUM *reloc; + int *adjust; +{ + static const char * const mode_name[NUM_FLAG_CODE] = { "32", "16", "64" }; + static const struct { + const char *str; + const RELOC_ENUM rel[NUM_FLAG_CODE]; + } gotrel[] = { + { "PLT", { BFD_RELOC_386_PLT32, 0, BFD_RELOC_X86_64_PLT32 } }, + { "GOTOFF", { BFD_RELOC_386_GOTOFF, 0, 0 } }, + { "GOTPCREL", { 0, 0, BFD_RELOC_X86_64_GOTPCREL } }, + { "GOT", { BFD_RELOC_386_GOT32, 0, BFD_RELOC_X86_64_GOT32 } } + }; + char *cp; + unsigned int j; + + for (cp = input_line_pointer; *cp != '@'; cp++) + if (is_end_of_line[(unsigned char) *cp]) + return NULL; + + for (j = 0; j < sizeof (gotrel) / sizeof (gotrel[0]); j++) + { + int len; + + len = strlen (gotrel[j].str); + if (strncmp (cp + 1, gotrel[j].str, len) == 0) + { + if (gotrel[j].rel[(unsigned int) flag_code] != 0) + { + int first; + char *tmpbuf; + + *reloc = gotrel[j].rel[(unsigned int) flag_code]; + + if (GOT_symbol == NULL) + GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME); + + /* Replace the relocation token with ' ', so that + errors like foo@GOTOFF1 will be detected. */ + first = cp - input_line_pointer; + tmpbuf = xmalloc (strlen (input_line_pointer)); + memcpy (tmpbuf, input_line_pointer, first); + tmpbuf[first] = ' '; + strcpy (tmpbuf + first + 1, cp + 1 + len); + if (adjust) + *adjust = len; + return tmpbuf; + } + + as_bad (_("@%s reloc is not supported in %s bit mode"), + gotrel[j].str, mode_name[(unsigned int) flag_code]); + return NULL; + } + } + + /* Might be a symbol version string. Don't as_bad here. */ + return NULL; +} + +/* x86_cons_fix_new is called via the expression parsing code when a + reloc is needed. We use this hook to get the correct .got reloc. */ +static RELOC_ENUM got_reloc = NO_RELOC; + +void +x86_cons_fix_new (frag, off, len, exp) + fragS *frag; + unsigned int off; + unsigned int len; + expressionS *exp; +{ + RELOC_ENUM r = reloc (len, 0, 0, got_reloc); + got_reloc = NO_RELOC; + fix_new_exp (frag, off, len, exp, 0, r); +} + +void +x86_cons (exp, size) + expressionS *exp; + int size; +{ + if (size == 4) + { + /* Handle @GOTOFF and the like in an expression. */ + char *save; + char *gotfree_input_line; + int adjust; + + save = input_line_pointer; + gotfree_input_line = lex_got (&got_reloc, &adjust); + if (gotfree_input_line) + input_line_pointer = gotfree_input_line; + + expression (exp); + + if (gotfree_input_line) + { + /* expression () has merrily parsed up to the end of line, + or a comma - in the wrong buffer. Transfer how far + input_line_pointer has moved to the right buffer. */ + input_line_pointer = (save + + (input_line_pointer - gotfree_input_line) + + adjust); + free (gotfree_input_line); + } + } + else + expression (exp); +} +#endif + static int i386_immediate PARAMS ((char *)); static int @@ -3102,6 +3240,9 @@ i386_immediate (imm_start) char *imm_start; { char *save_input_line_pointer; +#ifndef LEX_AT + char *gotfree_input_line; +#endif segT exp_seg = 0; expressionS *exp; @@ -3121,80 +3262,22 @@ i386_immediate (imm_start) input_line_pointer = imm_start; #ifndef LEX_AT - { - /* We can have operands of the form - @GOTOFF+ - Take the easy way out here and copy everything - into a temporary buffer... */ - register char *cp; - - cp = strchr (input_line_pointer, '@'); - if (cp != NULL) - { - char *tmpbuf; - int len = 0; - int first; - - /* GOT relocations are not supported in 16 bit mode. */ - if (flag_code == CODE_16BIT) - as_bad (_("GOT relocations not supported in 16 bit mode")); - - if (GOT_symbol == NULL) - GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME); - - if (strncmp (cp + 1, "PLT", 3) == 0) - { - if (flag_code == CODE_64BIT) - i.disp_reloc[this_operand] = BFD_RELOC_X86_64_PLT32; - else - i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; - len = 3; - } - else if (strncmp (cp + 1, "GOTOFF", 6) == 0) - { - if (flag_code == CODE_64BIT) - as_bad ("GOTOFF relocations are unsupported in 64bit mode."); - i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF; - len = 6; - } - else if (strncmp (cp + 1, "GOTPCREL", 8) == 0) - { - if (flag_code == CODE_64BIT) - i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOTPCREL; - else - as_bad ("GOTPCREL relocations are supported only in 64bit mode."); - len = 8; - } - else if (strncmp (cp + 1, "GOT", 3) == 0) - { - if (flag_code == CODE_64BIT) - i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOT32; - else - i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; - len = 3; - } - else - as_bad (_("bad reloc specifier in expression")); - - /* Replace the relocation token with ' ', so that errors like - foo@GOTOFF1 will be detected. */ - first = cp - input_line_pointer; - tmpbuf = (char *) alloca (strlen (input_line_pointer)); - memcpy (tmpbuf, input_line_pointer, first); - tmpbuf[first] = ' '; - strcpy (tmpbuf + first + 1, cp + 1 + len); - input_line_pointer = tmpbuf; - } - } + gotfree_input_line = lex_got (&i.reloc[this_operand], NULL); + if (gotfree_input_line) + input_line_pointer = gotfree_input_line; #endif exp_seg = expression (exp); SKIP_WHITESPACE (); if (*input_line_pointer) - as_bad (_("ignoring junk `%s' after expression"), input_line_pointer); + as_bad (_("junk `%s' after expression"), input_line_pointer); input_line_pointer = save_input_line_pointer; +#ifndef LEX_AT + if (gotfree_input_line) + free (gotfree_input_line); +#endif if (exp->X_op == O_absent || exp->X_op == O_big) { @@ -3248,35 +3331,38 @@ i386_immediate (imm_start) return 1; } -static int i386_scale PARAMS ((char *)); +static char *i386_scale PARAMS ((char *)); -static int +static char * i386_scale (scale) char *scale; { - if (!isdigit (*scale)) - goto bad_scale; + offsetT val; + char *save = input_line_pointer; + + input_line_pointer = scale; + val = get_absolute_expression (); - switch (*scale) + switch (val) { - case '0': - case '1': + case 0: + case 1: i.log2_scale_factor = 0; break; - case '2': + case 2: i.log2_scale_factor = 1; break; - case '4': + case 4: i.log2_scale_factor = 2; break; - case '8': + case 8: i.log2_scale_factor = 3; break; default: - bad_scale: as_bad (_("expecting scale factor of 1, 2, 4, or 8: got `%s'"), scale); - return 0; + input_line_pointer = save; + return NULL; } if (i.log2_scale_factor != 0 && ! i.index_reg) { @@ -3286,7 +3372,9 @@ i386_scale (scale) i.log2_scale_factor = 0; #endif } - return 1; + scale = input_line_pointer; + input_line_pointer = save; + return scale; } static int i386_displacement PARAMS ((char *, char *)); @@ -3299,6 +3387,9 @@ i386_displacement (disp_start, disp_end) register expressionS *exp; segT exp_seg = 0; char *save_input_line_pointer; +#ifndef LEX_AT + char *gotfree_input_line; +#endif int bigdisp = Disp32; if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)) @@ -3359,104 +3450,54 @@ i386_displacement (disp_start, disp_end) } #endif #ifndef LEX_AT - { - /* We can have operands of the form - @GOTOFF+ - Take the easy way out here and copy everything - into a temporary buffer... */ - register char *cp; - - cp = strchr (input_line_pointer, '@'); - if (cp != NULL) - { - char *tmpbuf; - int len = 0; - int first; - - /* GOT relocations are not supported in 16 bit mode. */ - if (flag_code == CODE_16BIT) - as_bad (_("GOT relocations not supported in 16 bit mode")); - - if (GOT_symbol == NULL) - GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME); - - if (strncmp (cp + 1, "PLT", 3) == 0) - { - if (flag_code == CODE_64BIT) - i.disp_reloc[this_operand] = BFD_RELOC_X86_64_PLT32; - else - i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; - len = 3; - } - else if (strncmp (cp + 1, "GOTOFF", 6) == 0) - { - if (flag_code == CODE_64BIT) - as_bad ("GOTOFF relocation is not supported in 64bit mode."); - i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF; - len = 6; - } - else if (strncmp (cp + 1, "GOTPCREL", 8) == 0) - { - if (flag_code != CODE_64BIT) - as_bad ("GOTPCREL relocation is supported only in 64bit mode."); - i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOTPCREL; - len = 8; - } - else if (strncmp (cp + 1, "GOT", 3) == 0) - { - if (flag_code == CODE_64BIT) - i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOT32; - else - i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; - len = 3; - } - else - as_bad (_("bad reloc specifier in expression")); - - /* Replace the relocation token with ' ', so that errors like - foo@GOTOFF1 will be detected. */ - first = cp - input_line_pointer; - tmpbuf = (char *) alloca (strlen (input_line_pointer)); - memcpy (tmpbuf, input_line_pointer, first); - tmpbuf[first] = ' '; - strcpy (tmpbuf + first + 1, cp + 1 + len); - input_line_pointer = tmpbuf; - } - } + gotfree_input_line = lex_got (&i.reloc[this_operand], NULL); + if (gotfree_input_line) + input_line_pointer = gotfree_input_line; #endif exp_seg = expression (exp); + SKIP_WHITESPACE (); + if (*input_line_pointer) + as_bad (_("junk `%s' after expression"), input_line_pointer); +#if GCC_ASM_O_HACK + RESTORE_END_STRING (disp_end + 1); +#endif + RESTORE_END_STRING (disp_end); + input_line_pointer = save_input_line_pointer; +#ifndef LEX_AT + if (gotfree_input_line) + free (gotfree_input_line); +#endif + #ifdef BFD_ASSEMBLER /* We do this to make sure that the section symbol is in the symbol table. We will ultimately change the relocation to be relative to the beginning of the section. */ - if (i.disp_reloc[this_operand] == BFD_RELOC_386_GOTOFF - || i.disp_reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) + if (i.reloc[this_operand] == BFD_RELOC_386_GOTOFF + || i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) { + if (exp->X_op != O_symbol) + { + as_bad (_("bad expression used with @%s"), + (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL + ? "GOTPCREL" + : "GOTOFF")); + return 0; + } + if (S_IS_LOCAL (exp->X_add_symbol) && S_GET_SEGMENT (exp->X_add_symbol) != undefined_section) section_symbol (S_GET_SEGMENT (exp->X_add_symbol)); - assert (exp->X_op == O_symbol); exp->X_op = O_subtract; exp->X_op_symbol = GOT_symbol; - if (i.disp_reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) - i.disp_reloc[this_operand] = BFD_RELOC_32_PCREL; + if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) + i.reloc[this_operand] = BFD_RELOC_32_PCREL; else - i.disp_reloc[this_operand] = BFD_RELOC_32; + i.reloc[this_operand] = BFD_RELOC_32; } #endif - SKIP_WHITESPACE (); - if (*input_line_pointer) - as_bad (_("ignoring junk `%s' after expression"), - input_line_pointer); -#if GCC_ASM_O_HACK - RESTORE_END_STRING (disp_end + 1); -#endif - RESTORE_END_STRING (disp_end); - input_line_pointer = save_input_line_pointer; - if (exp->X_op == O_absent || exp->X_op == O_big) { /* Missing or bad expr becomes absolute 0. */ @@ -3789,12 +3830,14 @@ i386_operand (operand_string) } /* Check for scale factor. */ - if (isdigit ((unsigned char) *base_string)) + if (*base_string != ')') { - if (!i386_scale (base_string)) + char *end_scale = i386_scale (base_string); + + if (!end_scale) return 0; - ++base_string; + base_string = end_scale; if (is_space_char (*base_string)) ++base_string; if (*base_string != ')') @@ -3895,11 +3938,7 @@ md_estimate_size_before_relax (fragP, segment) /* Symbol is undefined in this segment, or we need to keep a reloc so that weak symbols can be overridden. */ int size = (fragP->fr_subtype & CODE16) ? 2 : 4; -#ifdef BFD_ASSEMBLER - enum bfd_reloc_code_real reloc_type; -#else - int reloc_type; -#endif + RELOC_ENUM reloc_type; unsigned char *opcode; int old_fr_fix; @@ -3913,10 +3952,10 @@ md_estimate_size_before_relax (fragP, segment) old_fr_fix = fragP->fr_fix; opcode = (unsigned char *) fragP->fr_opcode; - switch (opcode[0]) + switch (TYPE_FROM_RELAX_STATE (fragP->fr_subtype)) { - case JUMP_PC_RELATIVE: - /* Make jmp (0xeb) a dword displacement jump. */ + case UNCOND_JUMP: + /* Make jmp (0xeb) a (d)word displacement jump. */ opcode[0] = 0xe9; fragP->fr_fix += size; fix_new (fragP, old_fr_fix, size, @@ -3925,9 +3964,35 @@ md_estimate_size_before_relax (fragP, segment) reloc_type); break; - default: + case COND_JUMP86: + if (no_cond_jump_promotion) + goto relax_guess; + + if (size == 2) + { + /* Negate the condition, and branch past an + unconditional jump. */ + opcode[0] ^= 1; + opcode[1] = 3; + /* Insert an unconditional jump. */ + opcode[2] = 0xe9; + /* We added two extra opcode bytes, and have a two byte + offset. */ + fragP->fr_fix += 2 + 2; + fix_new (fragP, old_fr_fix + 2, 2, + fragP->fr_symbol, + fragP->fr_offset, 1, + reloc_type); + break; + } + /* Fall through. */ + + case COND_JUMP: + if (no_cond_jump_promotion) + goto relax_guess; + /* This changes the byte-displacement jump 0x7N - to the dword-displacement jump 0x0f,0x8N. */ + to the (d)word-displacement jump 0x0f,0x8N. */ opcode[1] = opcode[0] + 0x10; opcode[0] = TWO_BYTE_OPCODE_ESCAPE; /* We've added an opcode byte. */ @@ -3937,12 +4002,23 @@ md_estimate_size_before_relax (fragP, segment) fragP->fr_offset, 1, reloc_type); break; + + default: + BAD_CASE (fragP->fr_subtype); + break; } frag_wane (fragP); return fragP->fr_fix - old_fr_fix; } - /* Guess a short jump. */ - return 1; + + relax_guess: + /* Guess size depending on current relax state. Initially the relax + state will correspond to a short jump and we return 1, because + the variable part of the frag (the branch offset) is one byte + long. However, we can relax a section more than once and in that + case we must either set fr_subtype back to the unrelaxed state, + or return the value for the appropriate branch. */ + return md_relax_table[fragP->fr_subtype].rlx_length; } /* Called after relax() is finished. @@ -3982,7 +4058,7 @@ md_convert_frag (abfd, sec, fragP) #ifdef BFD_ASSEMBLER /* Not needed otherwise? */ { - /* Local symbols which have already been resolved have a NULL frags. */ + /* Local symbols which have already been resolved have a NULL frag. */ fragS *sym_frag = symbol_get_frag (fragP->fr_symbol); if (sym_frag) target_address += sym_frag->fr_address; @@ -3995,51 +4071,65 @@ md_convert_frag (abfd, sec, fragP) /* Displacement from opcode start to fill into instruction. */ displacement_from_opcode_start = target_address - opcode_address; - switch (fragP->fr_subtype) + if ((fragP->fr_subtype & BIG) == 0) { - case ENCODE_RELAX_STATE (COND_JUMP, SMALL): - case ENCODE_RELAX_STATE (COND_JUMP, SMALL16): - case ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL): - case ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL16): /* Don't have to change opcode. */ extension = 1; /* 1 opcode + 1 displacement */ where_to_put_displacement = &opcode[1]; - break; + } + else + { + if (no_cond_jump_promotion + && TYPE_FROM_RELAX_STATE (fragP->fr_subtype) != UNCOND_JUMP) + as_warn_where (fragP->fr_file, fragP->fr_line, _("long jump required")); - case ENCODE_RELAX_STATE (COND_JUMP, BIG): - extension = 5; /* 2 opcode + 4 displacement */ - opcode[1] = opcode[0] + 0x10; - opcode[0] = TWO_BYTE_OPCODE_ESCAPE; - where_to_put_displacement = &opcode[2]; - break; + switch (fragP->fr_subtype) + { + case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG): + extension = 4; /* 1 opcode + 4 displacement */ + opcode[0] = 0xe9; + where_to_put_displacement = &opcode[1]; + break; - case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG): - extension = 4; /* 1 opcode + 4 displacement */ - opcode[0] = 0xe9; - where_to_put_displacement = &opcode[1]; - break; + case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16): + extension = 2; /* 1 opcode + 2 displacement */ + opcode[0] = 0xe9; + where_to_put_displacement = &opcode[1]; + break; - case ENCODE_RELAX_STATE (COND_JUMP, BIG16): - extension = 3; /* 2 opcode + 2 displacement */ - opcode[1] = opcode[0] + 0x10; - opcode[0] = TWO_BYTE_OPCODE_ESCAPE; - where_to_put_displacement = &opcode[2]; - break; + case ENCODE_RELAX_STATE (COND_JUMP, BIG): + case ENCODE_RELAX_STATE (COND_JUMP86, BIG): + extension = 5; /* 2 opcode + 4 displacement */ + opcode[1] = opcode[0] + 0x10; + opcode[0] = TWO_BYTE_OPCODE_ESCAPE; + where_to_put_displacement = &opcode[2]; + break; - case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16): - extension = 2; /* 1 opcode + 2 displacement */ - opcode[0] = 0xe9; - where_to_put_displacement = &opcode[1]; - break; + case ENCODE_RELAX_STATE (COND_JUMP, BIG16): + extension = 3; /* 2 opcode + 2 displacement */ + opcode[1] = opcode[0] + 0x10; + opcode[0] = TWO_BYTE_OPCODE_ESCAPE; + where_to_put_displacement = &opcode[2]; + break; - default: - BAD_CASE (fragP->fr_subtype); - break; + case ENCODE_RELAX_STATE (COND_JUMP86, BIG16): + extension = 4; + opcode[0] ^= 1; + opcode[1] = 3; + opcode[2] = 0xe9; + where_to_put_displacement = &opcode[3]; + break; + + default: + BAD_CASE (fragP->fr_subtype); + break; + } } + /* Now put displacement after opcode. */ md_number_to_chars ((char *) where_to_put_displacement, (valueT) (displacement_from_opcode_start - extension), - SIZE_FROM_RELAX_STATE (fragP->fr_subtype)); + DISP_SIZE_FROM_RELAX_STATE (fragP->fr_subtype)); fragP->fr_fix += extension; } diff --git a/contrib/binutils/gas/config/tc-i386.h b/contrib/binutils/gas/config/tc-i386.h index a68d5e4..71e0c88 100644 --- a/contrib/binutils/gas/config/tc-i386.h +++ b/contrib/binutils/gas/config/tc-i386.h @@ -1,6 +1,7 @@ /* tc-i386.h -- Header file for tc-i386.c - Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 - Free Software Foundation. + Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -154,6 +155,15 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag)); #endif /* ! BFD_ASSEMBLER */ +#ifndef LEX_AT +#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) x86_cons (EXP, NBYTES) +extern void x86_cons PARAMS ((expressionS *, int)); + +#define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) x86_cons_fix_new(FRAG, OFF, LEN, EXP) +extern void x86_cons_fix_new + PARAMS ((fragS *, unsigned int, unsigned int, expressionS *)); +#endif + #define TC_FORCE_RELOCATION(fixp) tc_i386_force_relocation(fixp) extern int tc_i386_force_relocation PARAMS ((struct fix *)); diff --git a/contrib/binutils/gas/config/tc-m68851.h b/contrib/binutils/gas/config/tc-m68851.h index 398e1d2..870e881 100644 --- a/contrib/binutils/gas/config/tc-m68851.h +++ b/contrib/binutils/gas/config/tc-m68851.h @@ -1,6 +1,7 @@ /* This file is tc-m68851.h - Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. + Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/tc-ppc.c b/contrib/binutils/gas/config/tc-ppc.c index 2b826cb..a893209 100644 --- a/contrib/binutils/gas/config/tc-ppc.c +++ b/contrib/binutils/gas/config/tc-ppc.c @@ -1,5 +1,5 @@ /* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000) - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. @@ -2845,9 +2845,29 @@ ppc_stabx (ignore) symbol_get_tc (sym)->output = 1; - if (S_GET_STORAGE_CLASS (sym) == C_STSYM) + if (S_GET_STORAGE_CLASS (sym) == C_STSYM) { + symbol_get_tc (sym)->within = ppc_current_block; + /* In this case : + + .bs name + .stabx "z",arrays_,133,0 + .es + + .comm arrays_,13768,3 + + resolve_symbol_value will copy the exp's "within" into sym's when the + offset is 0. Since this seems to be corner case problem, + only do the correction for storage class C_STSYM. A better solution + would be to have the tc field updated in ppc_symbol_new_hook. */ + + if (exp.X_op == O_symbol) + { + symbol_get_tc (exp.X_add_symbol)->within = ppc_current_block; + } + } + if (exp.X_op != O_symbol || ! S_IS_EXTERNAL (exp.X_add_symbol) || S_GET_SEGMENT (exp.X_add_symbol) != bss_section) diff --git a/contrib/binutils/gas/config/tc-ppc.h b/contrib/binutils/gas/config/tc-ppc.h index f246cd7..c2876bf 100644 --- a/contrib/binutils/gas/config/tc-ppc.h +++ b/contrib/binutils/gas/config/tc-ppc.h @@ -1,5 +1,5 @@ /* tc-ppc.h -- Header file for tc-ppc.c. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. diff --git a/contrib/binutils/gas/config/tc-sparc.c b/contrib/binutils/gas/config/tc-sparc.c index 6c9827c..558dc89 100644 --- a/contrib/binutils/gas/config/tc-sparc.c +++ b/contrib/binutils/gas/config/tc-sparc.c @@ -1,5 +1,6 @@ /* tc-sparc.c -- Assemble for the SPARC - Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -2970,16 +2971,19 @@ md_apply_fix3 (fixP, value, segment) /* If this is a data relocation, just output VAL. */ - if (fixP->fx_r_type == BFD_RELOC_16) + if (fixP->fx_r_type == BFD_RELOC_16 + || fixP->fx_r_type == BFD_RELOC_SPARC_UA16) { md_number_to_chars (buf, val, 2); } else if (fixP->fx_r_type == BFD_RELOC_32 + || fixP->fx_r_type == BFD_RELOC_SPARC_UA32 || fixP->fx_r_type == BFD_RELOC_SPARC_REV32) { md_number_to_chars (buf, val, 4); } - else if (fixP->fx_r_type == BFD_RELOC_64) + else if (fixP->fx_r_type == BFD_RELOC_64 + || fixP->fx_r_type == BFD_RELOC_SPARC_UA64) { md_number_to_chars (buf, val, 8); } @@ -3315,6 +3319,9 @@ tc_gen_reloc (section, fixp) case BFD_RELOC_SPARC_LOX10: case BFD_RELOC_SPARC_REV32: case BFD_RELOC_SPARC_OLO10: + case BFD_RELOC_SPARC_UA16: + case BFD_RELOC_SPARC_UA32: + case BFD_RELOC_SPARC_UA64: case BFD_RELOC_VTABLE_ENTRY: case BFD_RELOC_VTABLE_INHERIT: code = fixp->fx_r_type; @@ -4065,12 +4072,9 @@ sparc_cons_align (nbytes) if (! enforce_aligned_data) return; + /* Don't align if this is an unaligned pseudo-op. */ if (sparc_no_align_cons) - { - /* This is an unaligned pseudo-op. */ - sparc_no_align_cons = 0; - return; - } + return; nalign = log2 (nbytes); if (nalign == 0) @@ -4195,9 +4199,23 @@ cons_fix_new_sparc (frag, where, nbytes, exp) (nbytes == 2 ? BFD_RELOC_16 : (nbytes == 4 ? BFD_RELOC_32 : BFD_RELOC_64))); - if (target_little_endian_data && nbytes == 4 + if (target_little_endian_data + && nbytes == 4 && now_seg->flags & SEC_ALLOC) r = BFD_RELOC_SPARC_REV32; + + if (sparc_no_align_cons) + { + switch (nbytes) + { + case 2: r = BFD_RELOC_SPARC_UA16; break; + case 4: r = BFD_RELOC_SPARC_UA32; break; + case 8: r = BFD_RELOC_SPARC_UA64; break; + default: abort (); + } + sparc_no_align_cons = 0; + } + fix_new_exp (frag, where, (int) nbytes, exp, 0, r); } diff --git a/contrib/binutils/gas/config/tc-sparc.h b/contrib/binutils/gas/config/tc-sparc.h index 17bef83..ce19f5d 100644 --- a/contrib/binutils/gas/config/tc-sparc.h +++ b/contrib/binutils/gas/config/tc-sparc.h @@ -1,5 +1,6 @@ /* tc-sparc.h - Macros and type defines for the sparc. - Copyright (C) 1989, 90-96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/tc-tic30.c b/contrib/binutils/gas/config/tc-tic30.c index e11cb33..2190a85 100644 --- a/contrib/binutils/gas/config/tc-tic30.c +++ b/contrib/binutils/gas/config/tc-tic30.c @@ -1,5 +1,5 @@ /* tc-c30.c -- Assembly code for the Texas Instruments TMS320C30 - Copyright (C) 1998, 1999, 2000 Free Software Foundation. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/tc-tic30.h b/contrib/binutils/gas/config/tc-tic30.h index 5b34cf1..d55c870 100644 --- a/contrib/binutils/gas/config/tc-tic30.h +++ b/contrib/binutils/gas/config/tc-tic30.h @@ -1,5 +1,5 @@ /* tc-tic30.h -- Header file for tc-tic30.c - Copyright (C) 1998, 2000 Free Software Foundation. + Copyright 1998, 2000 Free Software Foundation, Inc. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/tc-v850.c b/contrib/binutils/gas/config/tc-v850.c index 57931950..ce676cd 100644 --- a/contrib/binutils/gas/config/tc-v850.c +++ b/contrib/binutils/gas/config/tc-v850.c @@ -1,5 +1,6 @@ /* tc-v850.c -- Assembler code for the NEC V850 - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation. + Copyright 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -604,8 +605,8 @@ const pseudo_typeS md_pseudo_table[] = { {"call_table_text", v850_call_table_text, 0}, {"v850e", set_machine, bfd_mach_v850e}, {"v850ea", set_machine, bfd_mach_v850ea}, - {"file", dwarf2_directive_file }, - {"loc", dwarf2_directive_loc }, + {"file", dwarf2_directive_file, 0}, + {"loc", dwarf2_directive_loc, 0}, { NULL, NULL, 0} }; @@ -1321,7 +1322,6 @@ md_convert_frag (abfd, sec, fragP) { fix_new (fragP, fragP->fr_fix, 2, fragP->fr_symbol, fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int)fragP->fr_opcode); - fragP->fr_var = 0; fragP->fr_fix += 2; } /* Out of range conditional branch. Emit a branch around a jump. */ @@ -1345,7 +1345,6 @@ md_convert_frag (abfd, sec, fragP) fix_new (fragP, fragP->fr_fix + 2, 4, fragP->fr_symbol, fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int) fragP->fr_opcode + 1); - fragP->fr_var = 0; fragP->fr_fix += 6; } /* Out of range unconditional branch. Emit a jump. */ @@ -1355,7 +1354,6 @@ md_convert_frag (abfd, sec, fragP) fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset, 1, BFD_RELOC_UNUSED + (int) fragP->fr_opcode + 1); - fragP->fr_var = 0; fragP->fr_fix += 4; } else @@ -1702,7 +1700,6 @@ md_assemble (str) int relaxable = 0; unsigned long insn; unsigned long insn_size; - unsigned long total_insn_size = 0; char *f; int i; int match; @@ -2153,6 +2150,11 @@ md_assemble (str) input_line_pointer = str; + /* Tie dwarf2 debug info to the address at the start of the insn. + We can't do this after the insn has been output as the current + frag may have been closed off. eg. by frag_var. */ + dwarf2_emit_insn (0); + /* Write out the instruction. */ if (relaxable && fc > 0) @@ -2178,7 +2180,6 @@ md_assemble (str) md_number_to_chars (f, insn, insn_size); md_number_to_chars (f + 2, 0, 4); } - total_insn_size = insn_size; } else { @@ -2193,15 +2194,11 @@ md_assemble (str) insn_size = 2; f = frag_more (insn_size); - total_insn_size = insn_size; - md_number_to_chars (f, insn, insn_size); if (extra_data_after_insn) { f = frag_more (extra_data_len); - total_insn_size += extra_data_len; - md_number_to_chars (f, extra_data, extra_data_len); extra_data_after_insn = false; @@ -2274,8 +2271,6 @@ md_assemble (str) } input_line_pointer = saved_input_line_pointer; - - dwarf2_emit_insn (total_insn_size); } /* If while processing a fixup, a reloc really needs to be created @@ -2315,20 +2310,17 @@ tc_gen_reloc (seg, fixp) return reloc; } -/* Assume everything will fit in two bytes, then expand as necessary. */ +/* Return current size of variable part of frag. */ int md_estimate_size_before_relax (fragp, seg) fragS *fragp; asection *seg ATTRIBUTE_UNUSED; { - if (fragp->fr_subtype == 0) - fragp->fr_var = 4; - else if (fragp->fr_subtype == 2) - fragp->fr_var = 2; - else + if (fragp->fr_subtype >= sizeof (md_relax_table) / sizeof (md_relax_table[0])) abort (); - return 2; + + return md_relax_table[fragp->fr_subtype].rlx_length; } long diff --git a/contrib/binutils/gas/config/tc-v850.h b/contrib/binutils/gas/config/tc-v850.h index 1e597f0..7ce0491 100644 --- a/contrib/binutils/gas/config/tc-v850.h +++ b/contrib/binutils/gas/config/tc-v850.h @@ -1,5 +1,5 @@ /* tc-v850.h -- Header file for tc-v850.c. - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/tc-z8k.c b/contrib/binutils/gas/config/tc-z8k.c index 58c85ea..73666ca 100644 --- a/contrib/binutils/gas/config/tc-z8k.c +++ b/contrib/binutils/gas/config/tc-z8k.c @@ -1,6 +1,6 @@ /* tc-z8k.c -- Assemble code for the Zilog Z800n - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 - Free Software Foundation. + Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -159,8 +159,6 @@ md_begin () for (opcode = z8k_table; opcode->name; opcode++) { /* Only enter unique codes into the table. */ - char *src = opcode->name; - if (strcmp (opcode->name, prev_name)) { hash_insert (opcode_hash_control, opcode->name, (char *) opcode); @@ -178,8 +176,8 @@ md_begin () { opcode_entry_type *fake_opcode; fake_opcode = (opcode_entry_type *) malloc (sizeof (opcode_entry_type)); - fake_opcode->name = md_pseudo_table[idx].poc_name, - fake_opcode->func = (void *) (md_pseudo_table + idx); + fake_opcode->name = md_pseudo_table[idx].poc_name; + fake_opcode->func = (void *) (md_pseudo_table + idx); fake_opcode->opcode = 250; hash_insert (opcode_hash_control, fake_opcode->name, fake_opcode); } @@ -404,25 +402,24 @@ struct ctrl_names { }; struct ctrl_names ctrl_table[] = { - 0x2, "fcw", - 0X3, "refresh", - 0x4, "psapseg", - 0x5, "psapoff", - 0x5, "psap", - 0x6, "nspseg", - 0x7, "nspoff", - 0x7, "nsp", - 0 , 0 + { 0x2, "fcw" }, + { 0x3, "refresh" }, + { 0x4, "psapseg" }, + { 0x5, "psapoff" }, + { 0x5, "psap" }, + { 0x6, "nspseg" }, + { 0x7, "nspoff" }, + { 0x7, "nsp" }, + { 0 , 0 } }; static void get_ctrl_operand (ptr, mode, dst) char **ptr; struct z8k_op *mode; - unsigned int dst; + unsigned int dst ATTRIBUTE_UNUSED; { char *src = *ptr; - int r; int i; while (*src == ' ') @@ -455,23 +452,22 @@ struct flag_names { }; struct flag_names flag_table[] = { - 0x1, "p", - 0x1, "v", - 0x2, "s", - 0x4, "z", - 0x8, "c", - 0x0, "+", - 0, 0 + { 0x1, "p" }, + { 0x1, "v" }, + { 0x2, "s" }, + { 0x4, "z" }, + { 0x8, "c" }, + { 0x0, "+" }, + { 0, 0 } }; static void get_flags_operand (ptr, mode, dst) char **ptr; struct z8k_op *mode; - unsigned int dst; + unsigned int dst ATTRIBUTE_UNUSED; { char *src = *ptr; - int r; int i; int j; @@ -508,21 +504,20 @@ struct interrupt_names { }; struct interrupt_names intr_table[] = { - 0x1, "nvi", - 0x2, "vi", - 0x3, "both", - 0x3, "all", - 0, 0 + { 0x1, "nvi" }, + { 0x2, "vi" }, + { 0x3, "both" }, + { 0x3, "all" }, + { 0, 0 } }; static void get_interrupt_operand (ptr, mode, dst) char **ptr; struct z8k_op *mode; - unsigned int dst; + unsigned int dst ATTRIBUTE_UNUSED; { char *src = *ptr; - int r; int i; while (*src == ' ') @@ -555,39 +550,38 @@ struct cc_names { }; struct cc_names table[] = { - 0x0, "f", - 0x1, "lt", - 0x2, "le", - 0x3, "ule", - 0x4, "ov", - 0x4, "pe", - 0x5, "mi", - 0x6, "eq", - 0x6, "z", - 0x7, "c", - 0x7, "ult", - 0x8, "t", - 0x9, "ge", - 0xa, "gt", - 0xb, "ugt", - 0xc, "nov", - 0xc, "po", - 0xd, "pl", - 0xe, "ne", - 0xe, "nz", - 0xf, "nc", - 0xf, "uge", - 0 , 0 + { 0x0, "f" }, + { 0x1, "lt" }, + { 0x2, "le" }, + { 0x3, "ule" }, + { 0x4, "ov" }, + { 0x4, "pe" }, + { 0x5, "mi" }, + { 0x6, "eq" }, + { 0x6, "z" }, + { 0x7, "c" }, + { 0x7, "ult" }, + { 0x8, "t" }, + { 0x9, "ge" }, + { 0xa, "gt" }, + { 0xb, "ugt" }, + { 0xc, "nov" }, + { 0xc, "po" }, + { 0xd, "pl" }, + { 0xe, "ne" }, + { 0xe, "nz" }, + { 0xf, "nc" }, + { 0xf, "uge" }, + { 0 , 0 } }; static void get_cc_operand (ptr, mode, dst) char **ptr; struct z8k_op *mode; - unsigned int dst; + unsigned int dst ATTRIBUTE_UNUSED; { char *src = *ptr; - int r; int i; while (*src == ' ') @@ -616,13 +610,10 @@ static void get_operand (ptr, mode, dst) char **ptr; struct z8k_op *mode; - unsigned int dst; + unsigned int dst ATTRIBUTE_UNUSED; { char *src = *ptr; char *end; - unsigned int num; - unsigned int len; - unsigned int size; mode->mode = 0; @@ -774,7 +765,7 @@ get_operands (opcode, op_end, operand) ptr = savptr; get_operand (&ptr, operand + 0, 0); if (ptr == 0) - return; + return NULL; if (*ptr == ',') ptr++; get_ctrl_operand (&ptr, operand + 1, 1); @@ -786,7 +777,7 @@ get_operands (opcode, op_end, operand) get_operand (&ptr, operand + 0, 0); } if (ptr == 0) - return; + return NULL; if (*ptr == ',') ptr++; get_operand (&ptr, operand + 1, 1); @@ -838,8 +829,7 @@ get_specific (opcode, operands) int found = 0; unsigned int noperands = opcode->noperands; - unsigned int dispreg; - unsigned int this_index = opcode->idx; + int this_index = opcode->idx; while (this_index == opcode->idx && !found) { @@ -848,7 +838,7 @@ get_specific (opcode, operands) this_try = opcode++; for (i = 0; i < noperands; i++) { - int mode = operands[i].mode; + unsigned int mode = operands[i].mode; if ((mode & CLASS_MASK) != (this_try->arg_info[i] & CLASS_MASK)) { @@ -912,6 +902,7 @@ get_specific (opcode, operands) return 0; } +#if 0 /* Not used. */ static void check_operand (operand, width, string) struct z8k_op *operand; @@ -935,6 +926,7 @@ check_operand (operand, width, string) } } +#endif static char buffer[20]; @@ -966,17 +958,15 @@ apply_fix (ptr, type, operand, size) { int n = operand->X_add_number; - operand->X_add_number = n; newfix ((ptr - buffer) / 2, type, operand); -#if 1 switch (size) { - case 8: /* 8 nibbles == 32 bits */ + case 8: /* 8 nibbles == 32 bits. */ *ptr++ = n >> 28; *ptr++ = n >> 24; *ptr++ = n >> 20; *ptr++ = n >> 16; - case 4: /* 4 niblles == 16 bits */ + case 4: /* 4 nibbles == 16 bits. */ *ptr++ = n >> 12; *ptr++ = n >> 8; case 2: @@ -985,9 +975,7 @@ apply_fix (ptr, type, operand, size) *ptr++ = n >> 0; break; } -#endif return ptr; - } /* Now we know what sort of opcodes it is. Let's build the bytes. */ @@ -997,16 +985,10 @@ apply_fix (ptr, type, operand, size) static void build_bytes (this_try, operand) opcode_entry_type *this_try; - struct z8k_op *operand; + struct z8k_op *operand ATTRIBUTE_UNUSED; { - unsigned int i; - - int length; - char *output; char *output_ptr = buffer; - char part; int c; - char high; int nib; int nibble; unsigned int *class_ptr; @@ -1017,8 +999,7 @@ build_bytes (this_try, operand) memset (buffer, 20, 0); class_ptr = this_try->byte_info; - top: - for (nibble = 0; c = *class_ptr++; nibble++) + for (nibble = 0; (c = *class_ptr++); nibble++) { switch (c & CLASS_MASK) @@ -1030,7 +1011,7 @@ build_bytes (this_try, operand) /* Direct address, we don't cope with the SS mode right now. */ if (segmented_mode) { - da_operand->X_add_number |= 0x80000000; + /* da_operand->X_add_number |= 0x80000000; -- Now set at relocation time. */ output_ptr = apply_fix (output_ptr, R_IMM32, da_operand, 8); } else @@ -1107,7 +1088,17 @@ build_bytes (this_try, operand) *output_ptr++ = reg[c & 0xf]; break; case CLASS_DISP: - output_ptr = apply_fix (output_ptr, R_IMM16, da_operand, 4); + switch (c & ARG_MASK) + { + case ARG_DISP12: + output_ptr = apply_fix (output_ptr, R_CALLR, da_operand, 4); + break; + case ARG_DISP16: + output_ptr = apply_fix (output_ptr, R_REL16, da_operand, 4); + break; + default: + output_ptr = apply_fix (output_ptr, R_IMM16, da_operand, 4); + } da_operand = 0; break; @@ -1170,16 +1161,13 @@ void md_assemble (str) char *str; { + char c; char *op_start; char *op_end; - unsigned int i; struct z8k_op operand[3]; opcode_entry_type *opcode; opcode_entry_type *prev_opcode; - char *dot = 0; - char c; - /* Drop leading whitespace. */ while (*str == ' ') str++; @@ -1253,21 +1241,21 @@ md_assemble (str) void tc_crawl_symbol_chain (headers) - object_headers *headers; + object_headers *headers ATTRIBUTE_UNUSED; { printf (_("call to tc_crawl_symbol_chain \n")); } symbolS * md_undefined_symbol (name) - char *name; + char *name ATTRIBUTE_UNUSED; { return 0; } void tc_headers_hook (headers) - object_headers *headers; + object_headers *headers ATTRIBUTE_UNUSED; { printf (_("call to tc_headers_hook \n")); } @@ -1389,9 +1377,9 @@ tc_aout_fix_to_chars () void md_convert_frag (headers, seg, fragP) - object_headers *headers; - segT seg; - fragS *fragP; + object_headers *headers ATTRIBUTE_UNUSED; + segT seg ATTRIBUTE_UNUSED; + fragS *fragP ATTRIBUTE_UNUSED; { printf (_("call to md_convert_frag \n")); abort (); @@ -1471,8 +1459,8 @@ md_apply_fix (fixP, val) int md_estimate_size_before_relax (fragP, segment_type) - register fragS *fragP; - register segT segment_type; + register fragS *fragP ATTRIBUTE_UNUSED; + register segT segment_type ATTRIBUTE_UNUSED; { printf (_("call tomd_estimate_size_before_relax \n")); abort (); @@ -1491,14 +1479,14 @@ md_number_to_chars (ptr, use, nbytes) long md_pcrel_from (fixP) - fixS *fixP; + fixS *fixP ATTRIBUTE_UNUSED; { abort (); } void tc_coff_symbol_emit_hook (s) - symbolS *s; + symbolS *s ATTRIBUTE_UNUSED; { } diff --git a/contrib/binutils/gas/config/tc-z8k.h b/contrib/binutils/gas/config/tc-z8k.h index 130c01c..d1899e1 100644 --- a/contrib/binutils/gas/config/tc-z8k.h +++ b/contrib/binutils/gas/config/tc-z8k.h @@ -1,5 +1,6 @@ /* This file is tc-z8k.h - Copyright (C) 1987-1992, 93, 95, 97, 98, 2000 + Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1997, 1998, + 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/te-386bsd.h b/contrib/binutils/gas/config/te-386bsd.h index 0f077b5..da2d692 100644 --- a/contrib/binutils/gas/config/te-386bsd.h +++ b/contrib/binutils/gas/config/te-386bsd.h @@ -1,5 +1,6 @@ /* te-386bsd.h -- 386BSD target environment declarations. - Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright 1987, 1990, 1991, 1992, 1993, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/te-freebsd.h b/contrib/binutils/gas/config/te-freebsd.h index 44f4610..6992561 100644 --- a/contrib/binutils/gas/config/te-freebsd.h +++ b/contrib/binutils/gas/config/te-freebsd.h @@ -1,5 +1,5 @@ /* te-freebsd.h -- FreeBSD target environment declarations. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/te-nbsd.h b/contrib/binutils/gas/config/te-nbsd.h index 010a711..cb8dc09 100644 --- a/contrib/binutils/gas/config/te-nbsd.h +++ b/contrib/binutils/gas/config/te-nbsd.h @@ -1,5 +1,6 @@ /* te-nbsd.h -- NetBSD target environment declarations. - Copyright (C) 1987, 90, 91, 92, 94, 95, 1998 Free Software Foundation, Inc. + Copyright 1987, 1990, 1991, 1992, 1994, 1998, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/te-ppcnw.h b/contrib/binutils/gas/config/te-ppcnw.h index d23e38c..fcd3a972 100644 --- a/contrib/binutils/gas/config/te-ppcnw.h +++ b/contrib/binutils/gas/config/te-ppcnw.h @@ -1,5 +1,5 @@ /* te-ppcnw.h -- Power PC running Netware environment declarations. - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright 1994, 1995, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/config/te-sparcaout.h b/contrib/binutils/gas/config/te-sparcaout.h index 6c92f63..edd3766 100644 --- a/contrib/binutils/gas/config/te-sparcaout.h +++ b/contrib/binutils/gas/config/te-sparcaout.h @@ -1,5 +1,5 @@ /* te-sparcaout.h -- embedded sparc-aout target environment declarations. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright 1996, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/configure b/contrib/binutils/gas/configure index dbdad71..b2904b0f 100755 --- a/contrib/binutils/gas/configure +++ b/contrib/binutils/gas/configure @@ -730,50 +730,251 @@ test "$host_alias" != "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:737: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi - echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:736: checking for strerror in -lcposix" >&5 -ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:767: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lcposix $LIBS" -cat > conftest.$ac_ext <&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:818: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 861 "configure" #include "confdefs.h" -/* Override any gcc2 internal prototype to avoid an error. */ -/* 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; } +main(){return(0);} EOF -if { (eval echo configure:755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" +if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:897: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:925: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no fi rm -f conftest* -LIBS="$ac_save_LIBS" fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:957: checking for POSIXized ISC" >&5 +if test -d /etc/conf/kconfig.d && + grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 +then echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lcposix" + ISC=yes # If later tests want to check for ISC. + cat >> confdefs.h <<\EOF +#define _POSIX_SOURCE 1 +EOF + + if test "$GCC" = yes; then + CC="$CC -posix" + else + CC="$CC -Xp" + fi else echo "$ac_t""no" 1>&6 + ISC= fi - - +BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` # 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: @@ -786,7 +987,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:790: checking for a BSD compatible install" >&5 +echo "configure:991: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -839,7 +1040,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:843: checking whether build environment is sane" >&5 +echo "configure:1044: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -896,7 +1097,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:900: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1101: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -925,7 +1126,7 @@ fi PACKAGE=gas -VERSION=2.11 +VERSION=${BFD_VERSION} if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -942,7 +1143,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:946: checking for working aclocal" >&5 +echo "configure:1147: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -955,7 +1156,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:959: checking for working autoconf" >&5 +echo "configure:1160: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -968,7 +1169,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:972: checking for working automake" >&5 +echo "configure:1173: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -981,7 +1182,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:985: checking for working autoheader" >&5 +echo "configure:1186: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -994,7 +1195,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:998: checking for working makeinfo" >&5 +echo "configure:1199: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1077,228 +1278,6 @@ else enable_fast_install=yes fi -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1084: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1114: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1165: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - ;; - esac - fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1197: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext << EOF - -#line 1208 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:1213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1239: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1244: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -else - GCC= -fi - -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1272: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi - # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" @@ -1311,7 +1290,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1315: checking for ld used by GCC" >&5 +echo "configure:1294: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1341,10 +1320,10 @@ echo "configure:1315: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1345: checking for GNU ld" >&5 +echo "configure:1324: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1348: checking for non-GNU ld" >&5 +echo "configure:1327: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1379,7 +1358,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1383: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1362: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1396,7 +1375,7 @@ with_gnu_ld=$ac_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1400: checking for $LD option to reload object files" >&5 +echo "configure:1379: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1408,7 +1387,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1412: checking for BSD-compatible nm" >&5 +echo "configure:1391: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1446,7 +1425,7 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1450: checking whether ln -s works" >&5 +echo "configure:1429: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1467,7 +1446,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1471: checking how to recognise dependant libraries" >&5 +echo "configure:1450: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1610,13 +1589,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1614: checking for object suffix" >&5 +echo "configure:1593: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1636,7 +1615,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1640: checking for executable suffix" >&5 +echo "configure:1619: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1646,7 +1625,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -1679,7 +1658,7 @@ case "$deplibs_check_method" in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1683: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1662: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1741,7 +1720,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1745: checking for file" >&5 +echo "configure:1724: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1812,7 +1791,7 @@ esac # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1816: checking for $ac_word" >&5 +echo "configure:1795: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1844,7 +1823,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1848: checking for $ac_word" >&5 +echo "configure:1827: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1879,7 +1858,7 @@ fi # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1883: checking for $ac_word" >&5 +echo "configure:1862: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1911,7 +1890,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1915: checking for $ac_word" >&5 +echo "configure:1894: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1978,8 +1957,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1982 "configure"' > conftest.$ac_ext - if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1961 "configure"' > conftest.$ac_ext + if { (eval echo configure:1962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -2000,7 +1979,7 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2004: checking whether the C compiler needs -belf" >&5 +echo "configure:1983: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2013,14 +1992,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2332,6 +2311,7 @@ for this_target in $target $canon_targets ; do arm-*-wince) fmt=coff em=wince-pe ;; arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; arm-*-riscix*) fmt=aout em=riscix ;; + arm-*-vxworks) fmt=coff ;; avr-*-*) fmt=elf bfd_gas=yes ;; @@ -2366,6 +2346,8 @@ for this_target in $target $canon_targets ; do h8300-*-rtems*) fmt=coff ;; h8300-*-coff) fmt=coff ;; + h8500-*-rtems*) fmt=coff ;; + h8500-*-coff) fmt=coff ;; i370-*-elf* | i370-*-linux*) fmt=elf ;; i386-ibm-aix*) fmt=coff em=i386aix ;; @@ -2376,7 +2358,7 @@ for this_target in $target $canon_targets ; do i386-*-netbsd0.8) fmt=aout em=386bsd ;; i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; - i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; + i386-*-linux*aout* | i386-*-linux*oldld) fmt=aout em=linux ;; i386-*-linux*coff*) fmt=coff em=linux ;; i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;; x86_64-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;; @@ -2474,16 +2456,23 @@ EOF mips-*-ultrix*) fmt=ecoff endian=little ;; mips-*-osf*) fmt=ecoff endian=little ;; mips-*-ecoff*) fmt=ecoff ;; - mips-*-ecoff*) fmt=ecoff ;; mips-*-pe*) fmt=coff endian=little em=pe ;; mips-*-irix6*) fmt=elf ;; mips-*-irix5*) fmt=elf ;; mips-*-irix*) fmt=ecoff ;; mips-*-lnews*) fmt=ecoff em=lnews ;; mips-*-riscos*) fmt=ecoff ;; - mips-*-sysv4*MP*) fmt=elf em=tmips ;; + mips-*-linux-gnu*) + fmt=elf em=tmips + cat >> confdefs.h <<\EOF +#define MIPS_STABS_ELF 1 +EOF + + ;; + mips-*-sysv4*MP* | mips-*-gnu*) + fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; - mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) + mips-*-elf* | mips-*-rtems* | mips-*-openbsd*) fmt=elf ;; mips-*-vxworks*) fmt=elf cat >> confdefs.h <<\EOF @@ -2583,9 +2572,9 @@ EOF w65-*-*) fmt=coff ;; - *-*-freebsd*) fmt=elf bfd_gas=yes ;; *-*-aout | *-*-scout) fmt=aout ;; + *-*-freebsd*) fmt=elf em=freebsd bfd_gas=yes ;; *-*-nindy*) fmt=bout ;; *-*-bsd*) @@ -2894,9 +2883,9 @@ emulations=$_gas_uniq_newlist for em in . $emulations ; do case $em in .) continue ;; - mipsbelf | mipslelf) + mipsbelf | mipslelf | mipself) fmt=elf file=mipself ;; - mipsbecoff | mipslecoff) + mipsbecoff | mipslecoff | mipsecoff) fmt=ecoff file=mipsecoff ;; *coff) fmt=coff file=$em ;; @@ -3081,7 +3070,7 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3085: checking for $ac_word" >&5 +echo "configure:3074: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3111,7 +3100,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3115: checking for $ac_word" >&5 +echo "configure:3104: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3162,7 +3151,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3166: checking for $ac_word" >&5 +echo "configure:3155: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3194,7 +3183,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:3198: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:3187: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -3205,12 +3194,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 3209 "configure" +#line 3198 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -3236,12 +3225,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:3240: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:3229: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:3245: checking whether we are using GNU C" >&5 +echo "configure:3234: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3250,7 +3239,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -3269,7 +3258,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:3273: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:3262: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3306,7 +3295,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3310: checking for $ac_word" >&5 +echo "configure:3299: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3337,7 +3326,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:3341: checking how to run the C preprocessor" >&5 +echo "configure:3330: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3352,13 +3341,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3369,13 +3358,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3386,13 +3375,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3422,7 +3411,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3426: checking for $ac_word" >&5 +echo "configure:3415: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3455,7 +3444,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex"" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3459: checking for $ac_word" >&5 +echo "configure:3448: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3489,7 +3478,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:3493: checking for yywrap in -l$ac_lib" >&5 +echo "configure:3482: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3497,7 +3486,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3531,7 +3520,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:3535: checking lex output file root" >&5 +echo "configure:3524: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3552,7 +3541,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:3556: checking whether yytext is a pointer" >&5 +echo "configure:3545: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3564,14 +3553,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -3597,7 +3586,7 @@ ALL_LINGUAS= # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3601: checking for $ac_word" >&5 +echo "configure:3590: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3625,12 +3614,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3629: checking for ANSI C header files" >&5 +echo "configure:3618: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3638,7 +3627,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3655,7 +3644,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3673,7 +3662,7 @@ 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 < EOF @@ -3694,7 +3683,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3705,7 +3694,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3729,12 +3718,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3733: checking for working const" >&5 +echo "configure:3722: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3804,21 +3793,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3808: checking for inline" >&5 +echo "configure:3797: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3844,12 +3833,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3848: checking for off_t" >&5 +echo "configure:3837: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3877,12 +3866,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3881: checking for size_t" >&5 +echo "configure:3870: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3912,19 +3901,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3916: checking for working alloca.h" >&5 +echo "configure:3905: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3945,12 +3934,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3949: checking for alloca" >&5 +echo "configure:3938: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -4010,12 +3999,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4014: checking whether alloca needs Cray hooks" >&5 +echo "configure:4003: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4044: checking for $ac_func" >&5 +echo "configure:4033: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4095,7 +4084,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4099: checking stack direction for C alloca" >&5 +echo "configure:4088: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4103,7 +4092,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -4147,17 +4136,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4151: checking for $ac_hdr" >&5 +echo "configure:4140: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4186,12 +4175,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4190: checking for $ac_func" >&5 +echo "configure:4179: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4239,7 +4228,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:4243: checking for working mmap" >&5 +echo "configure:4232: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4247,7 +4236,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -4415,17 +4404,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4419: checking for $ac_hdr" >&5 +echo "configure:4408: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4455,12 +4444,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4459: checking for $ac_func" >&5 +echo "configure:4448: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4512,12 +4501,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4516: checking for $ac_func" >&5 +echo "configure:4505: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4574,19 +4563,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:4578: checking for LC_MESSAGES" >&5 +echo "configure:4567: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -4607,7 +4596,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:4611: checking whether NLS is requested" >&5 +echo "configure:4600: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -4627,7 +4616,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:4631: checking whether included gettext is requested" >&5 +echo "configure:4620: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -4646,17 +4635,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:4650: checking for libintl.h" >&5 +echo "configure:4639: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4673,19 +4662,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:4677: checking for gettext in libc" >&5 +echo "configure:4666: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -4701,7 +4690,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:4705: checking for bindtextdomain in -lintl" >&5 +echo "configure:4694: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4709,7 +4698,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4736,19 +4725,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:4740: checking for gettext in libintl" >&5 +echo "configure:4729: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -4776,7 +4765,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4780: checking for $ac_word" >&5 +echo "configure:4769: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4810,12 +4799,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4814: checking for $ac_func" >&5 +echo "configure:4803: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4865,7 +4854,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4869: checking for $ac_word" >&5 +echo "configure:4858: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4901,7 +4890,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4905: checking for $ac_word" >&5 +echo "configure:4894: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4933,7 +4922,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4973,7 +4962,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4977: checking for $ac_word" >&5 +echo "configure:4966: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5007,7 +4996,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5011: checking for $ac_word" >&5 +echo "configure:5000: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5043,7 +5032,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:5047: checking for $ac_word" >&5 +echo "configure:5036: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5133,7 +5122,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:5137: checking for catalogs to be installed" >&5 +echo "configure:5126: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -5161,17 +5150,17 @@ echo "configure:5137: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:5165: checking for linux/version.h" >&5 +echo "configure:5154: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5234,7 +5223,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:5238: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:5227: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -5259,7 +5248,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:5263: checking for executable suffix" >&5 +echo "configure:5252: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5269,7 +5258,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:5273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -5294,17 +5283,17 @@ for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h e do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5298: checking for $ac_hdr" >&5 +echo "configure:5287: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5334,7 +5323,7 @@ done # Put this here so that autoconf's "cross-compiling" message doesn't confuse # people who are not cross-compiling but are compiling cross-assemblers. echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 -echo "configure:5338: checking whether compiling a cross-assembler" >&5 +echo "configure:5327: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -5349,19 +5338,19 @@ echo "$ac_t""$cross_gas" 1>&6 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:5353: checking for working alloca.h" >&5 +echo "configure:5342: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:5365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -5382,12 +5371,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:5386: checking for alloca" >&5 +echo "configure:5375: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -5447,12 +5436,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:5451: checking whether alloca needs Cray hooks" >&5 +echo "configure:5440: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5481: checking for $ac_func" >&5 +echo "configure:5470: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5532,7 +5521,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:5536: checking stack direction for C alloca" >&5 +echo "configure:5525: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5540,7 +5529,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -5581,21 +5570,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:5585: checking for inline" >&5 +echo "configure:5574: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -5625,12 +5614,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5629: checking for $ac_func" >&5 +echo "configure:5618: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5682,12 +5671,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5686: checking for $ac_func" >&5 +echo "configure:5675: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5745,7 +5734,7 @@ case "$host" in ;; *-ncr-sysv4.3*) echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6 -echo "configure:5749: checking for _mwvalidcheckl in -lmw" >&5 +echo "configure:5738: checking for _mwvalidcheckl in -lmw" >&5 ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5753,7 +5742,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5785,7 +5774,7 @@ else fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5789: checking for main in -lm" >&5 +echo "configure:5778: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5793,14 +5782,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5823,7 +5812,7 @@ fi ;; *) echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:5827: checking for main in -lm" >&5 +echo "configure:5816: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5831,14 +5820,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5869,12 +5858,12 @@ esac # enough, but on some of those systems, the assert macro relies on requoting # working properly! echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 -echo "configure:5873: checking for working assert macro" >&5 +echo "configure:5862: checking for working assert macro" >&5 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5890,7 +5879,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -5931,12 +5920,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:5935: checking whether declaration is required for strstr" >&5 +echo "configure:5924: checking whether declaration is required for strstr" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_strstr=no else @@ -5968,12 +5957,12 @@ fi echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:5972: checking whether declaration is required for malloc" >&5 +echo "configure:5961: checking whether declaration is required for malloc" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_malloc=no else @@ -6005,12 +5994,12 @@ fi echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:6009: checking whether declaration is required for free" >&5 +echo "configure:5998: checking whether declaration is required for free" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_free=no else @@ -6042,12 +6031,12 @@ fi echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:6046: checking whether declaration is required for sbrk" >&5 +echo "configure:6035: checking whether declaration is required for sbrk" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_sbrk=no else @@ -6079,12 +6068,12 @@ fi echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 -echo "configure:6083: checking whether declaration is required for environ" >&5 +echo "configure:6072: checking whether declaration is required for environ" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_environ=no else @@ -6119,12 +6108,12 @@ fi # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:6123: checking whether declaration is required for errno" >&5 +echo "configure:6112: checking whether declaration is required for errno" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_errno=no else @@ -6309,6 +6298,7 @@ s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g +s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g @@ -6320,7 +6310,6 @@ s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g -s%@CC@%$CC%g s%@LN_S@%$LN_S%g s%@OBJEXT@%$OBJEXT%g s%@EXEEXT@%$EXEEXT%g diff --git a/contrib/binutils/gas/configure.in b/contrib/binutils/gas/configure.in index 62c50dd..99a0edf 100644 --- a/contrib/binutils/gas/configure.in +++ b/contrib/binutils/gas/configure.in @@ -11,7 +11,10 @@ AC_INIT(as.h) AC_CANONICAL_SYSTEM AC_ISC_POSIX -AM_INIT_AUTOMAKE(gas, 2.11) +changequote(,)dnl +BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` +changequote([,])dnl +AM_INIT_AUTOMAKE(gas, ${BFD_VERSION}) AM_PROG_LIBTOOL @@ -192,6 +195,7 @@ changequote([,])dnl arm-*-wince) fmt=coff em=wince-pe ;; arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; arm-*-riscix*) fmt=aout em=riscix ;; + arm-*-vxworks) fmt=coff ;; avr-*-*) fmt=elf bfd_gas=yes ;; @@ -226,6 +230,8 @@ changequote([,])dnl h8300-*-rtems*) fmt=coff ;; h8300-*-coff) fmt=coff ;; + h8500-*-rtems*) fmt=coff ;; + h8500-*-coff) fmt=coff ;; i370-*-elf* | i370-*-linux*) fmt=elf ;; i386-ibm-aix*) fmt=coff em=i386aix ;; @@ -236,7 +242,7 @@ changequote([,])dnl i386-*-netbsd0.8) fmt=aout em=386bsd ;; i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; - i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; + i386-*-linux*aout* | i386-*-linux*oldld) fmt=aout em=linux ;; i386-*-linux*coff*) fmt=coff em=linux ;; i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;; x86_64-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;; @@ -331,16 +337,21 @@ changequote([,])dnl mips-*-ultrix*) fmt=ecoff endian=little ;; mips-*-osf*) fmt=ecoff endian=little ;; mips-*-ecoff*) fmt=ecoff ;; - mips-*-ecoff*) fmt=ecoff ;; mips-*-pe*) fmt=coff endian=little em=pe ;; mips-*-irix6*) fmt=elf ;; mips-*-irix5*) fmt=elf ;; mips-*-irix*) fmt=ecoff ;; mips-*-lnews*) fmt=ecoff em=lnews ;; mips-*-riscos*) fmt=ecoff ;; - mips-*-sysv4*MP*) fmt=elf em=tmips ;; + mips-*-linux-gnu*) + fmt=elf em=tmips + AC_DEFINE(MIPS_STABS_ELF, 1, + [Use ELF stabs for MIPS, not ECOFF stabs]) + ;; + mips-*-sysv4*MP* | mips-*-gnu*) + fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; - mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) + mips-*-elf* | mips-*-rtems* | mips-*-openbsd*) fmt=elf ;; mips-*-vxworks*) fmt=elf AC_DEFINE(MIPS_STABS_ELF, 1, @@ -436,9 +447,9 @@ changequote([,])dnl w65-*-*) fmt=coff ;; - *-*-freebsd*) fmt=elf bfd_gas=yes ;; *-*-aout | *-*-scout) fmt=aout ;; + *-*-freebsd*) fmt=elf em=freebsd bfd_gas=yes ;; *-*-nindy*) fmt=bout ;; *-*-bsd*) @@ -718,9 +729,9 @@ GAS_UNIQ(emulations) for em in . $emulations ; do case $em in .) continue ;; - mipsbelf | mipslelf) + mipsbelf | mipslelf | mipself) fmt=elf file=mipself ;; - mipsbecoff | mipslecoff) + mipsbecoff | mipslecoff | mipsecoff) fmt=ecoff file=mipsecoff ;; *coff) fmt=coff file=$em ;; diff --git a/contrib/binutils/gas/debug.c b/contrib/binutils/gas/debug.c index e9f6f09..7d10387 100644 --- a/contrib/binutils/gas/debug.c +++ b/contrib/binutils/gas/debug.c @@ -1,5 +1,6 @@ /* This file is debug.c - Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/depend.c b/contrib/binutils/gas/depend.c index 05a9708..c6538dd 100644 --- a/contrib/binutils/gas/depend.c +++ b/contrib/binutils/gas/depend.c @@ -1,5 +1,5 @@ /* depend.c - Handle dependency tracking. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/doc/Makefile.in b/contrib/binutils/gas/doc/Makefile.in index 5f9b258..1f48577 100644 --- a/contrib/binutils/gas/doc/Makefile.in +++ b/contrib/binutils/gas/doc/Makefile.in @@ -175,7 +175,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/contrib/binutils/gas/doc/all.texi b/contrib/binutils/gas/doc/all.texi index 22742b4..719c80a 100644 --- a/contrib/binutils/gas/doc/all.texi +++ b/contrib/binutils/gas/doc/all.texi @@ -1,4 +1,5 @@ -@c Copyright 1992, 1993, 2000 Free Software Foundation, Inc. +@c Copyright 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001 +@c Free Software Foundation, Inc. @c This file is part of the documentation for the GAS manual @c Configuration settings for all-inclusive version of manual diff --git a/contrib/binutils/gas/doc/as.texinfo b/contrib/binutils/gas/doc/as.texinfo index fb80ca5..01b3c50 100644 --- a/contrib/binutils/gas/doc/as.texinfo +++ b/contrib/binutils/gas/doc/as.texinfo @@ -1,5 +1,6 @@ \input texinfo @c -*-Texinfo-*- -@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 2000, 2001 +@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +@c 2001 @c Free Software Foundation, Inc. @c UPDATE!! On future updates-- @c (1) check for new machine-dep cmdline options in @@ -3136,7 +3137,7 @@ Intermediate precedence @end table @item -Lowest Precedence +Low Precedence @table @code @cindex addition, permitted arguments @@ -3156,6 +3157,41 @@ result has the section of the left argument. If both arguments are in the same section, the result is absolute. You may not subtract arguments from different sections. @c FIXME is there still something useful to say about undefined - undefined ? + +@cindex comparison expressions +@cindex expressions, comparison +@item == +@dfn{Is Equal To} +@item <> +@dfn{Is Not Equal To} +@item < +@dfn{Is Less Than} +@itemx > +@dfn{Is Greater Than} +@itemx >= +@dfn{Is Greater Than Or Equal To} +@itemx <= +@dfn{Is Less Than Or Equal To} + +The comparison operators can be used as infix operators. A true results has a +value of -1 whereas a false result has a value of 0. Note, these operators +perform signed comparisons. +@end table + +@item Lowest Precedence + +@table @code +@item && +@dfn{Logical And}. + +@item || +@dfn{Logical Or}. + +These two logical operations can be used to combine the results of sub +expressions. Note, unlike the comparison operators a true result returns a +value of 1 but a false results does still return 0. Also note that the logical +or operator has a slightly lower precedence than logical and. + @end table @end enumerate diff --git a/contrib/binutils/gas/doc/c-arm.texi b/contrib/binutils/gas/doc/c-arm.texi index d3de43b..2c67222 100644 --- a/contrib/binutils/gas/doc/c-arm.texi +++ b/contrib/binutils/gas/doc/c-arm.texi @@ -1,4 +1,5 @@ -@c Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc. +@c Copyright 1996, 1997, 1998, 1999, 2000, 2001 +@c Free Software Foundation, Inc. @c This is part of the GAS manual. @c For copying conditions, see the file as.texinfo. diff --git a/contrib/binutils/gas/doc/c-i386.texi b/contrib/binutils/gas/doc/c-i386.texi index 110d560..1527c8d 100644 --- a/contrib/binutils/gas/doc/c-i386.texi +++ b/contrib/binutils/gas/doc/c-i386.texi @@ -1,4 +1,5 @@ -@c Copyright (C) 1991, 92, 93, 94, 95, 97, 1998 Free Software Foundation, Inc. +@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001 +@c Free Software Foundation, Inc. @c This is part of the GAS manual. @c For copying conditions, see the file as.texinfo. @ifset GENERIC @@ -26,7 +27,7 @@ extending the Intel architecture to 64-bits. * i386-Regs:: Register Naming * i386-Prefixes:: Instruction Prefixes * i386-Memory:: Memory References -* i386-jumps:: Handling of Jump Instructions +* i386-Jumps:: Handling of Jump Instructions * i386-Float:: Floating Point * i386-SIMD:: Intel's MMX and AMD's 3DNow! SIMD Operations * i386-16bit:: Writing 16-bit Code @@ -488,7 +489,7 @@ the default absolute addressing. Other addressing modes remain unchanged in x86-64 architecture, except registers used are 64-bit instead of 32-bit. -@node i386-jumps +@node i386-Jumps @section Handling of Jump Instructions @cindex jump optimization, i386 @@ -498,11 +499,11 @@ registers used are 64-bit instead of 32-bit. Jump instructions are always optimized to use the smallest possible displacements. This is accomplished by using byte (8-bit) displacement jumps whenever the target is sufficiently close. If a byte displacement -is insufficient a long (32-bit) displacement is used. We do not support +is insufficient a long displacement is used. We do not support word (16-bit) displacement jumps in 32-bit mode (i.e. prefixing the jump instruction with the @samp{data16} instruction prefix), since the 80386 insists upon masking @samp{%eip} to 16 bits after the word displacement -is added. +is added. (See also @pxref{i386-Arch}) Note that the @samp{jcxz}, @samp{jecxz}, @samp{loop}, @samp{loopz}, @samp{loope}, @samp{loopnz} and @samp{loopne} instructions only come in byte @@ -696,13 +697,33 @@ supported on the CPU specified. The choices for @var{cpu_type} are: @item @samp{sledgehammer} @end multitable -Apart from the warning, there is only one other effect on -@code{@value{AS}} operation; If you specify a CPU other than +Apart from the warning, there are only two other effects on +@code{@value{AS}} operation; Firstly, if you specify a CPU other than @samp{i486}, then shift by one instructions such as @samp{sarl $1, %eax} will automatically use a two byte opcode sequence. The larger three byte opcode sequence is used on the 486 (and when no architecture is specified) because it executes faster on the 486. Note that you can explicitly request the two byte opcode by writing @samp{sarl %eax}. +Secondly, if you specify @samp{i8086}, @samp{i186}, or @samp{i286}, +@emph{and} @samp{.code16} or @samp{.code16gcc} then byte offset +conditional jumps will be promoted when necessary to a two instruction +sequence consisting of a conditional jump of the opposite sense around +an unconditional jump to the target. + +Following the CPU architecture, you may specify @samp{jumps} or +@samp{nojumps} to control automatic promotion of conditional jumps. +@samp{jumps} is the default, and enables jump promotion; All external +jumps will be of the long variety, and file-local jumps will be promoted +as necessary. (@pxref{i386-Jumps}) @samp{nojumps} leaves external +conditional jumps as byte offset jumps, and warns about file-local +conditional jumps that @code{@value{AS}} promotes. +Unconditional jumps are treated as for @samp{jumps}. + +For example + +@smallexample + .arch i8086,nojumps +@end smallexample @node i386-Notes @section Notes diff --git a/contrib/binutils/gas/doc/c-sparc.texi b/contrib/binutils/gas/doc/c-sparc.texi index ab54eb2..624c21e3 100644 --- a/contrib/binutils/gas/doc/c-sparc.texi +++ b/contrib/binutils/gas/doc/c-sparc.texi @@ -1,4 +1,5 @@ -@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +@c Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999 +@c Free Software Foundation, Inc. @c This is part of the GAS manual. @c For copying conditions, see the file as.texinfo. @ifset GENERIC diff --git a/contrib/binutils/gas/doc/c-v850.texi b/contrib/binutils/gas/doc/c-v850.texi index 5416e0f..4b36461 100644 --- a/contrib/binutils/gas/doc/c-v850.texi +++ b/contrib/binutils/gas/doc/c-v850.texi @@ -1,4 +1,4 @@ -@c Copyright (C) 1997, 1998 Free Software Foundation, Inc. +@c Copyright 1997 Free Software Foundation, Inc. @c This is part of the GAS manual. @c For copying conditions, see the file as.texinfo. diff --git a/contrib/binutils/gas/doc/c-z8k.texi b/contrib/binutils/gas/doc/c-z8k.texi index 1fb10e3..d98adea 100644 --- a/contrib/binutils/gas/doc/c-z8k.texi +++ b/contrib/binutils/gas/doc/c-z8k.texi @@ -1,4 +1,4 @@ -@c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +@c Copyright 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. @c This is part of the GAS manual. @c For copying conditions, see the file as.texinfo. @ifset GENERIC diff --git a/contrib/binutils/gas/doc/gasp.texi b/contrib/binutils/gas/doc/gasp.texi index e023edc..e5bda63 100644 --- a/contrib/binutils/gas/doc/gasp.texi +++ b/contrib/binutils/gas/doc/gasp.texi @@ -3,7 +3,7 @@ @c @c This file documents the assembly preprocessor "GASP" @c -@c Copyright (c) 1994, 2000 Free Software Foundation, Inc. +@c Copyright 1994, 1995, 2000 Free Software Foundation, Inc. @c @c Permission is granted to copy, distribute and/or modify this document @c under the terms of the GNU Free Documentation License, Version 1.1 diff --git a/contrib/binutils/gas/doc/internals.texi b/contrib/binutils/gas/doc/internals.texi index a42bc0f..eebb9bb 100644 --- a/contrib/binutils/gas/doc/internals.texi +++ b/contrib/binutils/gas/doc/internals.texi @@ -1,4 +1,7 @@ \input texinfo +@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +@c 2001 +@c Free Software Foundation, Inc. @setfilename internals.info @node Top @top Assembler Internals @@ -1166,9 +1169,10 @@ relocations. @item md_relax_frag @cindex md_relax_frag -This macro may be defined to relax a frag. GAS will call this with the frag -and the change in size of all previous frags; @code{md_relax_frag} should -return the change in size of the frag. @xref{Relaxation}. +This macro may be defined to relax a frag. GAS will call this with the +segment, the frag, and the change in size of all previous frags; +@code{md_relax_frag} should return the change in size of the frag. +@xref{Relaxation}. @item TC_GENERIC_RELAX_TABLE @cindex TC_GENERIC_RELAX_TABLE diff --git a/contrib/binutils/gas/dwarf2dbg.c b/contrib/binutils/gas/dwarf2dbg.c index e44574d..ea76069 100644 --- a/contrib/binutils/gas/dwarf2dbg.c +++ b/contrib/binutils/gas/dwarf2dbg.c @@ -1,5 +1,5 @@ /* dwarf2dbg.c - DWARF2 debug support - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001 Free Software Foundation, Inc. Contributed by David Mosberger-Tang This file is part of GAS, the GNU Assembler. @@ -324,7 +324,7 @@ dwarf2_directive_file (dummy) int dummy ATTRIBUTE_UNUSED; { offsetT num; - const char *filename; + char *filename; int filename_len; /* Continue to accept a bare string and pass it off. */ @@ -347,7 +347,7 @@ dwarf2_directive_file (dummy) if (num < files_in_use && files[num].filename != 0) { - as_bad (_("File number %d already allocated"), num); + as_bad (_("File number %ld already allocated"), (long) num); return; } @@ -873,7 +873,11 @@ process_entries (seg, e) changed = 1; } - if (line != e->loc.line || changed) + /* Don't try to optimize away redundant entries; gdb wants two + entries for a function where the code starts on the same line as + the {, and there's no way to identify that case here. Trust gcc + to optimize appropriately. */ + if (1 /* line != e->loc.line || changed */) { int line_delta = e->loc.line - line; if (frag == NULL) @@ -1296,7 +1300,7 @@ void dwarf2_directive_file (dummy) int dummy ATTRIBUTE_UNUSED; { - as_fatal (_("dwarf2 is not supported for this object file format")); + s_app_file (0); } void diff --git a/contrib/binutils/gas/dwarf2dbg.h b/contrib/binutils/gas/dwarf2dbg.h index cdb76ab..8087b29 100644 --- a/contrib/binutils/gas/dwarf2dbg.h +++ b/contrib/binutils/gas/dwarf2dbg.h @@ -1,5 +1,5 @@ /* dwarf2dbg.h - DWARF2 debug support - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/ecoff.c b/contrib/binutils/gas/ecoff.c index f04e530..57ddddc 100644 --- a/contrib/binutils/gas/ecoff.c +++ b/contrib/binutils/gas/ecoff.c @@ -1,5 +1,6 @@ /* ECOFF debugging support. - Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. Contributed by Cygnus Support. This file was put together by Ian Lance Taylor . A good deal of it comes directly from mips-tfile.c, by Michael @@ -2189,7 +2190,7 @@ ecoff_get_cur_proc_sym () static void add_file (file_name, indx, fake) const char *file_name; /* file name */ - int indx; + int indx ATTRIBUTE_UNUSED; int fake; { register int first_ch; @@ -2425,7 +2426,7 @@ st_to_string (symbol_type) void ecoff_directive_begin (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char name_end; @@ -2463,7 +2464,7 @@ ecoff_directive_begin (ignore) void ecoff_directive_bend (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char name_end; @@ -2522,7 +2523,7 @@ static int coff_inside_enumeration; void ecoff_directive_def (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char name_end; @@ -2568,7 +2569,7 @@ ecoff_directive_def (ignore) void ecoff_directive_dim (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { int dimens[N_TQ]; int i; @@ -2618,7 +2619,7 @@ ecoff_directive_dim (ignore) void ecoff_directive_scl (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { long val; @@ -2643,7 +2644,7 @@ ecoff_directive_scl (ignore) void ecoff_directive_size (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { int sizes[N_TQ]; int i; @@ -2693,7 +2694,7 @@ ecoff_directive_size (ignore) void ecoff_directive_type (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { long val; tq_t *tq_ptr; @@ -2762,7 +2763,7 @@ ecoff_directive_type (ignore) void ecoff_directive_tag (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char name_end; @@ -2790,7 +2791,7 @@ ecoff_directive_tag (ignore) void ecoff_directive_val (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { expressionS exp; @@ -2825,7 +2826,7 @@ ecoff_directive_val (ignore) void ecoff_directive_endef (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; symint_t indx; @@ -3005,7 +3006,7 @@ ecoff_directive_endef (ignore) void ecoff_directive_end (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char name_end; @@ -3062,7 +3063,7 @@ ecoff_directive_end (ignore) void ecoff_directive_ent (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char name_end; @@ -3115,7 +3116,7 @@ ecoff_directive_ent (ignore) void ecoff_directive_extern (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int c; @@ -3140,7 +3141,7 @@ ecoff_directive_extern (ignore) void ecoff_directive_file (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { int indx; char *name; @@ -3167,7 +3168,7 @@ ecoff_directive_file (ignore) void ecoff_directive_fmask (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { long val; @@ -3196,7 +3197,7 @@ ecoff_directive_fmask (ignore) void ecoff_directive_frame (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { long val; @@ -3237,7 +3238,7 @@ ecoff_directive_frame (ignore) void ecoff_directive_mask (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { long val; @@ -3266,7 +3267,7 @@ ecoff_directive_mask (ignore) void ecoff_directive_loc (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { lineno_list_t *list; symint_t lineno; @@ -3363,7 +3364,7 @@ ecoff_fix_loc (old_frag, old_frag_offset) static void mark_stabs (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (! stabs_seen) { @@ -3460,7 +3461,7 @@ ecoff_directive_weakext (ignore) void ecoff_stab (sec, what, string, type, other, desc) - segT sec; + segT sec ATTRIBUTE_UNUSED; int what; const char *string; int type; @@ -3619,7 +3620,7 @@ ecoff_frob_symbol (sym) { if (S_IS_COMMON (sym) && S_GET_VALUE (sym) > 0 - && S_GET_VALUE (sym) <= bfd_get_gp_size (stdoutput)) + && S_GET_VALUE (sym) <= (unsigned) bfd_get_gp_size (stdoutput)) { static asection scom_section; static asymbol scom_symbol; @@ -3690,7 +3691,7 @@ ecoff_padding_adjust (backend, buf, bufend, offset, bufptrptr) unsigned long add; add = align - (offset & (align - 1)); - if (*bufend - (*buf + offset) < add) + if ((unsigned long) (*bufend - (*buf + offset)) < add) (void) ecoff_add_bytes (buf, bufend, *buf + offset, add); memset (*buf + offset, 0, add); offset += add; @@ -4084,7 +4085,7 @@ ecoff_build_symbols (backend, buf, bufend, offset) s = symbol_get_obj (as_sym)->ecoff_extern_size; if (s == 0 - || s > bfd_get_gp_size (stdoutput)) + || s > (unsigned) bfd_get_gp_size (stdoutput)) sc = sc_Undefined; else { @@ -4099,7 +4100,7 @@ ecoff_build_symbols (backend, buf, bufend, offset) { if (S_GET_VALUE (as_sym) > 0 && (S_GET_VALUE (as_sym) - <= bfd_get_gp_size (stdoutput))) + <= (unsigned) bfd_get_gp_size (stdoutput))) sc = sc_SCommon; else sc = sc_Common; @@ -4254,7 +4255,7 @@ ecoff_build_symbols (backend, buf, bufend, offset) if (local) { - if (*bufend - sym_out < external_sym_size) + if ((bfd_size_type)(*bufend - sym_out) < external_sym_size) sym_out = ecoff_add_bytes (buf, bufend, sym_out, external_sym_size); @@ -4372,7 +4373,7 @@ ecoff_build_procs (backend, buf, bufend, offset) first = 0; } proc_ptr->pdr.adr = adr - fil_ptr->fdr.adr; - if (*bufend - pdr_out < external_pdr_size) + if ((bfd_size_type)(*bufend - pdr_out) < external_pdr_size) pdr_out = ecoff_add_bytes (buf, bufend, pdr_out, external_pdr_size); @@ -4445,7 +4446,8 @@ ecoff_build_aux (backend, buf, bufend, offset) aux_end = aux_ptr + aux_cnt; for (; aux_ptr < aux_end; aux_ptr++) { - if (*bufend - (char *) aux_out < sizeof (union aux_ext)) + if ((unsigned long) (*bufend - (char *) aux_out) + < sizeof (union aux_ext)) aux_out = ((union aux_ext *) ecoff_add_bytes (buf, bufend, (char *) aux_out, @@ -4530,7 +4532,7 @@ ecoff_build_strings (buf, bufend, offset, vp) else str_cnt = vp->objects_per_page; - if (*bufend - str_out < str_cnt) + if ((unsigned long)(*bufend - str_out) < str_cnt) str_out = ecoff_add_bytes (buf, bufend, str_out, str_cnt); memcpy (str_out, str_link->datum->byte, str_cnt); @@ -4621,7 +4623,7 @@ ecoff_build_fdr (backend, buf, bufend, offset) fil_end = fil_ptr + fil_cnt; for (; fil_ptr < fil_end; fil_ptr++) { - if (*bufend - fdr_out < external_fdr_size) + if ((bfd_size_type)(*bufend - fdr_out) < external_fdr_size) fdr_out = ecoff_add_bytes (buf, bufend, fdr_out, external_fdr_size); (*swap_fdr_out) (stdoutput, &fil_ptr->fdr, fdr_out); @@ -4771,7 +4773,7 @@ ecoff_build_debug (hdr, bufp, backend) space at this point. */ hdr->ipdMax = proc_cnt; hdr->cbPdOffset = offset; - if (bufend - (buf + offset) < proc_cnt * external_pdr_size) + if ((bfd_size_type)(bufend - (buf + offset)) < proc_cnt * external_pdr_size) (void) ecoff_add_bytes (&buf, &bufend, buf + offset, proc_cnt * external_pdr_size); offset += proc_cnt * external_pdr_size; diff --git a/contrib/binutils/gas/ecoff.h b/contrib/binutils/gas/ecoff.h index 8ac65f8..f6b96c6 100644 --- a/contrib/binutils/gas/ecoff.h +++ b/contrib/binutils/gas/ecoff.h @@ -1,5 +1,6 @@ /* ecoff.h -- header file for ECOFF debugging support - Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1997, 1998 + Free Software Foundation, Inc. Contributed by Cygnus Support. Put together by Ian Lance Taylor . diff --git a/contrib/binutils/gas/ehopt.c b/contrib/binutils/gas/ehopt.c index 4131436..64ea7e0 100644 --- a/contrib/binutils/gas/ehopt.c +++ b/contrib/binutils/gas/ehopt.c @@ -1,5 +1,5 @@ /* ehopt.c--optimize gcc exception frame information. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright 1998, 2000, 2001 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GAS, the GNU Assembler. @@ -88,30 +88,27 @@ __FRAME_BEGIN__: not know this value, it always uses four bytes. We will know the value at the end of assembly, so we can do better. */ -static int eh_frame_code_alignment PARAMS ((int)); +struct cie_info +{ + unsigned code_alignment; + int z_augmentation; +}; + +static int get_cie_info PARAMS ((struct cie_info *)); -/* Get the code alignment factor from the CIE. */ +/* Extract information from the CIE. */ static int -eh_frame_code_alignment (in_seg) - int in_seg; +get_cie_info (info) + struct cie_info *info; { - /* ??? Assume .eh_frame and .debug_frame have the same alignment. */ - static int code_alignment; - fragS *f; fixS *fix; int offset; char CIE_id; char augmentation[10]; int iaug; - - if (code_alignment != 0) - return code_alignment; - - /* Can't find the alignment if we've changed sections. */ - if (! in_seg) - return -1; + int code_alignment = 0; /* We should find the CIE at the start of the section. */ @@ -147,10 +144,7 @@ eh_frame_code_alignment (in_seg) || f->fr_literal[offset + 1] != CIE_id || f->fr_literal[offset + 2] != CIE_id || f->fr_literal[offset + 3] != CIE_id) - { - code_alignment = -1; - return -1; - } + return 0; /* Next make sure the CIE version number is 1. */ @@ -163,10 +157,7 @@ eh_frame_code_alignment (in_seg) if (f == NULL || f->fr_fix - offset < 1 || f->fr_literal[offset] != 1) - { - code_alignment = -1; - return -1; - } + return 0; /* Skip the augmentation (a null terminated string). */ @@ -180,10 +171,8 @@ eh_frame_code_alignment (in_seg) f = f->fr_next; } if (f == NULL) - { - code_alignment = -1; - return -1; - } + return 0; + while (offset < f->fr_fix && f->fr_literal[offset] != '\0') { if ((size_t) iaug < (sizeof augmentation) - 1) @@ -203,10 +192,7 @@ eh_frame_code_alignment (in_seg) f = f->fr_next; } if (f == NULL) - { - code_alignment = -1; - return -1; - } + return 0; augmentation[iaug] = '\0'; if (augmentation[0] == '\0') @@ -230,28 +216,22 @@ eh_frame_code_alignment (in_seg) f = f->fr_next; } if (f == NULL) - { - code_alignment = -1; - return -1; - } - } - else - { - code_alignment = -1; - return -1; + return 0; } + else if (augmentation[0] != 'z') + return 0; /* We're now at the code alignment factor, which is a ULEB128. If it isn't a single byte, forget it. */ code_alignment = f->fr_literal[offset] & 0xff; - if ((code_alignment & 0x80) != 0 || code_alignment == 0) - { - code_alignment = -1; - return -1; - } + if ((code_alignment & 0x80) != 0) + code_alignment = 0; - return code_alignment; + info->code_alignment = code_alignment; + info->z_augmentation = (augmentation[0] == 'z'); + + return 1; } /* This function is called from emit_expr. It looks for cases which @@ -274,11 +254,28 @@ check_eh_frame (exp, pnbytes) { struct frame_data { + enum frame_state + { + state_idle, + state_saw_size, + state_saw_cie_offset, + state_saw_pc_begin, + state_seeing_aug_size, + state_skipping_aug, + state_wait_loc4, + state_saw_loc4, + state_error, + } state; + + int cie_info_ok; + struct cie_info cie_info; + symbolS *size_end_sym; fragS *loc4_frag; - int saw_size; - int saw_advance_loc4; int loc4_fix; + + int aug_size; + int aug_shift; }; static struct frame_data eh_frame_data; @@ -297,123 +294,177 @@ check_eh_frame (exp, pnbytes) else return 0; - if (d->saw_size && S_IS_DEFINED (d->size_end_sym)) + if (d->state >= state_saw_size && S_IS_DEFINED (d->size_end_sym)) { /* We have come to the end of the CIE or FDE. See below where we set saw_size. We must check this first because we may now be looking at the next size. */ - d->saw_size = 0; - d->saw_advance_loc4 = 0; + d->state = state_idle; } - if (! d->saw_size - && *pnbytes == 4) + switch (d->state) { - /* This might be the size of the CIE or FDE. We want to know - the size so that we don't accidentally optimize across an FDE - boundary. We recognize the size in one of two forms: a - symbol which will later be defined as a difference, or a - subtraction of two symbols. Either way, we can tell when we - are at the end of the FDE because the symbol becomes defined - (in the case of a subtraction, the end symbol, from which the - start symbol is being subtracted). Other ways of describing - the size will not be optimized. */ - if ((exp->X_op == O_symbol || exp->X_op == O_subtract) - && ! S_IS_DEFINED (exp->X_add_symbol)) + case state_idle: + if (*pnbytes == 4) { - d->saw_size = 1; - d->size_end_sym = exp->X_add_symbol; + /* This might be the size of the CIE or FDE. We want to know + the size so that we don't accidentally optimize across an FDE + boundary. We recognize the size in one of two forms: a + symbol which will later be defined as a difference, or a + subtraction of two symbols. Either way, we can tell when we + are at the end of the FDE because the symbol becomes defined + (in the case of a subtraction, the end symbol, from which the + start symbol is being subtracted). Other ways of describing + the size will not be optimized. */ + if ((exp->X_op == O_symbol || exp->X_op == O_subtract) + && ! S_IS_DEFINED (exp->X_add_symbol)) + { + d->state = state_saw_size; + d->size_end_sym = exp->X_add_symbol; + } } - } - else if (d->saw_size - && *pnbytes == 1 - && exp->X_op == O_constant - && exp->X_add_number == DW_CFA_advance_loc4) - { - /* This might be a DW_CFA_advance_loc4. Record the frag and the - position within the frag, so that we can change it later. */ - d->saw_advance_loc4 = 1; - frag_grow (1); - d->loc4_frag = frag_now; - d->loc4_fix = frag_now_fix (); - } - else if (d->saw_advance_loc4 - && *pnbytes == 4 - && exp->X_op == O_constant) - { - int ca; - - /* This is a case which we can optimize. The two symbols being - subtracted were in the same frag and the expression was - reduced to a constant. We can do the optimization entirely - in this function. */ - - d->saw_advance_loc4 = 0; - - ca = eh_frame_code_alignment (1); - if (ca < 0) + break; + + case state_saw_size: + case state_saw_cie_offset: + /* Assume whatever form it appears in, it appears atomically. */ + d->state += 1; + break; + + case state_saw_pc_begin: + /* Decide whether we should see an augmentation. */ + if (! d->cie_info_ok + && ! (d->cie_info_ok = get_cie_info (&d->cie_info))) + d->state = state_error; + else if (d->cie_info.z_augmentation) { - /* Don't optimize. */ + d->state = state_seeing_aug_size; + d->aug_size = 0; + d->aug_shift = 0; } - else if (exp->X_add_number % ca == 0 - && exp->X_add_number / ca < 0x40) + else + d->state = state_wait_loc4; + break; + + case state_seeing_aug_size: + /* Bytes == -1 means this comes from an leb128 directive. */ + if ((int)*pnbytes == -1 && exp->X_op == O_constant) { - d->loc4_frag->fr_literal[d->loc4_fix] - = DW_CFA_advance_loc | (exp->X_add_number / ca); - /* No more bytes needed. */ - return 1; + d->aug_size = exp->X_add_number; + d->state = state_skipping_aug; } - else if (exp->X_add_number < 0x100) + else if (*pnbytes == 1 && exp->X_op == O_constant) { - d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc1; - *pnbytes = 1; + unsigned char byte = exp->X_add_number; + d->aug_size |= (byte & 0x7f) << d->aug_shift; + d->aug_shift += 7; + if ((byte & 0x80) == 0) + d->state = state_skipping_aug; } - else if (exp->X_add_number < 0x10000) + else + d->state = state_error; + break; + + case state_skipping_aug: + if ((int)*pnbytes < 0) + d->state = state_error; + else { - d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc2; - *pnbytes = 2; + int left = (d->aug_size -= *pnbytes); + if (left == 0) + d->state = state_wait_loc4; + else if (left < 0) + d->state = state_error; } - } - else if (d->saw_advance_loc4 - && *pnbytes == 4 - && exp->X_op == O_subtract) - { - /* This is a case we can optimize. The expression was not - reduced, so we can not finish the optimization until the end - of the assembly. We set up a variant frag which we handle - later. */ + break; - d->saw_advance_loc4 = 0; + case state_wait_loc4: + if (*pnbytes == 1 + && exp->X_op == O_constant + && exp->X_add_number == DW_CFA_advance_loc4) + { + /* This might be a DW_CFA_advance_loc4. Record the frag and the + position within the frag, so that we can change it later. */ + frag_grow (1); + d->state = state_saw_loc4; + d->loc4_frag = frag_now; + d->loc4_fix = frag_now_fix (); + } + break; - frag_var (rs_cfa, 4, 0, 0, make_expr_symbol (exp), - d->loc4_fix, (char *) d->loc4_frag); + case state_saw_loc4: + d->state = state_wait_loc4; + if (*pnbytes != 4) + break; + if (exp->X_op == O_constant) + { + /* This is a case which we can optimize. The two symbols being + subtracted were in the same frag and the expression was + reduced to a constant. We can do the optimization entirely + in this function. */ + if (d->cie_info.code_alignment > 0 + && exp->X_add_number % d->cie_info.code_alignment == 0 + && exp->X_add_number / d->cie_info.code_alignment < 0x40) + { + d->loc4_frag->fr_literal[d->loc4_fix] + = DW_CFA_advance_loc + | (exp->X_add_number / d->cie_info.code_alignment); + /* No more bytes needed. */ + return 1; + } + else if (exp->X_add_number < 0x100) + { + d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc1; + *pnbytes = 1; + } + else if (exp->X_add_number < 0x10000) + { + d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc2; + *pnbytes = 2; + } + } + else if (exp->X_op == O_subtract) + { + /* This is a case we can optimize. The expression was not + reduced, so we can not finish the optimization until the end + of the assembly. We set up a variant frag which we handle + later. */ + int fr_subtype; + + if (d->cie_info.code_alignment > 0) + fr_subtype = d->cie_info.code_alignment << 3; + else + fr_subtype = 0; + + frag_var (rs_cfa, 4, 0, fr_subtype, make_expr_symbol (exp), + d->loc4_fix, (char *) d->loc4_frag); + return 1; + } + break; - return 1; + case state_error: + /* Just skipping everything. */ + break; } - else - d->saw_advance_loc4 = 0; return 0; } /* The function estimates the size of a rs_cfa variant frag based on the current values of the symbols. It is called before the - relaxation loop. We set fr_subtype to the expected length. */ + relaxation loop. We set fr_subtype{0:2} to the expected length. */ int eh_frame_estimate_size_before_relax (frag) fragS *frag; { - int ca; offsetT diff; + int ca = frag->fr_subtype >> 3; int ret; - ca = eh_frame_code_alignment (0); diff = resolve_symbol_value (frag->fr_symbol, 0); - if (ca < 0) - ret = 4; - else if (diff % ca == 0 && diff / ca < 0x40) + if (ca > 0 && diff % ca == 0 && diff / ca < 0x40) ret = 0; else if (diff < 0x100) ret = 1; @@ -422,14 +473,14 @@ eh_frame_estimate_size_before_relax (frag) else ret = 4; - frag->fr_subtype = ret; + frag->fr_subtype = (frag->fr_subtype & ~7) | ret; return ret; } /* This function relaxes a rs_cfa variant frag based on the current - values of the symbols. fr_subtype is the current length of the - frag. This returns the change in frag length. */ + values of the symbols. fr_subtype{0:2} is the current length of + the frag. This returns the change in frag length. */ int eh_frame_relax_frag (frag) @@ -437,14 +488,14 @@ eh_frame_relax_frag (frag) { int oldsize, newsize; - oldsize = frag->fr_subtype; + oldsize = frag->fr_subtype & 7; newsize = eh_frame_estimate_size_before_relax (frag); return newsize - oldsize; } /* This function converts a rs_cfa variant frag into a normal fill frag. This is called after all relaxation has been done. - fr_subtype will be the desired length of the frag. */ + fr_subtype{0:2} will be the desired length of the frag. */ void eh_frame_convert_frag (frag) @@ -459,30 +510,35 @@ eh_frame_convert_frag (frag) diff = resolve_symbol_value (frag->fr_symbol, 1); - if (frag->fr_subtype == 0) - { - int ca; - - ca = eh_frame_code_alignment (0); - assert (ca > 0 && diff % ca == 0 && diff / ca < 0x40); - loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | (diff / ca); - } - else if (frag->fr_subtype == 1) + switch (frag->fr_subtype & 7) { + case 0: + { + int ca = frag->fr_subtype >> 3; + assert (ca > 0 && diff % ca == 0 && diff / ca < 0x40); + loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | (diff / ca); + } + break; + + case 1: assert (diff < 0x100); loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc1; frag->fr_literal[frag->fr_fix] = diff; - } - else if (frag->fr_subtype == 2) - { + break; + + case 2: assert (diff < 0x10000); loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc2; md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 2); + break; + + default: + md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 4); + break; } - else - md_number_to_chars (frag->fr_literal + frag->fr_fix, diff, 4); - frag->fr_fix += frag->fr_subtype; + frag->fr_fix += frag->fr_subtype & 7; frag->fr_type = rs_fill; + frag->fr_subtype = 0; frag->fr_offset = 0; } diff --git a/contrib/binutils/gas/emul-target.h b/contrib/binutils/gas/emul-target.h index 3704050..8f18684 100644 --- a/contrib/binutils/gas/emul-target.h +++ b/contrib/binutils/gas/emul-target.h @@ -1,3 +1,23 @@ +/* emul-target.h. Default values for struct emulation defined in emul.h + Copyright 2001 Free Software Foundation, Inc. + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GAS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + #ifndef emul_init #define emul_init common_emul_init #endif diff --git a/contrib/binutils/gas/emul.h b/contrib/binutils/gas/emul.h index 97c46d8..465f844 100644 --- a/contrib/binutils/gas/emul.h +++ b/contrib/binutils/gas/emul.h @@ -1,3 +1,23 @@ +/* emul.h. File format emulation routines + Copyright 2001 Free Software Foundation, Inc. + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GAS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + #ifndef EMUL_DEFS #define EMUL_DEFS diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c index 2df2f63..3b49ac7 100644 --- a/contrib/binutils/gas/expr.c +++ b/contrib/binutils/gas/expr.c @@ -1,5 +1,6 @@ /* expr.c -operands, expressions- - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/expr.h b/contrib/binutils/gas/expr.h index d63ab7f..9483caf 100644 --- a/contrib/binutils/gas/expr.h +++ b/contrib/binutils/gas/expr.h @@ -1,5 +1,6 @@ /* expr.h -> header file for expr.c - Copyright (C) 1987, 92-99, 2000 Free Software Foundation, Inc. + Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/flonum-copy.c b/contrib/binutils/gas/flonum-copy.c index 79a34c0..1e6b40b 100644 --- a/contrib/binutils/gas/flonum-copy.c +++ b/contrib/binutils/gas/flonum-copy.c @@ -1,5 +1,6 @@ /* flonum_copy.c - copy a flonum - Copyright (C) 1987, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. + Copyright 1987, 1990, 1991, 1992, 1993, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/flonum-konst.c b/contrib/binutils/gas/flonum-konst.c index 599ce5e..04fa1f4 100644 --- a/contrib/binutils/gas/flonum-konst.c +++ b/contrib/binutils/gas/flonum-konst.c @@ -1,5 +1,5 @@ /* flonum_const.c - Useful Flonum constants - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/flonum-mult.c b/contrib/binutils/gas/flonum-mult.c index 9733724..e2bcffa 100644 --- a/contrib/binutils/gas/flonum-mult.c +++ b/contrib/binutils/gas/flonum-mult.c @@ -1,5 +1,5 @@ /* flonum_mult.c - multiply two flonums - Copyright (C) 1987, 1990, 1991, 1992, 2000 + Copyright 1987, 1990, 1991, 1992, 1995, 2000 Free Software Foundation, Inc. This file is part of Gas, the GNU Assembler. diff --git a/contrib/binutils/gas/flonum.h b/contrib/binutils/gas/flonum.h index d1a5042..e50d9bf 100644 --- a/contrib/binutils/gas/flonum.h +++ b/contrib/binutils/gas/flonum.h @@ -1,5 +1,5 @@ /* flonum.h - Floating point package - Copyright (C) 1987, 90, 91, 92, 94, 95, 96, 2000 + Copyright 1987, 1990, 1991, 1992, 1994, 1996, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/frags.c b/contrib/binutils/gas/frags.c index f2f8cfe..4dc2a7d 100644 --- a/contrib/binutils/gas/frags.c +++ b/contrib/binutils/gas/frags.c @@ -1,5 +1,6 @@ /* frags.c - manage frags - - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/frags.h b/contrib/binutils/gas/frags.h index c1c652b..e4cb050 100644 --- a/contrib/binutils/gas/frags.h +++ b/contrib/binutils/gas/frags.h @@ -1,5 +1,5 @@ /* frags.h - Header file for the frag concept. - Copyright (C) 1987, 92, 93, 94, 95, 97, 98, 99, 2000 + Copyright 1987, 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -62,6 +62,10 @@ struct frag { struct list_info_struct *line; #endif + /* Flipped each relax pass so we can easily determine whether + fr_address has been adjusted. */ + unsigned int relax_marker:1; + /* What state is my tail in? */ relax_stateT fr_type; relax_substateT fr_subtype; diff --git a/contrib/binutils/gas/gasp.c b/contrib/binutils/gas/gasp.c index b38bbf8..ad33a46 100644 --- a/contrib/binutils/gas/gasp.c +++ b/contrib/binutils/gas/gasp.c @@ -1,5 +1,5 @@ /* gasp.c - Gnu assembler preprocessor main program. - Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, diff --git a/contrib/binutils/gas/hash.c b/contrib/binutils/gas/hash.c index f2e98a6..ab28396 100644 --- a/contrib/binutils/gas/hash.c +++ b/contrib/binutils/gas/hash.c @@ -1,5 +1,6 @@ /* hash.c -- gas hash table code - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 99, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, + 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/hash.h b/contrib/binutils/gas/hash.h index df59d9f..ecab0fa 100644 --- a/contrib/binutils/gas/hash.h +++ b/contrib/binutils/gas/hash.h @@ -1,5 +1,5 @@ /* hash.h -- header file for gas hash table routines - Copyright (C) 1987, 92, 93, 95, 1999 Free Software Foundation, Inc. + Copyright 1987, 1992, 1993, 1995, 1999 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/input-file.c b/contrib/binutils/gas/input-file.c index b390a8f..f001e52 100644 --- a/contrib/binutils/gas/input-file.c +++ b/contrib/binutils/gas/input-file.c @@ -1,5 +1,5 @@ /* input_file.c - Deal with Input Files - - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 98, 99, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/input-file.h b/contrib/binutils/gas/input-file.h index 14cb5e3..9934869 100644 --- a/contrib/binutils/gas/input-file.h +++ b/contrib/binutils/gas/input-file.h @@ -1,5 +1,5 @@ /* input_file.h header for input-file.c - Copyright (C) 1987, 1992 Free Software Foundation, Inc. + Copyright 1987, 1992, 1993, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/input-scrub.c b/contrib/binutils/gas/input-scrub.c index 73cf1ec..e9c7240 100644 --- a/contrib/binutils/gas/input-scrub.c +++ b/contrib/binutils/gas/input-scrub.c @@ -1,5 +1,6 @@ /* input_scrub.c - Break up input buffers into whole numbers of lines. - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/itbl-lex.l b/contrib/binutils/gas/itbl-lex.l index a905ddd..4ac0946 100644 --- a/contrib/binutils/gas/itbl-lex.l +++ b/contrib/binutils/gas/itbl-lex.l @@ -1,5 +1,5 @@ /* itbl-lex.l - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright 1997, 1998 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/itbl-ops.c b/contrib/binutils/gas/itbl-ops.c index 9a78219..d3650cd 100644 --- a/contrib/binutils/gas/itbl-ops.c +++ b/contrib/binutils/gas/itbl-ops.c @@ -1,5 +1,5 @@ /* itbl-ops.c - Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -500,7 +500,7 @@ unsigned long itbl_assemble (char *name, char *s) { unsigned long opcode; - struct itbl_entry *e; + struct itbl_entry *e = NULL; struct itbl_field *f; char *n; int processor; diff --git a/contrib/binutils/gas/itbl-ops.h b/contrib/binutils/gas/itbl-ops.h index 3dfd6f0..bcd68fe 100644 --- a/contrib/binutils/gas/itbl-ops.h +++ b/contrib/binutils/gas/itbl-ops.h @@ -1,5 +1,5 @@ /* itbl-ops.h - Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/itbl-parse.y b/contrib/binutils/gas/itbl-parse.y index 7966ee8..c1afdbd 100644 --- a/contrib/binutils/gas/itbl-parse.y +++ b/contrib/binutils/gas/itbl-parse.y @@ -1,5 +1,5 @@ /* itbl-parse.y - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright 1997 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/listing.h b/contrib/binutils/gas/listing.h index c0d5c37..3301735 100644 --- a/contrib/binutils/gas/listing.h +++ b/contrib/binutils/gas/listing.h @@ -1,5 +1,5 @@ /* This file is listing.h - Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 1997 + Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1997, 1998 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/literal.c b/contrib/binutils/gas/literal.c index f3ccce3..7315f3e 100644 --- a/contrib/binutils/gas/literal.c +++ b/contrib/binutils/gas/literal.c @@ -1,5 +1,5 @@ /* as.c - GAS literal pool management. - Copyright (C) 1994, 2000 Free Software Foundation, Inc. + Copyright 1994, 2000 Free Software Foundation, Inc. Written by Ken Raeburn (raeburn@cygnus.com). This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/macro.c b/contrib/binutils/gas/macro.c index 74a17ff..8512208 100644 --- a/contrib/binutils/gas/macro.c +++ b/contrib/binutils/gas/macro.c @@ -1,5 +1,5 @@ /* macro.c - macro support for gas and gasp - Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, diff --git a/contrib/binutils/gas/macro.h b/contrib/binutils/gas/macro.h index 030fc91..beff9a8 100644 --- a/contrib/binutils/gas/macro.h +++ b/contrib/binutils/gas/macro.h @@ -1,5 +1,6 @@ /* macro.h - header file for macro support for gas and gasp - Copyright (C) 1994, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. + Copyright 1994, 1995, 1996, 1997, 1998, 2000 + Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com diff --git a/contrib/binutils/gas/messages.c b/contrib/binutils/gas/messages.c index e342673..e85deec 100644 --- a/contrib/binutils/gas/messages.c +++ b/contrib/binutils/gas/messages.c @@ -1,5 +1,5 @@ /* messages.c - error reporter - - Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 98, 2000 + Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/obj.h b/contrib/binutils/gas/obj.h index 4c9759f..846627a 100644 --- a/contrib/binutils/gas/obj.h +++ b/contrib/binutils/gas/obj.h @@ -1,7 +1,7 @@ /* obj.h - defines the object dependent hooks for all object format backends. - Copyright (C) 1987, 90, 91, 92, 93, 95, 96, 97, 99, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/output-file.c b/contrib/binutils/gas/output-file.c index a7df72f..bcd49b5 100644 --- a/contrib/binutils/gas/output-file.c +++ b/contrib/binutils/gas/output-file.c @@ -1,5 +1,5 @@ /* output-file.c - Deal with the output file - Copyright (C) 1987, 90, 91, 93, 92, 94, 95, 96, 1998 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/output-file.h b/contrib/binutils/gas/output-file.h index 942f1ef..48b7a6a 100644 --- a/contrib/binutils/gas/output-file.h +++ b/contrib/binutils/gas/output-file.h @@ -1,6 +1,7 @@ /* This file is output-file.h - Copyright (C) 1987-1992 Free Software Foundation, Inc. + Copyright 1987, 1988, 1989, 1990, 1991, 1992 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/po/POTFILES.in b/contrib/binutils/gas/po/POTFILES.in index 30dab30..f0a7cd6 100644 --- a/contrib/binutils/gas/po/POTFILES.in +++ b/contrib/binutils/gas/po/POTFILES.in @@ -126,18 +126,18 @@ ecoff.c ecoff.h ehopt.c ehopt.c -emul.h emul-target.h +emul.h expr.c expr.c expr.h flonum-copy.c flonum-copy.c -flonum.h flonum-konst.c flonum-konst.c flonum-mult.c flonum-mult.c +flonum.h frags.c frags.c frags.h diff --git a/contrib/binutils/gas/read.c b/contrib/binutils/gas/read.c index 1086bf0..32050c4 100644 --- a/contrib/binutils/gas/read.c +++ b/contrib/binutils/gas/read.c @@ -1,6 +1,6 @@ /* read.c - read a source file - - Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 2000 Free Software Foundation, Inc. + Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, + 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -2379,9 +2379,17 @@ do_org (segment, exp, fill) else { char *p; + symbolS *sym = exp->X_add_symbol; + offsetT off = exp->X_add_number * OCTETS_PER_BYTE; - p = frag_var (rs_org, 1, 1, (relax_substateT) 0, exp->X_add_symbol, - exp->X_add_number * OCTETS_PER_BYTE, (char *) NULL); + if (exp->X_op != O_constant && exp->X_op != O_symbol) + { + /* Handle complex expressions. */ + sym = make_expr_symbol (exp); + off = 0; + } + + p = frag_var (rs_org, 1, 1, (relax_substateT) 0, sym, off, (char *) 0); *p = fill; } } @@ -4385,6 +4393,7 @@ emit_leb128_expr (exp, sign) int sign; { operatorT op = exp->X_op; + int nbytes; if (op == O_absent || op == O_illegal) { @@ -4404,6 +4413,17 @@ emit_leb128_expr (exp, sign) op = O_constant; } + /* Let check_eh_frame know that data is being emitted. nbytes == -1 is + a signal that this is leb128 data. It shouldn't optimize this away. */ + nbytes = -1; + if (check_eh_frame (exp, &nbytes)) + abort (); + + /* Let the backend know that subsequent data may be byte aligned. */ +#ifdef md_cons_align + md_cons_align (1); +#endif + if (op == O_constant) { /* If we've got a constant, emit the thing directly right now. */ @@ -4849,12 +4869,26 @@ equals (sym_name, reassign) } else { +#ifdef OBJ_COFF + int local; + + symbolP = symbol_find (sym_name); + local = symbolP == NULL; + if (local) +#endif /* OBJ_COFF */ symbolP = symbol_find_or_make (sym_name); /* Permit register names to be redefined. */ if (!reassign && S_IS_DEFINED (symbolP) && S_GET_SEGMENT (symbolP) != reg_section) as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP)); + +#ifdef OBJ_COFF + /* "set" symbols are local unless otherwise specified. */ + if (local) + SF_SET_LOCAL (symbolP); +#endif /* OBJ_COFF */ + pseudo_set (symbolP); } diff --git a/contrib/binutils/gas/read.h b/contrib/binutils/gas/read.h index b6929c8..d19deec 100644 --- a/contrib/binutils/gas/read.h +++ b/contrib/binutils/gas/read.h @@ -1,5 +1,6 @@ /* read.h - of read.c - Copyright (C) 1986, 90, 92, 93, 94, 95, 96, 97, 2000 + Copyright 1986, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/sb.c b/contrib/binutils/gas/sb.c index 6328716..93d2fcf 100644 --- a/contrib/binutils/gas/sb.c +++ b/contrib/binutils/gas/sb.c @@ -1,5 +1,5 @@ /* sb.c - string buffer manipulation routines - Copyright (C) 1994, 1995, 2000 Free Software Foundation, Inc. + Copyright 1994, 1995, 2000 Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com diff --git a/contrib/binutils/gas/sb.h b/contrib/binutils/gas/sb.h index e73e0de..dd01e0d 100644 --- a/contrib/binutils/gas/sb.h +++ b/contrib/binutils/gas/sb.h @@ -1,5 +1,5 @@ /* sb.h - header file for string buffer manipulation routines - Copyright (C) 1994, 1995, 2000 Free Software Foundation, Inc. + Copyright 1994, 1995, 2000 Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com diff --git a/contrib/binutils/gas/stabs.c b/contrib/binutils/gas/stabs.c index faf3a9c..eed11b3 100644 --- a/contrib/binutils/gas/stabs.c +++ b/contrib/binutils/gas/stabs.c @@ -1,5 +1,5 @@ /* Generic stabs parsing for gas. - Copyright (C) 1989, 90, 91, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1989, 1990, 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -185,7 +185,7 @@ s_stab_generic (what, stab_secname, stabstr_secname) char *stabstr_secname; { long longint; - char *string; + char *string, *saved_string_obstack_end; int type; int other; int desc; @@ -199,12 +199,19 @@ s_stab_generic (what, stab_secname, stabstr_secname) 'd' indicating which type of .stab this is. */ if (what != 's') - string = ""; + { + string = ""; + saved_string_obstack_end = 0; + } else { int length; string = demand_copy_C_string (&length); + /* FIXME: We should probably find some other temporary storage + for string, rather than leaking memory if someone else + happens to use the notes obstack. */ + saved_string_obstack_end = notes.next_free; SKIP_WHITESPACE (); if (*input_line_pointer == ',') input_line_pointer++; @@ -335,8 +342,9 @@ s_stab_generic (what, stab_secname, stabstr_secname) stroff = get_stab_string_offset (string, stabstr_secname); if (what == 's') { - /* release the string */ - obstack_free (¬es, string); + /* Release the string, if nobody else has used the obstack. */ + if (saved_string_obstack_end == notes.next_free) + obstack_free (¬es, string); } /* At least for now, stabs in a special stab section are always diff --git a/contrib/binutils/gas/struc-symbol.h b/contrib/binutils/gas/struc-symbol.h index 485ba5a..6573f2c 100644 --- a/contrib/binutils/gas/struc-symbol.h +++ b/contrib/binutils/gas/struc-symbol.h @@ -1,5 +1,5 @@ /* struct_symbol.h - Internal symbol structure - Copyright (C) 1987, 92, 93, 94, 95, 98, 99, 2000 + Copyright 1987, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/subsegs.c b/contrib/binutils/gas/subsegs.c index 1d29bba..611d64c 100644 --- a/contrib/binutils/gas/subsegs.c +++ b/contrib/binutils/gas/subsegs.c @@ -1,5 +1,6 @@ /* subsegs.c - subsegments - - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/subsegs.h b/contrib/binutils/gas/subsegs.h index 504b6df..9a5abb0 100644 --- a/contrib/binutils/gas/subsegs.h +++ b/contrib/binutils/gas/subsegs.h @@ -1,5 +1,5 @@ /* subsegs.h -> subsegs.c - Copyright (C) 1987, 92, 93, 94, 95, 96, 98, 2000 + Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/symbols.c b/contrib/binutils/gas/symbols.c index fba40cf..a72ba42 100644 --- a/contrib/binutils/gas/symbols.c +++ b/contrib/binutils/gas/symbols.c @@ -1,5 +1,6 @@ /* symbols.c -symbol table- - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -1530,7 +1531,7 @@ decode_local_label_name (s) int label_number; int instance_number; char *type; - const char *message_format = _("\"%d\" (instance number %d of a %s label)"); + const char *message_format; int index = 0; #ifdef LOCAL_LABEL_PREFIX @@ -1554,6 +1555,7 @@ decode_local_label_name (s) for (instance_number = 0, p++; isdigit ((unsigned char) *p); ++p) instance_number = (10 * instance_number) + *p - '0'; + message_format = _("\"%d\" (instance number %d of a %s label)"); symbol_decode = obstack_alloc (¬es, strlen (message_format) + 30); sprintf (symbol_decode, message_format, label_number, instance_number, type); @@ -1814,6 +1816,17 @@ S_SET_EXTERNAL (s) /* Let .weak override .global. */ return; } + if (s->bsym->flags & BSF_SECTION_SYM) + { + char * file; + unsigned int line; + + /* Do not reassign section symbols. */ + as_where (& file, & line); + as_warn_where (file, line, + _("Section symbols are already global")); + return; + } s->bsym->flags |= BSF_GLOBAL; s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK); } diff --git a/contrib/binutils/gas/symbols.h b/contrib/binutils/gas/symbols.h index 87c473c..ad2cde0 100644 --- a/contrib/binutils/gas/symbols.h +++ b/contrib/binutils/gas/symbols.h @@ -1,5 +1,5 @@ /* symbols.h - - Copyright (C) 1987, 90, 92, 93, 94, 95, 97, 99, 2000 + Copyright 1987, 1990, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/tc.h b/contrib/binutils/gas/tc.h index 07817be..6becfb8 100644 --- a/contrib/binutils/gas/tc.h +++ b/contrib/binutils/gas/tc.h @@ -1,6 +1,7 @@ /* tc.h - target cpu dependent - Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. diff --git a/contrib/binutils/gas/write.c b/contrib/binutils/gas/write.c index 9ef356f..cfdc9b5 100644 --- a/contrib/binutils/gas/write.c +++ b/contrib/binutils/gas/write.c @@ -1,5 +1,6 @@ /* write.c - emit .o file - Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, + 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -283,6 +284,10 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type) case O_absent: break; + case O_register: + as_bad (_("register value used as expression")); + break; + case O_add: /* This comes up when _GLOBAL_OFFSET_TABLE_+(.-L0) is read, if the difference expression cannot immediately be reduced. */ @@ -2011,24 +2016,11 @@ write_object_file () #ifdef TC_GENERIC_RELAX_TABLE -static int is_dnrange PARAMS ((fragS *, fragS *)); - -/* Subroutines of relax_segment. */ -static int -is_dnrange (f1, f2) - fragS *f1; - fragS *f2; -{ - for (; f1; f1 = f1->fr_next) - if (f1->fr_next == f2) - return 1; - return 0; -} - /* Relax a fragment by scanning TC_GENERIC_RELAX_TABLE. */ long -relax_frag (fragP, stretch) +relax_frag (segment, fragP, stretch) + segT segment; fragS *fragP; long stretch; { @@ -2036,20 +2028,26 @@ relax_frag (fragP, stretch) const relax_typeS *start_type; relax_substateT next_state; relax_substateT this_state; - long aim, target, growth; - symbolS *symbolP = fragP->fr_symbol; - long offset = fragP->fr_offset; - /* Recompute was_address by undoing "+= stretch" done by relax_segment. */ - unsigned long was_address = fragP->fr_address - stretch; - unsigned long address = fragP->fr_address; - const relax_typeS *table = TC_GENERIC_RELAX_TABLE; - + long growth; + offsetT aim; + addressT target; + addressT address; + symbolS *symbolP; + const relax_typeS *table; + + target = fragP->fr_offset; + address = fragP->fr_address; + table = TC_GENERIC_RELAX_TABLE; this_state = fragP->fr_subtype; start_type = this_type = table + this_state; - target = offset; + symbolP = fragP->fr_symbol; if (symbolP) { + fragS *sym_frag; + + sym_frag = symbol_get_frag (symbolP); + #ifndef DIFF_EXPR_OK #if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER) know ((S_GET_SEGMENT (symbolP) == SEG_ABSOLUTE) @@ -2057,23 +2055,20 @@ relax_frag (fragP, stretch) || (S_GET_SEGMENT (symbolP) == SEG_BSS) || (S_GET_SEGMENT (symbolP) == SEG_TEXT)); #endif - know (symbolP->sy_frag); + know (sym_frag != NULL); #endif know (!(S_GET_SEGMENT (symbolP) == absolute_section) - || symbolP->sy_frag == &zero_address_frag); - target += S_GET_VALUE (symbolP) + symbol_get_frag (symbolP)->fr_address; + || sym_frag == &zero_address_frag); + target += S_GET_VALUE (symbolP) + sym_frag->fr_address; /* If frag has yet to be reached on this pass, assume it will move by STRETCH just as we did. If this is not so, it will be because some frag - between grows, and that will force another pass. - - Beware zero-length frags. - - There should be a faster way to do this. */ + between grows, and that will force another pass. */ - if (symbol_get_frag (symbolP)->fr_address >= was_address - && is_dnrange (fragP, symbol_get_frag (symbolP))) + if (stretch != 0 + && sym_frag->relax_marker != fragP->relax_marker + && S_GET_SEGMENT (symbolP) == segment) { target += stretch; } @@ -2180,6 +2175,7 @@ relax_segment (segment_frag_root, segment) address = 0; for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next) { + fragP->relax_marker = 0; fragP->fr_address = address; address += fragP->fr_fix; @@ -2249,14 +2245,15 @@ relax_segment (segment_frag_root, segment) long stretch; /* May be any size, 0 or negative. */ /* Cumulative number of addresses we have relaxed this pass. We may have relaxed more than one address. */ - long stretched; /* Have we stretched on this pass? */ + int stretched; /* Have we stretched on this pass? */ /* This is 'cuz stretch may be zero, when, in fact some piece of code grew, and another shrank. If a branch instruction doesn't fit anymore, we could be scrod. */ do { - stretch = stretched = 0; + stretch = 0; + stretched = 0; for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next) { @@ -2265,6 +2262,7 @@ relax_segment (segment_frag_root, segment) offsetT offset; symbolS *symbolP; + fragP->relax_marker ^= 1; was_address = fragP->fr_address; address = fragP->fr_address += stretch; symbolP = fragP->fr_symbol; @@ -2364,8 +2362,8 @@ relax_segment (segment_frag_root, segment) case rs_org: { - long target = offset; - long after; + addressT target = offset; + addressT after; if (symbolP) { @@ -2429,12 +2427,12 @@ relax_segment (segment_frag_root, segment) case rs_machine_dependent: #ifdef md_relax_frag - growth = md_relax_frag (fragP, stretch); + growth = md_relax_frag (segment, fragP, stretch); #else #ifdef TC_GENERIC_RELAX_TABLE /* The default way to relax a frag is to look through TC_GENERIC_RELAX_TABLE. */ - growth = relax_frag (fragP, stretch); + growth = relax_frag (segment, fragP, stretch); #endif /* TC_GENERIC_RELAX_TABLE */ #endif break; @@ -2466,7 +2464,7 @@ relax_segment (segment_frag_root, segment) if (growth) { stretch += growth; - stretched++; + stretched = 1; } } /* For each frag in the segment. */ } diff --git a/contrib/binutils/gas/write.h b/contrib/binutils/gas/write.h index 9872e9d..5bab7a2 100644 --- a/contrib/binutils/gas/write.h +++ b/contrib/binutils/gas/write.h @@ -1,5 +1,5 @@ /* write.h - Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 2000 + Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -181,7 +181,7 @@ extern void record_alignment PARAMS ((segT seg, int align)); extern int get_recorded_alignment PARAMS ((segT seg)); extern void subsegs_finish PARAMS ((void)); extern void write_object_file PARAMS ((void)); -extern long relax_frag PARAMS ((fragS *, long)); +extern long relax_frag PARAMS ((segT, fragS *, long)); extern void relax_segment PARAMS ((struct frag * seg_frag_root, segT seg_type)); diff --git a/contrib/binutils/include/ChangeLog b/contrib/binutils/include/ChangeLog index 39085a1..10bb1b2 100644 --- a/contrib/binutils/include/ChangeLog +++ b/contrib/binutils/include/ChangeLog @@ -1,3 +1,13 @@ +2001-06-07 Alan Modra + + * Many files: Update copyright notices. + +2001-05-28 Philip Blundell + + From 2001-05-11 Jakub Jelinek + * elf/ia64.h (ELF_STRING_ia64_unwind_once): Define. + (ELF_STRING_ia64_unwind_info_once): Define. + 2001-01-11 Peter Targett * dis-asm.h (arc_get_disassembler): Correct declaration. @@ -37,7 +47,7 @@ 2000-12-06 Rodney Brown * getopt.h obstack.h: Standarize copyright statement. - + 2000-12-05 Richard Henderson * demangle.h: Change "new_abi" to "v3" everywhere. @@ -45,7 +55,7 @@ 2000-11-29 Zack Weinberg * libiberty.h: Move #includes to top. Prototype xmalloc_failed. - + 2000-11-15 Kenneth Block * demangle.h: Add gnat and java demangle styles. @@ -79,7 +89,7 @@ 2000-09-04 Alex Samuel - * dyn-string.h: Adjust formatting. + * dyn-string.h: Adjust formatting. (dyn_string_insert_char): New macro. New declaration. 2000-08-28 Jason Merrill @@ -90,10 +100,6 @@ * libiberty.h (ARRAY_SIZE): New macro. -2000-08-08 Jason Eckhardt - - * opcode/i860.h: Small formatting adjustments. - 2000-07-29 Nick Clifton * os9k.h: Add copyright notice. @@ -101,30 +107,6 @@ 2000-07-22 Jason Eckhardt - * opcode/i860.h (btne, bte, bla): Changed these opcodes - to use sbroff ('r') instead of split16 ('s'). - (J, K, L, M): New operand types for 16-bit aligned fields. - (ld.x, {p}fld.x, fst.x, pst.d): Changed these opcodes to - use I, J, K, L, M instead of just I. - (T, U): New operand types for split 16-bit aligned fields. - (st.x): Changed these opcodes to use S, T, U instead of just S. - (andh, andnoth, orh, xorh): Deleted 3-register forms as they do not - exist on the i860. - (pfgt.sd, pfle.sd): Deleted these as they do not exist on the i860. - (pfeq.ss, pfeq.dd): New opcodes. - (st.s): Fixed incorrect mask bits. - (fmlow): Fixed incorrect mask bits. - (fzchkl, pfzchkl): Fixed incorrect mask bits. - (faddz, pfaddz): Fixed incorrect mask bits. - (form, pform): Fixed incorrect mask bits. - (pfld.l): Fixed incorrect mask bits. - (fst.q): Fixed incorrect mask bits. - (all floating point opcodes): Fixed incorrect mask bits for - handling of dual bit. - - * elf/i860.h: New file. - (elf_i860_reloc_type): Defined ELF32 i860 relocations. - * dis-asm.h (print_insn_i860): Add prototype. 2000-07-20 H.J. Lu @@ -143,10 +125,6 @@ * MAINTAINERS: new -2000-06-30 DJ Delorie - - * coff/pe.h: clarify a comment - 2000-06-21 Alex Samuel * dyn-string.h (dyn_string_init, dyn_string_new, @@ -161,7 +139,7 @@ dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr, dyn_string_append_char, dyn_string_substring): Change return type to int. - + 2000-06-18 Stephane Carrez * dis-asm.h (print_insn_m68hc12): Define. @@ -184,12 +162,12 @@ * dyn-string.h: Move here from gcc/dyn-string.h. Add new functions. * demangle.h (DMGL_GNU_NEW_ABI): New macro. - (DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI. + (DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI. (current_demangling_style): Add gnu_new_abi_demangling. (GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro. (GNU_NEW_ABI_DEMANGLING): Likewise. (cplus_demangle_new_abi): New declaration. - + Tue May 30 16:53:34 2000 Andrew Cagney * floatformat.h (struct floatformat): Add field name. @@ -208,7 +186,7 @@ Tue May 30 16:53:34 2000 Andrew Cagney 2000-05-17 S. Bharadwaj Yadavalli Rick Gorton - + * bfdlink.h (struct bfd_link_info): Add emitrelocations flag. 2000-05-08 Alan Modra @@ -220,10 +198,6 @@ Tue May 30 16:53:34 2000 Andrew Cagney * ansidecl.h: #define __extension__ to nothing if GCC_VERSION < 2008. -Fri May 5 16:51:03 2000 Clinton Popetz - - * coff/rs6k64.h (U802TOC64MAGIC): Change to U803XTOCMAGIC. - 2000-05-04 Kaveh R. Ghazi * demangle.h (demangler_engine): Constify. @@ -244,10 +218,6 @@ Thu May 4 17:15:26 2000 Philippe De Muyter (cplus_demangle_set_style): New function for setting style. (cplus_demangle_name_to_style): New function to translate name. -Mon Apr 24 15:20:51 2000 Clinton Popetz - - * include/coff/rs6k64.h: New file. - 2000-04-24 Mark Mitchell * hashtab.h (hash_pointer): Declare. @@ -330,11 +300,6 @@ Tue Apr 18 16:22:30 2000 Richard Kenner * dis-asm.h (print_insn_i370): Declare. -2000-02-22 Chandra Chavva - - * opcode/d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation - cannot be combined in parallel with ADD/SUBppp. - Tue Feb 22 15:19:54 2000 Andrew Cagney * remote-sim.h (sim_trace): Document return values. @@ -364,7 +329,7 @@ Tue Feb 8 17:01:13 2000 Andrew Cagney * dis-asm.h (struct disassemble_info): Added octets_per_byte field and initialize it to one (1). - + 2000-01-27 Nick Clifton * dis-asm.h: Add prototype for disassembler_usage(). @@ -492,7 +457,7 @@ Tue Sep 14 00:35:02 1999 Marc Espie (ELF32_MS_REL_INDEX): New macro. (ELF32_MS_FLAGS): Likewise. (ELF32_MS_INFO): Likewise. - + 1999-06-14 Nick Clifton * dis-asm.h (arm_toggle_regnames): New prototype. @@ -575,11 +540,6 @@ Tue Dec 8 00:30:31 1998 Elena Zannoni (struct dntt_type_svar): add field thread_specific. (hp_language): add languages modcal and dmpascal. -Mon Nov 30 15:25:58 1998 J"orn Rennecke - - * elf/sh.h (elf_sh_reloc_type): Add R_SH_FIRST_INVALID_RELOC, - R_SH_LAST_INVALID_RELOC, R_SH_SWITCH8 and R_SH_max. - Fri Nov 20 13:14:00 1998 Andrew Cagney * libiberty.h (basename): Add prototype for FreeBSD. @@ -634,10 +594,6 @@ Mon Jun 1 13:48:32 1998 Jason Molenda (crash@bugshack.cygnus.com) * obstack.h: Update to latest FSF version. -Tue May 26 20:57:43 1998 Stan Cox - - * elf/sparc.h (EF_SPARC_LEDATA, R_SPARC_32LE): Added. - Tue Feb 24 13:05:02 1998 Doug Evans * dis-asm.h (disassemble_info): Member `symbol' renamed to `symbols' @@ -676,10 +632,6 @@ Tue Dec 2 10:20:53 1997 Nick Clifton * dis-asm.h (disasm_symaddr): New prototype. -Mon Dec 1 20:24:18 1997 J"orn Rennecke - - * coff/sh.h (R_SH_SWITCH8): New. - Mon Dec 1 11:29:35 1997 Doug Evans * callback.h (CB_SYSCALL): Comment out arg names in prototypes. @@ -808,14 +760,6 @@ Thu May 15 01:24:16 1997 Mark Alexander * obstack.h (obstack_specify_allocation_with_arg, obstack_chunkfun, obstack_freefun): Eliminate compile warnings in gdb. -Tue May 13 10:21:14 1997 Nick Clifton - - * coff/arm.h (constants): Added new flag bits F_APCS_26 and - F_APCS_SET for the f_flags field of the filehdr structure. Added new - flags: F_APCS26, F_ARM_2, F_ARM_3, F_ARM_7, F_ARM_7T to store - information in the flags field of the internal_f structure used by BFD - routines. - Tue Apr 22 10:24:34 1997 Fred Fish * floatformat.h (floatformat_byteorders): Add comments for previous @@ -1164,13 +1108,7 @@ Thu May 18 04:25:50 1995 Ken Raeburn Sat May 13 10:14:08 1995 Steve Chamberlain - * coff/pe.h: New file. * bfdlink.h (subsytem, stack_heap_parameters): New. - * coff/i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT, - NT_DEF_RESERVE, NT_DEF_COMMIT): New. - * coff/internal.h (internal_filehdr): New fields for PE. - (IMAGE_DATA_DIRECTORY): New. - (internal_aouthdr): New fields for PE. Thu May 4 14:36:42 1995 Jason Merrill @@ -1245,8 +1183,6 @@ Tue Oct 25 11:38:02 1994 Ian Lance Taylor Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) - * aout/aout64.h: Only define QMAGIC if it isn't already defined. - * dis-asm.h: Add support for the ARM. Wed Aug 10 12:51:41 1994 Doug Evans (dje@canuck.cygnus.com) @@ -1392,10 +1328,6 @@ Fri Aug 6 17:05:47 1993 David J. Mackenzie (djm@thepub.cygnus.com) * getopt.h, obstack.h: Update to latest FSF version. -Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com) - - * coff/i386.h: Add Lynx magic number. - Mon Aug 2 14:45:29 1993 John Gilmore (gnu@cygnus.com) * dis-asm.h: Move enum outside of struct defn to avoid warnings. @@ -1425,10 +1357,6 @@ Thu Jul 15 12:41:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * dis-asm.h: Added declaration of print_insn_m88k. -Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com) - - * opcode/h8300.h: Lots of little fixes for the h8/300h. - Fri Jul 2 10:31:59 1993 Ian Lance Taylor (ian@cygnus.com) * ansidecl.h: Use ANSI macros if __mips and _SYSTYPE_SVR4 are @@ -1453,9 +1381,6 @@ Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) Support for H8/300-H * dis-asm.h (print_insn_h8300, print_insn_h8300h): Declare it. - * coff/h8300.h: New magic number. - * coff/internal.h: New relocations. - * opcode/h8300.h: Lots of new opcodes. Tue Jun 1 07:35:03 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com) @@ -1734,7 +1659,7 @@ Mon Jan 27 22:01:13 1992 Steve Chamberlain (sac at cygnus.com) Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com) - * bfd.h, ieee.h, opcode/m68k.h, opcode/sparc.h: ANSIfy enums. + * bfd.h, ieee.h: ANSIfy enums. Thu Dec 12 20:59:56 1991 John Gilmore (gnu at cygnus.com) diff --git a/contrib/binutils/include/ansidecl.h b/contrib/binutils/include/ansidecl.h index e7852c6..545a621 100644 --- a/contrib/binutils/include/ansidecl.h +++ b/contrib/binutils/include/ansidecl.h @@ -1,5 +1,6 @@ /* ANSI and traditional C compatability macros - Copyright 1991, 1992, 1996, 1999 Free Software Foundation, Inc. + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000 + Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify diff --git a/contrib/binutils/include/aout/ChangeLog b/contrib/binutils/include/aout/ChangeLog index 1645a5a..e75a12f 100644 --- a/contrib/binutils/include/aout/ChangeLog +++ b/contrib/binutils/include/aout/ChangeLog @@ -1,3 +1,7 @@ +2001-06-07 Alan Modra + + * Many files: Update copyright notices. + Mon Apr 3 13:29:08 2000 Hans-Peter Nilsson * aout64.h (RELOC_EXT_BITS_EXTERN_BIG): Wrap definition in #ifndef. diff --git a/contrib/binutils/include/aout/aout64.h b/contrib/binutils/include/aout/aout64.h index bec8440..a8a8cd1 100644 --- a/contrib/binutils/include/aout/aout64.h +++ b/contrib/binutils/include/aout/aout64.h @@ -1,4 +1,20 @@ -/* `a.out' object-file definitions, including extensions to 64-bit fields */ +/* `a.out' object-file definitions, including extensions to 64-bit fields + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __A_OUT_64_H__ #define __A_OUT_64_H__ diff --git a/contrib/binutils/include/aout/ar.h b/contrib/binutils/include/aout/ar.h index 7b5dcda..15d534c 100644 --- a/contrib/binutils/include/aout/ar.h +++ b/contrib/binutils/include/aout/ar.h @@ -1,4 +1,20 @@ -/* archive file definition for GNU software */ +/* archive file definition for GNU software + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* So far this is correct for BSDish archives. Don't forget that files must begin on an even byte boundary. */ diff --git a/contrib/binutils/include/aout/encap.h b/contrib/binutils/include/aout/encap.h index b215d49..1381557 100644 --- a/contrib/binutils/include/aout/encap.h +++ b/contrib/binutils/include/aout/encap.h @@ -1,5 +1,5 @@ /* Yet Another Try at encapsulating bsd object files in coff. - Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. + Copyright 1988, 1989, 1991 Free Software Foundation, Inc. Written by Pace Willisson 12/9/88 This file is obsolete. It needs to be converted to just define a bunch diff --git a/contrib/binutils/include/aout/host.h b/contrib/binutils/include/aout/host.h index 8e36212..442981a 100644 --- a/contrib/binutils/include/aout/host.h +++ b/contrib/binutils/include/aout/host.h @@ -1,22 +1,42 @@ -/* Parameters about the a.out format, based on the host system on which - the program is compiled. */ +/* host.h - Parameters about the a.out format, based on the host system + on which the program is compiled. + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Address of data segment in memory after it is loaded. - It is up to you to define SEGMENT_SIZE - on machines not listed here. */ + It is up to you to define SEGMENT_SIZE on machines not listed here. */ #ifndef SEGMENT_SIZE + #if defined(hp300) || defined(pyr) #define SEGMENT_SIZE page_size #endif + #ifdef sony #define SEGMENT_SIZE 0x1000 #endif /* Sony. */ + #ifdef is68k #define SEGMENT_SIZE 0x20000 #endif + #if defined(m68k) && defined(PORTAR) #define TARGET_PAGE_SIZE 0x400 #define SEGMENT_SIZE TARGET_PAGE_SIZE #endif + #endif /*!defined(SEGMENT_SIZE)*/ diff --git a/contrib/binutils/include/aout/ranlib.h b/contrib/binutils/include/aout/ranlib.h index 9826005..e4603ed 100644 --- a/contrib/binutils/include/aout/ranlib.h +++ b/contrib/binutils/include/aout/ranlib.h @@ -1,5 +1,5 @@ /* ranlib.h -- archive library index member definition for GNU. - Copyright 1990-1991 Free Software Foundation, Inc. + Copyright 1990, 1991 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/contrib/binutils/include/aout/reloc.h b/contrib/binutils/include/aout/reloc.h index 563c552..eca3f59 100644 --- a/contrib/binutils/include/aout/reloc.h +++ b/contrib/binutils/include/aout/reloc.h @@ -1,5 +1,5 @@ /* reloc.h -- Header file for relocation information. - Copyright 1989-1991 Free Software Foundation, Inc. + Copyright 1989, 1990, 1991 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/contrib/binutils/include/aout/stab.def b/contrib/binutils/include/aout/stab.def index 9c2d2dd..67bde35 100644 --- a/contrib/binutils/include/aout/stab.def +++ b/contrib/binutils/include/aout/stab.def @@ -1,5 +1,5 @@ /* Table of DBX symbol codes for the GNU system. - Copyright (C) 1988, 91, 92, 93, 94, 95, 96, 1998 + Copyright 1988, 1991, 1992, 1993, 1994, 1996, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/contrib/binutils/include/aout/stab_gnu.h b/contrib/binutils/include/aout/stab_gnu.h index 7d18e14..c62ac6e 100644 --- a/contrib/binutils/include/aout/stab_gnu.h +++ b/contrib/binutils/include/aout/stab_gnu.h @@ -1,3 +1,20 @@ +/* gnu_stab.h Definitions for GNU extensions to STABS + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __GNU_STAB__ /* Indicate the GNU stab.h is in use. */ diff --git a/contrib/binutils/include/bfdlink.h b/contrib/binutils/include/bfdlink.h index ae96323..29eeb66 100644 --- a/contrib/binutils/include/bfdlink.h +++ b/contrib/binutils/include/bfdlink.h @@ -1,5 +1,6 @@ /* bfdlink.h -- header file for BFD link routines - Copyright 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/coff/ChangeLog b/contrib/binutils/include/coff/ChangeLog index eb97871..efde1bf 100644 --- a/contrib/binutils/include/coff/ChangeLog +++ b/contrib/binutils/include/coff/ChangeLog @@ -1,3 +1,14 @@ +2001-06-11 Alan Modra + + Merge from mainline. + 2001-02-09 David Mosberger + * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ. + Rename from PEPAOUTHDR. + +2001-06-07 Alan Modra + + * Many files: Update copyright notices. + 2001-02-17 Philip Blundell From 2001-01-23 H.J. Lu @@ -16,6 +27,14 @@ * pe.h: Clarify a comment. +2000-05-05 Clinton Popetz + + * rs6k64.h (U802TOC64MAGIC): Change to U803XTOCMAGIC. + +2000-04-24 Clinton Popetz + + * rs6k64.h: New file. + 2000-04-17 Timothy Wall * ti.h: Load page cleanup. @@ -130,7 +149,7 @@ Wed Jun 2 18:08:18 1999 Richard Henderson Mon May 17 13:35:35 1999 Stan Cox - * coff/arm.h (F_PIC, F_ARM_2, F_ARM_2a, F_ARM_3, F_ARM_3M, + * arm.h (F_PIC, F_ARM_2, F_ARM_2a, F_ARM_3, F_ARM_3M, F_ARM_4, F_ARM_4T, F_APCS26): Changed values to distinguish F_ARM_2a, F_ARM_3M, F_ARM_4T. @@ -154,7 +173,7 @@ Sun Dec 6 21:36:37 1998 Mark Elbrecht Wed Jan 27 13:35:35 1999 Stan Cox - * coff/arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26): + * arm.h (F_PIC_INT, F_ARM_2, F_ARM_3, F_ARM_4, F_APCS26): Changed values to avoid clashing with IMAGE_FILE_* coff header flag values. @@ -180,6 +199,10 @@ Tue Dec 2 10:21:40 1997 Nick Clifton * arm.h (COFFARM): New define. +Mon Dec 1 20:24:18 1997 J"orn Rennecke + + * sh.h (R_SH_SWITCH8): New. + Sat Nov 22 15:10:14 1997 Nick Clifton * internal.h (C_THUMBEXTFUNC, C_THUMBSTATFUNC): Constants to @@ -209,6 +232,14 @@ Mon May 26 14:07:55 1997 Ian Lance Taylor * tic80.h (R_PPL16B): Correct value. +Tue May 13 10:21:14 1997 Nick Clifton + + * arm.h (constants): Added new flag bits F_APCS_26 and + F_APCS_SET for the f_flags field of the filehdr structure. Added new + flags: F_APCS26, F_ARM_2, F_ARM_3, F_ARM_7, F_ARM_7T to store + information in the flags field of the internal_f structure used by BFD + routines. + Sat May 3 08:24:59 1997 Fred Fish * internal.h (C_UEXT, C_STATLAB, C_EXTLAB, C_SYSTEM): @@ -343,8 +374,8 @@ Thu Nov 9 14:08:30 1995 Ian Lance Taylor Tue Nov 7 14:38:45 1995 Kim Knuttila - * coff/powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define. - * coff/pe.h: Added defines for file level flags + * powerpc.h (IMAGE_NT_OPTIONAL_HDR_MAGIC): Added define. + * pe.h: Added defines for file level flags Mon Nov 6 17:28:01 1995 Harry Dolan @@ -468,6 +499,15 @@ Tue May 16 15:08:20 1995 Ken Raeburn * internal.h (NT_subsystem, NT_stack_heap): Now extern. +Sat May 13 10:14:08 1995 Steve Chamberlain + + * pe.h: New file. + * i386.h (NT_SECTION_ALIGNMENT, NT_FILE_ALIGNMENT, + NT_DEF_RESERVE, NT_DEF_COMMIT): New. + * internal.h (internal_filehdr): New fields for PE. + (IMAGE_DATA_DIRECTORY): New. + (internal_aouthdr): New fields for PE. + Tue Feb 14 17:59:37 1995 Ian Lance Taylor * ecoff.h (struct ecoff_fdrtab_entry): Define. @@ -631,10 +671,10 @@ Wed Oct 13 15:52:34 1993 Ken Raeburn (raeburn@cygnus.com) Sun Oct 10 17:27:10 1993 Troy Rollo (troy@cbme.unsw.edu.au) - * coff/internal.h: Added o_sri, o_inlib and o_vid for Apollos - as well as R_DIR16. + * internal.h: Added o_sri, o_inlib and o_vid for Apollos as well + as R_DIR16. - * coff/apollo.h: New file + * apollo.h: New file Mon Oct 11 17:16:48 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) @@ -705,6 +745,10 @@ Thu Aug 12 11:24:42 1993 Ian Lance Taylor (ian@cygnus.com) * ecoff.h: Moved MIPS reloc definitions from here... * mips.h: to here. +Mon Aug 2 16:37:14 1993 Stu Grossman (grossman at cygnus.com) + + * i386.h: Add Lynx magic number. + Tue Aug 3 11:17:53 1993 Ian Lance Taylor (ian@cygnus.com) * alpha.h: Corrected external symbolic debugging structures to @@ -747,6 +791,12 @@ Wed Jun 9 15:09:09 1993 Ian Lance Taylor (ian@cygnus.com) * mips.h (OMAGIC): Define. +Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) + + Support for H8/300-H + * h8300.h: New magic number. + * internal.h: New relocations. + Mon Apr 26 18:04:47 1993 Steve Chamberlain (sac@thepub.cygnus.com) * internal.h, sh.h: Support for SH. @@ -924,8 +974,8 @@ Thu Feb 6 11:33:32 1992 Steve Chamberlain (sac at rtl.cygnus.com) Sat Nov 30 20:38:35 1991 Steve Chamberlain (sac at rtl.cygnus.com) - * ChangeLog, a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h, - m88k.h, mips.h, rs6000.h: move from above coff-.h + * a29k.h, h8300.h, i386.h, i960.h, internal.h, m68k.h, m88k.h, + mips.h, rs6000.h: Move from above coff-.h. Local Variables: diff --git a/contrib/binutils/include/coff/alpha.h b/contrib/binutils/include/coff/alpha.h index 076cbcb..6cd915d 100644 --- a/contrib/binutils/include/coff/alpha.h +++ b/contrib/binutils/include/coff/alpha.h @@ -1,6 +1,22 @@ /* ECOFF support on Alpha machines. - coff/ecoff.h must be included before this file. */ - + coff/ecoff.h must be included before this file. + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + /********************** FILE HEADER **********************/ struct external_filehdr { diff --git a/contrib/binutils/include/coff/arm.h b/contrib/binutils/include/coff/arm.h index 7ca9329..a0d8883 100644 --- a/contrib/binutils/include/coff/arm.h +++ b/contrib/binutils/include/coff/arm.h @@ -1,5 +1,5 @@ /* ARM COFF support for BFD. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/coff/aux-coff.h b/contrib/binutils/include/coff/aux-coff.h index c89c124..f8536c9 100644 --- a/contrib/binutils/include/coff/aux-coff.h +++ b/contrib/binutils/include/coff/aux-coff.h @@ -1,4 +1,21 @@ /* Modifications of internal.h and m68k.h needed by A/UX + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + Suggested by Ian Lance Taylor */ #ifndef GNU_COFF_AUX_H diff --git a/contrib/binutils/include/coff/ecoff.h b/contrib/binutils/include/coff/ecoff.h index 9e4202e..076fdf5 100644 --- a/contrib/binutils/include/coff/ecoff.h +++ b/contrib/binutils/include/coff/ecoff.h @@ -1,9 +1,25 @@ -#ifndef ECOFF_H -#define ECOFF_H - /* Generic ECOFF support. This does not include symbol information, found in sym.h and - symconst.h. */ + symconst.h. + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef ECOFF_H +#define ECOFF_H /* Mips magic numbers used in filehdr. MIPS_MAGIC_LITTLE is used on little endian machines. MIPS_MAGIC_BIG is used on big endian diff --git a/contrib/binutils/include/coff/i386.h b/contrib/binutils/include/coff/i386.h index 5ebf4a2..407245f 100644 --- a/contrib/binutils/include/coff/i386.h +++ b/contrib/binutils/include/coff/i386.h @@ -1,4 +1,20 @@ -/*** coff information for Intel 386/486. */ +/* coff information for Intel 386/486. + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /********************** FILE HEADER **********************/ diff --git a/contrib/binutils/include/coff/internal.h b/contrib/binutils/include/coff/internal.h index c6f2760..38ca309 100644 --- a/contrib/binutils/include/coff/internal.h +++ b/contrib/binutils/include/coff/internal.h @@ -1,5 +1,21 @@ /* Internal format of COFF object file data structures, for GNU BFD. - This file is part of BFD, the Binary File Descriptor library. */ + This file is part of BFD, the Binary File Descriptor library. + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef GNU_COFF_INTERNAL_H #define GNU_COFF_INTERNAL_H 1 diff --git a/contrib/binutils/include/coff/pe.h b/contrib/binutils/include/coff/pe.h index 0cf46d0..ff37875 100644 --- a/contrib/binutils/include/coff/pe.h +++ b/contrib/binutils/include/coff/pe.h @@ -1,6 +1,6 @@ /* pe.h - PE COFF header information - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright 2000, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -279,8 +279,8 @@ typedef struct char NumberOfRvaAndSizes[4]; /* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */ char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */ -} PEP64AOUTHDR; -#define PEP64AOUTSZ 240 +} PEPAOUTHDR; +#define PEPAOUTSZ 240 #undef E_FILNMLEN #define E_FILNMLEN 18 /* # characters in a file name. */ diff --git a/contrib/binutils/include/coff/powerpc.h b/contrib/binutils/include/coff/powerpc.h index 9552cf9..5af9b72 100644 --- a/contrib/binutils/include/coff/powerpc.h +++ b/contrib/binutils/include/coff/powerpc.h @@ -1,9 +1,23 @@ /* Basic coff information for the PowerPC - * - * Based on coff/rs6000.h, coff/i386.h and others. - * - * Initial release: Kim Knuttila (krk@cygnus.com) - */ + Based on coff/rs6000.h, coff/i386.h and others. + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Initial release: Kim Knuttila (krk@cygnus.com) */ /********************** FILE HEADER **********************/ diff --git a/contrib/binutils/include/coff/sparc.h b/contrib/binutils/include/coff/sparc.h index 82a24f0..c7102ba 100644 --- a/contrib/binutils/include/coff/sparc.h +++ b/contrib/binutils/include/coff/sparc.h @@ -1,4 +1,20 @@ -/*** coff information for Sparc. */ +/* coff information for Sparc. + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This file is an amalgamation of several standard include files that define coff format, such as filehdr.h, aouthdr.h, and so forth. In diff --git a/contrib/binutils/include/coff/ti.h b/contrib/binutils/include/coff/ti.h index 445707c..8fa35e3 100644 --- a/contrib/binutils/include/coff/ti.h +++ b/contrib/binutils/include/coff/ti.h @@ -1,6 +1,23 @@ /* COFF information for TI COFF support. Definitions in this file should be customized in a target-specific file, and then this file included (see - tic54x.h for an example). */ + tic54x.h for an example). + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #ifndef COFF_TI_H #define COFF_TI_H diff --git a/contrib/binutils/include/coff/tic30.h b/contrib/binutils/include/coff/tic30.h index 10b026c..1b5b5fd 100644 --- a/contrib/binutils/include/coff/tic30.h +++ b/contrib/binutils/include/coff/tic30.h @@ -1,4 +1,20 @@ -/*** coff information for Texas Instruments TMS320C3X */ +/* coff information for Texas Instruments TMS320C3X + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /********************** FILE HEADER **********************/ diff --git a/contrib/binutils/include/coff/z8k.h b/contrib/binutils/include/coff/z8k.h index 19b846c..88db5c4 100644 --- a/contrib/binutils/include/coff/z8k.h +++ b/contrib/binutils/include/coff/z8k.h @@ -1,4 +1,20 @@ -/*** coff information for Zilog Z800N */ +/* coff information for Zilog Z800N + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /********************** FILE HEADER **********************/ diff --git a/contrib/binutils/include/demangle.h b/contrib/binutils/include/demangle.h index 7fb6259..2b5a9f5 100644 --- a/contrib/binutils/include/demangle.h +++ b/contrib/binutils/include/demangle.h @@ -1,5 +1,6 @@ /* Defs for interface to demanglers. - Copyright 1992, 1995, 1996 Free Software Foundation, Inc. + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/contrib/binutils/include/dis-asm.h b/contrib/binutils/include/dis-asm.h index 5c9d8d8..c2e7ae3 100644 --- a/contrib/binutils/include/dis-asm.h +++ b/contrib/binutils/include/dis-asm.h @@ -1,4 +1,22 @@ /* Interface between the opcode library and its callers. + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + Written by Cygnus Support, 1993. The opcode library (libopcodes.a) provides instruction decoders for diff --git a/contrib/binutils/include/elf/ChangeLog b/contrib/binutils/include/elf/ChangeLog index 05e73b8..bc82c73 100644 --- a/contrib/binutils/include/elf/ChangeLog +++ b/contrib/binutils/include/elf/ChangeLog @@ -1,3 +1,39 @@ +2001-06-11 Alan Modra + + Merge from mainline. + 2001-05-15 Ralf Baechle + * common.h: Remove definition of EM_MIPS_RS4_BE. The constant was + never in active use and is used otherwise by the ABI. + + 2001-05-07 Thiemo Seufer + * external.h: Fix typo. + * mips.h: Add/Extend many comments with reference to the MIPS ELF64 + spec v. 2.4, available at e.g. + ftp://oss.sgi.com/pub/linux/mips/doc/ABI/ELF64.ps. + (EF_MIPS_UCODE): Define. + (EF_MIPS_OPTIONS_FIRST): Define. + (EF_MIPS_ARCH_ASE): Define. + (EF_MIPS_ARCH_ASE_MDMX): Define. + (EF_MIPS_ARCH_ASE_M16): Define. + (SHF_MIPS_ADDR): Renamed SHF_MIPS_ADDR32. + (SHF_MIPS_STRING): Renamed SHF_MIPS_ADDR64. + (SHF_MIPS_NODUPES): Define. + (ELF64_MIPS_R_SSYM): New MIPS ELF 64 relocation info access macro. + (ELF64_MIPS_R_TYPE3): Likewise. + (ELF64_MIPS_R_TYPE2): Likewise. + (ELF64_MIPS_R_TYPE): Likewise. + (OHW_R10KLDL): Define. + + 2001-04-24 Todd Fries + * sparc.h: Fix typo. + + 2001-03-23 Nick Clifton + * mips.h: Remove extraneous whitespace. + +2001-06-07 Alan Modra + + * Many files: Update copyright notices. + 2001-01-11 Peter Targett * arc.h (E_ARC_MACH_ARC5, E_ARC_MACH_ARC6, E_ARC_MACH_ARC7, @@ -18,14 +54,14 @@ * mips.h (E_MIPS_ARCH_32): New constant. (E_MIPS_MACH_MIPS32, E_MIPS_MACH_MIPS32_4K): Replace the - former with the latter. + former with the latter. * mips.h (E_MIPS_ARCH_5, E_MIPS_ARCH_64): New definitions. * mips.h (E_MIPS_MACH_SB1): New constant. 2000-11-30 Jan Hubicka - + * common.h (EM_X86_64): New macro. * x86-64.h: New file. @@ -85,7 +121,7 @@ 2000-09-13 Anders Norlander - * mips.h (E_MIPS_MACH_4K): New define. + * mips.h (E_MIPS_MACH_4K): New define. 2000-09-05 Alan Modra @@ -102,7 +138,7 @@ 2000-08-14 Jim Wilson - * elf/ia64.h (EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, + * ia64.h (EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, EF_IA_64_NOFUNCDESC_CONS_GP, EF_IA_64_ABSOLUTE): Define. 2000-08-07 Nick Clifton @@ -110,6 +146,11 @@ * ppc.h: Remove spurious CYGNUS LOCAL comments. * v850.h: Likewise. +2000-07-22 Jason Eckhardt + + * i860.h: New file. + (elf_i860_reloc_type): Defined ELF32 i860 relocations. + 2000-07-20 Hans-Peter Nilsson common.h (EM_CRIS): New machine number. @@ -148,7 +189,7 @@ 2000-07-10 Alan Modra - * hppa.h: Add comments to all the relocs. + * hppa.h: Add comments to all the relocs. 2000-06-26 Marek Michalkiewicz @@ -535,7 +576,7 @@ Thu Feb 18 18:58:26 1999 Ian Lance Taylor Patch submitted by: Scott Bambrough - * elf/external.h: struct Elf_External_Versym must be packed on + * external.h: struct Elf_External_Versym must be packed on ARM. Code uses sizeof(Elf_External_Versym) and assumes it is equal to sizeof(char[2]). Reported by Jim Pick @@ -580,6 +621,11 @@ Mon Feb 1 11:33:56 1999 Catherine Moore * mips.h: Add R_MIPS_JALR and adjust R_MIPS_max appropriately. +Mon Nov 30 15:25:58 1998 J"orn Rennecke + + * sh.h (elf_sh_reloc_type): Add R_SH_FIRST_INVALID_RELOC, + R_SH_LAST_INVALID_RELOC, R_SH_SWITCH8 and R_SH_max. + Tue Nov 10 15:12:28 1998 Nick Clifton * common.h (EM_CYGNUS_FR30): Reduce to a 16 bit value. diff --git a/contrib/binutils/include/elf/alpha.h b/contrib/binutils/include/elf/alpha.h index d353434..8bf67bd 100644 --- a/contrib/binutils/include/elf/alpha.h +++ b/contrib/binutils/include/elf/alpha.h @@ -1,5 +1,5 @@ /* ALPHA ELF support for BFD. - Copyright (C) 1996, 98, 2000 Free Software Foundation, Inc. + Copyright 1996, 1998, 2000 Free Software Foundation, Inc. By Eric Youngdale, . No processor supplement available for this platform. diff --git a/contrib/binutils/include/elf/arc.h b/contrib/binutils/include/elf/arc.h index a8d0a74..6e94c29 100644 --- a/contrib/binutils/include/elf/arc.h +++ b/contrib/binutils/include/elf/arc.h @@ -1,5 +1,5 @@ /* ARC ELF support for BFD. - Copyright (C) 1995, 97, 98, 2000 Free Software Foundation, Inc. + Copyright 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. Contributed by Doug Evans, (dje@cygnus.com) This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/arm.h b/contrib/binutils/include/elf/arm.h index 0499251..28e87a8 100644 --- a/contrib/binutils/include/elf/arm.h +++ b/contrib/binutils/include/elf/arm.h @@ -1,5 +1,5 @@ /* ARM ELF support for BFD. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/avr.h b/contrib/binutils/include/elf/avr.h index 09cdf7b..59cf073 100644 --- a/contrib/binutils/include/elf/avr.h +++ b/contrib/binutils/include/elf/avr.h @@ -1,5 +1,5 @@ /* AVR ELF support for BFD. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000 Free Software Foundation, Inc. Contributed by Denis Chertykov This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/common.h b/contrib/binutils/include/elf/common.h index d127b9c..4c50b89 100644 --- a/contrib/binutils/include/elf/common.h +++ b/contrib/binutils/include/elf/common.h @@ -1,5 +1,6 @@ /* ELF support for BFD. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. Written by Fred Fish @ Cygnus Support, from information published @@ -104,7 +105,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define EM_860 7 /* Intel 80860 */ #define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */ #define EM_S370 9 /* IBM System/370 */ -#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */ /* Depreciated */ #define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian (Oct 4 1999 Draft)*/ /* Depreciated */ #define EM_PARISC 15 /* HPPA */ diff --git a/contrib/binutils/include/elf/cris.h b/contrib/binutils/include/elf/cris.h index 957f194..8605375 100644 --- a/contrib/binutils/include/elf/cris.h +++ b/contrib/binutils/include/elf/cris.h @@ -1,5 +1,5 @@ /* CRIS ELF support for BFD. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright 2000, 2001 Free Software Foundation, Inc. Contributed by Axis Communications AB, Lund, Sweden. Written by Hans-Peter Nilsson. diff --git a/contrib/binutils/include/elf/d10v.h b/contrib/binutils/include/elf/d10v.h index 96bfaf2..5bc613b 100644 --- a/contrib/binutils/include/elf/d10v.h +++ b/contrib/binutils/include/elf/d10v.h @@ -1,5 +1,5 @@ /* d10v ELF support for BFD. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright 1998, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/d30v.h b/contrib/binutils/include/elf/d30v.h index 369aa4b..5abb06a 100644 --- a/contrib/binutils/include/elf/d30v.h +++ b/contrib/binutils/include/elf/d30v.h @@ -1,5 +1,5 @@ /* d30v ELF support for BFD. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright 1998, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/dwarf.h b/contrib/binutils/include/elf/dwarf.h index 1e72cd7..f793972 100644 --- a/contrib/binutils/include/elf/dwarf.h +++ b/contrib/binutils/include/elf/dwarf.h @@ -3,7 +3,7 @@ Written by Ron Guilmette (rfg@ncd.com) -Copyright (C) 1992, 1999 Free Software Foundation, Inc. +Copyright 1992, 1993, 1995, 1999 Free Software Foundation, Inc. This file is part of GNU CC. diff --git a/contrib/binutils/include/elf/dwarf2.h b/contrib/binutils/include/elf/dwarf2.h index 1bd4fa6..82586bb 100644 --- a/contrib/binutils/include/elf/dwarf2.h +++ b/contrib/binutils/include/elf/dwarf2.h @@ -1,6 +1,6 @@ /* Declarations and definitions of codes relating to the DWARF symbolic debugging information format. - Copyright (C) 1992, 1993, 1995, 1996, 1999 Free Software Foundation, Inc. + Copyright 1992, 1993, 1995, 1996, 1999 Free Software Foundation, Inc. Written by Gary Funck (gary@intrepid.com) The Ada Joint Program Office (AJPO), Florida State Unviversity and Silicon Graphics Inc. diff --git a/contrib/binutils/include/elf/external.h b/contrib/binutils/include/elf/external.h index 5cab77e..38e6596 100644 --- a/contrib/binutils/include/elf/external.h +++ b/contrib/binutils/include/elf/external.h @@ -1,5 +1,6 @@ /* ELF support for BFD. - Copyright (C) 1991, 92, 93, 95, 97, 98, 1999 Free Software Foundation, Inc. + Copyright 1991, 1992, 1993, 1995, 1997, 1998, 1999, 2001 + Free Software Foundation, Inc. Written by Fred Fish @ Cygnus Support, from information published in "UNIX System V Release 4, Programmers Guide: ANSI C and @@ -25,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This file is part of ELF support for BFD, and contains the portions that describe how ELF is represented externally by the BFD library. I.E. it describes the in-file representation of ELF. It requires - the elf-common.h file which contains the portions that are common to + the elf/common.h file which contains the portions that are common to both the internal and external representations. */ /* The 64-bit stuff is kind of random. Perhaps someone will publish a diff --git a/contrib/binutils/include/elf/fr30.h b/contrib/binutils/include/elf/fr30.h index 54c1ae6..12a450d 100644 --- a/contrib/binutils/include/elf/fr30.h +++ b/contrib/binutils/include/elf/fr30.h @@ -1,5 +1,5 @@ /* FR30 ELF support for BFD. - Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/hppa.h b/contrib/binutils/include/elf/hppa.h index e9ec03a..45e0b9f 100644 --- a/contrib/binutils/include/elf/hppa.h +++ b/contrib/binutils/include/elf/hppa.h @@ -1,5 +1,6 @@ /* HPPA ELF support for BFD. - Copyright (C) 1993, 94, 95, 99, 2000 Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1998, 1999, 2000 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/i370.h b/contrib/binutils/include/elf/i370.h index b4e21aa..b6f4785 100644 --- a/contrib/binutils/include/elf/i370.h +++ b/contrib/binutils/include/elf/i370.h @@ -1,5 +1,5 @@ /* i370 ELF support for BFD. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/i386.h b/contrib/binutils/include/elf/i386.h index c91f4be..4a15efc 100644 --- a/contrib/binutils/include/elf/i386.h +++ b/contrib/binutils/include/elf/i386.h @@ -1,5 +1,5 @@ /* ix86 ELF support for BFD. - Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/i860.h b/contrib/binutils/include/elf/i860.h index 08b2ff5..de34aeb 100644 --- a/contrib/binutils/include/elf/i860.h +++ b/contrib/binutils/include/elf/i860.h @@ -1,5 +1,5 @@ /* i860 ELF support for BFD. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright 2000 Free Software Foundation, Inc. Contributed by Jason Eckhardt . diff --git a/contrib/binutils/include/elf/i960.h b/contrib/binutils/include/elf/i960.h index cbf67d7..253e438 100644 --- a/contrib/binutils/include/elf/i960.h +++ b/contrib/binutils/include/elf/i960.h @@ -1,5 +1,5 @@ /* Intel 960 ELF support for BFD. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/ia64.h b/contrib/binutils/include/elf/ia64.h index 3b18288..edfc7c5 100644 --- a/contrib/binutils/include/elf/ia64.h +++ b/contrib/binutils/include/elf/ia64.h @@ -1,5 +1,5 @@ /* IA-64 ELF support for BFD. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by David Mosberger-Tang This file is part of BFD, the Binary File Descriptor library. @@ -47,6 +47,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ELF_STRING_ia64_pltoff ".IA_64.pltoff" #define ELF_STRING_ia64_unwind ".IA_64.unwind" #define ELF_STRING_ia64_unwind_info ".IA_64.unwind_info" +#define ELF_STRING_ia64_unwind_once ".gnu.linkonce.ia64unw." +#define ELF_STRING_ia64_unwind_info_once ".gnu.linkonce.ia64unwi." /* Bits in the sh_flags field of Elf64_Shdr: */ diff --git a/contrib/binutils/include/elf/internal.h b/contrib/binutils/include/elf/internal.h index 6ca316b..eb79917 100644 --- a/contrib/binutils/include/elf/internal.h +++ b/contrib/binutils/include/elf/internal.h @@ -1,5 +1,5 @@ /* ELF support for BFD. - Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000 Free Software Foundation, Inc. Written by Fred Fish @ Cygnus Support, from information published diff --git a/contrib/binutils/include/elf/m32r.h b/contrib/binutils/include/elf/m32r.h index 9b6c4e9..2cb308d 100644 --- a/contrib/binutils/include/elf/m32r.h +++ b/contrib/binutils/include/elf/m32r.h @@ -1,5 +1,5 @@ /* M32R ELF support for BFD. - Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/m68hc11.h b/contrib/binutils/include/elf/m68hc11.h index 30e0556..0f9546d 100644 --- a/contrib/binutils/include/elf/m68hc11.h +++ b/contrib/binutils/include/elf/m68hc11.h @@ -1,5 +1,5 @@ /* m68hc11 & m68hc12 ELF support for BFD. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/m68k.h b/contrib/binutils/include/elf/m68k.h index a6aab10..03bf465 100644 --- a/contrib/binutils/include/elf/m68k.h +++ b/contrib/binutils/include/elf/m68k.h @@ -1,5 +1,5 @@ /* MC68k ELF support for BFD. - Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/mcore.h b/contrib/binutils/include/elf/mcore.h index f97a682..387a57d 100644 --- a/contrib/binutils/include/elf/mcore.h +++ b/contrib/binutils/include/elf/mcore.h @@ -1,5 +1,5 @@ /* Motorola MCore support for BFD. - Copyright (C) 1995, 99, 2000 Free Software Foundation, Inc. + Copyright 1995, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/mips.h b/contrib/binutils/include/elf/mips.h index 4446512..6ad8d5b 100644 --- a/contrib/binutils/include/elf/mips.h +++ b/contrib/binutils/include/elf/mips.h @@ -1,5 +1,5 @@ /* MIPS ELF support for BFD. - Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. By Ian Lance Taylor, Cygnus Support, , from @@ -34,16 +34,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ START_RELOC_NUMBERS (elf_mips_reloc_type) RELOC_NUMBER (R_MIPS_NONE, 0) RELOC_NUMBER (R_MIPS_16, 1) - RELOC_NUMBER (R_MIPS_32, 2) - RELOC_NUMBER (R_MIPS_REL32, 3) + RELOC_NUMBER (R_MIPS_32, 2) /* In Elf 64: alias R_MIPS_ADD */ + RELOC_NUMBER (R_MIPS_REL32, 3) /* In Elf 64: alias R_MIPS_REL */ RELOC_NUMBER (R_MIPS_26, 4) RELOC_NUMBER (R_MIPS_HI16, 5) RELOC_NUMBER (R_MIPS_LO16, 6) - RELOC_NUMBER (R_MIPS_GPREL16, 7) + RELOC_NUMBER (R_MIPS_GPREL16, 7) /* In Elf 64: alias R_MIPS_GPREL */ RELOC_NUMBER (R_MIPS_LITERAL, 8) - RELOC_NUMBER (R_MIPS_GOT16, 9) + RELOC_NUMBER (R_MIPS_GOT16, 9) /* In Elf 64: alias R_MIPS_GOT */ RELOC_NUMBER (R_MIPS_PC16, 10) - RELOC_NUMBER (R_MIPS_CALL16, 11) + RELOC_NUMBER (R_MIPS_CALL16, 11) /* In Elf 64: alias R_MIPS_CALL */ RELOC_NUMBER (R_MIPS_GPREL32, 12) /* The remaining relocs are defined on Irix, although they are not in the MIPS ELF ABI. */ @@ -99,10 +99,25 @@ END_RELOC_NUMBERS (R_MIPS_maxext) position independent code. */ #define EF_MIPS_CPIC 0x00000004 +/* Code in file uses UCODE (obsolete) */ +#define EF_MIPS_UCODE 0x00000010 + /* Code in file uses new ABI (-n32 on Irix 6). */ #define EF_MIPS_ABI2 0x00000020 -/* Indicates code compiled for a 64-bit machine in 32-bit mode. +/* Process the .MIPS.options section first by ld */ +#define EF_MIPS_OPTIONS_FIRST 0x00000080 + +/* Architectural Extensions used by this file */ +#define EF_MIPS_ARCH_ASE 0x0f000000 + +/* Use MDMX multimedia extensions */ +#define EF_MIPS_ARCH_ASE_MDMX 0x08000000 + +/* Use MIPS-16 ISA extensions */ +#define EF_MIPS_ARCH_ASE_M16 0x04000000 + +/* Indicates code compiled for a 64-bit machine in 32-bit mode. (regs are 32-bits wide.) */ #define EF_MIPS_32BITMODE 0x00000100 @@ -265,19 +280,19 @@ END_RELOC_NUMBERS (R_MIPS_maxext) /* ??? */ #define SHT_MIPS_RFDESC 0x7000001a -/* ??? */ +/* Delta C++: symbol table */ #define SHT_MIPS_DELTASYM 0x7000001b -/* ??? */ +/* Delta C++: instance table */ #define SHT_MIPS_DELTAINST 0x7000001c -/* ??? */ +/* Delta C++: class table */ #define SHT_MIPS_DELTACLASS 0x7000001d /* DWARF debugging section. */ #define SHT_MIPS_DWARF 0x7000001e -/* ??? */ +/* Delta C++: declarations */ #define SHT_MIPS_DELTADECL 0x7000001f /* List of libraries the binary depends on. Includes a time stamp, version @@ -290,25 +305,25 @@ END_RELOC_NUMBERS (R_MIPS_maxext) /* ??? */ #define SHT_MIPS_TRANSLATE 0x70000022 -/* ??? */ +/* Special pixie sections */ #define SHT_MIPS_PIXIE 0x70000023 -/* ??? */ +/* Address translation table (for debug info) */ #define SHT_MIPS_XLATE 0x70000024 -/* ??? */ +/* SGI internal address translation table (for debug info) */ #define SHT_MIPS_XLATE_DEBUG 0x70000025 -/* ??? */ +/* Intermediate code */ #define SHT_MIPS_WHIRL 0x70000026 -/* ??? */ +/* C++ exception handling region info */ #define SHT_MIPS_EH_REGION 0x70000027 -/* ??? */ +/* Obsolete address translation table (for debug info) */ #define SHT_MIPS_XLATE_OLD 0x70000028 -/* ??? */ +/* Runtime procedure descriptor table exception information (ucode) ??? */ #define SHT_MIPS_PDR_EXCEPTION 0x70000029 @@ -446,11 +461,12 @@ extern void bfd_mips_elf32_swap_reginfo_out /* This section should be merged. */ #define SHF_MIPS_MERGE 0x20000000 -/* This section contains 32 bit addresses. */ -#define SHF_MIPS_ADDR32 0x40000000 +/* This section contains address data of size implied by section + element size. */ +#define SHF_MIPS_ADDR 0x40000000 -/* This section contains 64 bit addresses. */ -#define SHF_MIPS_ADDR64 0x80000000 +/* This section contains string data. */ +#define SHF_MIPS_STRING 0x80000000 /* This section may not be stripped. */ #define SHF_MIPS_NOSTRIP 0x08000000 @@ -460,6 +476,10 @@ extern void bfd_mips_elf32_swap_reginfo_out /* Linker should generate implicit weak names for this section. */ #define SHF_MIPS_NAMES 0x02000000 + +/* Section contais text/data which may be replicated in other sections. + Linker should retain only one copy. */ +#define SHF_MIPS_NODUPES 0x01000000 /* Processor specific program header types. */ @@ -469,7 +489,7 @@ extern void bfd_mips_elf32_swap_reginfo_out /* Runtime procedure table. */ #define PT_MIPS_RTPROC 0x70000001 -/* Options (for what ???). */ +/* .MIPS.options section. */ #define PT_MIPS_OPTIONS 0x70000002 /* Processor specific dynamic array tags. */ @@ -561,19 +581,19 @@ extern void bfd_mips_elf32_swap_reginfo_out /* Pixie information (???). */ #define DT_MIPS_PIXIE_INIT 0x70000023 -/* ??? */ +/* Address of .MIPS.symlib */ #define DT_MIPS_SYMBOL_LIB 0x70000024 -/* ??? */ +/* The GOT index of the first PTE for a segment */ #define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 -/* ??? */ +/* The GOT index of the first PTE for a local symbol */ #define DT_MIPS_LOCAL_GOTIDX 0x70000026 -/* ??? */ +/* The GOT index of the first PTE for a hidden symbol */ #define DT_MIPS_HIDDEN_GOTIDX 0x70000027 -/* ??? */ +/* The GOT index of the first PTE for a protected symbol */ #define DT_MIPS_PROTECTED_GOTIDX 0x70000028 /* Address of `.MIPS.options'. */ @@ -615,20 +635,44 @@ extern void bfd_mips_elf32_swap_reginfo_out #define RHF_NOTPOT 0x00000002 /* Ignore LD_LIBRARY_PATH. */ -#define RHS_NO_LIBRARY_REPLACEMENT \ - 0x00000004 +#define RHS_NO_LIBRARY_REPLACEMENT 0x00000004 -#define RHF_NO_MOVE 0x00000008 -#define RHF_SGI_ONLY 0x00000010 +/* DSO address may not be relocated. */ +#define RHF_NO_MOVE 0x00000008 + +/* SGI specific features. */ +#define RHF_SGI_ONLY 0x00000010 + +/* Guarantee that .init will finish executing before any non-init + code in DSO is called. */ #define RHF_GUARANTEE_INIT 0x00000020 + +/* Contains Delta C++ code. */ #define RHF_DELTA_C_PLUS_PLUS 0x00000040 + +/* Guarantee that .init will start executing before any non-init + code in DSO is called. */ #define RHF_GUARANTEE_START_INIT 0x00000080 + +/* Generated by pixie. */ #define RHF_PIXIE 0x00000100 + +/* Delay-load DSO by default. */ #define RHF_DEFAULT_DELAY_LOAD 0x00000200 + +/* Object may be requickstarted */ #define RHF_REQUICKSTART 0x00000400 + +/* Object has been requickstarted */ #define RHF_REQUICKSTARTED 0x00000800 + +/* Generated by cord. */ #define RHF_CORD 0x00001000 + +/* Object contains no unresolved undef symbols. */ #define RHF_NO_UNRES_UNDEF 0x00002000 + +/* Symbol table is in a safe order. */ #define RHF_RLD_ORDER_SAFE 0x00004000 /* Special values for the st_other field in the symbol table. These @@ -722,6 +766,12 @@ typedef struct bfd_signed_vma r_addend; } Elf64_Mips_Internal_Rela; +/* MIPS ELF 64 relocation info access macros. */ +#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff) +#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff) +#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff) +#define ELF64_MIPS_R_TYPE(i) ((i) & 0xff) + /* Values found in the r_ssym field of a relocation entry. */ /* No relocation. */ @@ -878,7 +928,8 @@ extern void bfd_mips_elf64_swap_reginfo_out #define OEX_FPU_MAX 0x1f00 /* FPEs which may be enabled. */ #define OEX_PAGE0 0x10000 /* Page zero must be mapped. */ #define OEX_SMM 0x20000 /* Force sequential memory mode. */ -#define OEX_FPDBUG 0x40000 /* Force floating-point debug mode. */ +#define OEX_FPDBUG 0x40000 /* Force precise floating-point + exceptions (debug mode). */ #define OEX_DISMISS 0x80000 /* Dismiss invalid address faults. */ /* Masks of the FP exceptions for OEX_FPU_MIN and OEX_FPU_MAX. */ @@ -894,10 +945,13 @@ extern void bfd_mips_elf64_swap_reginfo_out #define OPAD_SYMBOL 0x04 /* Masks for the info word of an ODK_HWPATCH descriptor. */ -#define OHW_R4KEOP 0x01 /* R4000 end-of-page patch. */ -#define OHW_R8KPFETCH 0x02 /* May need R8000 prefetch patch. */ -#define OHW_R5KEOP 0x04 /* R5000 end-of-page patch. */ -#define OHW_R5KCVTL 0x08 /* R5000 cvt.[ds].l bug (clean == 1). */ +#define OHW_R4KEOP 0x00000001 /* R4000 end-of-page patch. */ +#define OHW_R8KPFETCH 0x00000002 /* May need R8000 prefetch patch. */ +#define OHW_R5KEOP 0x00000004 /* R5000 end-of-page patch. */ +#define OHW_R5KCVTL 0x00000008 /* R5000 cvt.[ds].l bug + (clean == 1). */ +#define OHW_R10KLDL 0x00000010 /* Needs R10K misaligned + load patch. */ /* Masks for the info word of an ODK_IDENT/ODK_GP_GROUP descriptor. */ #define OGP_GROUP 0x0000ffff /* GP group number. */ diff --git a/contrib/binutils/include/elf/mn10200.h b/contrib/binutils/include/elf/mn10200.h index 1a14ee7..1dfade5 100644 --- a/contrib/binutils/include/elf/mn10200.h +++ b/contrib/binutils/include/elf/mn10200.h @@ -1,5 +1,5 @@ /* MN10200 ELF support for BFD. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright 1998, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/mn10300.h b/contrib/binutils/include/elf/mn10300.h index 74f2da8..e10be90 100644 --- a/contrib/binutils/include/elf/mn10300.h +++ b/contrib/binutils/include/elf/mn10300.h @@ -1,5 +1,5 @@ /* MN10300 ELF support for BFD. - Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/pj.h b/contrib/binutils/include/elf/pj.h index 7690ea6..586fd3a 100644 --- a/contrib/binutils/include/elf/pj.h +++ b/contrib/binutils/include/elf/pj.h @@ -1,5 +1,5 @@ /* picoJava ELF support for BFD. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/ppc.h b/contrib/binutils/include/elf/ppc.h index f53bacd..426961e 100644 --- a/contrib/binutils/include/elf/ppc.h +++ b/contrib/binutils/include/elf/ppc.h @@ -1,5 +1,5 @@ /* PPC ELF support for BFD. - Copyright (C) 1995, 96, 98, 2000 Free Software Foundation, Inc. + Copyright 1995, 1996, 1998, 2000 Free Software Foundation, Inc. By Michael Meissner, Cygnus Support, , from information in the System V Application Binary Interface, PowerPC Processor Supplement diff --git a/contrib/binutils/include/elf/reloc-macros.h b/contrib/binutils/include/elf/reloc-macros.h index df5e0e3..9ad346c 100644 --- a/contrib/binutils/include/elf/reloc-macros.h +++ b/contrib/binutils/include/elf/reloc-macros.h @@ -1,5 +1,5 @@ /* Generic relocation support for BFD. - Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/sh.h b/contrib/binutils/include/elf/sh.h index 6a1e561..700ca3e 100644 --- a/contrib/binutils/include/elf/sh.h +++ b/contrib/binutils/include/elf/sh.h @@ -1,5 +1,5 @@ /* SH ELF support for BFD. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright 1998, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/elf/sparc.h b/contrib/binutils/include/elf/sparc.h index f4a199e..7c780f7 100644 --- a/contrib/binutils/include/elf/sparc.h +++ b/contrib/binutils/include/elf/sparc.h @@ -1,5 +1,5 @@ /* SPARC ELF support for BFD. - Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. By Doug Evans, Cygnus Support, . This file is part of BFD, the Binary File Descriptor library. @@ -86,7 +86,7 @@ START_RELOC_NUMBERS (elf_sparc_reloc_type) RELOC_NUMBER (R_SPARC_UA32, 23) /* ??? These 6 relocs are new but not currently used. For binary - compatility in the sparc64-elf toolchain, we leave them out. + compatibility in the sparc64-elf toolchain, we leave them out. A non-binary upward compatible change is expected for sparc64-elf. */ #ifndef SPARC64_OLD_RELOCS /* ??? New relocs on the UltraSPARC. Not sure what they're for yet. */ diff --git a/contrib/binutils/include/elf/v850.h b/contrib/binutils/include/elf/v850.h index 7b22340..62b9541 100644 --- a/contrib/binutils/include/elf/v850.h +++ b/contrib/binutils/include/elf/v850.h @@ -1,5 +1,5 @@ /* V850 ELF support for BFD. - Copyright (C) 1997, 98, 2000 Free Software Foundation, Inc. + Copyright 1997, 1998, 2000 Free Software Foundation, Inc. Created by Michael Meissner, Cygnus Support This file is part of BFD, the Binary File Descriptor library. diff --git a/contrib/binutils/include/floatformat.h b/contrib/binutils/include/floatformat.h index e4d1d15..4335401 100644 --- a/contrib/binutils/include/floatformat.h +++ b/contrib/binutils/include/floatformat.h @@ -1,5 +1,5 @@ /* IEEE floating point support declarations, for GDB, the GNU Debugger. - Copyright (C) 1991, 2000 Free Software Foundation, Inc. + Copyright 1991, 1994, 1995, 1997, 2000 Free Software Foundation, Inc. This file is part of GDB. diff --git a/contrib/binutils/include/fnmatch.h b/contrib/binutils/include/fnmatch.h index d5eb700..37d23ee 100644 --- a/contrib/binutils/include/fnmatch.h +++ b/contrib/binutils/include/fnmatch.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. diff --git a/contrib/binutils/include/getopt.h b/contrib/binutils/include/getopt.h index bf65c6e..cb5feba 100644 --- a/contrib/binutils/include/getopt.h +++ b/contrib/binutils/include/getopt.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997 + Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. diff --git a/contrib/binutils/include/ieee.h b/contrib/binutils/include/ieee.h index 5ade39d..5abc32b 100644 --- a/contrib/binutils/include/ieee.h +++ b/contrib/binutils/include/ieee.h @@ -1,138 +1,164 @@ /* IEEE Standard 695-1980 "Universal Format for Object Modules" header file + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + Contributed by Cygnus Support. */ #define N_W_VARIABLES 8 #define Module_Beginning 0xe0 -typedef struct ieee_module { - char *processor; - char *module_name; -} ieee_module_begin_type; +typedef struct ieee_module + { + char *processor; + char *module_name; + } +ieee_module_begin_type; #define Address_Descriptor 0xec -typedef struct ieee_address { -bfd_vma number_of_bits_mau; - bfd_vma number_of_maus_in_address; +typedef struct ieee_address + { + bfd_vma number_of_bits_mau; + bfd_vma number_of_maus_in_address; - unsigned char byte_order; + unsigned char byte_order; #define IEEE_LITTLE 0xcc #define IEEE_BIG 0xcd -} ieee_address_descriptor_type; - -typedef union ieee_w_variable { - file_ptr offset[N_W_VARIABLES]; - struct { - file_ptr extension_record; - file_ptr environmental_record; - file_ptr section_part; - file_ptr external_part; - file_ptr debug_information_part; - file_ptr data_part; - file_ptr trailer_part; - file_ptr me_record; - } r; -} ieee_w_variable_type; - - - - + } +ieee_address_descriptor_type; + +typedef union ieee_w_variable + { + file_ptr offset[N_W_VARIABLES]; + + struct + { + file_ptr extension_record; + file_ptr environmental_record; + file_ptr section_part; + file_ptr external_part; + file_ptr debug_information_part; + file_ptr data_part; + file_ptr trailer_part; + file_ptr me_record; + } + r; + } +ieee_w_variable_type; typedef enum ieee_record -{ - ieee_number_start_enum = 0x00, - ieee_number_end_enum=0x7f, - ieee_number_repeat_start_enum = 0x80, - ieee_number_repeat_end_enum = 0x88, - ieee_number_repeat_4_enum = 0x84, - ieee_number_repeat_3_enum = 0x83, - ieee_number_repeat_2_enum = 0x82, - ieee_number_repeat_1_enum = 0x81, - ieee_module_beginning_enum = 0xe0, - ieee_module_end_enum = 0xe1, - ieee_extension_length_1_enum = 0xde, - ieee_extension_length_2_enum = 0xdf, - ieee_section_type_enum = 0xe6, - ieee_section_alignment_enum = 0xe7, - ieee_external_symbol_enum = 0xe8, - ieee_comma = 0x90, - ieee_external_reference_enum = 0xe9, - ieee_set_current_section_enum = 0xe5, - ieee_address_descriptor_enum = 0xec, - ieee_load_constant_bytes_enum = 0xed, - ieee_load_with_relocation_enum = 0xe4, - - ieee_variable_A_enum = 0xc1, - ieee_variable_B_enum = 0xc2, - ieee_variable_C_enum = 0xc3, - ieee_variable_D_enum = 0xc4, - ieee_variable_E_enum = 0xc5, - ieee_variable_F_enum = 0xc6, - ieee_variable_G_enum = 0xc7, - ieee_variable_H_enum = 0xc8, - ieee_variable_I_enum = 0xc9, - ieee_variable_J_enum = 0xca, - ieee_variable_K_enum = 0xcb, - ieee_variable_L_enum = 0xcc, - ieee_variable_M_enum = 0xcd, - ieee_variable_N_enum = 0xce, - ieee_variable_O_enum = 0xcf, - ieee_variable_P_enum = 0xd0, - ieee_variable_Q_enum = 0xd1, - ieee_variable_R_enum = 0xd2, - ieee_variable_S_enum = 0xd3, - ieee_variable_T_enum = 0xd4, - ieee_variable_U_enum = 0xd5, - ieee_variable_V_enum = 0xd6, - ieee_variable_W_enum = 0xd7, - ieee_variable_X_enum = 0xd8, - ieee_variable_Y_enum = 0xd9, - ieee_variable_Z_enum = 0xda, - ieee_function_plus_enum = 0xa5, - ieee_function_minus_enum = 0xa6, - ieee_function_signed_open_b_enum = 0xba, - ieee_function_signed_close_b_enum = 0xbb, - - ieee_function_unsigned_open_b_enum = 0xbc, - ieee_function_unsigned_close_b_enum = 0xbd, - - ieee_function_either_open_b_enum = 0xbe, - ieee_function_either_close_b_enum = 0xbf, - ieee_record_seperator_enum = 0xdb, - - ieee_e2_first_byte_enum = 0xe2, - ieee_section_size_enum = 0xe2d3, - ieee_physical_region_size_enum = 0xe2c1, - ieee_region_base_address_enum = 0xe2c2, - ieee_mau_size_enum = 0xe2c6, - ieee_m_value_enum = 0xe2cd, - ieee_section_base_address_enum = 0xe2cc, - ieee_asn_record_enum = 0xe2ce, - ieee_section_offset_enum = 0xe2d2, - ieee_value_starting_address_enum = 0xe2c7, - ieee_assign_value_to_variable_enum = 0xe2d7, - ieee_set_current_pc_enum = 0xe2d0, - ieee_value_record_enum = 0xe2c9, - ieee_nn_record = 0xf0, - ieee_at_record_enum = 0xf1, - ieee_ty_record_enum = 0xf2, - ieee_attribute_record_enum = 0xf1c9, - ieee_atn_record_enum = 0xf1ce, - ieee_external_reference_info_record_enum = 0xf1d8, - ieee_weak_external_reference_enum= 0xf4, - ieee_repeat_data_enum = 0xf7, - ieee_bb_record_enum = 0xf8, - ieee_be_record_enum = 0xf9 -} ieee_record_enum_type; - - -typedef struct ieee_section { - unsigned int section_index; - unsigned int section_type; - char *section_name; - unsigned int parent_section_index; - unsigned int sibling_section_index; - unsigned int context_index; -} ieee_section_type; + { + ieee_number_start_enum = 0x00, + ieee_number_end_enum=0x7f, + ieee_number_repeat_start_enum = 0x80, + ieee_number_repeat_end_enum = 0x88, + ieee_number_repeat_4_enum = 0x84, + ieee_number_repeat_3_enum = 0x83, + ieee_number_repeat_2_enum = 0x82, + ieee_number_repeat_1_enum = 0x81, + ieee_module_beginning_enum = 0xe0, + ieee_module_end_enum = 0xe1, + ieee_extension_length_1_enum = 0xde, + ieee_extension_length_2_enum = 0xdf, + ieee_section_type_enum = 0xe6, + ieee_section_alignment_enum = 0xe7, + ieee_external_symbol_enum = 0xe8, + ieee_comma = 0x90, + ieee_external_reference_enum = 0xe9, + ieee_set_current_section_enum = 0xe5, + ieee_address_descriptor_enum = 0xec, + ieee_load_constant_bytes_enum = 0xed, + ieee_load_with_relocation_enum = 0xe4, + + ieee_variable_A_enum = 0xc1, + ieee_variable_B_enum = 0xc2, + ieee_variable_C_enum = 0xc3, + ieee_variable_D_enum = 0xc4, + ieee_variable_E_enum = 0xc5, + ieee_variable_F_enum = 0xc6, + ieee_variable_G_enum = 0xc7, + ieee_variable_H_enum = 0xc8, + ieee_variable_I_enum = 0xc9, + ieee_variable_J_enum = 0xca, + ieee_variable_K_enum = 0xcb, + ieee_variable_L_enum = 0xcc, + ieee_variable_M_enum = 0xcd, + ieee_variable_N_enum = 0xce, + ieee_variable_O_enum = 0xcf, + ieee_variable_P_enum = 0xd0, + ieee_variable_Q_enum = 0xd1, + ieee_variable_R_enum = 0xd2, + ieee_variable_S_enum = 0xd3, + ieee_variable_T_enum = 0xd4, + ieee_variable_U_enum = 0xd5, + ieee_variable_V_enum = 0xd6, + ieee_variable_W_enum = 0xd7, + ieee_variable_X_enum = 0xd8, + ieee_variable_Y_enum = 0xd9, + ieee_variable_Z_enum = 0xda, + ieee_function_plus_enum = 0xa5, + ieee_function_minus_enum = 0xa6, + ieee_function_signed_open_b_enum = 0xba, + ieee_function_signed_close_b_enum = 0xbb, + + ieee_function_unsigned_open_b_enum = 0xbc, + ieee_function_unsigned_close_b_enum = 0xbd, + + ieee_function_either_open_b_enum = 0xbe, + ieee_function_either_close_b_enum = 0xbf, + ieee_record_seperator_enum = 0xdb, + + ieee_e2_first_byte_enum = 0xe2, + ieee_section_size_enum = 0xe2d3, + ieee_physical_region_size_enum = 0xe2c1, + ieee_region_base_address_enum = 0xe2c2, + ieee_mau_size_enum = 0xe2c6, + ieee_m_value_enum = 0xe2cd, + ieee_section_base_address_enum = 0xe2cc, + ieee_asn_record_enum = 0xe2ce, + ieee_section_offset_enum = 0xe2d2, + ieee_value_starting_address_enum = 0xe2c7, + ieee_assign_value_to_variable_enum = 0xe2d7, + ieee_set_current_pc_enum = 0xe2d0, + ieee_value_record_enum = 0xe2c9, + ieee_nn_record = 0xf0, + ieee_at_record_enum = 0xf1, + ieee_ty_record_enum = 0xf2, + ieee_attribute_record_enum = 0xf1c9, + ieee_atn_record_enum = 0xf1ce, + ieee_external_reference_info_record_enum = 0xf1d8, + ieee_weak_external_reference_enum= 0xf4, + ieee_repeat_data_enum = 0xf7, + ieee_bb_record_enum = 0xf8, + ieee_be_record_enum = 0xf9 + } +ieee_record_enum_type; + +typedef struct ieee_section + { + unsigned int section_index; + unsigned int section_type; + char * section_name; + unsigned int parent_section_index; + unsigned int sibling_section_index; + unsigned int context_index; + } +ieee_section_type; + #define IEEE_REFERENCE_BASE 11 #define IEEE_PUBLIC_BASE 32 #define IEEE_SECTION_NUMBER_BASE 1 diff --git a/contrib/binutils/include/libiberty.h b/contrib/binutils/include/libiberty.h index 64d072b..1bc2b7d4 100644 --- a/contrib/binutils/include/libiberty.h +++ b/contrib/binutils/include/libiberty.h @@ -1,4 +1,29 @@ /* Function declarations for libiberty. + + Copyright 2001 Free Software Foundation, Inc. + + Note - certain prototypes declared in this header file are for + functions whoes implementation copyright does not belong to the + FSF. Those prototypes are present in this file for reference + purposes only and their presence in this file should not construed + as an indication of ownership by the FSF of the implementation of + those functions in any way or form whatsoever. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + Written by Cygnus Support, 1994. The libiberty library provides a number of functions which are diff --git a/contrib/binutils/include/md5.h b/contrib/binutils/include/md5.h index 0840b31..ad51f19 100644 --- a/contrib/binutils/include/md5.h +++ b/contrib/binutils/include/md5.h @@ -1,6 +1,6 @@ /* md5.h - Declaration of functions and data types used for MD5 sum computing library functions. - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright 1995, 1996, 2000 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. diff --git a/contrib/binutils/include/obstack.h b/contrib/binutils/include/obstack.h index 314a27a..d86d9f2 100644 --- a/contrib/binutils/include/obstack.h +++ b/contrib/binutils/include/obstack.h @@ -1,5 +1,6 @@ /* obstack.h - object stack macros - Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998 + Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, + 1999, 2000 Free Software Foundation, Inc. diff --git a/contrib/binutils/include/opcode/ChangeLog b/contrib/binutils/include/opcode/ChangeLog index 6a5da3e..9e40d0c 100644 --- a/contrib/binutils/include/opcode/ChangeLog +++ b/contrib/binutils/include/opcode/ChangeLog @@ -1,3 +1,38 @@ +2001-06-11 Alan Modra + + Merge from mainline. + 2001-05-23 Thiemo Seufer + * mips.h (CPU_R12000): Define. + + 2001-05-15 Thiemo Seufer + * mips.h (INSN_ISA_MASK): Define. + + 2001-03-21 Kazu Hirata + * h8300.h: Fix formatting. + + 2001-02-28 Igor Shevlyakov + * m68k.h: new defines for Coldfire V4. Update mcf to know + about mcf5407. + + 2001-02-10 Nick Clifton + * mips.h: Remove extraneous whitespace. Formating change to allow + for future contribution. + +2001-06-07 Alan Modra + + * Many files: Update copyright notices. + +2001-05-12 Alan Modra + + * i386.h (i386_optab): Second operand of cvtps2dq is an xmm reg, + not an mmx reg. Swap xmm/mmx regs on both movdq2q and movq2dq, + and use InvMem as these insns must have register operands. + +2001-05-04 Alan Modra + + * i386.h (i386_optab): Move InvMem to first operand of pmovmskb + and pextrw to swap reg/rm assignments. + 2001-03-24 Alan Modra * i386.h (i386_optab): Correct entry for "movntdq". Add "punpcklqdq". @@ -158,6 +193,10 @@ Sat Jan 13 09:56:32 MET 2001 Jan Hubicka * i386.h: Swap the Intel syntax "movsx"/"movzx" due to the IgnoreSize change. +2000-08-08 Jason Eckhardt + + * i860.h: Small formatting adjustments. + 2000-07-29 Marek Michalkiewicz * avr.h (AVR_UNDEF_P, AVR_SKIP_P, AVR_DISP0_P): New macros. @@ -168,6 +207,29 @@ Sat Jan 13 09:56:32 MET 2001 Jan Hubicka * cgen.h (cgen_hw_lookup_by_num): Second parameter is unsigned. +2000-07-22 Jason Eckhardt + + * i860.h (btne, bte, bla): Changed these opcodes + to use sbroff ('r') instead of split16 ('s'). + (J, K, L, M): New operand types for 16-bit aligned fields. + (ld.x, {p}fld.x, fst.x, pst.d): Changed these opcodes to + use I, J, K, L, M instead of just I. + (T, U): New operand types for split 16-bit aligned fields. + (st.x): Changed these opcodes to use S, T, U instead of just S. + (andh, andnoth, orh, xorh): Deleted 3-register forms as they do not + exist on the i860. + (pfgt.sd, pfle.sd): Deleted these as they do not exist on the i860. + (pfeq.ss, pfeq.dd): New opcodes. + (st.s): Fixed incorrect mask bits. + (fmlow): Fixed incorrect mask bits. + (fzchkl, pfzchkl): Fixed incorrect mask bits. + (faddz, pfaddz): Fixed incorrect mask bits. + (form, pform): Fixed incorrect mask bits. + (pfld.l): Fixed incorrect mask bits. + (fst.q): Fixed incorrect mask bits. + (all floating point opcodes): Fixed incorrect mask bits for + handling of dual bit. + 2000-07-20 Hans-Peter Nilsson cris.h: New file. @@ -305,6 +367,11 @@ Fri Apr 21 13:20:53 2000 Richard Henderson * i370.h: New file. +2000-02-22 Chandra Chavva + + * d30v.h (FLAG_NOT_WITH_ADDSUBppp): Redefined as operation + cannot be combined in parallel with ADD/SUBppp. + 2000-02-22 Andrew Haley * mips.h: (OPCODE_IS_MEMBER): Add comment. @@ -1824,8 +1891,8 @@ Mon Jan 23 16:45:43 1995 Ken Raeburn Sat Jan 21 17:50:38 1995 Pat Rankin (rankin@eql.caltech.edu) - * ../include/opcode/vax.h (struct vot_wot, field `args'): make - it pointer to const char; + * vax.h (struct vot_wot, field `args'): Make it pointer to const + char. (struct vot, field `name'): ditto. Thu Jan 19 14:47:53 1995 Ken Raeburn @@ -2146,6 +2213,15 @@ Fri Jun 11 18:38:44 1993 Ken Raeburn (raeburn@cygnus.com) * hppa.h: Update "free list" of letters and update comments describing each letter's function. +Thu Jul 8 09:05:26 1993 Doug Evans (dje@canuck.cygnus.com) + + * h8300.h: Lots of little fixes for the h8/300h. + +Tue Jun 8 12:16:03 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) + + Support for H8/300-H + * h8300.h: Lots of new opcodes. + Fri Jun 4 15:41:37 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) * h8300.h: checkpoint, includes H8/300-H opcodes. @@ -2417,6 +2493,10 @@ Sun Dec 22 12:18:18 1991 Michael Tiemann (tiemann at cygnus.com) * sparc.h (nop): Add RD_GO to `lose' so that only %g0 in dest is disassembled as a nop. +Wed Dec 18 17:19:44 1991 Stu Grossman (grossman at cygnus.com) + + * m68k.h, sparc.h: ANSIfy enums. + Tue Dec 10 00:22:20 1991 K. Richard Pixley (rich at rtl.cygnus.com) * sparc.h: fix a typo. @@ -2425,7 +2505,7 @@ Sat Nov 30 20:40:51 1991 Steve Chamberlain (sac at rtl.cygnus.com) * a29k.h, arm.h, h8300.h, i386.h, i860.h, i960.h , m68k.h, m88k.h, mips.h , np1.h, ns32k.h, pn.h, pyr.h, sparc.h, tahoe.h, - vax.h, ChangeLog: renamed from ../-opcode.h + vax.h: Renamed from ../-opcode.h. Local Variables: diff --git a/contrib/binutils/include/opcode/arm.h b/contrib/binutils/include/opcode/arm.h index c7087eb..99bb9a6 100644 --- a/contrib/binutils/include/opcode/arm.h +++ b/contrib/binutils/include/opcode/arm.h @@ -1,5 +1,5 @@ /* ARM opcode list. - Copyright (C) 1989, Free Software Foundation, Inc. + Copyright 1989, 1991 Free Software Foundation, Inc. This file is part of GDB and GAS. diff --git a/contrib/binutils/include/opcode/convex.h b/contrib/binutils/include/opcode/convex.h index efaeebb..780b12d 100644 --- a/contrib/binutils/include/opcode/convex.h +++ b/contrib/binutils/include/opcode/convex.h @@ -1,5 +1,5 @@ /* Information for instruction disassembly on the Convex. - Copyright 1989, 1993 Free Software Foundation. + Copyright 1989, 1993 Free Software Foundation, Inc. This file is part of GDB. diff --git a/contrib/binutils/include/opcode/i386.h b/contrib/binutils/include/opcode/i386.h index 9deffcc..38de44a 100644 --- a/contrib/binutils/include/opcode/i386.h +++ b/contrib/binutils/include/opcode/i386.h @@ -1152,8 +1152,8 @@ static const template i386_optab[] = { {"pavgb", 2, 0x660fe0, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, {"pavgw", 2, 0x0fe3, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } }, {"pavgw", 2, 0x660fe3, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -{"pextrw", 3, 0x0fc5, X, CpuSSE, FP|Modrm, { Imm8, RegMMX, Reg32|InvMem } }, -{"pextrw", 3, 0x660fc5, X, CpuSSE2,FP|Modrm, { Imm8, RegXMM, Reg32|InvMem } }, +{"pextrw", 3, 0x0fc5, X, CpuSSE, FP|Modrm, { Imm8, RegMMX|InvMem, Reg32 } }, +{"pextrw", 3, 0x660fc5, X, CpuSSE2,FP|Modrm, { Imm8, RegXMM|InvMem, Reg32 } }, {"pinsrw", 3, 0x0fc4, X, CpuSSE, FP|Modrm, { Imm8, Reg32|ShortMem, RegMMX } }, {"pinsrw", 3, 0x660fc4, X, CpuSSE2, FP|Modrm, { Imm8, Reg32|ShortMem, RegXMM } }, {"pmaxsw", 2, 0x0fee, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } }, @@ -1164,8 +1164,8 @@ static const template i386_optab[] = { {"pminsw", 2, 0x660fea, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, {"pminub", 2, 0x0fda, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } }, {"pminub", 2, 0x660fda, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -{"pmovmskb", 2, 0x0fd7, X, CpuSSE, FP|Modrm, { RegMMX, Reg32|InvMem, 0 } }, -{"pmovmskb", 2, 0x660fd7, X, CpuSSE2,FP|Modrm, { RegXMM, Reg32|InvMem, 0 } }, +{"pmovmskb", 2, 0x0fd7, X, CpuSSE, FP|Modrm, { RegMMX|InvMem, Reg32, 0 } }, +{"pmovmskb", 2, 0x660fd7, X, CpuSSE2,FP|Modrm, { RegXMM|InvMem, Reg32, 0 } }, {"pmulhuw", 2, 0x0fe4, X, CpuSSE, FP|Modrm, { RegMMX|LLongMem, RegMMX, 0 } }, {"pmulhuw", 2, 0x660fe4, X, CpuSSE2,FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, {"prefetchnta", 1, 0x0f18, 0, CpuSSE, FP|Modrm, { LLongMem, 0, 0 } }, @@ -1254,7 +1254,7 @@ static const template i386_optab[] = { {"cvtpd2pi", 2, 0x660f2d, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } }, {"cvtpd2ps", 2, 0x660f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, {"cvtps2pd", 2, 0x0f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -{"cvtps2dq", 2, 0x660f5b, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } }, +{"cvtps2dq", 2, 0x660f5b, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, {"cvtsd2si", 2, 0xf20f2d, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm,{ RegXMM|LLongMem, Reg32|Reg64, 0 } }, {"cvtsd2ss", 2, 0xf20f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, {"cvtss2sd", 2, 0xf30f5a, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, @@ -1267,8 +1267,8 @@ static const template i386_optab[] = { {"movdqa", 2, 0x660f7f, X, CpuSSE2, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } }, {"movdqu", 2, 0xf30f6f, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, {"movdqu", 2, 0xf30f7f, X, CpuSSE2, FP|Modrm, { RegXMM, RegXMM|LLongMem, 0 } }, -{"movdq2q", 2, 0xf20fd6, X, CpuSSE2, FP|Modrm, { RegMMX|LLongMem, RegXMM, 0 } }, -{"movq2dq", 2, 0xf30fd6, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegMMX, 0 } }, +{"movdq2q", 2, 0xf20fd6, X, CpuSSE2, FP|Modrm, { RegXMM|InvMem, RegMMX, 0 } }, +{"movq2dq", 2, 0xf30fd6, X, CpuSSE2, FP|Modrm, { RegMMX|InvMem, RegXMM, 0 } }, {"pmuludq", 2, 0x0ff4, X, CpuSSE2, FP|Modrm, { RegMMX|LongMem, RegMMX, 0 } }, {"pmuludq", 2, 0x660ff4, X, CpuSSE2, FP|Modrm, { RegXMM|LongMem, RegXMM, 0 } }, {"pshufd", 3, 0x660f70, X, CpuSSE2, FP|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } }, diff --git a/contrib/binutils/include/opcode/np1.h b/contrib/binutils/include/opcode/np1.h index d23adc7..c3f7e29 100644 --- a/contrib/binutils/include/opcode/np1.h +++ b/contrib/binutils/include/opcode/np1.h @@ -1,5 +1,5 @@ /* Print GOULD NPL instructions for GDB, the GNU debugger. - Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc. This file is part of GDB. diff --git a/contrib/binutils/include/opcode/pn.h b/contrib/binutils/include/opcode/pn.h index 0f59a2a..8c427a2 100644 --- a/contrib/binutils/include/opcode/pn.h +++ b/contrib/binutils/include/opcode/pn.h @@ -1,5 +1,5 @@ /* Print GOULD PN (PowerNode) instructions for GDB, the GNU debugger. - Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc. + Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc. This file is part of GDB. diff --git a/contrib/binutils/include/opcode/ppc.h b/contrib/binutils/include/opcode/ppc.h index 246e3c7..d23e1c6 100644 --- a/contrib/binutils/include/opcode/ppc.h +++ b/contrib/binutils/include/opcode/ppc.h @@ -1,5 +1,5 @@ /* ppc.h -- Header file for PowerPC opcode table - Copyright 1994, 1995 Free Software Foundation, Inc. + Copyright 1994, 1995, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support This file is part of GDB, GAS, and the GNU binutils. diff --git a/contrib/binutils/include/opcode/sparc.h b/contrib/binutils/include/opcode/sparc.h index 423cea7..5b6b5d1 100644 --- a/contrib/binutils/include/opcode/sparc.h +++ b/contrib/binutils/include/opcode/sparc.h @@ -1,5 +1,5 @@ /* Definitions for opcode table for the sparc. - Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 2000 + Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler, GDB, the GNU debugger, and diff --git a/contrib/binutils/include/opcode/v850.h b/contrib/binutils/include/opcode/v850.h index 88916f1..737faf8 100644 --- a/contrib/binutils/include/opcode/v850.h +++ b/contrib/binutils/include/opcode/v850.h @@ -1,5 +1,5 @@ /* v850.h -- Header file for NEC V850 opcode table - Copyright 1996 Free Software Foundation, Inc. + Copyright 1996, 1997 Free Software Foundation, Inc. Written by J.T. Conklin, Cygnus Support This file is part of GDB, GAS, and the GNU binutils. diff --git a/contrib/binutils/include/partition.h b/contrib/binutils/include/partition.h index f49d67a..091655a 100644 --- a/contrib/binutils/include/partition.h +++ b/contrib/binutils/include/partition.h @@ -1,5 +1,5 @@ -/* List implentation of a partition of consecutive integers. - Copyright (C) 2000 Free Software Foundation, Inc. +/* List implementation of a partition of consecutive integers. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. Contributed by CodeSourcery, LLC. This file is part of GNU CC. diff --git a/contrib/binutils/include/progress.h b/contrib/binutils/include/progress.h index f18318a..23b0960 100644 --- a/contrib/binutils/include/progress.h +++ b/contrib/binutils/include/progress.h @@ -1,5 +1,5 @@ /* Default definitions for progress macros. - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright 1994 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/contrib/binutils/include/remote-sim.h b/contrib/binutils/include/remote-sim.h index b32f93f..726ec62 100644 --- a/contrib/binutils/include/remote-sim.h +++ b/contrib/binutils/include/remote-sim.h @@ -1,5 +1,6 @@ /* This file defines the interface between the simulator and gdb. - Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc. + Copyright 1993, 1994, 1996, 1997, 1998, 2000 + Free Software Foundation, Inc. This file is part of GDB. diff --git a/contrib/binutils/include/safe-ctype.h b/contrib/binutils/include/safe-ctype.h index d5fc649..6d4d10a 100644 --- a/contrib/binutils/include/safe-ctype.h +++ b/contrib/binutils/include/safe-ctype.h @@ -1,6 +1,6 @@ /* replacement macros. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. Contributed by Zack Weinberg . This file is part of the libiberty library. diff --git a/contrib/binutils/include/splay-tree.h b/contrib/binutils/include/splay-tree.h index f53f855..e43d4b6 100644 --- a/contrib/binutils/include/splay-tree.h +++ b/contrib/binutils/include/splay-tree.h @@ -1,5 +1,5 @@ /* A splay-tree datatype. - Copyright (C) 1998, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Mark Mitchell (mark@markmitchell.com). This file is part of GNU CC. diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog index a964658..9f69d0e 100644 --- a/contrib/binutils/ld/ChangeLog +++ b/contrib/binutils/ld/ChangeLog @@ -1,3 +1,126 @@ +2001-06-07 Andreas Jaeger + + * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase. + (TEXT_START_ADDR): Likewise. + +2001-06-11 Alan Modra + + Merge from mainline. + 2001-06-05 Danny Smith + * emultempl/pe.em (init): Reduce default stack reserve to 0x200000. + + 2001-05-25 Alan Modra + * configure.host: Replace linuxoldld with linux*oldld. + * configure.tgt: Likewise. + + 2001-05-14 DJ Delorie + * Makefile.am (ld.dvi): Search bfd/doc for texinfo files. + * Makefile.in: Ditto. + + 2001-04-05 Steven J. Hill + * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o. + (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o. + (eelf32ltsmip.c): New target. + (eelf64btsmip.c): Likewise. + (eelf64ltsmip.c): Likewise. + * Makefile.in: Regenerated. + * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS + target. + (mips*-*-linux-gnu*): Likewise. + * emulparams/elf32ltsmip.sh: New. Traditional little endian + MIPS taget. + * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian + target. + * emulparams/elf64ltsmip.sh: New. Traditional 64bit little + endian target. + + 2001-02-27 Alan Modra + * configure.in (BFD_VERSION): New. + (AM_INIT_AUTOMAKE): Use $BFD_VERSION. + * configure: Regenerate. + + 2001-02-13 H.J. Lu + * ldexp.h (node_type): Add etree_provided. + * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node + type to etree_provided if defined by PROVIDE. Allow updating + for etree_provided. + (exp_print_tree): Handle etree_provided. + * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle + etree_provided. + +2001-06-10 Philip Blundell + + * configure.in: Set version to 2.11.1. + * configure: Regenerate. + +2001-06-08 Alan Modra + + * ldlang.c (record_bfd_errors): Remove. + + Merge from mainline. + 2001-05-31 H.J. Lu + * ldlang.c (open_input_bfds): Don't change the bfd error + handler whilst loading symbols. + + 2001-05-02 Nick Clifton + * emultempl/aix.em: Replace buystring with xstrdup. + * emultempl/beos.em: Replace buystring with xstrdup. + +2001-06-07 Alan Modra + + * Many files: Update copyright notices. + +2001-05-23 Alan Modra + + * ldlang.c (wild_doit): Use linker_has_input to reliably determine + whether an input section is the first one assigned to an output + section. + Assorted formatting fixes. + + Merge from mainline. + 2001-05-03 H.J. Lu + * emultempl/elf32.em: Include "libiberty.h". + (gld${EMULATION_NAME}_vercheck): Call basename () to get the + basename of the bfd filename. + (gld${EMULATION_NAME}_stat_needed): Likewise. + (gld${EMULATION_NAME}_try_needed): Likewise. + (gld${EMULATION_NAME}_open_dynamic_archive): Likewise. + + 2001-03-17 Ulrich Drepper + * emultmpl/elf32.em (OPTION_GROUP): New macro. + Add new option Bgroup to longopts. + (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs. + (gld*_list_options): Add -Bgroup and -z defs. + * ld.1: Document -Bgroup and -z defs. + * ld.texinfo: Likewise. + + 2001-02-01 Nick Clifton + * ld.1: Replace occurances of -oformat with --oformat. + + 2001-05-02 H.J. Lu + * ldfile.c: Include "libiberty.h". + * ldlex.l: Likewise. + * ldmisc.c (buystring): Removed. + * ldmisc.h: Likewise. + * ldfile.c: Replace buystring with xstrdup. + * ldlang.c: Likewise. + * ldlex.l: Likewise. + * ldmain.c: Likewise. + * ldmisc.c: Likewise. + * lexsup.c: Likewise. + * mpw-eppcmac.c: Likewise. + + 2001-04-28 Paul Sokolovsky + * ldlang.c (load_symbols): Give emulation a chance + to process unrecognized file before fatal error is + reported, not after. + + 2001-02-26 H.J. Lu + * ldlang.c (open_input_bfds): Set the bfd error handler so + that problems can be caught whilst loading symbols. + (record_bfd_errors): New function: Report BFD errors and mark + the executable output as being invalid. + 2001-04-02 Alan Modra * emulparams/hppalinux.sh (MAXPAGESIZE): Set to 64k. @@ -670,7 +793,7 @@ Tue Nov 14 00:59:19 2000 Denis Chertykov * scripttempl/elf.sc: Add .gnu.linkonce.wi.* to .debug_info sections. - * scripttempl/elf32var.sc: Ditto. + * scripttempl/elf32avr.sc: Ditto. * scripttempl/elfd10v.sc: Ditto. * scripttempl/elfd30v.sc: Ditto. * scripttempl/elfi370.sc: Ditto. @@ -867,8 +990,8 @@ Tue Nov 14 00:59:19 2000 Denis Chertykov 2000-07-05 Kenneth Block - * ld/lexsup.c: Add optional style to demangle switch - * ld/ld.texinfo: Document optional style to demangle switch. + * lexsup.c: Add optional style to demangle switch + * ld.texinfo: Document optional style to demangle switch. 2000-07-20 Hans-Peter Nilsson @@ -924,7 +1047,7 @@ Tue Nov 14 00:59:19 2000 Denis Chertykov 2000-07-16 Charles Wilson - * src/ld/emultempl/pe.em (gld_*_open_dynamic_archive): New search + * emultempl/pe.em (gld_*_open_dynamic_archive): New search order for dynamic library '-lfoo' on pei386: libfoo.dll.a, foo.dll.a, libfoo.a, libfoo.dll, foo.dll. This fixes compatibility errors introduced by the old dynamic lib search order. @@ -1256,7 +1379,7 @@ Thu May 18 10:47:57 2000 Jeffrey A Law (law@cygnus.com) 2000-05-16 Charles Wilson - * ld/emultempl/pe.em (_open_dynamic_archive): New function: Search + * emultempl/pe.em (_open_dynamic_archive): New function: Search the library path for "foo.dll" and "libfoo.dll" dynamic libraries before searching for 'libfoo.a' in response to a '-Bdynamic -lfoo' link options. @@ -1563,7 +1686,7 @@ Fri Apr 7 15:56:57 2000 Andrew Cagney (gld_X_find_potential_libraries): New function. Search for libraries called "*.lib". - * scriptempl/pe.sc: Add .pdata section. + * scripttempl/pe.sc: Add .pdata section. 2000-02-23 Richard Henderson @@ -1624,9 +1747,9 @@ Fri Apr 7 15:56:57 2000 Andrew Cagney 2000-02-03 Timothy Wall - * ld/ldexp.c (fold_name): Make SIZEOF operator return byte count, not + * ldexp.c (fold_name): Make SIZEOF operator return byte count, not octet count. - * ld/ldlang.c (print_input_section, print_data_statement, + * ldlang.c (print_input_section, print_data_statement, print_reloc_statement, print_padding_statement): Print target address values and section sizes as bytes, not octets. (insert_pad) Calculate padding size in octets, and adjust "dot" diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am index 1a72278..d6a2d63 100644 --- a/contrib/binutils/ld/Makefile.am +++ b/contrib/binutils/ld/Makefile.am @@ -138,6 +138,7 @@ ALL_EMULATIONS = \ eelf32bmip.o \ eelf32bmipn32.o \ eelf32btsmip.o \ + eelf32ltsmip.o \ eelf32ebmip.o \ eelf32elmip.o \ eelf32fr30.o \ @@ -245,6 +246,8 @@ ALL_64_EMULATIONS = \ eelf64_sparc.o \ eelf64alpha.o \ eelf64bmip.o \ + eelf64btsmip.o \ + eelf64ltsmip.o \ eelf64hppa.o ALL_EMUL_EXTRA_OFILES = \ @@ -441,6 +444,9 @@ eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \ eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)" +eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)" eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)" @@ -492,6 +498,12 @@ eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \ eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)" +eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)" +eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)" eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)" @@ -882,7 +894,7 @@ ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ - MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) $(srcdir)/ld.texinfo + MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo MAINTAINERCLEANFILES = ldver.texi @@ -988,7 +1000,7 @@ ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \ - ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h + ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h $(INCDIR)/libiberty.h ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ @@ -1013,9 +1025,9 @@ ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ - $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ - ldmain.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h \ - ldfile.h ldver.h ldemul.h $(INCDIR)/demangle.h + $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \ + ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \ + ldver.h ldemul.h $(INCDIR)/demangle.h mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \ config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \ ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h @@ -1036,7 +1048,7 @@ ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldlex.h ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \ ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \ - ldlang.h ldfile.h ldlex.h ldmain.h + ldlang.h ldfile.h ldlex.h ldmain.h $(INCDIR)/libiberty.h deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \ ld.h $(INCDIR)/bin-bugs.h ldmisc.h deffile.h diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in index 862cad6..f79e360 100644 --- a/contrib/binutils/ld/Makefile.in +++ b/contrib/binutils/ld/Makefile.in @@ -246,6 +246,7 @@ ALL_EMULATIONS = \ eelf32bmip.o \ eelf32bmipn32.o \ eelf32btsmip.o \ + eelf32ltsmip.o \ eelf32ebmip.o \ eelf32elmip.o \ eelf32fr30.o \ @@ -354,6 +355,8 @@ ALL_64_EMULATIONS = \ eelf64_sparc.o \ eelf64alpha.o \ eelf64bmip.o \ + eelf64btsmip.o \ + eelf64ltsmip.o \ eelf64hppa.o @@ -1155,6 +1158,9 @@ eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \ eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)" +eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)" eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)" @@ -1206,6 +1212,12 @@ eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \ eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)" +eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)" +eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)" eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)" @@ -1585,7 +1597,7 @@ ld.info: $(srcdir)/ld.texinfo configdoc.texi ldver.texi ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \ - MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) $(srcdir)/ld.texinfo + MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo # We want to reconfigure if configure.host or configure.tgt changes. config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt @@ -1679,7 +1691,7 @@ ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \ - ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h + ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h $(INCDIR)/libiberty.h ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ @@ -1704,9 +1716,9 @@ ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ - $(INCDIR)/getopt.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ - ldmain.h ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h \ - ldfile.h ldver.h ldemul.h $(INCDIR)/demangle.h + $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \ + ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \ + ldver.h ldemul.h $(INCDIR)/demangle.h mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \ config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \ ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h @@ -1727,7 +1739,7 @@ ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldlex.h ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \ ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \ - ldlang.h ldfile.h ldlex.h ldmain.h + ldlang.h ldfile.h ldlex.h ldmain.h $(INCDIR)/libiberty.h deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \ ld.h $(INCDIR)/bin-bugs.h ldmisc.h deffile.h diff --git a/contrib/binutils/ld/configure b/contrib/binutils/ld/configure index ee0e296..2a211e2 100755 --- a/contrib/binutils/ld/configure +++ b/contrib/binutils/ld/configure @@ -972,6 +972,7 @@ else fi +BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` # 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: @@ -984,7 +985,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:988: checking for a BSD compatible install" >&5 +echo "configure:989: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1037,7 +1038,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:1041: checking whether build environment is sane" >&5 +echo "configure:1042: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1094,7 +1095,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1098: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1099: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1123,7 +1124,7 @@ fi PACKAGE=ld -VERSION=2.11 +VERSION=${BFD_VERSION} if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -1140,7 +1141,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1144: checking for working aclocal" >&5 +echo "configure:1145: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1153,7 +1154,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1157: checking for working autoconf" >&5 +echo "configure:1158: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1166,7 +1167,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1170: checking for working automake" >&5 +echo "configure:1171: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1179,7 +1180,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1183: checking for working autoheader" >&5 +echo "configure:1184: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1192,7 +1193,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1196: checking for working makeinfo" >&5 +echo "configure:1197: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1287,7 +1288,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1291: checking for ld used by GCC" >&5 +echo "configure:1292: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1317,10 +1318,10 @@ echo "configure:1291: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1321: checking for GNU ld" >&5 +echo "configure:1322: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1324: checking for non-GNU ld" >&5 +echo "configure:1325: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1355,7 +1356,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1359: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1360: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1372,7 +1373,7 @@ with_gnu_ld=$ac_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1376: checking for $LD option to reload object files" >&5 +echo "configure:1377: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1384,7 +1385,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1388: checking for BSD-compatible nm" >&5 +echo "configure:1389: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1422,7 +1423,7 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1426: checking whether ln -s works" >&5 +echo "configure:1427: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1443,7 +1444,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1447: checking how to recognise dependant libraries" >&5 +echo "configure:1448: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1586,13 +1587,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1590: checking for object suffix" >&5 +echo "configure:1591: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1612,7 +1613,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1616: checking for executable suffix" >&5 +echo "configure:1617: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1622,7 +1623,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -1655,7 +1656,7 @@ case "$deplibs_check_method" in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1659: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1660: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1717,7 +1718,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1721: checking for file" >&5 +echo "configure:1722: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1788,7 +1789,7 @@ esac # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1792: checking for $ac_word" >&5 +echo "configure:1793: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1820,7 +1821,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1824: checking for $ac_word" >&5 +echo "configure:1825: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1855,7 +1856,7 @@ fi # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1859: checking for $ac_word" >&5 +echo "configure:1860: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1887,7 +1888,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1891: checking for $ac_word" >&5 +echo "configure:1892: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1954,8 +1955,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1958 "configure"' > conftest.$ac_ext - if { (eval echo configure:1959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1959 "configure"' > conftest.$ac_ext + if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1976,7 +1977,7 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1980: checking whether the C compiler needs -belf" >&5 +echo "configure:1981: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1989,14 +1990,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2174,7 +2175,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2178: checking for $ac_word" >&5 +echo "configure:2179: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2204,7 +2205,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2208: checking for $ac_word" >&5 +echo "configure:2209: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2255,7 +2256,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2259: checking for $ac_word" >&5 +echo "configure:2260: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2287,7 +2288,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2291: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2292: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2298,12 +2299,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2302 "configure" +#line 2303 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2329,12 +2330,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2333: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2334: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2338: checking whether we are using GNU C" >&5 +echo "configure:2339: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2343,7 +2344,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2362,7 +2363,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2366: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2367: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2405,7 +2406,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:2409: checking for a BSD compatible install" >&5 +echo "configure:2410: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2460,7 +2461,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ALL_LINGUAS= echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2464: checking how to run the C preprocessor" >&5 +echo "configure:2465: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2475,13 +2476,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2492,13 +2493,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2509,13 +2510,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2542,7 +2543,7 @@ echo "$ac_t""$CPP" 1>&6 # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2546: checking for $ac_word" >&5 +echo "configure:2547: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2570,12 +2571,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2574: checking for ANSI C header files" >&5 +echo "configure:2575: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2583,7 +2584,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2600,7 +2601,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2618,7 +2619,7 @@ 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 < EOF @@ -2639,7 +2640,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2650,7 +2651,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2674,12 +2675,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2678: checking for working const" >&5 +echo "configure:2679: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2749,21 +2750,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2753: checking for inline" >&5 +echo "configure:2754: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2789,12 +2790,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2793: checking for off_t" >&5 +echo "configure:2794: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2822,12 +2823,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2826: checking for size_t" >&5 +echo "configure:2827: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2857,19 +2858,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2861: checking for working alloca.h" >&5 +echo "configure:2862: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2890,12 +2891,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2894: checking for alloca" >&5 +echo "configure:2895: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2955,12 +2956,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2959: checking whether alloca needs Cray hooks" >&5 +echo "configure:2960: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2989: checking for $ac_func" >&5 +echo "configure:2990: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3040,7 +3041,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3044: checking stack direction for C alloca" >&5 +echo "configure:3045: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3048,7 +3049,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3092,17 +3093,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3096: checking for $ac_hdr" >&5 +echo "configure:3097: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3131,12 +3132,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3135: checking for $ac_func" >&5 +echo "configure:3136: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3184,7 +3185,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3188: checking for working mmap" >&5 +echo "configure:3189: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3192,7 +3193,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3360,17 +3361,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3364: checking for $ac_hdr" >&5 +echo "configure:3365: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3400,12 +3401,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3404: checking for $ac_func" >&5 +echo "configure:3405: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3457,12 +3458,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3461: checking for $ac_func" >&5 +echo "configure:3462: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3519,19 +3520,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3523: checking for LC_MESSAGES" >&5 +echo "configure:3524: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3552,7 +3553,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3556: checking whether NLS is requested" >&5 +echo "configure:3557: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3572,7 +3573,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3576: checking whether included gettext is requested" >&5 +echo "configure:3577: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3591,17 +3592,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3595: checking for libintl.h" >&5 +echo "configure:3596: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3618,19 +3619,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3622: checking for gettext in libc" >&5 +echo "configure:3623: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3646,7 +3647,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3650: checking for bindtextdomain in -lintl" >&5 +echo "configure:3651: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3654,7 +3655,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3681,19 +3682,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3685: checking for gettext in libintl" >&5 +echo "configure:3686: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3721,7 +3722,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3725: checking for $ac_word" >&5 +echo "configure:3726: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3755,12 +3756,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3759: checking for $ac_func" >&5 +echo "configure:3760: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3810,7 +3811,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3814: checking for $ac_word" >&5 +echo "configure:3815: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3846,7 +3847,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3850: checking for $ac_word" >&5 +echo "configure:3851: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3878,7 +3879,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3918,7 +3919,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3922: checking for $ac_word" >&5 +echo "configure:3923: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3952,7 +3953,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3956: checking for $ac_word" >&5 +echo "configure:3957: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3988,7 +3989,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3992: checking for $ac_word" >&5 +echo "configure:3993: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4078,7 +4079,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4082: checking for catalogs to be installed" >&5 +echo "configure:4083: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4106,17 +4107,17 @@ echo "configure:4082: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4110: checking for linux/version.h" >&5 +echo "configure:4111: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4181,7 +4182,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:4185: checking for executable suffix" >&5 +echo "configure:4186: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4191,7 +4192,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:4195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj | *.ilk | *.pdb) ;; @@ -4217,7 +4218,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4221: checking for $ac_word" >&5 +echo "configure:4222: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4253,7 +4254,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4257: checking for $ac_word" >&5 +echo "configure:4258: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4286,7 +4287,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex"" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4290: checking for $ac_word" >&5 +echo "configure:4291: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4320,7 +4321,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:4324: checking for yywrap in -l$ac_lib" >&5 +echo "configure:4325: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4328,7 +4329,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4362,7 +4363,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:4366: checking lex output file root" >&5 +echo "configure:4367: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4383,7 +4384,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:4387: checking whether yytext is a pointer" >&5 +echo "configure:4388: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4395,14 +4396,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -4425,7 +4426,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4429: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4430: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -4459,17 +4460,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4463: checking for $ac_hdr" >&5 +echo "configure:4464: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4498,12 +4499,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4502: checking for $ac_func" >&5 +echo "configure:4503: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4555,12 +4556,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4559: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4560: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4568,7 +4569,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4593,7 +4594,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4597: checking for opendir in -ldir" >&5 +echo "configure:4598: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4601,7 +4602,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4634,7 +4635,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4638: checking for opendir in -lx" >&5 +echo "configure:4639: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4642,7 +4643,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4686,12 +4687,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4690: checking whether strstr must be declared" >&5 +echo "configure:4691: checking whether strstr must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4712,7 +4713,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4733,12 +4734,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:4737: checking whether free must be declared" >&5 +echo "configure:4738: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4759,7 +4760,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4780,12 +4781,12 @@ EOF fi echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 -echo "configure:4784: checking whether sbrk must be declared" >&5 +echo "configure:4785: checking whether sbrk must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4806,7 +4807,7 @@ int main() { char *(*pfn) = (char *(*)) sbrk ; return 0; } EOF -if { (eval echo configure:4810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_sbrk=no else @@ -4827,12 +4828,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4831: checking whether getenv must be declared" >&5 +echo "configure:4832: checking whether getenv must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4853,7 +4854,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -4874,12 +4875,12 @@ EOF fi echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6 -echo "configure:4878: checking whether environ must be declared" >&5 +echo "configure:4879: checking whether environ must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4900,7 +4901,7 @@ int main() { char *(*pfn) = (char *(*)) environ ; return 0; } EOF -if { (eval echo configure:4904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_environ=no else @@ -4928,19 +4929,19 @@ fi # constants, while still supporting pre-ANSI compilers which do not # support string concatenation. echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6 -echo "configure:4932: checking whether ANSI C string concatenation works" >&5 +echo "configure:4933: checking whether ANSI C string concatenation works" >&5 if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ld_cv_string_concatenation=yes else diff --git a/contrib/binutils/ld/configure.host b/contrib/binutils/ld/configure.host index 7917e36..b2dbd8d 100644 --- a/contrib/binutils/ld/configure.host +++ b/contrib/binutils/ld/configure.host @@ -81,7 +81,7 @@ i[3456]86-*-sco* | i[3456]86-*-isc*) HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o' ;; -i[3456]86-*-linux*aout* | i[3456]86-*-linuxoldld) +i[3456]86-*-linux*aout* | i[3456]86-*-linux*oldld) HOSTING_CRT0=/usr/lib/crt0.o ;; diff --git a/contrib/binutils/ld/configure.in b/contrib/binutils/ld/configure.in index 06831d2..6a69408 100644 --- a/contrib/binutils/ld/configure.in +++ b/contrib/binutils/ld/configure.in @@ -6,7 +6,10 @@ AC_INIT(ldmain.c) AC_CANONICAL_SYSTEM AC_ISC_POSIX -AM_INIT_AUTOMAKE(ld, 2.11) +changequote(,)dnl +BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in` +changequote([,])dnl +AM_INIT_AUTOMAKE(ld, ${BFD_VERSION}) AM_PROG_LIBTOOL diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt index e274cad..fbab221 100644 --- a/contrib/binutils/ld/configure.tgt +++ b/contrib/binutils/ld/configure.tgt @@ -131,7 +131,7 @@ i[3456]86-*-linux*aout*) targ_emul=i386linux targ_extra_emuls=elf_i386 tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;; -i[3456]86-*-linuxoldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;; +i[3456]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;; i[3456]86-*-linux-gnu*) targ_emul=elf_i386 targ_extra_emuls=i386linux tdir_i386linux=${targ_alias}aout @@ -182,6 +182,7 @@ a29k-*-*) targ_emul=a29k ;; arm-*-aout | armel-*-aout) targ_emul=armaoutl ;; armeb-*-aout) targ_emul=armaoutb ;; arm-*-coff) targ_emul=armcoff ;; +arm-*-vxworks) targ_emul=armcoff ;; arm-*-freebsd*) targ_emul=armelf ;; arm-*-netbsd*) targ_emul=armnbsd ;; arm-*-rtems*) targ_emul=armelf ;; @@ -273,11 +274,11 @@ mips*el-*-rtems*) targ_emul=elf32elmip ;; mips*-*-rtems*) targ_emul=elf32ebmip ;; mips*el-*-vxworks*) targ_emul=elf32elmip ;; mips*-*-vxworks*) targ_emul=elf32ebmip ;; -mips*el-*-linux-gnu*) targ_emul=elf32lsmip - targ_extra_emuls="elf32bsmip mipslit mipsbig" +mips*el-*-linux-gnu*) targ_emul=elf32ltsmip + targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip" ;; -mips*-*-linux-gnu*) targ_emul=elf32bsmip - targ_extra_emuls="elf32lsmip mipsbig mipslit" +mips*-*-linux-gnu*) targ_emul=elf32btsmip + targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" ;; mips*-*-lnews*) targ_emul=mipslnews ;; mips*-*-sysv4*) targ_emul=elf32btsmip ;; @@ -322,7 +323,7 @@ powerpc-*-macos*) targ_emul=ppcmacos ;; powerpc-*-netware*) targ_emul=ppcnw ;; powerpcle-*-pe) targ_emul=ppcpe ;; powerpcle-*-winnt*) targ_emul=ppcpe ;; -powerpcle-*-cygwin*) targ_emul=ppcpe ;; +powerpcle-*-cygwin*) targ_emul=ppcpe ;; powerpc-*-aix*) targ_emul=aixppc ;; powerpc-*-beos*) targ_emul=aixppc ;; rs6000-*-aix*) targ_emul=aixrs6 ;; diff --git a/contrib/binutils/ld/deffile.h b/contrib/binutils/ld/deffile.h index be6f486..efd7834 100644 --- a/contrib/binutils/ld/deffile.h +++ b/contrib/binutils/ld/deffile.h @@ -1,5 +1,5 @@ /* deffile.h - header for .DEF file parser - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. Written by DJ Delorie dj@cygnus.com This file is part of GLD, the Gnu Linker. diff --git a/contrib/binutils/ld/deffilep.y b/contrib/binutils/ld/deffilep.y index 760167b..d6d32c8 100644 --- a/contrib/binutils/ld/deffilep.y +++ b/contrib/binutils/ld/deffilep.y @@ -1,6 +1,6 @@ %{ /* deffilep.y - parser for .def files */ -/* Copyright (C) 1995, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright 1995, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Binutils. diff --git a/contrib/binutils/ld/emulparams/shelf_linux.sh b/contrib/binutils/ld/emulparams/shelf_linux.sh new file mode 100644 index 0000000..d7b7631 --- /dev/null +++ b/contrib/binutils/ld/emulparams/shelf_linux.sh @@ -0,0 +1,14 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-shbig-linux" +TEXT_START_ADDR=0x400000 +MAXPAGESIZE=0x10000 +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +DATA_START_SYMBOLS='__data_start = . ;'; + +OTHER_READWRITE_SECTIONS=' + .note.ABI-tag : { *(.note.ABI-tag) } +' diff --git a/contrib/binutils/ld/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em index 936da13..ab70843 100644 --- a/contrib/binutils/ld/emultempl/armcoff.em +++ b/contrib/binutils/ld/emultempl/armcoff.em @@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <e${EMULATION_NAME}.c <e${EMULATION_NAME}.c < ELF support by Ian Lance Taylor @@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" +#include "libiberty.h" #include @@ -130,7 +131,7 @@ static void gld${EMULATION_NAME}_vercheck (s) lang_input_statement_type *s; { - const char *soname, *f; + const char *soname; struct bfd_link_needed_list *l; if (global_vercheck_failed) @@ -141,19 +142,13 @@ gld${EMULATION_NAME}_vercheck (s) soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = bfd_get_filename (s->the_bfd); - - f = strrchr (soname, '/'); - if (f != NULL) - ++f; - else - f = soname; + soname = basename (bfd_get_filename (s->the_bfd)); for (l = global_vercheck_needed; l != NULL; l = l->next) { const char *suffix; - if (strcmp (f, l->name) == 0) + if (strcmp (soname, l->name) == 0) { /* Probably can't happen, but it's an easy check. */ continue; @@ -168,7 +163,7 @@ gld${EMULATION_NAME}_vercheck (s) suffix += sizeof ".so." - 1; - if (strncmp (f, l->name, suffix - l->name) == 0) + if (strncmp (soname, l->name, suffix - l->name) == 0) { /* Here we know that S is a dynamic object FOO.SO.VER1, and the object we are considering needs a dynamic object @@ -192,7 +187,6 @@ gld${EMULATION_NAME}_stat_needed (s) struct stat st; const char *suffix; const char *soname; - const char *f; if (global_found) return; @@ -230,17 +224,12 @@ gld${EMULATION_NAME}_stat_needed (s) soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = s->filename; - - f = strrchr (soname, '/'); - if (f != NULL) - ++f; - else - f = soname; + soname = basename (s->filename); - if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0) + if (strncmp (soname, global_needed->name, + suffix - global_needed->name) == 0) einfo ("%P: warning: %s, needed by %B, may conflict with %s\n", - global_needed->name, global_needed->by, f); + global_needed->name, global_needed->by, soname); } @@ -340,11 +329,7 @@ cat >>e${EMULATION_NAME}.c <filename, '/'); - if (soname) - soname++; - else - soname = abfd->filename; + soname = basename (abfd->filename); if (trace_file_tries) info_msg (_("found %s at %s\n"), soname, name); @@ -949,20 +934,13 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) if (bfd_check_format (entry->the_bfd, bfd_object) && (entry->the_bfd->flags & DYNAMIC) != 0) { - char *needed_name; - ASSERT (entry->is_archive && entry->search_dirs_flag); /* Rather than duplicating the logic above. Just use the - filename we recorded earlier. - - First strip off everything before the last '/'. */ - filename = strrchr (entry->filename, '/'); - filename++; + filename we recorded earlier. */ - needed_name = (char *) xmalloc (strlen (filename) + 1); - strcpy (needed_name, filename); - bfd_elf_set_dt_needed_name (entry->the_bfd, needed_name); + filename = xstrdup (basename (entry->filename)); + bfd_elf_set_dt_needed_name (entry->the_bfd, filename); } return true; @@ -1337,6 +1315,7 @@ cat >>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <e${EMULATION_NAME}.c <e${EMULATION_NAME}.c < Linux support by Eric Youngdale diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em index fcbf835..feab338 100644 --- a/contrib/binutils/ld/emultempl/pe.em +++ b/contrib/binutils/ld/emultempl/pe.em @@ -4,7 +4,8 @@ rm -f e${EMULATION_NAME}.c (echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-) cat >>e${EMULATION_NAME}.c <e${EMULATION_NAME}.c <> <<&\cr @@ -3683,7 +3696,7 @@ following @group SECTIONS @{ - .text 9+this_isnt_constant : + .text 9+this_isnt_constant : @{ *(.text) @} @} @end group @@ -3758,7 +3771,7 @@ identical values: @group SECTIONS @{ @dots{} .output1 : - @{ + @{ start_of_output_1 = ABSOLUTE(.); @dots{} @} @@ -4071,7 +4084,7 @@ non-interworking aware Thumb code. @cindex entry point, thumb @kindex --thumb-entry=@var{entry} The @samp{--thumb-entry} switch is a duplicate of the generic -@samp{--entry} switch, in that it sets the program's starting address. +@samp{--entry} switch, in that it sets the program's starting address. But it also sets the bottom bit of the address, so that it can be branched to using a BX instruction, and the program will start executing in Thumb mode straight away. @@ -4449,10 +4462,10 @@ This command does nothing whatever; it's only accepted for compatibility. @cindex @code{FORMAT} (MRI) @item FORMAT @var{output-format} Similar to the @code{OUTPUT_FORMAT} command in the more general linker -language, but restricted to one of these output formats: +language, but restricted to one of these output formats: @enumerate -@item +@item S-records, if @var{output-format} is @samp{S} @item @@ -4515,12 +4528,12 @@ If you have more than one @code{SECT} statement for the same @cindex GNU Free Documentation License GNU Free Documentation License - + Version 1.1, March 2000 Copyright (C) 2000 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. diff --git a/contrib/binutils/ld/ldcref.c b/contrib/binutils/ld/ldcref.c index cb2a00f..6b15ffd 100644 --- a/contrib/binutils/ld/ldcref.c +++ b/contrib/binutils/ld/ldcref.c @@ -1,5 +1,5 @@ /* ldcref.c -- output a cross reference table - Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor This file is part of GLD, the Gnu Linker. diff --git a/contrib/binutils/ld/ldctor.c b/contrib/binutils/ld/ldctor.c index 6e5eace..1c8439b 100644 --- a/contrib/binutils/ld/ldctor.c +++ b/contrib/binutils/ld/ldctor.c @@ -1,5 +1,5 @@ /* ldctor.c -- constructor support routines - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. By Steve Chamberlain diff --git a/contrib/binutils/ld/ldctor.h b/contrib/binutils/ld/ldctor.h index 4283c47..7d8c848 100644 --- a/contrib/binutils/ld/ldctor.h +++ b/contrib/binutils/ld/ldctor.h @@ -1,5 +1,6 @@ /* ldctor.h - linker constructor support - Copyright 1991, 92, 93, 94, 95, 98, 2000 Free Software Foundation, Inc. + Copyright 1991, 1992, 1993, 1994, 1995, 1998, 2000 + Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. diff --git a/contrib/binutils/ld/ldemul.c b/contrib/binutils/ld/ldemul.c index b0f43cd..44c8c3e 100644 --- a/contrib/binutils/ld/ldemul.c +++ b/contrib/binutils/ld/ldemul.c @@ -1,5 +1,5 @@ /* ldemul.c -- clearing house for ld emulation states - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. diff --git a/contrib/binutils/ld/ldemul.h b/contrib/binutils/ld/ldemul.h index 224dab5..423a9d9 100644 --- a/contrib/binutils/ld/ldemul.h +++ b/contrib/binutils/ld/ldemul.h @@ -1,5 +1,5 @@ /* ld-emul.h - Linker emulation header file - Copyright 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c index cc34274..ca622f6 100644 --- a/contrib/binutils/ld/ldexp.c +++ b/contrib/binutils/ld/ldexp.c @@ -1,5 +1,6 @@ /* This module handles expression trees. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support . @@ -593,10 +594,11 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp) case etree_assign: case etree_provide: + case etree_provided: if (tree->assign.dst[0] == '.' && tree->assign.dst[1] == 0) { /* Assignment to dot can only be done during allocation */ - if (tree->type.node_class == etree_provide) + if (tree->type.node_class != etree_assign) einfo (_("%F%S can not PROVIDE assignment to location counter\n")); if (allocation_done == lang_allocating_phase_enum || (allocation_done == lang_final_phase_enum @@ -666,6 +668,8 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp) h->type = bfd_link_hash_defined; h->u.def.value = result.value; h->u.def.section = result.section->bfd_section; + if (tree->type.node_class == etree_provide) + tree->type.node_class = etree_provided; } } } @@ -880,6 +884,7 @@ exp_print_tree (tree) exp_print_tree (tree->assign.src); break; case etree_provide: + case etree_provided: fprintf (config.map_file, "PROVIDE (%s, ", tree->assign.dst); exp_print_tree (tree->assign.src); fprintf (config.map_file, ")"); diff --git a/contrib/binutils/ld/ldexp.h b/contrib/binutils/ld/ldexp.h index 4c507bd..36f88f8 100644 --- a/contrib/binutils/ld/ldexp.h +++ b/contrib/binutils/ld/ldexp.h @@ -1,5 +1,5 @@ /* ldexp.h - - Copyright 1991, 92, 93, 94, 95, 98, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -37,6 +37,7 @@ typedef struct { etree_name, etree_assign, etree_provide, + etree_provided, etree_undef, etree_unspec, etree_value, diff --git a/contrib/binutils/ld/ldfile.c b/contrib/binutils/ld/ldfile.c index fbb4685..0e4d0ec 100644 --- a/contrib/binutils/ld/ldfile.c +++ b/contrib/binutils/ld/ldfile.c @@ -1,5 +1,5 @@ /* Linker file opening and searching. - Copyright (C) 1991, 92, 93, 94, 95, 98, 99, 2000 + Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -33,6 +33,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "ldgram.h" #include "ldlex.h" #include "ldemul.h" +#include "libiberty.h" #include @@ -231,23 +232,32 @@ ldfile_open_file (entry) else { search_arch_type *arch; + boolean found = false; /* Try to open or lib.a */ for (arch = search_arch_head; arch != (search_arch_type *) NULL; arch = arch->next) { - if (ldfile_open_file_search (arch->name, entry, "lib", ".a")) - return; + found = ldfile_open_file_search (arch->name, entry, "lib", ".a"); + if (found) + break; #ifdef VMS - if (ldfile_open_file_search (arch->name, entry, ":lib", ".a")) - return; + found = ldfile_open_file_search (arch->name, entry, ":lib", ".a"); + if (found) + break; #endif - if (ldemul_find_potential_libraries (arch->name, entry)) - return; + found = ldemul_find_potential_libraries (arch->name, entry); + if (found) + break; } - einfo (_("%F%P: cannot find %s\n"), entry->local_sym_name); + /* If we have found the file, we don't need to search directories + again. */ + if (found) + entry->search_dirs_flag = false; + else + einfo (_("%F%P: cannot find %s\n"), entry->local_sym_name); } } @@ -405,7 +415,7 @@ void ldfile_add_arch (in_name) CONST char *in_name; { - char *name = buystring (in_name); + char *name = xstrdup (in_name); search_arch_type *new = (search_arch_type *) xmalloc (sizeof (search_arch_type)); diff --git a/contrib/binutils/ld/ldfile.h b/contrib/binutils/ld/ldfile.h index 35bd2dc..ce822e7d 100644 --- a/contrib/binutils/ld/ldfile.h +++ b/contrib/binutils/ld/ldfile.h @@ -1,5 +1,6 @@ /* ldfile.h - - Copyright 1991, 92, 93, 94, 95, 2000 Free Software Foundation, Inc. + Copyright 1991, 1992, 1993, 1994, 1995, 2000 + Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. diff --git a/contrib/binutils/ld/ldgram.y b/contrib/binutils/ld/ldgram.y index 2c40478..e7f4a59 100644 --- a/contrib/binutils/ld/ldgram.y +++ b/contrib/binutils/ld/ldgram.y @@ -1,6 +1,6 @@ -/* A YACC grammer to parse a superset of the AT&T linker scripting languaue. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 - Free Software Foundation, Inc. +/* A YACC grammar to parse a superset of the AT&T linker scripting language. + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com). This file is part of GNU ld. diff --git a/contrib/binutils/ld/ldint.texinfo b/contrib/binutils/ld/ldint.texinfo index afb9890..37efae3 100644 --- a/contrib/binutils/ld/ldint.texinfo +++ b/contrib/binutils/ld/ldint.texinfo @@ -1,5 +1,7 @@ \input texinfo @setfilename ldint.info +@c Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +@c Free Software Foundation, Inc. @ifinfo @format @@ -12,7 +14,8 @@ END-INFO-DIR-ENTRY @ifinfo This file documents the internals of the GNU linker ld. -Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation, Inc. +Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +Free Software Foundation, Inc. Contributed by Cygnus Support. Permission is granted to copy, distribute and/or modify this document diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c index 32097fa..f683abb 100644 --- a/contrib/binutils/ld/ldlang.c +++ b/contrib/binutils/ld/ldlang.c @@ -1,5 +1,6 @@ /* Linker command language support. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -41,9 +42,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include /* FORWARDS */ -static lang_statement_union_type *new_statement PARAMS ((enum statement_enum, - size_t, - lang_statement_list_type *)); +static lang_statement_union_type *new_statement + PARAMS ((enum statement_enum, size_t, lang_statement_list_type *)); /* LOCALS */ static struct obstack stat_obstack; @@ -190,18 +190,22 @@ struct unique_sections *unique_section_list; etree_type *base; /* Relocation base - or null */ -#if defined(__STDC__) || defined(ALMOST_STDC) +#if defined (__STDC__) || defined (ALMOST_STDC) #define cat(a,b) a##b #else #define cat(a,b) a/**/b #endif -/* Don't beautify the line below with "innocent" whitespace, it breaks the K&R C preprocessor! */ -#define new_stat(x, y) (cat (x,_type)*) new_statement (cat (x,_enum), sizeof (cat (x,_type)), y) +/* Don't beautify the line below with "innocent" whitespace, it breaks + the K&R C preprocessor! */ +#define new_stat(x, y) \ + (cat (x,_type)*) new_statement (cat (x,_enum), sizeof (cat (x,_type)), y) -#define outside_section_address(q) ((q)->output_offset + (q)->output_section->vma) +#define outside_section_address(q) \ + ((q)->output_offset + (q)->output_section->vma) -#define outside_symbol_address(q) ((q)->value + outside_section_address (q->section)) +#define outside_symbol_address(q) \ + ((q)->value + outside_section_address (q->section)) #define SECTION_NAME_MAP_LENGTH (16) @@ -243,14 +247,16 @@ walk_wild_section (ptr, section, file, callback, data) if (ptr->exclude_filename_list != NULL) { struct name_list *list_tmp; - for (list_tmp = ptr->exclude_filename_list; list_tmp; list_tmp = list_tmp->next) + for (list_tmp = ptr->exclude_filename_list; + list_tmp; + list_tmp = list_tmp->next) { boolean match; if (wildcardp (list_tmp->name)) - match = fnmatch (list_tmp->name, file->filename, 0) == 0 ? true : false; + match = fnmatch (list_tmp->name, file->filename, 0) == 0; else - match = strcmp (list_tmp->name, file->filename) == 0 ? true : false; + match = strcmp (list_tmp->name, file->filename) == 0; if (match) return; @@ -273,9 +279,9 @@ walk_wild_section (ptr, section, file, callback, data) if (section == NULL) match = true; else if (wildcard) - match = fnmatch (section, sname, 0) == 0 ? true : false; + match = fnmatch (section, sname, 0) == 0; else - match = strcmp (section, sname) == 0 ? true : false; + match = strcmp (section, sname) == 0; /* If this is a wild-card output section statement, exclude sections that match UNIQUE_SECTION_LIST. */ @@ -448,7 +454,7 @@ new_statement (type, size, list) We can be supplied with requests for input files more than once; they may, for example be split over serveral lines like foo.o(.text) - foo.o(.data) etc, so when asked for a file we check that we havn't + foo.o(.data) etc, so when asked for a file we check that we haven't got it already so we don't duplicate the bfd. */ static lang_input_statement_type * @@ -621,7 +627,7 @@ lang_memory_region_lookup (name) lang_memory_region_type *new = (lang_memory_region_type *) stat_alloc (sizeof (lang_memory_region_type)); - new->name = buystring (name); + new->name = xstrdup (name); new->next = (lang_memory_region_type *) NULL; *lang_memory_region_list_tail = new; @@ -1134,12 +1140,10 @@ wild_doit (ptr, section, output, file) flagword flags; if (output->bfd_section == NULL) - { - init_os (output); - first = true; - } - else - first = false; + init_os (output); + + first = ! output->bfd_section->linker_has_input; + output->bfd_section->linker_has_input = 1; /* Add a section reference to the list. */ new = new_stat (lang_input_section, ptr); @@ -1433,6 +1437,11 @@ load_symbols (entry, place) lang_statement_list_type *hold; err = bfd_get_error (); + + /* See if the emulation has some special knowledge. */ + if (ldemul_unrecognized_file (entry)) + return; + if (err == bfd_error_file_ambiguously_recognized) { char **p; @@ -1450,13 +1459,7 @@ load_symbols (entry, place) bfd_close (entry->the_bfd); entry->the_bfd = NULL; - /* See if the emulation has some special knowledge. */ - - if (ldemul_unrecognized_file (entry)) - return; - /* Try to interpret the file as a linker script. */ - ldfile_open_command_file (entry->filename); hold = stat_ptr; @@ -1675,7 +1678,8 @@ closest_target_match (target, data) /* Oh dear, we now have two potential candidates for a successful match. Compare their names and choose the better one. */ - if (name_compare (target->name, original->name) > name_compare (winner->name, original->name)) + if (name_compare (target->name, original->name) + > name_compare (winner->name, original->name)) winner = target; /* Keep on searching until wqe have checked them all. */ @@ -1771,7 +1775,8 @@ open_output (name) /* Try to find a target as similar as possible to the default target, but which has the desired endian characteristic. */ - (void) bfd_search_for_target (closest_target_match, (PTR) target); + (void) bfd_search_for_target (closest_target_match, + (PTR) target); /* Oh dear - we could not find any targets that satisfy our requirements. */ @@ -1971,7 +1976,7 @@ ldlang_add_undef (name) new->next = ldlang_undef_chain_list_head; ldlang_undef_chain_list_head = new; - new->name = buystring (name); + new->name = xstrdup (name); } /* Run through the list of undefineds created above and place them @@ -2664,7 +2669,8 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax) } #define IGNORE_SECTION(bfd, s) \ - (((bfd_get_section_flags (bfd, s) & (SEC_ALLOC | SEC_LOAD)) != (SEC_ALLOC | SEC_LOAD)) \ + (((bfd_get_section_flags (bfd, s) & (SEC_ALLOC | SEC_LOAD)) \ + != (SEC_ALLOC | SEC_LOAD)) \ || bfd_section_size (bfd, s) == 0) /* Check to see if any allocated sections overlap with other allocated @@ -2787,8 +2793,9 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) case lang_output_section_statement_enum: { bfd_vma after; - lang_output_section_statement_type *os = &s->output_section_statement; + lang_output_section_statement_type *os; + os = &s->output_section_statement; if (os->bfd_section == NULL) /* This section was never actually created. */ break; @@ -2843,10 +2850,12 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) && ! link_info.relocateable && strcmp (os->region->name, "*default*") == 0 && lang_memory_region_list != NULL - && (strcmp (lang_memory_region_list->name, "*default*") != 0 + && (strcmp (lang_memory_region_list->name, + "*default*") != 0 || lang_memory_region_list->next != NULL)) einfo (_("%P: warning: no memory region specified for section `%s'\n"), - bfd_get_section_name (output_bfd, os->bfd_section)); + bfd_get_section_name (output_bfd, + os->bfd_section)); dot = os->region->current; @@ -2855,7 +2864,8 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) bfd_vma olddot; olddot = dot; - dot = align_power (dot, os->bfd_section->alignment_power); + dot = align_power (dot, + os->bfd_section->alignment_power); if (dot != olddot && config.warn_section_align) einfo (_("%P: warning: changing start of section %s by %u bytes\n"), @@ -3172,9 +3182,9 @@ lang_do_assignments (s, output_section_statement, fill, dot) case lang_output_section_statement_enum: { - lang_output_section_statement_type *os = - &(s->output_section_statement); + lang_output_section_statement_type *os; + os = &(s->output_section_statement); if (os->bfd_section != NULL) { dot = os->bfd_section->vma; @@ -3347,8 +3357,10 @@ lang_set_startof () h = bfd_link_hash_lookup (link_info.hash, buf, false, false, true); if (h != NULL && h->type == bfd_link_hash_undefined) { - unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, - ldfile_output_machine); + unsigned opb; + + opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); h->type = bfd_link_hash_defined; if (s->_cooked_size != 0) h->u.def.value = s->_cooked_size / opb; @@ -4181,8 +4193,9 @@ lang_section_start (name, address) const char *name; etree_type *address; { - lang_address_statement_type *ad = new_stat (lang_address_statement, stat_ptr); + lang_address_statement_type *ad; + ad = new_stat (lang_address_statement, stat_ptr); ad->section_name = name; ad->address = address; } @@ -4575,9 +4588,7 @@ lang_record_phdrs () lang_final_phase_enum); if (! bfd_record_phdr (output_bfd, l->type, - l->flags == NULL ? false : true, - flags, - l->at == NULL ? false : true, + l->flags != NULL, flags, l->at != NULL, at, l->filehdr, l->phdrs, c, secs)) einfo (_("%F%P: bfd_record_phdr failed: %E\n")); } diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h index ac0fd28..348529a 100644 --- a/contrib/binutils/ld/ldlang.h +++ b/contrib/binutils/ld/ldlang.h @@ -1,5 +1,6 @@ /* ldlang.h - linker command language support - Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. diff --git a/contrib/binutils/ld/ldlex.h b/contrib/binutils/ld/ldlex.h index 9990ddd..36f2ad3 100644 --- a/contrib/binutils/ld/ldlex.h +++ b/contrib/binutils/ld/ldlex.h @@ -1,5 +1,6 @@ /* ldlex.h - - Copyright 1991, 92, 93, 94, 95, 1997 Free Software Foundation, Inc. + Copyright 1991, 1992, 1993, 1994, 1995, 1997, 2000 + Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l index d5f5d27..eecb902 100644 --- a/contrib/binutils/ld/ldlex.l +++ b/contrib/binutils/ld/ldlex.l @@ -1,6 +1,6 @@ %{ -/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 +/* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of GLD, the Gnu Linker. @@ -45,6 +45,7 @@ This was written by steve chamberlain #include "ldfile.h" #include "ldlex.h" #include "ldmain.h" +#include "libiberty.h" /* The type of top-level parser input. yylex and yyparse (indirectly) both check this. */ @@ -147,7 +148,7 @@ V_IDENTIFIER [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)* "-" { RTOKEN('-');} "+" { RTOKEN('+');} -{FILENAMECHAR1}{SYMBOLCHARN}* { yylval.name = buystring(yytext); return NAME; } +{FILENAMECHAR1}{SYMBOLCHARN}* { yylval.name = xstrdup(yytext); return NAME; } "=" { RTOKEN('='); } "$"([0-9A-Fa-f])+ { @@ -333,17 +334,17 @@ V_IDENTIFIER [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)* {FILENAMECHAR1}{NOCFILENAMECHAR}* { /* Filename without commas, needed to parse mri stuff */ - yylval.name = buystring(yytext); + yylval.name = xstrdup(yytext); return NAME; } {FILENAMECHAR1}{FILENAMECHAR}* { - yylval.name = buystring(yytext); + yylval.name = xstrdup(yytext); return NAME; } "-l"{FILENAMECHAR}+ { - yylval.name = buystring (yytext + 2); + yylval.name = xstrdup (yytext + 2); return LNAME; }